1 #ifndef FOURVECTORHLTONLINE_H
2 #define FOURVECTORHLTONLINE_H
72 typedef std::multimap<float,int>
fimmap ;
73 typedef std::set<fimmap , std::less<fimmap> >
mmset;
492 float ptmin,
float ptmax
590 virtual void setPath(FourVectorHLTOnline::PathInfoCollection::iterator
v) = 0;
607 void setLimits(
float etaMax,
float etMin,
float drMatch)
617 void setPath(FourVectorHLTOnline::PathInfoCollection::iterator
v) {
v_ =
v; }
666 FourVectorHLTOnline::PathInfoCollection::iterator
v_;
676 for(std::vector<int>::const_iterator it = triggerType_.begin(); it != triggerType_.end(); ++it)
679 if(t == *it) { rc =
true;
break; }
695 for(std::vector<int>::const_iterator it = l1triggerType_.begin(); it != l1triggerType_.end(); ++it)
698 if(fabs(t) == fabs(*it)) { rc =
true;
break; }
711 if ( l1Index >= fv->
fTriggerObj->sizeFilters() )
return;
714 unsigned int NL1OffUM=0;
719 bool l1accept = l1k.size() > 0;
721 if(!l1accept)
return;
723 trigger::Vids::const_iterator idtypeiter = idtype.begin();
725 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
728 if(isL1TriggerType(*idtypeiter))
733 if (fabs(l1FV.
eta()) <= EtaMax_ && l1FV.
pt() >= EtMin_)
738 v_->getL1EtL1Histo()->Fill(l1FV.
pt());
739 v_->getL1EtaVsL1PhiL1Histo()->Fill(l1FV.
eta(), l1FV.
phi());
753 if(NL1 > 0) v_->getNL1Histo()->Fill(NL1);
754 if(NL1OffUM > 0) v_->getNL1OffUMHisto()->Fill(NL1OffUM);
773 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
777 if (fabs(onlineFV.
eta()) <= EtaMax_ && onlineFV.
pt() >= EtMin_)
782 v_->getOnEtOnHisto()->Fill(onlineFV.
pt());
783 v_->getOnOneOverEtOnHisto()->Fill(1./onlineFV.
pt());
784 v_->getOnEtaVsOnPhiOnHisto()->Fill(onlineFV.
eta(), onlineFV.
phi());
793 matchOnlineL1(onlineFV,l1Index, fv, NOn);
797 if(NOn>0) v_->getNOnHisto()->Fill(NOn);
805 if ( l1Index >= fv->
fTriggerObj->sizeFilters() )
return;
807 unsigned int NOnL1UM=0;
815 trigger::Vids::const_iterator idtypeiter = idtype.begin();
816 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki )
821 if(isL1TriggerType(*idtypeiter))
826 if ( fabs(l1FV.
eta()) <= EtaMax_ && l1FV.
pt() >= EtMin_ )
833 v_->getL1EtL1OnUMHisto()->Fill(l1FV.
pt());
834 v_->getL1EtaVsL1PhiL1OnUMHisto()->Fill(l1FV.
eta(),l1FV.
phi());
844 OnL1DRMatchMap.insert(std::pair<float,int>(dR,j));
857 if(! OnL1DRMatchMap.empty()) OnL1DRMatchSet.insert(OnL1DRMatchMap);
868 unsigned int NOnL1=0;
871 if(OnL1DRMatchSet.size() > 1) {
873 LogDebug(
"FourVectorHLTOnline") <<
" Cleaning L1On mmset" << std::endl;
878 for ( mmset::iterator setIter = OnL1DRMatchSet.begin( ); setIter != OnL1DRMatchSet.end( ); setIter++ )
881 fimmap tempMap = *setIter;
883 fimmap::iterator it = tempMap.begin();
884 int i = (*it).second ;
885 float dR = (*it).first;
886 v_->getL1DROnL1Histo()->Fill(dR);
888 if (dR > DRMatch_)
continue;
890 trigger::Keys::const_iterator l1ki = l1k.begin();
894 v_->getL1EtL1OnHisto()->Fill(toc[*l1ki].
pt());
895 v_->getL1EtaVsL1PhiL1OnHisto()->Fill(toc[*l1ki].
eta(),toc[*l1ki].
phi());
899 v_->getNL1OnHisto()->Fill(NOnL1);
908 if ( l1Index >= fv->
fTriggerObj->sizeFilters() )
return;
909 fillOnL1Match(l1Index, fv);
918 L1OffDRMatchSet.clear();
919 L1MCDRMatchSet.clear();
920 OnOffDRMatchSet.clear();
921 OnMCDRMatchSet.clear();
922 OnL1DRMatchSet.clear();
923 OffMCDRMatchSet.clear();
edm::Handle< trigger::TriggerEvent > fTriggerObj
PathInfoCollection hltPathsDiagonal_
edm::EDGetTokenT< edm::TriggerResults > jetProbabilityBJetTagsToken_
const std::string getL1ConditionModuleName(const std::string &pathname)
bool operator==(const std::string &v)
edm::Handle< T > offColl_
MonitorElement * getNL1Histo()
MonitorElement * getOnOneOverEtOnHisto()
MonitorElement * offEtavsoffPhiL1Off_
edm::InputTag triggerSummaryLabel_
std::string pathsSummaryHLTPathsPerBXFolder_
virtual void monitorOnline(const int hltIndex, const int l1Index, FourVectorHLTOnline *fv)=0
MonitorElement * getOffEtaVsOffPhiOnOffHisto()
MonitorElement * getOffEtOnOffUMHisto()
MonitorElement * offDROnOff_
MonitorElement * scalersSelect
std::vector< std::pair< std::string, std::vector< int > > > fPathBxTempCountPair
virtual void fillOnlineMatch(const int l1Index, FourVectorHLTOnline *fv)=0
bool isL1TriggerType(int t)
std::string pathsSummaryFolder_
MonitorElement * getL1EtL1Histo()
const std::string getPath(void) const
void setupHltMatrix(std::string label, std::vector< std::string > paths)
bool isTriggerType(int t)
MonitorElement * l1EtL1OnUM_
void setPath(FourVectorHLTOnline::PathInfoCollection::iterator v)
MonitorElement * getL1DROnL1Histo()
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken_
bool operator!=(const std::string &v)
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
MonitorElement * getOnEtaVsOnPhiOnHisto()
void countHLTGroupBXHitsEndLumiBlock(const int &lumi)
void fillHltMatrix(const edm::TriggerNames &triggerNames)
void matchOnlineL1(const trigger::TriggerObject &onlineFV, const int &l1Index, FourVectorHLTOnline *fv, const int &NOn)
std::vector< int > l1triggerType_
std::multimap< float, int > fimmap
edm::Handle< edm::TriggerResults > triggerResults_
void countHLTPathHitsEndLumiBlock(const int &lumi)
std::vector< int > triggerType_
double deltaR(const T1 &t1, const T2 &t2)
std::vector< std::pair< std::string, int > > fPathTempCountPair
MonitorElement * getOffDROnOffHisto()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void fillOnlineMatch(const int l1Index, FourVectorHLTOnline *fv)
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
std::vector< std::vector< uint > > triggerFilterIndices_
MonitorElement * l1EtL1On_
std::vector< TPRegexp > filters
std::string pathsIndividualHLTPathsPerLSFolder_
virtual bool isTriggerType(int t)=0
void setL1TriggerType(const std::vector< int > &trigType)
PathInfoCollection hltPaths_
std::set< fimmap, std::less< fimmap > > mmset
MonitorElement * getOffEtaVsOffPhiL1OffUMHisto()
Single trigger physics object (e.g., an isolated muon)
MonitorElement * getOffEtOnOffHisto()
std::string pathsSummaryHLTPathsPerLSFolder_
MonitorElement * getNOnHisto()
unsigned int referenceBX_
MonitorElement * offEtL1Off_
MonitorElement * getOffEtaVsOffPhiOnOffUMHisto()
FourVectorHLTOnline::PathInfoCollection::iterator v_
edm::EDGetTokenT< edm::TriggerResults > softMuonBJetTagsToken_
MonitorElement * getNOnOffHisto()
MonitorElement * getOffDRL1OffHisto()
void pushTriggerType(int trigType)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::string pathsSummaryFilterEfficiencyFolder_
edm::EDGetTokenT< edm::TriggerResults > metToken_
void setLimits(float etaMax, float etMin, float drMatch)
void monitorOnline(const int hltIndex, const int l1Index, FourVectorHLTOnline *fv)
MonitorElement * filters_
std::vector< std::pair< std::string, unsigned int > > filtersAndIndices
std::vector< std::pair< std::string, int > > fGroupTempCountPair
MonitorElement * getL1EtL1OnUMHisto()
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * l1DRL1On_
MonitorElement * onEtavsonPhiOn_
edm::EDGetTokenT< edm::TriggerResults > muonRecoCollectionNameToken_
MonitorElement * getNOnOffUMHisto()
edm::EDGetTokenT< edm::TriggerResults > triggerResultsTokenFU_
MonitorElement * offEtOnOffUM_
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
const std::string getProcess(void) const
virtual void matchOnlineL1(const trigger::TriggerObject &onlineFV, const int &l1Index, FourVectorHLTOnline *fv, const int &NOn)=0
MonitorElement * getL1EtaVsL1PhiL1Histo()
std::vector< MonitorElement * > v_ME_HLTAll_LS_
MonitorElement * ME_HLT_BX_
std::vector< std::vector< std::string > > triggerFilters_
MonitorElement * offEtavsoffPhiL1OffUM_
MonitorElement * ME_HLT_CUSTOM_BX_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryLabelFUToken_
MonitorElement * getFiltersHisto()
unsigned int nBinsOneOverEt_
edm::EDGetTokenT< edm::TriggerResults > gsfElectronsToken_
MonitorElement * getNL1OffUMHisto()
edm::EDGetTokenT< edm::TriggerResults > caloRecoTauProducerToken_
edm::EDGetTokenT< edm::TriggerResults > pixelTracksToken_
MonitorElement * getNL1OffHisto()
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
virtual void clearSets(void)=0
void monitorL1(const int l1Index, FourVectorHLTOnline *fv)
void countHLTGroupL1HitsEndLumiBlock(const int &lumi)
HLTConfigProvider hltConfig_
std::string muonRecoCollectionName_
std::string pathsSummaryFilterCountsFolder_
MonitorElement * ME_HLTAll_LS_
std::vector< PathInfo >::iterator find(std::string pathName)
MonitorElement * NL1OnUM_
std::vector< std::string > specialPaths_
bool hasL1Passed(const std::string &pathname, const edm::TriggerNames &triggerNames)
MonitorElement * getNL1OnUMHisto()
std::vector< size_type > Keys
MonitorElement * getOnEtOnHisto()
const std::string getl1Path(void) const
MonitorElement * getL1EtL1OnHisto()
std::vector< std::string > fGroupName
const edm::InputTag getTag(void) const
MonitorElement * getL1EtaVsL1PhiL1OnUMHisto()
const std::string getDenomPath(void) const
MonitorElement * onOneOverEtOn_
std::string fCustomBXPath
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
const int getObjectType(void) const
virtual void setPath(FourVectorHLTOnline::PathInfoCollection::iterator v)=0
void setFilterHistos(MonitorElement *const filters)
std::vector< std::pair< std::string, int > > fGroupL1TempCountPair
MonitorElement * l1Etavsl1PhiL1_
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
MonitorElement * NL1OffUM_
MonitorElement * NOnOffUM_
FourVectorHLTOnline(const edm::ParameterSet &)
MonitorElement * l1Etavsl1PhiL1On_
void beginRun(const edm::Run &run, const edm::EventSetup &c)
int getTriggerTypeParsePathName(const std::string &pathname)
void setTriggerType(const std::vector< int > &trigType)
std::string denomPathName_
void fillOnL1Match(const int l1Index, FourVectorHLTOnline *fv)
void countHLTGroupHitsEndLumiBlock(const int &lumi)
virtual void monitorL1(const int l1Index, FourVectorHLTOnline *fv)=0
PathInfo(std::string denomPathName, std::string pathName, std::string l1pathName, std::string filterName, std::string processName, size_t type, MonitorElement *NOn, MonitorElement *onEtOn, MonitorElement *onOneOverEtOn, MonitorElement *onEtavsonPhiOn, MonitorElement *NOff, MonitorElement *offEtOff, MonitorElement *offEtavsoffPhiOff, MonitorElement *NL1, MonitorElement *l1EtL1, MonitorElement *l1Etavsl1PhiL1, MonitorElement *NL1On, MonitorElement *l1EtL1On, MonitorElement *l1Etavsl1PhiL1On, MonitorElement *NL1Off, MonitorElement *offEtL1Off, MonitorElement *offEtavsoffPhiL1Off, MonitorElement *NOnOff, MonitorElement *offEtOnOff, MonitorElement *offEtavsoffPhiOnOff, MonitorElement *NL1OnUM, MonitorElement *l1EtL1OnUM, MonitorElement *l1Etavsl1PhiL1OnUM, MonitorElement *NL1OffUM, MonitorElement *offEtL1OffUM, MonitorElement *offEtavsoffPhiL1OffUM, MonitorElement *NOnOffUM, MonitorElement *offEtOnOffUM, MonitorElement *offEtavsoffPhiOnOffUM, MonitorElement *offDRL1Off, MonitorElement *offDROnOff, MonitorElement *l1DRL1On, MonitorElement *filters, float ptmin, float ptmax)
MonitorElement * offEtavsoffPhiOnOffUM_
const std::string getLabel(void) const
MonitorElement * offDRL1Off_
MonitorElement * getOffEtL1OffHisto()
MonitorElement * getOffEtL1OffUMHisto()
MonitorElement * offEtL1OffUM_
void pushL1TriggerType(int trigType)
PathInfo(std::string denomPathName, std::string pathName, std::string l1pathName, std::string filterName, std::string processName, size_t type, float ptmin, float ptmax)
void setReco(edm::Handle< T > offColl)
edm::EDGetTokenT< edm::TriggerResults > iterativeCone5CaloJetsToken_
MonitorElement * getL1EtaVsL1PhiL1OnHisto()
MonitorElement * getNL1OnHisto()
MonitorElement * offEtavsoffPhiOnOff_
MonitorElement * l1Etavsl1PhiL1OnUM_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
MonitorElement * getOffEtaVsOffPhiL1OffHisto()
std::string pathsSummaryHLTCorrelationsFolder_
MonitorElement * offEtOnOff_
edm::InputTag triggerResultsLabel_
void setHistos(MonitorElement *const NOn, MonitorElement *const onEtOn, MonitorElement *const onOneOverEtOn, MonitorElement *const onEtavsonPhiOn, MonitorElement *const NOff, MonitorElement *const offEtOff, MonitorElement *const offEtavsoffPhiOff, MonitorElement *const NL1, MonitorElement *const l1EtL1, MonitorElement *const l1Etavsl1PhiL1, MonitorElement *const NL1On, MonitorElement *const l1EtL1On, MonitorElement *const l1Etavsl1PhiL1On, MonitorElement *const NL1Off, MonitorElement *const offEtL1Off, MonitorElement *const offEtavsoffPhiL1Off, MonitorElement *const NOnOff, MonitorElement *const offEtOnOff, MonitorElement *const offEtavsoffPhiOnOff, MonitorElement *const NL1OnUM, MonitorElement *const l1EtL1OnUM, MonitorElement *const l1Etavsl1PhiL1OnUM, MonitorElement *const NL1OffUM, MonitorElement *const offEtL1OffUM, MonitorElement *const offEtavsoffPhiL1OffUM, MonitorElement *const NOnOffUM, MonitorElement *const offEtOnOffUM, MonitorElement *const offEtavsoffPhiOnOffUM, MonitorElement *const offDRL1Off, MonitorElement *const offDROnOff, MonitorElement *const l1DRL1On)
void setLabel(std::string labelName)
edm::EDGetTokenT< edm::TriggerResults > photonsToken_
void setBJetsFlag(bool flag)