36 LogDebug(
"HLTJetMETDQMSource") <<
"constructor....";
40 LogDebug(
"HLTJetMETDQMSource") <<
"unabel to get DQMStore service?";
47 std::string(
"HLT/JetMET/"));
67 std::vector<edm::ParameterSet> paths = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"paths");
70 for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
71 std::pair<std::string, std::string> custompathnamepair;
73 custompathnamepair.first =pathconf->getParameter<std::string>(
"pathname");
74 custompathnamepair.second = pathconf->getParameter<std::string>(
"denompathname");
77 prescaleused = pathconf->getParameter<
int>(
"prescaleused");
84 std::string(
"HLT_L1Mu"));
119 using namespace trigger;
153 if(!triggerResults.isValid()) {
155 iEvent.
getByLabel(triggerResultsLabelFU,triggerResults);
156 if(!triggerResults.isValid()) {
157 LogWarning(
"HLTJetMETDQMSource") <<
"TriggerResults not found, skipping event" << std::endl;
162 unsigned int npath = triggerResults->
size();
166 if(!triggerObj.isValid()) {
168 iEvent.
getByLabel(triggerSummaryLabelFU,triggerObj);
169 if(!triggerObj.isValid()) {
170 LogWarning(
"HLTJetMETDQMSource") <<
"TriggerEvent not found, skipping event" << std::endl;
195 triggertype =
v->getObjectType();
197 bool l1accept =
false;
199 const int l1index = triggerObj->filterIndex(l1testTag);
200 if ( l1index >= triggerObj->sizeFilters() ) {
202 <<
v->getl1Path() <<
"\t" <<
"\t" << l1testTag << std::endl;
206 const trigger::Vids & idtype = triggerObj->filterIds(l1index);
210 l1accept = l1k.size() > 0;
218 for(
unsigned int i = 0;
i < npath; ++
i) {
219 if ( triggerNames.triggerName(
i).find(
v->getPath()) != std::string::npos
220 && triggerResults->accept(
i)){
230 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getPath() << std::endl;
233 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
234 <<
v->getPath() <<
"\t" <<
v->getl1Path();
240 if (
v->getLabel() ==
"dummy"){
244 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin();
245 labelIter!=filterLabels.end(); labelIter++) {
248 << testTag.
process() << std::endl;
249 int testindex = triggerObj->filterIndex(testTag);
251 if ( !(testindex >= triggerObj->sizeFilters()) ) {
253 << testTag.
label() << std::endl;
255 v->setLabel(*labelIter);
259 const int index = triggerObj->filterIndex(filterTag);
261 << filterTag << std::endl;
262 if ( index >= triggerObj->sizeFilters() ) {
264 << filterTag << std::endl;
269 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
270 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t" << toc[*ki].pt()
271 <<
"\t" << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
277 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
278 <<
" *ki " << *ki <<
" Nki "<< N<<
" "
279 << toc[*ki].pt() <<
"\t" << toc[*ki].eta() <<
"\t"
280 << toc[*ki].phi() << std::endl;
282 v->getEtHisto()->Fill(toc[*ki].
pt());
283 v->getEtaHisto()->Fill(toc[*ki].
eta());
284 v->getPhiHisto()->Fill(toc[*ki].
phi());
285 v->getEtaPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
288 trigger::Vids::const_iterator idtypeiter = idtype.begin();
289 for (trigger::Keys::const_iterator l1ki = l1k.begin();
290 l1ki !=l1k.end(); ++l1ki ) {
296 <<
"\t" <<
" *l1ki " << *l1ki <<
" NL1 "
297 << NL1<<
" " << toc[*l1ki].pt() <<
"\t"
298 << toc[*l1ki].eta() <<
"\t" << toc[*l1ki].phi()
303 v->getL1EtHisto()->Fill(toc[*l1ki].
pt());
304 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
305 v->getL1EtaHisto()->Fill(toc[*l1ki].
eta());
306 v->getL1EtaPhiHisto()->Fill(toc[*l1ki].
eta(),toc[*l1ki].
phi());
320 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t" <<
" *ki "
321 << *ki <<
" Nki "<< N <<
" " << toc[*ki].pt()
322 <<
"\t" << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
324 v->getEtHisto()->Fill(toc[*ki].
pt());
327 v->getEtaPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
330 trigger::Vids::const_iterator idtypeiter = idtype.begin();
331 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
338 v->getL1EtHisto()->Fill(toc[*l1ki].
pt());
341 v->getL1EtaPhiHisto()->Fill(toc[*l1ki].
eta(),toc[*l1ki].
phi());
354 v->getEtHisto()->Fill(toc[*ki].
pt());
355 v->getPhiHisto()->Fill(toc[*ki].
phi());
358 trigger::Vids::const_iterator idtypeiter = idtype.begin();
359 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
365 v->getL1EtHisto()->Fill(toc[*l1ki].
pt());
366 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
377 v->getEtHisto()->Fill(toc[*ki].
pt());
378 v->getPhiHisto()->Fill(toc[*ki].
phi());
380 trigger::Vids::const_iterator idtypeiter = idtype.begin();
381 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
388 v->getL1EtHisto()->Fill(toc[*l1ki].
pt());
389 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
411 triggertype =
v->getObjectType();
413 bool l1accept =
false;
415 const int l1index = triggerObj->filterIndex(l1testTag);
416 if ( l1index >= triggerObj->sizeFilters() ) {
417 if (
verbose_)
std::cout<<
"no index "<< l1index <<
" of that name (wrtMu)" <<
v->getl1Path() <<
"\t" <<
"\t" << l1testTag << std::endl;
425 l1accept = l1k.size() > 0;
430 bool denompassed =
false;
432 for(
unsigned int i = 0;
i < npath; ++
i) {
433 if ( triggerNames.triggerName(
i).find(
v->getPath()) != std::string::npos && triggerResults->accept(
i)){
434 passed =
true; break ;
437 for(
unsigned int i = 0;
i < npath; ++
i) {
438 if ( triggerNames.triggerName(
i).find(
v->getDenomPath()) != std::string::npos && triggerResults->accept(
i)){
439 denompassed =
true; break ;
445 <<
v->getDenomPath() << std::endl;
451 <<
v->getPath() << std::endl;
454 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
455 <<
v->getPath() <<
"\t" <<
v->getl1Path();
459 if (
v->getLabel() ==
"dummy"){
463 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
467 int testindex = triggerObj->filterIndex(testTag);
469 if ( !(testindex >= triggerObj->sizeFilters()) ) {
472 v->setLabel(*labelIter);
476 const int index = triggerObj->filterIndex(filterTag);
478 << filterTag << std::endl;
479 if ( index >= triggerObj->sizeFilters() ) {
481 << filterTag << std::endl;
486 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
489 <<
"\t" << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
490 <<
"\t" << toc[*ki].phi() << std::endl;
497 <<
"\t" <<
" *ki " << *ki <<
" Nki "<< N
498 <<
" " << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
499 <<
"\t" << toc[*ki].phi() << std::endl;
500 v->getEtwrtMuHisto()->Fill(toc[*ki].
pt());
503 v->getEtaPhiwrtMuHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
510 if (
verbose_)
cout <<
" filling HLT (wrtMu)" <<
v->getPath() <<
"\t" <<
" *ki " << *ki <<
" Nki "<< N <<
" " << toc[*ki].pt() <<
"\t" << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
511 v->getEtwrtMuHisto()->Fill(toc[*ki].
pt());
514 v->getEtaPhiwrtMuHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
520 v->getEtwrtMuHisto()->Fill(toc[*ki].
pt());
521 v->getPhiwrtMuHisto()->Fill(toc[*ki].
phi());
527 v->getEtwrtMuHisto()->Fill(toc[*ki].
pt());
548 triggertype =
v->getObjectType();
550 bool l1accept =
false;
552 const int l1index = triggerObj->filterIndex(l1testTag);
553 if ( l1index >= triggerObj->sizeFilters() ) {
555 <<
v->getl1Path() <<
"\t" <<
"\t" << l1testTag << std::endl;
562 l1accept = l1k.size() > 0;
564 for(
unsigned int i = 0;
i < npath; ++
i) {
565 if ( triggerNames.triggerName(
i).find(
v->getPath()) != std::string::npos
566 && triggerResults->accept(
i)){
572 bool denompassed =
false;
573 for(
unsigned int i = 0;
i < npath; ++
i) {
574 if ( triggerNames.triggerName(
i).find(
v->getDenomPath()) != std::string::npos
575 && triggerResults->accept(
i)){
577 if (
verbose_)
std::cout <<
" i " <<
i <<
" trigger name " <<
v->getDenomPath() << std::endl;
583 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getDenomPath() << std::endl;
586 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
587 <<
v->getPath() <<
"\t" <<
v->getl1Path();
591 if (
verbose_)
std::cout <<
v->getDenomPath() <<
"\t" <<
v->getDenomLabel() <<
"\t" << std::endl;
592 if (
v->getDenomLabel() ==
"denomdummy"){
595 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
598 << testTag.
process() << std::endl;
599 int testindex = triggerObj->filterIndex(testTag);
600 if ( !(testindex >= triggerObj->sizeFilters()) ) {
602 << testTag.
label() << std::endl;
604 v->setDenomLabel(*labelIter);
608 const int index = triggerObj->filterIndex(filterTag);
610 << filterTag << std::endl;
611 if ( index >= triggerObj->sizeFilters() ) {
613 << filterTag << std::endl;
618 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
619 if (
verbose_)
cout <<
" filling HLT Denom " <<
v->getDenomPath() <<
"\t"
620 << toc[*ki].pt() <<
"\t" << toc[*ki].eta() <<
"\t"
621 << toc[*ki].phi() << std::endl;
627 if (
verbose_)
cout <<
" filling HLT Denom" <<
v->getDenomPath()
628 <<
"\t" <<
" *kiDeno " << *ki <<
" NkiDenom "
629 << Ndenom<<
" " << toc[*ki].pt() <<
"\t"
630 << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
633 v->getEtDenomHisto()->Fill(toc[*ki].
pt());
634 v->getEtaDenomHisto()->Fill(toc[*ki].
eta());
635 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
641 v->getEtDenomHisto()->Fill(toc[*ki].
pt());
642 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
647 v->getEtDenomHisto()->Fill(toc[*ki].
pt());
648 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
650 if ( numobj != -1)
break;
657 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getPath() << std::endl;
659 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "<<
v->getPath() <<
"\t" <<
v->getl1Path();
664 if (
v->getLabel() ==
"dummy"){
667 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
670 << testTag.
process() << std::endl;
671 int testindex = triggerObj->filterIndex(testTag);
672 if ( !(testindex >= triggerObj->sizeFilters()) ) {
674 << testTag.
label() << std::endl;
676 v->setLabel(*labelIter);
680 const int index = triggerObj->filterIndex(filterTag);
682 << filterTag << std::endl;
683 if ( index >= triggerObj->sizeFilters() ) {
685 << filterTag << std::endl;
690 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
692 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
693 << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
694 <<
"\t" << toc[*ki].phi() << std::endl;
700 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
701 <<
" *ki " << *ki <<
" Nki "<< N<<
" "
702 << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
703 <<
"\t" << toc[*ki].phi() << std::endl;
705 v->getEtNumHisto()->Fill(toc[*ki].
pt());
706 v->getEtaNumHisto()->Fill(toc[*ki].
eta());
707 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
713 v->getEtNumHisto()->Fill(toc[*ki].
pt());
714 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
719 v->getEtNumHisto()->Fill(toc[*ki].
pt());
720 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
722 if ( numobj != -1)
break;
728 if ( (
nev_ % 1000) == 0 ){
734 TH1F *rate_denom=
NULL;
739 if ((rate_denom->Integral() != 0.) && (rate_num->Integral() != 0.) ) {
741 for(
int j=1;
j <= rate_denom->GetXaxis()->GetNbins();
j++ ){
742 double y1 = rate_num->GetBinContent(
j);
743 double y2 = rate_denom->GetBinContent(
j);
744 double eff = y2 > 0. ? y1/y2 : 0.;
746 double y1err = rate_num->GetBinError(
j);
747 double y2err = rate_denom->GetBinError(
j);
750 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
751 + (y2err/y2)*(y2err/y2)) ;
757 triggertype =
v->getObjectType();
772 EtNum= (
v->getEtNumHisto())->
getTH1F() ;
773 EtaNum= (
v->getEtaNumHisto())->
getTH1F() ;
774 PhiNum= (
v->getPhiNumHisto())->
getTH1F() ;
775 EtDenom= (
v->getEtDenomHisto())->
getTH1F() ;
776 EtaDenom= (
v->getEtaDenomHisto())->
getTH1F() ;
777 PhiDenom= (
v->getPhiDenomHisto())->
getTH1F() ;
779 if ((EtNum->Integral() != 0.) && (EtDenom->Integral() != 0.) ) {
781 for(
int j=1;
j <= EtNum->GetXaxis()->GetNbins();
j++ ){
782 double y1 = EtNum->GetBinContent(
j);
783 double y2 = EtDenom->GetBinContent(
j);
784 double eff = y2 > 0. ? y1/y2 : 0.;
786 v->getEtEffHisto()->setBinContent(
j, eff);
787 double y1err = EtNum->GetBinError(
j);
788 double y2err = EtDenom->GetBinError(
j);
791 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
792 + (y2err/y2)*(y2err/y2)) ;
793 v->getEtEffHisto()->setBinError(
j, efferr);
796 << y1 <<
" " << y2 <<
" "<< y1err <<
" " << y2err << std::endl;
800 if (EtaNum->Integral() != 0. && EtaDenom->Integral() != 0. ) {
801 for(
int j=1;
j <= EtaNum->GetXaxis()->GetNbins();
j++ ){
802 double y1 = EtaNum->GetBinContent(
j);
803 double y2 = EtaDenom->GetBinContent(
j);
804 double eff = y2 > 0. ? y1/y2 : 0.;
805 v->getEtaEffHisto()->setBinContent(
j, eff);
806 double y1err = EtaNum->GetBinError(
j);
807 double y2err = EtaDenom->GetBinError(
j);
810 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
811 + (y2err/y2)*(y2err/y2)) ;
812 v->getEtaEffHisto()->setBinError(
j, efferr);
816 if (PhiNum->Integral() != 0. && PhiDenom->Integral() != 0. ) {
817 for(
int j=1;
j <= PhiNum->GetXaxis()->GetNbins();
j++ ){
818 double y1 = PhiNum->GetBinContent(
j);
819 double y2 = PhiDenom->GetBinContent(
j);
820 double eff = y2 > 0. ? y1/y2 : 0.;
821 v->getPhiEffHisto()->setBinContent(
j, eff);
822 double y1err = PhiNum->GetBinError(
j);
823 double y2err = PhiDenom->GetBinError(
j);
825 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
826 + (y2err/y2)*(y2err/y2)) ;
827 v->getPhiEffHisto()->setBinError(
j, efferr);
838 EtNum= (
v->getEtNumHisto())->
getTH1F() ;
839 PhiNum= (
v->getPhiNumHisto())->
getTH1F() ;
840 EtDenom= (
v->getEtDenomHisto())->
getTH1F() ;
841 PhiDenom= (
v->getPhiDenomHisto())->
getTH1F() ;
843 if (EtNum->Integral() != 0. && EtDenom->Integral() != 0. ) {
845 for(
int j=1;
j <= EtNum->GetXaxis()->GetNbins();
j++ ){
846 double y1 = EtNum->GetBinContent(
j);
847 double y2 = EtDenom->GetBinContent(
j);
848 double eff = y2 > 0. ? y1/y2 : 0.;
849 v->getEtEffHisto()->setBinContent(
j, eff);
850 double y1err = EtNum->GetBinError(
j);
851 double y2err = EtDenom->GetBinError(
j);
854 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
855 + (y2err/y2)*(y2err/y2)) ;
856 v->getEtEffHisto()->setBinError(
j, efferr);
859 if (PhiNum->Integral() != 0. && PhiDenom->Integral() != 0. ) {
861 for(
int j=1;
j <= PhiNum->GetXaxis()->GetNbins();
j++ ){
862 double y1 = PhiNum->GetBinContent(
j);
863 double y2 = PhiDenom->GetBinContent(
j);
864 double eff = y2 > 0. ? y1/y2 : 0.;
865 v->getPhiEffHisto()->setBinContent(
j, eff);
866 double y1err = PhiNum->GetBinError(
j);
867 double y2err = PhiDenom->GetBinError(
j);
870 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
871 + (y2err/y2)*(y2err/y2)) ;
872 v->getPhiEffHisto()->setBinError(
j, efferr);
1553 LogError(
"HLTJetMETDQMSource") <<
"HLTConfigProvider failed to initialize." << std::endl;
1572 std::string foldernm =
"/All/";
1578 for (
unsigned int j=0;
j!=
n; ++
j) {
1580 std::string l1pathname =
"dummy";
1585 std::string denompathname =
"";
1586 unsigned int usedPresscale = 1;
1587 unsigned int objectType = 0;
1591 if ( pathname.find(
"Mu") && (pathname==
"HLT_L1MuOpen"))
1609 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1610 numpathmodule!= numpathmodules.end();
1619 l1pathname = *numpathmodule;
1623 std::string filtername(
"dummy");
1624 std::string Denomfiltername(
"denomdummy");
1626 float ptMax = 300.0;
1627 if (objectType != 0 )
1629 pathname, l1pathname, filtername,
1631 objectType, ptMin, ptMax));
1633 std::string histonm=
"JetMET_rate_All";
1634 std::string histonmL1=
"JetMET_rate_All_L1";
1635 std::string histot=
"JetMET Rate Summary";
1636 std::string histoL1t=
"JetMET L1 Rate Summary";
1644 unsigned int nname=0;
1645 unsigned int nnameL1=0;
1647 std::string labelnm(
"dummy");
1648 labelnm =
v->getPath();
1652 std::string labelnml1(
"dummyl1");
1653 labelnml1 =
v->getl1Path();
1670 std::string labelname(
"dummy");
1671 labelname =
v->getPath();
1672 std::string histoname(labelname+
"");
1673 std::string
title(labelname+
"");
1675 double histEtaMax = 2.5;
1695 TString pathfolder =
dirname_ + foldernm +
v->getPath();
1697 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
1701 histoname = labelname+
"_Et";
1702 title = labelname+
" E_t";
1703 Et = dbe->
book1D(histoname.c_str(),
1708 histoname = labelname+
"_l1Et";
1709 title = labelname+
" L1 E_t";
1710 l1Et = dbe->
book1D(histoname.c_str(),
1715 if (labelname.find(
"Jet") != std::string::npos
1716 || labelname.find(
"Mu") != std::string::npos) {
1718 histoname = labelname+
"_EtaPhi";
1719 title = labelname+
" #eta vs #phi";
1720 EtaPhi = dbe->
book2D(histoname.c_str(),
1722 nBins2D,-histEtaMax,histEtaMax,
1725 histoname = labelname+
"_l1EtaPhi";
1726 title = labelname+
"L1 #eta vs L1 #phi";
1727 l1EtaPhi = dbe->
book2D(histoname.c_str(),
1729 nBins2D,-histEtaMax,histEtaMax,
1732 histoname = labelname+
"_Phi";
1733 title = labelname+
" #phi";
1734 Phi = dbe->
book1D(histoname.c_str(),
1738 histoname = labelname+
"_l1Phi";
1739 title = labelname+
"L1 #phi";
1740 l1Phi = dbe->
book1D(histoname.c_str(),
1743 histoname = labelname+
"_Eta";
1744 title = labelname+
" #eta";
1745 Eta = dbe->
book1D(histoname.c_str(),
1747 nBins_,-histEtaMax,histEtaMax
1750 histoname = labelname+
"_l1Eta";
1751 title = labelname+
"L1 #eta";
1752 l1Eta = dbe->
book1D(histoname.c_str(),
1754 nBins_,-histEtaMax,histEtaMax);
1756 else if( (labelname.find(
"MET") != std::string::npos)
1757 || (labelname.find(
"SumET") != std::string::npos) ){
1758 histoname = labelname+
"_phi";
1759 title = labelname+
" #phi";
1760 Phi = dbe->
book1D(histoname.c_str(),
1764 histoname = labelname+
"_l1Phi";
1765 title = labelname+
"L1 #phi";
1766 l1Phi = dbe->
book1D(histoname.c_str(),
1771 v->setHistos( N, Et, EtaPhi, Eta, Phi, NL1, l1Et, l1EtaPhi,l1Eta, l1Phi);
1778 std::string foldernm =
"/wrtMuon/";
1783 for (
unsigned int j=0;
j!=
n; ++
j) {
1785 std::string l1pathname =
"dummy";
1791 int usedPresscale = 1;
1795 if ( pathname.find(
"Mu") && (pathname==
"HLT_L1MuOpen"))
1811 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1812 numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1818 l1pathname = *numpathmodule;
1823 std::string filtername(
"dummy");
1824 std::string Denomfiltername(
"denomdummy");
1826 float ptMax = 300.0;
1827 if ( objectType != 0){
1832 objectType, ptMin, ptMax));
1844 std::string labelnm(
"dummy");
1845 labelnm =
v->getPath();
1858 std::string labelname(
"dummy");
1859 labelname =
v->getPath() +
"_wrt_" +
v->getDenomPath();
1860 std::string histoname(labelname+
"");
1861 std::string
title(labelname+
"");
1863 double histEtaMax = 2.5;
1877 histEtaMax = 5.0;
nBins_ = 60 ;
1880 TString pathfolder =
dirname_ + foldernm +
v->getPath();
1882 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
1888 histoname = labelname+
"_Et_wrtMu";
1889 title = labelname+
" E_t";
1890 EtwrtMu = dbe->
book1D(histoname.c_str(),
1895 if ((
v->getPath()).
find(
"Jet") != std::string::npos
1896 || (
v->getPath()).
find(
"Mu") != std::string::npos) {
1897 histoname = labelname+
"_EtaPhi_wrtMu";
1898 title = labelname+
" #eta vs #phi";
1899 EtaPhiwrtMu = dbe->
book2D(histoname.c_str(),
1901 nBins2D,-histEtaMax,histEtaMax,
1906 else if( ((
v->getPath()).
find(
"MET") != std::string::npos)
1907 || ((
v->getPath()).
find(
"SumET") != std::string::npos) ){
1908 histoname = labelname+
"_phi_wrtMu";
1909 title = labelname+
" #phi";
1910 PhiwrtMu = dbe->
book1D(histoname.c_str(),
1915 v->setHistoswrtMu( NwrtMu, EtwrtMu, EtaPhiwrtMu, PhiwrtMu);
1925 std::string foldernm =
"/Efficiency/";
1932 for (std::vector<std::pair<std::string, std::string> >::iterator
1935 ++custompathnamepair) {
1937 std::string denompathname = custompathnamepair->second;
1938 std::string pathname = custompathnamepair->first;
1940 if (
verbose_)
std::cout <<
" ------prescale used -----" << usedPrescale << std::endl;
1942 bool foundfirst =
false;
1943 bool foundsecond =
false;
1944 for (
unsigned int i=0;
i!=
n; ++
i) {
1950 <<
"pathname not found, ignoring "
1956 <<
"denompathname not found, ignoring "
1961 std::string l1pathname =
"dummy";
1965 if ( pathname.find(
"Mu") && (pathname==
"HLT_L1MuOpen"))
1982 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1983 numpathmodule!= numpathmodules.end();
1990 l1pathname = *numpathmodule;
1996 std::string filtername(
"dummy");
1997 std::string Denomfiltername(
"denomdummy");
1999 float ptMax = 300.0;
2006 if (objectType != 0){
2007 if (
verbose_)
std::cout <<
" PathInfo(denompathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, ptMin, ptMax " << denompathname <<
" "<< pathname <<
" "<< l1pathname <<
" " << filtername <<
" " << Denomfiltername <<
" " <<
processname_ <<
" " << objectType <<
" " << ptMin <<
" " << ptMax<< std::endl;
2016 std::string histonm=
"JetMET_Efficiency_Summary";
2017 std::string histonmDenom=
"Denom_passed_Summary";
2018 std::string histonmNum=
"Num_passed_Summary";
2029 std::string labelnm(
"dummy");
2030 std::string labeldenom(
"dummy");
2031 labelnm =
v->getPath();
2032 labeldenom =
v->getDenomPath();
2053 std::string labelname(
"dummy");
2054 labelname =
"Eff_" +
v->getPath() +
"_wrt_" +
v->getDenomPath();
2055 std::string histoname(labelname+
"");
2056 std::string
title(labelname+
"");
2058 double histEtaMax = 5.0;
2072 histEtaMax = 5.0;
nBins_ = 60 ;
2075 TString pathfolder =
dirname_ + foldernm +
v->getPath();
2077 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
2081 histoname = labelname+
"_Et_Eff";
2082 title = labelname+
" E_t Eff";
2083 EtEff = dbe->
book1D(histoname.c_str(),
2088 histoname = labelname+
"_Et_Num";
2089 title = labelname+
" E_t Num";
2090 EtNum = dbe->
book1D(histoname.c_str(),
2096 histoname = labelname+
"_Et_Denom";
2097 title = labelname+
" E_t Denom";
2098 EtDenom = dbe->
book1D(histoname.c_str(),
2103 if ((
v->getPath()).
find(
"Jet") != std::string::npos
2104 || (
v->getPath()).
find(
"Mu") != std::string::npos) {
2105 histoname = labelname+
"_Eta_Eff";
2106 title = labelname+
" #eta Eff";
2107 EtaEff = dbe->
book1D(histoname.c_str(),
2109 nBins_,-histEtaMax,histEtaMax);
2110 histoname = labelname+
"_Phi_Eff";
2111 title = labelname+
" #phi Eff";
2112 PhiEff = dbe->
book1D(histoname.c_str(),
2116 histoname = labelname+
"_Eta_Num";
2117 title = labelname+
" #eta Num";
2118 EtaNum = dbe->
book1D(histoname.c_str(),
2120 nBins_,-histEtaMax,histEtaMax);
2121 histoname = labelname+
"_Phi_Num";
2122 title = labelname+
" #phi Num";
2123 PhiNum = dbe->
book1D(histoname.c_str(),
2127 histoname = labelname+
"_Eta_Denom";
2128 title = labelname+
" #eta Denom";
2129 EtaDenom = dbe->
book1D(histoname.c_str(),
2131 nBins_,-histEtaMax,histEtaMax);
2132 histoname = labelname+
"_Phi_Denom";
2133 title = labelname+
" #phi Denom";
2134 PhiDenom = dbe->
book1D(histoname.c_str(),
2140 else if( ((
v->getPath()).
find(
"MET") != std::string::npos)
2141 || ((
v->getPath()).
find(
"SumET") != std::string::npos) ){
2143 histoname = labelname+
"_Phi_Eff";
2144 title = labelname+
" #phi Eff";
2145 PhiEff = dbe->
book1D(histoname.c_str(),
2149 histoname = labelname+
"_Phi_Num";
2150 title = labelname+
" #phi Num";
2151 PhiNum = dbe->
book1D(histoname.c_str(),
2155 histoname = labelname+
"_Phi_Denom";
2156 title = labelname+
" #phi Denom";
2157 PhiDenom = dbe->
book1D(histoname.c_str(),
2163 v->setHistosEff( NEff, EtEff, EtaEff, PhiEff, NNum, EtNum, EtaNum, PhiNum, NDenom, EtDenom, EtaDenom, PhiDenom);
2186 LogInfo(
"HLTJetMETDQMSource") <<
"analyzed " <<
nev_ <<
" events";
unsigned int size() const
number of trigger paths in trigger table
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
void setBinContent(int binx, double content)
set content of bin (1-D)
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::string & triggerName(unsigned int triggerIndex) const
MonitorElement * rate_All
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
edm::InputTag triggerSummaryLabel_
edm::InputTag triggerResultsLabel_
enum start value shifted to 81 so as to avoid clashes with PDG codes
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)
PathInfoCollection hltPathsAll_
Strings::size_type size() const
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
double deltaR(double eta1, double phi1, double eta2, double phi2)
void beginRun(const edm::Run &run, const edm::EventSetup &c)
HLTConfigProvider hltConfig_
MonitorElement * rate_Denom
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
TH1F * getTH1F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setVerbose(unsigned level)
HLTJetMETDQMSource(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
PathInfoCollection hltPathswrtMu_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
DQM Client Diagnostic.
std::string custompathnamemu_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< int > prescUsed_
std::vector< size_type > Keys
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
TH1F * getTH1F(void) const
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
MonitorElement * rate_Eff
MonitorElement * rate_Num
PathInfoCollection hltPathsEff_
MonitorElement * rate_All_L1
MonitorElement * rate_wrtMu
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setCurrentFolder(const std::string &fullpath)
std::vector< std::pair< std::string, std::string > > custompathnamepairs_