36 LogDebug(
"HLTJetMETDQMSource") <<
"constructor....";
40 LogDebug(
"HLTJetMETDQMSource") <<
"unabel to get DQMStore service?";
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");
124 using namespace trigger;
161 LogWarning(
"HLTJetMETDQMSource") <<
"TriggerResults not found, skipping event" << std::endl;
170 if(!triggerObj.isValid()) {
172 if(!triggerObj.isValid()) {
173 LogWarning(
"HLTJetMETDQMSource") <<
"TriggerEvent not found, skipping event" << std::endl;
198 triggertype =
v->getObjectType();
200 bool l1accept =
false;
202 const int l1index = triggerObj->filterIndex(l1testTag);
203 if ( l1index >= triggerObj->sizeFilters() ) {
205 <<
v->getl1Path() <<
"\t" <<
"\t" << l1testTag << std::endl;
209 const trigger::Vids & idtype = triggerObj->filterIds(l1index);
213 l1accept = l1k.size() > 0;
221 for(
unsigned int i = 0;
i < npath; ++
i) {
222 if ( triggerNames.triggerName(
i).find(
v->getPath()) != std::string::npos
234 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getPath() << std::endl;
237 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
238 <<
v->getPath() <<
"\t" <<
v->getl1Path();
244 if (
v->getLabel() ==
"dummy"){
248 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin();
249 labelIter!=filterLabels.end(); labelIter++) {
252 << testTag.
process() << std::endl;
253 int testindex = triggerObj->filterIndex(testTag);
255 if ( !(testindex >= triggerObj->sizeFilters()) ) {
257 << testTag.
label() << std::endl;
259 v->setLabel(*labelIter);
263 const int index = triggerObj->filterIndex(filterTag);
265 << filterTag << std::endl;
266 if ( index >= triggerObj->sizeFilters() ) {
268 << filterTag << std::endl;
273 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
274 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t" << toc[*ki].pt()
275 <<
"\t" << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
281 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
282 <<
" *ki " << *ki <<
" Nki "<< N<<
" "
283 << toc[*ki].pt() <<
"\t" << toc[*ki].eta() <<
"\t"
284 << toc[*ki].phi() << std::endl;
286 v->getEtHisto()->Fill(toc[*ki].
pt());
287 v->getEtaHisto()->Fill(toc[*ki].
eta());
288 v->getPhiHisto()->Fill(toc[*ki].
phi());
289 v->getEtaPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
292 trigger::Vids::const_iterator idtypeiter = idtype.begin();
293 for (trigger::Keys::const_iterator l1ki = l1k.begin();
294 l1ki !=l1k.end(); ++l1ki ) {
300 <<
"\t" <<
" *l1ki " << *l1ki <<
" NL1 "
301 << NL1<<
" " << toc[*l1ki].pt() <<
"\t"
302 << toc[*l1ki].eta() <<
"\t" << toc[*l1ki].phi()
308 v->getL1EtHisto()->Fill(toc[*l1ki].
pt());
309 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
310 v->getL1EtaHisto()->Fill(toc[*l1ki].
eta());
311 v->getL1EtaPhiHisto()->Fill(toc[*l1ki].
eta(),toc[*l1ki].
phi());
325 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t" <<
" *ki "
326 << *ki <<
" Nki "<< N <<
" " << toc[*ki].pt()
327 <<
"\t" << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
329 v->getEtHisto()->Fill(toc[*ki].
pt());
332 v->getEtaPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
335 trigger::Vids::const_iterator idtypeiter = idtype.begin();
336 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
344 v->getL1EtHisto()->Fill(toc[*l1ki].
pt());
347 v->getL1EtaPhiHisto()->Fill(toc[*l1ki].
eta(),toc[*l1ki].
phi());
360 v->getEtHisto()->Fill(toc[*ki].
pt());
361 v->getPhiHisto()->Fill(toc[*ki].
phi());
364 trigger::Vids::const_iterator idtypeiter = idtype.begin();
365 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
372 v->getL1EtHisto()->Fill(toc[*l1ki].
pt());
373 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
384 v->getEtHisto()->Fill(toc[*ki].
pt());
385 v->getPhiHisto()->Fill(toc[*ki].
phi());
387 trigger::Vids::const_iterator idtypeiter = idtype.begin();
388 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
396 v->getL1EtHisto()->Fill(toc[*l1ki].
pt());
397 v->getL1PhiHisto()->Fill(toc[*l1ki].
phi());
419 triggertype =
v->getObjectType();
421 bool l1accept =
false;
423 const int l1index = triggerObj->filterIndex(l1testTag);
424 if ( l1index >= triggerObj->sizeFilters() ) {
425 if (
verbose_)
std::cout<<
"no index "<< l1index <<
" of that name (wrtMu)" <<
v->getl1Path() <<
"\t" <<
"\t" << l1testTag << std::endl;
433 l1accept = l1k.size() > 0;
438 bool denompassed =
false;
440 for(
unsigned int i = 0;
i < npath; ++
i) {
441 if ( triggerNames.triggerName(
i).find(
v->getPath()) != std::string::npos &&
triggerResults->accept(
i)){
442 passed =
true; break ;
445 for(
unsigned int i = 0;
i < npath; ++
i) {
446 if ( triggerNames.triggerName(
i).find(
v->getDenomPath()) != std::string::npos &&
triggerResults->accept(
i)){
447 denompassed =
true; break ;
453 <<
v->getDenomPath() << std::endl;
460 <<
v->getPath() << std::endl;
463 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
464 <<
v->getPath() <<
"\t" <<
v->getl1Path();
468 if (
v->getLabel() ==
"dummy"){
472 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
476 int testindex = triggerObj->filterIndex(testTag);
478 if ( !(testindex >= triggerObj->sizeFilters()) ) {
481 v->setLabel(*labelIter);
485 const int index = triggerObj->filterIndex(filterTag);
487 << filterTag << std::endl;
488 if ( index >= triggerObj->sizeFilters() ) {
490 << filterTag << std::endl;
495 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
498 <<
"\t" << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
499 <<
"\t" << toc[*ki].phi() << std::endl;
506 <<
"\t" <<
" *ki " << *ki <<
" Nki "<< N
507 <<
" " << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
508 <<
"\t" << toc[*ki].phi() << std::endl;
509 v->getEtwrtMuHisto()->Fill(toc[*ki].
pt());
512 v->getEtaPhiwrtMuHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
519 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;
520 v->getEtwrtMuHisto()->Fill(toc[*ki].
pt());
523 v->getEtaPhiwrtMuHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
529 v->getEtwrtMuHisto()->Fill(toc[*ki].
pt());
530 v->getPhiwrtMuHisto()->Fill(toc[*ki].
phi());
536 v->getEtwrtMuHisto()->Fill(toc[*ki].
pt());
557 triggertype =
v->getObjectType();
559 bool l1accept =
false;
561 const int l1index = triggerObj->filterIndex(l1testTag);
562 if ( l1index >= triggerObj->sizeFilters() ) {
564 <<
v->getl1Path() <<
"\t" <<
"\t" << l1testTag << std::endl;
571 l1accept = l1k.size() > 0;
573 for(
unsigned int i = 0;
i < npath; ++
i) {
574 if ( triggerNames.triggerName(
i).find(
v->getPath()) != std::string::npos
581 bool denompassed =
false;
582 for(
unsigned int i = 0;
i < npath; ++
i) {
583 if ( triggerNames.triggerName(
i).find(
v->getDenomPath()) != std::string::npos
586 if (
verbose_)
std::cout <<
" i " <<
i <<
" trigger name " <<
v->getDenomPath() << std::endl;
593 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getDenomPath() << std::endl;
596 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "
597 <<
v->getPath() <<
"\t" <<
v->getl1Path();
601 if (
verbose_)
std::cout <<
v->getDenomPath() <<
"\t" <<
v->getDenomLabel() <<
"\t" << std::endl;
602 if (
v->getDenomLabel() ==
"denomdummy"){
605 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
608 << testTag.
process() << std::endl;
609 int testindex = triggerObj->filterIndex(testTag);
610 if ( !(testindex >= triggerObj->sizeFilters()) ) {
612 << testTag.
label() << std::endl;
614 v->setDenomLabel(*labelIter);
618 const int index = triggerObj->filterIndex(filterTag);
620 << filterTag << std::endl;
621 if ( index >= triggerObj->sizeFilters() ) {
623 << filterTag << std::endl;
628 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
629 if (
verbose_)
cout <<
" filling HLT Denom " <<
v->getDenomPath() <<
"\t"
630 << toc[*ki].pt() <<
"\t" << toc[*ki].eta() <<
"\t"
631 << toc[*ki].phi() << std::endl;
637 if (
verbose_)
cout <<
" filling HLT Denom" <<
v->getDenomPath()
638 <<
"\t" <<
" *kiDeno " << *ki <<
" NkiDenom "
639 << Ndenom<<
" " << toc[*ki].pt() <<
"\t"
640 << toc[*ki].eta() <<
"\t" << toc[*ki].phi() << std::endl;
643 v->getEtDenomHisto()->Fill(toc[*ki].
pt());
644 v->getEtaDenomHisto()->Fill(toc[*ki].
eta());
645 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
651 v->getEtDenomHisto()->Fill(toc[*ki].
pt());
652 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
657 v->getEtDenomHisto()->Fill(toc[*ki].
pt());
658 v->getPhiDenomHisto()->Fill(toc[*ki].
phi());
660 if ( numobj != -1)
break;
668 if (
verbose_)
std::cout <<
" N " << N <<
" trigger name " <<
v->getPath() << std::endl;
670 edm::LogInfo(
"HLTJetMETDQMSource") <<
"l1 seed path not accepted for hlt path "<<
v->getPath() <<
"\t" <<
v->getl1Path();
675 if (
v->getLabel() ==
"dummy"){
678 for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
681 << testTag.
process() << std::endl;
682 int testindex = triggerObj->filterIndex(testTag);
683 if ( !(testindex >= triggerObj->sizeFilters()) ) {
685 << testTag.
label() << std::endl;
687 v->setLabel(*labelIter);
691 const int index = triggerObj->filterIndex(filterTag);
693 << filterTag << std::endl;
694 if ( index >= triggerObj->sizeFilters() ) {
696 << filterTag << std::endl;
701 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
703 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
704 << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
705 <<
"\t" << toc[*ki].phi() << std::endl;
711 if (
verbose_)
cout <<
" filling HLT " <<
v->getPath() <<
"\t"
712 <<
" *ki " << *ki <<
" Nki "<< N<<
" "
713 << toc[*ki].pt() <<
"\t" << toc[*ki].eta()
714 <<
"\t" << toc[*ki].phi() << std::endl;
716 v->getEtNumHisto()->Fill(toc[*ki].
pt());
717 v->getEtaNumHisto()->Fill(toc[*ki].
eta());
718 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
724 v->getEtNumHisto()->Fill(toc[*ki].
pt());
725 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
730 v->getEtNumHisto()->Fill(toc[*ki].
pt());
731 v->getPhiNumHisto()->Fill(toc[*ki].
phi());
733 if ( numobj != -1)
break;
739 if ( (
nev_ % 1000) == 0 ){
745 TH1F *rate_denom=
NULL;
750 if ((rate_denom->Integral() != 0.) && (rate_num->Integral() != 0.) ) {
752 for(
int j=1;
j <= rate_denom->GetXaxis()->GetNbins();
j++ ){
753 double y1 = rate_num->GetBinContent(
j);
754 double y2 = rate_denom->GetBinContent(
j);
755 double eff = y2 > 0. ? y1/y2 : 0.;
757 double y1err = rate_num->GetBinError(
j);
758 double y2err = rate_denom->GetBinError(
j);
761 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
762 + (y2err/y2)*(y2err/y2)) ;
768 triggertype =
v->getObjectType();
783 EtNum= (
v->getEtNumHisto())->
getTH1F() ;
784 EtaNum= (
v->getEtaNumHisto())->
getTH1F() ;
785 PhiNum= (
v->getPhiNumHisto())->
getTH1F() ;
786 EtDenom= (
v->getEtDenomHisto())->
getTH1F() ;
787 EtaDenom= (
v->getEtaDenomHisto())->
getTH1F() ;
788 PhiDenom= (
v->getPhiDenomHisto())->
getTH1F() ;
790 if ((EtNum->Integral() != 0.) && (EtDenom->Integral() != 0.) ) {
792 for(
int j=1;
j <= EtNum->GetXaxis()->GetNbins();
j++ ){
793 double y1 = EtNum->GetBinContent(
j);
794 double y2 = EtDenom->GetBinContent(
j);
795 double eff = y2 > 0. ? y1/y2 : 0.;
797 v->getEtEffHisto()->setBinContent(
j, eff);
798 double y1err = EtNum->GetBinError(
j);
799 double y2err = EtDenom->GetBinError(
j);
802 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
803 + (y2err/y2)*(y2err/y2)) ;
804 v->getEtEffHisto()->setBinError(
j, efferr);
807 << y1 <<
" " << y2 <<
" "<< y1err <<
" " << y2err << std::endl;
811 if (EtaNum->Integral() != 0. && EtaDenom->Integral() != 0. ) {
812 for(
int j=1;
j <= EtaNum->GetXaxis()->GetNbins();
j++ ){
813 double y1 = EtaNum->GetBinContent(
j);
814 double y2 = EtaDenom->GetBinContent(
j);
815 double eff = y2 > 0. ? y1/y2 : 0.;
816 v->getEtaEffHisto()->setBinContent(
j, eff);
817 double y1err = EtaNum->GetBinError(
j);
818 double y2err = EtaDenom->GetBinError(
j);
821 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
822 + (y2err/y2)*(y2err/y2)) ;
823 v->getEtaEffHisto()->setBinError(
j, efferr);
827 if (PhiNum->Integral() != 0. && PhiDenom->Integral() != 0. ) {
828 for(
int j=1;
j <= PhiNum->GetXaxis()->GetNbins();
j++ ){
829 double y1 = PhiNum->GetBinContent(
j);
830 double y2 = PhiDenom->GetBinContent(
j);
831 double eff = y2 > 0. ? y1/y2 : 0.;
832 v->getPhiEffHisto()->setBinContent(
j, eff);
833 double y1err = PhiNum->GetBinError(
j);
834 double y2err = PhiDenom->GetBinError(
j);
836 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
837 + (y2err/y2)*(y2err/y2)) ;
838 v->getPhiEffHisto()->setBinError(
j, efferr);
849 EtNum= (
v->getEtNumHisto())->
getTH1F() ;
850 PhiNum= (
v->getPhiNumHisto())->
getTH1F() ;
851 EtDenom= (
v->getEtDenomHisto())->
getTH1F() ;
852 PhiDenom= (
v->getPhiDenomHisto())->
getTH1F() ;
854 if (EtNum->Integral() != 0. && EtDenom->Integral() != 0. ) {
856 for(
int j=1;
j <= EtNum->GetXaxis()->GetNbins();
j++ ){
857 double y1 = EtNum->GetBinContent(
j);
858 double y2 = EtDenom->GetBinContent(
j);
859 double eff = y2 > 0. ? y1/y2 : 0.;
860 v->getEtEffHisto()->setBinContent(
j, eff);
861 double y1err = EtNum->GetBinError(
j);
862 double y2err = EtDenom->GetBinError(
j);
865 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
866 + (y2err/y2)*(y2err/y2)) ;
867 v->getEtEffHisto()->setBinError(
j, efferr);
870 if (PhiNum->Integral() != 0. && PhiDenom->Integral() != 0. ) {
872 for(
int j=1;
j <= PhiNum->GetXaxis()->GetNbins();
j++ ){
873 double y1 = PhiNum->GetBinContent(
j);
874 double y2 = PhiDenom->GetBinContent(
j);
875 double eff = y2 > 0. ? y1/y2 : 0.;
876 v->getPhiEffHisto()->setBinContent(
j, eff);
877 double y1err = PhiNum->GetBinError(
j);
878 double y2err = PhiDenom->GetBinError(
j);
881 if (y2 && y1 > 0.) efferr = (y1/y2)*
sqrt ((y1err/y1)*(y1err/y1)
882 + (y2err/y2)*(y2err/y2)) ;
883 v->getPhiEffHisto()->setBinError(
j, efferr);
1564 LogError(
"HLTJetMETDQMSource") <<
"HLTConfigProvider failed to initialize." << std::endl;
1589 for (
unsigned int j=0;
j!=
n; ++
j) {
1598 unsigned int usedPresscale = 1;
1599 unsigned int objectType = 0;
1603 if ( pathname.find(
"Mu") && (pathname==denompathnamemu))
1621 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1622 numpathmodule!= numpathmodules.end();
1631 l1pathname = *numpathmodule;
1638 float ptMax = 300.0;
1639 if (objectType != 0 )
1641 pathname, l1pathname, filtername,
1643 objectType, ptMin, ptMax));
1656 unsigned int nname=0;
1657 unsigned int nnameL1=0;
1660 labelnm =
v->getPath();
1665 labelnml1 =
v->getl1Path();
1683 labelname =
v->getPath();
1687 double histEtaMax = 2.5;
1707 TString pathfolder =
dirname_ + foldernm +
v->getPath();
1709 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
1713 histoname = labelname+
"_Et";
1714 title = labelname+
" E_t";
1715 Et = dbe->
book1D(histoname.c_str(),
1720 histoname = labelname+
"_l1Et";
1721 title = labelname+
" L1 E_t";
1722 l1Et = dbe->
book1D(histoname.c_str(),
1727 if (labelname.find(
"Jet") != std::string::npos
1728 || labelname.find(
"Mu") != std::string::npos) {
1730 histoname = labelname+
"_EtaPhi";
1731 title = labelname+
" #eta vs #phi";
1732 EtaPhi = dbe->
book2D(histoname.c_str(),
1734 nBins2D,-histEtaMax,histEtaMax,
1737 histoname = labelname+
"_l1EtaPhi";
1738 title = labelname+
"L1 #eta vs L1 #phi";
1739 l1EtaPhi = dbe->
book2D(histoname.c_str(),
1741 nBins2D,-histEtaMax,histEtaMax,
1744 histoname = labelname+
"_Phi";
1745 title = labelname+
" #phi";
1746 Phi = dbe->
book1D(histoname.c_str(),
1750 histoname = labelname+
"_l1Phi";
1751 title = labelname+
"L1 #phi";
1752 l1Phi = dbe->
book1D(histoname.c_str(),
1755 histoname = labelname+
"_Eta";
1756 title = labelname+
" #eta";
1757 Eta = dbe->
book1D(histoname.c_str(),
1759 nBins_,-histEtaMax,histEtaMax
1762 histoname = labelname+
"_l1Eta";
1763 title = labelname+
"L1 #eta";
1764 l1Eta = dbe->
book1D(histoname.c_str(),
1766 nBins_,-histEtaMax,histEtaMax);
1768 else if( (labelname.find(
"MET") != std::string::npos)
1769 || (labelname.find(
"SumET") != std::string::npos) ){
1770 histoname = labelname+
"_phi";
1771 title = labelname+
" #phi";
1772 Phi = dbe->
book1D(histoname.c_str(),
1776 histoname = labelname+
"_l1Phi";
1777 title = labelname+
"L1 #phi";
1778 l1Phi = dbe->
book1D(histoname.c_str(),
1783 v->setHistos( N, Et, EtaPhi, Eta, Phi, NL1, l1Et, l1EtaPhi,l1Eta, l1Phi);
1795 for (
unsigned int j=0;
j!=
n; ++
j) {
1803 int usedPresscale = 1;
1807 if ( pathname.find(
"Mu") && (pathname==denompathname))
1823 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1824 numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1830 l1pathname = *numpathmodule;
1838 float ptMax = 300.0;
1839 if ( objectType != 0){
1844 objectType, ptMin, ptMax));
1857 labelnm =
v->getPath();
1871 labelname =
v->getPath() +
"_wrt_" +
v->getDenomPath();
1875 double histEtaMax = 2.5;
1889 histEtaMax = 5.0;
nBins_ = 60 ;
1892 TString pathfolder =
dirname_ + foldernm +
v->getPath();
1894 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
1900 histoname = labelname+
"_Et_wrtMu";
1901 title = labelname+
" E_t";
1902 EtwrtMu = dbe->
book1D(histoname.c_str(),
1907 if ((
v->getPath()).
find(
"Jet") != std::string::npos
1908 || (
v->getPath()).
find(
"Mu") != std::string::npos) {
1909 histoname = labelname+
"_EtaPhi_wrtMu";
1910 title = labelname+
" #eta vs #phi";
1911 EtaPhiwrtMu = dbe->
book2D(histoname.c_str(),
1913 nBins2D,-histEtaMax,histEtaMax,
1918 else if( ((
v->getPath()).
find(
"MET") != std::string::npos)
1919 || ((
v->getPath()).
find(
"SumET") != std::string::npos) ){
1920 histoname = labelname+
"_phi_wrtMu";
1921 title = labelname+
" #phi";
1922 PhiwrtMu = dbe->
book1D(histoname.c_str(),
1927 v->setHistoswrtMu( NwrtMu, EtwrtMu, EtaPhiwrtMu, PhiwrtMu);
1944 for (std::vector<std::pair<std::string, std::string> >::iterator
1947 ++custompathnamepair) {
1949 std::string denompathname = custompathnamepair->second;
1953 if (
verbose_)
std::cout <<
" ------prescale used -----" << usedPrescale << std::endl;
1955 bool foundfirst =
false;
1956 bool foundsecond =
false;
1957 for (
unsigned int i=0;
i!=
n; ++
i) {
1963 <<
"pathname not found, ignoring "
1969 <<
"denompathname not found, ignoring "
1978 if ( pathname.find(
"Mu") && (pathname==denompathnamemu))
1995 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
1996 numpathmodule!= numpathmodules.end();
2003 l1pathname = *numpathmodule;
2012 float ptMax = 300.0;
2019 if (objectType != 0){
2020 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;
2044 labelnm =
v->getPath();
2045 labeldenom =
v->getDenomPath();
2067 labelname =
"Eff_" +
v->getPath() +
"_wrt_" +
v->getDenomPath();
2071 double histEtaMax = 5.0;
2085 histEtaMax = 5.0;
nBins_ = 60 ;
2088 TString pathfolder =
dirname_ + foldernm +
v->getPath();
2090 if (
verbose_)
std::cout <<
"Booking Histos in Directory " << pathfolder.Data() << std::endl;
2094 histoname = labelname+
"_Et_Eff";
2095 title = labelname+
" E_t Eff";
2096 EtEff = dbe->
book1D(histoname.c_str(),
2101 histoname = labelname+
"_Et_Num";
2102 title = labelname+
" E_t Num";
2103 EtNum = dbe->
book1D(histoname.c_str(),
2109 histoname = labelname+
"_Et_Denom";
2110 title = labelname+
" E_t Denom";
2111 EtDenom = dbe->
book1D(histoname.c_str(),
2116 if ((
v->getPath()).
find(
"Jet") != std::string::npos
2117 || (
v->getPath()).
find(
"Mu") != std::string::npos) {
2118 histoname = labelname+
"_Eta_Eff";
2119 title = labelname+
" #eta Eff";
2120 EtaEff = dbe->
book1D(histoname.c_str(),
2122 nBins_,-histEtaMax,histEtaMax);
2123 histoname = labelname+
"_Phi_Eff";
2124 title = labelname+
" #phi Eff";
2125 PhiEff = dbe->
book1D(histoname.c_str(),
2129 histoname = labelname+
"_Eta_Num";
2130 title = labelname+
" #eta Num";
2131 EtaNum = dbe->
book1D(histoname.c_str(),
2133 nBins_,-histEtaMax,histEtaMax);
2134 histoname = labelname+
"_Phi_Num";
2135 title = labelname+
" #phi Num";
2136 PhiNum = dbe->
book1D(histoname.c_str(),
2140 histoname = labelname+
"_Eta_Denom";
2141 title = labelname+
" #eta Denom";
2142 EtaDenom = dbe->
book1D(histoname.c_str(),
2144 nBins_,-histEtaMax,histEtaMax);
2145 histoname = labelname+
"_Phi_Denom";
2146 title = labelname+
" #phi Denom";
2147 PhiDenom = dbe->
book1D(histoname.c_str(),
2153 else if( ((
v->getPath()).
find(
"MET") != std::string::npos)
2154 || ((
v->getPath()).
find(
"SumET") != std::string::npos) ){
2156 histoname = labelname+
"_Phi_Eff";
2157 title = labelname+
" #phi Eff";
2158 PhiEff = dbe->
book1D(histoname.c_str(),
2162 histoname = labelname+
"_Phi_Num";
2163 title = labelname+
" #phi Num";
2164 PhiNum = dbe->
book1D(histoname.c_str(),
2168 histoname = labelname+
"_Phi_Denom";
2169 title = labelname+
" #phi Denom";
2170 PhiDenom = dbe->
book1D(histoname.c_str(),
2176 v->setHistosEff( NEff, EtEff, EtaEff, PhiEff, NNum, EtNum, EtaNum, PhiNum, NDenom, EtDenom, EtaDenom, PhiDenom);
2199 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)
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken_
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::EDGetTokenT< edm::TriggerResults > triggerResultsTokenFU_
edm::InputTag triggerSummaryLabel_
edm::InputTag triggerResultsLabel_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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_
double deltaR(const T1 &t1, const T2 &t2)
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
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)
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)
static std::string const triggerResults
HLTJetMETDQMSource(const edm::ParameterSet &)
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
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryTokenFU_
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_