1 #ifndef TRIGRESRATEMON_H
2 #define TRIGRESRATEMON_H
334 void setPaths (
const std::vector<std::string>& inputPaths){
336 for (std::vector<std::string>::const_iterator iPath =
pathNames.begin();
344 std::map<std::string, unsigned int>::iterator iCounts;
364 std::map<std::string, unsigned int>::const_iterator iCounts;
369 <<
" " << iCounts->first
370 <<
" " << iCounts->second
379 fillXsecPlot( myXsecPlot, currentInstLumi*referenceXSec, secondsPerLS);
385 for (
unsigned iPath = 0;
397 TString thisName = thisPathName.c_str();
398 if ( thisName.Contains(
"L1") || thisName.Contains(
"L2") ){
404 if (currentInstLumi > 0) {
405 xsec = thisPathCounts / (currentInstLumi*secondsPerLS);
406 }
else if ( secondsPerLS > 0) {
414 myXsecPlot->
Fill(iPath, xsec);
423 TH1F* tempRawCounts = myRawCountsPlot->
getTH1F();
424 int binNumber = tempRawCounts->GetXaxis()->FindBin(pathName.c_str());
426 tempRawCounts->Fill(binNumber);
433 for (
unsigned i=0;
i < inputPaths.size();
i++) {
440 TString pNameTS (candidateForRemoval);
441 if ( pNameTS.Contains(maskSubString)){
451 for ( std::set<std::string>::const_iterator iMask =
maskedPaths.begin();
456 std::cout <<
"======DONE PRINTING=====" << std::endl;
674 PathInfo(
std::string denomPathName,
std::string pathName,
std::string l1pathName,
int l1ModuleIndex,
std::string filterName,
std::string processName,
size_t type,
float ptmin,
float ptmax,
float hltThreshold,
float l1Threshold):
732 float ptmin,
float ptmax
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
std::vector< unsigned > rawCountsPerPD
std::vector< std::pair< std::string, float > > fGroupL1TempCountPair
edm::InputTag triggerResultsLabel_
double normalizedChi2Cut_
int getThresholdFromName(const std::string &pathname)
unsigned int nBinsOneOverEt_
const std::string & getDenomPath(void) const
std::vector< std::string > pathNames
MonitorElement * getNOnOffUMHisto()
std::string pathsSummaryFilterCountsFolder_
TrigResRateMon(const edm::ParameterSet &)
HLTConfigProvider hltConfig_
edm::Handle< trigger::TriggerEvent > fTriggerObj
std::vector< std::string > fGroupName
MonitorElement * getFiltersHisto()
float getL1Threshold() const
void countHLTGroupBXHitsEndLumiBlock(const int &lumi)
void fillHltMatrix(const edm::TriggerNames &triggerNames, const edm::Event &iEvent, const edm::EventSetup &iSetup)
std::vector< std::string > testPaths_
std::vector< std::pair< std::string, float > > fPathTempCountPair
const std::string getLabel(void) const
std::string xsecPerPathME_Name
std::string countsPerPathME_Name
void setPaths(const std::vector< std::string > &inputPaths)
MonitorElement * getNL1OffUMHisto()
std::vector< std::pair< std::string, unsigned int > > filtersAndIndices
void incrementCountsForPath(std::string targetPath, unsigned preScale)
std::vector< unsigned > finalCountsPerPath
bool operator!=(const std::string &v)
bool operator==(const std::string &v)
MonitorElement * getOffEtOnOffHisto()
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
MonitorElement * offDROnOff_
MonitorElement * ME_HLTAll_LS
void setFilterHistos(MonitorElement *const filters)
MonitorElement * NOnOffUM_
MonitorElement * filters_
std::string fCustomBXPath
MonitorElement * meAverageLumiPerLS
MonitorElement * l1Etavsl1PhiL1OnUM_
MonitorElement * onOneOverEtOn_
MonitorElement * getOffDRL1OffHisto()
edm::InputTag recHitsEBTag_
double averageInstLumi3LS
MonitorElement * scalersSelect
bool hasL1Passed(const std::string &pathname, const edm::TriggerNames &triggerNames)
MonitorElement * offEtavsoffPhiOff_
MonitorElement * getOffEtaVsOffPhiL1OffHisto()
MonitorElement * getL1EtL1OnHisto()
void countHLTGroupHitsEndLumiBlock(const int &lumi)
PathInfoCollection hltPaths_
void fillXsecPlot(MonitorElement *myXsecPlot, double currentInstLumi, double secondsPerLS, double referenceXSec)
std::vector< MonitorElement * > v_ME_HLTAll_LS
std::vector< MonitorElement * > v_ME_Xsec
MonitorElement * l1Etavsl1PhiL1On_
std::string pathsSummaryHLTPathsPerLSFolder_
MonitorElement * NL1OffUM_
double dRMaxElectronMuon_
void setupHltMatrix(const std::string &label, std::vector< std::string > &paths)
const edm::InputTag getTag(void) const
edm::EDGetTokenT< LumiScalersCollection > lumiScalersToken_
MonitorElement * getL1EtL1Histo()
std::vector< unsigned > rawCountsPerPath
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * getOffEtOffHisto()
MonitorElement * l1EtL1On_
MonitorElement * getOnOneOverEtOnHisto()
void countHLTGroupL1HitsEndLumiBlock(const int &lumi)
std::vector< TPRegexp > filters
std::vector< DatasetInfo > primaryDataSetInformation
PathInfoCollection hltPathsDiagonal_
MonitorElement * offEtavsoffPhiOnOffUM_
MonitorElement * l1Etavsl1PhiL1_
void addLumiToAverage(double lumi)
const std::string & getProcess(void) const
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
MonitorElement * getOffEtaVsOffPhiOnOffUMHisto()
MonitorElement * getNL1OnHisto()
std::vector< std::string > specialPaths_
void clearCountsPerPath()
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)
std::string scaledXsecPerPathME_Name
MonitorElement * getOffEtL1OffHisto()
MonitorElement * getNOffHisto()
const std::string & getPath(void) const
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * getOffEtL1OffUMHisto()
std::string pathsSummaryFilterEfficiencyFolder_
bool foundReferenceTrigger_
std::string pathsSummaryStreamsFolder_
MonitorElement * getOffEtaVsOffPhiL1OffUMHisto()
void setupStreamMatrix(const std::string &label, std::vector< std::string > &paths)
std::vector< std::pair< std::string, float > > fGroupTempCountPair
MonitorElement * offEtOff_
std::vector< MonitorElement * > v_ME_HLTPassPass_Normalized
edm::InputTag recHitsEETag_
void fillRawCountsForPath(MonitorElement *myRawCountsPlot, std::string pathName)
MonitorElement * getL1EtaVsL1PhiL1OnHisto()
void setLabel(std::string labelName)
const int getL1ModuleIndex(void) const
const std::string & getl1Path(void) const
std::map< std::string, unsigned int > countsPerPath
std::set< std::string > testPaths
void countHLTPathHitsEndLumiBlock(const int &lumi)
MonitorElement * getL1EtaVsL1PhiL1OnUMHisto()
std::vector< MonitorElement * > v_ME_HLTPassPass
std::vector< MonitorElement * > v_ME_Total_BX
void filltestHisto(const int &lumi)
std::vector< MonitorElement * > v_ME_CountsPerLS
edm::EDGetTokenT< edm::TriggerResults > triggerResultsTokenFU_
MonitorElement * ME_HLT_BX
edm::InputTag triggerSummaryLabel_
MonitorElement * getOffDROnOffHisto()
unsigned int referenceBX_
std::string referenceTrigName_
MonitorElement * meXsecPerTestPath
unsigned referenceTrigIndex_
std::vector< MonitorElement * > v_ME_Total_BX_Norm
std::vector< std::vector< uint > > triggerFilterIndices_
MonitorElement * getOffEtOnOffUMHisto()
std::string pathsSummaryFolder_
MonitorElement * getOffEtaVsOffPhiOnOffHisto()
std::string testPathsFolder_
MonitorElement * meCountsDroppedPerLS
MonitorElement * getOnEtOnHisto()
void fillXsecPerDataset(const int &lumi)
MonitorElement * getNL1OnUMHisto()
void findReferenceTriggerIndex()
MonitorElement * getL1EtaVsL1PhiL1Histo()
std::string pathsIndividualHLTPathsPerLSFolder_
MonitorElement * getL1DROnL1Histo()
edm::Handle< edm::TriggerResults > triggerResults_
MonitorElement * offEtOnOffUM_
MonitorElement * meXsecStreamPerLS
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 beginRun(const edm::Run &run, const edm::EventSetup &c)
std::string referenceTrigInput_
MonitorElement * meDiagnostic
TH1F * getTH1F(void) const
MonitorElement * l1DRL1On_
std::string ratePerLSME_Name
MonitorElement * getNL1OffHisto()
MonitorElement * offEtOnOff_
MonitorElement * getNL1Histo()
std::vector< MonitorElement * > v_ME_XsecPerLS
MonitorElement * getL1EtL1OnUMHisto()
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void normalizeHLTMatrix()
std::vector< PathInfo >::iterator find(std::string pathName)
MonitorElement * offEtL1Off_
MonitorElement * getOnEtaVsOnPhiOnHisto()
MonitorElement * offDRL1Off_
std::string pathsSummaryHLTCorrelationsFolder_
MonitorElement * onEtavsonPhiOn_
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
void clearCountsPerPath()
void printCountsPerPathThisLumi()
MonitorElement * l1EtL1OnUM_
std::vector< std::string > maskedPaths_
MonitorElement * getOffEtaVsOffPhiOffHisto()
MonitorElement * meCountsStreamPerLS
MonitorElement * offEtavsoffPhiOnOff_
std::string denomPathName_
std::vector< MonitorElement * > v_ME_HLTPass_Normalized_Any
float getHltThreshold() const
MonitorElement * getNOnOffHisto()
void setMaskedPaths(const std::vector< std::string > &inputPaths)
int64_t TotalDroppedCounts
std::string muonRecoCollectionName_
MonitorElement * offEtavsoffPhiL1OffUM_
MonitorElement * offEtavsoffPhiL1Off_
void incrementCountsForPath(std::string targetPath)
std::set< std::string > maskedPaths
std::string pathsSummaryHLTPathsPerBXFolder_
void fillXsecPlot(MonitorElement *myXsecPlot, double currentInstLumi, double secondsPerLS)
int getTriggerTypeParsePathName(const std::string &pathname)
std::vector< std::vector< std::string > > triggerFilters_
const int getObjectType(void) const
void printCountsPerPath() const
std::vector< std::pair< std::string, std::vector< int > > > fPathBxTempCountPair
MonitorElement * NL1OnUM_
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * ME_HLT_CUSTOM_BX
std::string rawCountsPerPathME_Name
MonitorElement * meCountsPassPerLS
const std::string getL1ConditionModuleName(const std::string &pathname)
unsigned referenceTrigCountsPS_
MonitorElement * getNOnHisto()
void fillCountsPerPath(const edm::Event &iEvent, const edm::EventSetup &iSetup)
MonitorElement * offEtL1OffUM_
PathInfo(std::string denomPathName, std::string pathName, std::string l1pathName, int l1ModuleIndex, std::string filterName, std::string processName, size_t type, float ptmin, float ptmax, float hltThreshold, float l1Threshold)