File indexing completed on 2024-04-06 12:07:57
0001 #ifndef DQM_L1TMONITORCLIENT_L1TDTTF_H
0002 #define DQM_L1TMONITORCLIENT_L1TDTTF_H
0003
0004
0005 #include <string>
0006
0007
0008 #include "FWCore/Framework/interface/Event.h"
0009 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0010 #include "DQMServices/Core/interface/DQMStore.h"
0011
0012
0013
0014
0015
0016 class TH1F;
0017 class TH2F;
0018
0019 class L1TDTTFClient : public DQMEDHarvester {
0020 public:
0021
0022 L1TDTTFClient(const edm::ParameterSet& ps);
0023
0024
0025 ~L1TDTTFClient() override;
0026
0027 protected:
0028 void dqmEndLuminosityBlock(DQMStore::IBooker& ibooker,
0029 DQMStore::IGetter&,
0030 edm::LuminosityBlock const&,
0031 edm::EventSetup const&) override;
0032 void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;
0033
0034 void book(DQMStore::IBooker& ibooker);
0035
0036 private:
0037 std::string l1tdttffolder_;
0038 edm::InputTag dttfSource_;
0039 bool online_;
0040 bool verbose_;
0041 int resetafterlumi_;
0042 int counterLS_;
0043 TH2F* occupancy_r_;
0044
0045 std::string wheel_[6];
0046 std::string wheelpath_[6];
0047 std::string inclusivepath_;
0048 std::string gmtpath_;
0049 std::string testpath_;
0050
0051 MonitorElement* dttf_nTracks_integ;
0052 MonitorElement* dttf_occupancySummary;
0053 MonitorElement* dttf_bx_summary;
0054 MonitorElement* dttf_bx_integ;
0055 MonitorElement* dttf_eta_fine_integ;
0056 MonitorElement* dttf_quality_integ;
0057 MonitorElement* dttf_quality_summary;
0058 MonitorElement* dttf_highQual_Summary;
0059 MonitorElement* dttf_phi_eta_coarse_integ;
0060 MonitorElement* dttf_phi_eta_fine_integ;
0061 MonitorElement* dttf_phi_eta_integ;
0062 MonitorElement* dttf_eta_fine_fraction;
0063 MonitorElement* dttf_phi_integ;
0064 MonitorElement* dttf_pt_integ;
0065 MonitorElement* dttf_eta_integ;
0066 MonitorElement* dttf_q_integ;
0067
0068 MonitorElement* dttf_gmt_matching;
0069 MonitorElement* dttf_2ndTrack_Summary;
0070
0071 MonitorElement* dttf_occupancySummary_test;
0072
0073 MonitorElement* dttf_nTracks_integ_2ndTrack;
0074 MonitorElement* dttf_occupancySummary_2ndTrack;
0075 MonitorElement* dttf_bx_summary_2ndTrack;
0076 MonitorElement* dttf_bx_integ_2ndTrack;
0077 MonitorElement* dttf_quality_integ_2ndTrack;
0078 MonitorElement* dttf_quality_summary_2ndTrack;
0079 MonitorElement* dttf_highQual_Summary_2ndTrack;
0080 MonitorElement* dttf_phi_eta_integ_2ndTrack;
0081 MonitorElement* dttf_eta_integ_2ndTrack;
0082 MonitorElement* dttf_phi_integ_2ndTrack;
0083 MonitorElement* dttf_pt_integ_2ndTrack;
0084 MonitorElement* dttf_q_integ_2ndTrack;
0085
0086 MonitorElement* dttf_nTracks_wheel[6];
0087 MonitorElement* dttf_bx_wheel_summary[6];
0088 MonitorElement* dttf_bx_wheel_integ[6];
0089 MonitorElement* dttf_quality_wheel[6];
0090 MonitorElement* dttf_quality_summary_wheel[6];
0091 MonitorElement* dttf_fine_fraction_wh[6];
0092 MonitorElement* dttf_eta_wheel[6];
0093 MonitorElement* dttf_phi_wheel[6];
0094 MonitorElement* dttf_pt_wheel[6];
0095 MonitorElement* dttf_q_wheel[6];
0096
0097 MonitorElement* dttf_nTracks_wheel_2ndTrack[6];
0098 MonitorElement* dttf_bx_wheel_summary_2ndTrack[6];
0099 MonitorElement* dttf_bx_wheel_integ_2ndTrack[6];
0100
0101 TH1F* getTH1F(DQMStore::IGetter& igetter, const char* hname);
0102 TH2F* getTH2F(DQMStore::IGetter& igetter, const char* hname);
0103
0104 void setMapLabel(MonitorElement* me);
0105
0106 void buildHighQualityPlot(DQMStore::IGetter& igetter,
0107 TH2F* occupancySummary,
0108 MonitorElement* highQual_Summary,
0109 const std::string& path);
0110
0111 void buildPhiEtaPlotOFC(DQMStore::IGetter& igetter,
0112 MonitorElement* phi_eta_fine_integ,
0113 MonitorElement* phi_eta_coarse_integ,
0114 MonitorElement* phi_eta_integ,
0115 const std::string& path_fine,
0116 const std::string& path_coarse,
0117 int wh);
0118
0119 void buildPhiEtaPlotO(DQMStore::IGetter& igetter, MonitorElement* phi_eta_integ, const std::string& path, int wh);
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132 void makeSummary(DQMStore::IGetter& igetter);
0133 void buildSummaries(DQMStore::IGetter& igetter);
0134 void setGMTsummary(DQMStore::IGetter& igetter);
0135
0136 void setWheelLabel(MonitorElement* me);
0137 void setQualLabel(MonitorElement* me, int axis);
0138
0139 template <typename T>
0140 void normalize(T* me) {
0141 double scale = me->Integral();
0142 if (scale > 0) {
0143 normalize(me, 1. / scale, scale);
0144 }
0145 }
0146
0147 template <typename T>
0148 void normalize(T* me, const double& scale) {
0149 normalize(me, scale, me->Integral());
0150 }
0151
0152 template <typename T>
0153 void normalize(T* me, const double& scale, const double& entries) {
0154 me->SetEntries(entries);
0155 me->Scale(scale);
0156 }
0157 };
0158
0159 #endif