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(
"FourVectorHLTOffline") <<
"TriggerResults not found, "
134 edm::LogInfo(
"CaloMETHLTOfflineSource") <<
"TriggerResults::HLT not found, "
135 "automatically select events";
144 edm::LogInfo(
"FourVectorHLTOffline") <<
"TriggerEvent not found, "
150 if(
debug_)
cout<<
"DEBUG-1: Trigger information"<<endl;
158 if(!ValidPFMET_)
return;
162 if(!ValidPFJet_)
return;
164 if(!
metSrc.isValid())
return;
165 if(!
jetSrc.isValid())
return;
168 if(
jets.size()<=0)
return;
169 if(mets.size()<=0)
return;
171 if(
debug_)
cout<<
"DEBUG-2: AOD Information"<<endl;
248 for(
unsigned int ijet1=0; ijet1<
jets.size(); ijet1++){
250 if(
jets[ijet1].neutralEmEnergyFraction()>0.99)
continue;
251 for(
unsigned int ijet2=ijet1+1; ijet2<
jets.size(); ijet2++){
253 if(
jets[ijet2].neutralEmEnergyFraction()>0.99)
continue;
311 if(
debug_)
cout<<
"DEBUG-4-0: Path loops"<<endl;
318 if(
debug_)
cout<<
"DEBUG-4-1: Path is accepted. Now we are looking for "<<
v->getLabel()<<
" module."<<endl;
323 if(hltIndex >=
triggerObj_->sizeFilters())
continue;
325 if(
debug_)
cout<<
"DEBUG-4-2: HLT module "<<
v->getLabel()<<
" exists"<<endl;
327 trigger::Keys::const_iterator kj = khlt.begin();
328 for(; kj != khlt.end(); kj+=2){
390 v->getMEhisto_NumberOfMatches()->Fill(1);
394 v->getMEhisto_NumberOfMatches()->Fill(0);
404 if(
debug_)
cout<<
"DEBUG-9: Loop for rate approximation: "<<
v->getPath()<<endl;
415 if(hltIndex >=
triggerObj_->sizeFilters())
continue;
417 trigger::Keys::const_iterator kj = khlt.begin();
418 for(; kj != khlt.end(); kj+=2){
506 LogDebug(
"HLTInclusiveVBFSource") <<
"HLTConfigProvider failed to initialize.";
510 for(
unsigned int i=0;
i!=numberOfPaths; ++
i){
511 bool numFound =
false;
514 unsigned int usedPrescale = 1;
515 unsigned int objectType = 0;
518 if(
pathname.find(
"HLT_Di") == std::string::npos)
continue;
519 if(
pathname.find(
"Jet") == std::string::npos)
continue;
520 if(
pathname.find(
"MJJ") == std::string::npos)
continue;
521 if(
pathname.find(
"VBF_v") == std::string::npos)
continue;
528 triggerType =
"DiJet_Trigger";
532 for (
unsigned int i=0;
i!=numberOfPaths; ++
i) {
534 if(HLTname ==
pathname)numFound =
true;
537 if(numFound==
false)
continue;
539 std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
540 for(; numpathmodule!= numpathmodules.end(); ++numpathmodule){
552 if(objectType == 0 || numFound==
false)
continue;
565 if(
debug_)
cout<<
"Storing: "<<
v->getPath()<<
", Prescale = "<<
v->getprescaleUsed()<<endl;
588 RECO_deltaEta_DiJet = dbe->
bookFloat(
"RECO_deltaEta_DiJet");
589 RECO_deltaPhi_DiJet = dbe->
bookFloat(
"RECO_deltaPhi_DiJet");
590 RECO_invMass_DiJet = dbe->
bookFloat(
"RECO_invMass_DiJet");
591 HLT_deltaEta_DiJet = dbe->
bookFloat(
"HLT_deltaEta_DiJet");
592 HLT_deltaPhi_DiJet = dbe->
bookFloat(
"HLT_deltaPhi_DiJet ");
593 HLT_invMass_DiJet = dbe->
bookFloat(
"HLT_invMass_DiJet");
594 RECO_deltaEta_DiJet_Match = dbe->
bookFloat(
"RECO_deltaEta_DiJet_Match");
595 RECO_deltaPhi_DiJet_Match = dbe->
bookFloat(
"RECO_deltaPhi_DiJet_Match");
596 RECO_invMass_DiJet_Match = dbe->
bookFloat(
"RECO_invMass_DiJet_Match");
597 RECOHLT_deltaEta = dbe->
bookFloat(
"RECOHLT_deltaEta");
598 RECOHLT_deltaPhi = dbe->
bookFloat(
"RECOHLT_deltaPhi ");
599 RECOHLT_invMass = dbe->
bookFloat(
"RECOHLT_invMass");
600 NumberOfMatches = dbe->
bookFloat(
"NumberOfMatches");
601 NumberOfEvents = dbe->
bookFloat(
"NumberOfEvents");
608 histoname = labelname+
"_RECO_deltaEta_DiJet";
609 title = labelname+
"_RECO_deltaEta_DiJet "+trigPath;
610 RECO_deltaEta_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
611 RECO_deltaEta_DiJet->
getTH1F();
614 histoname = labelname+
"_RECO_deltaPhi_DiJet";
615 title = labelname+
"_RECO_deltaPhi_DiJet "+trigPath;
616 RECO_deltaPhi_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
617 RECO_deltaPhi_DiJet->
getTH1F();
620 histoname = labelname+
"_RECO_invMass_DiJet";
621 title = labelname+
"_RECO_invMass_DiJet "+trigPath;
622 RECO_invMass_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
626 histoname = labelname+
"_HLT_deltaEta_DiJet";
627 title = labelname+
"_HLT_deltaEta_DiJet "+trigPath;
628 HLT_deltaEta_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
632 histoname = labelname+
"_HLT_deltaPhi_DiJet";
633 title = labelname+
"_HLT_deltaPhi_DiJet "+trigPath;
634 HLT_deltaPhi_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
638 histoname = labelname+
"_HLT_invMass_DiJet";
639 title = labelname+
"_HLT_invMass_DiJet "+trigPath;
640 HLT_invMass_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
644 histoname = labelname+
"_RECO_deltaEta_DiJet_Match";
645 title = labelname+
"_RECO_deltaEta_DiJet_Match "+trigPath;
646 RECO_deltaEta_DiJet_Match = dbe->
book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
647 RECO_deltaEta_DiJet_Match->
getTH1F();
650 histoname = labelname+
"_RECO_deltaPhi_DiJet_Match";
651 title = labelname+
"_RECO_deltaPhi_DiJet_Match "+trigPath;
652 RECO_deltaPhi_DiJet_Match = dbe->
book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
653 RECO_deltaPhi_DiJet_Match->
getTH1F();
656 histoname = labelname+
"_RECO_invMass_DiJet_Match";
657 title = labelname+
"_RECO_invMass_DiJet_Match "+trigPath;
658 RECO_invMass_DiJet_Match = dbe->
book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
659 RECO_invMass_DiJet_Match->
getTH1F();
662 histoname = labelname+
"_RECOHLT_deltaEta";
663 title = labelname+
"_RECOHLT_deltaEta "+trigPath;
664 RECOHLT_deltaEta = dbe->
book2D(histoname.c_str(),title.c_str(),50,-10.,10.,50,-10.,10.);
668 histoname = labelname+
"_RECOHLT_deltaPhi";
669 title = labelname+
"_RECOHLT_deltaPhi "+trigPath;
670 RECOHLT_deltaPhi = dbe->
book2D(histoname.c_str(),title.c_str(),35,-3.5,3.5,35,-3.5,3.5);
674 histoname = labelname+
"_RECOHLT_invMass";
675 title = labelname+
"_RECOHLT_invMass "+trigPath;
676 RECOHLT_invMass = dbe->
book2D(histoname.c_str(),title.c_str(),100,500.,2000.,100,500.,2000.);
680 histoname = labelname+
"_NumberOfMatches ";
681 title = labelname+
"_NumberOfMatches "+trigPath;
682 NumberOfMatches = dbe->
book1D(histoname.c_str(),title.c_str(),2,0.,2.);
686 histoname = labelname+
"_NumberOfEvents";
687 title = labelname+
"_NumberOfEvents "+trigPath;
688 NumberOfEvents = dbe->
book1D(histoname.c_str(),title.c_str(),10,0.,10.);
699 RECO_deltaEta_DiJet_Match,
700 RECO_deltaPhi_DiJet_Match,
701 RECO_invMass_DiJet_Match,
737 if (fabs(eta)<=1.3) output=
true;
743 if (fabs(eta)<=3.0 && fabs(eta)>1.3) output=
true;
749 if (fabs(eta)>3.0) output=
true;
780 edm::LogInfo(
"HLTInclusiveVBFSource") <<
"no index "<< index <<
" of that name ";
783 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
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken
void rmdir(const std::string &fullpath)
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
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
MonitorElement * bookFloat(const char *name)
Book float.
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)
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
void setVerbose(unsigned level)
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
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
void setCurrentFolder(const std::string &fullpath)
edm::Handle< edm::TriggerResults > triggerResults_
virtual bool isEndCap(double eta)