49 LogDebug(
"HLTInclusiveVBFSource") <<
"constructor....";
53 LogDebug(
"HLTInclusiveVBFSource") <<
"unabel to get DQMStore service?";
103 using namespace trigger;
104 using namespace reco;
106 if(
debug_)
cout<<
"DEBUG-0: Start to analyze"<<endl;
118 edm::LogInfo(
"FourVectorHLTOffline") <<
"TriggerResults not found, "
131 edm::LogInfo(
"CaloMETHLTOfflineSource") <<
"TriggerResults::HLT not found, "
132 "automatically select events";
142 edm::LogInfo(
"FourVectorHLTOffline") <<
"TriggerEvent not found, "
148 if(
debug_)
cout<<
"DEBUG-1: Trigger information"<<endl;
156 if(!ValidPFMET_)
return;
160 if(!ValidPFJet_)
return;
162 if(!
metSrc.isValid())
return;
163 if(!
jetSrc.isValid())
return;
166 if(
jets.size()<=0)
return;
167 if(mets.size()<=0)
return;
169 if(
debug_)
cout<<
"DEBUG-2: AOD Information"<<endl;
246 for(
unsigned int ijet1=0; ijet1<
jets.size(); ijet1++){
247 if(
jets[ijet1].neutralHadronEnergyFraction()>0.99)
continue;
248 if(
jets[ijet1].neutralEmEnergyFraction()>0.99)
continue;
249 for(
unsigned int ijet2=ijet1+1; ijet2<
jets.size(); ijet2++){
250 if(
jets[ijet2].neutralHadronEnergyFraction()>0.99)
continue;
251 if(
jets[ijet2].neutralEmEnergyFraction()>0.99)
continue;
309 if(
debug_)
cout<<
"DEBUG-4-0: Path loops"<<endl;
316 if(
debug_)
cout<<
"DEBUG-4-1: Path is accepted. Now we are looking for "<<
v->getLabel()<<
" module."<<endl;
321 if(hltIndex >=
triggerObj_->sizeFilters())
continue;
323 if(
debug_)
cout<<
"DEBUG-4-2: HLT module "<<
v->getLabel()<<
" exists"<<endl;
325 trigger::Keys::const_iterator kj = khlt.begin();
326 for(; kj != khlt.end(); kj+=2){
388 v->getMEhisto_NumberOfMatches()->Fill(1);
392 v->getMEhisto_NumberOfMatches()->Fill(0);
402 if(
debug_)
cout<<
"DEBUG-9: Loop for rate approximation: "<<
v->getPath()<<endl;
413 if(hltIndex >=
triggerObj_->sizeFilters())
continue;
415 trigger::Keys::const_iterator kj = khlt.begin();
416 for(; kj != khlt.end(); kj+=2){
504 LogDebug(
"HLTInclusiveVBFSource") <<
"HLTConfigProvider failed to initialize.";
508 for(
unsigned int i=0;
i!=numberOfPaths; ++
i){
509 bool numFound =
false;
512 unsigned int usedPrescale = 1;
513 unsigned int objectType = 0;
516 if(
pathname.find(
"HLT_Di") == std::string::npos)
continue;
517 if(
pathname.find(
"Jet") == std::string::npos)
continue;
518 if(
pathname.find(
"MJJ") == std::string::npos)
continue;
519 if(
pathname.find(
"VBF_v") == std::string::npos)
continue;
526 triggerType =
"DiJet_Trigger";
530 for (
unsigned int i=0;
i!=numberOfPaths; ++
i) {
532 if(HLTname ==
pathname)numFound =
true;
535 if(numFound==
false)
continue;
537 std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
538 for(; numpathmodule!= numpathmodules.end(); ++numpathmodule){
550 if(objectType == 0 || numFound==
false)
continue;
563 if(
debug_)
cout<<
"Storing: "<<
v->getPath()<<
", Prescale = "<<
v->getprescaleUsed()<<endl;
586 RECO_deltaEta_DiJet = dbe->
bookFloat(
"RECO_deltaEta_DiJet");
587 RECO_deltaPhi_DiJet = dbe->
bookFloat(
"RECO_deltaPhi_DiJet");
588 RECO_invMass_DiJet = dbe->
bookFloat(
"RECO_invMass_DiJet");
589 HLT_deltaEta_DiJet = dbe->
bookFloat(
"HLT_deltaEta_DiJet");
590 HLT_deltaPhi_DiJet = dbe->
bookFloat(
"HLT_deltaPhi_DiJet ");
591 HLT_invMass_DiJet = dbe->
bookFloat(
"HLT_invMass_DiJet");
592 RECO_deltaEta_DiJet_Match = dbe->
bookFloat(
"RECO_deltaEta_DiJet_Match");
593 RECO_deltaPhi_DiJet_Match = dbe->
bookFloat(
"RECO_deltaPhi_DiJet_Match");
594 RECO_invMass_DiJet_Match = dbe->
bookFloat(
"RECO_invMass_DiJet_Match");
595 RECOHLT_deltaEta = dbe->
bookFloat(
"RECOHLT_deltaEta");
596 RECOHLT_deltaPhi = dbe->
bookFloat(
"RECOHLT_deltaPhi ");
597 RECOHLT_invMass = dbe->
bookFloat(
"RECOHLT_invMass");
598 NumberOfMatches = dbe->
bookFloat(
"NumberOfMatches");
599 NumberOfEvents = dbe->
bookFloat(
"NumberOfEvents");
606 histoname = labelname+
"_RECO_deltaEta_DiJet";
607 title = labelname+
"_RECO_deltaEta_DiJet "+trigPath;
608 RECO_deltaEta_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
609 RECO_deltaEta_DiJet->
getTH1F();
612 histoname = labelname+
"_RECO_deltaPhi_DiJet";
613 title = labelname+
"_RECO_deltaPhi_DiJet "+trigPath;
614 RECO_deltaPhi_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
615 RECO_deltaPhi_DiJet->
getTH1F();
618 histoname = labelname+
"_RECO_invMass_DiJet";
619 title = labelname+
"_RECO_invMass_DiJet "+trigPath;
620 RECO_invMass_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
624 histoname = labelname+
"_HLT_deltaEta_DiJet";
625 title = labelname+
"_HLT_deltaEta_DiJet "+trigPath;
626 HLT_deltaEta_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
630 histoname = labelname+
"_HLT_deltaPhi_DiJet";
631 title = labelname+
"_HLT_deltaPhi_DiJet "+trigPath;
632 HLT_deltaPhi_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
636 histoname = labelname+
"_HLT_invMass_DiJet";
637 title = labelname+
"_HLT_invMass_DiJet "+trigPath;
638 HLT_invMass_DiJet = dbe->
book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
642 histoname = labelname+
"_RECO_deltaEta_DiJet_Match";
643 title = labelname+
"_RECO_deltaEta_DiJet_Match "+trigPath;
644 RECO_deltaEta_DiJet_Match = dbe->
book1D(histoname.c_str(),title.c_str(),50,-10.,10.);
645 RECO_deltaEta_DiJet_Match->
getTH1F();
648 histoname = labelname+
"_RECO_deltaPhi_DiJet_Match";
649 title = labelname+
"_RECO_deltaPhi_DiJet_Match "+trigPath;
650 RECO_deltaPhi_DiJet_Match = dbe->
book1D(histoname.c_str(),title.c_str(),35,-3.5,3.5);
651 RECO_deltaPhi_DiJet_Match->
getTH1F();
654 histoname = labelname+
"_RECO_invMass_DiJet_Match";
655 title = labelname+
"_RECO_invMass_DiJet_Match "+trigPath;
656 RECO_invMass_DiJet_Match = dbe->
book1D(histoname.c_str(),title.c_str(),100,500.,2000.);
657 RECO_invMass_DiJet_Match->
getTH1F();
660 histoname = labelname+
"_RECOHLT_deltaEta";
661 title = labelname+
"_RECOHLT_deltaEta "+trigPath;
662 RECOHLT_deltaEta = dbe->
book2D(histoname.c_str(),title.c_str(),50,-10.,10.,50,-10.,10.);
666 histoname = labelname+
"_RECOHLT_deltaPhi";
667 title = labelname+
"_RECOHLT_deltaPhi "+trigPath;
668 RECOHLT_deltaPhi = dbe->
book2D(histoname.c_str(),title.c_str(),35,-3.5,3.5,35,-3.5,3.5);
672 histoname = labelname+
"_RECOHLT_invMass";
673 title = labelname+
"_RECOHLT_invMass "+trigPath;
674 RECOHLT_invMass = dbe->
book2D(histoname.c_str(),title.c_str(),100,500.,2000.,100,500.,2000.);
678 histoname = labelname+
"_NumberOfMatches ";
679 title = labelname+
"_NumberOfMatches "+trigPath;
680 NumberOfMatches = dbe->
book1D(histoname.c_str(),title.c_str(),2,0.,2.);
684 histoname = labelname+
"_NumberOfEvents";
685 title = labelname+
"_NumberOfEvents "+trigPath;
686 NumberOfEvents = dbe->
book1D(histoname.c_str(),title.c_str(),10,0.,10.);
697 RECO_deltaEta_DiJet_Match,
698 RECO_deltaPhi_DiJet_Match,
699 RECO_invMass_DiJet_Match,
735 if (fabs(eta)<=1.3) output=
true;
741 if (fabs(eta)<=3.0 && fabs(eta)>1.3) output=
true;
747 if (fabs(eta)>3.0) output=
true;
778 edm::LogInfo(
"HLTInclusiveVBFSource") <<
"no index "<< index <<
" of that name ";
781 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
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.
void rmdir(const std::string &fullpath)
virtual bool isForward(double eta)
PathInfoCollection hltPathsAll_
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
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
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 getByLabel(InputTag const &tag, Handle< PROD > &result) const
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)
edm::InputTag caloMETTag_
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 caloJetsTag_
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.
void setCurrentFolder(const std::string &fullpath)
edm::Handle< edm::TriggerResults > triggerResults_
virtual bool isEndCap(double eta)