CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTHiggsSubAnalysis.cc
Go to the documentation of this file.
1 
7 
9 
13 
15 
16 #include "TPRegexp.h"
17 #include "TString.h"
18 
21 
24 
25 #include "TPRegexp.h"
26 #include "TString.h"
27 
28 #include<set>
29 #include<algorithm>
30 
31 
33  const std::string & analysisname,
35  _pset(pset),
36  _analysisname(analysisname),
37  _minCandidates(0),
38  _hltProcessName(pset.getParameter<std::string>("hltProcessName")),
39  _genParticleLabel(iC.consumes<reco::GenParticleCollection>(pset.getParameter<std::string>("genParticleLabel"))),
40  _parametersEta(pset.getParameter<std::vector<double> >("parametersEta")),
41  _parametersPhi(pset.getParameter<std::vector<double> >("parametersPhi")),
42  _parametersTurnOn(pset.getParameter<std::vector<double> >("parametersTurnOn")),
43  _trigResultsTag(iC.consumes<edm::TriggerResults>(edm::InputTag("TriggerResults","",_hltProcessName))),
44  _recMuonSelector(0),
45  _recElecSelector(0),
46  _recCaloMETSelector(0),
47  _recPFTauSelector(0),
48  _recPhotonSelector(0),
49  _recTrackSelector(0),
50  _dbe(0)
51 {
52  // Specific parameters for this analysis
53  edm::ParameterSet anpset = pset.getParameter<edm::ParameterSet>(analysisname);
54  // Collections labels (but genparticles already initialized)
55  // initializing _recLabels data member)
56  this->bookobjects( anpset, iC );
57 
58  // Generic objects: Initialization of cuts
59  for(std::map<unsigned int,std::string>::const_iterator it = _recLabels.begin();
60  it != _recLabels.end(); ++it)
61  {
62  const std::string objStr = EVTColContainer::getTypeString(it->first);
63  _genCut[it->first] = pset.getParameter<std::string>( std::string(objStr+"_genCut").c_str() );
64  _recCut[it->first] = pset.getParameter<std::string>( std::string(objStr+"_recCut").c_str() );
65  _cutMinPt[it->first] = pset.getParameter<double>( std::string(objStr+"_cutMinPt").c_str() );
66  _cutMaxEta[it->first] = pset.getParameter<double>( std::string(objStr+"_cutMaxEta").c_str() );
67  }
68 
69  //--- Updating parameters if has to be modified for this particular specific analysis
70  for(std::map<unsigned int,std::string>::const_iterator it = _recLabels.begin();
71  it != _recLabels.end(); ++it)
72  {
73 
74  const std::string objStr = EVTColContainer::getTypeString(it->first);
75  try
76  {
77  _genCut[it->first] = anpset.getUntrackedParameter<std::string>( std::string(objStr+"_genCut").c_str() );
78  }
79  catch(edm::Exception)
80  {
81  }
82  try
83  {
84  _recCut[it->first] = anpset.getUntrackedParameter<std::string>( std::string(objStr+"_recCut").c_str() );
85  }
86  catch(edm::Exception)
87  {
88  }
89  try
90  {
91  _cutMinPt[it->first] = anpset.getUntrackedParameter<double>( std::string(objStr+"_cutMinPt").c_str() );
92  }
93  catch(edm::Exception)
94  {
95  }
96  try
97  {
98  _cutMaxEta[it->first] = anpset.getUntrackedParameter<double>( std::string(objStr+"_cutMaxEta").c_str() );
99  }
100  catch(edm::Exception)
101  {
102  }
103  }
104 
105  _hltPathsToCheck = anpset.getParameter<std::vector<std::string> >("hltPathsToCheck");
106  _minCandidates = anpset.getParameter<unsigned int>("minCandidates");
107 
109  _dbe->setVerbose(0);
110 }
111 
113 {
114  for(std::map<unsigned int,StringCutObjectSelector<reco::GenParticle>* >::iterator it = _genSelectorMap.begin();
115  it != _genSelectorMap.end(); ++it)
116  {
117  delete it->second;
118  it->second =0;
119  }
120  delete _recMuonSelector;
121  _recMuonSelector =0;
122  delete _recElecSelector;
123  _recElecSelector =0;
124  delete _recPhotonSelector;
126  delete _recCaloMETSelector;
128  delete _recPFTauSelector;
130  delete _recTrackSelector;
132 }
133 
134 
136 {
137 }
138 
139 
140 
141 void HLTHiggsSubAnalysis::beginRun(const edm::Run & iRun, const edm::EventSetup & iSetup)
142 {
143  std::string baseDir = "HLT/Higgs/"+_analysisname+"/";
144  _dbe->setCurrentFolder(baseDir);
145 
146  // Initialize the confighlt
147  bool changedConfig;
148  if(!_hltConfig.init(iRun,iSetup,_hltProcessName,changedConfig))
149  {
150  edm::LogError("HiggsValidations") << "HLTHiggsSubAnalysis::beginRun: "
151  << "Initializtion of HLTConfigProvider failed!!";
152  }
153 
154 
155  // Parse the input paths to get them if there are in the table
156  // and associate them the last filter of the path (in order to extract the
157  _hltPaths.clear();
158  for(size_t i = 0; i < _hltPathsToCheck.size(); ++i)
159  {
160  bool found = false;
161  TPRegexp pattern(_hltPathsToCheck[i]);
162  for(size_t j = 0 ; j < _hltConfig.triggerNames().size(); ++j)
163  {
164  std::string thetriggername = _hltConfig.triggerNames()[j];
165  if(TString(thetriggername).Contains(pattern))
166  {
167  _hltPaths.insert(thetriggername);
168  found = true;
169  }
170  }
171  if( ! found )
172  {
173  edm::LogWarning("HiggsValidations") << "HLTHiggsSubAnalysis::beginRun, In "
174  << _analysisname << " subfolder NOT found the path: '"
175  << _hltPathsToCheck[i] << "*'" ;
176  }
177  }
178 
179  LogTrace("HiggsValidation") << "SubAnalysis: " << _analysisname
180  << "\nHLT Trigger Paths found >>>";
181  // Initialize the plotters (analysers for each trigger path)
182  _analyzers.clear();
183  for(std::set<std::string>::iterator iPath = _hltPaths.begin();
184  iPath != _hltPaths.end(); ++iPath)
185  {
186  // Avoiding the dependence of the version number for
187  // the trigger paths
188  std::string path = * iPath;
189  std::string shortpath = path;
190  if(path.rfind("_v") < path.length())
191  {
192  shortpath = path.substr(0, path.rfind("_v"));
193  }
194  _shortpath2long[shortpath] = path;
195 
196  // Objects needed by the HLT path
197  const std::vector<unsigned int> objsNeedHLT = this->getObjectsType(shortpath);
198  // Sanity check: the object needed by a trigger path should be
199  // introduced by the user via config python (_recLabels datamember)
200  std::vector<unsigned int> userInstantiate;
201  for(std::map<unsigned int,std::string>::iterator it = _recLabels.begin() ;
202  it != _recLabels.end(); ++it)
203  {
204  userInstantiate.push_back(it->first);
205  }
206  for(std::vector<unsigned int>::const_iterator it = objsNeedHLT.begin(); it != objsNeedHLT.end();
207  ++it)
208  {
209  if( std::find(userInstantiate.begin(),userInstantiate.end(), *it) ==
210  userInstantiate.end() )
211  {
212  edm::LogError("HiggsValidation") << "In HLTHiggsSubAnalysis::beginRun, "
213  << "Incoherence found in the python configuration file!!\nThe SubAnalysis '"
214  << _analysisname << "' has been asked to evaluate the trigger path '"
215  << shortpath << "' (found it in 'hltPathsToCheck') BUT this path"
216  << " needs a '" << EVTColContainer::getTypeString(*it)
217  << "' which has not been instantiate ('recVariableLabels'"
218  << ")" ;
219  exit(-1);
220  }
221  }
222  LogTrace("HiggsValidation") << " --- " << shortpath;
223 
224  // the hlt path, the objects (elec,muons,photons,...)
225  // needed to evaluate the path are the argumens of the plotter
226  HLTHiggsPlotter analyzer(_pset, shortpath,objsNeedHLT, _dbe);
227  _analyzers.push_back(analyzer);
228  }
229 
230  // Call the beginRun (which books all the path dependent histograms)
231  for(std::vector<HLTHiggsPlotter>::iterator it = _analyzers.begin();
232  it != _analyzers.end(); ++it)
233  {
234  it->beginRun(iRun, iSetup);
235  }
236 
237  // Book the gen/reco analysis-dependent histograms (denominators)
238  for(std::map<unsigned int,std::string>::const_iterator it = _recLabels.begin();
239  it != _recLabels.end(); ++it)
240  {
241  const std::string objStr = EVTColContainer::getTypeString(it->first);
242  std::vector<std::string> sources(2);
243  sources[0] = "gen";
244  sources[1] = "rec";
245 
246  for(size_t i = 0; i < sources.size(); i++)
247  {
248  std::string source = sources[i];
249  bookHist(source, objStr, "Eta");
250  bookHist(source, objStr, "Phi");
251  bookHist(source, objStr, "MaxPt1");
252  bookHist(source, objStr, "MaxPt2");
253  }
254  }
255 }
256 
257 
258 
260  EVTColContainer * cols)
261 {
262  // Initialize the collection (the ones which hasn't been initialiazed yet)
263  this->initobjects(iEvent,cols);
264  // utility map
265  std::map<unsigned int,std::string> u2str;
266  u2str[GEN]="gen";
267  u2str[RECO]="rec";
268 
269  // Extract the match structure containing the gen/reco candidates (electron, muons,...)
270  // common to all the SubAnalysis
271  //---- Generation
272  // Make each good gen object into the base cand for a MatchStruct
273  std::vector<MatchStruct> * matches = new std::vector<MatchStruct>;
274 // bool alreadyMu = false;
275  for(std::map<unsigned int,std::string>::iterator it = _recLabels.begin();
276  it != _recLabels.end(); ++it)
277  {
278  // Avoiding the TkMu and Mu case
279 /* if( alreadyMu )
280  {
281  continue;
282  }*/
283  // Initialize selectors when first event
284  if(!_genSelectorMap[it->first])
285  {
287  }
288 
289  for(size_t i = 0; i < cols->genParticles->size(); ++i)
290  {
291  if(_genSelectorMap[it->first]->operator()(cols->genParticles->at(i)))
292  {
293  matches->push_back(MatchStruct(&cols->genParticles->at(i),it->first));
294  }
295  }
296 /* if( it->first == EVTColContainer::MUON || it->first == EVTColContainer::TRACK )
297  {
298  alreadyMu = true;
299  }*/
300  }
301  // Sort the MatchStructs by pT for later filling of turn-on curve
302  std::sort(matches->begin(), matches->end(), matchesByDescendingPt());
303 
304  // Map to reference the source (gen/reco) with the recoCandidates
305  std::map<unsigned int,std::vector<MatchStruct> > sourceMatchMap; // To be a pointer to delete
306  // --- Storing the generating candidates
307  sourceMatchMap[GEN] = *matches;
308 
309  // Reuse the vector
310  matches->clear();
311  // --- same for RECO objects
312  // Extraction of the objects candidates
313  for(std::map<unsigned int,std::string>::iterator it = _recLabels.begin();
314  it != _recLabels.end(); ++it)
315  {
316  // Reco selectors (the function takes into account if it was instantiated
317  // before or not
318  this->InitSelector(it->first);
319  // -- Storing the matches
320  this->insertcandidates(it->first,cols,matches);
321  }
322  // Sort the MatchStructs by pT for later filling of turn-on curve
323  std::sort(matches->begin(), matches->end(), matchesByDescendingPt());
324  // --- Storing the reco candidates
325  sourceMatchMap[RECO] = *matches;
326  // --- All the objects are in place
327  delete matches;
328 
329  // -- Trigger Results
330  const edm::TriggerNames trigNames = iEvent.triggerNames(*(cols->triggerResults));
331 
332  // Filling the histograms if pass the minimum amount of candidates needed by the analysis:
333  // GEN + RECO CASE in the same loop
334  for(std::map<unsigned int,std::vector<MatchStruct> >::iterator it = sourceMatchMap.begin();
335  it != sourceMatchMap.end(); ++it)
336  {
337  // it->first: gen/reco it->second: matches (std::vector<MatchStruc>)
338  if( it->second.size() < _minCandidates ) // FIXME: A bug is potentially here: what about the mixed channels?
339  {
340  continue;
341  }
342 
343  // Filling the gen/reco objects (eff-denominators):
344  // Just the first two different ones, if there are more
345  std::map<unsigned int,int> * countobjects = new std::map<unsigned int,int>;
346  // Initializing the count of the used object
347  for(std::map<unsigned int,std::string>::iterator co = _recLabels.begin();
348  co != _recLabels.end(); ++co)
349  {
350  countobjects->insert(std::pair<unsigned int,int>(co->first,0));
351  }
352  int counttotal = 0;
353  const int totalobjectssize2 = 2*countobjects->size();
354  for(size_t j = 0; j < it->second.size(); ++j)
355  {
356  const unsigned int objType = it->second[j].objType;
357  const std::string objTypeStr = EVTColContainer::getTypeString(objType);
358 
359  float pt = (it->second)[j].pt;
360  float eta = (it->second)[j].eta;
361  float phi = (it->second)[j].phi;
362 
363  this->fillHist(u2str[it->first],objTypeStr,"Eta",eta);
364  this->fillHist(u2str[it->first],objTypeStr,"Phi",phi);
365  if( (*countobjects)[objType] == 0 )
366  {
367  this->fillHist(u2str[it->first],objTypeStr,"MaxPt1",pt);
368  // Filled the high pt ...
369  ++((*countobjects)[objType]);
370  ++counttotal;
371  }
372  else if( (*countobjects)[objType] == 1 )
373  {
374  this->fillHist(u2str[it->first],objTypeStr,"MaxPt2",pt);
375  // Filled the second high pt ...
376  ++((*countobjects)[objType]);
377  ++counttotal;
378  }
379  else
380  {
381  // Already the minimum two objects has been filled, get out...
382  if( counttotal == totalobjectssize2 )
383  {
384  break;
385  }
386  }
387  }
388  delete countobjects;
389 
390  // Calling to the plotters analysis (where the evaluation of the different trigger paths are done)
391  const std::string source = u2str[it->first];
392  for(std::vector<HLTHiggsPlotter>::iterator an = _analyzers.begin();
393  an != _analyzers.end(); ++an)
394  {
395  const std::string hltPath = _shortpath2long[an->gethltpath()];
396  const bool ispassTrigger = cols->triggerResults->accept(trigNames.triggerIndex(hltPath));
397  an->analyze(ispassTrigger,source,it->second);
398  }
399  }
400 }
401 
402 // Return the objects (muons,electrons,photons,...) needed by a hlt path.
403 const std::vector<unsigned int> HLTHiggsSubAnalysis::getObjectsType(const std::string & hltPath) const
404 {
405  static const unsigned int objSize = 5; //6;
406  static const unsigned int objtriggernames[] = { EVTColContainer::MUON,
409 // EVTColContainer::TRACK, // Note is tracker muon
412  };
413 
414  std::set<unsigned int> objsType;
415  // The object to deal has to be entered via the config .py
416  for(unsigned int i = 0; i < objSize; ++i)
417  {
418  std::string objTypeStr = EVTColContainer::getTypeString( objtriggernames[i] );
419  // Check if it is needed this object for this trigger
420  if( ! TString(hltPath).Contains(objTypeStr) )
421  {
422  continue;
423  }
424 
425  objsType.insert(objtriggernames[i]);
426  }
427 
428  return std::vector<unsigned int>(objsType.begin(),objsType.end());
429 }
430 
431 
432 // Booking the maps: recLabels and genParticle selectors
434 {
435  if( anpset.exists("recMuonLabel") )
436  {
437  _recLabels[EVTColContainer::MUON] = anpset.getParameter<std::string>("recMuonLabel");
440  }
441  if( anpset.exists("recElecLabel") )
442  {
443  _recLabels[EVTColContainer::ELEC] = anpset.getParameter<std::string>("recElecLabel");
446  }
447  if( anpset.exists("recPhotonLabel") )
448  {
449  _recLabels[EVTColContainer::PHOTON] = anpset.getParameter<std::string>("recPhotonLabel");
452  }
453  if( anpset.exists("recCaloMETLabel") )
454  {
455  _recLabels[EVTColContainer::CALOMET] = anpset.getParameter<std::string>("recCaloMETLabel");
458  }
459  if( anpset.exists("recPFTauLabel") )
460  {
461  _recLabels[EVTColContainer::PFTAU] = anpset.getParameter<std::string>("recPFTauLabel");
464  }
465  /*if( anpset.exists("recTrackLabel") )
466  {
467  _recLabels[EVTColContainer::TRACK] = anpset.getParameter<std::string>("recTrackLabel");
468  _genSelectorMap[EVTColContainer::TRACK] = 0 ;
469  }*/
470 
471  if( _recLabels.size() < 1 )
472  {
473  edm::LogError("HiggsValidation") << "HLTHiggsSubAnalysis::bookobjects, "
474  << "Not included any object (recMuonLabel, recElecLabel, ...) "
475  << "in the analysis " << _analysisname;
476  return;
477  }
478 }
479 
481 {
482  /*if( col != 0 && col->isAllInit() )
483  {
484  // Already init, not needed to do nothing
485  return;
486  }*/
487  if( ! col->isCommonInit() )
488  {
489  // extract the trigger results (path info, pass,...)
491  iEvent.getByToken(_trigResultsTag,trigResults);
492  if( trigResults.isValid() )
493  {
494  col->triggerResults = trigResults.product();
495  }
496 
497  // GenParticle collection if is there
499  iEvent.getByToken(_genParticleLabel,genPart);
500  if( genPart.isValid() )
501  {
502  col->genParticles = genPart.product();
503  }
504  }
505 
506  for(std::map<unsigned int,std::string>::iterator it = _recLabels.begin();
507  it != _recLabels.end(); ++it)
508  {
509  if( it->first == EVTColContainer::MUON )
510  {
512  iEvent.getByToken(_recLabelsMuon, theHandle);
513  col->set(theHandle.product());
514  }
515  else if( it->first == EVTColContainer::ELEC )
516  {
518  iEvent.getByToken(_recLabelsElec, theHandle);
519  col->set(theHandle.product());
520  }
521  else if( it->first == EVTColContainer::PHOTON )
522  {
524  iEvent.getByToken(_recLabelsPhoton, theHandle);
525  col->set(theHandle.product());
526  }
527  else if( it->first == EVTColContainer::CALOMET )
528  {
530  iEvent.getByToken(_recLabelsCaloMET, theHandle);
531  col->set(theHandle.product());
532  }
533  else if( it->first == EVTColContainer::PFTAU )
534  {
536  iEvent.getByToken(_recLabelsPFTau, theHandle);
537  col->set(theHandle.product());
538  }
539  else
540  {
541  edm::LogError("HiggsValidation") << "HLTHiggsSubAnalysis::initobjects "
542  << " NOT IMPLEMENTED (yet) ERROR: '" << it->second << "'";
543  //return; ??
544  }
545  }
546 }
547 
549  const std::string & objType, const std::string & variable)
550 {
551  std::string sourceUpper = source;
552  sourceUpper[0] = std::toupper(sourceUpper[0]);
553  std::string name = source + objType + variable ;
554  TH1F * h = 0;
555 
556  if(variable.find("MaxPt") != std::string::npos)
557  {
558  std::string desc = (variable == "MaxPt1") ? "Leading" : "Next-to-Leading";
559  std::string title = "pT of " + desc + " " + sourceUpper + " " + objType;
560  const size_t nBins = _parametersTurnOn.size() - 1;
561  float * edges = new float[nBins + 1];
562  for(size_t i = 0; i < nBins + 1; i++)
563  {
564  edges[i] = _parametersTurnOn[i];
565  }
566  h = new TH1F(name.c_str(), title.c_str(), nBins, edges);
567  delete[] edges;
568  }
569  else
570  {
571  std::string symbol = (variable == "Eta") ? "#eta" : "#phi";
572  std::string title = symbol + " of " + sourceUpper + " " + objType;
573  std::vector<double> params = (variable == "Eta") ? _parametersEta : _parametersPhi;
574 
575  int nBins = (int)params[0];
576  double min = params[1];
577  double max = params[2];
578  h = new TH1F(name.c_str(), title.c_str(), nBins, min, max);
579  }
580  h->Sumw2();
581  _elements[name] = _dbe->book1D(name, h);
582  delete h;
583 }
584 
586  const std::string & objType, const std::string & variable, const float & value )
587 {
588  std::string sourceUpper = source;
589  sourceUpper[0] = toupper(sourceUpper[0]);
590  std::string name = source + objType + variable ;
591 
592  _elements[name]->Fill(value);
593 }
594 
595 
596 
597 // Initialize the selectors
598 void HLTHiggsSubAnalysis::InitSelector(const unsigned int & objtype)
599 {
600  if( objtype == EVTColContainer::MUON && _recMuonSelector == 0 )
601  {
603  }
604  else if( objtype == EVTColContainer::ELEC && _recElecSelector == 0)
605  {
607  }
608  else if( objtype == EVTColContainer::PHOTON && _recPhotonSelector == 0)
609  {
611  }
612  else if( objtype == EVTColContainer::CALOMET && _recCaloMETSelector == 0)
613  {
615  }
616  else if( objtype == EVTColContainer::PFTAU && _recPFTauSelector == 0 )
617  {
619  }
620  /*else if( objtype == EVTColContainer::TRACK && _recTrackSelector == 0)
621  {
622  _recTrackSelector = new StringCutObjectSelector<reco::Track>(_recCut[objtype]);
623  }*/
624 /* else
625  {
626 FIXME: ERROR NO IMPLEMENTADO
627  }*/
628 }
629 
630 void HLTHiggsSubAnalysis::insertcandidates(const unsigned int & objType, const EVTColContainer * cols,
631  std::vector<MatchStruct> * matches)
632 {
633  if( objType == EVTColContainer::MUON )
634  {
635  for(size_t i = 0; i < cols->muons->size(); i++)
636  {
637  if(_recMuonSelector->operator()(cols->muons->at(i)))
638  {
639  matches->push_back(MatchStruct(&cols->muons->at(i),objType));
640  }
641  }
642  }
643  else if( objType == EVTColContainer::ELEC )
644  {
645  for(size_t i = 0; i < cols->electrons->size(); i++)
646  {
647  if(_recElecSelector->operator()(cols->electrons->at(i)))
648  {
649  matches->push_back(MatchStruct(&cols->electrons->at(i),objType));
650  }
651  }
652  }
653  else if( objType == EVTColContainer::PHOTON )
654  {
655  for(size_t i = 0; i < cols->photons->size(); i++)
656  {
657  if(_recPhotonSelector->operator()(cols->photons->at(i)))
658  {
659  matches->push_back(MatchStruct(&cols->photons->at(i),objType));
660  }
661  }
662  }
663  else if( objType == EVTColContainer::CALOMET )
664  {
665  for(size_t i = 0; i < cols->caloMETs->size(); i++)
666  {
667  if(_recCaloMETSelector->operator()(cols->caloMETs->at(i)))
668  {
669  matches->push_back(MatchStruct(&cols->caloMETs->at(i),objType));
670  }
671  }
672  }
673  else if( objType == EVTColContainer::PFTAU )
674  {
675  for(size_t i = 0; i < cols->pfTaus->size(); i++)
676  {
677  if(_recPFTauSelector->operator()(cols->pfTaus->at(i)))
678  {
679  matches->push_back(MatchStruct(&cols->pfTaus->at(i),objType));
680  }
681  }
682  }
683  /*else if( objType == EVTColContainer::TRACK )
684  {
685  for(size_t i = 0; i < cols->tracks->size(); i++)
686  {
687  if(_recTrackSelector->operator()(cols->tracks->at(i)))
688  {
689  matches->push_back(MatchStruct(&cols->tracks->at(i),objType));
690  }
691  }
692  }*/
693  /*
694  else FIXME: Control errores
695  {
696  }
697  */
698 }
std::vector< double > _parametersTurnOn
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
void InitSelector(const unsigned int &objtype)
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:204
std::map< std::string, std::string > _shortpath2long
Relation between the short version of a path.
StringCutObjectSelector< reco::CaloMET > * _recCaloMETSelector
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
edm::EDGetTokenT< reco::GenParticleCollection > _genParticleLabel
std::map< unsigned int, std::string > _genCut
gen/rec objects cuts
static std::string getTypeString(const unsigned int &objtype)
void initobjects(const edm::Event &iEvent, EVTColContainer *col)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< reco::PFTauCollection > _recLabelsPFTau
unsigned int _minCandidates
The minimum number of reco/gen candidates needed by the analysis.
std::map< std::string, MonitorElement * > _elements
bool accept() const
Has at least one path accepted the event?
const std::vector< std::string > & triggerNames() const
names of trigger paths
const std::vector< reco::Photon > * photons
edm::ParameterSet _pset
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::set< std::string > _hltPaths
the hlt paths found in the hltConfig
const std::vector< reco::CaloMET > * caloMETs
const edm::TriggerResults * triggerResults
container with all the objects needed
Strings::size_type size() const
Definition: TriggerNames.cc:39
T eta() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
HLTConfigProvider _hltConfig
dictionary edges
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
edm::EDGetTokenT< reco::PhotonCollection > _recLabelsPhoton
const std::vector< reco::GsfElectron > * electrons
edm::EDGetTokenT< reco::CaloMETCollection > _recLabelsCaloMET
StringCutObjectSelector< reco::Track > * _recTrackSelector
std::map< unsigned int, std::string > _recCut
std::map< unsigned int, StringCutObjectSelector< reco::GenParticle > * > _genSelectorMap
void set(const reco::MuonCollection *v)
Setter: multiple overloaded function.
int iEvent
Definition: GenABIO.cc:243
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
const T & max(const T &a, const T &b)
std::vector< HLTHiggsPlotter > _analyzers
int j
Definition: DBlmapReader.cc:9
std::map< unsigned int, std::string > _recLabels
void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols)
std::map< unsigned int, double > _cutMinPt
StringCutObjectSelector< reco::PFTau > * _recPFTauSelector
bool isValid() const
Definition: HandleBase.h:76
#define LogTrace(id)
void beginRun(const edm::Run &iRun, const edm::EventSetup &iEventSetup)
edm::EDGetTokenT< edm::TriggerResults > _trigResultsTag
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:74
const reco::GenParticleCollection * genParticles
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
edm::EDGetTokenT< reco::GsfElectronCollection > _recLabelsElec
HLTHiggsSubAnalysis(const edm::ParameterSet &pset, const std::string &analysisname, edm::ConsumesCollector &&iC)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
StringCutObjectSelector< reco::Muon > * _recMuonSelector
void fillHist(const std::string &source, const std::string &objType, const std::string &variable, const float &value)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
T const * product() const
Definition: Handle.h:81
Helper structure to order MatchStruct.
Definition: MatchStruct.cc:66
const std::vector< unsigned int > getObjectsType(const std::string &hltpath) const
Extract what objects need this analysis.
void insertcandidates(const unsigned int &objtype, const EVTColContainer *col, std::vector< MatchStruct > *matches)
edm::EDGetTokenT< reco::MuonCollection > _recLabelsMuon
std::vector< double > _parametersPhi
std::vector< std::string > _hltPathsToCheck
the hlt paths with regular expressions
std::vector< double > _parametersEta
Some kinematical parameters.
std::map< unsigned int, double > _cutMaxEta
void bookobjects(const edm::ParameterSet &anpset, edm::ConsumesCollector &iC)
StringCutObjectSelector< reco::Photon > * _recPhotonSelector
const std::vector< reco::PFTau > * pfTaus
int col
Definition: cuy.py:1008
void bookHist(const std::string &source, const std::string &objType, const std::string &variable)
static std::string const source
Definition: EdmProvDump.cc:43
StringCutObjectSelector< reco::GsfElectron > * _recElecSelector
const std::vector< reco::Muon > * muons
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
Definition: Run.h:41
Definition: DDAxes.h:10