CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
FourVectorHLTOnline Class Reference

#include <FourVectorHLTOnline.h>

Inheritance diagram for FourVectorHLTOnline:
edm::EDAnalyzer edm::EDConsumerBase

Classes

class  PathInfo
 
class  PathInfoCollection
 

Public Member Functions

void cleanDRMatchSet (mmset &tempSet)
 Clean DR Match Set. More...
 
 FourVectorHLTOnline (const edm::ParameterSet &)
 
 ~FourVectorHLTOnline ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Public Attributes

edm::Handle
< trigger::TriggerEvent
fTriggerObj
 
PathInfoCollection hltPaths_
 
PathInfoCollection hltPathsDiagonal_
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void countHLTGroupBXHitsEndLumiBlock (const int &lumi)
 
void countHLTGroupHitsEndLumiBlock (const int &lumi)
 
void countHLTGroupL1HitsEndLumiBlock (const int &lumi)
 
void countHLTPathHitsEndLumiBlock (const int &lumi)
 
virtual void endJob ()
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 EndRun. More...
 
void fillHltMatrix (const edm::TriggerNames &triggerNames)
 
const std::string getL1ConditionModuleName (const std::string &pathname)
 
int getTriggerTypeParsePathName (const std::string &pathname)
 
bool hasHLTPassed (const std::string &pathname, const edm::TriggerNames &triggerNames)
 
bool hasL1Passed (const std::string &pathname, const edm::TriggerNames &triggerNames)
 
void setupHltBxPlots ()
 
void setupHltLsPlots ()
 
void setupHltMatrix (std::string label, std::vector< std::string > paths)
 

Private Attributes

double bjetDRMatch_
 
double bjetEtaMax_
 
double bjetEtMin_
 
edm::EDGetTokenT
< edm::TriggerResults
caloRecoTauProducerToken_
 
int currentRun_
 
std::vector< std::pair
< std::string, std::string > > 
custompathnamepairs_
 
DQMStoredbe_
 
std::string dirname_
 
double electronDRMatch_
 
double electronEtaMax_
 
double electronEtMin_
 
std::string fCustomBXPath
 
std::vector< std::pair
< std::string, int > > 
fGroupL1TempCountPair
 
std::vector< std::string > fGroupName
 
std::vector< std::pair
< std::string, std::vector
< std::string > > > 
fGroupNamePathsPair
 
std::vector< std::pair
< std::string, int > > 
fGroupTempCountPair
 
bool fLumiFlag
 
std::vector< std::pair
< std::string, std::vector
< int > > > 
fPathBxTempCountPair
 
std::vector< std::pair
< std::string, int > > 
fPathTempCountPair
 
edm::EDGetTokenT
< edm::TriggerResults
gsfElectronsToken_
 
HLTConfigProvider hltConfig_
 
double htDRMatch_
 
double htEtaMax_
 
double htMin_
 
edm::EDGetTokenT
< edm::TriggerResults
iterativeCone5CaloJetsToken_
 
double jetDRMatch_
 
double jetEtaMax_
 
double jetEtMin_
 
edm::EDGetTokenT
< edm::TriggerResults
jetProbabilityBJetTagsToken_
 
MonitorElementME_HLT_BX_
 
MonitorElementME_HLT_CUSTOM_BX_
 
MonitorElementME_HLTAll_LS_
 
double metDRMatch_
 
double metEtaMax_
 
double metMin_
 
edm::EDGetTokenT
< edm::TriggerResults
metToken_
 
bool monitorDaemon_
 
double muonDRMatch_
 
double muonEtaMax_
 
double muonEtMin_
 
std::string muonRecoCollectionName_
 
edm::EDGetTokenT
< edm::TriggerResults
muonRecoCollectionNameToken_
 
unsigned int nBins_
 
unsigned int nBinsOneOverEt_
 
unsigned int Nbx_
 
int nev_
 
unsigned int nLS_
 
std::string pathsIndividualHLTPathsPerLSFolder_
 
std::string pathsSummaryFilterCountsFolder_
 
std::string pathsSummaryFilterEfficiencyFolder_
 
std::string pathsSummaryFolder_
 
std::string pathsSummaryHLTCorrelationsFolder_
 
std::string pathsSummaryHLTPathsPerBXFolder_
 
std::string pathsSummaryHLTPathsPerLSFolder_
 
double photonDRMatch_
 
double photonEtaMax_
 
double photonEtMin_
 
edm::EDGetTokenT
< edm::TriggerResults
photonsToken_
 
edm::EDGetTokenT
< edm::TriggerResults
pixelTracksToken_
 
bool plotAll_
 
std::string processname_
 
double ptMax_
 
double ptMin_
 
unsigned int referenceBX_
 
bool resetMe_
 
MonitorElementscalersSelect
 
edm::EDGetTokenT
< edm::TriggerResults
softMuonBJetTagsToken_
 
std::vector< std::string > specialPaths_
 
double sumEtMin_
 
double tauDRMatch_
 
double tauEtaMax_
 
double tauEtMin_
 
int theHLTOutputType
 
double trackDRMatch_
 
double trackEtaMax_
 
double trackEtMin_
 
std::vector< std::vector< uint > > triggerFilterIndices_
 
std::vector< std::vector
< std::string > > 
triggerFilters_
 
edm::Handle< edm::TriggerResultstriggerResults_
 
edm::InputTag triggerResultsLabel_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResultsToken_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResultsTokenFU_
 
edm::InputTag triggerSummaryLabel_
 
edm::EDGetTokenT
< trigger::TriggerEvent
triggerSummaryLabelFUToken_
 
edm::EDGetTokenT
< trigger::TriggerEvent
triggerSummaryToken_
 
std::vector< MonitorElement * > v_ME_HLTAll_LS_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: This is a DQM source meant to plot high-level HLT trigger quantities as stored in the HLT results object TriggerResults

Implementation: <Notes on="" implementation>="">

Definition at line 75 of file FourVectorHLTOnline.h.

Constructor & Destructor Documentation

FourVectorHLTOnline::FourVectorHLTOnline ( const edm::ParameterSet iConfig)
explicit

Definition at line 14 of file FourVectorHLTOnline.cc.

References bjetDRMatch_, bjetEtaMax_, bjetEtMin_, DQMStore::book1D(), caloRecoTauProducerToken_, custompathnamepairs_, dbe_, dirname_, electronDRMatch_, electronEtaMax_, electronEtMin_, fCustomBXPath, fLumiFlag, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gsfElectronsToken_, hltPaths_, htDRMatch_, htEtaMax_, htMin_, edm::InputTag::instance(), iterativeCone5CaloJetsToken_, jetDRMatch_, jetEtaMax_, jetEtMin_, jetProbabilityBJetTagsToken_, edm::InputTag::label(), LogDebug, ME_HLT_BX_, ME_HLT_CUSTOM_BX_, ME_HLTAll_LS_, metDRMatch_, metEtaMax_, metMin_, metToken_, muonDRMatch_, muonEtaMax_, muonEtMin_, muonRecoCollectionName_, muonRecoCollectionNameToken_, nBins_, nBinsOneOverEt_, Nbx_, nLS_, NULL, cppFunctionSkipper::operator, hlt_relval-layouts::paths, pathsIndividualHLTPathsPerLSFolder_, pathsSummaryFilterCountsFolder_, pathsSummaryFolder_, pathsSummaryHLTCorrelationsFolder_, pathsSummaryHLTPathsPerBXFolder_, pathsSummaryHLTPathsPerLSFolder_, photonDRMatch_, photonEtaMax_, photonEtMin_, photonsToken_, pixelTracksToken_, plotAll_, processname_, ptMax_, ptMin_, referenceBX_, scalersSelect, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), softMuonBJetTagsToken_, specialPaths_, AlCaHLTBitMon_QueryRunRegistry::string, sumEtMin_, tauDRMatch_, tauEtaMax_, tauEtMin_, trackDRMatch_, trackEtaMax_, trackEtMin_, triggerResultsLabel_, triggerResultsToken_, triggerResultsTokenFU_, triggerSummaryLabel_, triggerSummaryLabelFUToken_, and triggerSummaryToken_.

14  :
15  resetMe_(true), currentRun_(-99)
16 {
17 
18  LogDebug("FourVectorHLTOnline") << "constructor...." ;
19 
21  if ( ! dbe_ ) {
22  LogInfo("FourVectorHLTOnline") << "unabel to get DQMStore service?";
23  }
24  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
25  dbe_->setVerbose(0);
26  }
27 
28  dirname_ = iConfig.getUntrackedParameter("dirname", std::string("HLT/FourVector/"));
29  //dirname_ += iConfig.getParameter<std::string>("@module_label");
30 
31  if (dbe_ != 0 ) {
33  }
34 
35  processname_ = iConfig.getParameter<std::string>("processname");
36  fCustomBXPath = iConfig.getUntrackedParameter<std::string>("customBXPath", std::string("HLT_MinBiasBSC"));
37 
38  referenceBX_ = iConfig.getUntrackedParameter<unsigned int>("referenceBX",51);
39  Nbx_ = iConfig.getUntrackedParameter<unsigned int>("Nbx",3564);
40 
41  // plotting paramters
42  ptMin_ = iConfig.getUntrackedParameter<double>("ptMin",0.);
43  ptMax_ = iConfig.getUntrackedParameter<double>("ptMax",1000.);
44  nBins_ = iConfig.getUntrackedParameter<unsigned int>("Nbins",20);
45  nBinsOneOverEt_ = iConfig.getUntrackedParameter<unsigned int>("NbinsOneOverEt",10000);
46  nLS_ = iConfig.getUntrackedParameter<unsigned int>("NLuminositySegments",10);
47 
48 
49  plotAll_ = iConfig.getUntrackedParameter<bool>("plotAll", false);
50  // this is the list of paths to look at.
51  std::vector<edm::ParameterSet> paths =
52  iConfig.getParameter<std::vector<edm::ParameterSet> >("paths");
53 
54  for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
55 
56  //std::pair<std::string, std::string> custompathnamepair;
57  //custompathnamepair.first =pathconf->getParameter<std::string>("pathname");
58  //custompathnamepair.second = pathconf->getParameter<std::string>("denompathname");
59  //custompathnamepairs_.push_back(custompathnamepair);
60  custompathnamepairs_.push_back(
61  make_pair(
62  pathconf->getParameter<std::string>("pathname"),
63  pathconf->getParameter<std::string>("denompathname")
64  )
65  );
66 
67  }
68 
69  if (hltPaths_.size() > 0)
70  {
71  // book a histogram of scalers
72  scalersSelect = dbe_->book1D("selectedScalers","Selected Scalers", hltPaths_.size(), 0.0, (double)hltPaths_.size());
73 
74  }
75 
76  triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
77  triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
78  muonRecoCollectionName_ = iConfig.getUntrackedParameter("muonRecoCollectionName", std::string("muons"));
79 
80  electronEtaMax_ = iConfig.getUntrackedParameter<double>("electronEtaMax",2.5);
81  electronEtMin_ = iConfig.getUntrackedParameter<double>("electronEtMin",3.0);
82  electronDRMatch_ =iConfig.getUntrackedParameter<double>("electronDRMatch",0.3);
83 
84  muonEtaMax_ = iConfig.getUntrackedParameter<double>("muonEtaMax",2.1);
85  muonEtMin_ = iConfig.getUntrackedParameter<double>("muonEtMin",3.0);
86  muonDRMatch_ =iConfig.getUntrackedParameter<double>("muonDRMatch",0.3);
87 
88  tauEtaMax_ = iConfig.getUntrackedParameter<double>("tauEtaMax",2.5);
89  tauEtMin_ = iConfig.getUntrackedParameter<double>("tauEtMin",3.0);
90  tauDRMatch_ =iConfig.getUntrackedParameter<double>("tauDRMatch",0.3);
91 
92  jetEtaMax_ = iConfig.getUntrackedParameter<double>("jetEtaMax",5.0);
93  jetEtMin_ = iConfig.getUntrackedParameter<double>("jetEtMin",10.0);
94  jetDRMatch_ =iConfig.getUntrackedParameter<double>("jetDRMatch",0.3);
95 
96  bjetEtaMax_ = iConfig.getUntrackedParameter<double>("bjetEtaMax",2.5);
97  bjetEtMin_ = iConfig.getUntrackedParameter<double>("bjetEtMin",10.0);
98  bjetDRMatch_ =iConfig.getUntrackedParameter<double>("bjetDRMatch",0.3);
99 
100  photonEtaMax_ = iConfig.getUntrackedParameter<double>("photonEtaMax",2.5);
101  photonEtMin_ = iConfig.getUntrackedParameter<double>("photonEtMin",3.0);
102  photonDRMatch_ =iConfig.getUntrackedParameter<double>("photonDRMatch",0.3);
103 
104  trackEtaMax_ = iConfig.getUntrackedParameter<double>("trackEtaMax",2.5);
105  trackEtMin_ = iConfig.getUntrackedParameter<double>("trackEtMin",3.0);
106  trackDRMatch_ =iConfig.getUntrackedParameter<double>("trackDRMatch",0.3);
107 
108  metEtaMax_ = iConfig.getUntrackedParameter<double>("metEtaMax",5);
109  metMin_ = iConfig.getUntrackedParameter<double>("metMin",10.0);
110  metDRMatch_ =iConfig.getUntrackedParameter<double>("metDRMatch",0.5);
111 
112  htEtaMax_ = iConfig.getUntrackedParameter<double>("htEtaMax",5);
113  htMin_ = iConfig.getUntrackedParameter<double>("htMin",10.0);
114  htDRMatch_ =iConfig.getUntrackedParameter<double>("htDRMatch",0.5);
115 
116  sumEtMin_ = iConfig.getUntrackedParameter<double>("sumEtMin",10.0);
117 
118  specialPaths_ = iConfig.getParameter<std::vector<std::string > >("SpecialPaths");
119 
120  pathsSummaryFolder_ = iConfig.getUntrackedParameter ("pathsSummaryFolder",std::string("HLT/FourVector/PathsSummary/"));
121  pathsSummaryHLTCorrelationsFolder_ = iConfig.getUntrackedParameter ("hltCorrelationsFolder",std::string("HLT/FourVector/PathsSummary/HLT Correlations/"));
122  pathsSummaryFilterCountsFolder_ = iConfig.getUntrackedParameter ("filterCountsFolder",std::string("HLT/FourVector/PathsSummary/Filters Counts/"));
123 
124  pathsSummaryHLTPathsPerLSFolder_ = iConfig.getUntrackedParameter ("individualPathsPerLSFolder",std::string("HLT/FourVector/PathsSummary/HLT LS/"));
125  pathsIndividualHLTPathsPerLSFolder_ = iConfig.getUntrackedParameter ("individualPathsPerLSFolder",std::string("HLT/FourVector/PathsSummary/HLT LS/Paths/"));
126  pathsSummaryHLTPathsPerBXFolder_ = iConfig.getUntrackedParameter ("individualPathsPerBXFolder",std::string("HLT/FourVector/PathsSummary/HLT BX/"));
127 
128  fLumiFlag = true;
130  ME_HLT_BX_ = NULL;
132 
133  //set Token(-s)
134  triggerResultsToken_ = consumes<TriggerResults>(iConfig.getParameter<edm::InputTag>("triggerResultsLabel"));
135  triggerSummaryToken_ = consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("triggerSummaryLabel"));
136  muonRecoCollectionNameToken_ = consumes<TriggerResults>(iConfig.getUntrackedParameter("muonRecoCollectionName", std::string("muons")));
137  gsfElectronsToken_ = consumes<TriggerResults>(std::string("gsfElectrons"));
138  caloRecoTauProducerToken_ = consumes<TriggerResults>(std::string("caloRecoTauProducer"));
139  iterativeCone5CaloJetsToken_ = consumes<TriggerResults>(std::string("iterativeCone5CaloJets"));
140  jetProbabilityBJetTagsToken_ = consumes<TriggerResults>(std::string("jetProbabilityBJetTags"));
141  softMuonBJetTagsToken_ = consumes<TriggerResults>(std::string("softMuonBJetTags"));
142  metToken_ = consumes<TriggerResults>(std::string("met"));
143  photonsToken_ = consumes<TriggerResults>(std::string("photons"));
144  pixelTracksToken_ = consumes<TriggerResults>(std::string("pixelTracks"));
145  edm::InputTag triggerResultsLabelFU(triggerResultsLabel_.label(),triggerResultsLabel_.instance(), "FU");
146  triggerResultsTokenFU_ = consumes<TriggerResults>(triggerResultsLabelFU);
147  edm::InputTag triggerSummaryLabelFU(triggerSummaryLabel_.label(),triggerSummaryLabel_.instance(), "FU");
148  triggerSummaryLabelFUToken_ = consumes<trigger::TriggerEvent>(triggerSummaryLabelFU);
149 
150 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::TriggerResults > jetProbabilityBJetTagsToken_
edm::InputTag triggerSummaryLabel_
std::string pathsSummaryHLTPathsPerBXFolder_
MonitorElement * scalersSelect
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:942
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken_
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
#define NULL
Definition: scimark2.h:8
std::string pathsIndividualHLTPathsPerLSFolder_
PathInfoCollection hltPaths_
std::string pathsSummaryHLTPathsPerLSFolder_
edm::EDGetTokenT< edm::TriggerResults > softMuonBJetTagsToken_
edm::EDGetTokenT< edm::TriggerResults > metToken_
edm::EDGetTokenT< edm::TriggerResults > muonRecoCollectionNameToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsTokenFU_
MonitorElement * ME_HLT_BX_
void setVerbose(unsigned level)
Definition: DQMStore.cc:619
MonitorElement * ME_HLT_CUSTOM_BX_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryLabelFUToken_
edm::EDGetTokenT< edm::TriggerResults > gsfElectronsToken_
edm::EDGetTokenT< edm::TriggerResults > caloRecoTauProducerToken_
edm::EDGetTokenT< edm::TriggerResults > pixelTracksToken_
std::string muonRecoCollectionName_
std::string pathsSummaryFilterCountsFolder_
MonitorElement * ME_HLTAll_LS_
std::vector< std::string > specialPaths_
std::string const & label() const
Definition: InputTag.h:42
std::string const & instance() const
Definition: InputTag.h:43
edm::EDGetTokenT< edm::TriggerResults > iterativeCone5CaloJetsToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
std::string pathsSummaryHLTCorrelationsFolder_
edm::InputTag triggerResultsLabel_
edm::EDGetTokenT< edm::TriggerResults > photonsToken_
FourVectorHLTOnline::~FourVectorHLTOnline ( )

Definition at line 153 of file FourVectorHLTOnline.cc.

154 {
155 
156  // do anything here that needs to be done at desctruction time
157  // (e.g. close files, deallocate resources etc.)
158 
159 }

Member Function Documentation

void FourVectorHLTOnline::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 168 of file FourVectorHLTOnline.cc.

References plotTTrigFromHistos::binNumber(), bjetDRMatch_, bjetEtaMax_, bjetEtMin_, edm::EventBase::bunchCrossing(), rpc-layouts::bx, caloRecoTauProducerToken_, BaseMonitor::clearSets(), electronDRMatch_, electronEtaMax_, electronEtMin_, fCustomBXPath, MonitorElement::Fill(), BaseMonitor::fillOnlineMatch(), fTriggerObj, edm::Event::getByToken(), MonitorElement::getTH2F(), gsfElectrons_cfi::gsfElectrons, gsfElectronsToken_, hasHLTPassed(), hltConfig_, hltPaths_, hltPathsDiagonal_, i, edm::HandleBase::isValid(), iterativeCone5CaloJetsToken_, jetDRMatch_, jetEtaMax_, jetEtMin_, jetProbabilityBJetTagsToken_, LogDebug, LogTrace, ME_HLT_BX_, ME_HLT_CUSTOM_BX_, metDRMatch_, metEtaMax_, metMin_, metToken_, HLTConfigProvider::moduleLabels(), LaserDQM_cfi::mon, BaseMonitor::monitorL1(), BaseMonitor::monitorOnline(), muonDRMatch_, muonEtaMax_, muonEtMin_, muonRecoCollectionNameToken_, nev_, NULL, photonDRMatch_, photonEtaMax_, photonEtMin_, photonsToken_, pixelTracksToken_, processname_, objMonData< T >::setBJetsFlag(), objMonData< T >::setLimits(), BaseMonitor::setPath(), objMonData< T >::setReco(), softMuonBJetTagsToken_, tauDRMatch_, tauEtaMax_, tauEtMin_, trigger::TriggerBJet, trigger::TriggerElectron, trigger::TriggerJet, trigger::TriggerL1CenJet, trigger::TriggerL1ETM, trigger::TriggerL1ETT, trigger::TriggerL1ForJet, trigger::TriggerL1IsoEG, trigger::TriggerL1Mu, trigger::TriggerL1NoIsoEG, trigger::TriggerL1TauJet, trigger::TriggerMET, trigger::TriggerMuon, edm::Event::triggerNames(), trigger::TriggerPhoton, triggerResults, triggerResults_, triggerResultsToken_, triggerResultsTokenFU_, triggerSummaryLabelFUToken_, triggerSummaryToken_, trigger::TriggerTau, trigger::TriggerTET, and findQualityFiles::v.

169 {
170 
171  //if(! fLumiFlag ) return;
172 
173  using namespace edm;
174  using namespace trigger;
175  ++nev_;
176  LogDebug("FourVectorHLTOnline")<< " analyze...." ;
177 
178  // Get trigger results
179 
182  if(!triggerResults.isValid()) {
184  if(!triggerResults.isValid()) {
185  edm::LogInfo("FourVectorHLTOnline") << "TriggerResults not found, "
186  "skipping event";
187  return;
188  }
189  }
191  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
192  int npath = triggerResults->size();
193 
195  if(!fTriggerObj.isValid()) {
196 
198 
199  if(!fTriggerObj.isValid()) {
200 
201  edm::LogInfo("FourVectorHLTOnline") << "TriggerEvent not found, " "skipping event";
202  return;
203 
204  }
205 
206  }
207 
208  edm::Handle<TriggerResults> muonHandle;
209  iEvent.getByToken(muonRecoCollectionNameToken_, muonHandle);
210  if(!muonHandle.isValid()) {
211 
212  edm::LogInfo("FourVectorHLTOnline") << "muonHandle not found, ";
213  // "skipping event";
214  // return;
215 
216  }
217 
218 
221  if(!gsfElectrons.isValid())
222  edm::LogInfo("FourVectorHLTOnline") << "gsfElectrons not found, ";
223 
224  edm::Handle<TriggerResults> tauHandle;
225  iEvent.getByToken(caloRecoTauProducerToken_, tauHandle);
226  if(!tauHandle.isValid())
227  edm::LogInfo("FourVectorHLTOnline") << "tauHandle not found, ";
228 
229  edm::Handle<TriggerResults> jetHandle;
230  iEvent.getByToken(iterativeCone5CaloJetsToken_, jetHandle);
231  if(!jetHandle.isValid())
232  edm::LogInfo("FourVectorHLTOnline") << "jetHandle not found, ";
233 
234  // Get b tag information
235  edm::Handle<TriggerResults> bTagIPHandle;
236  iEvent.getByToken(jetProbabilityBJetTagsToken_, bTagIPHandle);
237  if (!bTagIPHandle.isValid())
238  edm::LogInfo("FourVectorHLTOnline") << "mTagIPHandle trackCountingHighEffJetTags not found, ";
239 
240  // Get b tag information
241  edm::Handle<TriggerResults> bTagMuHandle;
242  iEvent.getByToken(softMuonBJetTagsToken_, bTagMuHandle);
243  if (!bTagMuHandle.isValid())
244  edm::LogInfo("FourVectorHLTOnline") << "bTagMuHandle not found, ";
245 
246  edm::Handle<TriggerResults> metHandle;
247  iEvent.getByToken(metToken_, metHandle);
248  if(!metHandle.isValid())
249  edm::LogInfo("FourVectorHLTOnline") << "metHandle not found, ";
250 
251  edm::Handle<TriggerResults> photonHandle;
252  iEvent.getByToken(photonsToken_, photonHandle);
253  if(!photonHandle.isValid())
254  edm::LogInfo("FourVectorHLTOnline") << "photonHandle not found, ";
255 
256  edm::Handle<TriggerResults> trackHandle;
257  iEvent.getByToken(pixelTracksToken_, trackHandle);
258  if(!trackHandle.isValid())
259  edm::LogInfo("FourVectorHLTOnline") << "trackHandle not found, ";
260 
261  // ---------------------
262  // Monitors
263  // ---------------------
264 
265  // electron Monitor
267  eleMon.setReco(gsfElectrons);
268  eleMon.setLimits(electronEtaMax_, electronEtMin_, electronDRMatch_);
269 
270  eleMon.pushTriggerType(TriggerElectron);
271  eleMon.pushTriggerType(TriggerL1NoIsoEG);
272  eleMon.pushTriggerType(TriggerL1IsoEG);
273 
274  eleMon.pushL1TriggerType(TriggerL1NoIsoEG);
275  eleMon.pushL1TriggerType(TriggerL1IsoEG);
276 
277  // muon Monitor
279  muoMon.setReco(muonHandle);
280  muoMon.setLimits(muonEtaMax_, muonEtMin_, muonDRMatch_);
281 
282  muoMon.pushTriggerType(TriggerMuon);
283  muoMon.pushTriggerType(TriggerL1Mu);
284 
285  muoMon.pushL1TriggerType(TriggerL1Mu);
286 
287  // tau Monitor
289  tauMon.setReco(tauHandle);
290  tauMon.setLimits(tauEtaMax_, tauEtMin_, tauDRMatch_);
291 
292  tauMon.pushTriggerType(TriggerTau);
293  tauMon.pushTriggerType(TriggerL1TauJet);
294 
295  tauMon.pushL1TriggerType(TriggerL1TauJet);
296  tauMon.pushL1TriggerType(TriggerL1ForJet);
297 
298  // photon Monitor
300  phoMon.setReco(photonHandle);
301  phoMon.setLimits(photonEtaMax_, photonEtMin_, photonDRMatch_);
302 
303  phoMon.pushTriggerType(TriggerPhoton);
304 
305  phoMon.pushL1TriggerType(TriggerL1NoIsoEG);
306  phoMon.pushL1TriggerType(TriggerL1IsoEG);
307 
308  // jet Monitor - NOTICE: we use genJets for MC
310  jetMon.setReco(jetHandle);
311  jetMon.setLimits(jetEtaMax_, jetEtMin_, jetDRMatch_);
312 
313  jetMon.pushTriggerType(TriggerJet);
314  jetMon.pushTriggerType(TriggerL1CenJet);
315  jetMon.pushTriggerType(TriggerL1ForJet);
316 
317  jetMon.pushL1TriggerType(TriggerL1CenJet);
318  jetMon.pushL1TriggerType(TriggerL1ForJet);
319  jetMon.pushL1TriggerType(TriggerL1TauJet);
320 
321  // bjet Monitor - NOTICE: we use genJets for MC
322  objMonData<TriggerResults> btagIPMon; // CaloJet will not be used, this is only place holder
323  //btagIPMon.setReco(jetHandle);
324  btagIPMon.setBJetsFlag(true);
325  btagIPMon.setLimits(bjetEtaMax_, bjetEtMin_, bjetDRMatch_);
326 
327  btagIPMon.pushTriggerType(TriggerBJet);
328  btagIPMon.pushTriggerType(TriggerJet);
329 
330  btagIPMon.pushL1TriggerType(TriggerL1CenJet);
331  btagIPMon.pushL1TriggerType(TriggerL1ForJet);
332  btagIPMon.pushL1TriggerType(TriggerL1TauJet);
333 
334  objMonData<TriggerResults> btagMuMon; // CaloJet will not be used, this is only place holder
335  //btagMuMon.setReco(jetHandle);
336  btagMuMon.setBJetsFlag(true);
337  btagMuMon.setLimits(bjetEtaMax_, bjetEtMin_, bjetDRMatch_);
338 
339  btagMuMon.pushTriggerType(TriggerBJet);
340  btagMuMon.pushTriggerType(TriggerJet);
341 
342  btagMuMon.pushL1TriggerType(TriggerL1CenJet);
343  btagMuMon.pushL1TriggerType(TriggerL1ForJet);
344  btagMuMon.pushL1TriggerType(TriggerL1TauJet);
345 
346 
347  objMonData<TriggerResults> btagMon; // Generic btagMon
348 
349  // met Monitor
351  metMon.setReco(metHandle);
352  metMon.setLimits(metEtaMax_, metMin_, metDRMatch_);
353 
354  metMon.pushTriggerType(TriggerMET);
355 
356  metMon.pushL1TriggerType(TriggerL1ETM);
357 
358  // tet Monitor
360  tetMon.setReco(metHandle);
361  //tetMon.setLimits(tetEtaMax_=999., tetEtMin_=10, tetDRMatch_=999);
362  tetMon.setLimits(999., 10., 999.);
363 
364  tetMon.pushTriggerType(TriggerTET);
365 
366  tetMon.pushL1TriggerType(TriggerL1ETT);
367 
368  // default Monitor
369  //objMonData<trigger::TriggerEvent> defMon;
371  defMon.setLimits(999., 3., 999.);
372 
373  // vector to hold monitors
374  // interface is through virtual class BaseMonitor
375  std::vector<BaseMonitor*> monitors;
376 
377  //monitors.push_back(&jetMon);
378 
379  monitors.push_back(&muoMon);
380  monitors.push_back(&eleMon);
381  monitors.push_back(&tauMon);
382  monitors.push_back(&phoMon);
383  monitors.push_back(&jetMon);
384  monitors.push_back(&btagMon);
385  monitors.push_back(&metMon);
386  monitors.push_back(&tetMon);
387 
388  int bx = iEvent.bunchCrossing();
389  /*
390  // Fill HLTPassed_Correlation Matrix bin (i,j) = (Any,Any)
391  // --------------------------------------------------------
392  int anyBinNumber = ME_HLTPassPass_->getTH2F()->GetXaxis()->FindBin("HLT_Any");
393  // any triger accepted
394  if(triggerResults->accept()){
395 
396  ME_HLTPassPass_->Fill(anyBinNumber-1,anyBinNumber-1);//binNumber1 = 0 = first filter
397 
398  }
399  */
400 
401  //fillHltMatrix(triggerNames);
402 
403 
404  // Loop over paths
405  // --------------------
406  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
407 
408  LogTrace("FourVectorHLTOnline") << " unique path " << v->getPath() << std::endl;
409 
410  unsigned int pathByIndex = triggerNames.triggerIndex(v->getPath());
411 
412  // path must be in the menu
413  if(pathByIndex >= triggerResults_->size() ) continue;
414 
415 
416  // Fill HLTPassed Matrix and HLTPassFail Matrix
417  // --------------------------------------------------------
418 
419  if(triggerResults->accept(pathByIndex)){
420 
421  int pathBinNumber = ME_HLT_BX_->getTH2F()->GetYaxis()->FindBin(v->getPath().c_str());
422  ME_HLT_BX_->Fill(bx,pathBinNumber-1);
423 
424  if(hasHLTPassed(fCustomBXPath,triggerNames)) {
425 
426  ME_HLT_CUSTOM_BX_->Fill(bx,pathBinNumber-1);
427 
428  }
429 
430  } // end if accept
431 
432  // Fill histogram of filter ocupancy for each HLT path
433  // ---------------------------------
434  unsigned int lastModule = triggerResults->index(pathByIndex);
435 
436  //check if hlt passed
437  bool hltPathPassed = triggerResults->accept(pathByIndex);
438 
439  //go through the list of filters
440  for(unsigned int filt = 0; filt < v->filtersAndIndices.size(); filt++){
441 
442  int binNumber = v->getFiltersHisto()->getTH1()->GetXaxis()->FindBin(v->filtersAndIndices[filt].first.c_str());
443 
444  // if hlt path passed, then all the modules passed
445  // otherwise the module that issued the decision is the first fail
446  // this means that all modules before it passed
447  if(hltPathPassed) {
448 
449  v->getFiltersHisto()->Fill(binNumber-1);//binNumber1 = 0 = first filter
450  }
451  else if(v->filtersAndIndices[filt].second < lastModule){
452  v->getFiltersHisto()->Fill(binNumber-1);//binNumber1 = 0 = first filter
453  }
454 
455  } // end for filt
456 
457  } // end for diag paths
458 
459 
460  // Main loop over paths
461  // --------------------
462  for(PathInfoCollection::iterator v = hltPaths_.begin(); v!= hltPaths_.end(); ++v ) {
463 
464  LogTrace("FourVectorHLTOnline") << " path " << v->getPath() << std::endl;
465 
466  if (v->getPath().find("BTagIP") != std::string::npos ) btagMon = btagIPMon;
467  else btagMon = btagMuMon;
468 
469  //if(*v != "HLT_L1Jet6U") continue;
470 
471  unsigned int pathByIndex = triggerNames.triggerIndex(v->getPath());
472 
473  if(pathByIndex >= triggerResults_->size() ) continue;
474 
475  // did we pass the denomPath?
476  bool denompassed = false;
477 
478  for(int i = 0; i < npath; ++i) {
479 
480  if (triggerNames.triggerName(i).find(v->getDenomPath()) != std::string::npos && triggerResults->accept(i))
481  {
482  denompassed = true;
483  break;
484  }
485  }
486 
487  if (denompassed)
488  {
489 
490  //LogTrace("FourVectorHLTOnline") << " denominator path " << v->getPath() << std::endl;
491 
492 
493  // Get the righe monitor for this path
494  // -----------------------------------
495  BaseMonitor* mon = NULL;
496 
497  for(std::vector<BaseMonitor*>::iterator mit = monitors.begin(); mit!= monitors.end(); ++mit ) {
498 
499  if((*mit)->isTriggerType(v->getObjectType())) {
500 
501  mon = *mit;
502  break;
503 
504  }
505 
506  }
507 
508  // if cannot find moniotor for the path, go to next path
509  //if(!mon) continue;
510 
511  // if cannot find moniotor for the path, assign the default
512  if(!mon) mon = &defMon;
513 
514  // attach this path to mon
515  mon->setPath(v);
516 
517  // clear sets of matched objects
518  mon->clearSets();
519 
520  //int triggertype = 0;
521  //triggertype = v->getObjectType();
522 
523  // monitor L1 (only if L1 passed and can find GTSeed)
525  bool l1accept = false;
526  edm::InputTag l1testTag(v->getl1Path(),"",processname_);
527  const int l1Index = fTriggerObj->filterIndex(l1testTag);
528 
529  if ( l1Index >= fTriggerObj->sizeFilters() ) {
530 
531  LogTrace("FourVectorHLTOnline") << "Cannot find L1GTSeed of the path " << v->getPath() << std::endl;
532  LogTrace("FourVectorHLTOnline") << "\t L1GTSeed name = " << v->getl1Path() << std::endl;
533  LogTrace("FourVectorHLTOnline") << "\t tried with tag " << l1testTag << std::endl;
534  LogTrace("FourVectorHLTOnline") <<"\t module index = "<< l1Index << std::endl;
535 
536  }
537 
538  // monitor L1 object
539  mon->monitorL1(l1Index, this);
540 
541  // monitor Online (only if HLT passed)
543  bool numpassed = false;
544 
545  // did we pass the numerator path, i.e. HLT path?
546  for(int i = 0; i < npath; ++i) {
547 
548  if (triggerNames.triggerName(i) == v->getPath() && triggerResults->accept(i)) numpassed = true;
549 
550  }
551 
552  if (!numpassed) continue;
553 
554  if (!l1accept) {
555 
556  LogDebug("FourVectorHLTOnline")
557  << "This should not happen. HLT passed, but L1 Seed not passed for hlt path "<< std::endl
558  << "HLT path: " << v->getPath() << "\t HLTLevel1GTSeed: " << v->getl1Path();
559 
560  }
561 
562  // fill scaler histograms
563  edm::InputTag filterTag = v->getTag();
564 
565  // loop through indices and see if the filter is
566  // on the list of filters used by this path
567  //----------------------------------------------
568  if (v->getLabel() == "dummy"){
569  const std::vector<std::string> filterLabels = hltConfig_.moduleLabels(v->getPath());
570 
571  //loop over labels
572  for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
573 
574  edm::InputTag testTag(*labelIter,"",processname_);
575 
576  int testindex = fTriggerObj->filterIndex(testTag);
577 
578  // last match wins...
579  if ( !(testindex >= fTriggerObj->sizeFilters()) ) {
580 
581  filterTag = testTag;
582  v->setLabel(*labelIter);}
583 
584  }
585 
586  } // end for
587 
588  const int hltIndex = fTriggerObj->filterIndex(filterTag);
589  if ( hltIndex >= fTriggerObj->sizeFilters() ) {
590 
591  LogTrace("FourVectorHLTOnline") << "WTF no index of that name " << filterTag << std::endl;
592  continue; // not in this event
593 
594  }
595 
596  mon->monitorOnline(hltIndex, l1Index, this);
597 
598  mon->fillOnlineMatch(l1Index, this);
599 
600  } //denompassed
601 
602 
603  } //pathinfo loop
604 
605 }
#define LogDebug(id)
edm::Handle< trigger::TriggerEvent > fTriggerObj
PathInfoCollection hltPathsDiagonal_
edm::EDGetTokenT< edm::TriggerResults > jetProbabilityBJetTagsToken_
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:204
virtual void monitorOnline(const int hltIndex, const int l1Index, FourVectorHLTOnline *fv)=0
virtual void fillOnlineMatch(const int l1Index, FourVectorHLTOnline *fv)=0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
enum start value shifted to 81 so as to avoid clashes with PDG codes
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken_
int bunchCrossing() const
Definition: EventBase.h:62
edm::Handle< edm::TriggerResults > triggerResults_
#define NULL
Definition: scimark2.h:8
PathInfoCollection hltPaths_
void Fill(long long x)
edm::EDGetTokenT< edm::TriggerResults > softMuonBJetTagsToken_
edm::EDGetTokenT< edm::TriggerResults > metToken_
void setLimits(float etaMax, float etMin, float drMatch)
edm::EDGetTokenT< edm::TriggerResults > muonRecoCollectionNameToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsTokenFU_
MonitorElement * ME_HLT_BX_
static std::string const triggerResults
Definition: EdmProvDump.cc:41
MonitorElement * ME_HLT_CUSTOM_BX_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryLabelFUToken_
bool isValid() const
Definition: HandleBase.h:76
#define LogTrace(id)
edm::EDGetTokenT< edm::TriggerResults > gsfElectronsToken_
edm::EDGetTokenT< edm::TriggerResults > caloRecoTauProducerToken_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
edm::EDGetTokenT< edm::TriggerResults > pixelTracksToken_
virtual void clearSets(void)=0
HLTConfigProvider hltConfig_
string bx
Definition: rpc-layouts.py:13
virtual void setPath(FourVectorHLTOnline::PathInfoCollection::iterator v)=0
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
virtual void monitorL1(const int l1Index, FourVectorHLTOnline *fv)=0
TH2F * getTH2F(void) const
void setReco(edm::Handle< T > offColl)
edm::EDGetTokenT< edm::TriggerResults > iterativeCone5CaloJetsToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
edm::EDGetTokenT< edm::TriggerResults > photonsToken_
void setBJetsFlag(bool flag)
void FourVectorHLTOnline::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 611 of file FourVectorHLTOnline.cc.

References dirname_, nev_, cppFunctionSkipper::operator, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

612 {
613  nev_ = 0;
614  DQMStore *dbe = 0;
615  dbe = Service<DQMStore>().operator->();
616 
617  if (dbe) {
618  dbe->setCurrentFolder(dirname_);
619  dbe->rmdir(dirname_);
620  }
621 
622 
623  if (dbe) {
624  dbe->setCurrentFolder(dirname_);
625  }
626 }
void FourVectorHLTOnline::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1666 of file FourVectorHLTOnline.cc.

1666  {
1667 
1668  //int lumi = int(lumiSeg.id().luminosityBlock());
1669  //if(lumi < 74 || lumi > 77) fLumiFlag = false;
1670  //else fLumiFlag = true;
1671 
1672 }
void FourVectorHLTOnline::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

add dataset name and thier triggers to the list

Reimplemented from edm::EDAnalyzer.

Definition at line 638 of file FourVectorHLTOnline.cc.

References bjetEtaMax_, DQMStore::book1D(), DQMStore::book2D(), custompathnamepairs_, HLTConfigProvider::datasetContent(), makeLayoutFileForGui::datasetNames, HLTConfigProvider::datasetNames(), dbe_, dirname_, electronEtaMax_, fGroupL1TempCountPair, fGroupName, fGroupNamePathsPair, fGroupTempCountPair, filters, first, fPathBxTempCountPair, fPathTempCountPair, g, getL1ConditionModuleName(), getTriggerTypeParsePathName(), dt-layouts::histoname, hltConfig_, hltPaths_, hltPathsDiagonal_, i, edm::RunBase::id(), HLTConfigProvider::init(), j, jetEtaMax_, gen::k, LogDebug, LogTrace, m, metEtaMax_, HLTConfigProvider::moduleEDMType(), HLTConfigProvider::moduleIndex(), HLTConfigProvider::moduleLabels(), edm::moduleName(), HLTConfigProvider::moduleType(), muonEtaMax_, n, nBins_, nBinsOneOverEt_, nLS_, cppFunctionSkipper::operator, timingPdfMaker::pathname, EgammaValidation_cff::pathName, pathsIndividualHLTPathsPerLSFolder_, pathsSummaryFilterCountsFolder_, pathsSummaryFolder_, photonEtaMax_, Pi, plotAll_, processname_, PtMinSelector_cfg::ptMin, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), setupHltBxPlots(), setupHltLsPlots(), HLTConfigProvider::size(), specialPaths_, AlCaHLTBitMon_QueryRunRegistry::string, tauEtaMax_, indexGen::title, trackEtaMax_, trigger::TriggerBJet, trigger::TriggerElectron, trigger::TriggerJet, trigger::TriggerL1CenJet, trigger::TriggerL1ETM, trigger::TriggerL1ForJet, trigger::TriggerL1IsoEG, trigger::TriggerL1Mu, trigger::TriggerL1NoIsoEG, trigger::TriggerL1TauJet, trigger::TriggerMET, trigger::TriggerMuon, HLTConfigProvider::triggerName(), trigger::TriggerPhoton, trigger::TriggerTau, trigger::TriggerTET, trigger::TriggerTrack, and findQualityFiles::v.

639 {
640  LogDebug("FourVectorHLTOnline") << "beginRun, run " << run.id();
641 
642  // HLT config does not change within runs!
643  bool changed=false;
644 
645  if (!hltConfig_.init(run, c, processname_, changed)) {
646  processname_ = "FU";
647 
648  if (!hltConfig_.init(run, c, processname_, changed)){
649 
650  LogDebug("FourVectorHLTOnline") << "HLTConfigProvider failed to initialize.";
651 
652  }
653 
654  // check if trigger name in (new) config
655  // std::cout << "Available TriggerNames are: " << std::endl;
656  // hltConfig_.dump("Triggers");
657  }
658 
659  if (1) {
660 
661  DQMStore *dbe = 0;
662  dbe = Service<DQMStore>().operator->();
663 
664  if (dbe) {
665  dbe->setCurrentFolder(dirname_);
666  }
667 
668  const unsigned int n(hltConfig_.size());
669  if (plotAll_){
670 
671  for (unsigned int j=0; j!=n; ++j) {
672 
674 
675  std::string l1pathname = getL1ConditionModuleName(pathname);
676 
677  int objectType = getTriggerTypeParsePathName(pathname);
678 
679  for (unsigned int i=0; i!=n; ++i) {
680 
681  std::string denompathname = hltConfig_.triggerName(i);
682  int denomobjectType = getTriggerTypeParsePathName(denompathname);
683 
684 
685 
686  std::string filtername("dummy");
687  float ptMin = 0.0;
688  float ptMax = 100.0;
689  if (plotAll_ && denomobjectType == objectType && objectType != 0)
690 
691  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, filtername, processname_, objectType, ptMin, ptMax));
692 
693  }
694  }
695 
696  } // end if plotAll
697  else {
698 
699  // plot all diagonal combinations plus any other specified pairs
700  for (unsigned int i=0; i!=n; ++i) {
701 
702  std::string denompathname = "";
703  std::string pathname = hltConfig_.triggerName(i);
704  //parse pathname to guess object type
705  int objectType = getTriggerTypeParsePathName(pathname);
706 
707  std::string l1pathname = getL1ConditionModuleName(pathname);
708 
709  std::string filtername("dummy");
710  float ptMin = 0.0;
711  float ptMax = 100.0;
712 
713  if (objectType == trigger::TriggerPhoton) ptMax = 100.0;
714  if (objectType == trigger::TriggerElectron) ptMax = 100.0;
715  if (objectType == trigger::TriggerMuon) ptMax = 150.0;
716  if (objectType == trigger::TriggerTau) ptMax = 100.0;
717  if (objectType == trigger::TriggerJet) ptMax = 300.0;
718  if (objectType == trigger::TriggerBJet) ptMax = 300.0;
719  if (objectType == trigger::TriggerMET) ptMax = 300.0;
720  if (objectType == trigger::TriggerTET) ptMax = 300.0;
721  if (objectType == trigger::TriggerTrack) ptMax = 100.0;
722 
723  // keep track of all paths, except for FinalPath
724  if (objectType != -1 && pathname.find("FinalPath") == std::string::npos){
725 
726  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, filtername, processname_, objectType, ptMin, ptMax));
727 
728  hltPathsDiagonal_.push_back(PathInfo(denompathname, pathname, l1pathname, filtername, processname_, objectType, ptMin, ptMax));
729 
730  }
731 
732  } // end for i
733 
734 
735  // now loop over denom/num path pairs specified in cfg,
736  // recording the off-diagonal ones
737  for (std::vector<std::pair<std::string, std::string> >::iterator custompathnamepair = custompathnamepairs_.begin(); custompathnamepair != custompathnamepairs_.end(); ++custompathnamepair) {
738 
739  std::string numpathname = custompathnamepair->first;
740  std::string denompathname = custompathnamepair->second;
741 
742  if (numpathname != denompathname) {
743 
744  // check that denominator exists
745  bool founddenominator = false;
746  for (unsigned int k=0; k!=n; ++k) {
747 
748  std::string n_pathname = hltConfig_.triggerName(k);
749 
750  if (n_pathname.find(denompathname) != std::string::npos) {
751 
752  LogDebug("FourVectorHLTOnline") << "denompathname is selected to be = " << n_pathname << std::endl;;
753  founddenominator = true;
754 
755  break;
756 
757  }
758  }
759 
760  if (!founddenominator) {
761 
762  edm::LogInfo("FourVectorHLTOnline") << "denompathname not found, go to the next pair numearator-denominator" << std::endl;
763 
764  // go to the next pair
765  continue;
766 
767  }
768 
769  // check that numerator exists
770  bool foundnumerator = false;
771  for (unsigned int j=0; j!=n; ++j) {
772 
773  std::string pathname = hltConfig_.triggerName(j);
774 
775  LogDebug("FourVectorHLTOnline") << "check if path " << pathname << " is numpathname = " << numpathname << std::endl;
776  if (hltConfig_.triggerName(j).find(numpathname)!= std::string::npos) {
777 
778  LogDebug("FourVectorHLTOnline") << "pathname is selected to be = " << denompathname << std::endl;;
779  foundnumerator = true;
780 
781  }
782 
783 
784  if (!foundnumerator) {
785 
786  edm::LogInfo("FourVectorHLTOnline") << "pathname not found, ignoring " << pathname;
787  continue;
788 
789  }
790 
791 
792  std::string l1pathname = getL1ConditionModuleName(pathname);
793  int objectType = getTriggerTypeParsePathName(pathname);
794 
795  std::string filtername("dummy");
796  float ptMin = 0.0;
797  float ptMax = 100.0;
798  if (objectType == trigger::TriggerPhoton) ptMax = 100.0;
799  if (objectType == trigger::TriggerElectron) ptMax = 100.0;
800  if (objectType == trigger::TriggerMuon) ptMax = 150.0;
801  if (objectType == trigger::TriggerTau) ptMax = 100.0;
802  if (objectType == trigger::TriggerJet) ptMax = 300.0;
803  if (objectType == trigger::TriggerBJet) ptMax = 300.0;
804  if (objectType == trigger::TriggerMET) ptMax = 300.0;
805  if (objectType == trigger::TriggerTET) ptMax = 300.0;
806  if (objectType == trigger::TriggerTrack) ptMax = 100.0;
807 
808  // monitor regardless of the objectType of the path
809  if (objectType != 0)
810  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, filtername, processname_, objectType, ptMin, ptMax));
811 
812  } // end for j, loop over paths
813 
814  } // end if not same num and denominator
815 
816  } // end for pair
817 
818  } // end else
819 
820 
821  std::vector<std::string> muonPaths;
822  std::vector<std::string> egammaPaths;
823  std::vector<std::string> tauPaths;
824  std::vector<std::string> jetmetPaths;
825  std::vector<std::string> restPaths;
826  std::vector<std::string> allPaths;
827  // fill vectors of Muon, Egamma, JetMet, Rest, and Special paths
828  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
829 
830  std::string pathName = v->getPath();
831  int objectType = v->getObjectType();
832 
833  std::vector<int> tempCount(5,0);
834 
835  fPathTempCountPair.push_back(make_pair(pathName,0));
836  fPathBxTempCountPair.push_back(make_pair(pathName,tempCount));
837 
838  allPaths.push_back(pathName);
839 
840  switch (objectType) {
841  case trigger::TriggerMuon :
842  muonPaths.push_back(pathName);
843  break;
844 
847  egammaPaths.push_back(pathName);
848  break;
849 
850  case trigger::TriggerTau :
851  tauPaths.push_back(pathName);
852  break;
853 
854  case trigger::TriggerJet :
855  case trigger::TriggerMET :
856  jetmetPaths.push_back(pathName);
857  break;
858 
859  default:
860  restPaths.push_back(pathName);
861  }
862 
863  }
864 
865  fPathTempCountPair.push_back(make_pair("HLT_Any",0));
866 
867  fGroupName.push_back("All");
868  fGroupName.push_back("Muon");
869  fGroupName.push_back("Egamma");
870  fGroupName.push_back("Tau");
871  fGroupName.push_back("JetMet");
872  fGroupName.push_back("Rest");
873  fGroupName.push_back("Special");
874 
875  for(unsigned int g=0; g<fGroupName.size(); g++) {
876 
877  //fGroupTempCountPair.push_back(make_pair(fGroupName[g],0));
878  //fGroupL1TempCountPair.push_back(make_pair(fGroupName[g],0));
879 
880  }
881 
883 
884 
885 
886  fGroupNamePathsPair.push_back(make_pair("All",allPaths));
887 
888  fGroupNamePathsPair.push_back(make_pair("Muon",muonPaths));
889 
890  fGroupNamePathsPair.push_back(make_pair("Egamma",egammaPaths));
891 
892  fGroupNamePathsPair.push_back(make_pair("Tau",tauPaths));
893 
894  fGroupNamePathsPair.push_back(make_pair("JetMet",jetmetPaths));
895 
896  fGroupNamePathsPair.push_back(make_pair("Rest",restPaths));
897 
898  fGroupNamePathsPair.push_back(make_pair("Special",specialPaths_));
899 
901  std::vector<std::string> datasetNames = hltConfig_.datasetNames() ;
902  for (unsigned int i=0;i<datasetNames.size();i++) {
903 
904  std::vector<std::string> datasetPaths = hltConfig_.datasetContent(datasetNames[i]);
905 
906  fGroupNamePathsPair.push_back(make_pair(datasetNames[i],datasetPaths));
907  //setupHltMatrix(datasetNames[i],datasetPaths);
908 
909  }
910 
911  /*
912  setupHltMatrix("All", allPaths);
913  setupHltMatrix("Muon", muonPaths);
914  setupHltMatrix("Egamma", egammaPaths);
915  setupHltMatrix("Tau", tauPaths);
916  setupHltMatrix("JetMET", jetmetPaths);
917  setupHltMatrix("Rest", restPaths);
918  setupHltMatrix("Special", specialPaths_);
919  */
920 
921  for (unsigned int g=0;g<fGroupNamePathsPair.size();g++) {
922 
923  fGroupTempCountPair.push_back(make_pair(fGroupNamePathsPair[g].first,0));
924  fGroupL1TempCountPair.push_back(make_pair(fGroupNamePathsPair[g].first,0));
925  //setupHltMatrix(fGroupNamePathsPair[g].first,fGroupNamePathsPair[g].second);
926 
927  }
928  /*
929  */
930 
931  setupHltLsPlots();
932 
933  setupHltBxPlots();
934 
935 
936  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
937 
938  // -------------------------
939  //
940  // Filters for each path
941  //
942  // -------------------------
943 
944  // get all modules in this HLT path
945  std::vector<std::string> moduleNames = hltConfig_.moduleLabels( v->getPath() );
946 
947  int numModule = 0;
948  std::string moduleName, moduleType;
949  unsigned int moduleIndex;
950 
951  //print module name
952  std::vector<std::string>::const_iterator iDumpModName;
953  for (iDumpModName = moduleNames.begin();iDumpModName != moduleNames.end();iDumpModName++) {
954 
955  moduleName = *iDumpModName;
956  moduleType = hltConfig_.moduleType(moduleName);
957  moduleIndex = hltConfig_.moduleIndex(v->getPath(), moduleName);
958 
959  LogTrace ("FourVectorHLTOnline") << "Module " << numModule
960  << " is called " << moduleName
961  << " , type = " << moduleType
962  << " , index = " << moduleIndex
963  << std::endl;
964 
965  numModule++;
966 
967  if((moduleType.find("Filter") != std::string::npos && moduleType.find("HLTTriggerTypeFilter") == std::string::npos ) ||
968  (moduleType.find("Associator") != std::string::npos) ||
969  (moduleType.find("HLTLevel1GTSeed") != std::string::npos) ||
970  (moduleType.find("HLTGlobalSumsCaloMET") != std::string::npos) ||
971  (moduleType.find("HLTPrescaler") != string::npos) ||
972  (hltConfig_.moduleEDMType(moduleName).find("EDFilter") != string::npos))
973  {
974 
975  //std::pair<std::string, int> filterIndexPair;
976  //filterIndexPair.first = moduleName;
977  //filterIndexPair.second = moduleIndex;
978  //v->filtersAndIndices.push_back(filterIndexPair);
979  v->filtersAndIndices.push_back(make_pair(moduleName,moduleIndex));
980 
981  }
982 
983 
984  }//end for modulesName
985 
986 
988 
989  //int nbin_sub = 5;
990  int nbin_sub = v->filtersAndIndices.size()+2;
991 
992  std::string pathName = v->getPath();
993 
994  vector<string> datasetNames = hltConfig_.datasetNames();
995 
996  //Creates subfolders in FourVector->PathsSummary->FiltersCounts for each dataset,
997  //and moves each path's filter histogram to the proper dataset folder
998  for (unsigned int k=0;k<datasetNames.size();k++) { //Loop to cycle through datasets
999  // std::cout << "Dataset " << datasetNames[k] << " has trigger paths " << std::endl;
1000 
1001  std::string datasetFolder = pathsSummaryFilterCountsFolder_ + datasetNames[k];
1002  vector<string> datasetPaths = hltConfig_.datasetContent(datasetNames[k]);
1003 
1004  for (unsigned int m=0;m<datasetPaths.size();m++){ //Loop to cycle through trigger paths
1005  // std::cout << " " << datasetPaths[m] << std::endl;
1006 
1007  if(datasetPaths[m]==pathName){ //Moves path to proper dataset directory
1008  dbe_->setCurrentFolder(datasetFolder.c_str());
1009  }
1010  }
1011  }
1012 
1013 
1014  // count plots for subfilter
1015  MonitorElement* filters = dbe_->book1D("Filters_" + v->getPath(),
1016  "Filters_" + v->getPath(),
1017  nbin_sub+1, -0.5, 0.5+(double)nbin_sub);
1018 
1019  for(unsigned int filt = 0; filt < v->filtersAndIndices.size(); filt++){
1020 
1021  filters->setBinLabel(filt+1, (v->filtersAndIndices[filt]).first);
1022 
1023  }
1024 
1025  // book Count vs LS
1027  MonitorElement* tempME = dbe_->book1D(v->getPath() + "_count_per_LS",
1028  v->getPath() + " count per LS",
1029  nLS_, 0,nLS_);
1030  tempME->setAxisTitle("Luminosity Section");
1031 
1032  v->setFilterHistos(filters);
1033 
1034  } // end for paths
1035 
1036  // now set up all of the histos for each path-denom
1037  for(PathInfoCollection::iterator v = hltPaths_.begin(); v!= hltPaths_.end(); ++v ) {
1038 
1039  MonitorElement *NOn, *onEtOn, *onOneOverEtOn, *onEtavsonPhiOn=0;
1040  MonitorElement *NOff, *offEtOff, *offEtavsoffPhiOff=0;
1041  MonitorElement *NL1, *l1EtL1, *l1Etavsl1PhiL1=0;
1042  MonitorElement *NL1On, *l1EtL1On, *l1Etavsl1PhiL1On=0;
1043  MonitorElement *NL1Off, *offEtL1Off, *offEtavsoffPhiL1Off=0;
1044  MonitorElement *NOnOff, *offEtOnOff, *offEtavsoffPhiOnOff=0;
1045  MonitorElement *NL1OnUM, *l1EtL1OnUM, *l1Etavsl1PhiL1OnUM=0;
1046  MonitorElement *NL1OffUM, *offEtL1OffUM, *offEtavsoffPhiL1OffUM=0;
1047  MonitorElement *NOnOffUM, *offEtOnOffUM, *offEtavsoffPhiOnOffUM=0;
1048  MonitorElement *offDRL1Off, *offDROnOff, *l1DRL1On=0;
1049 
1050 
1051  std::string labelname("dummy");
1052  labelname = v->getPath() + "_wrt_" + v->getDenomPath();
1053  std::string histoname(labelname+"_NOn");
1054  std::string title(labelname+" N online");
1055  double histEtaMax = 2.5;
1056 
1057  if (v->getObjectType() == trigger::TriggerMuon || v->getObjectType() == trigger::TriggerL1Mu) {
1058 
1059  histEtaMax = muonEtaMax_;
1060 
1061  }
1062  else if (v->getObjectType() == trigger::TriggerElectron || v->getObjectType() == trigger::TriggerL1NoIsoEG || v->getObjectType() == trigger::TriggerL1IsoEG )
1063  {
1064  histEtaMax = electronEtaMax_;
1065  }
1066  else if (v->getObjectType() == trigger::TriggerTau || v->getObjectType() == trigger::TriggerL1TauJet )
1067  {
1068  histEtaMax = tauEtaMax_;
1069  }
1070  else if (v->getObjectType() == trigger::TriggerJet || v->getObjectType() == trigger::TriggerL1CenJet || v->getObjectType() == trigger::TriggerL1ForJet )
1071  {
1072  histEtaMax = jetEtaMax_;
1073  }
1074  else if (v->getObjectType() == trigger::TriggerBJet)
1075  {
1076  histEtaMax = bjetEtaMax_;
1077  }
1078  else if (v->getObjectType() == trigger::TriggerMET || v->getObjectType() == trigger::TriggerL1ETM )
1079  {
1080  histEtaMax = metEtaMax_;
1081  }
1082  else if (v->getObjectType() == trigger::TriggerPhoton)
1083  {
1084  histEtaMax = photonEtaMax_;
1085  }
1086  else if (v->getObjectType() == trigger::TriggerTrack)
1087  {
1088  histEtaMax = trackEtaMax_;
1089  }
1090 
1091  TString pathfolder = dirname_ + TString("/") + v->getPath();
1092  dbe_->setCurrentFolder(pathfolder.Data());
1093 
1094  NOn = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1095 
1096 
1097  histoname = labelname+"_NOff";
1098  title = labelname+" N Off";
1099  NOff = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1100 
1101  histoname = labelname+"_NL1";
1102  title = labelname+" N L1";
1103  NL1 = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1104 
1105  histoname = labelname+"_NL1On";
1106  title = labelname+" N L1On";
1107  NL1On = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1108 
1109  histoname = labelname+"_NL1Off";
1110  title = labelname+" N L1Off";
1111  NL1Off = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1112 
1113  histoname = labelname+"_NOnOff";
1114  title = labelname+" N OnOff";
1115  NOnOff = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1116 
1117 
1118  histoname = labelname+"_NL1OnUM";
1119  title = labelname+" N L1OnUM";
1120  NL1OnUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1121 
1122  histoname = labelname+"_NL1OffUM";
1123  title = labelname+" N L1OffUM";
1124  NL1OffUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1125 
1126  histoname = labelname+"_NOnOffUM";
1127  title = labelname+" N OnOffUM";
1128  NOnOffUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1129 
1130 
1131  histoname = labelname+"_onEtOn";
1132  title = labelname+" onE_t online";
1133  onEtOn = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1134 
1135  histoname = labelname+"_onOneOverEtOn";
1136  title = labelname+" 1 / onE_t online";
1137  onOneOverEtOn = dbe->book1D(histoname.c_str(), title.c_str(),nBinsOneOverEt_, 0, 1);
1138  onOneOverEtOn->setAxisTitle("HLT 1/Et [1/GeV]");
1139 
1140  histoname = labelname+"_offEtOff";
1141  title = labelname+" offE_t offline";
1142  offEtOff = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1143 
1144  histoname = labelname+"_l1EtL1";
1145  title = labelname+" l1E_t L1";
1146  l1EtL1 = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1147 
1148  int nBins2D = 10;
1149 
1150 
1151  histoname = labelname+"_onEtaonPhiOn";
1152  title = labelname+" on#eta vs on#phi online";
1153  onEtavsonPhiOn = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1154 
1155  histoname = labelname+"_offEtaoffPhiOff";
1156  title = labelname+" off#eta vs off#phi offline";
1157  offEtavsoffPhiOff = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1158 
1159  histoname = labelname+"_l1Etal1PhiL1";
1160  title = labelname+" l1#eta vs l1#phi L1";
1161  l1Etavsl1PhiL1 = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1162 
1163  histoname = labelname+"_l1EtL1On";
1164  title = labelname+" l1E_t L1+online";
1165  l1EtL1On = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1166 
1167  histoname = labelname+"_offEtL1Off";
1168  title = labelname+" offE_t L1+offline";
1169  offEtL1Off = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1170 
1171  histoname = labelname+"_offEtOnOff";
1172  title = labelname+" offE_t online+offline";
1173  offEtOnOff = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1174 
1175  histoname = labelname+"_l1Etal1PhiL1On";
1176  title = labelname+" l1#eta vs l1#phi L1+online";
1177  l1Etavsl1PhiL1On = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1178 
1179  histoname = labelname+"_offEtaoffPhiL1Off";
1180  title = labelname+" off#eta vs off#phi L1+offline";
1181  offEtavsoffPhiL1Off = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1182 
1183  histoname = labelname+"_offEtaoffPhiOnOff";
1184  title = labelname+" off#eta vs off#phi online+offline";
1185  offEtavsoffPhiOnOff = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1186 
1187  histoname = labelname+"_l1EtL1OnUM";
1188  title = labelname+" l1E_t L1+onlineUM";
1189  l1EtL1OnUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1190 
1191  histoname = labelname+"_offEtL1OffUM";
1192  title = labelname+" offE_t L1+offlineUM";
1193  offEtL1OffUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1194 
1195  histoname = labelname+"_offEtOnOffUM";
1196  title = labelname+" offE_t online+offlineUM";
1197  offEtOnOffUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1198 
1199  histoname = labelname+"_l1Etal1PhiL1OnUM";
1200  title = labelname+" l1#eta vs l1#phi L1+onlineUM";
1201  l1Etavsl1PhiL1OnUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1202 
1203  histoname = labelname+"_offEtaoffPhiL1OffUM";
1204  title = labelname+" off#eta vs off#phi L1+offlineUM";
1205  offEtavsoffPhiL1OffUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1206 
1207  histoname = labelname+"_offEtaoffPhiOnOffUM";
1208  title = labelname+" off#eta vs off#phi online+offlineUM";
1209  offEtavsoffPhiOnOffUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D,-histEtaMax,histEtaMax, nBins2D,-TMath::Pi(), TMath::Pi());
1210 
1211 
1212 
1213 
1214  histoname = labelname+"_l1DRL1On";
1215  title = labelname+" l1DR L1+online";
1216  l1DRL1On = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, 0, 1.);
1217 
1218  histoname = labelname+"_offDRL1Off";
1219  title = labelname+" offDR L1+offline";
1220  offDRL1Off = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, 0, 1.);
1221 
1222  histoname = labelname+"_offDROnOff";
1223  title = labelname+" offDR online+offline";
1224  offDROnOff = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, 0, 1.);
1225 
1226 
1227  v->setHistos( NOn, onEtOn, onOneOverEtOn, onEtavsonPhiOn, NOff, offEtOff, offEtavsoffPhiOff, NL1, l1EtL1, l1Etavsl1PhiL1, NL1On, l1EtL1On, l1Etavsl1PhiL1On, NL1Off, offEtL1Off, offEtavsoffPhiL1Off, NOnOff, offEtOnOff, offEtavsoffPhiOnOff, NL1OnUM, l1EtL1OnUM, l1Etavsl1PhiL1OnUM, NL1OffUM, offEtL1OffUM, offEtavsoffPhiL1OffUM, NOnOffUM, offEtOnOffUM, offEtavsoffPhiOnOffUM, offDRL1Off, offDROnOff, l1DRL1On
1228 );
1229 
1230 
1231  } // end for hltPath
1232 
1233  // HLT_Any
1234  // book Count vs LS
1236  MonitorElement* tempME = dbe_->book1D("HLT_Any_count_per_LS",
1237  "HLT_Any count per LS",
1238  nLS_, 0,nLS_);
1239  tempME->setAxisTitle("Luminosity Section");
1240 
1241  } // end if(1) dummy
1242 
1243  return;
1244 
1245 }
#define LogDebug(id)
unsigned int size() const
number of trigger paths in trigger table
const double Pi
PathInfoCollection hltPathsDiagonal_
int i
Definition: DBlmapReader.cc:9
const std::string getL1ConditionModuleName(const std::string &pathname)
RunID const & id() const
Definition: RunBase.h:41
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::string & triggerName(unsigned int triggerIndex) const
std::vector< std::pair< std::string, std::vector< int > > > fPathBxTempCountPair
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:942
enum start value shifted to 81 so as to avoid clashes with PDG codes
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
std::vector< std::pair< std::string, int > > fPathTempCountPair
std::vector< TPRegexp > filters
Definition: eve_filter.cc:25
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::string pathsIndividualHLTPathsPerLSFolder_
PathInfoCollection hltPaths_
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
std::vector< std::pair< std::string, int > > fGroupTempCountPair
int j
Definition: DBlmapReader.cc:9
bool first
Definition: L1TdeRCT.cc:75
#define LogTrace(id)
int k[5][pyjets_maxn]
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
HLTConfigProvider hltConfig_
std::string pathsSummaryFilterCountsFolder_
std::vector< std::string > specialPaths_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::vector< std::string > fGroupName
string histoname
Definition: dt-layouts.py:48
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
std::vector< std::pair< std::string, int > > fGroupL1TempCountPair
int getTriggerTypeParsePathName(const std::string &pathname)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
const std::vector< std::string > & datasetNames() const
void FourVectorHLTOnline::cleanDRMatchSet ( mmset tempSet)

Clean DR Match Set.

Definition at line 1256 of file FourVectorHLTOnline.cc.

References i, and LogDebug.

Referenced by objMonData< T >::fillOnL1Match().

1257 {
1258 
1259  LogDebug("FourVectorHLTOnline") << "cleanDRMatchSet(mmset& tempSet) " << "size of the set (before CLEANING) = " << tempSet.size() << " maps." << std::endl;
1260 
1261  if(tempSet.size() < 2) return;
1262 
1263  if(tempSet.size() > 10) {
1264 
1265  LogDebug("FourVectorHLTOnline") << "size of the set is too large. It will be truncated to 10." << std::endl;
1266  mmset::iterator it = tempSet.begin();
1267  for (int i=0;i<10;i++) { it++; }
1268  tempSet.erase( it, tempSet.end());
1269  LogDebug("FourVectorHLTOnline") << "size of the set is now = " << tempSet.size() << " maps." << std::endl;
1270 
1271  }
1272 
1273  bool cleanedOneMap = false;
1274 
1275  // cleaning needed if the set has at least two maps
1276 
1277  while(! cleanedOneMap && tempSet.size() > 1) {
1278 
1279  cleanedOneMap=false;
1280 
1281  //LogTrace("FourVectorHLTOnline") << "cleaning: size of the set = " << tempSet.size() << " maps." << std::endl;
1282 
1283  int imap = 0;
1284  for ( mmset::iterator setIter_i = tempSet.begin( ); setIter_i != tempSet.end( ); setIter_i++ ) {
1285 
1286  fimmap tempMap_j = *setIter_i;
1287 
1288  //LogTrace("FourVectorHLTOnline") << " map " << imap << std::endl;
1289  //LogTrace("FourVectorHLTOnline") << " --------" << std::endl;
1290 
1291  for (fimmap::iterator it = tempMap_j.begin(); it != tempMap_j.end(); ++it) {
1292 
1293  //LogTrace("FourVectorHLTOnline") << " " << (*it).first << " : " << (*it).second << std::endl;
1294 
1295  }
1296 
1297  imap++;
1298 
1299  }
1300 
1301  // loop i
1302  for ( mmset::iterator setIter_i = tempSet.begin( ); setIter_i != tempSet.end( ); setIter_i++ ) {
1303 
1304  fimmap tempMap_i = *setIter_i;
1305  fimmap::iterator it = tempMap_i.begin();
1306  int topValue = (*it).second;
1307  //LogTrace("FourVectorHLTOnline") << " topValue = " << topValue << std::endl;
1308 
1309 
1310  mmset::iterator tempIter_i = setIter_i;
1311 
1312  // from all the other maps, clean entries that have mapped value "topValue"
1313  // loop j
1314  for ( mmset::iterator setIter_j = ++tempIter_i; setIter_j != tempSet.end( ); setIter_j++ ) {
1315 
1316  fimmap tempMap_j = *setIter_j;
1317  //LogTrace("FourVectorHLTOnline") << " size of the map = " << tempMap_j.size() << std::endl;
1318 
1319  for (fimmap::iterator it = tempMap_j.begin(); it != tempMap_j.end(); ++it)
1320  {
1321 
1322  if(topValue == (*it).second) {
1323 
1324  //LogTrace("FourVectorHLTOnline") << " Ridding map of a doubly-matched object." << std::endl;
1325  tempMap_j.erase(it);
1326  cleanedOneMap = true;
1327 
1328  }
1329 
1330  } //end for
1331 
1332  if(cleanedOneMap) {
1333 
1334  //remove the old map from the set
1335  tempSet.erase(setIter_j);
1336 
1337  // insert in the set the new map if it is not an empty map
1338  if(! tempMap_j.empty()) tempSet.insert(tempMap_j);
1339 
1340  break; // break from loop j
1341 
1342  } // end if
1343 
1344  }// end loop j
1345 
1346  if(cleanedOneMap) break; // break from loop i
1347 
1348  } // end loop i
1349 
1350  if(cleanedOneMap) {
1351 
1352  // continue cleaning (in while loop)
1353  // but reset flag first
1354  cleanedOneMap=false;
1355  continue;
1356 
1357  }
1358  else {
1359 
1360  // finished cleaing (break from while loop)
1361  break;
1362 
1363  }
1364 
1365  } // end while
1366 
1367  //LogTrace("FourVectorHLTOnline") << "cleaned: size of the set = " << tempSet.size() << " maps." << std::endl;
1368  int jmap = 0;
1369 
1370  for ( mmset::iterator setIter_i = tempSet.begin( ); setIter_i != tempSet.end( ); setIter_i++ )
1371  {
1372 
1373  fimmap tempMap_j = *setIter_i;
1374 
1375  //LogTrace("FourVectorHLTOnline") << " map " << jmap << std::endl;
1376  //LogTrace("FourVectorHLTOnline") << " --------" << std::endl;
1377 
1378  for (fimmap::iterator it = tempMap_j.begin(); it != tempMap_j.end(); ++it) {
1379 
1380  //LogTrace("FourVectorHLTOnline") << " " << (*it).first << " : " << (*it).second << std::endl;
1381 
1382  }
1383 
1384  jmap++;
1385 
1386  } // end for
1387 
1388  return;
1389 
1390 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
std::multimap< float, int > fimmap
void FourVectorHLTOnline::countHLTGroupBXHitsEndLumiBlock ( const int &  lumi)
private

Definition at line 1688 of file FourVectorHLTOnline.cc.

References plotTTrigFromHistos::binNumber(), runGlobalFakeInputProducer::bxOffset, dbe_, fGroupName, fGroupNamePathsPair, first, fPathBxTempCountPair, DQMStore::get(), MonitorElement::getName(), MonitorElement::getTH2F(), i, j, gen::k, LogDebug, LogTrace, ME_HLT_BX_, Nbx_, timingPdfMaker::pathname, pathsSummaryHLTPathsPerBXFolder_, referenceBX_, edm::second(), findQualityFiles::size, and AlCaHLTBitMon_QueryRunRegistry::string.

1689 {
1690 
1691  LogTrace("FourVectorHLTOnline") << " countHLTGroupBXHitsEndLumiBlock() lumiSection number " << lumi << std::endl;
1692 
1693  TH2F * hist_2d_bx = ME_HLT_BX_->getTH2F();
1694 
1695  for (std::vector<std::pair<std::string, std::vector<int> > >::iterator ip = fPathBxTempCountPair.begin(); ip != fPathBxTempCountPair.end(); ++ip) {
1696 
1697  // get the path and its previous count
1698  std::string pathname = ip->first;
1699  std::vector<int> prevCount = ip->second;
1700 
1701  // vector of 5 zeros
1702  std::vector<int> currCount (5,0);
1703  std::vector<int> diffCount (5,0);
1704 
1705  // get the current count of path up to now
1706  int pathBin = hist_2d_bx->GetYaxis()->FindBin(pathname.c_str());
1707 
1708  if(pathBin > hist_2d_bx->GetNbinsY()) {
1709 
1710  LogTrace("FourVectorHLTOnline") << " Cannot find the bin for path " << pathname << std::endl;
1711  continue;
1712 
1713  }
1714 
1715  for (unsigned int j =0;j<currCount.size();j++) {
1716 
1717  int bxOffset = j-2;
1718  int bunch = referenceBX_+bxOffset;
1719  if(bunch < 1) bunch += Nbx_ ;
1720  int bxBin = bunch +1; // add one to get the right bin
1721 
1722 
1723  currCount[j] = int(hist_2d_bx->GetBinContent(bxBin, pathBin)); // add one to get the right bin
1724 
1725  LogTrace("FourVectorHLTOnline") << "currCount = " << currCount[j] << std::endl;
1726 
1727  // count due to prev lumi sec is a difference bw current and previous
1728  diffCount[j] = currCount[j] - prevCount[j];
1729 
1730  LogTrace("FourVectorHLTOnline") << " lumi = " << lumi << " path " << pathname << "bxOffset = " << bxOffset << " count = " << diffCount[j] << std::endl;
1731 
1732  // set the counter in the pair to current count
1733  ip->second = currCount;
1734 
1735  } // end for bx j
1736 
1738  // fill the 2D Group paths' BX count per LS
1740  LogTrace("FourVectorHLTOnline") << "Find " << pathname << std::endl;
1741  for(unsigned int i=0; i<fGroupName.size(); i++){
1742 
1743  bool isMember = false;
1744  //check if the path is in this group
1745  for (unsigned int j=0;j<fGroupNamePathsPair.size();j++) {
1746 
1747  LogTrace("FourVectorHLTOnline") << " ---- Group " << fGroupNamePathsPair[j].first << std::endl;
1748  if(fGroupNamePathsPair[j].first != fGroupName[i]) continue;
1749 
1750  for (unsigned int k = 0; k<(fGroupNamePathsPair[j].second).size();k++) {
1751 
1752  LogTrace("FourVectorHLTOnline") << " comparing to " << fGroupNamePathsPair[j].second[k] << std::endl;
1753 
1754  if(fGroupNamePathsPair[j].second[k] == pathname) {
1755 
1756  isMember = true;
1757  break;
1758 
1759  }
1760 
1761  } // end for k
1762  } // end for j
1763 
1764 
1765  if(!isMember) {
1766 
1767  LogTrace("FourVectorHLTOnline") << "Could not find a group to which the path belongs, path = " << pathname << " group = " << fGroupName[i] << std::endl;
1768  continue;
1769 
1770  }
1771 
1772  std::string fullPathToME = pathsSummaryHLTPathsPerBXFolder_ + "HLT_"+fGroupName[i] + "_BX_LS";
1773  MonitorElement* ME_2d = dbe_->get(fullPathToME);
1774 
1775  if ( ME_2d) {
1776 
1777  TH2F* hist_All = ME_2d->getTH2F();
1778 
1779  for (unsigned int j = 0; j<diffCount.size();j++) {
1780 
1781  // find the bin
1782  int binNumber = j+1; // add one to get right bin
1783 
1784  // update the bin content (must do that since events don't ncessarily come in the order
1785  int currentLumiCount = int(hist_All->GetBinContent(lumi+1,binNumber));
1786  int updatedLumiCount = currentLumiCount + diffCount[j];
1787  hist_All->SetBinContent(lumi+1,binNumber,updatedLumiCount);
1788  } // end for bx j
1789 
1790  }
1791  else {
1792 
1793  LogDebug("FourVectorHLTOnline") << " cannot find ME_2d" << ME_2d->getName() << std::endl;
1794 
1795  }
1796 
1797 
1798  } // end for group i
1799 
1800  } // end for ip
1801 
1802 }
#define LogDebug(id)
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
std::string pathsSummaryHLTPathsPerBXFolder_
std::vector< std::pair< std::string, std::vector< int > > > fPathBxTempCountPair
tuple lumi
Definition: fjr2json.py:35
U second(std::pair< T, U > const &p)
int j
Definition: DBlmapReader.cc:9
MonitorElement * ME_HLT_BX_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1693
bool first
Definition: L1TdeRCT.cc:75
#define LogTrace(id)
int k[5][pyjets_maxn]
std::vector< std::string > fGroupName
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
TH2F * getTH2F(void) const
tuple size
Write out results.
void FourVectorHLTOnline::countHLTGroupHitsEndLumiBlock ( const int &  lumi)
private

Definition at line 1885 of file FourVectorHLTOnline.cc.

References dbe_, fGroupNamePathsPair, fGroupTempCountPair, DQMStore::get(), MonitorElement::getTH1(), MonitorElement::getTH1F(), i, LogDebug, LogTrace, timingPdfMaker::pathname, pathsSummaryHLTPathsPerLSFolder_, and AlCaHLTBitMon_QueryRunRegistry::string.

1886 {
1887 
1888  LogTrace("FourVectorHLTOnline") << " countHLTGroupHitsEndLumiBlock() lumiSection number " << lumi << std::endl;
1889  //for(unsigned int i=0; i<fGroupName.size(); i++){
1890  for(unsigned int i=0; i<fGroupNamePathsPair.size(); i++){
1891 
1892  // get the count of path up to now
1893  //string fullPathToME = "HLT/FourVector/PathsSummary/HLT_" + fGroupName[i] + "_Pass_Any";
1894  std::string fullPathToME = "HLT/FourVector/PathsSummary/HLT_" + fGroupNamePathsPair[i].first + "_Pass_Any";
1895  MonitorElement* ME_1d = dbe_->get(fullPathToME);
1896 
1897  if(! ME_1d) {
1898 
1899  LogTrace("FourVectorHLTOnline") << " could not find 1d matrix " << fullPathToME << std::endl;
1900 
1901  continue;
1902 
1903  }
1904 
1905  LogTrace("FourVectorHLTOnline") << " Looking in histogram " << fullPathToME << std::endl;
1906 
1907  TH1F * hist_1d = ME_1d->getTH1F();
1908 
1909  for (std::vector<std::pair<std::string, int> >::iterator ip = fGroupTempCountPair.begin(); ip != fGroupTempCountPair.end(); ++ip) {
1910 
1911  // get the path and its previous count
1912  std::string pathname = ip->first;
1913  int prevCount = ip->second;
1914 
1915  std::string binLabel = "HLT_"+pathname+"_Any";
1916 
1917  LogTrace("FourVectorHLTOnline") << " Looking for binLabel = " << binLabel << std::endl;
1918  // get the current count of path up to now
1919  int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1920 
1921  LogTrace("FourVectorHLTOnline") << " pathBin = " << pathBin << " out of histogram total number of bins " << hist_1d->GetNbinsX() << std::endl;
1922  if(pathBin == -1) {
1923 
1924  LogTrace("FourVectorHLTOnline") << " Cannot find the bin for path " << pathname << std::endl;
1925  continue;
1926 
1927  }
1928 
1929  int currCount = int(hist_1d->GetBinContent(pathBin));
1930 
1931  // count due to prev lumi sec is a difference bw current and previous
1932  int diffCount = currCount - prevCount;
1933 
1934  LogTrace("FourVectorHLTOnline") << " lumi = " << lumi << " path " << pathname << " count " << diffCount << std::endl;
1935 
1936  // set the counter in the pair to current count
1937  ip->second = currCount;
1938 
1939 
1941  // fill the 1D individual path count per LS
1943  std::string fullPathToME_count = pathsSummaryHLTPathsPerLSFolder_ +"HLT_" + pathname + "_Total_LS";
1944  MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
1945  if ( ME_1d) {
1946 
1947  // update the bin content (must do that since events don't ncessarily come in the order
1948  int currentLumiCount = int(ME_1d->getTH1()->GetBinContent(lumi+1));
1949  int updatedLumiCount = currentLumiCount + diffCount;
1950  ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
1951 
1952  }
1953  else {
1954 
1955  LogDebug("FourVectorHLTOnline") << " cannot find ME " << fullPathToME_count << std::endl;
1956 
1957  }
1958 
1959  } // end for ip
1960 
1961  } // end for i
1962 
1963 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
std::string pathsSummaryHLTPathsPerLSFolder_
std::vector< std::pair< std::string, int > > fGroupTempCountPair
TH1 * getTH1(void) const
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1693
#define LogTrace(id)
TH1F * getTH1F(void) const
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
void FourVectorHLTOnline::countHLTGroupL1HitsEndLumiBlock ( const int &  lumi)
private

Definition at line 1804 of file FourVectorHLTOnline.cc.

References dbe_, fGroupL1TempCountPair, fGroupNamePathsPair, DQMStore::get(), MonitorElement::getTH1(), MonitorElement::getTH1F(), i, LogDebug, LogTrace, timingPdfMaker::pathname, pathsSummaryHLTPathsPerLSFolder_, and AlCaHLTBitMon_QueryRunRegistry::string.

1805 {
1806 
1807  LogTrace("FourVectorHLTOnline") << " countHLTGroupL1HitsEndLumiBlock() lumiSection number " << lumi << std::endl;
1808 
1809  //for(unsigned int i=0; i<fGroupName.size(); i++){
1810  for(unsigned int i=0; i<fGroupNamePathsPair.size(); i++){
1811 
1812  // get the count of path up to now
1813  std::string fullPathToME = "HLT/FourVector/PathsSummary/HLT_" + fGroupNamePathsPair[i].first+ "_Pass_Any";
1814  MonitorElement* ME_1d = dbe_->get(fullPathToME);
1815 
1816  if(! ME_1d) {
1817 
1818  LogTrace("FourVectorHLTOnline") << " could not find 1d matrix " << fullPathToME << std::endl;
1819 
1820  continue;
1821 
1822  }
1823 
1824  LogTrace("FourVectorHLTOnline") << " Looking in histogram " << fullPathToME << std::endl;
1825 
1826  TH1F * hist_1d = ME_1d->getTH1F();
1827 
1828  for (std::vector<std::pair<std::string, int> >::iterator ip = fGroupL1TempCountPair.begin(); ip != fGroupL1TempCountPair.end(); ++ip) {
1829 
1830  // get the path and its previous count
1831  std::string pathname = ip->first;
1832  int prevCount = ip->second;
1833 
1834  std::string binLabel = "HLT_"+pathname+"_L1_Any";
1835 
1836  LogTrace("FourVectorHLTOnline") << " Looking for binLabel = " << binLabel << std::endl;
1837  // get the current count of path up to now
1838  int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1839 
1840  LogTrace("FourVectorHLTOnline") << " pathBin = " << pathBin << " out of histogram total number of bins " << hist_1d->GetNbinsX() << std::endl;
1841  if(pathBin == -1) {
1842 
1843  LogTrace("FourVectorHLTOnline") << " Cannot find the bin for path " << pathname << std::endl;
1844  continue;
1845 
1846  }
1847 
1848  int currCount = int(hist_1d->GetBinContent(pathBin));
1849 
1850  // count due to prev lumi sec is a difference bw current and previous
1851  int diffCount = currCount - prevCount;
1852 
1853  LogTrace("FourVectorHLTOnline") << " lumi = " << lumi << " path " << pathname << " count " << diffCount << std::endl;
1854 
1855  // set the counter in the pair to current count
1856  ip->second = currCount;
1857 
1858 
1860  // fill the 1D individual path count per LS
1862  std::string fullPathToME_count = pathsSummaryHLTPathsPerLSFolder_ +"HLT_" + pathname + "_L1_Total_LS";
1863  MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
1864  if ( ME_1d) {
1865 
1866  // update the bin content (must do that since events don't ncessarily come in the order
1867  int currentLumiCount = int(ME_1d->getTH1()->GetBinContent(lumi+1));
1868  int updatedLumiCount = currentLumiCount + diffCount;
1869  ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
1870 
1871  }
1872  else {
1873 
1874  LogDebug("FourVectorHLTOnline") << " cannot find ME " << fullPathToME_count << std::endl;
1875 
1876  }
1877 
1878  } // end for ip
1879 
1880  } // end for i
1881 
1882 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
std::string pathsSummaryHLTPathsPerLSFolder_
TH1 * getTH1(void) const
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1693
#define LogTrace(id)
TH1F * getTH1F(void) const
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
std::vector< std::pair< std::string, int > > fGroupL1TempCountPair
void FourVectorHLTOnline::countHLTPathHitsEndLumiBlock ( const int &  lumi)
private

Definition at line 1966 of file FourVectorHLTOnline.cc.

References dbe_, fPathTempCountPair, DQMStore::get(), MonitorElement::getTH1(), MonitorElement::getTH2F(), i, LogDebug, LogTrace, ME_HLTAll_LS_, timingPdfMaker::pathname, pathsIndividualHLTPathsPerLSFolder_, AlCaHLTBitMon_QueryRunRegistry::string, and v_ME_HLTAll_LS_.

1967 {
1968 
1969  LogTrace("FourVectorHLTOnline") << " countHLTPathHitsEndLumiBlock() lumiSection number " << lumi << std::endl;
1970  // get the count of path up to now
1971  std::string fullPathToME = "HLT/FourVector/PathsSummary/HLT_All_PassPass";
1972  MonitorElement* ME_2d = dbe_->get(fullPathToME);
1973 
1974  if(! ME_2d) {
1975 
1976  LogTrace("FourVectorHLTOnline") << " could not fine 2d matrix " << fullPathToME << std::endl;
1977 
1978  return;
1979 
1980  }
1981 
1982  TH2F * hist_2d = ME_2d->getTH2F();
1983 
1984  for (std::vector<std::pair<std::string, int> >::iterator ip = fPathTempCountPair.begin(); ip != fPathTempCountPair.end(); ++ip) {
1985 
1986  // get the path and its previous count
1987  std::string pathname = ip->first;
1988  int prevCount = ip->second;
1989 
1990  // get the current count of path up to now
1991  int pathBin = hist_2d->GetXaxis()->FindBin(pathname.c_str());
1992 
1993  if(pathBin > hist_2d->GetNbinsX()) {
1994 
1995  LogTrace("FourVectorHLTOnline") << " Cannot find the bin for path " << pathname << std::endl;
1996  continue;
1997 
1998  }
1999 
2000  int currCount = int(hist_2d->GetBinContent(pathBin, pathBin));
2001 
2002  // count due to prev lumi sec is a difference bw current and previous
2003  int diffCount = currCount - prevCount;
2004 
2005  LogTrace("FourVectorHLTOnline") << " lumi = " << lumi << " path " << pathname << " count " << diffCount << std::endl;
2006 
2007  // set the counter in the pair to current count
2008  ip->second = currCount;
2009 
2011  // fill the 2D All paths' count per LS
2013  if ( ME_HLTAll_LS_) {
2014 
2015  TH2F* hist_All = ME_HLTAll_LS_->getTH2F();
2016 
2017  // find the bin
2018  int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
2019 
2020  // update the bin content (must do that since events don't ncessarily come in the order
2021  int currentLumiCount = int(hist_All->GetBinContent(lumi+1,pathBinNumber));
2022  int updatedLumiCount = currentLumiCount + diffCount;
2023  hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
2024 
2025  }
2026  else {
2027 
2028  LogDebug("FourVectorHLTOnline") << " cannot find ME_HLTAll_LS_" << std::endl;
2029 
2030  }
2031 
2032  for (unsigned int i=0 ; i< v_ME_HLTAll_LS_.size(); i++) {
2033 
2034  MonitorElement* tempME = v_ME_HLTAll_LS_[i];
2035 
2036  if ( tempME ) {
2037 
2038  TH2F* hist_All = tempME->getTH2F();
2039 
2040  // find the bin
2041  int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
2042  // update the bin content (must do that since events don't ncessarily come in the order
2043  int currentLumiCount = int(hist_All->GetBinContent(lumi+1,pathBinNumber));
2044  int updatedLumiCount = currentLumiCount + diffCount;
2045  hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
2046 
2047  }
2048  else {
2049 
2050  LogDebug("FourVectorHLTOnline") << " cannot find tempME " << std::endl;
2051 
2052  }
2053 
2054  }
2055 
2056 
2058  // fill the 1D individual path count per LS
2060  std::string fullPathToME_count = pathsIndividualHLTPathsPerLSFolder_ + pathname + "_count_per_LS";
2061  MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
2062  if ( ME_1d) {
2063 
2064  // update the bin content (must do that since events don't ncessarily come in the order
2065  int currentLumiCount = int(ME_1d->getTH1()->GetBinContent(lumi+1));
2066  int updatedLumiCount = currentLumiCount + diffCount;
2067  ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2068 
2069  }
2070  else {
2071 
2072  LogDebug("FourVectorHLTOnline") << " cannot find ME " << fullPathToME_count << std::endl;
2073 
2074  }
2075 
2076  } // end for ip
2077 
2078 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
std::vector< std::pair< std::string, int > > fPathTempCountPair
std::string pathsIndividualHLTPathsPerLSFolder_
TH1 * getTH1(void) const
std::vector< MonitorElement * > v_ME_HLTAll_LS_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1693
#define LogTrace(id)
MonitorElement * ME_HLTAll_LS_
TH2F * getTH2F(void) const
void FourVectorHLTOnline::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 630 of file FourVectorHLTOnline.cc.

References nev_.

631 {
632  LogInfo("FourVectorHLTOnline") << "analyzed " << nev_ << " events";
633  return;
634 }
void FourVectorHLTOnline::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1674 of file FourVectorHLTOnline.cc.

References edm::LuminosityBlockBase::id(), LogTrace, fjr2json::lumi, and edm::LuminosityBlockID::luminosityBlock().

1675 {
1676 
1677  int lumi = int(lumiSeg.id().luminosityBlock());
1678  LogTrace("FourVectorHLTOnline") << " end lumiSection number " << lumi << std::endl;
1679 
1680  //countHLTPathHitsEndLumiBlock(lumi);
1681  //countHLTGroupHitsEndLumiBlock(lumi);
1682  //countHLTGroupL1HitsEndLumiBlock(lumi);
1683 
1684  //countHLTGroupBXHitsEndLumiBlock(lumi);
1685 
1686 }
LuminosityBlockID id() const
tuple lumi
Definition: fjr2json.py:35
#define LogTrace(id)
LuminosityBlockNumber_t luminosityBlock() const
void FourVectorHLTOnline::endRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 1248 of file FourVectorHLTOnline.cc.

References edm::RunBase::id(), and LogDebug.

1249 {
1250 
1251  LogDebug("FourVectorHLTOnline") << "endRun, run " << run.id();
1252 
1253 }
#define LogDebug(id)
RunID const & id() const
Definition: RunBase.h:41
void FourVectorHLTOnline::fillHltMatrix ( const edm::TriggerNames triggerNames)
private

Definition at line 1468 of file FourVectorHLTOnline.cc.

References dbe_, fGroupNamePathsPair, DQMStore::get(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), hasL1Passed(), i, j, LogTrace, AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerIndex(), and triggerResults_.

1468  {
1469 
1470  std::string fullPathToME;
1471 
1472  //for (unsigned int mi=0;mi<fGroupName.size();mi++) {
1473  for (unsigned int mi=0;mi<fGroupNamePathsPair.size();mi++) {
1474 
1475 
1476  fullPathToME = "HLT/FourVector/PathsSummary/HLT_"+fGroupNamePathsPair[mi].first+"_PassPass";
1477  MonitorElement* ME_2d = dbe_->get(fullPathToME);
1478  fullPathToME = "HLT/FourVector/PathsSummary/HLT_"+fGroupNamePathsPair[mi].first+"_Pass_Any";
1479  MonitorElement* ME_1d = dbe_->get(fullPathToME);
1480  if(!ME_2d || !ME_1d) {
1481 
1482  LogTrace("FourVectorHLTOnline") << " ME not valid although I gave full path" << std::endl;
1483  continue;
1484 
1485  }
1486 
1487  TH2F * hist_2d = ME_2d->getTH2F();
1488  TH1F * hist_1d = ME_1d->getTH1F();
1489 
1490  // Fill HLTPassed Matrix bin (i,j) = (Any,Any)
1491  // --------------------------------------------------------
1492  int anyBinNumber = hist_2d->GetXaxis()->FindBin("HLT_Any");
1493  // any triger accepted
1494  if(triggerResults_->accept()){
1495 
1496  hist_2d->Fill(anyBinNumber-1,anyBinNumber-1);//binNumber1 = 0 = first filter
1497  hist_1d->Fill(anyBinNumber-1);//binNumber1 = 0 = first filter
1498 
1499  }
1500 
1501  bool groupPassed = false;
1502  bool groupL1Passed = false;
1503 
1504  // Main loop over paths
1505  // --------------------
1506 
1507  for (int i=1; i< hist_2d->GetNbinsX();i++) {
1508 
1509  std::string hltpathname = hist_2d->GetXaxis()->GetBinLabel(i);
1510 
1511 
1512  // check if this is hlt path name
1513  unsigned int pathByIndex = triggerNames.triggerIndex(hltpathname);
1514  if(pathByIndex >= triggerResults_->size() ) continue;
1515 
1516  // check if its L1 passed
1517  if(hasL1Passed(hltpathname,triggerNames)) groupL1Passed = true;
1518 
1519  // Fill HLTPassed Matrix and HLTPassFail Matrix
1520  // --------------------------------------------------------
1521 
1522  if(triggerResults_->accept(pathByIndex)){
1523 
1524  groupPassed = true;
1525  //groupL1Passed = true;
1526 
1527  if(groupPassed && !groupL1Passed)
1528 
1529  hist_2d->Fill(i-1,anyBinNumber-1);//binNumber1 = 0 = first filter
1530  hist_2d->Fill(anyBinNumber-1,i-1);//binNumber1 = 0 = first filter
1531 
1532  hist_1d->Fill(i-1);//binNumber1 = 0 = first filter
1533 
1534  for (int j=1; j< hist_2d->GetNbinsY();j++) {
1535 
1536  unsigned int crosspathByIndex = triggerNames.triggerIndex(hist_2d->GetXaxis()->GetBinLabel(j));
1537  if(crosspathByIndex >= triggerResults_->size() ) continue;
1538 
1539  if(triggerResults_->accept(crosspathByIndex)){
1540 
1541  hist_2d->Fill(i-1,j-1);//binNumber1 = 0 = first filter
1542 
1543  } // end if j path passed
1544 
1545  } // end for j
1546 
1547  } // end if i passed
1548 
1549 
1550  } // end for i
1551 
1552  std::string groupBinLabel = "HLT_"+fGroupNamePathsPair[mi].first+"_Any";
1553  int groupBinNumber = hist_2d->GetXaxis()->FindBin(groupBinLabel.c_str());
1554  if(groupPassed) hist_1d->Fill(groupBinNumber-1);//binNumber1 = 0 = first filter
1555 
1556  std::string groupL1BinLabel = "HLT_"+fGroupNamePathsPair[mi].first+"_L1_Any";
1557  int groupL1BinNumber = hist_2d->GetXaxis()->FindBin(groupL1BinLabel.c_str());
1558 
1559  if(groupL1Passed) hist_1d->Fill(groupL1BinNumber-1);//binNumber1 = 0 = first filter
1560  } // end for mi
1561 
1562 }
int i
Definition: DBlmapReader.cc:9
edm::Handle< edm::TriggerResults > triggerResults_
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
int j
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1693
#define LogTrace(id)
bool hasL1Passed(const std::string &pathname, const edm::TriggerNames &triggerNames)
TH1F * getTH1F(void) const
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
TH2F * getTH2F(void) const
const std::string FourVectorHLTOnline::getL1ConditionModuleName ( const std::string &  pathname)
private

Definition at line 2109 of file FourVectorHLTOnline.cc.

References hltConfig_, HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by beginRun(), and hasL1Passed().

2110 {
2111 
2112  // find L1 condition for numpath with numpath objecttype
2113  // find PSet for L1 global seed for numpath,
2114  // list module labels for numpath
2115  std::string l1pathname = "dummy";
2116 
2117  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
2118 
2119  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
2120  numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2121 
2122  if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed") {
2123 
2124  l1pathname = *numpathmodule;
2125  break;
2126 
2127  }
2128 
2129  } // end for
2130 
2131  return l1pathname;
2132 
2133 }
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
HLTConfigProvider hltConfig_
int FourVectorHLTOnline::getTriggerTypeParsePathName ( const std::string &  pathname)
private

Definition at line 2080 of file FourVectorHLTOnline.cc.

References trigger::TriggerBJet, trigger::TriggerElectron, trigger::TriggerJet, trigger::TriggerMET, trigger::TriggerMuon, trigger::TriggerPhoton, trigger::TriggerTau, trigger::TriggerTET, and trigger::TriggerTrack.

Referenced by beginRun().

2081 {
2082 
2083  int objectType = 0;
2084 
2085  if (pathname.find("MET") != std::string::npos)
2086  objectType = trigger::TriggerMET;
2087  if (pathname.find("SumET") != std::string::npos)
2088  objectType = trigger::TriggerTET;
2089  if (pathname.find("HT") != std::string::npos)
2090  objectType = trigger::TriggerTET;
2091  if (pathname.find("Jet") != std::string::npos)
2092  objectType = trigger::TriggerJet;
2093  if (pathname.find("Mu") != std::string::npos)
2094  objectType = trigger::TriggerMuon;
2095  if (pathname.find("Ele") != std::string::npos)
2096  objectType = trigger::TriggerElectron;
2097  if (pathname.find("Photon") != std::string::npos)
2098  objectType = trigger::TriggerPhoton;
2099  if (pathname.find("Tau") != std::string::npos)
2100  objectType = trigger::TriggerTau;
2101  if (pathname.find("IsoTrack") != std::string::npos)
2102  objectType = trigger::TriggerTrack;
2103  if (pathname.find("BTag") != std::string::npos)
2104  objectType = trigger::TriggerBJet;
2105 
2106  return objectType;
2107 }
bool FourVectorHLTOnline::hasHLTPassed ( const std::string &  pathname,
const edm::TriggerNames triggerNames 
)
private

Definition at line 2158 of file FourVectorHLTOnline.cc.

References edm::TriggerNames::triggerIndex(), and triggerResults_.

Referenced by analyze().

2159 {
2160 
2161  bool rc = false;
2162 
2163  unsigned int pathByIndex = triggerNames.triggerIndex(pathname);
2164  if(pathByIndex >= triggerResults_->size() ) return rc; // path is not in the menu
2165 
2166  rc = triggerResults_->accept(pathByIndex);
2167 
2168  return rc;
2169 
2170 }
edm::Handle< edm::TriggerResults > triggerResults_
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
bool FourVectorHLTOnline::hasL1Passed ( const std::string &  pathname,
const edm::TriggerNames triggerNames 
)
private

Definition at line 2136 of file FourVectorHLTOnline.cc.

References getL1ConditionModuleName(), hltConfig_, HLTConfigProvider::moduleIndex(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerIndex(), and triggerResults_.

Referenced by fillHltMatrix().

2137 {
2138 
2139  bool rc = false;
2140 
2142  int l1ModuleIndex = hltConfig_.moduleIndex(pathname, l1ModuleName);
2143 
2144  unsigned int pathByIndex = triggerNames.triggerIndex(pathname);
2145  if(pathByIndex >= triggerResults_->size() ) return rc; // path is not in the menu
2146 
2147  // get index of the last module that issued the decision
2148  int lastModule = triggerResults_->index(pathByIndex);
2149 
2150  // if L1 passed, then it must not be the module that
2151  // issued the last decision
2152  rc = (l1ModuleIndex < lastModule);
2153 
2154  return rc;
2155 
2156 }
const std::string getL1ConditionModuleName(const std::string &pathname)
edm::Handle< edm::TriggerResults > triggerResults_
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
HLTConfigProvider hltConfig_
void FourVectorHLTOnline::setupHltBxPlots ( )
private

Definition at line 1564 of file FourVectorHLTOnline.cc.

References DQMStore::book2D(), dbe_, MonitorElement::getTH2F(), hltPathsDiagonal_, i, ME_HLT_BX_, ME_HLT_CUSTOM_BX_, Nbx_, pathsSummaryFolder_, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

Referenced by beginRun().

1565 {
1566 
1567  //pathsSummaryFolder_ = TString("HLT/FourVector/PathsSummary/");
1568  //dbe_->setCurrentFolder(pathsSummaryFolder_.c_str());
1570 
1571  // setup HLT bx plot
1572  unsigned int npaths = hltPathsDiagonal_.size();
1573 
1574  ME_HLT_BX_ = dbe_->book2D("HLT_bx",
1575  "HLT counts vs Event bx",
1576  Nbx_+1, -0.5, Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1577  ME_HLT_CUSTOM_BX_ = dbe_->book2D("HLT_Custom_bx",
1578  "HLT counts vs Event bx",
1579  Nbx_+1, -0.5, Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1580  ME_HLT_BX_->setAxisTitle("Bunch Crossing");
1581  ME_HLT_CUSTOM_BX_->setAxisTitle("Bunch Crossing");
1582 
1583 
1584  // Set up bin labels on Y axis continuing to cover all npaths
1585  for(unsigned int i = 0; i < npaths; i++){
1586 
1587  ME_HLT_BX_->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1588  ME_HLT_CUSTOM_BX_->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1589 
1590  }
1591 
1592 
1593 }
PathInfoCollection hltPathsDiagonal_
int i
Definition: DBlmapReader.cc:9
MonitorElement * ME_HLT_BX_
MonitorElement * ME_HLT_CUSTOM_BX_
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.
Definition: DQMStore.cc:1070
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
void FourVectorHLTOnline::setupHltLsPlots ( )
private

Definition at line 1595 of file FourVectorHLTOnline.cc.

References newFWLiteAna::bin, DQMStore::book2D(), dbe_, MonitorElement::getTH2F(), hltPathsDiagonal_, i, ME_HLTAll_LS_, mergeVDriftHistosByStation::name, nLS_, pathsSummaryHLTPathsPerLSFolder_, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), indexGen::title, and v_ME_HLTAll_LS_.

Referenced by beginRun().

1596 {
1597 
1598  unsigned int npaths = hltPathsDiagonal_.size();
1599 
1600  //pathsSummaryHLTPathsPerLSFolder_ = TString("HLT/FourVector/PathsSummary/HLT LS/");
1601  //dbe_->setCurrentFolder(pathsSummaryHLTPathsPerLSFolder_.c_str());
1603 
1604  ME_HLTAll_LS_ = dbe_->book2D("All_count_LS",
1605  "All paths per LS ",
1606  nLS_, 0, nLS_, npaths+1, -0.5, npaths+1-0.5);
1607  ME_HLTAll_LS_->setAxisTitle("Luminosity Section");
1608 
1609  // Set up bin labels on Y axis continuing to cover all npaths
1610  for(unsigned int i = 0; i < npaths; i++){
1611 
1612  ME_HLTAll_LS_->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1613 
1614  }
1615 
1616  unsigned int i = npaths;
1617  ME_HLTAll_LS_->getTH2F()->GetYaxis()->SetBinLabel(i+1, "HLT_Any");
1618 
1619  int nBinsPerLSHisto = 20;
1620  int nLSHistos = npaths/nBinsPerLSHisto;
1621  for (int nh=0;nh<nLSHistos+1;nh++) {
1622 
1623  char name[200];
1624  char title[200];
1625 
1626  sprintf(name, "Group_%d_paths_count_LS",nLSHistos-nh);
1627  sprintf(title, "Group %d, paths count per LS",nLSHistos-nh);
1628 
1629  MonitorElement* tempME = dbe_->book2D(name,title,
1630  nLS_, 0, nLS_, nBinsPerLSHisto+3, -0.5, nBinsPerLSHisto+3-0.5);
1631 
1632  tempME->setAxisTitle("LS");
1633 
1634  // Set up bin labels on Y axis continuing to cover all npaths
1635  for(int i = nh*nBinsPerLSHisto; i < (nh+1)*nBinsPerLSHisto; i++){
1636 
1637  if (i == int(npaths)) break;
1638 
1639  int bin;
1640  if(nh == 0){
1641 
1642  bin = i;
1643 
1644  }
1645  else {
1646 
1647  bin = i % nBinsPerLSHisto;
1648 
1649  }
1650 
1651  tempME->setBinLabel(bin+1, hltPathsDiagonal_[i].getPath().c_str(), 2);
1652 
1653  }
1654 
1655  tempME->setBinLabel(nBinsPerLSHisto+3, "HLT_Any", 2);
1656  tempME->setBinLabel(nBinsPerLSHisto+2, "HLT_PhysicsDeclared", 2);
1657 
1658  v_ME_HLTAll_LS_.push_back(tempME);
1659 
1660  }
1661 
1662 
1663 }
PathInfoCollection hltPathsDiagonal_
int i
Definition: DBlmapReader.cc:9
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::string pathsSummaryHLTPathsPerLSFolder_
std::vector< MonitorElement * > v_ME_HLTAll_LS_
MonitorElement * ME_HLTAll_LS_
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.
Definition: DQMStore.cc:1070
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
void FourVectorHLTOnline::setupHltMatrix ( std::string  label,
std::vector< std::string >  paths 
)
private

add this path to the vector of 2D LS paths

Definition at line 1392 of file FourVectorHLTOnline.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe_, MonitorElement::getTH1F(), MonitorElement::getTH2F(), i, nLS_, pathsSummaryFolder_, pathsSummaryHLTCorrelationsFolder_, pathsSummaryHLTPathsPerBXFolder_, pathsSummaryHLTPathsPerLSFolder_, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and v_ME_HLTAll_LS_.

1392  {
1393  //string groupLabelAny = "HLT_"+label+"_Any";
1394  //paths.push_back(groupLabelAny.c_str());
1395  paths.push_back("HLT_"+label+"_L1_Any");
1396  paths.push_back("HLT_"+label+"_Any");
1397  paths.push_back("HLT_Any");
1398 
1399  std::string h_name;
1400  std::string h_title;
1401 
1403 
1404  h_name= "HLT_"+label+"_PassPass";
1405  h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass)";
1406  MonitorElement* ME = dbe_->book2D(h_name.c_str(), h_title.c_str(),
1407  paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1408 
1409  h_name= "HLT_"+label+"_Pass_Any";
1410  h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1411  MonitorElement* ME_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
1412  paths.size(), -0.5, paths.size()-0.5);
1413 
1415  h_name= "HLT_"+label+"_PassPass_Normalized";
1416  h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
1417  MonitorElement* ME_Normalized = dbe_->book2D(h_name.c_str(), h_title.c_str(),
1418  paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1419  h_name= "HLT_"+label+"_Pass_Normalized_Any";
1420  h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1421  MonitorElement* ME_Normalized_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
1422  paths.size(), -0.5, paths.size()-0.5);
1423 
1425  h_name= "HLT_"+label+"_Total_LS";
1426  h_title = label+" HLT paths total count combined per LS ";
1427  MonitorElement* ME_Total_LS = dbe_->book1D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_);
1428  ME_Total_LS->setAxisTitle("LS");
1429 
1430  h_name= "HLT_"+label+"_LS";
1431  h_title = label+" HLT paths count per LS ";
1432  MonitorElement* ME_Group_LS = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, paths.size(), -0.5, paths.size()-0.5);
1433  ME_Group_LS->setAxisTitle("LS");
1435  v_ME_HLTAll_LS_.push_back(ME_Group_LS);
1436 
1437  h_name= "HLT_"+label+"_L1_Total_LS";
1438  h_title = label+" HLT paths total count combined per LS ";
1439  MonitorElement* ME_Total_L1_LS = dbe_->book1D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_);
1440  ME_Total_L1_LS->setAxisTitle("LS");
1441 
1442  h_name= "HLT_"+label+"_L1_LS";
1443  h_title = label+" HLT L1s count per LS ";
1444  MonitorElement* ME_Group_L1_LS = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, paths.size(), -0.5, paths.size()-0.5);
1445  ME_Group_L1_LS->setAxisTitle("LS");
1446 
1448  h_name= "HLT_"+label+"_BX_LS";
1449  h_title = label+" HLT paths total count combined per BX ";
1450  MonitorElement* ME_Total_BX = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, 5, -2.5, 2.5);
1451  ME_Total_BX->setAxisTitle("LS",1);
1452 
1453  for(unsigned int i = 0; i < paths.size(); i++){
1454 
1455  ME->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1456  ME->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1457  ME_Group_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1458 
1459  ME_Normalized->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1460  ME_Normalized->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1461  ME_Normalized_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1462  ME_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1463 
1464  }
1465 
1466 }
int i
Definition: DBlmapReader.cc:9
std::string pathsSummaryHLTPathsPerBXFolder_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:942
Definition: ME.h:11
std::string pathsSummaryHLTPathsPerLSFolder_
std::vector< MonitorElement * > v_ME_HLTAll_LS_
TH1F * getTH1F(void) const
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.
Definition: DQMStore.cc:1070
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
std::string pathsSummaryHLTCorrelationsFolder_

Member Data Documentation

double FourVectorHLTOnline::bjetDRMatch_
private

Definition at line 173 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

double FourVectorHLTOnline::bjetEtaMax_
private

Definition at line 171 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::bjetEtMin_
private

Definition at line 172 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::caloRecoTauProducerToken_
private

Definition at line 219 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

int FourVectorHLTOnline::currentRun_
private

Definition at line 152 of file FourVectorHLTOnline.h.

std::vector<std::pair<std::string, std::string> > FourVectorHLTOnline::custompathnamepairs_
private

Definition at line 188 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and FourVectorHLTOnline().

DQMStore* FourVectorHLTOnline::dbe_
private
std::string FourVectorHLTOnline::dirname_
private

Definition at line 200 of file FourVectorHLTOnline.h.

Referenced by beginJob(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::electronDRMatch_
private

Definition at line 161 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

double FourVectorHLTOnline::electronEtaMax_
private

Definition at line 159 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::electronEtMin_
private

Definition at line 160 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

std::string FourVectorHLTOnline::fCustomBXPath
private

Definition at line 142 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

std::vector<std::pair<std::string, int> > FourVectorHLTOnline::fGroupL1TempCountPair
private

Definition at line 195 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and countHLTGroupL1HitsEndLumiBlock().

std::vector<std::string> FourVectorHLTOnline::fGroupName
private

Definition at line 144 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and countHLTGroupBXHitsEndLumiBlock().

std::vector<std::pair<std::string, std::vector<std::string> > > FourVectorHLTOnline::fGroupNamePathsPair
private
std::vector<std::pair<std::string, int> > FourVectorHLTOnline::fGroupTempCountPair
private

Definition at line 194 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and countHLTGroupHitsEndLumiBlock().

bool FourVectorHLTOnline::fLumiFlag
private

Definition at line 115 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

std::vector<std::pair<std::string, std::vector<int> > > FourVectorHLTOnline::fPathBxTempCountPair
private

Definition at line 193 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and countHLTGroupBXHitsEndLumiBlock().

std::vector<std::pair<std::string, int> > FourVectorHLTOnline::fPathTempCountPair
private

Definition at line 192 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and countHLTPathHitsEndLumiBlock().

edm::Handle<trigger::TriggerEvent> FourVectorHLTOnline::fTriggerObj
edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::gsfElectronsToken_
private

Definition at line 218 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

HLTConfigProvider FourVectorHLTOnline::hltConfig_
private

Definition at line 207 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), getL1ConditionModuleName(), and hasL1Passed().

PathInfoCollection FourVectorHLTOnline::hltPaths_

Definition at line 579 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

PathInfoCollection FourVectorHLTOnline::hltPathsDiagonal_

Definition at line 581 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), setupHltBxPlots(), and setupHltLsPlots().

double FourVectorHLTOnline::htDRMatch_
private

Definition at line 185 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

double FourVectorHLTOnline::htEtaMax_
private

Definition at line 183 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

double FourVectorHLTOnline::htMin_
private

Definition at line 184 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::iterativeCone5CaloJetsToken_
private

Definition at line 220 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

double FourVectorHLTOnline::jetDRMatch_
private

Definition at line 170 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

double FourVectorHLTOnline::jetEtaMax_
private

Definition at line 168 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::jetEtMin_
private

Definition at line 169 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::jetProbabilityBJetTagsToken_
private

Definition at line 221 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

MonitorElement* FourVectorHLTOnline::ME_HLT_BX_
private
MonitorElement* FourVectorHLTOnline::ME_HLT_CUSTOM_BX_
private

Definition at line 132 of file FourVectorHLTOnline.h.

Referenced by analyze(), FourVectorHLTOnline(), and setupHltBxPlots().

MonitorElement* FourVectorHLTOnline::ME_HLTAll_LS_
private
double FourVectorHLTOnline::metDRMatch_
private

Definition at line 182 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

double FourVectorHLTOnline::metEtaMax_
private

Definition at line 180 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::metMin_
private

Definition at line 181 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::metToken_
private

Definition at line 223 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

bool FourVectorHLTOnline::monitorDaemon_
private

Definition at line 203 of file FourVectorHLTOnline.h.

double FourVectorHLTOnline::muonDRMatch_
private

Definition at line 164 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

double FourVectorHLTOnline::muonEtaMax_
private

Definition at line 162 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::muonEtMin_
private

Definition at line 163 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

std::string FourVectorHLTOnline::muonRecoCollectionName_
private

Definition at line 202 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::muonRecoCollectionNameToken_
private

Definition at line 217 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

unsigned int FourVectorHLTOnline::nBins_
private

Definition at line 154 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and FourVectorHLTOnline().

unsigned int FourVectorHLTOnline::nBinsOneOverEt_
private

Definition at line 155 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and FourVectorHLTOnline().

unsigned int FourVectorHLTOnline::Nbx_
private
int FourVectorHLTOnline::nev_
private

Definition at line 113 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginJob(), and endJob().

unsigned int FourVectorHLTOnline::nLS_
private
std::string FourVectorHLTOnline::pathsIndividualHLTPathsPerLSFolder_
private
std::string FourVectorHLTOnline::pathsSummaryFilterCountsFolder_
private

Definition at line 138 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and FourVectorHLTOnline().

std::string FourVectorHLTOnline::pathsSummaryFilterEfficiencyFolder_
private

Definition at line 137 of file FourVectorHLTOnline.h.

std::string FourVectorHLTOnline::pathsSummaryFolder_
private
std::string FourVectorHLTOnline::pathsSummaryHLTCorrelationsFolder_
private

Definition at line 136 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline(), and setupHltMatrix().

std::string FourVectorHLTOnline::pathsSummaryHLTPathsPerBXFolder_
private
std::string FourVectorHLTOnline::pathsSummaryHLTPathsPerLSFolder_
private
double FourVectorHLTOnline::photonDRMatch_
private

Definition at line 176 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

double FourVectorHLTOnline::photonEtaMax_
private

Definition at line 174 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::photonEtMin_
private

Definition at line 175 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::photonsToken_
private

Definition at line 224 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::pixelTracksToken_
private

Definition at line 225 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

bool FourVectorHLTOnline::plotAll_
private

Definition at line 150 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and FourVectorHLTOnline().

std::string FourVectorHLTOnline::processname_
private

Definition at line 201 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::ptMax_
private

Definition at line 157 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

double FourVectorHLTOnline::ptMin_
private

Definition at line 156 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

unsigned int FourVectorHLTOnline::referenceBX_
private

Definition at line 147 of file FourVectorHLTOnline.h.

Referenced by countHLTGroupBXHitsEndLumiBlock(), and FourVectorHLTOnline().

bool FourVectorHLTOnline::resetMe_
private

Definition at line 151 of file FourVectorHLTOnline.h.

MonitorElement* FourVectorHLTOnline::scalersSelect
private

Definition at line 209 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::softMuonBJetTagsToken_
private

Definition at line 222 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

std::vector<std::string> FourVectorHLTOnline::specialPaths_
private

Definition at line 198 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::sumEtMin_
private

Definition at line 186 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

double FourVectorHLTOnline::tauDRMatch_
private

Definition at line 167 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

double FourVectorHLTOnline::tauEtaMax_
private

Definition at line 165 of file FourVectorHLTOnline.h.

Referenced by analyze(), beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::tauEtMin_
private

Definition at line 166 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

int FourVectorHLTOnline::theHLTOutputType
private

Definition at line 204 of file FourVectorHLTOnline.h.

double FourVectorHLTOnline::trackDRMatch_
private

Definition at line 179 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

double FourVectorHLTOnline::trackEtaMax_
private

Definition at line 177 of file FourVectorHLTOnline.h.

Referenced by beginRun(), and FourVectorHLTOnline().

double FourVectorHLTOnline::trackEtMin_
private

Definition at line 178 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

std::vector<std::vector <uint> > FourVectorHLTOnline::triggerFilterIndices_
private

Definition at line 191 of file FourVectorHLTOnline.h.

std::vector<std::vector <std::string> > FourVectorHLTOnline::triggerFilters_
private

Definition at line 190 of file FourVectorHLTOnline.h.

edm::Handle<edm::TriggerResults> FourVectorHLTOnline::triggerResults_
private

Definition at line 212 of file FourVectorHLTOnline.h.

Referenced by analyze(), fillHltMatrix(), hasHLTPassed(), and hasL1Passed().

edm::InputTag FourVectorHLTOnline::triggerResultsLabel_
private

Definition at line 206 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::triggerResultsToken_
private

Definition at line 215 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

edm::EDGetTokenT<edm::TriggerResults> FourVectorHLTOnline::triggerResultsTokenFU_
private

Definition at line 226 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

edm::InputTag FourVectorHLTOnline::triggerSummaryLabel_
private

Definition at line 205 of file FourVectorHLTOnline.h.

Referenced by FourVectorHLTOnline().

edm::EDGetTokenT<trigger::TriggerEvent> FourVectorHLTOnline::triggerSummaryLabelFUToken_
private

Definition at line 227 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

edm::EDGetTokenT<trigger::TriggerEvent> FourVectorHLTOnline::triggerSummaryToken_
private

Definition at line 216 of file FourVectorHLTOnline.h.

Referenced by analyze(), and FourVectorHLTOnline().

std::vector<MonitorElement*> FourVectorHLTOnline::v_ME_HLTAll_LS_
private