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
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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< std::string > hltPathsToCheck_
 
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
 
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 75 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, AlCaHLTBitMon_QueryRunRegistry::string, theHistoFile, triggerBitsDir, and triggerTag_.

75  :
76  dirname_(iConfig.getUntrackedParameter("dirname",
77  std::string("HLT/SusyExo"))),
78  HistoFileName(iConfig.getUntrackedParameter("histoFileName",
79  std::string("SusyBsmTriggerValidation.root"))),
80  StatFileName(iConfig.getUntrackedParameter("statFileName",
81  std::string("SusyBsmTriggerValidation.stat"))),
82  l1Label(consumes<L1GlobalTriggerObjectMapRecord>(iConfig.getParameter<edm::InputTag>("L1Label"))),
83  hltLabel(iConfig.getParameter<edm::InputTag>("HltLabel")),
84  hlt_token_(consumes<TriggerResults>(iConfig.getParameter<edm::InputTag>("HltLabel"))),
85  mcFlag(iConfig.getUntrackedParameter<bool>("mc_flag",false)),
86  l1Flag(iConfig.getUntrackedParameter<bool>("l1_flag",false)),
87  reco_parametersets(iConfig.getParameter<VParameterSet>("reco_parametersets")),
88  mc_parametersets(iConfig.getParameter<VParameterSet>("mc_parametersets")),
89  turnOn_params(iConfig.getParameter<ParameterSet>("TurnOnParams")),
90  plotMakerL1Input(iConfig.getParameter<ParameterSet>("PlotMakerL1Input")),
91  plotMakerRecoInput(iConfig.getParameter<ParameterSet>("PlotMakerRecoInput")),
92  muonTag_(iConfig.getParameter<edm::InputTag>("muonTag")),
93  triggerTag_(iConfig.getParameter<edm::InputTag>("triggerTag")),
94  processName_(iConfig.getParameter<std::string>("hltConfigName")),
95  hltPathsToCheck_(iConfig.getParameter<vector<string>>("hltPathsToCheck")),
96  gtDigis_token_(consumes<L1GlobalTriggerReadoutRecord>(iConfig.getUntrackedParameter<edm::InputTag>("gtDigis",edm::InputTag("gtDigis"))))
97 {
98  //now do what ever initialization is needed
99  theHistoFile = 0;
100  nEvTot = 0;
101  for(unsigned int i=0; i<reco_parametersets.size(); ++i) nEvRecoSelected.push_back(0);
102  for(unsigned int i=0; i<mc_parametersets.size(); ++i) nEvMcSelected.push_back(0);
103 
104  nHltPaths = 0;
105  nL1Bits = 0;
106 
107  // --- set the names in the dbe folders ---
108  triggerBitsDir = "/TriggerBits";
109  recoSelBitsDir = "/RecoSelection";
110  mcSelBitsDir = "/McSelection";
111 
112 
113  LogDebug("TriggerValidator") << "constructor...." ;
114 
116  if ( ! dbe_ ) {
117  LogInfo("TriggerValidator") << "unabel to get DQMStore service?";
118  }
119  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
120  dbe_->setVerbose(0);
121  }
122 
123  if (dbe_ != 0 ) {
124  dbe_->setCurrentFolder(dirname_);
125  }
126 
127 
130 
131  //pass consumes list to the helper classes
132  for(unsigned int i=0; i<reco_parametersets.size(); ++i) myRecoSelector.push_back(new RecoSelector(reco_parametersets[i], consumesCollector()));
133  if(mcFlag) for(unsigned int i=0; i<mc_parametersets.size(); ++i) myMcSelector.push_back(new McSelector(mc_parametersets[i], consumesCollector()));
137 }
#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
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:143
std::string recoSelBitsDir
edm::InputTag triggerTag_
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_
std::vector< std::string > hltPathsToCheck_
std::vector< edm::ParameterSet > mc_parametersets
TriggerValidator::~TriggerValidator ( )

Definition at line 140 of file TriggerValidator.cc.

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

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 155 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, hltConfig_, 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(), HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerIndex(), vCorrHlt, vCorrL1, vCorrNormHlt, and vCorrNormL1.

156 {
157 
158  using namespace edm;
159 
160  nEvTot++;
161 
162  vector<bool> eventRecoSelected, eventMcSelected;
163  eventRecoSelected.resize(reco_parametersets.size());
164  eventMcSelected.resize(mc_parametersets.size());
165  for(unsigned int i=0; i<eventRecoSelected.size(); ++i) eventRecoSelected[i] = myRecoSelector[i]->isSelected(iEvent);
166  for(unsigned int i=0; i<eventMcSelected.size(); ++i) eventMcSelected[i] = mcFlag ? myMcSelector[i]->isSelected(iEvent) : false;
167 
168  for(unsigned int i=0; i<nEvRecoSelected.size(); ++i) if(eventRecoSelected[i]) nEvRecoSelected[i]++;
169  for(unsigned int i=0; i<nEvMcSelected.size(); ++i) if(eventMcSelected[i]) nEvMcSelected[i]++;
170 
171 
172  // ********************************************************
173  // Get the L1 Info
174  // ********************************************************
176  iEvent.getByToken(gtDigis_token_,L1GTRR);
177  if (!L1GTRR.isValid()) {edm::LogWarning("Readout Error|L1") << "L1ParticleMapCollection Not Valid!";}
178  int nL1size = L1GTRR->decisionWord().size();
179  if(firstEvent) {
180 
181  //this piece of code concerns efficiencies
182  //it must be moved to the client
183 
184 // //resize the eff and overlap vectors ccording to the number of L1 paths
185 // effL1BeforeCuts.resize(L1GTRR->decisionWord().size()+1);
186 // effL1AfterRecoCuts.resize(L1GTRR->decisionWord().size()+1);
187 // effL1AfterMcCuts.resize(L1GTRR->decisionWord().size()+1);
188  vCorrL1.resize(L1GTRR->decisionWord().size());
189  for(unsigned int i=0; i<L1GTRR->decisionWord().size(); i++) {vCorrL1[i].resize(L1GTRR->decisionWord().size());}
190  vCorrNormL1.resize(L1GTRR->decisionWord().size());
191  for(unsigned int i=0; i<L1GTRR->decisionWord().size(); i++) {vCorrNormL1[i].resize(L1GTRR->decisionWord().size());}
192 
193 
194  //Get the names of the L1 paths
195  //for the moment the names are not included in L1GlobalTriggerReadoutRecord
196  //we need to use L1GlobalTriggerObjectMapRecord
198  iEvent.getByToken(l1Label, gtObjectMapRecord);
199  const std::vector<L1GlobalTriggerObjectMap>& objMapVec =
200  gtObjectMapRecord->gtObjectMap();
201  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin();
202  itMap != objMapVec.end(); ++itMap) {
203  int algoBit = (*itMap).algoBitNumber();
204  std::string algoNameStr = (*itMap).algoName();
205  l1NameMap[algoBit] = algoNameStr;
206  }
207  //resize the name vector and get the names
208  l1Names_.resize(L1GTRR->decisionWord().size()+1);
209  for (unsigned int i=0; i!=L1GTRR->decisionWord().size(); i++) {
210  l1Names_[i]=l1NameMap[i];
211  }
212  l1Names_[L1GTRR->decisionWord().size()] = "Total";
213 
214  //set the names of the bins for the "path" histos
215  for(unsigned int i=0; i<l1Names_.size(); ++i) {
216  hL1PathsBeforeCuts->setBinLabel(i+1,l1Names_[i].c_str(),1);
217  for(unsigned int j=0; j<hL1PathsAfterRecoCuts.size(); ++j) hL1PathsAfterRecoCuts[j]->setBinLabel(i+1,l1Names_[i].c_str(),1);
218  for(unsigned int j=0; j<hL1PathsAfterMcCuts.size(); ++j) hL1PathsAfterMcCuts[j]->setBinLabel(i+1,l1Names_[i].c_str(),1);
219  }
220  }
221 
222  //fill the eff vectors and histos for L1
223  for (int i=0; i<nL1size; ++i) {
224  l1bits.push_back(L1GTRR->decisionWord()[i]);
225  if(L1GTRR->decisionWord()[i]) {
229  for(unsigned int j=0; j<eventRecoSelected.size(); ++j)
230  if(eventRecoSelected[j]) {
232  hL1BitsAfterRecoCuts[j]->Fill(i);
233  hL1PathsAfterRecoCuts[j]->Fill(i);
234  }
235  for(unsigned int j=0; j<eventMcSelected.size(); ++j)
236  if(eventMcSelected[j]) {
238  hL1BitsAfterMcCuts[j]->Fill(i);
239  hL1PathsAfterMcCuts[j]->Fill(i);
240  }
241  }
242  }
243 
244  //Calculate the overlap among l1 bits
245  for(int i=0; i<nL1size; ++i) {
246  for(int j=0; j<nL1size; ++j) {
247  if(l1bits[i]*l1bits[j]) vCorrL1[i][j]++;
248  }
249  }
250 
251  //fill the last bin with the total of events
252  numTotL1BitsBeforeCuts[nL1size]++;
253  hL1BitsBeforeCuts->Fill(nL1size);
254  hL1PathsBeforeCuts->Fill(nL1size);
255  for(unsigned int i=0; i<eventRecoSelected.size(); ++i)
256  if(eventRecoSelected[i]) {
257  numTotL1BitsAfterRecoCuts[i][nL1size]++;
258  hL1BitsAfterRecoCuts[i]->Fill(nL1size);
259  hL1PathsAfterRecoCuts[i]->Fill(nL1size);
260  }
261  for(unsigned int i=0; i<eventMcSelected.size(); ++i)
262  if(eventMcSelected[i]) {
263  numTotL1BitsAfterMcCuts[i][nL1size]++;
264  hL1BitsAfterMcCuts[i]->Fill(nL1size);
265  hL1PathsAfterMcCuts[i]->Fill(nL1size);
266  }
267 
268 
269  // ********************************************************
270  // Get the HLT Info
271  // ********************************************************
273  iEvent.getByToken(hlt_token_,trhv);
274  if( ! trhv.isValid() ) {
275  LogDebug("SUSYBSM") << "HL TriggerResults with label ["+hltLabel.encode()+"] not found!";
276  return;
277  }
278 
279  if(firstEvent) {
280 
281  vCorrHlt.resize(hlNames_.size());
282  for(unsigned int i=0; i<hlNames_.size(); i++) {vCorrHlt[i].resize(hlNames_.size());}
283  vCorrNormHlt.resize(hlNames_.size());
284  for(unsigned int i=0; i<hlNames_.size(); i++) {vCorrNormHlt[i].resize(hlNames_.size());}
285 
286  //set the bin names for the "path" histos
287  for(unsigned int i=0; i < hlNames_.size(); i++) {
288  hHltPathsBeforeCuts->setBinLabel(i+1,hlNames_[i].c_str(),1);
289  for(unsigned int j=0; j<hHltPathsAfterRecoCuts.size(); ++j) hHltPathsAfterRecoCuts[j]->setBinLabel(i+1,hlNames_[i].c_str(),1);
290  for(unsigned int j=0; j<hHltPathsAfterMcCuts.size(); ++j) hHltPathsAfterMcCuts[j]->setBinLabel(i+1,hlNames_[i].c_str(),1);
291  }
292  }
293 
294  //fill the eff vectors and histos for HLT
295  for(unsigned int i=0; i < hlNames_.size(); i++) {
296  const unsigned int path_index(hltConfig_.triggerIndex(hlNames_[i]));
297  if ( path_index < hltConfig_.size() ){
298  hltbits.push_back(trhv->at(path_index).accept());
299  if( trhv->at(path_index).accept() ) {
303  for(unsigned int j=0; j<eventRecoSelected.size(); ++j)
304  if(eventRecoSelected[j]) {
306  hHltBitsAfterRecoCuts[j]->Fill(i);
307  hHltPathsAfterRecoCuts[j]->Fill(i);
308  }
309  for(unsigned int j=0; j<eventMcSelected.size(); ++j)
310  if(eventMcSelected[j]) {
312  hHltBitsAfterMcCuts[j]->Fill(i);
313  hHltPathsAfterMcCuts[j]->Fill(i);
314  }
315  }
316  }
317  }
318 
319  //Calculate the overlap among HLT paths
320  for(unsigned int i=0; i< hltbits.size(); i++) {
321  for(unsigned int j=0; j< hltbits.size(); j++) {
322  if(hltbits[i]*hltbits[j]) vCorrHlt[i][j]++;
323  }
324  }
325 
326  //fill the last bin with the total of events
330  for(unsigned int i=0; i<eventRecoSelected.size(); ++i)
331  if(eventRecoSelected[i]) {
333  hHltBitsAfterRecoCuts[i]->Fill(hlNames_.size());
334  hHltPathsAfterRecoCuts[i]->Fill(hlNames_.size());
335  }
336  for(unsigned int i=0; i<eventMcSelected.size(); ++i)
337  if(eventMcSelected[i]) {
339  hHltBitsAfterMcCuts[i]->Fill(hlNames_.size());
340  hHltPathsAfterMcCuts[i]->Fill(hlNames_.size());
341  }
342 
343 
344 
345  if(firstEvent) {
348  // myTurnOnMaker->bookHistos();
349  }
350  if(l1Flag) myPlotMakerL1->fillPlots(iEvent);
351  myPlotMakerReco->fillPlots(iEvent);
352  // myTurnOnMaker->fillPlots(iEvent);
353 
354  firstEvent = false;
355 
356  myMuonAnalyzer->FillPlots(iEvent, iSetup);
357  l1bits.clear();
358  hltbits.clear();
359 }
#define LogDebug(id)
unsigned int size() const
number of trigger paths in trigger table
std::vector< MonitorElement * > hHltBitsAfterRecoCuts
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< double > > vCorrNormL1
std::vector< McSelector * > myMcSelector
std::vector< MonitorElement * > hL1PathsAfterRecoCuts
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
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
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
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< 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
HLTConfigProvider hltConfig_
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 362 of file TriggerValidator.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 368 of file TriggerValidator.cc.

References dbe_, dirname_, AlcaSiStripGainsHarvester_cff::DQMStore, firstEvent, getTH1F(), MonitorElement::getTH1F(), hHltBitsAfterMcCuts, hHltBitsAfterRecoCuts, hHltBitsBeforeCuts, hHltPathsAfterMcCuts, hHltPathsAfterRecoCuts, hHltPathsBeforeCuts, hL1BitsAfterMcCuts, hL1BitsAfterRecoCuts, hL1BitsBeforeCuts, hL1PathsAfterMcCuts, hL1PathsAfterRecoCuts, hL1PathsBeforeCuts, hlNames_, hltConfig_, hltPathsToCheck_, i, HLTConfigProvider::init(), MuonAnalyzerSBSM::InitializePlots(), j, mc_parametersets, mcSelBitsDir, myMcSelector, myMuonAnalyzer, myRecoSelector, nHltPaths, nL1Bits, numTotHltBitsAfterMcCuts, numTotHltBitsAfterRecoCuts, numTotHltBitsBeforeCuts, numTotL1BitsAfterMcCuts, numTotL1BitsAfterRecoCuts, numTotL1BitsBeforeCuts, cppFunctionSkipper::operator, create_public_lumi_plots::path_name, listBenchmarks::pattern, processName_, reco_parametersets, recoSelBitsDir, triggerBitsDir, and HLTConfigProvider::triggerNames().

369 {
370 
371 
372  DQMStore *dbe_ = 0;
373  dbe_ = Service<DQMStore>().operator->();
374 
375  if (dbe_) {
376  dbe_->setCurrentFolder(dirname_);
377  dbe_->rmdir(dirname_);
378  }
379 
380  if (dbe_) {
381  dbe_->setCurrentFolder(dirname_);
382  }
383 
384  // Initialize hltConfig
385  bool changed;
386  if (!hltConfig_.init(run,c,processName_,changed)) {
387  LogError("SUSYBSM") << "Initialization of HLTConfigProvider failed!!";
388  return;
389  }
390 
391 
392  // Get the set of trigger paths we want to make plots for
393  for (size_t i = 0; i < hltPathsToCheck_.size(); i++) {
394  TPRegexp pattern(hltPathsToCheck_[i]);
395  for (size_t j = 0; j < hltConfig_.triggerNames().size(); j++)
396  if (TString(hltConfig_.triggerNames()[j]).Contains(pattern))
397  hlNames_.push_back(hltConfig_.triggerNames()[j]);
398  }
399  hlNames_.push_back("Total");
400  nHltPaths = hlNames_.size();
401 
402  nL1Bits = 128;
403 
404  firstEvent = true;
405 
406  //resize the vectors according to the number of L1 paths
409  for(unsigned int i=0; i<numTotL1BitsAfterRecoCuts.size(); ++i) numTotL1BitsAfterRecoCuts[i].resize(nL1Bits+1);
411  for(unsigned int i=0; i<numTotL1BitsAfterMcCuts.size(); ++i) numTotL1BitsAfterMcCuts[i].resize(nL1Bits+1);
412 
413  //resize the vectors according to the number of HLT paths
416  for(unsigned int i=0; i<numTotHltBitsAfterRecoCuts.size(); ++i) numTotHltBitsAfterRecoCuts[i].resize(nHltPaths+1);
418  for(unsigned int i=0; i<numTotHltBitsAfterMcCuts.size(); ++i) numTotHltBitsAfterMcCuts[i].resize(nHltPaths+1);
419 
420  if (dbe_) {
421  dbe_->setCurrentFolder(dirname_);
422  dbe_->rmdir(dirname_);
423  }
424 
425 
426  if (dbe_) {
427  dbe_->setCurrentFolder(dirname_);
428  }
429 
430  dbe_->setCurrentFolder(dirname_+triggerBitsDir);
431  //add 1 bin for the Total
432  hL1BitsBeforeCuts = dbe_->book1D("L1Bits", "L1 Trigger Bits",nL1Bits+1, 0, nL1Bits+1);
433  hHltBitsBeforeCuts = dbe_->book1D("HltBits","HL Trigger Bits",nHltPaths+1, 0, nHltPaths+1);
434 
435  for(unsigned int i=0; i<myRecoSelector.size(); ++i)
436  {
437  string path_name = myRecoSelector[i]->GetName();
438  char histo_name[256], histo_title[256];
439  //sprintf(histo_name, "L1Bits");
440  sprintf(histo_name, "L1Bits_%s", path_name.c_str());
441  sprintf(histo_title, "L1 Trigger Bits for %s Selection", path_name.c_str());
442  dbe_->setCurrentFolder(dirname_+recoSelBitsDir+"/"+path_name);
443  hL1BitsAfterRecoCuts.push_back(dbe_->book1D(histo_name, histo_title, nL1Bits+1, 0, nL1Bits+1));
444  //sprintf(histo_name, "HltBits");
445  sprintf(histo_name, "HltBits_%s", path_name.c_str());
446  sprintf(histo_title, "HL Trigger Bits for %s Selection", path_name.c_str());
447  hHltBitsAfterRecoCuts.push_back(dbe_->book1D(histo_name, histo_title, nHltPaths+1, 0, nHltPaths+1));
448  }
449  for(unsigned int i=0; i<myMcSelector.size(); ++i)
450  {
451  string path_name = myMcSelector[i]->GetName();
452  char histo_name[256], histo_title[256];
453  //sprintf(histo_name, "L1Bits");
454  sprintf(histo_name, "L1Bits_%s", path_name.c_str());
455  sprintf(histo_title, "L1 Trigger Bits for %s Selection", path_name.c_str());
456  dbe_->setCurrentFolder(dirname_+mcSelBitsDir+"/"+path_name);
457  hL1BitsAfterMcCuts.push_back(dbe_->book1D(histo_name, histo_title, nL1Bits+1, 0, nL1Bits+1));
458  //sprintf(histo_name, "HltBits");
459  sprintf(histo_name, "HltBits_%s", path_name.c_str());
460  sprintf(histo_title, "HL Trigger Bits for %s Selection", path_name.c_str());
461  hHltBitsAfterMcCuts.push_back(dbe_->book1D(histo_name, histo_title, nHltPaths+1, 0, nHltPaths+1));
462  }
463 
464  //create the histos with paths
465  //identical to the ones with "bits"
466  //but with the names in the x axis
467  //instead of the numbers
468 
469  dbe_->setCurrentFolder(dirname_+triggerBitsDir);
470  TH1F* hTemp = (TH1F*) (hL1BitsBeforeCuts->getTH1F())->Clone("L1Paths");
471  hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hTemp);
472  hTemp = (TH1F*) (hHltBitsBeforeCuts->getTH1F())->Clone("HltPaths");
473  hHltPathsBeforeCuts = dbe_->book1D("HltPaths", hTemp);
474 
475  for(unsigned int i=0; i<myRecoSelector.size(); ++i)
476  {
477  string path_name = myRecoSelector[i]->GetName();
478  char histo_name[256];
479  sprintf(histo_name, "L1Paths_%s", path_name.c_str());
480  dbe_->setCurrentFolder(dirname_+recoSelBitsDir+"/"+path_name);
481  hTemp = (TH1F*) (hL1BitsAfterRecoCuts[i]->getTH1F())->Clone(histo_name);
482  hL1PathsAfterRecoCuts.push_back(dbe_->book1D(histo_name, hTemp));
483  sprintf(histo_name, "HltPaths_%s", path_name.c_str());
484  hTemp = (TH1F*) (hHltBitsAfterRecoCuts[i]->getTH1F())->Clone(histo_name);
485  hHltPathsAfterRecoCuts.push_back(dbe_->book1D(histo_name, hTemp));
486  }
487 
488  for(unsigned int i=0; i<myMcSelector.size(); ++i)
489  {
490  string path_name = myMcSelector[i]->GetName();
491  char histo_name[256];
492  sprintf(histo_name, "L1Paths_%s", path_name.c_str());
493  dbe_->setCurrentFolder(dirname_+mcSelBitsDir+"/"+path_name);
494  hTemp = (TH1F*) (hL1BitsAfterMcCuts[i]->getTH1F())->Clone(histo_name);
495  hL1PathsAfterMcCuts.push_back(dbe_->book1D(histo_name, hTemp));
496  sprintf(histo_name, "HltPaths_%s", path_name.c_str());
497  hTemp = (TH1F*) (hHltBitsAfterMcCuts[i]->getTH1F())->Clone(histo_name);
498  hHltPathsAfterMcCuts.push_back(dbe_->book1D(histo_name, hTemp));
499  }
500 
502 }
std::vector< MonitorElement * > hHltBitsAfterRecoCuts
int i
Definition: DBlmapReader.cc:9
std::string dirname_
std::vector< McSelector * > myMcSelector
std::vector< MonitorElement * > hL1PathsAfterRecoCuts
std::vector< MonitorElement * > hHltPathsAfterRecoCuts
unsigned int nHltPaths
std::vector< int > numTotHltBitsBeforeCuts
const std::vector< std::string > & triggerNames() const
names of trigger paths
std::vector< MonitorElement * > hHltPathsAfterMcCuts
MuonAnalyzerSBSM * myMuonAnalyzer
std::vector< MonitorElement * > hL1BitsAfterMcCuts
std::vector< std::vector< int > > numTotHltBitsAfterMcCuts
std::vector< MonitorElement * > hL1PathsAfterMcCuts
std::vector< MonitorElement * > hL1BitsAfterRecoCuts
std::vector< RecoSelector * > myRecoSelector
MonitorElement * hHltPathsBeforeCuts
int j
Definition: DBlmapReader.cc:9
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< std::string > hlNames_
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
MonitorElement * hHltBitsBeforeCuts
std::vector< std::string > hltPathsToCheck_
std::vector< edm::ParameterSet > mc_parametersets
void TriggerValidator::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 780 of file TriggerValidator.cc.

781 {
782  LogInfo("TriggerValidator") << "endJob";
783  return;
784 }
void TriggerValidator::endRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 509 of file TriggerValidator.cc.

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

510 {
511 
512  // myTurnOnMaker->finalOperations();
513 
514  //This piece of code concerns efficiencies
515  //it must be moved to the client
516 
517 
518 
519 // //calculate the final efficiencies and the normalizations
520 // for(unsigned int i=0; i<numTotL1BitsBeforeCuts.size()-1; i++) {
521 // effL1BeforeCuts[i] = (double)numTotL1BitsBeforeCuts[i]/(double)nEvTot;
522 // for(unsigned int j=0; j<numTotL1BitsBeforeCuts.size()-1; j++) {
523 // vCorrNormL1[i][j] = (double)vCorrL1[i][j]/(double)nEvTot;
524 // }
525 // }
526 
527 // for(unsigned int i=0; i<numTotHltBitsBeforeCuts.size()-1; i++) {
528 // effHltBeforeCuts[i] = (double)numTotHltBitsBeforeCuts[i]/(double)nEvTot;
529 // for(unsigned int j=0; j<numTotHltBitsBeforeCuts.size()-1; j++) {
530 // vCorrNormHlt[i][j] = (double)vCorrHlt[i][j]/(double)nEvTot;
531 // }
532 // }
533 
534 // //after the reco cuts
535 
536 // if(nEvRecoSelected) {
537 // for(unsigned int i=0; i<numTotL1BitsAfterRecoCuts.size()-1; i++) {
538 // effL1AfterRecoCuts[i] = (double)numTotL1BitsAfterRecoCuts[i]/(double)nEvRecoSelected;
539 // }
540 
541 // for(unsigned int i=0; i<numTotHltBitsAfterRecoCuts.size()-1; i++) {
542 // effHltAfterRecoCuts[i] = (double)numTotHltBitsAfterRecoCuts[i]/(double)nEvRecoSelected;
543 // }
544 // } else {
545 
546 // for(unsigned int i=0; i<numTotL1BitsAfterRecoCuts.size()-1; i++) {
547 // effL1AfterRecoCuts[i] = -1;
548 // }
549 
550 // for(unsigned int i=0; i<numTotHltBitsAfterRecoCuts.size()-1; i++) {
551 // effHltAfterRecoCuts[i] = -1;
552 // }
553 // }
554 
555 
556 // //after the mc cuts
557 // if(nEvMcSelected) {
558 // for(unsigned int i=0; i<numTotL1BitsAfterMcCuts.size()-1; i++) {
559 // effL1AfterMcCuts[i] = (double)numTotL1BitsAfterMcCuts[i]/(double)nEvMcSelected;
560 // }
561 
562 // for(unsigned int i=0; i<numTotHltBitsAfterMcCuts.size()-1; i++) {
563 // effHltAfterMcCuts[i] = (double)numTotHltBitsAfterMcCuts[i]/(double)nEvMcSelected;
564 // }
565 // } else {
566 // for(unsigned int i=0; i<numTotL1BitsAfterMcCuts.size()-1; i++) {
567 // effL1AfterMcCuts[i] = -1;
568 // }
569 
570 // for(unsigned int i=0; i<numTotHltBitsAfterMcCuts.size()-1; i++) {
571 // effHltAfterMcCuts[i] = -1;
572 // }
573 // }
574 
575 
576 
577 
578 
579 
580 
581 
582 // myPlotMaker->writeHistos();
583 // myTurnOnMaker->writeHistos();
584 
585 
586  // using namespace std;
587 
588  unsigned int n(l1Names_.size());
589 
590  n = l1Names_.size();
591  edm::LogInfo("L1TableSummary") << endl;
592  edm::LogVerbatim("L1TableSummary") << "L1T-Table "
593  << right << setw(10) << "L1T Bit#" << " "
594  << "Name" << "\n";
595  for (unsigned int i=0; i!=n; i++) {
596  edm::LogVerbatim("L1TableSummary") << right << setw(20) << i << " "
597  << l1Names_[i] << "\n";
598  }
599 
600 
601  n = hlNames_.size();
602  edm::LogInfo("HltTableSummary") << endl;
603  edm::LogVerbatim("HltTableSummary") << "HLT-Table "
604  << right << setw(10) << "HLT Bit#" << " "
605  << "Name" << "\n";
606 
607  for (unsigned int i=0; i!=n; i++) {
608  edm::LogVerbatim("HltTableSummary") << right << setw(20) << i << " "
609  << hlNames_[i] << "\n";
610  }
611 
612  edm::LogVerbatim("HltTableSummary") << endl;
613  edm::LogVerbatim("HltTableSummary") << "HLT-Table end!" << endl;
614  edm::LogVerbatim("HltTableSummary") << endl;
615 
616 
617 
618  //the stat file with the efficiecies has to be moved to the client
619 
620 
621 
622 // //Print in a stat file the efficiencies and the overlaps
623 
624 
625 // ofstream statFile(StatFileName.c_str(),ios::out);
626 
627 
628 // statFile << "*********************************************************************************" << endl;
629 // statFile << "*********************************************************************************" << endl;
630 // statFile << " L1 Efficiencies " << endl;
631 // statFile << "*********************************************************************************" << endl;
632 // statFile << "*********************************************************************************" << endl;
633 // statFile << endl;
634 // statFile << "---------------------------------------------------------------------------------" << endl;
635 // statFile << "---------------------------------------------------------------------------------" << endl;
636 // statFile << "| L1 Path | eff (Tot) | eff (Reco Sel)| eff (Mc Sel) |" << endl;
637 // statFile << "---------------------------------------------------------------------------------" << endl;
638 // statFile << "---------------------------------------------------------------------------------" << endl;
639 // for(unsigned int i=0; i<numTotL1BitsBeforeCuts.size()-1; i++) {
640 // statFile << "| " << left << setw(29) << l1Names_[i] << "|" << setprecision(3) << showpoint << right << setw(13) << effL1BeforeCuts[i] << " |" <<
641 // setw(13) << effL1AfterRecoCuts[i] << " |" <<
642 // setw(13) << effL1AfterMcCuts[i] << " |" << endl;
643 // }
644 // statFile << "---------------------------------------------------------------------------------" << endl;
645 // statFile << "---------------------------------------------------------------------------------" << endl;
646 // statFile << endl;
647 // statFile << endl;
648 // statFile << endl;
649 // statFile << endl;
650 // statFile << endl;
651 // statFile << endl;
652 
653 
654 
655 // statFile << "**********************************************************************************" << endl;
656 // statFile << "**********************************************************************************" << endl;
657 // statFile << " Hlt Efficiencies " << endl;
658 // statFile << "**********************************************************************************" << endl;
659 // statFile << "**********************************************************************************" << endl;
660 // statFile << endl;
661 // statFile << "----------------------------------------------------------------------------------" << endl;
662 // statFile << "----------------------------------------------------------------------------------" << endl;
663 // statFile << "| Hlt Path | eff (Tot) | eff (Reco Sel)| eff (Mc Sel) |" << endl;
664 // statFile << "----------------------------------------------------------------------------------" << endl;
665 // statFile << "----------------------------------------------------------------------------------" << endl;
666 // for(unsigned int i=0; i<numTotHltBitsBeforeCuts.size()-1; i++) {
667 // statFile << "| " << left << setw(29) << hlNames_[i] << "|" << setprecision(3) << showpoint << right << setw(13) << effHltBeforeCuts[i] << " |" <<
668 // setw(13) << effHltAfterRecoCuts[i] << " |" <<
669 // setw(13) << effHltAfterMcCuts[i] << " |" <<endl;
670 // }
671 // statFile << "----------------------------------------------------------------------------------" << endl;
672 // statFile << "----------------------------------------------------------------------------------" << endl;
673 // statFile << endl;
674 // statFile << endl;
675 // statFile << endl;
676 // statFile << endl;
677 // statFile << endl;
678 // statFile << endl;
679 
680 
681 
682 
683 
684 // statFile << "****************************************************************************************************************************************************" << endl;
685 // statFile << "****************************************************************************************************************************************************" << endl;
686 // statFile << " L1 Correlations (only overlaps >5% are shown, and only without any selection) " << endl;
687 // statFile << "****************************************************************************************************************************************************" << endl;
688 // statFile << "****************************************************************************************************************************************************" << endl;
689 // statFile << endl;
690 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
691 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
692 // statFile << "| L1 Path 1 | L1 Path 2 | Overlap Norm to Total | Overlap Norm to Path | Path of Norm |" << endl;
693 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
694 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
695 // statFile << endl;
696 // for(unsigned int i=0; i<numTotL1BitsBeforeCuts.size()-1; i++) {
697 // for(unsigned int j=0; j<numTotL1BitsBeforeCuts.size()-1; j++) {
698 // if(vCorrNormL1[i][j]>0.05) {
699 // int iNorm = 0;
700 // if(effL1BeforeCuts[i] > effL1BeforeCuts[j]) {iNorm = i;}
701 // else {iNorm = j;}
702 // double effNorm = vCorrNormL1[i][j] / effL1BeforeCuts[iNorm];
703 // statFile << "| " << left << setw(29) << l1Names_[i] << "| " << setw(29) << left << l1Names_[j] << "|"
704 // << setprecision(3) << showpoint << right << setw(22) << vCorrNormL1[i][j] << " |"
705 // << setprecision(3) << showpoint << right << setw(21) << effNorm << " | "
706 // << left << setw(29) << l1Names_[iNorm] << "|" << endl;
707 // }
708 // }
709 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << 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 // statFile << "****************************************************************************************************************************************************" << endl;
722 // statFile << "****************************************************************************************************************************************************" << endl;
723 // statFile << " Hlt Correlations (only overlaps >5% are shown, and only without any selection) " << endl;
724 // statFile << "****************************************************************************************************************************************************" << endl;
725 // statFile << "****************************************************************************************************************************************************" << endl;
726 // statFile << endl;
727 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
728 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
729 // statFile << "| Hlt Path 1 | Hlt Path 2 | Overlap Norm to Total | Overlap Norm to Path | Path of Norm |" << endl;
730 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
731 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
732 // statFile << endl;
733 // for(unsigned int i=0; i<numTotHltBitsBeforeCuts.size()-1; i++) {
734 // for(unsigned int j=0; j<numTotHltBitsBeforeCuts.size()-1; j++) {
735 // if(vCorrNormHlt[i][j]>0.05) {
736 // int iNorm = 0;
737 // if(effHltBeforeCuts[i] > effHltBeforeCuts[j]) {iNorm = i;}
738 // else {iNorm = j;}
739 // double effNorm = vCorrNormHlt[i][j]/effHltBeforeCuts[iNorm];
740 // statFile << "| " << left << setw(29) << hlNames_[i] << "| " << setw(29) << left << hlNames_[j] << "|"
741 // << setprecision(3) << showpoint << right << setw(22) << vCorrNormHlt[i][j] << " |"
742 // << setprecision(3) << showpoint << right << setw(21) << effNorm << " | "
743 // << left << setw(29) << hlNames_[iNorm] << "|" << endl;
744 // }
745 // }
746 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
747 // }
748 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
749 // statFile << "----------------------------------------------------------------------------------------------------------------------------------------------------" << endl;
750 // statFile << endl;
751 // statFile << endl;
752 // statFile << endl;
753 // statFile << endl;
754 // statFile << endl;
755 // statFile << endl;
756 
757 
758 
759 
760 // statFile.close();
761 
762 
763  for(unsigned int i=0; i<myRecoSelector.size(); ++i) delete myRecoSelector[i];
764  myRecoSelector.clear();
765  if(mcFlag)
766  {
767  for(unsigned int i=0; i<myMcSelector.size(); ++i) delete myMcSelector[i];
768  myMcSelector.clear();
769  }
770 
771  if(l1Flag) delete myPlotMakerL1;
772  delete myPlotMakerReco;
773 // delete myTurnOnMaker;
774  return;
775 }
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
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(), beginRun(), 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 analyze(), and beginRun().

edm::InputTag TriggerValidator::hltLabel
private

Definition at line 107 of file TriggerValidator.h.

Referenced by analyze().

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

Definition at line 124 of file TriggerValidator.h.

Referenced by beginRun().

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().

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().