21 #include <TProfile2D.h>
41 if(verbose_)
std::cout <<
"[TriggerDQM]: ending... " << std::endl;
54 verbose_ = parameters_.getUntrackedParameter<
bool>(
"verbose",
false);
56 monitorDir_ = parameters_.getUntrackedParameter<
std::string>(
"monitorDir",
"");
57 if(verbose_)
std::cout <<
"Monitor dir = " << monitorDir_ << std::endl;
59 prescaleLS_ = parameters_.getUntrackedParameter<
int>(
"prescaleLS", -1);
60 if(verbose_)
std::cout <<
"DQM lumi section prescale = " << prescaleLS_ <<
" lumi section(s)"<< std::endl;
62 prescaleEvt_ = parameters_.getUntrackedParameter<
int>(
"prescaleEvt", -1);
63 if(verbose_)
std::cout <<
"DQM event prescale = " << prescaleEvt_ <<
" events(s)"<< std::endl;
72 if(verbose_)
std::cout <<
"[TriggerDQM]: Begin Job" << std::endl;
79 reportSummary_ =
dbe_->
get(
"HLT/EventInfo/reportSumamry");
80 if ( reportSummary_ ) {
89 if (reportSummary_) reportSummary_->
Fill(1);
96 for (
int n = 0;
n < nPDs;
n++) {
99 case 0 : sprintf(histo,
"hlt_dqm_EGamma");
break;
100 case 1 : sprintf(histo,
"hlt_dqm_Muon");
break;
101 case 2 : sprintf(histo,
"hlt_dqm_JetMet");
break;
102 case 3 : sprintf(histo,
"hlt_dqm_BJets");
break;
103 case 4 : sprintf(histo,
"hlt_dqm_Tau");
break;
104 case 5 : sprintf(histo,
"hlt_dqm_Test1");
break;
105 case 6 : sprintf(histo,
"hlt_dqm_Test2");
break;
106 case 7 : sprintf(histo,
"hlt_dqm_Test3");
break;
107 case 8 : sprintf(histo,
"hlt_dqm_Test4");
break;
108 case 9 : sprintf(histo,
"hlt_dqm_Test5");
break;
109 case 10 : sprintf(histo,
"hlt_dqm_Test6");
break;
110 case 11 : sprintf(histo,
"hlt_dqm_Test7");
break;
111 case 12 : sprintf(histo,
"hlt_dqm_Test8");
break;
112 case 13 : sprintf(histo,
"hlt_dqm_Test9");
break;
113 case 14 : sprintf(histo,
"hlt_dqm_Test10");
break;
114 case 15 : sprintf(histo,
"hlt_dqm_Test11");
break;
115 case 16 : sprintf(histo,
"hlt_dqm_Test12");
break;
116 case 17 : sprintf(histo,
"hlt_dqm_Test13");
break;
117 case 18 : sprintf(histo,
"hlt_dqm_Test14");
break;
118 case 19 : sprintf(histo,
"hlt_dqm_Test15");
break;
132 for (
int k = 0;
k < nPDs;
k++) {
133 summaryContent[
k] = 1;
134 reportSummaryContent_[
k]->
Fill(1.);
140 reportSummaryMap_ =
dbe_->
get(
"HLT/EventInfo/reportSummaryMap");
141 if ( reportSummaryMap_ ) {
146 reportSummaryMap_ =
dbe_->
book2D(
"reportSummaryMap",
"reportSummaryMap", 1, 1, 2, 10, 1, 11);
148 reportSummaryMap_->setAxisTitle(
"", 2);
149 reportSummaryMap_->setBinLabel(1,
"SingleElectron",2);
150 reportSummaryMap_->setBinLabel(2,
"DoubleElectron",2);
151 reportSummaryMap_->setBinLabel(3,
"SingleMu",2);
152 reportSummaryMap_->setBinLabel(4,
"DoubleMu",2);
153 reportSummaryMap_->setBinLabel(5,
"Photon",2);
154 reportSummaryMap_->setBinLabel(6,
"Tau",2);
155 reportSummaryMap_->setBinLabel(7,
"BTag",2);
156 reportSummaryMap_->setBinLabel(8,
"HT",2);
157 reportSummaryMap_->setBinLabel(9,
"Jet",2);
158 reportSummaryMap_->setBinLabel(10,
"MET",2);
159 reportSummaryMap_->setBinLabel(1,
" ",1);
180 double PDResult[nPDs];
182 for(
int i = 0;
i < nPDs;
i++ ) {
186 bool isCollision =
true;
188 for(
int i = 0;
i < nPDs;
i++ ) {
189 if(
i == 0 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_SingleElectron_Pass_Any");
190 if(
i == 1 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_DoubleElectron_Pass_Any");
191 if(
i == 2 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_SingleMu_Pass_Any");
192 if(
i == 3 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_DoubleMu_Pass_Any");
193 if(
i == 4 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_Photon_Pass_Any");
194 if(
i == 5 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_Tau_Pass_Any");
195 if(
i == 6 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_BTag_Pass_Any");
196 if(
i == 7 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_HT_Pass_Any");
197 if(
i == 8 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_Jet_Pass_Any");
198 if(
i == 9 ) Pass_Hists[
i] =
dbe_->
get(
"HLT/FourVector/PathsSummary/HLT_MET_Pass_Any");
200 if( Pass_Hists[
i] ) {
201 if( i == 5 && !isCollision )
continue;
204 if( i == 1 ) noBins = 3;
205 if( i == 8 ) noBins = 4;
207 for(
int j = 0;
j < nPathsPD[
i]-noBins;
j++ ) {
210 if( i == 1 && (
j == 0) )
continue;
211 if( i == 3 && (
j == 1 ||
j == 4) )
continue;
212 if( i == 4 && (
j > 1) )
continue;
213 if( i == 5 && (
j > 4) )
continue;
214 if( i == 7 && (
j == 7) )
continue;
215 if( i == 8 && (
j == 8) )
continue;
216 if( i == 9 && (
j == 8 ||
j == 13 ||
j == 15) )
continue;
220 if( ilumi > 5 ) PDResult[
i] = 0.5;
224 if( nTotPD[i] == 0 ) {
225 if( ilumi > 5 ) PDResult[
i] = 0.0;
233 for (
int k = 0;
k < nPDs;
k++) {
235 summaryContent[
k] = PDResult[
k];
236 reportSummaryContent_[
k]->Fill(PDResult[
k]);
239 summaryContent[
k] = 1;
240 reportSummaryContent_[
k]->Fill(1.);
245 for (
int m = 0;
m < nPDs;
m++) {
246 summarySum += summaryContent[
m];
254 reportSummaryMap_->setBinContent(1,1,summaryContent[0]);
255 reportSummaryMap_->setBinContent(1,2,summaryContent[1]);
256 reportSummaryMap_->setBinContent(1,3,summaryContent[2]);
257 reportSummaryMap_->setBinContent(1,4,summaryContent[3]);
258 reportSummaryMap_->setBinContent(1,5,summaryContent[4]);
259 reportSummaryMap_->setBinContent(1,6,summaryContent[5]);
260 reportSummaryMap_->setBinContent(1,7,summaryContent[6]);
261 reportSummaryMap_->setBinContent(1,8,summaryContent[7]);
262 reportSummaryMap_->setBinContent(1,9,summaryContent[8]);
263 reportSummaryMap_->setBinContent(1,10,summaryContent[9]);
271 if (prescaleEvt_<1)
return;
272 if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0)
return;
274 if(verbose_)
std::cout <<
"HLTEventInfoClient::analyze" << std::endl;
295 if(verbose_)
std::cout <<
"ME NOT FOUND." << std::endl;
309 if(verbose_)
std::cout <<
"ME NOT FOUND." << std::endl;
325 if(verbose_)
std::cout <<
"ME NOT FOUND." << std::endl;
340 if(verbose_)
std::cout <<
"ME NOT FOUND." << std::endl;
LuminosityBlockID id() const
static AlgebraicMatrix initialize()
TProfile2D * getTProfile2D(void) const
TProfile * get1DProfile(std::string meName, DQMStore *dbi)
TH2F * get2DHisto(std::string meName, DQMStore *dbi)
TH1F * get1DHisto(std::string meName, DQMStore *dbi)
MonitorElement * bookFloat(const char *name)
Book float.
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
DQM Client Diagnostic.
void removeElement(const std::string &name)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
virtual ~HLTEventInfoClient()
Destructor.
TH1F * getTH1F(void) const
LuminosityBlockNumber_t luminosityBlock() const
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
double getBinContent(int binx) const
get content of bin (1-D)
TProfile * getTProfile(void) const
TProfile2D * get2DProfile(std::string meName, DQMStore *dbi)
int getNbinsX(void) const
get # of bins in X-axis
void analyze(const edm::Event &e, const edm::EventSetup &c)
Fake Analyze.
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
HLTEventInfoClient(const edm::ParameterSet &ps)
Constructor.