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
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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
 
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_
 
std::vector< int > hltbits
 
HLTConfigProvider hltConfig_
 
edm::InputTag hltLabel
 
std::vector< int > l1bits
 
bool l1Flag
 
edm::InputTag 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
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 54 of file TriggerValidator.h.

Constructor & Destructor Documentation

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

Definition at line 85 of file TriggerValidator.cc.

References edm::ParameterSet::addParameter(), dbe_, dirname_, edm::ParameterSet::getUntrackedParameter(), i, LogDebug, mc_parametersets, mcSelBitsDir, nEvMcSelected, nEvRecoSelected, nEvTot, nHltPaths, nL1Bits, cppFunctionSkipper::operator, plotMakerL1Input, plotMakerRecoInput, reco_parametersets, recoSelBitsDir, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), AlCaHLTBitMon_QueryRunRegistry::string, theHistoFile, and triggerBitsDir.

85  :
86  dirname_(iConfig.getUntrackedParameter("dirname",
87  std::string("HLT/SusyExo"))),
88  HistoFileName(iConfig.getUntrackedParameter("histoFileName",
89  std::string("SusyBsmTriggerValidation.root"))),
90  StatFileName(iConfig.getUntrackedParameter("statFileName",
91  std::string("SusyBsmTriggerValidation.stat"))),
92  l1Label(iConfig.getParameter<edm::InputTag>("L1Label")),
93  hltLabel(iConfig.getParameter<edm::InputTag>("HltLabel")),
94  mcFlag(iConfig.getUntrackedParameter<bool>("mc_flag",false)),
95  l1Flag(iConfig.getUntrackedParameter<bool>("l1_flag",false)),
96  reco_parametersets(iConfig.getParameter<VParameterSet>("reco_parametersets")),
97  mc_parametersets(iConfig.getParameter<VParameterSet>("mc_parametersets")),
98  turnOn_params(iConfig.getParameter<ParameterSet>("TurnOnParams")),
99  plotMakerL1Input(iConfig.getParameter<ParameterSet>("PlotMakerL1Input")),
100  plotMakerRecoInput(iConfig.getParameter<ParameterSet>("PlotMakerRecoInput")),
101  muonTag_(iConfig.getParameter<edm::InputTag>("muonTag")),
102  triggerTag_(iConfig.getParameter<edm::InputTag>("triggerTag")),
103  processName_(iConfig.getParameter<std::string>("hltConfigName")),
104  triggerName_(iConfig.getParameter<std::string>("triggerName"))
105 {
106  //now do what ever initialization is needed
107  theHistoFile = 0;
108  nEvTot = 0;
109  for(unsigned int i=0; i<reco_parametersets.size(); ++i) nEvRecoSelected.push_back(0);
110  for(unsigned int i=0; i<mc_parametersets.size(); ++i) nEvMcSelected.push_back(0);
111 
112  nHltPaths = 0;
113  nL1Bits = 0;
114 
115 
116  // --- set the names in the dbe folders ---
117  triggerBitsDir = "/TriggerBits";
118  recoSelBitsDir = "/RecoSelection";
119  mcSelBitsDir = "/McSelection";
120 
121 
122  LogDebug("TriggerValidator") << "constructor...." ;
123 
125  if ( ! dbe_ ) {
126  LogInfo("TriggerValidator") << "unabel to get DQMStore service?";
127  }
128  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
129  dbe_->setVerbose(0);
130  }
131 
132 
133 
134 
135  if (dbe_ != 0 ) {
137  }
138 
139 
142 
143 }
#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::string StatFileName
unsigned int nHltPaths
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
std::vector< int > nEvRecoSelected
std::vector< int > nEvMcSelected
std::string triggerName_
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:145
std::string recoSelBitsDir
edm::InputTag triggerTag_
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
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:434
edm::InputTag l1Label
std::vector< edm::ParameterSet > mc_parametersets
TriggerValidator::~TriggerValidator ( )

Definition at line 146 of file TriggerValidator.cc.

147 {
148 
149  // do anything here that needs to be done at desctruction time
150  // (e.g. close files, deallocate resources etc.)
151 
152 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 161 of file TriggerValidator.cc.

References PlotMakerL1::bookHistos(), PlotMakerReco::bookHistos(), dbe_, edm::InputTag::encode(), MonitorElement::Fill(), MuonAnalyzerSBSM::FillPlots(), PlotMakerL1::fillPlots(), PlotMakerReco::fillPlots(), firstEvent, edm::Event::getByLabel(), hHltBitsAfterMcCuts, hHltBitsAfterRecoCuts, hHltBitsBeforeCuts, hHltPathsAfterMcCuts, hHltPathsAfterRecoCuts, hHltPathsBeforeCuts, hL1BitsAfterMcCuts, hL1BitsAfterRecoCuts, hL1BitsBeforeCuts, hL1PathsAfterMcCuts, hL1PathsAfterRecoCuts, hL1PathsBeforeCuts, hlNames_, 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.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 397 of file TriggerValidator.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 403 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(), l1Flag, mc_parametersets, mcFlag, mcSelBitsDir, muonTag_, myMcSelector, myMuonAnalyzer, myPlotMakerL1, myPlotMakerReco, myRecoSelector, nHltPaths, nL1Bits, numTotHltBitsAfterMcCuts, numTotHltBitsAfterRecoCuts, numTotHltBitsBeforeCuts, numTotL1BitsAfterMcCuts, numTotL1BitsAfterRecoCuts, numTotL1BitsBeforeCuts, cppFunctionSkipper::operator, create_public_lumi_plots::path_name, plotMakerL1Input, plotMakerRecoInput, processName_, reco_parametersets, recoSelBitsDir, DQMStore::rmdir(), DQMStore::setCurrentFolder(), HLTConfigProvider::size(), triggerBitsDir, HLTConfigProvider::triggerIndex(), triggerName_, and triggerTag_.

404 {
405 
406 
407  DQMStore *dbe_ = 0;
408  dbe_ = Service<DQMStore>().operator->();
409 
410  if (dbe_) {
412  dbe_->rmdir(dirname_);
413  }
414 
415  if (dbe_) {
417  }
418 
419 
420  bool changed(true);
421  // cout << "hltConfig_.init(run,c,processName_,changed) = " << (int) hltConfig_.init(run,c,processName_,changed) << endl;
422  // cout << "changed = " << (int) changed << endl;
423  if (hltConfig_.init(run,c,processName_,changed)) {
424  // cout << "AAAA" << endl;
425  if (changed) {
426  // cout << "BBBBBBB" << endl;
427  // check if trigger name in (new) config
428  if (triggerName_!="@") { // "@" means: analyze all triggers in config
429  // cout << "hltConfig_.size() = " << hltConfig_.size() << endl;
431  const unsigned int triggerIndex(hltConfig_.triggerIndex(triggerName_));
432  if (triggerIndex>=nHltPaths) {
433 // cout << "HLTriggerOffline/SUSYBSM"
434 // << " TriggerName " << triggerName_
435 // << " not available in (new) config!" << endl;
436 // cout << "Available TriggerNames are: " << endl;
437  hltConfig_.dump("Triggers");
438  }
439  }
440  else {
441  // cout << "CCCCCCCC" << endl;
443  }
444  }
445  } else {
446 // cout << "HLTriggerOffline/SUSYBSM"
447 // << " config extraction failure with process name "
448 // << processName_ << endl;
449  }
450 
451  // cout << "nHltPaths = " << nHltPaths << endl;
452  nL1Bits = 128;
453 
454 
455 
456  for(unsigned int i=0; i<reco_parametersets.size(); ++i) myRecoSelector.push_back(new RecoSelector(reco_parametersets[i]));
457  if(mcFlag) for(unsigned int i=0; i<mc_parametersets.size(); ++i) myMcSelector.push_back(new McSelector(mc_parametersets[i]));
460 // myTurnOnMaker = new TurnOnMaker(turnOn_params);
461  firstEvent = true;
462 
463  //resize the vectors ccording to the number of L1 paths
466  for(unsigned int i=0; i<numTotL1BitsAfterRecoCuts.size(); ++i) numTotL1BitsAfterRecoCuts[i].resize(nL1Bits+1);
468  for(unsigned int i=0; i<numTotL1BitsAfterMcCuts.size(); ++i) numTotL1BitsAfterMcCuts[i].resize(nL1Bits+1);
469 
470  //resize the vectors ccording to the number of HLT paths
473  for(unsigned int i=0; i<numTotHltBitsAfterRecoCuts.size(); ++i) numTotHltBitsAfterRecoCuts[i].resize(nHltPaths+1);
475  for(unsigned int i=0; i<numTotHltBitsAfterMcCuts.size(); ++i) numTotHltBitsAfterMcCuts[i].resize(nHltPaths+1);
476 
477  if (dbe_) {
479  dbe_->rmdir(dirname_);
480  }
481 
482 
483  if (dbe_) {
485  }
486 
488  //add 1 bin for the Total
489  hL1BitsBeforeCuts = dbe_->book1D("L1Bits", "L1 Trigger Bits",nL1Bits+1, 0, nL1Bits+1);
490  hHltBitsBeforeCuts = dbe_->book1D("HltBits","HL Trigger Bits",nHltPaths+1, 0, nHltPaths+1);
491 // hL1OverlapNormToTotal = dbe_->book2D("L1OverlapNormToTotal" ,"Overlap among L1 paths, norm to the Total number of Events", 1, 0, 1, 1, 0, 1);
492 // hHltOverlapNormToTotal = dbe_->book2D("HltOverlapNormToTotal" ,"Overlap among Hlt paths, norm to the Total number of Events ", 1, 0, 1, 1, 0, 1);
493 // hL1OverlapNormToLargestPath = dbe_->book2D("L1OverlapNormToLargestPath" ,"Overlap among L1 paths, norm to the Largest of the couple ", 1, 0, 1, 1, 0, 1);
494 // hHltOverlapNormToLargestPath = dbe_->book2D("HltOverlapNormToLargestPath","Overlap among Hlt paths, norm to the Largest of the couple ", 1, 0, 1, 1, 0, 1);
495 
496  for(unsigned int i=0; i<myRecoSelector.size(); ++i)
497  {
498  string path_name = myRecoSelector[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_+recoSelBitsDir+"/"+path_name);
504  hL1BitsAfterRecoCuts.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  hHltBitsAfterRecoCuts.push_back(dbe_->book1D(histo_name, histo_title, nHltPaths+1, 0, nHltPaths+1));
509  }
510  for(unsigned int i=0; i<myMcSelector.size(); ++i)
511  {
512  string path_name = myMcSelector[i]->GetName();
513  char histo_name[256], histo_title[256];
514  //sprintf(histo_name, "L1Bits");
515  sprintf(histo_name, "L1Bits_%s", path_name.c_str());
516  sprintf(histo_title, "L1 Trigger Bits for %s Selection", path_name.c_str());
517  dbe_->setCurrentFolder(dirname_+mcSelBitsDir+"/"+path_name);
518  hL1BitsAfterMcCuts.push_back(dbe_->book1D(histo_name, histo_title, nL1Bits+1, 0, nL1Bits+1));
519  //sprintf(histo_name, "HltBits");
520  sprintf(histo_name, "HltBits_%s", path_name.c_str());
521  sprintf(histo_title, "HL Trigger Bits for %s Selection", path_name.c_str());
522  hHltBitsAfterMcCuts.push_back(dbe_->book1D(histo_name, histo_title, nHltPaths+1, 0, nHltPaths+1));
523  }
524 
525  //create the histos with paths
526  //identical to the ones with "bits"
527  //but with the names in the x axis
528  //instead of the numbers
529 
531  TH1F* hTemp = (TH1F*) (hL1BitsBeforeCuts->getTH1F())->Clone("L1Paths");
532  hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hTemp);
533  // hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hL1BitsBeforeCuts->getTH1F());
534  hTemp = (TH1F*) (hHltBitsBeforeCuts->getTH1F())->Clone("HltPaths");
535  hHltPathsBeforeCuts = dbe_->book1D("HltPaths", hTemp);
536 
537  for(unsigned int i=0; i<myRecoSelector.size(); ++i)
538  {
539  string path_name = myRecoSelector[i]->GetName();
540  char histo_name[256];
541  //sprintf(histo_name, "L1Paths");
542  sprintf(histo_name, "L1Paths_%s", path_name.c_str());
544  hTemp = (TH1F*) (hL1BitsAfterRecoCuts[i]->getTH1F())->Clone(histo_name);
545  hL1PathsAfterRecoCuts.push_back(dbe_->book1D(histo_name, hTemp));
546  //sprintf(histo_name, "HltPaths");
547  sprintf(histo_name, "HltPaths_%s", path_name.c_str());
548  hTemp = (TH1F*) (hHltBitsAfterRecoCuts[i]->getTH1F())->Clone(histo_name);
549  hHltPathsAfterRecoCuts.push_back(dbe_->book1D(histo_name, hTemp));
550  }
551 
552  for(unsigned int i=0; i<myMcSelector.size(); ++i)
553  {
554  string path_name = myMcSelector[i]->GetName();
555  char histo_name[256];
556  //sprintf(histo_name, "L1Paths");
557  sprintf(histo_name, "L1Paths_%s", path_name.c_str());
558  dbe_->setCurrentFolder(dirname_+mcSelBitsDir+"/"+path_name);
559  hTemp = (TH1F*) (hL1BitsAfterMcCuts[i]->getTH1F())->Clone(histo_name);
560  hL1PathsAfterMcCuts.push_back(dbe_->book1D(histo_name, hTemp));
561  //sprintf(histo_name, "HltPaths");
562  sprintf(histo_name, "HltPaths_%s", path_name.c_str());
563  hTemp = (TH1F*) (hHltBitsAfterMcCuts[i]->getTH1F())->Clone(histo_name);
564  hHltPathsAfterMcCuts.push_back(dbe_->book1D(histo_name, hTemp));
565  }
566 
569 }
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:722
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
std::vector< MonitorElement * > hL1PathsAfterRecoCuts
std::vector< MonitorElement * > hHltPathsAfterRecoCuts
unsigned int nHltPaths
std::vector< int > numTotHltBitsBeforeCuts
std::vector< MonitorElement * > hHltPathsAfterMcCuts
MuonAnalyzerSBSM * myMuonAnalyzer
PlotMakerReco * myPlotMakerReco
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)
edm::InputTag triggerTag_
PlotMakerL1 * myPlotMakerL1
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
edm::ParameterSet plotMakerRecoInput
std::vector< std::vector< int > > numTotL1BitsAfterRecoCuts
HLTConfigProvider hltConfig_
edm::ParameterSet plotMakerL1Input
void InitializePlots(DQMStore *, const std::string)
MonitorElement * hL1BitsBeforeCuts
std::vector< std::vector< int > > numTotL1BitsAfterMcCuts
edm::InputTag muonTag_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * hHltBitsBeforeCuts
std::vector< edm::ParameterSet > mc_parametersets
void TriggerValidator::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 847 of file TriggerValidator.cc.

848 {
849  LogInfo("TriggerValidator") << "endJob";
850  return;
851 }
void TriggerValidator::endRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 576 of file TriggerValidator.cc.

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

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

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

std::string TriggerValidator::dirname_
private

Definition at line 74 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

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

Definition at line 136 of file TriggerValidator.h.

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

Definition at line 134 of file TriggerValidator.h.

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

Definition at line 132 of file TriggerValidator.h.

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

Definition at line 135 of file TriggerValidator.h.

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

Definition at line 133 of file TriggerValidator.h.

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

Definition at line 131 of file TriggerValidator.h.

bool TriggerValidator::firstEvent
private

Definition at line 177 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 158 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 156 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

MonitorElement* TriggerValidator::hHltBitsBeforeCuts
private

Definition at line 154 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 165 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 163 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

MonitorElement* TriggerValidator::hHltPathsBeforeCuts
private

Definition at line 161 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

std::string TriggerValidator::HistoFileName
private

Definition at line 97 of file TriggerValidator.h.

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

Definition at line 157 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 155 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

MonitorElement* TriggerValidator::hL1BitsBeforeCuts
private

Definition at line 153 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 164 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 162 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

MonitorElement* TriggerValidator::hL1PathsBeforeCuts
private

Definition at line 160 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 120 of file TriggerValidator.h.

Referenced by analyze(), and endRun().

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

Definition at line 175 of file TriggerValidator.h.

Referenced by analyze().

HLTConfigProvider TriggerValidator::hltConfig_
private

Definition at line 75 of file TriggerValidator.h.

Referenced by beginRun().

edm::InputTag TriggerValidator::hltLabel
private

Definition at line 100 of file TriggerValidator.h.

Referenced by analyze().

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

Definition at line 174 of file TriggerValidator.h.

Referenced by analyze().

bool TriggerValidator::l1Flag
private

Definition at line 104 of file TriggerValidator.h.

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

edm::InputTag TriggerValidator::l1Label
private

Definition at line 99 of file TriggerValidator.h.

Referenced by analyze().

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

Definition at line 71 of file TriggerValidator.h.

Referenced by analyze().

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

Definition at line 118 of file TriggerValidator.h.

Referenced by analyze(), and endRun().

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

Definition at line 108 of file TriggerValidator.h.

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

bool TriggerValidator::mcFlag
private

Definition at line 103 of file TriggerValidator.h.

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

std::string TriggerValidator::mcSelBitsDir
private

Definition at line 79 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

edm::InputTag TriggerValidator::muonTag_
private

Definition at line 113 of file TriggerValidator.h.

Referenced by beginRun().

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

Definition at line 89 of file TriggerValidator.h.

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

MuonAnalyzerSBSM* TriggerValidator::myMuonAnalyzer
private

Definition at line 179 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

PlotMakerL1* TriggerValidator::myPlotMakerL1
private

Definition at line 92 of file TriggerValidator.h.

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

PlotMakerReco* TriggerValidator::myPlotMakerReco
private

Definition at line 93 of file TriggerValidator.h.

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

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

Definition at line 88 of file TriggerValidator.h.

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

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

Definition at line 147 of file TriggerValidator.h.

Referenced by analyze(), and TriggerValidator().

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

Definition at line 146 of file TriggerValidator.h.

Referenced by analyze(), and TriggerValidator().

int TriggerValidator::nEvTot
private

Definition at line 145 of file TriggerValidator.h.

Referenced by analyze(), and TriggerValidator().

unsigned int TriggerValidator::nHltPaths
private

Definition at line 83 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

int TriggerValidator::nL1Bits
private

Definition at line 84 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

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

Definition at line 129 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 127 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 125 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 128 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 126 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

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

Definition at line 124 of file TriggerValidator.h.

Referenced by analyze(), and beginRun().

edm::ParameterSet TriggerValidator::plotMakerL1Input
private

Definition at line 110 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

edm::ParameterSet TriggerValidator::plotMakerRecoInput
private

Definition at line 111 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

std::string TriggerValidator::processName_
private

Definition at line 115 of file TriggerValidator.h.

Referenced by beginRun().

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

Definition at line 107 of file TriggerValidator.h.

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

std::string TriggerValidator::recoSelBitsDir
private

Definition at line 78 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

std::string TriggerValidator::StatFileName
private

Definition at line 98 of file TriggerValidator.h.

TFile* TriggerValidator::theHistoFile

Definition at line 59 of file TriggerValidator.h.

Referenced by TriggerValidator().

std::string TriggerValidator::triggerBitsDir
private

Definition at line 77 of file TriggerValidator.h.

Referenced by beginRun(), and TriggerValidator().

std::string TriggerValidator::triggerName_
private

Definition at line 116 of file TriggerValidator.h.

Referenced by beginRun().

edm::InputTag TriggerValidator::triggerTag_
private

Definition at line 114 of file TriggerValidator.h.

Referenced by beginRun().

edm::ParameterSet TriggerValidator::turnOn_params
private

Definition at line 109 of file TriggerValidator.h.

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

Definition at line 141 of file TriggerValidator.h.

Referenced by analyze().

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

Definition at line 140 of file TriggerValidator.h.

Referenced by analyze().

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

Definition at line 143 of file TriggerValidator.h.

Referenced by analyze().

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

Definition at line 142 of file TriggerValidator.h.

Referenced by analyze().