49 LogDebug(
"HLTInclusiveVBFSource") <<
"constructor....";
53 LogDebug(
"HLTInclusiveVBFSource") <<
"unabel to get DQMStore service?";
107 using namespace trigger;
108 using namespace reco;
110 if(
debug_)
cout<<
"DEBUG-0: Start to analyze"<<endl;
121 edm::LogInfo(
"HLTInclusiveVBFSource") <<
"TriggerResults not found, "
135 edm::LogInfo(
"HLTInclusiveVBFSource") <<
"TriggerEvent not found, "
141 if(
debug_)
cout<<
"DEBUG-1: Trigger information"<<endl;
149 if(!ValidPFMET_)
return;
153 if(!ValidPFJet_)
return;
155 if(!
metSrc.isValid())
return;
156 if(!
jetSrc.isValid())
return;
159 if(
jets.size()<=0)
return;
160 if(mets.size()<=0)
return;
162 if(
debug_)
cout<<
"DEBUG-2: AOD Information"<<endl;
239 for(
unsigned int ijet1=0; ijet1<
jets.size(); ijet1++){
241 if(
jets[ijet1].neutralEmEnergyFraction()>0.99)
continue;
242 for(
unsigned int ijet2=ijet1+1; ijet2<
jets.size(); ijet2++){
244 if(
jets[ijet2].neutralEmEnergyFraction()>0.99)
continue;
302 if(
debug_)
cout<<
"DEBUG-4-0: Path loops"<<endl;
309 if(
debug_)
cout<<
"DEBUG-4-1: Path is accepted. Now we are looking for "<<
v->getLabel()<<
" module."<<endl;
314 if(hltIndex >=
triggerObj_->sizeFilters())
continue;
316 if(
debug_)
cout<<
"DEBUG-4-2: HLT module "<<
v->getLabel()<<
" exists"<<endl;
318 trigger::Keys::const_iterator kj = khlt.begin();
319 for(; kj != khlt.end(); kj+=2){
381 v->getMEhisto_NumberOfMatches()->Fill(1);
385 v->getMEhisto_NumberOfMatches()->Fill(0);
395 if(
debug_)
cout<<
"DEBUG-9: Loop for rate approximation: "<<
v->getPath()<<endl;
406 if(hltIndex >=
triggerObj_->sizeFilters())
continue;
408 trigger::Keys::const_iterator kj = khlt.begin();
409 for(; kj != khlt.end(); kj+=2){
497 LogDebug(
"HLTInclusiveVBFSource") <<
"HLTConfigProvider failed to initialize.";
501 for(
unsigned int i=0;
i!=numberOfPaths; ++
i){
502 bool numFound =
false;
505 unsigned int usedPrescale = 1;
506 unsigned int objectType = 0;
509 if(
pathname.find(
"HLT_Di") == std::string::npos)
continue;
510 if(
pathname.find(
"Jet") == std::string::npos)
continue;
511 if(
pathname.find(
"MJJ") == std::string::npos)
continue;
512 if(
pathname.find(
"VBF_v") == std::string::npos)
continue;
519 triggerType =
"DiJet_Trigger";
523 for (
unsigned int i=0;
i!=numberOfPaths; ++
i) {
525 if(HLTname ==
pathname)numFound =
true;
528 if(numFound==
false)
continue;
530 std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
531 for(; numpathmodule!= numpathmodules.end(); ++numpathmodule){
543 if(objectType == 0 || numFound==
false)
continue;
556 if(
debug_)
cout<<
"Storing: "<<
v->getPath()<<
", Prescale = "<<
v->getprescaleUsed()<<endl;
561 dbe->setCurrentFolder(subdirName);
579 RECO_deltaEta_DiJet = dbe->bookFloat(
"RECO_deltaEta_DiJet");
580 RECO_deltaPhi_DiJet = dbe->bookFloat(
"RECO_deltaPhi_DiJet");
581 RECO_invMass_DiJet = dbe->bookFloat(
"RECO_invMass_DiJet");
582 HLT_deltaEta_DiJet = dbe->bookFloat(
"HLT_deltaEta_DiJet");
583 HLT_deltaPhi_DiJet = dbe->bookFloat(
"HLT_deltaPhi_DiJet ");
584 HLT_invMass_DiJet = dbe->bookFloat(
"HLT_invMass_DiJet");
585 RECO_deltaEta_DiJet_Match = dbe->bookFloat(
"RECO_deltaEta_DiJet_Match");
586 RECO_deltaPhi_DiJet_Match = dbe->bookFloat(
"RECO_deltaPhi_DiJet_Match");
587 RECO_invMass_DiJet_Match = dbe->bookFloat(
"RECO_invMass_DiJet_Match");
588 RECOHLT_deltaEta = dbe->bookFloat(
"RECOHLT_deltaEta");
589 RECOHLT_deltaPhi = dbe->bookFloat(
"RECOHLT_deltaPhi ");
590 RECOHLT_invMass = dbe->bookFloat(
"RECOHLT_invMass");
591 NumberOfMatches = dbe->bookFloat(
"NumberOfMatches");
592 NumberOfEvents = dbe->bookFloat(
"NumberOfEvents");
599 histoname = labelname+
"_RECO_deltaEta_DiJet";
600 title = labelname+
"_RECO_deltaEta_DiJet "+trigPath;
601 RECO_deltaEta_DiJet = dbe->book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
602 RECO_deltaEta_DiJet->
getTH1F();
605 histoname = labelname+
"_RECO_deltaPhi_DiJet";
606 title = labelname+
"_RECO_deltaPhi_DiJet "+trigPath;
607 RECO_deltaPhi_DiJet = dbe->book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
608 RECO_deltaPhi_DiJet->
getTH1F();
611 histoname = labelname+
"_RECO_invMass_DiJet";
612 title = labelname+
"_RECO_invMass_DiJet "+trigPath;
613 RECO_invMass_DiJet = dbe->book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
617 histoname = labelname+
"_HLT_deltaEta_DiJet";
618 title = labelname+
"_HLT_deltaEta_DiJet "+trigPath;
619 HLT_deltaEta_DiJet = dbe->book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
623 histoname = labelname+
"_HLT_deltaPhi_DiJet";
624 title = labelname+
"_HLT_deltaPhi_DiJet "+trigPath;
625 HLT_deltaPhi_DiJet = dbe->book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
629 histoname = labelname+
"_HLT_invMass_DiJet";
630 title = labelname+
"_HLT_invMass_DiJet "+trigPath;
631 HLT_invMass_DiJet = dbe->book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
635 histoname = labelname+
"_RECO_deltaEta_DiJet_Match";
636 title = labelname+
"_RECO_deltaEta_DiJet_Match "+trigPath;
637 RECO_deltaEta_DiJet_Match = dbe->book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
638 RECO_deltaEta_DiJet_Match->
getTH1F();
641 histoname = labelname+
"_RECO_deltaPhi_DiJet_Match";
642 title = labelname+
"_RECO_deltaPhi_DiJet_Match "+trigPath;
643 RECO_deltaPhi_DiJet_Match = dbe->book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
644 RECO_deltaPhi_DiJet_Match->
getTH1F();
647 histoname = labelname+
"_RECO_invMass_DiJet_Match";
648 title = labelname+
"_RECO_invMass_DiJet_Match "+trigPath;
649 RECO_invMass_DiJet_Match = dbe->book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
650 RECO_invMass_DiJet_Match->
getTH1F();
653 histoname = labelname+
"_RECOHLT_deltaEta";
654 title = labelname+
"_RECOHLT_deltaEta "+trigPath;
655 RECOHLT_deltaEta = dbe->book2D(histoname.c_str(),title.c_str(),50,-10.,10.,50,-10.,10.);
659 histoname = labelname+
"_RECOHLT_deltaPhi";
660 title = labelname+
"_RECOHLT_deltaPhi "+trigPath;
661 RECOHLT_deltaPhi = dbe->book2D(histoname.c_str(),title.c_str(),35,-3.5,3.5,35,-3.5,3.5);
665 histoname = labelname+
"_RECOHLT_invMass";
666 title = labelname+
"_RECOHLT_invMass "+trigPath;
667 RECOHLT_invMass = dbe->book2D(histoname.c_str(),title.c_str(),100,500.,2000.,100,500.,2000.);
671 histoname = labelname+
"_NumberOfMatches ";
672 title = labelname+
"_NumberOfMatches "+trigPath;
673 NumberOfMatches = dbe->book1D(histoname.c_str(),title.c_str(),2,0.,2.);
677 histoname = labelname+
"_NumberOfEvents";
678 title = labelname+
"_NumberOfEvents "+trigPath;
679 NumberOfEvents = dbe->book1D(histoname.c_str(),title.c_str(),10,0.,10.);
690 RECO_deltaEta_DiJet_Match,
691 RECO_deltaPhi_DiJet_Match,
692 RECO_invMass_DiJet_Match,
728 if (fabs(eta)<=1.3) output=
true;
734 if (fabs(eta)<=3.0 && fabs(eta)>1.3) output=
true;
740 if (fabs(eta)>3.0) output=
true;
770 edm::LogInfo(
"HLTInclusiveVBFSource") <<
"no index "<< index <<
" of that name ";
773 if (k.size()) output=
true;
unsigned int size() const
number of trigger paths in trigger table
bool check_mjj800_Pt40_DEta3p5
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
bool check_mjj700_Pt35_DEta3p5
const std::string moduleType(const std::string &module) const
C++ class name of module.
void beginRun(const edm::Run &run, const edm::EventSetup &c)
const std::string & triggerName(unsigned int triggerIndex) const
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken
virtual bool isForward(double eta)
PathInfoCollection hltPathsAll_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
virtual bool isBarrel(double eta)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::InputTag triggerSummaryLabel_
virtual bool validPathHLT(std::string path)
edm::Handle< trigger::TriggerEvent > triggerObj_
bool check_mjj750_Pt35_DEta3p5
Strings::size_type size() const
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
double deltaR(const T1 &t1, const T2 &t2)
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
bool check_mjj700_Pt40_DEta3p5
bool check_mjj800_Pt35_DEta3p5
bool check_mjj650_Pt35_DEta3p5
HLTInclusiveVBFSource(const edm::ParameterSet &)
unsigned int triggerIndex(std::string const &name) const
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken
edm::EDGetTokenT< edm::View< reco::PFJet > > pfJetsToken
edm::EDGetTokenT< edm::View< reco::PFMET > > pfMetToken
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
Abs< T >::type abs(const T &t)
bool check_mjj650_Pt40_DEta3p5
edm::TriggerNames triggerNames_
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)
double deltaPhi(double phi1, double phi2)
std::vector< size_type > Keys
bool check_mjj750_Pt40_DEta3p5
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
TH1F * getTH1F(void) const
HLTConfigProvider hltConfig_
virtual bool isTriggerObjectFound(std::string objectName)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
virtual bool isHLTPathAccepted(std::string pathName)
edm::InputTag triggerResultsLabel_
volatile std::atomic< bool > shutdown_flag false
TH2F * getTH2F(void) const
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
edm::Handle< edm::TriggerResults > triggerResults_
virtual bool isEndCap(double eta)