18 #include <TProfile2D.h>
30 LogInfo(
"TriggerDQM")<<
"[TriggerDQM]: ending... ";
43 monitorName_ = parameters_.getUntrackedParameter<
string>(
"monitorName",
"");
45 prescaleLS_ = parameters_.getUntrackedParameter<
int>(
"prescaleLS", -1);
47 prescaleEvt_ = parameters_.getUntrackedParameter<
int>(
"prescaleEvt", -1);
49 output_dir_ = parameters_.getUntrackedParameter<
string>(
"output_dir",
"");
51 input_dir_ = parameters_.getUntrackedParameter<
string>(
"input_dir",
"");
64 dttpgphmapcorrf = ibooker.
book2D(
"DT_TPG_phi_map_corr_frac",
65 "Fraction of correlated best triggers per station",20,1,21,12,0,12);
66 dttpgphmap2ndf = ibooker.
book2D(
"DT_TPG_phi_map_2nd_frac",
67 "Fraction of second tracks per station",20,1,21,12,0,12);
68 dttpgphmapbxf[0] = ibooker.
book2D(
"DT_TPG_phi_map_bx-1_frac",
69 "Fraction of triggers per station (BX=-1)",20,1,21,12,0,12);
70 dttpgphmapbxf[1] = ibooker.
book2D(
"DT_TPG_phi_map_bx0_frac",
71 "Fraction of triggers per station (BX=0)",20,1,21,12,0,12);
72 dttpgphmapbxf[2] = ibooker.
book2D(
"DT_TPG_phi_map_bx+1_frac",
73 "Fraction of triggers per station (BX=1)",20,1,21,12,0,12);
74 setMapPhLabel(dttpgphmapcorrf);
75 setMapPhLabel(dttpgphmap2ndf);
76 setMapPhLabel(dttpgphmapbxf[0]);
77 setMapPhLabel(dttpgphmapbxf[1]);
78 setMapPhLabel(dttpgphmapbxf[2]);
80 dttpgthmaphf = ibooker.
book2D(
"DT_TPG_theta_map_corr_frac",
81 "Fraction of H quality best triggers per station",15,1,16,12,0,12);
82 dttpgthmapbxf[0] = ibooker.
book2D(
"DT_TPG_theta_map_bx-1_frac",
83 "Fraction of triggers per station (BX=-1)",15,1,16,12,0,12);
84 dttpgthmapbxf[1] = ibooker.
book2D(
"DT_TPG_theta_map_bx0_frac",
85 "Fraction of triggers per station (BX=0)",15,1,16,12,0,12);
86 dttpgthmapbxf[2] = ibooker.
book2D(
"DT_TPG_theta_map_bx+1_frac",
87 "Fraction of triggers per station (BX=1)",15,1,16,12,0,12);
88 setMapThLabel(dttpgthmaphf);
89 setMapThLabel(dttpgthmapbxf[0]);
90 setMapThLabel(dttpgthmapbxf[1]);
91 setMapThLabel(dttpgthmapbxf[2]);
95 if (prescaleEvt_<1)
return;
96 if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0)
return;
98 string nName =
"DT_TPG_phi_best_map_corr";
99 string dName =
"DT_TPG_phi_best_map";
100 makeRatioHisto(igetter,dttpgphmapcorrf,nName,dName);
101 dName =
"DT_TPG_phi_map";
102 nName =
"DT_TPG_phi_map_2nd";
103 makeRatioHisto(igetter,dttpgphmap2ndf,nName,dName);
104 nName =
"DT_TPG_phi_map_bx-1";
105 makeRatioHisto(igetter,dttpgphmapbxf[0],nName,dName);
106 nName =
"DT_TPG_phi_map_bx0";
107 makeRatioHisto(igetter,dttpgphmapbxf[1],nName,dName);
108 nName =
"DT_TPG_phi_map_bx+1";
109 makeRatioHisto(igetter,dttpgphmapbxf[2],nName,dName);
111 nName =
"DT_TPG_theta_best_map_h";
112 dName =
"DT_TPG_theta_best_map";
113 makeRatioHisto(igetter,dttpgthmaphf,nName,dName);
114 dName =
"DT_TPG_theta_map";
115 nName =
"DT_TPG_theta_map_bx-1";
116 makeRatioHisto(igetter,dttpgthmapbxf[0],nName,dName);
117 nName =
"DT_TPG_theta_map_bx0";
118 makeRatioHisto(igetter,dttpgthmapbxf[1],nName,dName);
119 nName =
"DT_TPG_theta_map_bx+1";
120 makeRatioHisto(igetter,dttpgthmapbxf[2],nName,dName);
129 denominator = this->get2DHisto(input_dir_+
"/"+dName,igetter);
130 numerator = this->get2DHisto(input_dir_+
"/"+nName,igetter);
132 if (numerator && denominator) {
134 TH2F * ratio = ratioME->
getTH2F();
136 ratio->Divide(numerator,denominator);
139 LogInfo(
"TriggerDQM") <<
"[TriggerDQM]: ratio histo named \"" << ratioME->
getName() <<
"\" not found!" << endl;
144 LogInfo(
"TriggerDQM") <<
"[TriggerDQM]: numerator histo \"" << nName <<
"\" not found!" << endl;
146 LogInfo(
"TriggerDQM") <<
"[TriggerDQM]: denominator histo \"" << dName <<
"\" not found!" << endl;
157 LogInfo(
"TriggerDQM") <<
"ME NOT FOUND.";
171 LogInfo(
"TriggerDQM") <<
"ME NOT FOUND.";
187 LogInfo(
"TriggerDQM") <<
"ME NOT FOUND.";
202 LogInfo(
"TriggerDQM") <<
"ME NOT FOUND.";
214 for(
int i=0;
i<5;
i++){
227 for(
int i=0;
i<5;
i++){
static AlgebraicMatrix initialize()
const std::string & getName(void) const
get name of ME
void setMapThLabel(MonitorElement *me)
TProfile2D * getTProfile2D(void) const
TProfile * get1DProfile(std::string meName, DQMStore::IGetter &igetter)
MonitorElement * get(const std::string &path)
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
TH1F * get1DHisto(std::string meName, DQMStore::IGetter &igetter)
virtual ~L1TDTTPGClient()
Destructor.
TProfile2D * get2DProfile(std::string meName, DQMStore::IGetter &igetter)
TH2F * get2DHisto(std::string meName, DQMStore::IGetter &igetter)
virtual void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
L1TDTTPGClient(const edm::ParameterSet &ps)
Constructor.
TH1F * getTH1F(void) const
void makeRatioHisto(DQMStore::IGetter &igetter, MonitorElement *ratioME, std::string &nName, std::string &dName)
TProfile * getTProfile(void) const
void setMapPhLabel(MonitorElement *me)
TH2F * getTH2F(void) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)