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;
157 LogWarning(
"HLTJetMETDQMSource") <<
"TriggerResults not found, skipping event" << std::endl;
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
231 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getPath() << std::endl;
234 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
235 <<
v->getPath() <<
"\t" <<
v->getl1Path();
241 if (
v->getLabel() ==
"dummy"){
245 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin();
246 labelIter!=filterLabels.end(); labelIter++) {
249 << testTag.
process() << std::endl;
250 int testindex = triggerObj->filterIndex(testTag);
252 if ( !(testindex >= triggerObj->sizeFilters()) ) {
254 << testTag.
label() << std::endl;
256 v->setLabel(*labelIter);
260 const int index = triggerObj->filterIndex(filterTag);
262 << filterTag << std::endl;
263 if ( index >= triggerObj->sizeFilters() ) {
265 << filterTag << std::endl;
270 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
271 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t" << toc[*ki].pt()
272 <<
"\t" << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
278 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
279 <<
" *ki " << *ki <<
" Nki "<< N<<
" "
280 << toc[*ki].pt() <<
"\t" << toc[*ki].eta() <<
"\t"
281 << toc[*ki].phi() << std::endl;
283 v->getEtHisto()->Fill(toc[*ki].pt());
284 v->getEtaHisto()->Fill(toc[*ki].
eta());
285 v->getPhiHisto()->Fill(toc[*ki].
phi());
286 v->getEtaPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
289 trigger::Vids::const_iterator idtypeiter = idtype.begin();
290 for (trigger::Keys::const_iterator l1ki = l1k.begin();
291 l1ki !=l1k.end(); ++l1ki ) {
297 <<
"\t" <<
" *l1ki " << *l1ki <<
" NL1 "
298 << NL1<<
" " << toc[*l1ki].pt() <<
"\t"
299 << toc[*l1ki].eta() <<
"\t" << toc[*l1ki].phi()
305 v->getL1EtHisto()->Fill(toc[*l1ki].pt());
306 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
307 v->getL1EtaHisto()->Fill(toc[*l1ki].
eta());
308 v->getL1EtaPhiHisto()->Fill(toc[*l1ki].
eta(),toc[*l1ki].
phi());
322 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t" <<
" *ki "
323 << *ki <<
" Nki "<< N <<
" " << toc[*ki].pt()
324 <<
"\t" << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
326 v->getEtHisto()->Fill(toc[*ki].pt());
329 v->getEtaPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
332 trigger::Vids::const_iterator idtypeiter = idtype.begin();
333 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
341 v->getL1EtHisto()->Fill(toc[*l1ki].pt());
344 v->getL1EtaPhiHisto()->Fill(toc[*l1ki].
eta(),toc[*l1ki].
phi());
357 v->getEtHisto()->Fill(toc[*ki].pt());
358 v->getPhiHisto()->Fill(toc[*ki].
phi());
361 trigger::Vids::const_iterator idtypeiter = idtype.begin();
362 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
369 v->getL1EtHisto()->Fill(toc[*l1ki].pt());
370 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
381 v->getEtHisto()->Fill(toc[*ki].pt());
382 v->getPhiHisto()->Fill(toc[*ki].
phi());
384 trigger::Vids::const_iterator idtypeiter = idtype.begin();
385 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
393 v->getL1EtHisto()->Fill(toc[*l1ki].pt());
394 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
416 triggertype =
v->getObjectType();
418 bool l1accept =
false;
420 const int l1index = triggerObj->filterIndex(l1testTag);
421 if ( l1index >= triggerObj->sizeFilters() ) {
422 if (
verbose_)
std::cout<<
"no index "<< l1index <<
" of that name (wrtMu)" <<
v->getl1Path() <<
"\t" <<
"\t" << l1testTag << std::endl;
430 l1accept = l1k.size() > 0;
435 bool denompassed =
false;
437 for(
unsigned int i = 0;
i < npath; ++
i) {
438 if ( triggerNames.triggerName(
i).find(
v->getPath()) != std::string::npos &&
triggerResults->accept(
i)){
439 passed =
true; break ;
442 for(
unsigned int i = 0;
i < npath; ++
i) {
443 if ( triggerNames.triggerName(
i).find(
v->getDenomPath()) != std::string::npos &&
triggerResults->accept(
i)){
444 denompassed =
true; break ;
450 <<
v->getDenomPath() << std::endl;
457 <<
v->getPath() << std::endl;
460 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
461 <<
v->getPath() <<
"\t" <<
v->getl1Path();
465 if (
v->getLabel() ==
"dummy"){
469 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
473 int testindex = triggerObj->filterIndex(testTag);
475 if ( !(testindex >= triggerObj->sizeFilters()) ) {
478 v->setLabel(*labelIter);
482 const int index = triggerObj->filterIndex(filterTag);
484 << filterTag << std::endl;
485 if ( index >= triggerObj->sizeFilters() ) {
487 << filterTag << std::endl;
492 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
495 <<
"\t" << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
496 <<
"\t" << toc[*ki].phi() << std::endl;
503 <<
"\t" <<
" *ki " << *ki <<
" Nki "<< N
504 <<
" " << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
505 <<
"\t" << toc[*ki].phi() << std::endl;
506 v->getEtwrtMuHisto()->Fill(toc[*ki].pt());
509 v->getEtaPhiwrtMuHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
516 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;
517 v->getEtwrtMuHisto()->Fill(toc[*ki].pt());
520 v->getEtaPhiwrtMuHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
526 v->getEtwrtMuHisto()->Fill(toc[*ki].pt());
527 v->getPhiwrtMuHisto()->Fill(toc[*ki].
phi());
533 v->getEtwrtMuHisto()->Fill(toc[*ki].pt());
554 triggertype =
v->getObjectType();
556 bool l1accept =
false;
558 const int l1index = triggerObj->filterIndex(l1testTag);
559 if ( l1index >= triggerObj->sizeFilters() ) {
561 <<
v->getl1Path() <<
"\t" <<
"\t" << l1testTag << std::endl;
568 l1accept = l1k.size() > 0;
570 for(
unsigned int i = 0;
i < npath; ++
i) {
571 if ( triggerNames.triggerName(
i).find(
v->getPath()) != std::string::npos
578 bool denompassed =
false;
579 for(
unsigned int i = 0;
i < npath; ++
i) {
580 if ( triggerNames.triggerName(
i).find(
v->getDenomPath()) != std::string::npos
583 if (
verbose_)
std::cout <<
" i " <<
i <<
" trigger name " <<
v->getDenomPath() << std::endl;
590 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getDenomPath() << std::endl;
593 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
594 <<
v->getPath() <<
"\t" <<
v->getl1Path();
598 if (
verbose_)
std::cout <<
v->getDenomPath() <<
"\t" <<
v->getDenomLabel() <<
"\t" << std::endl;
599 if (
v->getDenomLabel() ==
"denomdummy"){
602 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
605 << testTag.
process() << std::endl;
606 int testindex = triggerObj->filterIndex(testTag);
607 if ( !(testindex >= triggerObj->sizeFilters()) ) {
609 << testTag.
label() << std::endl;
611 v->setDenomLabel(*labelIter);
615 const int index = triggerObj->filterIndex(filterTag);
617 << filterTag << std::endl;
618 if ( index >= triggerObj->sizeFilters() ) {
620 << filterTag << std::endl;
625 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
626 if (
verbose_)
cout <<
" filling HLT Denom " <<
v->getDenomPath() <<
"\t"
627 << toc[*ki].pt() <<
"\t" << toc[*ki].eta() <<
"\t"
628 << toc[*ki].phi() << std::endl;
634 if (
verbose_)
cout <<
" filling HLT Denom" <<
v->getDenomPath()
635 <<
"\t" <<
" *kiDeno " << *ki <<
" NkiDenom "
636 << Ndenom<<
" " << toc[*ki].pt() <<
"\t"
637 << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
640 v->getEtDenomHisto()->Fill(toc[*ki].pt());
641 v->getEtaDenomHisto()->Fill(toc[*ki].
eta());
642 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
648 v->getEtDenomHisto()->Fill(toc[*ki].pt());
649 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
654 v->getEtDenomHisto()->Fill(toc[*ki].pt());
655 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
657 if ( numobj != -1)
break;
665 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getPath() << std::endl;
667 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "<<
v->getPath() <<
"\t" <<
v->getl1Path();
672 if (
v->getLabel() ==
"dummy"){
675 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
678 << testTag.
process() << std::endl;
679 int testindex = triggerObj->filterIndex(testTag);
680 if ( !(testindex >= triggerObj->sizeFilters()) ) {
682 << testTag.
label() << std::endl;
684 v->setLabel(*labelIter);
688 const int index = triggerObj->filterIndex(filterTag);
690 << filterTag << std::endl;
691 if ( index >= triggerObj->sizeFilters() ) {
693 << filterTag << std::endl;
698 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
700 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
701 << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
702 <<
"\t" << toc[*ki].phi() << std::endl;
708 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
709 <<
" *ki " << *ki <<
" Nki "<< N<<
" "
710 << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
711 <<
"\t" << toc[*ki].phi() << std::endl;
713 v->getEtNumHisto()->Fill(toc[*ki].pt());
714 v->getEtaNumHisto()->Fill(toc[*ki].
eta());
715 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
721 v->getEtNumHisto()->Fill(toc[*ki].pt());
722 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
727 v->getEtNumHisto()->Fill(toc[*ki].pt());
728 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
730 if ( numobj != -1)
break;
736 if ( (
nev_ % 1000) == 0 ){
742 TH1F *rate_denom=
NULL;
747 if ((rate_denom->Integral() != 0.) && (rate_num->Integral() != 0.) ) {
749 for(
int j=1;
j <= rate_denom->GetXaxis()->GetNbins();
j++ ){
750 double y1 = rate_num->GetBinContent(
j);
751 double y2 = rate_denom->GetBinContent(
j);
752 double eff = y2 > 0. ? y1/y2 : 0.;
754 double y1err = rate_num->GetBinError(
j);
755 double y2err = rate_denom->GetBinError(
j);
758 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
759 + (y2err/y2)*(y2err/y2)) ;
765 triggertype =
v->getObjectType();
780 EtNum= (
v->getEtNumHisto())->
getTH1F() ;
781 EtaNum= (
v->getEtaNumHisto())->
getTH1F() ;
782 PhiNum= (
v->getPhiNumHisto())->
getTH1F() ;
783 EtDenom= (
v->getEtDenomHisto())->
getTH1F() ;
784 EtaDenom= (
v->getEtaDenomHisto())->
getTH1F() ;
785 PhiDenom= (
v->getPhiDenomHisto())->
getTH1F() ;
787 if ((EtNum->Integral() != 0.) && (EtDenom->Integral() != 0.) ) {
789 for(
int j=1;
j <= EtNum->GetXaxis()->GetNbins();
j++ ){
790 double y1 = EtNum->GetBinContent(
j);
791 double y2 = EtDenom->GetBinContent(
j);
792 double eff = y2 > 0. ? y1/y2 : 0.;
794 v->getEtEffHisto()->setBinContent(
j, eff);
795 double y1err = EtNum->GetBinError(
j);
796 double y2err = EtDenom->GetBinError(
j);
799 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
800 + (y2err/y2)*(y2err/y2)) ;
801 v->getEtEffHisto()->setBinError(
j, efferr);
804 << y1 <<
" " << y2 <<
" "<< y1err <<
" " << y2err << std::endl;
808 if (EtaNum->Integral() != 0. && EtaDenom->Integral() != 0. ) {
809 for(
int j=1;
j <= EtaNum->GetXaxis()->GetNbins();
j++ ){
810 double y1 = EtaNum->GetBinContent(
j);
811 double y2 = EtaDenom->GetBinContent(
j);
812 double eff = y2 > 0. ? y1/y2 : 0.;
813 v->getEtaEffHisto()->setBinContent(
j, eff);
814 double y1err = EtaNum->GetBinError(
j);
815 double y2err = EtaDenom->GetBinError(
j);
818 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
819 + (y2err/y2)*(y2err/y2)) ;
820 v->getEtaEffHisto()->setBinError(
j, efferr);
824 if (PhiNum->Integral() != 0. && PhiDenom->Integral() != 0. ) {
825 for(
int j=1;
j <= PhiNum->GetXaxis()->GetNbins();
j++ ){
826 double y1 = PhiNum->GetBinContent(
j);
827 double y2 = PhiDenom->GetBinContent(
j);
828 double eff = y2 > 0. ? y1/y2 : 0.;
829 v->getPhiEffHisto()->setBinContent(
j, eff);
830 double y1err = PhiNum->GetBinError(
j);
831 double y2err = PhiDenom->GetBinError(
j);
833 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
834 + (y2err/y2)*(y2err/y2)) ;
835 v->getPhiEffHisto()->setBinError(
j, efferr);
846 EtNum= (
v->getEtNumHisto())->
getTH1F() ;
847 PhiNum= (
v->getPhiNumHisto())->
getTH1F() ;
848 EtDenom= (
v->getEtDenomHisto())->
getTH1F() ;
849 PhiDenom= (
v->getPhiDenomHisto())->
getTH1F() ;
851 if (EtNum->Integral() != 0. && EtDenom->Integral() != 0. ) {
853 for(
int j=1;
j <= EtNum->GetXaxis()->GetNbins();
j++ ){
854 double y1 = EtNum->GetBinContent(
j);
855 double y2 = EtDenom->GetBinContent(
j);
856 double eff = y2 > 0. ? y1/y2 : 0.;
857 v->getEtEffHisto()->setBinContent(
j, eff);
858 double y1err = EtNum->GetBinError(
j);
859 double y2err = EtDenom->GetBinError(
j);
862 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
863 + (y2err/y2)*(y2err/y2)) ;
864 v->getEtEffHisto()->setBinError(
j, efferr);
867 if (PhiNum->Integral() != 0. && PhiDenom->Integral() != 0. ) {
869 for(
int j=1;
j <= PhiNum->GetXaxis()->GetNbins();
j++ ){
870 double y1 = PhiNum->GetBinContent(
j);
871 double y2 = PhiDenom->GetBinContent(
j);
872 double eff = y2 > 0. ? y1/y2 : 0.;
873 v->getPhiEffHisto()->setBinContent(
j, eff);
874 double y1err = PhiNum->GetBinError(
j);
875 double y2err = PhiDenom->GetBinError(
j);
878 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
879 + (y2err/y2)*(y2err/y2)) ;
880 v->getPhiEffHisto()->setBinError(
j, efferr);
1561 LogError(
"HLTJetMETDQMSource") <<
"HLTConfigProvider failed to initialize." << std::endl;
1586 for (
unsigned int j=0;
j!=
n; ++
j) {
1588 std::string l1pathname =
"dummy";
1593 std::string denompathname =
"";
1595 unsigned int usedPresscale = 1;
1596 unsigned int objectType = 0;
1600 if ( pathname.find(
"Mu") && (pathname==denompathnamemu))
1618 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1619 numpathmodule!= numpathmodules.end();
1628 l1pathname = *numpathmodule;
1632 std::string filtername(
"dummy");
1633 std::string Denomfiltername(
"denomdummy");
1635 float ptMax = 300.0;
1636 if (objectType != 0 )
1638 pathname, l1pathname, filtername,
1640 objectType, ptMin, ptMax));
1642 std::string histonm=
"JetMET_rate_All";
1643 std::string histonmL1=
"JetMET_rate_All_L1";
1644 std::string histot=
"JetMET Rate Summary";
1645 std::string histoL1t=
"JetMET L1 Rate Summary";
1653 unsigned int nname=0;
1654 unsigned int nnameL1=0;
1656 std::string labelnm(
"dummy");
1657 labelnm =
v->getPath();
1661 std::string labelnml1(
"dummyl1");
1662 labelnml1 =
v->getl1Path();
1679 std::string labelname(
"dummy");
1680 labelname =
v->getPath();
1681 std::string histoname(labelname+
"");
1682 std::string
title(labelname+
"");
1684 double histEtaMax = 2.5;
1704 TString pathfolder =
dirname_ + foldernm +
v->getPath();
1706 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
1710 histoname = labelname+
"_Et";
1711 title = labelname+
" E_t";
1712 Et = dbe->
book1D(histoname.c_str(),
1717 histoname = labelname+
"_l1Et";
1718 title = labelname+
" L1 E_t";
1719 l1Et = dbe->
book1D(histoname.c_str(),
1724 if (labelname.find(
"Jet") != std::string::npos
1725 || labelname.find(
"Mu") != std::string::npos) {
1727 histoname = labelname+
"_EtaPhi";
1728 title = labelname+
" #eta vs #phi";
1729 EtaPhi = dbe->
book2D(histoname.c_str(),
1731 nBins2D,-histEtaMax,histEtaMax,
1734 histoname = labelname+
"_l1EtaPhi";
1735 title = labelname+
"L1 #eta vs L1 #phi";
1736 l1EtaPhi = dbe->
book2D(histoname.c_str(),
1738 nBins2D,-histEtaMax,histEtaMax,
1741 histoname = labelname+
"_Phi";
1742 title = labelname+
" #phi";
1743 Phi = dbe->
book1D(histoname.c_str(),
1747 histoname = labelname+
"_l1Phi";
1748 title = labelname+
"L1 #phi";
1749 l1Phi = dbe->
book1D(histoname.c_str(),
1752 histoname = labelname+
"_Eta";
1753 title = labelname+
" #eta";
1754 Eta = dbe->
book1D(histoname.c_str(),
1756 nBins_,-histEtaMax,histEtaMax
1759 histoname = labelname+
"_l1Eta";
1760 title = labelname+
"L1 #eta";
1761 l1Eta = dbe->
book1D(histoname.c_str(),
1763 nBins_,-histEtaMax,histEtaMax);
1765 else if( (labelname.find(
"MET") != std::string::npos)
1766 || (labelname.find(
"SumET") != std::string::npos) ){
1767 histoname = labelname+
"_phi";
1768 title = labelname+
" #phi";
1769 Phi = dbe->
book1D(histoname.c_str(),
1773 histoname = labelname+
"_l1Phi";
1774 title = labelname+
"L1 #phi";
1775 l1Phi = dbe->
book1D(histoname.c_str(),
1780 v->setHistos( N, Et, EtaPhi, Eta, Phi, NL1, l1Et, l1EtaPhi,l1Eta, l1Phi);
1787 std::string
foldernm =
"/wrtMuon/";
1792 for (
unsigned int j=0;
j!=
n; ++
j) {
1794 std::string l1pathname =
"dummy";
1800 int usedPresscale = 1;
1804 if ( pathname.find(
"Mu") && (pathname==denompathname))
1820 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1821 numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1827 l1pathname = *numpathmodule;
1832 std::string filtername(
"dummy");
1833 std::string Denomfiltername(
"denomdummy");
1835 float ptMax = 300.0;
1836 if ( objectType != 0){
1841 objectType, ptMin, ptMax));
1853 std::string labelnm(
"dummy");
1854 labelnm =
v->getPath();
1867 std::string labelname(
"dummy");
1868 labelname =
v->getPath() +
"_wrt_" +
v->getDenomPath();
1869 std::string histoname(labelname+
"");
1870 std::string
title(labelname+
"");
1872 double histEtaMax = 2.5;
1886 histEtaMax = 5.0;
nBins_ = 60 ;
1889 TString pathfolder =
dirname_ + foldernm +
v->getPath();
1891 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
1897 histoname = labelname+
"_Et_wrtMu";
1898 title = labelname+
" E_t";
1899 EtwrtMu = dbe->
book1D(histoname.c_str(),
1904 if ((
v->getPath()).
find(
"Jet") != std::string::npos
1905 || (
v->getPath()).
find(
"Mu") != std::string::npos) {
1906 histoname = labelname+
"_EtaPhi_wrtMu";
1907 title = labelname+
" #eta vs #phi";
1908 EtaPhiwrtMu = dbe->
book2D(histoname.c_str(),
1910 nBins2D,-histEtaMax,histEtaMax,
1915 else if( ((
v->getPath()).
find(
"MET") != std::string::npos)
1916 || ((
v->getPath()).
find(
"SumET") != std::string::npos) ){
1917 histoname = labelname+
"_phi_wrtMu";
1918 title = labelname+
" #phi";
1919 PhiwrtMu = dbe->
book1D(histoname.c_str(),
1924 v->setHistoswrtMu( NwrtMu, EtwrtMu, EtaPhiwrtMu, PhiwrtMu);
1934 std::string
foldernm =
"/Efficiency/";
1941 for (std::vector<std::pair<std::string, std::string> >::iterator
1944 ++custompathnamepair) {
1946 std::string denompathname = custompathnamepair->second;
1948 std::string
pathname = custompathnamepair->first;
1950 if (
verbose_)
std::cout <<
" ------prescale used -----" << usedPrescale << std::endl;
1952 bool foundfirst =
false;
1953 bool foundsecond =
false;
1954 for (
unsigned int i=0;
i!=
n; ++
i) {
1960 <<
"pathname not found, ignoring "
1966 <<
"denompathname not found, ignoring "
1971 std::string l1pathname =
"dummy";
1975 if ( pathname.find(
"Mu") && (pathname==denompathnamemu))
1992 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1993 numpathmodule!= numpathmodules.end();
2000 l1pathname = *numpathmodule;
2006 std::string filtername(
"dummy");
2007 std::string Denomfiltername(
"denomdummy");
2009 float ptMax = 300.0;
2016 if (objectType != 0){
2017 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;
2026 std::string histonm=
"JetMET_Efficiency_Summary";
2027 std::string histonmDenom=
"Denom_passed_Summary";
2028 std::string histonmNum=
"Num_passed_Summary";
2039 std::string labelnm(
"dummy");
2040 std::string labeldenom(
"dummy");
2041 labelnm =
v->getPath();
2042 labeldenom =
v->getDenomPath();
2063 std::string labelname(
"dummy");
2064 labelname =
"Eff_" +
v->getPath() +
"_wrt_" +
v->getDenomPath();
2065 std::string histoname(labelname+
"");
2066 std::string
title(labelname+
"");
2068 double histEtaMax = 5.0;
2082 histEtaMax = 5.0;
nBins_ = 60 ;
2085 TString pathfolder =
dirname_ + foldernm +
v->getPath();
2087 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
2091 histoname = labelname+
"_Et_Eff";
2092 title = labelname+
" E_t Eff";
2093 EtEff = dbe->
book1D(histoname.c_str(),
2098 histoname = labelname+
"_Et_Num";
2099 title = labelname+
" E_t Num";
2100 EtNum = dbe->
book1D(histoname.c_str(),
2106 histoname = labelname+
"_Et_Denom";
2107 title = labelname+
" E_t Denom";
2108 EtDenom = dbe->
book1D(histoname.c_str(),
2113 if ((
v->getPath()).
find(
"Jet") != std::string::npos
2114 || (
v->getPath()).
find(
"Mu") != std::string::npos) {
2115 histoname = labelname+
"_Eta_Eff";
2116 title = labelname+
" #eta Eff";
2117 EtaEff = dbe->
book1D(histoname.c_str(),
2119 nBins_,-histEtaMax,histEtaMax);
2120 histoname = labelname+
"_Phi_Eff";
2121 title = labelname+
" #phi Eff";
2122 PhiEff = dbe->
book1D(histoname.c_str(),
2126 histoname = labelname+
"_Eta_Num";
2127 title = labelname+
" #eta Num";
2128 EtaNum = dbe->
book1D(histoname.c_str(),
2130 nBins_,-histEtaMax,histEtaMax);
2131 histoname = labelname+
"_Phi_Num";
2132 title = labelname+
" #phi Num";
2133 PhiNum = dbe->
book1D(histoname.c_str(),
2137 histoname = labelname+
"_Eta_Denom";
2138 title = labelname+
" #eta Denom";
2139 EtaDenom = dbe->
book1D(histoname.c_str(),
2141 nBins_,-histEtaMax,histEtaMax);
2142 histoname = labelname+
"_Phi_Denom";
2143 title = labelname+
" #phi Denom";
2144 PhiDenom = dbe->
book1D(histoname.c_str(),
2150 else if( ((
v->getPath()).
find(
"MET") != std::string::npos)
2151 || ((
v->getPath()).
find(
"SumET") != std::string::npos) ){
2153 histoname = labelname+
"_Phi_Eff";
2154 title = labelname+
" #phi Eff";
2155 PhiEff = dbe->
book1D(histoname.c_str(),
2159 histoname = labelname+
"_Phi_Num";
2160 title = labelname+
" #phi Num";
2161 PhiNum = dbe->
book1D(histoname.c_str(),
2165 histoname = labelname+
"_Phi_Denom";
2166 title = labelname+
" #phi Denom";
2167 PhiDenom = dbe->
book1D(histoname.c_str(),
2173 v->setHistosEff( NEff, EtEff, EtaEff, PhiEff, NNum, EtNum, EtaNum, PhiNum, NDenom, EtDenom, EtaDenom, PhiDenom);
2196 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 * 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_
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)
d'tor
TH1F * getTH1F(void) const
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
MonitorElement * rate_Eff
MonitorElement * rate_Num
PathInfoCollection hltPathsEff_
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_