CMS 3D CMS Logo

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

#include <HLTriggerOffline/SUSYBSM/src/TriggerValidator.cc>

Inheritance diagram for TriggerValidator:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 TriggerValidator (const edm::ParameterSet &)
 
 ~TriggerValidator ()
 
- 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Public Attributes

TFile * theHistoFile
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
virtual void endJob ()
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 

Private Attributes

DQMStoredbe_
 
std::string dirname_
 
std::vector< double > effHltAfterMcCuts
 
std::vector< double > effHltAfterRecoCuts
 
std::vector< double > effHltBeforeCuts
 
std::vector< double > effL1AfterMcCuts
 
std::vector< double > effL1AfterRecoCuts
 
std::vector< double > effL1BeforeCuts
 
bool firstEvent
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
gtDigis_token_
 
std::vector< MonitorElement * > hHltBitsAfterMcCuts
 
std::vector< MonitorElement * > hHltBitsAfterRecoCuts
 
MonitorElementhHltBitsBeforeCuts
 
std::vector< MonitorElement * > hHltPathsAfterMcCuts
 
std::vector< MonitorElement * > hHltPathsAfterRecoCuts
 
MonitorElementhHltPathsBeforeCuts
 
std::string HistoFileName
 
std::vector< MonitorElement * > hL1BitsAfterMcCuts
 
std::vector< MonitorElement * > hL1BitsAfterRecoCuts
 
MonitorElementhL1BitsBeforeCuts
 
std::vector< MonitorElement * > hL1PathsAfterMcCuts
 
std::vector< MonitorElement * > hL1PathsAfterRecoCuts
 
MonitorElementhL1PathsBeforeCuts
 
std::vector< std::string > hlNames_
 
edm::EDGetTokenT
< edm::TriggerResults
hlt_token_
 
std::vector< int > hltbits
 
HLTConfigProvider hltConfig_
 
edm::InputTag hltLabel
 
std::vector< int > l1bits
 
bool l1Flag
 
edm::EDGetTokenT
< L1GlobalTriggerObjectMapRecord
l1Label
 
std::map< int, std::string > l1NameMap
 
std::vector< std::string > l1Names_
 
std::vector< edm::ParameterSetmc_parametersets
 
bool mcFlag
 
std::string mcSelBitsDir
 
edm::InputTag muonTag_
 
std::vector< McSelector * > myMcSelector
 
MuonAnalyzerSBSMmyMuonAnalyzer
 
PlotMakerL1myPlotMakerL1
 
PlotMakerRecomyPlotMakerReco
 
std::vector< RecoSelector * > myRecoSelector
 
std::vector< int > nEvMcSelected
 
std::vector< int > nEvRecoSelected
 
int nEvTot
 
unsigned int nHltPaths
 
int nL1Bits
 
std::vector< std::vector< int > > numTotHltBitsAfterMcCuts
 
std::vector< std::vector< int > > numTotHltBitsAfterRecoCuts
 
std::vector< int > numTotHltBitsBeforeCuts
 
std::vector< std::vector< int > > numTotL1BitsAfterMcCuts
 
std::vector< std::vector< int > > numTotL1BitsAfterRecoCuts
 
std::vector< int > numTotL1BitsBeforeCuts
 
edm::ParameterSet plotMakerL1Input
 
edm::ParameterSet plotMakerRecoInput
 
std::string processName_
 
std::vector< edm::ParameterSetreco_parametersets
 
std::string recoSelBitsDir
 
std::string StatFileName
 
std::string triggerBitsDir
 
std::string triggerName_
 
edm::InputTag triggerTag_
 
edm::ParameterSet turnOn_params
 
std::vector< std::vector< int > > vCorrHlt
 
std::vector< std::vector< int > > vCorrL1
 
std::vector< std::vector
< double > > 
vCorrNormHlt
 
std::vector< std::vector
< double > > 
vCorrNormL1
 

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: Class to validate the Trigger Performance of the SUSYBSM group

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

Definition at line 61 of file TriggerValidator.h.

Constructor & Destructor Documentation

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

Definition at line 74 of file TriggerValidator.cc.

References edm::ParameterSet::addParameter(), edm::EDConsumerBase::consumesCollector(), dbe_, dirname_, edm::ParameterSet::getUntrackedParameter(), i, l1Flag, LogDebug, mc_parametersets, mcFlag, mcSelBitsDir, muonTag_, myMcSelector, myMuonAnalyzer, myPlotMakerL1, myPlotMakerReco, myRecoSelector, nEvMcSelected, nEvRecoSelected, nEvTot, nHltPaths, nL1Bits, cppFunctionSkipper::operator, plotMakerL1Input, plotMakerRecoInput, reco_parametersets, recoSelBitsDir, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), AlCaHLTBitMon_QueryRunRegistry::string, theHistoFile, triggerBitsDir, and triggerTag_.

74  :
75  dirname_(iConfig.getUntrackedParameter("dirname",
76  std::string("HLT/SusyExo"))),
77  HistoFileName(iConfig.getUntrackedParameter("histoFileName",
78  std::string("SusyBsmTriggerValidation.root"))),
79  StatFileName(iConfig.getUntrackedParameter("statFileName",
80  std::string("SusyBsmTriggerValidation.stat"))),
81  l1Label(consumes<L1GlobalTriggerObjectMapRecord>(iConfig.getParameter<edm::InputTag>("L1Label"))),
82  hltLabel(iConfig.getParameter<edm::InputTag>("HltLabel")),
83  hlt_token_(consumes<TriggerResults>(iConfig.getParameter<edm::InputTag>("HltLabel"))),
84  mcFlag(iConfig.getUntrackedParameter<bool>("mc_flag",false)),
85  l1Flag(iConfig.getUntrackedParameter<bool>("l1_flag",false)),
86  reco_parametersets(iConfig.getParameter<VParameterSet>("reco_parametersets")),
87  mc_parametersets(iConfig.getParameter<VParameterSet>("mc_parametersets")),
88  turnOn_params(iConfig.getParameter<ParameterSet>("TurnOnParams")),
89  plotMakerL1Input(iConfig.getParameter<ParameterSet>("PlotMakerL1Input")),
90  plotMakerRecoInput(iConfig.getParameter<ParameterSet>("PlotMakerRecoInput")),
91  muonTag_(iConfig.getParameter<edm::InputTag>("muonTag")),
92  triggerTag_(iConfig.getParameter<edm::InputTag>("triggerTag")),
93  processName_(iConfig.getParameter<std::string>("hltConfigName")),
94  triggerName_(iConfig.getParameter<std::string>("triggerName")),
95  gtDigis_token_(consumes<L1GlobalTriggerReadoutRecord>(iConfig.getUntrackedParameter<edm::InputTag>("gtDigis",edm::InputTag("gtDigis"))))
96 {
97  //now do what ever initialization is needed
98  theHistoFile = 0;
99  nEvTot = 0;
100  for(unsigned int i=0; i<reco_parametersets.size(); ++i) nEvRecoSelected.push_back(0);
101  for(unsigned int i=0; i<mc_parametersets.size(); ++i) nEvMcSelected.push_back(0);
102 
103  nHltPaths = 0;
104  nL1Bits = 0;
105 
106  // --- set the names in the dbe folders ---
107  triggerBitsDir = "/TriggerBits";
108  recoSelBitsDir = "/RecoSelection";
109  mcSelBitsDir = "/McSelection";
110 
111 
112  LogDebug("TriggerValidator") << "constructor...." ;
113 
115  if ( ! dbe_ ) {
116  LogInfo("TriggerValidator") << "unabel to get DQMStore service?";
117  }
118  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
119  dbe_->setVerbose(0);
120  }
121 
122 
123 
124 
125  if (dbe_ != 0 ) {
127  }
128 
129 
132 
133  //pass consumes list to the helper classes
134  for(unsigned int i=0; i<reco_parametersets.size(); ++i) myRecoSelector.push_back(new RecoSelector(reco_parametersets[i], consumesCollector()));
135  if(mcFlag) for(unsigned int i=0; i<mc_parametersets.size(); ++i) myMcSelector.push_back(new McSelector(mc_parametersets[i], consumesCollector()));
139 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::string dirname_
std::vector< McSelector * > myMcSelector
std::string StatFileName
unsigned int nHltPaths
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
MuonAnalyzerSBSM * myMuonAnalyzer
PlotMakerReco * myPlotMakerReco
edm::EDGetTokenT< edm::TriggerResults > hlt_token_
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > l1Label
std::vector< int > nEvRecoSelected
std::vector< int > nEvMcSelected
std::vector< RecoSelector * > myRecoSelector
std::string triggerName_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtDigis_token_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:142
std::string recoSelBitsDir
edm::InputTag triggerTag_
void setVerbose(unsigned level)
Definition: DQMStore.cc:548
PlotMakerL1 * myPlotMakerL1
std::string mcSelBitsDir
std::string triggerBitsDir
edm::InputTag hltLabel
edm::ParameterSet turnOn_params
std::string HistoFileName
std::string processName_
std::vector< edm::ParameterSet > reco_parametersets
edm::ParameterSet plotMakerRecoInput
edm::ParameterSet plotMakerL1Input
edm::InputTag muonTag_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
std::vector< edm::ParameterSet > mc_parametersets
TriggerValidator::~TriggerValidator ( )

Definition at line 142 of file TriggerValidator.cc.

143 {
144 
145  // do anything here that needs to be done at desctruction time
146  // (e.g. close files, deallocate resources etc.)
147 
148 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 157 of file TriggerValidator.cc.

References PlotMakerL1::bookHistos(), PlotMakerReco::bookHistos(), dbe_, edm::InputTag::encode(), MonitorElement::Fill(), MuonAnalyzerSBSM::FillPlots(), PlotMakerL1::fillPlots(), PlotMakerReco::fillPlots(), firstEvent, edm::Event::getByToken(), gtDigis_token_, hHltBitsAfterMcCuts, hHltBitsAfterRecoCuts, hHltBitsBeforeCuts, hHltPathsAfterMcCuts, hHltPathsAfterRecoCuts, hHltPathsBeforeCuts, hL1BitsAfterMcCuts, hL1BitsAfterRecoCuts, hL1BitsBeforeCuts, hL1PathsAfterMcCuts, hL1PathsAfterRecoCuts, hL1PathsBeforeCuts, hlNames_, hlt_token_, hltbits, hltLabel, i, j, l1bits, l1Flag, l1Label, l1NameMap, l1Names_, LogDebug, mc_parametersets, mcFlag, myMcSelector, myMuonAnalyzer, myPlotMakerL1, myPlotMakerReco, myRecoSelector, nEvMcSelected, nEvRecoSelected, nEvTot, numTotHltBitsAfterMcCuts, numTotHltBitsAfterRecoCuts, numTotHltBitsBeforeCuts, numTotL1BitsAfterMcCuts, numTotL1BitsAfterRecoCuts, numTotL1BitsBeforeCuts, reco_parametersets, MonitorElement::setBinLabel(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerNames(), edm::Event::triggerNames(), vCorrHlt, vCorrL1, vCorrNormHlt, and vCorrNormL1.

158 {
159 
160  using namespace edm;
161 
162  nEvTot++;
163 
164  vector<bool> eventRecoSelected, eventMcSelected;
165  eventRecoSelected.resize(reco_parametersets.size());
166  eventMcSelected.resize(mc_parametersets.size());
167  for(unsigned int i=0; i<eventRecoSelected.size(); ++i) eventRecoSelected[i] = myRecoSelector[i]->isSelected(iEvent);
168  for(unsigned int i=0; i<eventMcSelected.size(); ++i) eventMcSelected[i] = mcFlag ? myMcSelector[i]->isSelected(iEvent) : false;
169 
170  for(unsigned int i=0; i<nEvRecoSelected.size(); ++i) if(eventRecoSelected[i]) nEvRecoSelected[i]++;
171  for(unsigned int i=0; i<nEvMcSelected.size(); ++i) if(eventMcSelected[i]) nEvMcSelected[i]++;
172 
173 
174  // ********************************************************
175  // Get the L1 Info
176  // ********************************************************
178  iEvent.getByToken(gtDigis_token_,L1GTRR);
179  if (!L1GTRR.isValid()) {edm::LogWarning("Readout Error|L1") << "L1ParticleMapCollection Not Valid!";}
180  int nL1size = L1GTRR->decisionWord().size();
181  if(firstEvent) {
182 
183  //this piece of code concerns efficiencies
184  //it must be moved to the client
185 
186 // //resize the eff and overlap vectors ccording to the number of L1 paths
187 // effL1BeforeCuts.resize(L1GTRR->decisionWord().size()+1);
188 // effL1AfterRecoCuts.resize(L1GTRR->decisionWord().size()+1);
189 // effL1AfterMcCuts.resize(L1GTRR->decisionWord().size()+1);
190  vCorrL1.resize(L1GTRR->decisionWord().size());
191  for(unsigned int i=0; i<L1GTRR->decisionWord().size(); i++) {vCorrL1[i].resize(L1GTRR->decisionWord().size());}
192  vCorrNormL1.resize(L1GTRR->decisionWord().size());
193  for(unsigned int i=0; i<L1GTRR->decisionWord().size(); i++) {vCorrNormL1[i].resize(L1GTRR->decisionWord().size());}
194 
195 
196  //Get the names of the L1 paths
197  //for the moment the names are not included in L1GlobalTriggerReadoutRecord
198  //we need to use L1GlobalTriggerObjectMapRecord
200  iEvent.getByToken(l1Label, gtObjectMapRecord);
201  const std::vector<L1GlobalTriggerObjectMap>& objMapVec =
202  gtObjectMapRecord->gtObjectMap();
203  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin();
204  itMap != objMapVec.end(); ++itMap) {
205  int algoBit = (*itMap).algoBitNumber();
206  std::string algoNameStr = (*itMap).algoName();
207  l1NameMap[algoBit] = algoNameStr;
208  }
209  //resize the name vector and get the names
210  l1Names_.resize(L1GTRR->decisionWord().size()+1);
211  for (unsigned int i=0; i!=L1GTRR->decisionWord().size(); i++) {
212  l1Names_[i]=l1NameMap[i];
213  }
214  l1Names_[L1GTRR->decisionWord().size()] = "Total";
215 
216  //set the names of the bins for the "path" histos
217  for(unsigned int i=0; i<l1Names_.size(); ++i) {
218  hL1PathsBeforeCuts->setBinLabel(i+1,l1Names_[i].c_str(),1);
219  for(unsigned int j=0; j<hL1PathsAfterRecoCuts.size(); ++j) hL1PathsAfterRecoCuts[j]->setBinLabel(i+1,l1Names_[i].c_str(),1);
220  for(unsigned int j=0; j<hL1PathsAfterMcCuts.size(); ++j) hL1PathsAfterMcCuts[j]->setBinLabel(i+1,l1Names_[i].c_str(),1);
221  }
222  }
223 
224  //fill the eff vectors and histos for L1
225  for (int i=0; i<nL1size; ++i) {
226  l1bits.push_back(L1GTRR->decisionWord()[i]);
227  if(L1GTRR->decisionWord()[i]) {
231  for(unsigned int j=0; j<eventRecoSelected.size(); ++j)
232  if(eventRecoSelected[j]) {
234  hL1BitsAfterRecoCuts[j]->Fill(i);
235  hL1PathsAfterRecoCuts[j]->Fill(i);
236  }
237  for(unsigned int j=0; j<eventMcSelected.size(); ++j)
238  if(eventMcSelected[j]) {
240  hL1BitsAfterMcCuts[j]->Fill(i);
241  hL1PathsAfterMcCuts[j]->Fill(i);
242  }
243  }
244  }
245 
246  //Calculate the overlap among l1 bits
247  for(int i=0; i<nL1size; ++i) {
248  for(int j=0; j<nL1size; ++j) {
249  if(l1bits[i]*l1bits[j]) vCorrL1[i][j]++;
250  }
251  }
252 
253  //fill the last bin with the total of events
254  numTotL1BitsBeforeCuts[nL1size]++;
255  hL1BitsBeforeCuts->Fill(nL1size);
256  hL1PathsBeforeCuts->Fill(nL1size);
257  for(unsigned int i=0; i<eventRecoSelected.size(); ++i)
258  if(eventRecoSelected[i]) {
259  numTotL1BitsAfterRecoCuts[i][nL1size]++;
260  hL1BitsAfterRecoCuts[i]->Fill(nL1size);
261  hL1PathsAfterRecoCuts[i]->Fill(nL1size);
262  }
263  for(unsigned int i=0; i<eventMcSelected.size(); ++i)
264  if(eventMcSelected[i]) {
265  numTotL1BitsAfterMcCuts[i][nL1size]++;
266  hL1BitsAfterMcCuts[i]->Fill(nL1size);
267  hL1PathsAfterMcCuts[i]->Fill(nL1size);
268  }
269 
270 
271  // ********************************************************
272  // Get the HLT Info
273  // ********************************************************
275  iEvent.getByToken(hlt_token_,trhv);
276  if( ! trhv.isValid() ) {
277  LogDebug("") << "HL TriggerResults with label ["+hltLabel.encode()+"] not found!";
278  return;
279  }
280 
281 
282 // if(!trhv.isValid()) {
283 // std::cout << "invalid handle for HLT TriggerResults" << std::endl;
284 // }
285 
286 
287  if(firstEvent) {
288 
289 
290 
291  //
292  // The following piece of code concerns efficiencies and so must be moved to the client
293  //
294 
295 
296 // //resize the eff and overlap vectors ccording to the number of L1 paths
297 // effHltBeforeCuts.resize(trhv->size()+1);
298 // effHltAfterRecoCuts.resize(trhv->size()+1);
299 // effHltAfterMcCuts.resize(trhv->size()+1);
300  vCorrHlt.resize(trhv->size());
301  for(unsigned int i=0; i<trhv->size(); i++) {vCorrHlt[i].resize(trhv->size());}
302  vCorrNormHlt.resize(trhv->size());
303  for(unsigned int i=0; i<trhv->size(); i++) {vCorrNormHlt[i].resize(trhv->size());}
304 
305 
306  //resize the name vector and get the names
307  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*trhv);
308  hlNames_=triggerNames.triggerNames();
309  hlNames_.push_back("Total");
310 
311  //set the bin names for the "path" histos
312  for (unsigned int i=0; i<hlNames_.size(); ++i) {
313  hHltPathsBeforeCuts->setBinLabel(i+1,hlNames_[i].c_str(),1);
314  for(unsigned int j=0; j<hHltPathsAfterRecoCuts.size(); ++j) hHltPathsAfterRecoCuts[j]->setBinLabel(i+1,hlNames_[i].c_str(),1);
315  for(unsigned int j=0; j<hHltPathsAfterMcCuts.size(); ++j) hHltPathsAfterMcCuts[j]->setBinLabel(i+1,hlNames_[i].c_str(),1);
316  }
317  }
318 
319  //fill the eff vectors and histos for HLT
320  for(unsigned int i=0; i< trhv->size(); i++) {
321  hltbits.push_back(trhv->at(i).accept());
322  if(trhv->at(i).accept()) {
326  for(unsigned int j=0; j<eventRecoSelected.size(); ++j)
327  if(eventRecoSelected[j]) {
329  hHltBitsAfterRecoCuts[j]->Fill(i);
330  hHltPathsAfterRecoCuts[j]->Fill(i);
331  }
332  for(unsigned int j=0; j<eventMcSelected.size(); ++j)
333  if(eventMcSelected[j]) {
335  hHltBitsAfterMcCuts[j]->Fill(i);
336  hHltPathsAfterMcCuts[j]->Fill(i);
337  }
338  }
339  }
340 
341  //Calculate the overlap among HLT paths
342  for(unsigned int i=0; i< trhv->size(); i++) {
343  for(unsigned int j=0; j< trhv->size(); j++) {
344 // cout << "trhv->size() = " << trhv->size() << endl;
345 // cout << "hltbits["<< i << "] = " << hltbits[i] << endl;
346 // cout << "hltbits["<< j << "] = " << hltbits[j] << endl;
347  if(hltbits[i]*hltbits[j]) vCorrHlt[i][j]++;
348  }
349  }
350 
351 
352  //The overlap histos are filled in the endJob() method
353 
354  //fill the last bin with the total of events
355  numTotHltBitsBeforeCuts[trhv->size()]++;
356  hHltBitsBeforeCuts->Fill(trhv->size());
357  hHltPathsBeforeCuts->Fill(trhv->size());
358  for(unsigned int i=0; i<eventRecoSelected.size(); ++i)
359  if(eventRecoSelected[i]) {
360  numTotHltBitsAfterRecoCuts[i][trhv->size()]++;
361  hHltBitsAfterRecoCuts[i]->Fill(trhv->size());
362  hHltPathsAfterRecoCuts[i]->Fill(trhv->size());
363  }
364  for(unsigned int i=0; i<eventMcSelected.size(); ++i)
365  if(eventMcSelected[i]) {
366  numTotHltBitsAfterMcCuts[i][trhv->size()]++;
367  hHltBitsAfterMcCuts[i]->Fill(trhv->size());
368  hHltPathsAfterMcCuts[i]->Fill(trhv->size());
369  }
370 
371 
372 
373  if(firstEvent) {
376  // myTurnOnMaker->bookHistos();
377  }
378  if(l1Flag) myPlotMakerL1->fillPlots(iEvent);
379  myPlotMakerReco->fillPlots(iEvent);
380  // myTurnOnMaker->fillPlots(iEvent);
381 
382  firstEvent = false;
383 
384  myMuonAnalyzer->FillPlots(iEvent, iSetup);
385  l1bits.clear();
386  hltbits.clear();
387 }
#define LogDebug(id)
std::vector< MonitorElement * > hHltBitsAfterRecoCuts
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< double > > vCorrNormL1
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:204
std::vector< McSelector * > myMcSelector
std::vector< MonitorElement * > hL1PathsAfterRecoCuts
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< MonitorElement * > hHltPathsAfterRecoCuts
std::vector< int > numTotHltBitsBeforeCuts
std::vector< MonitorElement * > hHltPathsAfterMcCuts
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)
MuonAnalyzerSBSM * myMuonAnalyzer
void fillPlots(const edm::Event &)
Definition: PlotMakerL1.cc:43
PlotMakerReco * myPlotMakerReco
std::vector< std::string > l1Names_
edm::EDGetTokenT< edm::TriggerResults > hlt_token_
void FillPlots(const edm::Event &, const edm::EventSetup &)
Definition: MuonAnalyzer.cc:58
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
std::string encode() const
Definition: InputTag.cc:164
std::vector< MonitorElement * > hL1BitsAfterMcCuts
std::vector< std::vector< int > > vCorrL1
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > l1Label
std::vector< int > nEvRecoSelected
std::vector< std::vector< int > > numTotHltBitsAfterMcCuts
void Fill(long long x)
std::vector< MonitorElement * > hL1PathsAfterMcCuts
std::vector< MonitorElement * > hL1BitsAfterRecoCuts
std::vector< int > nEvMcSelected
std::vector< RecoSelector * > myRecoSelector
MonitorElement * hHltPathsBeforeCuts
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtDigis_token_
void bookHistos(DQMStore *, std::vector< int > *, std::vector< int > *, std::vector< std::string > *, std::vector< std::string > *)
Definition: PlotMakerL1.cc:369
void fillPlots(const edm::Event &)
int j
Definition: DBlmapReader.cc:9
PlotMakerL1 * myPlotMakerL1
MonitorElement * hL1PathsBeforeCuts
std::vector< std::string > hlNames_
edm::InputTag hltLabel
std::vector< std::vector< double > > vCorrNormHlt
std::vector< int > numTotL1BitsBeforeCuts
void bookHistos(DQMStore *, std::vector< int > *, std::vector< int > *, std::vector< std::string > *, std::vector< std::string > *)
std::vector< int > l1bits
std::vector< MonitorElement * > hHltBitsAfterMcCuts
std::vector< int > hltbits
std::vector< std::vector< int > > numTotHltBitsAfterRecoCuts
std::vector< edm::ParameterSet > reco_parametersets
std::vector< std::vector< int > > numTotL1BitsAfterRecoCuts
std::vector< std::vector< int > > vCorrHlt
MonitorElement * hL1BitsBeforeCuts
std::vector< std::vector< int > > numTotL1BitsAfterMcCuts
MonitorElement * hHltBitsBeforeCuts
std::map< int, std::string > l1NameMap
std::vector< edm::ParameterSet > mc_parametersets
void TriggerValidator::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 390 of file TriggerValidator.cc.

390  {
391 }
void TriggerValidator::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 396 of file TriggerValidator.cc.

References DQMStore::book1D(), dbe_, dirname_, HLTConfigProvider::dump(), firstEvent, getTH1F(), MonitorElement::getTH1F(), hHltBitsAfterMcCuts, hHltBitsAfterRecoCuts, hHltBitsBeforeCuts, hHltPathsAfterMcCuts, hHltPathsAfterRecoCuts, hHltPathsBeforeCuts, hL1BitsAfterMcCuts, hL1BitsAfterRecoCuts, hL1BitsBeforeCuts, hL1PathsAfterMcCuts, hL1PathsAfterRecoCuts, hL1PathsBeforeCuts, hltConfig_, i, HLTConfigProvider::init(), MuonAnalyzerSBSM::InitializePlots(), mc_parametersets, mcSelBitsDir, myMcSelector, myMuonAnalyzer, myRecoSelector, nHltPaths, nL1Bits, numTotHltBitsAfterMcCuts, numTotHltBitsAfterRecoCuts, numTotHltBitsBeforeCuts, numTotL1BitsAfterMcCuts, numTotL1BitsAfterRecoCuts, numTotL1BitsBeforeCuts, cppFunctionSkipper::operator, create_public_lumi_plots::path_name, processName_, reco_parametersets, recoSelBitsDir, DQMStore::rmdir(), DQMStore::setCurrentFolder(), HLTConfigProvider::size(), triggerBitsDir, HLTConfigProvider::triggerIndex(), and triggerName_.

397 {
398 
399 
400  DQMStore *dbe_ = 0;
401  dbe_ = Service<DQMStore>().operator->();
402 
403  if (dbe_) {
405  dbe_->rmdir(dirname_);
406  }
407 
408  if (dbe_) {
410  }
411 
412 
413  bool changed(true);
414  // cout << "hltConfig_.init(run,c,processName_,changed) = " << (int) hltConfig_.init(run,c,processName_,changed) << endl;
415  // cout << "changed = " << (int) changed << endl;
416  if (hltConfig_.init(run,c,processName_,changed)) {
417  // cout << "AAAA" << endl;
418  if (changed) {
419  // cout << "BBBBBBB" << endl;
420  // check if trigger name in (new) config
421  if (triggerName_!="@") { // "@" means: analyze all triggers in config
422  // cout << "hltConfig_.size() = " << hltConfig_.size() << endl;
424  const unsigned int triggerIndex(hltConfig_.triggerIndex(triggerName_));
425  if (triggerIndex>=nHltPaths) {
426 // cout << "HLTriggerOffline/SUSYBSM"
427 // << " TriggerName " << triggerName_
428 // << " not available in (new) config!" << endl;
429 // cout << "Available TriggerNames are: " << endl;
430  hltConfig_.dump("Triggers");
431  }
432  }
433  else {
434  // cout << "CCCCCCCC" << endl;
436  }
437  }
438  } else {
439 // cout << "HLTriggerOffline/SUSYBSM"
440 // << " config extraction failure with process name "
441 // << processName_ << endl;
442  }
443 
444  // cout << "nHltPaths = " << nHltPaths << endl;
445  nL1Bits = 128;
446 
447  firstEvent = true;
448 
449  //resize the vectors ccording to the number of L1 paths
452  for(unsigned int i=0; i<numTotL1BitsAfterRecoCuts.size(); ++i) numTotL1BitsAfterRecoCuts[i].resize(nL1Bits+1);
454  for(unsigned int i=0; i<numTotL1BitsAfterMcCuts.size(); ++i) numTotL1BitsAfterMcCuts[i].resize(nL1Bits+1);
455 
456  //resize the vectors ccording to the number of HLT paths
459  for(unsigned int i=0; i<numTotHltBitsAfterRecoCuts.size(); ++i) numTotHltBitsAfterRecoCuts[i].resize(nHltPaths+1);
461  for(unsigned int i=0; i<numTotHltBitsAfterMcCuts.size(); ++i) numTotHltBitsAfterMcCuts[i].resize(nHltPaths+1);
462 
463  if (dbe_) {
465  dbe_->rmdir(dirname_);
466  }
467 
468 
469  if (dbe_) {
471  }
472 
474  //add 1 bin for the Total
475  hL1BitsBeforeCuts = dbe_->book1D("L1Bits", "L1 Trigger Bits",nL1Bits+1, 0, nL1Bits+1);
476  hHltBitsBeforeCuts = dbe_->book1D("HltBits","HL Trigger Bits",nHltPaths+1, 0, nHltPaths+1);
477 // hL1OverlapNormToTotal = dbe_->book2D("L1OverlapNormToTotal" ,"Overlap among L1 paths, norm to the Total number of Events", 1, 0, 1, 1, 0, 1);
478 // hHltOverlapNormToTotal = dbe_->book2D("HltOverlapNormToTotal" ,"Overlap among Hlt paths, norm to the Total number of Events ", 1, 0, 1, 1, 0, 1);
479 // hL1OverlapNormToLargestPath = dbe_->book2D("L1OverlapNormToLargestPath" ,"Overlap among L1 paths, norm to the Largest of the couple ", 1, 0, 1, 1, 0, 1);
480 // hHltOverlapNormToLargestPath = dbe_->book2D("HltOverlapNormToLargestPath","Overlap among Hlt paths, norm to the Largest of the couple ", 1, 0, 1, 1, 0, 1);
481 
482  for(unsigned int i=0; i<myRecoSelector.size(); ++i)
483  {
484  string path_name = myRecoSelector[i]->GetName();
485  char histo_name[256], histo_title[256];
486  //sprintf(histo_name, "L1Bits");
487  sprintf(histo_name, "L1Bits_%s", path_name.c_str());
488  sprintf(histo_title, "L1 Trigger Bits for %s Selection", path_name.c_str());
489  dbe_->setCurrentFolder(dirname_+recoSelBitsDir+"/"+path_name);
490  hL1BitsAfterRecoCuts.push_back(dbe_->book1D(histo_name, histo_title, nL1Bits+1, 0, nL1Bits+1));
491  //sprintf(histo_name, "HltBits");
492  sprintf(histo_name, "HltBits_%s", path_name.c_str());
493  sprintf(histo_title, "HL Trigger Bits for %s Selection", path_name.c_str());
494  hHltBitsAfterRecoCuts.push_back(dbe_->book1D(histo_name, histo_title, nHltPaths+1, 0, nHltPaths+1));
495  }
496  for(unsigned int i=0; i<myMcSelector.size(); ++i)
497  {
498  string path_name = myMcSelector[i]->GetName();
499  char histo_name[256], histo_title[256];
500  //sprintf(histo_name, "L1Bits");
501  sprintf(histo_name, "L1Bits_%s", path_name.c_str());
502  sprintf(histo_title, "L1 Trigger Bits for %s Selection", path_name.c_str());
503  dbe_->setCurrentFolder(dirname_+mcSelBitsDir+"/"+path_name);
504  hL1BitsAfterMcCuts.push_back(dbe_->book1D(histo_name, histo_title, nL1Bits+1, 0, nL1Bits+1));
505  //sprintf(histo_name, "HltBits");
506  sprintf(histo_name, "HltBits_%s", path_name.c_str());
507  sprintf(histo_title, "HL Trigger Bits for %s Selection", path_name.c_str());
508  hHltBitsAfterMcCuts.push_back(dbe_->book1D(histo_name, histo_title, nHltPaths+1, 0, nHltPaths+1));
509  }
510 
511  //create the histos with paths
512  //identical to the ones with "bits"
513  //but with the names in the x axis
514  //instead of the numbers
515 
517  TH1F* hTemp = (TH1F*) (hL1BitsBeforeCuts->getTH1F())->Clone("L1Paths");
518  hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hTemp);
519  // hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hL1BitsBeforeCuts->getTH1F());
520  hTemp = (TH1F*) (hHltBitsBeforeCuts->getTH1F())->Clone("HltPaths");
521  hHltPathsBeforeCuts = dbe_->book1D("HltPaths", hTemp);
522 
523  for(unsigned int i=0; i<myRecoSelector.size(); ++i)
524  {
525  string path_name = myRecoSelector[i]->GetName();
526  char histo_name[256];
527  //sprintf(histo_name, "L1Paths");
528  sprintf(histo_name, "L1Paths_%s", path_name.c_str());
530  hTemp = (TH1F*) (hL1BitsAfterRecoCuts[i]->getTH1F())->Clone(histo_name);
531  hL1PathsAfterRecoCuts.push_back(dbe_->book1D(histo_name, hTemp));
532  //sprintf(histo_name, "HltPaths");
533  sprintf(histo_name, "HltPaths_%s", path_name.c_str());
534  hTemp = (TH1F*) (hHltBitsAfterRecoCuts[i]->getTH1F())->Clone(histo_name);
535  hHltPathsAfterRecoCuts.push_back(dbe_->book1D(histo_name, hTemp));
536  }
537 
538  for(unsigned int i=0; i<myMcSelector.size(); ++i)
539  {
540  string path_name = myMcSelector[i]->GetName();
541  char histo_name[256];
542  //sprintf(histo_name, "L1Paths");
543  sprintf(histo_name, "L1Paths_%s", path_name.c_str());
544  dbe_->setCurrentFolder(dirname_+mcSelBitsDir+"/"+path_name);
545  hTemp = (TH1F*) (hL1BitsAfterMcCuts[i]->getTH1F())->Clone(histo_name);
546  hL1PathsAfterMcCuts.push_back(dbe_->book1D(histo_name, hTemp));
547  //sprintf(histo_name, "HltPaths");
548  sprintf(histo_name, "HltPaths_%s", path_name.c_str());
549  hTemp = (TH1F*) (hHltBitsAfterMcCuts[i]->getTH1F())->Clone(histo_name);
550  hHltPathsAfterMcCuts.push_back(dbe_->book1D(histo_name, hTemp));
551  }
552 
554 }
unsigned int size() const
number of trigger paths in trigger table
std::vector< MonitorElement * > hHltBitsAfterRecoCuts
void dump(const std::string &what) const
Dumping config info to cout.
int i
Definition: DBlmapReader.cc:9
std::string dirname_
std::vector< McSelector * > myMcSelector
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2730
std::vector< MonitorElement * > hL1PathsAfterRecoCuts
std::vector< MonitorElement * > hHltPathsAfterRecoCuts
unsigned int nHltPaths
std::vector< int > numTotHltBitsBeforeCuts
std::vector< MonitorElement * > hHltPathsAfterMcCuts
MuonAnalyzerSBSM * myMuonAnalyzer
std::vector< MonitorElement * > hL1BitsAfterMcCuts
std::vector< std::vector< int > > numTotHltBitsAfterMcCuts
std::vector< MonitorElement * > hL1PathsAfterMcCuts
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
std::vector< MonitorElement * > hL1BitsAfterRecoCuts
std::vector< RecoSelector * > myRecoSelector
std::string triggerName_
MonitorElement * hHltPathsBeforeCuts
std::string recoSelBitsDir
TH1F * getTH1F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
std::string mcSelBitsDir
MonitorElement * hL1PathsBeforeCuts
std::string triggerBitsDir
std::vector< int > numTotL1BitsBeforeCuts
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
TH1F * getTH1F(void) const
std::vector< MonitorElement * > hHltBitsAfterMcCuts
std::string processName_
std::vector< std::vector< int > > numTotHltBitsAfterRecoCuts
std::vector< edm::ParameterSet > reco_parametersets
std::vector< std::vector< int > > numTotL1BitsAfterRecoCuts
HLTConfigProvider hltConfig_
void InitializePlots(DQMStore *, const std::string)
MonitorElement * hL1BitsBeforeCuts
std::vector< std::vector< int > > numTotL1BitsAfterMcCuts
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
MonitorElement * hHltBitsBeforeCuts
std::vector< edm::ParameterSet > mc_parametersets
void TriggerValidator::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 832 of file TriggerValidator.cc.

833 {
834  LogInfo("TriggerValidator") << "endJob";
835  return;
836 }
void TriggerValidator::endRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 561 of file TriggerValidator.cc.

References hlNames_, i, l1Flag, l1Names_, mcFlag, myMcSelector, myPlotMakerL1, myPlotMakerReco, myRecoSelector, and n.

562 {
563 
564  // myTurnOnMaker->finalOperations();
565 
566  //This piece of code concerns efficiencies
567  //it must be moved to the client
568 
569 
570 
571 // //calculate the final efficiencies and the normalizations
572 // for(unsigned int i=0; i<numTotL1BitsBeforeCuts.size()-1; i++) {
573 // effL1BeforeCuts[i] = (double)numTotL1BitsBeforeCuts[i]/(double)nEvTot;
574 // for(unsigned int j=0; j<numTotL1BitsBeforeCuts.size()-1; j++) {
575 // vCorrNormL1[i][j] = (double)vCorrL1[i][j]/(double)nEvTot;
576 // }
577 // }
578 
579 // for(unsigned int i=0; i<numTotHltBitsBeforeCuts.size()-1; i++) {
580 // effHltBeforeCuts[i] = (double)numTotHltBitsBeforeCuts[i]/(double)nEvTot;
581 // for(unsigned int j=0; j<numTotHltBitsBeforeCuts.size()-1; j++) {
582 // vCorrNormHlt[i][j] = (double)vCorrHlt[i][j]/(double)nEvTot;
583 // }
584 // }
585 
586 // //after the reco cuts
587 
588 // if(nEvRecoSelected) {
589 // for(unsigned int i=0; i<numTotL1BitsAfterRecoCuts.size()-1; i++) {
590 // effL1AfterRecoCuts[i] = (double)numTotL1BitsAfterRecoCuts[i]/(double)nEvRecoSelected;
591 // }
592 
593 // for(unsigned int i=0; i<numTotHltBitsAfterRecoCuts.size()-1; i++) {
594 // effHltAfterRecoCuts[i] = (double)numTotHltBitsAfterRecoCuts[i]/(double)nEvRecoSelected;
595 // }
596 // } else {
597 
598 // for(unsigned int i=0; i<numTotL1BitsAfterRecoCuts.size()-1; i++) {
599 // effL1AfterRecoCuts[i] = -1;
600 // }
601 
602 // for(unsigned int i=0; i<numTotHltBitsAfterRecoCuts.size()-1; i++) {
603 // effHltAfterRecoCuts[i] = -1;
604 // }
605 // }
606 
607 
608 // //after the mc cuts
609 // if(nEvMcSelected) {
610 // for(unsigned int i=0; i<numTotL1BitsAfterMcCuts.size()-1; i++) {
611 // effL1AfterMcCuts[i] = (double)numTotL1BitsAfterMcCuts[i]/(double)nEvMcSelected;
612 // }
613 
614 // for(unsigned int i=0; i<numTotHltBitsAfterMcCuts.size()-1; i++) {
615 // effHltAfterMcCuts[i] = (double)numTotHltBitsAfterMcCuts[i]/(double)nEvMcSelected;
616 // }
617 // } else {
618 // for(unsigned int i=0; i<numTotL1BitsAfterMcCuts.size()-1; i++) {
619 // effL1AfterMcCuts[i] = -1;
620 // }
621 
622 // for(unsigned int i=0; i<numTotHltBitsAfterMcCuts.size()-1; i++) {
623 // effHltAfterMcCuts[i] = -1;
624 // }
625 // }
626 
627 
628 
629 
630 
631 
632 
633 
634 // myPlotMaker->writeHistos();
635 // myTurnOnMaker->writeHistos();
636 
637 
638  // using namespace std;
639 
640  unsigned int n(l1Names_.size());
641 
642  n = l1Names_.size();
643  edm::LogInfo("L1TableSummary") << endl;
644  edm::LogVerbatim("L1TableSummary") << "L1T-Table "
645  << right << setw(10) << "L1T Bit#" << " "
646  << "Name" << "\n";
647  for (unsigned int i=0; i!=n; i++) {
648  edm::LogVerbatim("L1TableSummary") << right << setw(20) << i << " "
649  << l1Names_[i] << "\n";
650  }
651 
652 
653  n = hlNames_.size();
654  edm::LogInfo("HltTableSummary") << endl;
655  edm::LogVerbatim("HltTableSummary") << "HLT-Table "
656  << right << setw(10) << "HLT Bit#" << " "
657  << "Name" << "\n";
658 
659  for (unsigned int i=0; i!=n; i++) {
660  edm::LogVerbatim("HltTableSummary") << right << setw(20) << i << " "
661  << hlNames_[i] << "\n";
662  }
663 
664  edm::LogVerbatim("HltTableSummary") << endl;
665  edm::LogVerbatim("HltTableSummary") << "HLT-Table end!" << endl;
666  edm::LogVerbatim("HltTableSummary") << endl;
667 
668 
669 
670  //the stat file with the efficiecies has to be moved to the client
671 
672 
673 
674 // //Print in a stat file the efficiencies and the overlaps
675 
676 
677 // ofstream statFile(StatFileName.c_str(),ios::out);
678 
679 
680 // statFile << "*********************************************************************************" << endl;
681 // statFile << "*********************************************************************************" << endl;
682 // statFile << " L1 Efficiencies " << endl;
683 // statFile << "*********************************************************************************" << endl;
684 // statFile << "*********************************************************************************" << endl;
685 // statFile << endl;
686 // statFile << "---------------------------------------------------------------------------------" << endl;
687 // statFile << "---------------------------------------------------------------------------------" << endl;
688 // statFile << "| L1 Path | eff (Tot) | eff (Reco Sel)| eff (Mc Sel) |" << endl;
689 // statFile << "---------------------------------------------------------------------------------" << endl;
690 // statFile << "---------------------------------------------------------------------------------" << endl;
691 // for(unsigned int i=0; i<numTotL1BitsBeforeCuts.size()-1; i++) {
692 // statFile << "| " << left << setw(29) << l1Names_[i] << "|" << setprecision(3) << showpoint << right << setw(13) << effL1BeforeCuts[i] << " |" <<
693 // setw(13) << effL1AfterRecoCuts[i] << " |" <<
694 // setw(13) << effL1AfterMcCuts[i] << " |" << endl;
695 // }
696 // statFile << "---------------------------------------------------------------------------------" << endl;
697 // statFile << "---------------------------------------------------------------------------------" << endl;
698 // statFile << endl;
699 // statFile << endl;
700 // statFile << endl;
701 // statFile << endl;
702 // statFile << endl;
703 // statFile << endl;
704 
705 
706 
707 // statFile << "**********************************************************************************" << endl;
708 // statFile << "**********************************************************************************" << endl;
709 // statFile << " Hlt Efficiencies " << endl;
710 // statFile << "**********************************************************************************" << endl;
711 // statFile << "**********************************************************************************" << endl;
712 // statFile << endl;
713 // statFile << "----------------------------------------------------------------------------------" << endl;
714 // statFile << "----------------------------------------------------------------------------------" << endl;
715 // statFile << "| Hlt Path | eff (Tot) | eff (Reco Sel)| eff (Mc Sel) |" << endl;
716 // statFile << "----------------------------------------------------------------------------------" << endl;
717 // statFile << "----------------------------------------------------------------------------------" << endl;
718 // for(unsigned int i=0; i<numTotHltBitsBeforeCuts.size()-1; i++) {
719 // statFile << "| " << left << setw(29) << hlNames_[i] << "|" << setprecision(3) << showpoint << right << setw(13) << effHltBeforeCuts[i] << " |" <<
720 // setw(13) << effHltAfterRecoCuts[i] << " |" <<
721 // setw(13) << effHltAfterMcCuts[i] << " |" <<endl;
722 // }
723 // statFile << "----------------------------------------------------------------------------------" << endl;
724 // statFile << "----------------------------------------------------------------------------------" << endl;
725 // statFile << endl;
726 // statFile << endl;
727 // statFile << endl;
728 // statFile << endl;
729 // statFile << endl;
730 // statFile << endl;
731 
732 
733 
734 
735 
736 // statFile << "****************************************************************************************************************************************************" << endl;
737 // statFile << "****************************************************************************************************************************************************" << endl;
738 // statFile << " L1 Correlations (only overlaps >5% are shown, and only without any selection) " << endl;
739 // statFile << "****************************************************************************************************************************************************" << endl;
740 // statFile << "****************************************************************************************************************************************************" << endl;
741 // statFile << endl;
742 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
743 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
744 // statFile << "| L1 Path 1 | L1 Path 2 | Overlap Norm to Total | Overlap Norm to Path | Path of Norm |" << endl;
745 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
746 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
747 // statFile << endl;
748 // for(unsigned int i=0; i<numTotL1BitsBeforeCuts.size()-1; i++) {
749 // for(unsigned int j=0; j<numTotL1BitsBeforeCuts.size()-1; j++) {
750 // if(vCorrNormL1[i][j]>0.05) {
751 // int iNorm = 0;
752 // if(effL1BeforeCuts[i] > effL1BeforeCuts[j]) {iNorm = i;}
753 // else {iNorm = j;}
754 // double effNorm = vCorrNormL1[i][j] / effL1BeforeCuts[iNorm];
755 // statFile << "| " << left << setw(29) << l1Names_[i] << "| " << setw(29) << left << l1Names_[j] << "|"
756 // << setprecision(3) << showpoint << right << setw(22) << vCorrNormL1[i][j] << " |"
757 // << setprecision(3) << showpoint << right << setw(21) << effNorm << " | "
758 // << left << setw(29) << l1Names_[iNorm] << "|" << endl;
759 // }
760 // }
761 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
762 // }
763 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
764 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
765 // statFile << endl;
766 // statFile << endl;
767 // statFile << endl;
768 // statFile << endl;
769 // statFile << endl;
770 // statFile << endl;
771 
772 
773 // statFile << "****************************************************************************************************************************************************" << endl;
774 // statFile << "****************************************************************************************************************************************************" << endl;
775 // statFile << " Hlt Correlations (only overlaps >5% are shown, and only without any selection) " << endl;
776 // statFile << "****************************************************************************************************************************************************" << endl;
777 // statFile << "****************************************************************************************************************************************************" << endl;
778 // statFile << endl;
779 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
780 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
781 // statFile << "| Hlt Path 1 | Hlt Path 2 | Overlap Norm to Total | Overlap Norm to Path | Path of Norm |" << endl;
782 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
783 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
784 // statFile << endl;
785 // for(unsigned int i=0; i<numTotHltBitsBeforeCuts.size()-1; i++) {
786 // for(unsigned int j=0; j<numTotHltBitsBeforeCuts.size()-1; j++) {
787 // if(vCorrNormHlt[i][j]>0.05) {
788 // int iNorm = 0;
789 // if(effHltBeforeCuts[i] > effHltBeforeCuts[j]) {iNorm = i;}
790 // else {iNorm = j;}
791 // double effNorm = vCorrNormHlt[i][j]/effHltBeforeCuts[iNorm];
792 // statFile << "| " << left << setw(29) << hlNames_[i] << "| " << setw(29) << left << hlNames_[j] << "|"
793 // << setprecision(3) << showpoint << right << setw(22) << vCorrNormHlt[i][j] << " |"
794 // << setprecision(3) << showpoint << right << setw(21) << effNorm << " | "
795 // << left << setw(29) << hlNames_[iNorm] << "|" << endl;
796 // }
797 // }
798 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
799 // }
800 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
801 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
802 // statFile << endl;
803 // statFile << endl;
804 // statFile << endl;
805 // statFile << endl;
806 // statFile << endl;
807 // statFile << endl;
808 
809 
810 
811 
812 // statFile.close();
813 
814 
815  for(unsigned int i=0; i<myRecoSelector.size(); ++i) delete myRecoSelector[i];
816  myRecoSelector.clear();
817  if(mcFlag)
818  {
819  for(unsigned int i=0; i<myMcSelector.size(); ++i) delete myMcSelector[i];
820  myMcSelector.clear();
821  }
822 
823  if(l1Flag) delete myPlotMakerL1;
824  delete myPlotMakerReco;
825 // delete myTurnOnMaker;
826  return;
827 }
int i
Definition: DBlmapReader.cc:9
std::vector< McSelector * > myMcSelector
PlotMakerReco * myPlotMakerReco
std::vector< std::string > l1Names_
std::vector< RecoSelector * > myRecoSelector
PlotMakerL1 * myPlotMakerL1
std::vector< std::string > hlNames_

Member Data Documentation

DQMStore* TriggerValidator::dbe_
private

Definition at line 80 of file TriggerValidator.h.

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

std::string TriggerValidator::dirname_
private

Definition at line 81 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

std::vector<double> TriggerValidator::effHltAfterMcCuts
private

Definition at line 146 of file TriggerValidator.h.

std::vector<double> TriggerValidator::effHltAfterRecoCuts
private

Definition at line 144 of file TriggerValidator.h.

std::vector<double> TriggerValidator::effHltBeforeCuts
private

Definition at line 142 of file TriggerValidator.h.

std::vector<double> TriggerValidator::effL1AfterMcCuts
private

Definition at line 145 of file TriggerValidator.h.

std::vector<double> TriggerValidator::effL1AfterRecoCuts
private

Definition at line 143 of file TriggerValidator.h.

std::vector<double> TriggerValidator::effL1BeforeCuts
private

Definition at line 141 of file TriggerValidator.h.

bool TriggerValidator::firstEvent
private

Definition at line 187 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> TriggerValidator::gtDigis_token_
private

Definition at line 125 of file TriggerValidator.h.

Referenced by analyze().

std::vector<MonitorElement*> TriggerValidator::hHltBitsAfterMcCuts
private

Definition at line 168 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<MonitorElement*> TriggerValidator::hHltBitsAfterRecoCuts
private

Definition at line 166 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

MonitorElement* TriggerValidator::hHltBitsBeforeCuts
private

Definition at line 164 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<MonitorElement*> TriggerValidator::hHltPathsAfterMcCuts
private

Definition at line 175 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<MonitorElement*> TriggerValidator::hHltPathsAfterRecoCuts
private

Definition at line 173 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

MonitorElement* TriggerValidator::hHltPathsBeforeCuts
private

Definition at line 171 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::string TriggerValidator::HistoFileName
private

Definition at line 104 of file TriggerValidator.h.

std::vector<MonitorElement*> TriggerValidator::hL1BitsAfterMcCuts
private

Definition at line 167 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<MonitorElement*> TriggerValidator::hL1BitsAfterRecoCuts
private

Definition at line 165 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

MonitorElement* TriggerValidator::hL1BitsBeforeCuts
private

Definition at line 163 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<MonitorElement*> TriggerValidator::hL1PathsAfterMcCuts
private

Definition at line 174 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<MonitorElement*> TriggerValidator::hL1PathsAfterRecoCuts
private

Definition at line 172 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

MonitorElement* TriggerValidator::hL1PathsBeforeCuts
private

Definition at line 170 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<std::string> TriggerValidator::hlNames_
private

Definition at line 130 of file TriggerValidator.h.

Referenced by analyze(), and endRun().

edm::EDGetTokenT<edm::TriggerResults> TriggerValidator::hlt_token_
private

Definition at line 108 of file TriggerValidator.h.

Referenced by analyze().

std::vector<int> TriggerValidator::hltbits
private

Definition at line 185 of file TriggerValidator.h.

Referenced by analyze().

HLTConfigProvider TriggerValidator::hltConfig_
private

Definition at line 82 of file TriggerValidator.h.

Referenced by beginRun().

edm::InputTag TriggerValidator::hltLabel
private

Definition at line 107 of file TriggerValidator.h.

Referenced by analyze().

std::vector<int> TriggerValidator::l1bits
private

Definition at line 184 of file TriggerValidator.h.

Referenced by analyze().

bool TriggerValidator::l1Flag
private

Definition at line 112 of file TriggerValidator.h.

Referenced by analyze(), endRun(), and TriggerValidator().

edm::EDGetTokenT<L1GlobalTriggerObjectMapRecord> TriggerValidator::l1Label
private

Definition at line 106 of file TriggerValidator.h.

Referenced by analyze().

std::map<int,std::string> TriggerValidator::l1NameMap
private

Definition at line 78 of file TriggerValidator.h.

Referenced by analyze().

std::vector<std::string> TriggerValidator::l1Names_
private

Definition at line 128 of file TriggerValidator.h.

Referenced by analyze(), and endRun().

std::vector<edm::ParameterSet> TriggerValidator::mc_parametersets
private

Definition at line 116 of file TriggerValidator.h.

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

bool TriggerValidator::mcFlag
private

Definition at line 111 of file TriggerValidator.h.

Referenced by analyze(), endRun(), and TriggerValidator().

std::string TriggerValidator::mcSelBitsDir
private

Definition at line 86 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

edm::InputTag TriggerValidator::muonTag_
private

Definition at line 121 of file TriggerValidator.h.

Referenced by TriggerValidator().

std::vector<McSelector*> TriggerValidator::myMcSelector
private

Definition at line 96 of file TriggerValidator.h.

Referenced by analyze(), beginRun(), endRun(), and TriggerValidator().

MuonAnalyzerSBSM* TriggerValidator::myMuonAnalyzer
private

Definition at line 189 of file TriggerValidator.h.

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

PlotMakerL1* TriggerValidator::myPlotMakerL1
private

Definition at line 99 of file TriggerValidator.h.

Referenced by analyze(), endRun(), and TriggerValidator().

PlotMakerReco* TriggerValidator::myPlotMakerReco
private

Definition at line 100 of file TriggerValidator.h.

Referenced by analyze(), endRun(), and TriggerValidator().

std::vector<RecoSelector*> TriggerValidator::myRecoSelector
private

Definition at line 95 of file TriggerValidator.h.

Referenced by analyze(), beginRun(), endRun(), and TriggerValidator().

std::vector<int> TriggerValidator::nEvMcSelected
private

Definition at line 157 of file TriggerValidator.h.

Referenced by analyze(), and TriggerValidator().

std::vector<int> TriggerValidator::nEvRecoSelected
private

Definition at line 156 of file TriggerValidator.h.

Referenced by analyze(), and TriggerValidator().

int TriggerValidator::nEvTot
private

Definition at line 155 of file TriggerValidator.h.

Referenced by analyze(), and TriggerValidator().

unsigned int TriggerValidator::nHltPaths
private

Definition at line 90 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

int TriggerValidator::nL1Bits
private

Definition at line 91 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

std::vector< std::vector<int> > TriggerValidator::numTotHltBitsAfterMcCuts
private

Definition at line 139 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector< std::vector<int> > TriggerValidator::numTotHltBitsAfterRecoCuts
private

Definition at line 137 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<int> TriggerValidator::numTotHltBitsBeforeCuts
private

Definition at line 135 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector< std::vector<int> > TriggerValidator::numTotL1BitsAfterMcCuts
private

Definition at line 138 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector< std::vector<int> > TriggerValidator::numTotL1BitsAfterRecoCuts
private

Definition at line 136 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::vector<int> TriggerValidator::numTotL1BitsBeforeCuts
private

Definition at line 134 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

edm::ParameterSet TriggerValidator::plotMakerL1Input
private

Definition at line 118 of file TriggerValidator.h.

Referenced by TriggerValidator().

edm::ParameterSet TriggerValidator::plotMakerRecoInput
private

Definition at line 119 of file TriggerValidator.h.

Referenced by TriggerValidator().

std::string TriggerValidator::processName_
private

Definition at line 123 of file TriggerValidator.h.

Referenced by beginRun().

std::vector<edm::ParameterSet> TriggerValidator::reco_parametersets
private

Definition at line 115 of file TriggerValidator.h.

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

std::string TriggerValidator::recoSelBitsDir
private

Definition at line 85 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

std::string TriggerValidator::StatFileName
private

Definition at line 105 of file TriggerValidator.h.

TFile* TriggerValidator::theHistoFile

Definition at line 66 of file TriggerValidator.h.

Referenced by TriggerValidator().

std::string TriggerValidator::triggerBitsDir
private

Definition at line 84 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

std::string TriggerValidator::triggerName_
private

Definition at line 124 of file TriggerValidator.h.

Referenced by beginRun().

edm::InputTag TriggerValidator::triggerTag_
private

Definition at line 122 of file TriggerValidator.h.

Referenced by TriggerValidator().

edm::ParameterSet TriggerValidator::turnOn_params
private

Definition at line 117 of file TriggerValidator.h.

std::vector< std::vector<int> > TriggerValidator::vCorrHlt
private

Definition at line 151 of file TriggerValidator.h.

Referenced by analyze().

std::vector< std::vector<int> > TriggerValidator::vCorrL1
private

Definition at line 150 of file TriggerValidator.h.

Referenced by analyze().

std::vector< std::vector<double> > TriggerValidator::vCorrNormHlt
private

Definition at line 153 of file TriggerValidator.h.

Referenced by analyze().

std::vector< std::vector<double> > TriggerValidator::vCorrNormL1
private

Definition at line 152 of file TriggerValidator.h.

Referenced by analyze().