CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
HLTExoticaSubAnalysis Class Reference

#include <HLTExoticaSubAnalysis.h>

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
enum  Level { Level::GEN = 98, Level::RECO = 99 }
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols)
 
void beginJob ()
 
void beginRun (const edm::Run &iRun, const edm::EventSetup &iEventSetup)
 
void endRun ()
 
 HLTExoticaSubAnalysis (const edm::ParameterSet &pset, const std::string &analysisname, edm::ConsumesCollector &&consCollector)
 Constructor. More...
 
void subAnalysisBookHistos (DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup)
 
 ~HLTExoticaSubAnalysis ()
 End Constructor. More...
 

Private Member Functions

void bookHist (DQMStore::IBooker &iBooker, const std::string &source, const std::string &objType, const std::string &variable)
 The internal functions to book and fill histograms. More...
 
void fillHist (const std::string &source, const std::string &objType, const std::string &variable, const float &value)
 
void getHandlesToObjects (const edm::Event &iEvent, EVTColContainer *col)
 Gets the collections themselves. More...
 
void getNamesOfObjects (const edm::ParameterSet &anpset)
 Creates the maps that map which collection should come from which label. More...
 
const std::vector< unsigned int > getObjectsType (const std::string &hltpath) const
 closes analyze method More...
 
void initSelector (const unsigned int &objtype)
 Initializes the selectors of the objects based on which object it is. More...
 
void insertCandidates (const unsigned int &objtype, const EVTColContainer *col, std::vector< reco::LeafCandidate > *matches, std::map< int, double > &theSumEt, std::map< int, std::vector< const reco::Track * >> &trkObjs)
 
void registerConsumes (edm::ConsumesCollector &consCollector)
 Registers consumption of objects. More...
 

Private Attributes

std::string _analysisname
 The name of this sub-analysis. More...
 
edm::InputTag _beamSpotLabel
 
edm::EDGetTokenT< reco::BeamSpot_bsToken
 
bool _drop_pt2
 
bool _drop_pt3
 
std::map< std::string, MonitorElement * > _elements
 Structure of the MonitorElements. More...
 
std::map< unsigned int, std::string > _genCut
 gen/rec objects cuts More...
 
std::map< unsigned int, std::string > _genCut_leading
 gen/rec pt-leading objects cuts More...
 
StringCutObjectSelector< reco::GenMET > * _genMETSelector
 
edm::InputTag _genParticleLabel
 
edm::EDGetTokenT< reco::GenParticleCollection_genParticleToken
 And also the tokens to get the object collections. More...
 
std::map< unsigned int, StringCutObjectSelector< reco::GenParticle > * > _genSelectorMap
 
HLTConfigProvider _hltConfig
 Interface to the HLT information. More...
 
std::set< std::string > _hltPaths
 The hlt paths found in the hltConfig. More...
 
std::vector< std::string > _hltPathsToCheck
 The hlt paths to check for. More...
 
std::string _hltProcessName
 The labels of the object collections to be used in this analysis. More...
 
StringCutObjectSelector< l1extra::L1EtMissParticle > * _l1METSelector
 
unsigned int _minCandidates
 The minimum number of reco/gen candidates needed by the analysis. More...
 
std::vector< double > _parametersDxy
 
std::vector< double > _parametersEta
 Some kinematical parameters. More...
 
std::vector< double > _parametersPhi
 
std::vector< double > _parametersTurnOn
 
std::vector< double > _parametersTurnOnSumEt
 
std::vector< HLTExoticaPlotter_plotters
 The plotters: managers of each hlt path where the plots are done. More...
 
edm::ParameterSet _pset
 Internal, working copy of the PSet passed from above. More...
 
StringCutObjectSelector< reco::CaloJet > * _recCaloJetSelector
 
StringCutObjectSelector< reco::CaloMET > * _recCaloMETSelector
 
StringCutObjectSelector< reco::CaloMET > * _recCaloMHTSelector
 
std::map< unsigned int, std::string > _recCut
 
std::map< unsigned int, std::string > _recCut_leading
 
StringCutObjectSelector< reco::GsfElectron > * _recElecSelector
 
std::map< unsigned int, edm::InputTag_recLabels
 
StringCutObjectSelector< reco::MET > * _recMETSelector
 
StringCutObjectSelector< reco::Muon > * _recMuonSelector
 
StringCutObjectSelector< reco::Track > * _recMuonTrkSelector
 
StringCutObjectSelector< reco::PFJet > * _recPFJetSelector
 
StringCutObjectSelector< reco::PFMET > * _recPFMETSelector
 
StringCutObjectSelector< reco::PFMET > * _recPFMHTSelector
 
StringCutObjectSelector< reco::PFTau > * _recPFTauSelector
 
StringCutObjectSelector< reco::Photon > * _recPhotonSelector
 
StringCutObjectSelector< reco::Track > * _recTrackSelector
 
std::map< std::string, std::string > _shortpath2long
 Relation between the short and long versions of the path. More...
 
std::map< unsigned int, edm::EDGetToken_tokens
 
std::map< std::string, int > _triggerCounter
 counting HLT passed events More...
 
edm::InputTag _trigResultsLabel
 
edm::EDGetTokenT< edm::TriggerResults_trigResultsToken
 

Detailed Description

This class is the main workhorse of the package. It makes the histograms for one given analysis, taking care of all HLT paths related to that analysis.

Generate histograms for trigger efficiencies Exotica related Documentation available on the CMS TWiki: https://twiki.cern.ch/twiki/bin/view/CMS/EXOTICATriggerValidation

Author
Thiago R. Fernandez Perez Tomei Based and adapted from: J. Duarte Campderros code from HLTriggerOffline/Higgs J. Klukas, M. Vander Donckt and J. Alcaraz code from the HLTriggerOffline/Muon package.

Definition at line 65 of file HLTExoticaSubAnalysis.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 67 of file HLTExoticaSubAnalysis.h.

◆ MonitorElement

Definition at line 68 of file HLTExoticaSubAnalysis.h.

Member Enumeration Documentation

◆ Level

Enumerator
GEN 
RECO 

Definition at line 70 of file HLTExoticaSubAnalysis.h.

70 { GEN = 98, RECO = 99 };

Constructor & Destructor Documentation

◆ HLTExoticaSubAnalysis()

HLTExoticaSubAnalysis::HLTExoticaSubAnalysis ( const edm::ParameterSet pset,
const std::string &  analysisname,
edm::ConsumesCollector &&  consCollector 
)

Constructor.

Get the vector of paths to check, for this particular analysis.

Get the minimum candidates, for this particular analysis.

Definition at line 28 of file HLTExoticaSubAnalysis.cc.

31  : _pset(pset),
32  _analysisname(analysisname),
33  _minCandidates(0),
34  _hltProcessName(pset.getParameter<std::string>("hltProcessName")),
35  _genParticleLabel(pset.getParameter<std::string>("genParticleLabel")),
36  _trigResultsLabel("TriggerResults", "", _hltProcessName),
37  _beamSpotLabel(pset.getParameter<std::string>("beamSpotLabel")),
38  _parametersEta(pset.getParameter<std::vector<double>>("parametersEta")),
39  _parametersPhi(pset.getParameter<std::vector<double>>("parametersPhi")),
40  _parametersTurnOn(pset.getParameter<std::vector<double>>("parametersTurnOn")),
41  _parametersTurnOnSumEt(pset.getParameter<std::vector<double>>("parametersTurnOnSumEt")),
42  _parametersDxy(pset.getParameter<std::vector<double>>("parametersDxy")),
43  _drop_pt2(false),
44  _drop_pt3(false),
45  _recMuonSelector(nullptr),
46  _recMuonTrkSelector(nullptr),
47  _recTrackSelector(nullptr),
48  _recElecSelector(nullptr),
49  _recMETSelector(nullptr),
50  _recPFMETSelector(nullptr),
51  _recPFMHTSelector(nullptr),
52  _genMETSelector(nullptr),
53  _recCaloMETSelector(nullptr),
54  _recCaloMHTSelector(nullptr),
55  _l1METSelector(nullptr),
56  _recPFTauSelector(nullptr),
57  _recPhotonSelector(nullptr),
58  _recPFJetSelector(nullptr),
59  _recCaloJetSelector(nullptr) {
60  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::constructor()";
61 
62  // Specific parameters for this analysis
63  edm::ParameterSet anpset = pset.getParameter<edm::ParameterSet>(analysisname);
64 
65  // If this analysis has a particular set of binnings, use it.
66  // (Taken from the analysis-specific parameter set, of course)
67  // The "true" in the beginning of _pset.insert() means
68  // "overwrite the parameter if need be".
69  if (anpset.exists("parametersTurnOn")) {
70  _parametersTurnOn = anpset.getParameter<std::vector<double>>("parametersTurnOn");
71  _pset.insert(true, "parametersTurnOn", anpset.retrieve("parametersTurnOn"));
72  }
73  if (anpset.exists("parametersEta")) {
74  _parametersEta = anpset.getParameter<std::vector<double>>("parametersEta");
75  _pset.insert(true, "parametersEta", anpset.retrieve("parametersEta"));
76  }
77  if (anpset.exists("parametersPhi")) {
78  _parametersPhi = anpset.getParameter<std::vector<double>>("parametersPhi");
79  _pset.insert(true, "parametersPhi", anpset.retrieve("parametersPhi"));
80  }
81  if (anpset.exists("parametersDxy")) {
82  _parametersDxy = anpset.getParameter<std::vector<double>>("parametersDxy");
83  _pset.insert(true, "parametersDxy", anpset.retrieve("parametersDxy"));
84  }
85  if (anpset.exists("parametersTurnOnSumEt")) {
86  _parametersTurnOnSumEt = anpset.getParameter<std::vector<double>>("parametersTurnOnSumEt");
87  _pset.insert(true, "parametersTurnOnSumEt", anpset.retrieve("parametersTurnOnSumEt"));
88  }
89  if (anpset.exists("dropPt2")) {
90  _drop_pt2 = anpset.getParameter<bool>("dropPt2");
91  _pset.insert(true, "dropPt2", anpset.retrieve("dropPt2"));
92  }
93  if (anpset.exists("dropPt3")) {
94  _drop_pt3 = anpset.getParameter<bool>("dropPt3");
95  _pset.insert(true, "dropPt3", anpset.retrieve("dropPt3"));
96  }
97 
98  // Get names of objects that we may want to get from the event.
99  // Notice that genParticles are dealt with separately.
100  this->getNamesOfObjects(anpset);
101 
102  // Since now we have the names, we should register the consumption
103  // of objects.
104  this->registerConsumes(consCollector);
105 
106  // Generic objects: Initialization of basic phase space cuts.
107  for (std::map<unsigned int, edm::InputTag>::const_iterator it = _recLabels.begin(); it != _recLabels.end(); ++it) {
108  const std::string objStr = EVTColContainer::getTypeString(it->first);
109  _genCut[it->first] = pset.getParameter<std::string>(objStr + "_genCut");
110  _recCut[it->first] = pset.getParameter<std::string>(objStr + "_recCut");
111  auto const genCutParam = objStr + "_genCut_leading";
112  if (pset.exists(genCutParam)) {
113  _genCut_leading[it->first] = pset.getParameter<std::string>(genCutParam);
114  } else {
115  _genCut_leading[it->first] = "pt>0"; // no cut
116  }
117  auto const recCutParam = objStr + "_recCut_leading";
118  if (pset.exists(recCutParam)) {
119  _recCut_leading[it->first] = pset.getParameter<std::string>(recCutParam);
120  } else {
121  _recCut_leading[it->first] = "pt>0"; // no cut
122  }
123  }
124 
125  //--- Updating parameters if has to be modified for this particular specific
126  // analysis
127  for (std::map<unsigned int, edm::InputTag>::const_iterator it = _recLabels.begin(); it != _recLabels.end(); ++it) {
128  const std::string objStr = EVTColContainer::getTypeString(it->first);
129 
130  auto const genCutParam = objStr + "_genCut";
131  if (anpset.existsAs<std::string>(genCutParam, false)) {
132  _genCut[it->first] = anpset.getUntrackedParameter<std::string>(genCutParam);
133  }
134 
135  auto const recCutParam = objStr + "_recCut";
136  if (anpset.existsAs<std::string>(recCutParam, false)) {
137  _recCut[it->first] = anpset.getUntrackedParameter<std::string>(recCutParam);
138  }
139  }
140 
142  _hltPathsToCheck = anpset.getParameter<std::vector<std::string>>("hltPathsToCheck");
144  _minCandidates = anpset.getParameter<unsigned int>("minCandidates");
145 
146 }

References _drop_pt2, _drop_pt3, _genCut, _genCut_leading, _hltPathsToCheck, _minCandidates, _parametersDxy, _parametersEta, _parametersPhi, _parametersTurnOn, _parametersTurnOnSumEt, _pset, _recCut, _recCut_leading, _recLabels, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), getNamesOfObjects(), edm::ParameterSet::getParameter(), EVTColContainer::getTypeString(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::insert(), LogDebug, muonDTDigis_cfi::pset, registerConsumes(), edm::ParameterSet::retrieve(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~HLTExoticaSubAnalysis()

HLTExoticaSubAnalysis::~HLTExoticaSubAnalysis ( )

End Constructor.

Definition at line 148 of file HLTExoticaSubAnalysis.cc.

148  {
149  for (std::map<unsigned int, StringCutObjectSelector<reco::GenParticle> *>::iterator it = _genSelectorMap.begin();
150  it != _genSelectorMap.end();
151  ++it) {
152  delete it->second;
153  it->second = nullptr;
154  }
155  delete _recMuonSelector;
156  _recMuonSelector = nullptr;
157  delete _recMuonTrkSelector;
158  _recMuonTrkSelector = nullptr;
159  delete _recTrackSelector;
160  _recTrackSelector = nullptr;
161  delete _recElecSelector;
162  _recElecSelector = nullptr;
163  delete _recPhotonSelector;
164  _recPhotonSelector = nullptr;
165  delete _recMETSelector;
166  _recMETSelector = nullptr;
167  delete _recPFMETSelector;
168  _recPFMETSelector = nullptr;
169  delete _recPFMHTSelector;
170  _recPFMHTSelector = nullptr;
171  delete _genMETSelector;
172  _genMETSelector = nullptr;
173  delete _recCaloMETSelector;
174  _recCaloMETSelector = nullptr;
175  delete _recCaloMHTSelector;
176  _recCaloMHTSelector = nullptr;
177  delete _l1METSelector;
178  _l1METSelector = nullptr;
179  delete _recPFTauSelector;
180  _recPFTauSelector = nullptr;
181  delete _recPFJetSelector;
182  _recPFJetSelector = nullptr;
183  delete _recCaloJetSelector;
184  _recCaloJetSelector = nullptr;
185 }

References _genMETSelector, _genSelectorMap, _l1METSelector, _recCaloJetSelector, _recCaloMETSelector, _recCaloMHTSelector, _recElecSelector, _recMETSelector, _recMuonSelector, _recMuonTrkSelector, _recPFJetSelector, _recPFMETSelector, _recPFMHTSelector, _recPFTauSelector, _recPhotonSelector, _recTrackSelector, and genParticles_cff::map.

Member Function Documentation

◆ analyze()

void HLTExoticaSubAnalysis::analyze ( const edm::Event iEvent,
const edm::EventSetup iEventSetup,
EVTColContainer cols 
)

Method to fill all relevant histograms. Notice that we update the EVTColContaner to point to the collections we want.

We are going to make a fake reco::LeafCandidate, with our particleType as the pdgId. This is an alternative to the older implementation with MatchStruct.

Filling the histograms if pass the minimum amount of candidates needed by the analysis:

GEN CASE ///

Close GEN case

RECO CASE ///

Debugging.

Close RECO case

Definition at line 370 of file HLTExoticaSubAnalysis.cc.

370  {
371  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::analyze()";
372 
373  // Loop over _recLabels to make sure everything is alright.
374  /*
375  std::cout << "Now printing the _recLabels" << std::endl;
376  for (std::map<unsigned int, edm::InputTag>::iterator it = _recLabels.begin();
377  it != _recLabels.end(); ++it) {
378  std::cout << "Number: " << it->first << "\t" << "Label: " <<
379  it->second.label() << std::endl;
380  }
381  */
382 
383  // Initialize the collection (the ones which have not been initialiazed yet)
384  // std::cout << "Setting handles to objects..." << std::endl;
385  this->getHandlesToObjects(iEvent, cols);
386 
387  // Utility map, mapping kinds of objects (GEN, RECO) to strings ("gen","rec")
388  // std::map<Level, std::string> u2str;
389  // u2str[Level::GEN] = "gen";
390  // u2str[Level::RECO] = "rec";
391 
392  // Extract the match structure containing the gen/reco candidates (electron,
393  // muons,...). This part is common to all the SubAnalyses
394  std::vector<reco::LeafCandidate> matchesGen;
395  matchesGen.clear();
396  std::vector<reco::LeafCandidate> matchesReco;
397  matchesReco.clear();
398  std::map<int, double> theSumEt; // map< pdgId ; SumEt > in order to keep track of the MET type
399  std::map<int, std::vector<const reco::Track *>> trkObjs;
400 
401  // --- deal with GEN objects first.
402  // Make each good GEN object into the base cand for a MatchStruct
403  // Our definition of "good" is "passes the selector" defined in the config.py
404  // Save all the MatchStructs in the "matchesGen" vector.
405 
406  for (std::map<unsigned int, edm::InputTag>::iterator it = _recLabels.begin(); it != _recLabels.end(); ++it) {
407  // Here we are filling the vector of
408  // StringCutObjectSelector<reco::GenParticle> with objects constructed from
409  // the strings saved in _genCut. Initialize selectors when first event
410 
411  // std::cout << "Loop over the kinds of objects: objects of kind " <<
412  // it->first << std::endl;
413 
414  if (!_genSelectorMap[it->first]) {
416  }
417 
418  const std::string objTypeStr = EVTColContainer::getTypeString(it->first);
419  // genAnyMET doesn't make sense. No need their matchesGens
420  if (TString(objTypeStr).Contains("MET") || TString(objTypeStr).Contains("MHT") ||
421  TString(objTypeStr).Contains("Jet"))
422  continue;
423 
424  // Now loop over the genParticles, and apply the operator() over each of
425  // them. Fancy syntax: for objects X and Y, X.operator()(Y) is the same as
426  // X(Y).
427  for (size_t i = 0; i < cols->genParticles->size(); ++i) {
428  // std::cout << "Now matchesGen.size() is " << matchesGen.size() <<
429  // std::endl;
430  if (_genSelectorMap[it->first]->operator()(cols->genParticles->at(i))) {
431  const reco::Candidate *cand = &(cols->genParticles->at(i));
432  // std::cout << "Found good cand: cand->pt() = " << cand->pt() <<
433  // std::endl; matchesGen.push_back(MatchStruct(cand, it->first));
437  reco::LeafCandidate v(0, cand->p4(), cand->vertex(), it->first, 0, true);
438 
439  matchesGen.push_back(v);
440  }
441  }
442  }
443 
444  // Sort the matches by pT for later filling of turn-on curve
445  // std::cout << "Before sorting: matchesGen.size() = " << matchesGen.size() <<
446  // std::endl;
447 
448  // GreaterByPt<reco::LeafCandidate> comparator;
449  // std::sort(matchesGen.begin(),
450  // matchesGen.end(),
451  // comparator);
452 
453  // --- same for RECO objects
454  // Extraction of the objects candidates
455  if (verbose > 0)
456  LogDebug("ExoticaValidation") << "-- enter loop over recLabels";
457  for (std::map<unsigned int, edm::InputTag>::iterator it = _recLabels.begin(); it != _recLabels.end(); ++it) {
458  // std::cout << "Filling RECO \"matchesReco\" vector for particle kind
459  // it->first = "
460  // << it->first << ", which means " << it->second.label() << std::endl;
461  // Reco selectors (the function takes into account if it was instantiated
462  // before or not) ### Thiago ---> Then why don't we put it in the
463  // beginRun???
464  this->initSelector(it->first);
465  // -- Storing the matchesReco
466  this->insertCandidates(it->first, cols, &matchesReco, theSumEt, trkObjs);
467  if (verbose > 0)
468  LogDebug("ExoticaValidation") << "--- " << EVTColContainer::getTypeString(it->first)
469  << " sumEt=" << theSumEt[it->first];
470  }
471 
472  // std::sort(matchesReco.begin(),
473  // matchesReco.end(),
474  // comparator);
475 
476  // -- Trigger Results
477  const edm::TriggerNames &trigNames = iEvent.triggerNames(*(cols->triggerResults));
478 
479  // counting HLT passed events for debugging
480  for (std::vector<HLTExoticaPlotter>::iterator an = _plotters.begin(); an != _plotters.end(); ++an) {
481  const std::string hltPath = _shortpath2long[an->gethltpath()];
482  const bool ispassTrigger = cols->triggerResults->accept(trigNames.triggerIndex(hltPath));
483  if (ispassTrigger)
484  _triggerCounter.find(an->gethltpath())->second++;
485  }
486 
489 
490  // for (std::map<unsigned int, std::vector<MatchStruct> >::iterator it =
491  // sourceMatchMap.begin(); it != sourceMatchMap.end(); ++it) {
492  // it->first: gen/reco it->second: HLT matches (std::vector<MatchStruct>)
493 
494  // if (it->second.size() < _minCandidates) { // FIXME: A bug is potentially
495  // here: what about the mixed channels? continue;
496  //}
497 
501  if (matchesGen.size() >= _minCandidates) { // FIXME: A bug is potentially here: what about the
502  // mixed channels?
503  // Okay, there are enough candidates. Move on!
504 
505  // Filling the gen/reco objects (eff-denominators):
506  // Just the first two different ones, if there are more
507  // The countobjects maps uints (object types, really) --> integers.
508  // Example:
509  // | uint | int |
510  // | 0 | 1 | --> 1 muon used
511  // | 1 | 2 | --> 2 electrons used
512 
513  // Initializing the count of the used objects.
514  std::map<unsigned int, int> countobjects;
515  for (std::map<unsigned int, edm::InputTag>::iterator co = _recLabels.begin(); co != _recLabels.end(); ++co) {
516  // countobjects->insert(std::pair<unsigned int, int>(co->first, 0));
517  countobjects.insert(std::pair<unsigned int, int>(co->first, 0));
518  }
519 
520  int counttotal = 0;
521 
522  // 3 : pt1, pt2, pt3
523  int totalobjectssize = 1;
524  if (!_drop_pt2)
525  totalobjectssize++;
526  if (!_drop_pt3)
527  totalobjectssize++;
528  totalobjectssize *= countobjects.size();
529 
530  bool isPassedLeadingCut = true;
531  // We will proceed only when cuts for the pt-leading are satisified.
532  for (size_t j = 0; j != matchesGen.size(); ++j) {
533  const unsigned int objType = matchesGen[j].pdgId();
534  // Cut for the pt-leading object
536  if (!select(matchesGen[j])) { // No interest case
537  isPassedLeadingCut = false; // Will skip the following matchesGen loop
538  matchesGen.clear();
539  break;
540  }
541  }
542 
543  std::vector<float> dxys;
544  dxys.clear();
545 
546  for (size_t j = 0; (j != matchesGen.size()) && isPassedLeadingCut; ++j) {
547  const unsigned int objType = matchesGen[j].pdgId();
548  // std::cout << "(4) Gonna call with " << objType << std::endl;
550 
551  float pt = matchesGen[j].pt();
552 
553  if (countobjects[objType] == 0) {
554  this->fillHist("gen", objTypeStr, "MaxPt1", pt);
555  ++(countobjects[objType]);
556  ++counttotal;
557  } else if (countobjects[objType] == 1 && !_drop_pt2) {
558  this->fillHist("gen", objTypeStr, "MaxPt2", pt);
559  ++(countobjects[objType]);
560  ++counttotal;
561  } else if (countobjects[objType] == 2 && !_drop_pt3) {
562  this->fillHist("gen", objTypeStr, "MaxPt3", pt);
563  ++(countobjects[objType]);
564  ++counttotal;
565  } else {
566  // Already the minimum three objects has been filled, get out...
567  if (counttotal == totalobjectssize) {
568  size_t max_size = matchesGen.size();
569  for (size_t jj = j; jj < max_size; jj++) {
570  matchesGen.erase(matchesGen.end());
571  }
572  break;
573  }
574  }
575 
576  float eta = matchesGen[j].eta();
577  float phi = matchesGen[j].phi();
578 
579  this->fillHist("gen", objTypeStr, "Eta", eta);
580  this->fillHist("gen", objTypeStr, "Phi", phi);
581 
582  // If the target is electron or muon,
583 
585  const math::XYZPoint &vtx = matchesGen[j].vertex();
586  float momphi = matchesGen[j].momentum().phi();
587  float dxyGen = (-(vtx.x() - cols->bs->x0()) * sin(momphi) + (vtx.y() - cols->bs->y0()) * cos(momphi));
588  dxys.push_back(dxyGen);
589  this->fillHist("gen", objTypeStr, "Dxy", dxyGen);
590  }
591 
592  } // Closes loop in gen
593 
594  // Calling to the plotters analysis (where the evaluation of the different
595  // trigger paths are done)
596  // const std::string source = "gen";
597  for (std::vector<HLTExoticaPlotter>::iterator an = _plotters.begin(); an != _plotters.end(); ++an) {
598  const std::string hltPath = _shortpath2long[an->gethltpath()];
599  const bool ispassTrigger = cols->triggerResults->accept(trigNames.triggerIndex(hltPath));
600  LogDebug("ExoticaValidation") << " preparing to call the plotters analysis";
601  an->analyze(ispassTrigger, "gen", matchesGen, theSumEt, dxys);
602  LogDebug("ExoticaValidation") << " called the plotter";
603  }
604  }
605 
609 
610  {
611  if (matchesReco.size() < _minCandidates)
612  return; // FIXME: A bug is potentially here: what about the mixed
613  // channels?
614 
615  // Okay, there are enough candidates. Move on!
616 
617  // Filling the gen/reco objects (eff-denominators):
618  // Just the first two different ones, if there are more
619  // The countobjects maps uints (object types, really) --> integers.
620  // Example:
621  // | uint | int |
622  // | 0 | 1 | --> 1 muon used
623  // | 1 | 2 | --> 2 electrons used
624  // Initializing the count of the used objects.
625  // std::map<unsigned int, int> * countobjects = new std::map<unsigned int,
626  // int>;
627  std::map<unsigned int, int> countobjects;
628  for (std::map<unsigned int, edm::InputTag>::iterator co = _recLabels.begin(); co != _recLabels.end(); ++co) {
629  countobjects.insert(std::pair<unsigned int, int>(co->first, 0));
630  }
631 
632  int counttotal = 0;
633 
634  // 3 : pt1, pt2, pt3
635  int totalobjectssize = 1;
636  if (!_drop_pt2)
637  totalobjectssize++;
638  if (!_drop_pt3)
639  totalobjectssize++;
640  totalobjectssize *= countobjects.size();
641 
643  // std::cout << "Our RECO vector has matchesReco.size() = " <<
644  // matchesReco.size() << std::endl;
645 
646  std::vector<float> dxys;
647  dxys.clear();
648 
649  bool isPassedLeadingCut = true;
650  // We will proceed only when cuts for the pt-leading are satisified.
651  for (size_t j = 0; j != matchesReco.size(); ++j) {
652  const unsigned int objType = matchesReco[j].pdgId();
653  // Cut for the pt-leading object
655  if (!select(matchesReco[j])) { // No interest case
656  isPassedLeadingCut = false; // Will skip the following matchesReco loop
657  matchesReco.clear();
658  break;
659  }
660  }
661 
662  int jel = 0;
663  int jmu = 0;
664  int jmutrk = 0;
665 
666  // jel, jmu and jmutrk are being used as a dedicated counters to avoid getting
667  // non-existent elements inside trkObjs[11], trkObjs[13] and trkObjs[130], respectively
668  // more information in the issue https://github.com/cms-sw/cmssw/issues/32550
669 
670  for (size_t j = 0; (j != matchesReco.size()) && isPassedLeadingCut; ++j) {
671  const unsigned int objType = matchesReco[j].pdgId();
672  //std::cout << "(4) Gonna call with " << objType << std::endl;
673 
675 
676  float pt = matchesReco[j].pt();
677 
678  if (countobjects[objType] == 0) {
679  this->fillHist("rec", objTypeStr, "MaxPt1", pt);
680  ++(countobjects[objType]);
681  ++counttotal;
682  } else if (countobjects[objType] == 1 && !_drop_pt2) {
683  if (!(TString(objTypeStr).Contains("MET") || TString(objTypeStr).Contains("MHT"))) {
684  this->fillHist("rec", objTypeStr, "MaxPt2", pt);
685  }
686  ++(countobjects[objType]);
687  ++counttotal;
688  } else if (countobjects[objType] == 2 && !_drop_pt3) {
689  if (!(TString(objTypeStr).Contains("MET") || TString(objTypeStr).Contains("MHT"))) {
690  this->fillHist("rec", objTypeStr, "MaxPt3", pt);
691  }
692  ++(countobjects[objType]);
693  ++counttotal;
694  } else {
695  // Already the minimum three objects has been filled, get out...
696  if (counttotal == totalobjectssize) {
697  size_t max_size = matchesReco.size();
698  for (size_t jj = j; jj < max_size; jj++) {
699  matchesReco.erase(matchesReco.end());
700  }
701  break;
702  }
703  }
704 
705  float eta = matchesReco[j].eta();
706  float phi = matchesReco[j].phi();
707 
708  if (!(TString(objTypeStr).Contains("MET") || TString(objTypeStr).Contains("MHT"))) {
709  this->fillHist("rec", objTypeStr, "Eta", eta);
710  this->fillHist("rec", objTypeStr, "Phi", phi);
711  } else {
712  this->fillHist("rec", objTypeStr, "SumEt", theSumEt[objType]);
713  }
714 
715  if (objType == 11) {
716  float dxyRec = trkObjs[objType].at(jel)->dxy(cols->bs->position());
717  this->fillHist("rec", objTypeStr, "Dxy", dxyRec);
718  dxys.push_back(dxyRec);
719  ++jel;
720  }
721 
722  if (objType == 13) {
723  float dxyRec = trkObjs[objType].at(jmu)->dxy(cols->bs->position());
724  this->fillHist("rec", objTypeStr, "Dxy", dxyRec);
725  dxys.push_back(dxyRec);
726  ++jmu;
727  }
728 
729  if (objType == 130) {
730  float dxyRec = trkObjs[objType].at(jmutrk)->dxy(cols->bs->position());
731  this->fillHist("rec", objTypeStr, "Dxy", dxyRec);
732  dxys.push_back(dxyRec);
733  ++jmutrk;
734  }
735 
736  } // Closes loop in reco
737 
738  // LogDebug("ExoticaValidation") << " deleting
739  // countobjects"; delete countobjects;
740 
741  // Calling to the plotters analysis (where the evaluation of the different
742  // trigger paths are done)
743  // const std::string source = "reco";
744  for (std::vector<HLTExoticaPlotter>::iterator an = _plotters.begin(); an != _plotters.end(); ++an) {
745  const std::string hltPath = _shortpath2long[an->gethltpath()];
746  const bool ispassTrigger = cols->triggerResults->accept(trigNames.triggerIndex(hltPath));
747  LogDebug("ExoticaValidation") << " preparing to call the plotters analysis";
748  an->analyze(ispassTrigger, "rec", matchesReco, theSumEt, dxys);
749  LogDebug("ExoticaValidation") << " called the plotter";
750  }
751  }
752 
753 }

References _drop_pt2, _drop_pt3, _genCut, _genCut_leading, _genSelectorMap, _minCandidates, _plotters, _recCut_leading, _recLabels, _shortpath2long, _triggerCounter, edm::HLTGlobalStatus::accept(), EVTColContainer::bs, cms::cuda::co, funct::cos(), EVTColContainer::ELEC, PVValHelper::eta, fillHist(), EVTColContainer::genParticles, getHandlesToObjects(), EVTColContainer::getTypeString(), TriggerAnalyzer::hltPath, mps_fire::i, iEvent, initSelector(), insertCandidates(), dqmiolumiharvest::j, findQualityFiles::jj, LogDebug, EVTColContainer::MUON, EVTColContainer::MUTRK, electrons_cff::objType, phi, reco::BeamSpot::position(), DiDispStaMuonMonitor_cfi::pt, edm::second(), singleTopDQM_cfi::select, funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, EVTColContainer::triggerResults, trigNames, findQualityFiles::v, verbose, extraflags_cff::vtx, reco::BeamSpot::x0(), and reco::BeamSpot::y0().

◆ beginJob()

void HLTExoticaSubAnalysis::beginJob ( void  )

Definition at line 187 of file HLTExoticaSubAnalysis.cc.

187 {}

◆ beginRun()

void HLTExoticaSubAnalysis::beginRun ( const edm::Run iRun,
const edm::EventSetup iEventSetup 
)

Construct the plotters right here. For that we need to create the _hltPaths vector.

Definition at line 265 of file HLTExoticaSubAnalysis.cc.

265  {
266  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::beginRun()";
267 
270 
271  // Initialize the HLT config.
272  bool changedConfig(true);
273  if (!_hltConfig.init(iRun, iSetup, _hltProcessName, changedConfig)) {
274  edm::LogError("ExoticaValidation") << "HLTExoticaSubAnalysis::constructor(): "
275  << "Initialization of HLTConfigProvider failed!";
276  }
277 
278  // Parse the input paths to get them if they are in the table and associate
279  // them to the last filter of the path (in order to extract the objects).
280  _hltPaths.clear();
281  for (size_t i = 0; i < _hltPathsToCheck.size(); ++i) {
282  bool found = false;
283  TPRegexp pattern(_hltPathsToCheck[i]);
284 
285  // Loop over triggerNames from _hltConfig
286  for (size_t j = 0; j < _hltConfig.triggerNames().size(); ++j) {
287  std::string thetriggername = _hltConfig.triggerNames()[j];
288  if (TString(thetriggername).Contains(pattern)) {
289  _hltPaths.insert(thetriggername);
290  found = true;
291  }
292  if (verbose > 2 && i == 0)
293  LogDebug("ExoticaValidation") << "--- TRIGGER PATH : " << thetriggername;
294  }
295 
296  // Oh dear, the path we wanted seems to not be available
297  if (!found && verbose > 2) {
298  edm::LogWarning("ExoticaValidation") << "HLTExoticaSubAnalysis::constructor(): In " << _analysisname
299  << " subfolder NOT found the path: '" << _hltPathsToCheck[i] << "*'";
300  }
301  } // Close loop over paths to check.
302 
303  // At this point, _hltpaths contains the names of the paths to check
304  // that were found. Let's log it at trace level.
305  LogTrace("ExoticaValidation") << "SubAnalysis: " << _analysisname << "\nHLT Trigger Paths found >>>";
306  for (std::set<std::string>::const_iterator iter = _hltPaths.begin(); iter != _hltPaths.end(); ++iter) {
307  LogTrace("ExoticaValidation") << (*iter) << "\n";
308  }
309 
310  // Initialize the plotters (analysers for each trigger path)
311  _plotters.clear();
312  for (std::set<std::string>::iterator iPath = _hltPaths.begin(); iPath != _hltPaths.end(); ++iPath) {
313  // Avoiding the dependence of the version number for the trigger paths
314  std::string path = *iPath;
315  std::string shortpath = path;
316  if (path.rfind("_v") < path.length()) {
317  shortpath = path.substr(0, path.rfind("_v"));
318  }
319  _shortpath2long[shortpath] = path;
320 
321  // Objects needed by the HLT path
322  // Thiago: instead of trying to decode the objects from the path,
323  // put the burden on the user to tell us which objects are needed.
324  // const std::vector<unsigned int> objsNeedHLT =
325  // this->getObjectsType(shortpath);
326  std::vector<unsigned int> objsNeedHLT;
327  for (std::map<unsigned int, edm::InputTag>::iterator it = _recLabels.begin(); it != _recLabels.end(); ++it) {
328  objsNeedHLT.push_back(it->first);
329  }
330 
331  /*std::vector<unsigned int> userInstantiate;
332  // Sanity check: the object needed by a trigger path should be
333  // introduced by the user via config python (_recLabels datamember)
334  for (std::map<unsigned int, edm::InputTag>::iterator it = _recLabels.begin()
335  ; it != _recLabels.end(); ++it) { userInstantiate.push_back(it->first);
336  }
337  for (std::vector<unsigned int>::const_iterator it = objsNeedHLT.begin(); it
338  != objsNeedHLT.end();
339  ++it) {
340  if (std::find(userInstantiate.begin(), userInstantiate.end(), *it) ==
341  userInstantiate.end()) {
342  edm::LogError("ExoticaValidation") << "In
343  HLTExoticaSubAnalysis::beginRun, "
344  << "Incoherence found in the
345  python configuration file!!\nThe SubAnalysis '"
346  << _analysisname << "' has been
347  asked to evaluate the trigger path '"
348  << shortpath << "' (found it in
349  'hltPathsToCheck') BUT this path"
350  << " needs a '" <<
351  EVTColContainer::getTypeString(*it)
352  << "' which has not been
353  instantiated ('recVariableLabels'"
354  << ")" ;
355  exit(-1); // This should probably throw an exception...
356  }
357  }
358  */
359  LogTrace("ExoticaValidation") << " --- " << shortpath;
360 
361  // The hlt path, the objects (electrons, muons, photons, ...)
362  // needed to evaluate the path are the argumens of the plotter
363  HLTExoticaPlotter analyzer(_pset, shortpath, objsNeedHLT);
364  _plotters.push_back(analyzer);
365  // counting HLT passed events for debug
367  } // Okay, at this point we have prepared all the plotters.
368 }

References _analysisname, _hltConfig, _hltPaths, _hltPathsToCheck, _hltProcessName, _plotters, _pset, _recLabels, _shortpath2long, _triggerCounter, ramdisk_dqm_sourceclient-live_cfg::analyzer, newFWLiteAna::found, mps_fire::i, HLTConfigProvider::init(), dqmiolumiharvest::j, LogDebug, LogTrace, castor_dqm_sourceclient_file_cfg::path, topSingleLeptonDQM_PU_cfi::pattern, AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerNames(), and verbose.

◆ bookHist()

void HLTExoticaSubAnalysis::bookHist ( DQMStore::IBooker iBooker,
const std::string &  source,
const std::string &  objType,
const std::string &  variable 
)
private

The internal functions to book and fill histograms.

Definition at line 1071 of file HLTExoticaSubAnalysis.cc.

1074  {
1075  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::bookHist()";
1076  std::string sourceUpper = source;
1077  sourceUpper[0] = std::toupper(sourceUpper[0]);
1079  TH1F *h = nullptr;
1080 
1081  if (variable.find("SumEt") != std::string::npos) {
1082  std::string title = "Sum ET of " + sourceUpper + " " + objType;
1083  const size_t nBins = _parametersTurnOnSumEt.size() - 1;
1084  float *edges = new float[nBins + 1];
1085  for (size_t i = 0; i < nBins + 1; i++) {
1087  }
1088  h = new TH1F(name.c_str(), title.c_str(), nBins, edges);
1089  delete[] edges;
1090  }
1091 
1092  else if (variable.find("Dxy") != std::string::npos) {
1093  std::string title = "Dxy " + sourceUpper + " " + objType;
1094  int nBins = _parametersDxy[0];
1095  double min = _parametersDxy[1];
1096  double max = _parametersDxy[2];
1097  h = new TH1F(name.c_str(), title.c_str(), nBins, min, max);
1098  }
1099 
1100  else if (variable.find("MaxPt") != std::string::npos) {
1101  std::string desc = (variable == "MaxPt1") ? "Leading" : "Next-to-Leading";
1102  std::string title = "pT of " + desc + " " + sourceUpper + " " + objType;
1103  const size_t nBins = _parametersTurnOn.size() - 1;
1104  float *edges = new float[nBins + 1];
1105  for (size_t i = 0; i < nBins + 1; i++) {
1106  edges[i] = _parametersTurnOn[i];
1107  }
1108  h = new TH1F(name.c_str(), title.c_str(), nBins, edges);
1109  delete[] edges;
1110  }
1111 
1112  else {
1113  std::string symbol = (variable == "Eta") ? "#eta" : "#phi";
1114  std::string title = symbol + " of " + sourceUpper + " " + objType;
1115  std::vector<double> params = (variable == "Eta") ? _parametersEta : _parametersPhi;
1116  int nBins = (int)params[0];
1117  double min = params[1];
1118  double max = params[2];
1119  h = new TH1F(name.c_str(), title.c_str(), nBins, min, max);
1120  }
1121 
1122  h->Sumw2();
1123  // This is the trick, that takes a normal TH1F and puts it in in the DQM
1124  // machinery. Seems to be easy!
1125  // Updated to use the new iBooker machinery.
1126  _elements[name] = iBooker.book1D(name, h);
1127  delete h;
1128 }

References _elements, _parametersDxy, _parametersEta, _parametersPhi, _parametersTurnOn, _parametersTurnOnSumEt, dqm::implementation::IBooker::book1D(), submitPVResolutionJobs::desc, SelectiveReadoutTask_cfi::edges, h, mps_fire::i, createfilelist::int, LogDebug, SiStripPI::max, min(), Skims_PA_cff::name, seedmultiplicitymonitor_newtracking_cfi::nBins, electrons_cff::objType, CalibrationSummaryClient_cfi::params, source, AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, and taus_updatedMVAIds_cff::variable.

Referenced by subAnalysisBookHistos().

◆ endRun()

void HLTExoticaSubAnalysis::endRun ( )

Definition at line 1345 of file HLTExoticaSubAnalysis.cc.

1345  {
1346  // Dump trigger results
1347  std::stringstream log;
1348  log << std::endl;
1349  log << "====================================================================="
1350  "======"
1351  << std::endl;
1352  log << " Trigger Results ( " << _analysisname << " ) " << std::endl;
1353  log << "====================================================================="
1354  "======"
1355  << std::endl;
1356  log << std::setw(18) << "# of passed events : HLT path names" << std::endl;
1357  log << "-------------------:-------------------------------------------------"
1358  "------"
1359  << std::endl;
1360  for (std::map<std::string, int>::iterator it = _triggerCounter.begin(); it != _triggerCounter.end(); ++it) {
1361  log << std::setw(18) << it->second << " : " << it->first << std::endl;
1362  }
1363  log << "====================================================================="
1364  "======"
1365  << std::endl;
1366  LogDebug("ExoticaValidation") << log.str().data();
1367 }

References _analysisname, _triggerCounter, dqm-mbProfile::log, and LogDebug.

◆ fillHist()

void HLTExoticaSubAnalysis::fillHist ( const std::string &  source,
const std::string &  objType,
const std::string &  variable,
const float &  value 
)
private

Definition at line 1131 of file HLTExoticaSubAnalysis.cc.

1134  {
1135  std::string sourceUpper = source;
1136  sourceUpper[0] = toupper(sourceUpper[0]);
1138 
1139  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::fillHist() " << name << " " << value;
1140  _elements[name]->Fill(value);
1141  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::fillHist() " << name << " worked";
1142 }

References _elements, LogDebug, Skims_PA_cff::name, electrons_cff::objType, source, AlCaHLTBitMon_QueryRunRegistry::string, relativeConstraints::value, and taus_updatedMVAIds_cff::variable.

Referenced by analyze().

◆ getHandlesToObjects()

void HLTExoticaSubAnalysis::getHandlesToObjects ( const edm::Event iEvent,
EVTColContainer col 
)
private

Gets the collections themselves.

Definition at line 957 of file HLTExoticaSubAnalysis.cc.

957  {
958  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::getHandlesToObjects()";
959 
960  if (!col->isCommonInit()) {
961  // Extract the trigger results (path info, pass,...)
963  iEvent.getByToken(_trigResultsToken, trigResults);
964  if (trigResults.isValid()) {
965  col->triggerResults = trigResults.product();
966  LogDebug("ExoticaValidation") << "Added handle to triggerResults";
967  }
968 
969  // Extract the genParticles
971  iEvent.getByToken(_genParticleToken, genPart);
972  if (genPart.isValid()) {
973  col->genParticles = genPart.product();
974  LogDebug("ExoticaValidation") << "Added handle to genParticles";
975  }
976 
977  // BeamSpot for dxy
979  iEvent.getByToken(_bsToken, bsHandle);
980  if (bsHandle.isValid()) {
981  col->bs = bsHandle.product();
982  }
983  }
984 
985  // Loop over the tokens and extract all other objects
986  LogDebug("ExoticaValidation") << "We have got " << _tokens.size() << "tokens";
987  for (std::map<unsigned int, edm::EDGetToken>::iterator it = _tokens.begin(); it != _tokens.end(); ++it) {
988  if (it->first == EVTColContainer::MUON) {
990  iEvent.getByToken(it->second, theHandle);
991  if (theHandle.isValid())
992  col->set(theHandle.product());
993  } else if (it->first == EVTColContainer::MUTRK) {
995  iEvent.getByToken(it->second, theHandle);
996  if (theHandle.isValid())
997  col->set(theHandle.product());
998  } else if (it->first == EVTColContainer::TRACK) {
1000  iEvent.getByToken(it->second, theHandle);
1001  if (theHandle.isValid())
1002  col->set(theHandle.product());
1003  } else if (it->first == EVTColContainer::ELEC) {
1005  iEvent.getByToken(it->second, theHandle);
1006  if (theHandle.isValid())
1007  col->set(theHandle.product());
1008  } else if (it->first == EVTColContainer::PHOTON) {
1010  iEvent.getByToken(it->second, theHandle);
1011  if (theHandle.isValid())
1012  col->set(theHandle.product());
1013  } else if (it->first == EVTColContainer::MET) {
1015  iEvent.getByToken(it->second, theHandle);
1016  if (theHandle.isValid())
1017  col->set(theHandle.product());
1018  } else if (it->first == EVTColContainer::PFMET) {
1020  iEvent.getByToken(it->second, theHandle);
1021  if (theHandle.isValid())
1022  col->set(theHandle.product());
1023  } else if (it->first == EVTColContainer::PFMHT) {
1025  iEvent.getByToken(it->second, theHandle);
1026  if (theHandle.isValid())
1027  col->setPFMHT(theHandle.product());
1028  } else if (it->first == EVTColContainer::GENMET) {
1030  iEvent.getByToken(it->second, theHandle);
1031  if (theHandle.isValid())
1032  col->set(theHandle.product());
1033  } else if (it->first == EVTColContainer::CALOMET) {
1035  iEvent.getByToken(it->second, theHandle);
1036  if (theHandle.isValid())
1037  col->set(theHandle.product());
1038  } else if (it->first == EVTColContainer::CALOMHT) {
1040  iEvent.getByToken(it->second, theHandle);
1041  if (theHandle.isValid())
1042  col->setCaloMHT(theHandle.product());
1043  } else if (it->first == EVTColContainer::L1MET) {
1045  iEvent.getByToken(it->second, theHandle);
1046  if (theHandle.isValid())
1047  col->set(theHandle.product());
1048  } else if (it->first == EVTColContainer::PFTAU) {
1050  iEvent.getByToken(it->second, theHandle);
1051  if (theHandle.isValid())
1052  col->set(theHandle.product());
1053  } else if (it->first == EVTColContainer::PFJET) {
1055  iEvent.getByToken(it->second, theHandle);
1056  if (theHandle.isValid())
1057  col->set(theHandle.product());
1058  } else if (it->first == EVTColContainer::CALOJET) {
1060  iEvent.getByToken(it->second, theHandle);
1061  if (theHandle.isValid())
1062  col->set(theHandle.product());
1063  } else {
1064  edm::LogError("ExoticaValidation") << "HLTExoticaSubAnalysis::getHandlesToObjects "
1065  << " NOT IMPLEMENTED (yet) ERROR: '" << it->first << "'";
1066  }
1067  }
1068 }

References _bsToken, _genParticleToken, _tokens, _trigResultsToken, EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, cuy::col, EVTColContainer::ELEC, EVTColContainer::GENMET, iEvent, edm::HandleBase::isValid(), EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, edm::Handle< T >::product(), and EVTColContainer::TRACK.

Referenced by analyze().

◆ getNamesOfObjects()

void HLTExoticaSubAnalysis::getNamesOfObjects ( const edm::ParameterSet anpset)
private

Creates the maps that map which collection should come from which label.

Definition at line 793 of file HLTExoticaSubAnalysis.cc.

793  {
794  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::getNamesOfObjects()";
795 
796  if (anpset.exists("recMuonLabel")) {
797  _recLabels[EVTColContainer::MUON] = anpset.getParameter<edm::InputTag>("recMuonLabel");
799  }
800  if (anpset.exists("recMuonTrkLabel")) {
801  _recLabels[EVTColContainer::MUTRK] = anpset.getParameter<edm::InputTag>("recMuonTrkLabel");
803  }
804  if (anpset.exists("recTrackLabel")) {
805  _recLabels[EVTColContainer::TRACK] = anpset.getParameter<edm::InputTag>("recTrackLabel");
807  }
808  if (anpset.exists("recElecLabel")) {
809  _recLabels[EVTColContainer::ELEC] = anpset.getParameter<edm::InputTag>("recElecLabel");
811  }
812  if (anpset.exists("recPhotonLabel")) {
813  _recLabels[EVTColContainer::PHOTON] = anpset.getParameter<edm::InputTag>("recPhotonLabel");
815  }
816  if (anpset.exists("recMETLabel")) {
817  _recLabels[EVTColContainer::MET] = anpset.getParameter<edm::InputTag>("recMETLabel");
819  }
820  if (anpset.exists("recPFMETLabel")) {
821  _recLabels[EVTColContainer::PFMET] = anpset.getParameter<edm::InputTag>("recPFMETLabel");
823  }
824  if (anpset.exists("recPFMHTLabel")) {
825  _recLabels[EVTColContainer::PFMHT] = anpset.getParameter<edm::InputTag>("recPFMHTLabel");
827  }
828  if (anpset.exists("genMETLabel")) {
831  }
832  if (anpset.exists("recCaloMETLabel")) {
833  _recLabels[EVTColContainer::CALOMET] = anpset.getParameter<edm::InputTag>("recCaloMETLabel");
835  }
836  if (anpset.exists("recCaloMHTLabel")) {
837  _recLabels[EVTColContainer::CALOMHT] = anpset.getParameter<edm::InputTag>("recCaloMHTLabel");
839  }
840  if (anpset.exists("hltMETLabel")) {
843  }
844  if (anpset.exists("l1METLabel")) {
847  }
848  if (anpset.exists("recPFTauLabel")) {
849  _recLabels[EVTColContainer::PFTAU] = anpset.getParameter<edm::InputTag>("recPFTauLabel");
851  }
852  if (anpset.exists("recPFJetLabel")) {
853  _recLabels[EVTColContainer::PFJET] = anpset.getParameter<edm::InputTag>("recPFJetLabel");
855  }
856  if (anpset.exists("recCaloJetLabel")) {
857  _recLabels[EVTColContainer::CALOJET] = anpset.getParameter<edm::InputTag>("recCaloJetLabel");
859  }
860 
861  if (_recLabels.empty()) {
862  edm::LogError("ExoticaValidation") << "HLTExoticaSubAnalysis::getNamesOfObjects, "
863  << "Not included any object (recMuonLabel, recElecLabel, ...) "
864  << "in the analysis " << _analysisname;
865  return;
866  }
867 }

References _analysisname, _genSelectorMap, _recLabels, EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, EVTColContainer::ELEC, edm::ParameterSet::exists(), EVTColContainer::GENMET, edm::ParameterSet::getParameter(), EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, and EVTColContainer::TRACK.

Referenced by HLTExoticaSubAnalysis().

◆ getObjectsType()

const std::vector< unsigned int > HLTExoticaSubAnalysis::getObjectsType ( const std::string &  hltpath) const
private

closes analyze method

Return the objects (muons,electrons,photons,...) needed by a HLT path. Will in general return: 0 for muon, 1 for electron, 2 for photon, 3 for PFMET, 4 for PFTau, 5 for Jet. Notice that this function is really based on a parsing of the name of the path; any incongruences there may lead to problems.

Definition at line 756 of file HLTExoticaSubAnalysis.cc.

756  {
757  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::getObjectsType()";
758 
759  static const unsigned int objSize = 15;
760  static const unsigned int objtriggernames[] = {EVTColContainer::MUON,
775 
776  std::set<unsigned int> objsType;
777  // The object to deal has to be entered via the config .py
778  for (unsigned int i = 0; i < objSize; ++i) {
779  // std::cout << "(5) Gonna call with " << objtriggernames[i] << std::endl;
780  std::string objTypeStr = EVTColContainer::getTypeString(objtriggernames[i]);
781  // Check if it is needed this object for this trigger
782  if (!TString(hltPath).Contains(objTypeStr)) {
783  continue;
784  }
785 
786  objsType.insert(objtriggernames[i]);
787  }
788 
789  return std::vector<unsigned int>(objsType.begin(), objsType.end());
790 }

References EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, EVTColContainer::ELEC, EVTColContainer::GENMET, EVTColContainer::getTypeString(), TriggerAnalyzer::hltPath, mps_fire::i, EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, AlCaHLTBitMon_QueryRunRegistry::string, and EVTColContainer::TRACK.

◆ initSelector()

void HLTExoticaSubAnalysis::initSelector ( const unsigned int &  objtype)
private

Initializes the selectors of the objects based on which object it is.

Definition at line 1145 of file HLTExoticaSubAnalysis.cc.

1145  {
1146  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::initSelector()";
1147 
1148  if (objtype == EVTColContainer::MUON && _recMuonSelector == nullptr) {
1150  } else if (objtype == EVTColContainer::MUTRK && _recMuonTrkSelector == nullptr) {
1152  } else if (objtype == EVTColContainer::TRACK && _recTrackSelector == nullptr) {
1154  } else if (objtype == EVTColContainer::ELEC && _recElecSelector == nullptr) {
1156  } else if (objtype == EVTColContainer::PHOTON && _recPhotonSelector == nullptr) {
1158  } else if (objtype == EVTColContainer::MET && _recMETSelector == nullptr) {
1160  } else if (objtype == EVTColContainer::PFMET && _recPFMETSelector == nullptr) {
1162  } else if (objtype == EVTColContainer::PFMHT && _recPFMHTSelector == nullptr) {
1164  } else if (objtype == EVTColContainer::GENMET && _genMETSelector == nullptr) {
1166  } else if (objtype == EVTColContainer::CALOMET && _recCaloMETSelector == nullptr) {
1168  } else if (objtype == EVTColContainer::CALOMHT && _recCaloMHTSelector == nullptr) {
1170  } else if (objtype == EVTColContainer::L1MET && _l1METSelector == nullptr) {
1172  } else if (objtype == EVTColContainer::PFTAU && _recPFTauSelector == nullptr) {
1174  } else if (objtype == EVTColContainer::PFJET && _recPFJetSelector == nullptr) {
1176  } else if (objtype == EVTColContainer::CALOJET && _recCaloJetSelector == nullptr) {
1178  }
1179  /* else
1180  {
1181  FIXME: ERROR NOT IMPLEMENTED
1182  }*/
1183 }

References _genMETSelector, _l1METSelector, _recCaloJetSelector, _recCaloMETSelector, _recCaloMHTSelector, _recCut, _recElecSelector, _recMETSelector, _recMuonSelector, _recMuonTrkSelector, _recPFJetSelector, _recPFMETSelector, _recPFMHTSelector, _recPFTauSelector, _recPhotonSelector, _recTrackSelector, EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, EVTColContainer::ELEC, EVTColContainer::GENMET, EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, and EVTColContainer::TRACK.

Referenced by analyze().

◆ insertCandidates()

void HLTExoticaSubAnalysis::insertCandidates ( const unsigned int &  objtype,
const EVTColContainer col,
std::vector< reco::LeafCandidate > *  matches,
std::map< int, double > &  theSumEt,
std::map< int, std::vector< const reco::Track * >> &  trkObjs 
)
private

This function applies the selectors initialized previously to the objects, and matches the passing objects to HLT objects.

This is a special case. Passing a PFMET* to the constructor of MatchStruct will trigger the usage of the special constructor which also sets the sumEt member.

Definition at line 1186 of file HLTExoticaSubAnalysis.cc.

1190  {
1191  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::insertCandidates()";
1192 
1193  theSumEt[objType] = -1;
1194 
1195  if (objType == EVTColContainer::MUON) {
1196  for (size_t i = 0; i < cols->muons->size(); i++) {
1197  LogDebug("ExoticaValidation") << "Inserting muon " << i;
1198  if (_recMuonSelector->operator()(cols->muons->at(i))) {
1199  reco::LeafCandidate m(0, cols->muons->at(i).p4(), cols->muons->at(i).vertex(), objType, 0, true);
1200  matches->push_back(m);
1201 
1202  // for making dxy plots
1203  trkObjs[objType].push_back(cols->muons->at(i).bestTrack());
1204  }
1205  }
1206  } else if (objType == EVTColContainer::MUTRK) {
1207  for (size_t i = 0; i < cols->tracks->size(); i++) {
1208  LogDebug("ExoticaValidation") << "Inserting muonTrack " << i;
1209  if (_recMuonTrkSelector->operator()(cols->tracks->at(i))) {
1210  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> mom4;
1211  ROOT::Math::XYZVector mom3 = cols->tracks->at(i).momentum();
1212  mom4.SetXYZT(mom3.x(), mom3.y(), mom3.z(), mom3.r());
1213  reco::LeafCandidate m(0, mom4, cols->tracks->at(i).vertex(), objType, 0, true);
1214  matches->push_back(m);
1215 
1216  // for making dxy plots
1217  trkObjs[objType].push_back(&cols->tracks->at(i));
1218  }
1219  }
1220  } else if (objType == EVTColContainer::TRACK) {
1221  for (size_t i = 0; i < cols->tracks->size(); i++) {
1222  LogDebug("ExoticaValidation") << "Inserting Track " << i;
1223  if (_recTrackSelector->operator()(cols->tracks->at(i))) {
1224  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> mom4;
1225  ROOT::Math::XYZVector mom3 = cols->tracks->at(i).momentum();
1226  mom4.SetXYZT(mom3.x(), mom3.y(), mom3.z(), mom3.r());
1227  reco::LeafCandidate m(0, mom4, cols->tracks->at(i).vertex(), objType, 0, true);
1228  matches->push_back(m);
1229  }
1230  }
1231  } else if (objType == EVTColContainer::ELEC) {
1232  for (size_t i = 0; i < cols->electrons->size(); i++) {
1233  LogDebug("ExoticaValidation") << "Inserting electron " << i;
1234  if (_recElecSelector->operator()(cols->electrons->at(i))) {
1235  reco::LeafCandidate m(0, cols->electrons->at(i).p4(), cols->electrons->at(i).vertex(), objType, 0, true);
1236  matches->push_back(m);
1237 
1238  // for making dxy plots
1239  trkObjs[objType].push_back(cols->electrons->at(i).bestTrack());
1240  }
1241  }
1242  } else if (objType == EVTColContainer::PHOTON) {
1243  for (size_t i = 0; i < cols->photons->size(); i++) {
1244  LogDebug("ExoticaValidation") << "Inserting photon " << i;
1245  if (_recPhotonSelector->operator()(cols->photons->at(i))) {
1246  reco::LeafCandidate m(0, cols->photons->at(i).p4(), cols->photons->at(i).vertex(), objType, 0, true);
1247  matches->push_back(m);
1248  }
1249  }
1250  } else if (objType == EVTColContainer::PFMET) {
1254  for (size_t i = 0; i < cols->pfMETs->size(); i++) {
1255  LogDebug("ExoticaValidation") << "Inserting PFMET " << i;
1256  if (_recPFMETSelector->operator()(cols->pfMETs->at(i))) {
1257  reco::LeafCandidate m(0, cols->pfMETs->at(i).p4(), cols->pfMETs->at(i).vertex(), objType, 0, true);
1258  matches->push_back(m);
1259  if (i == 0)
1260  theSumEt[objType] = cols->pfMETs->at(i).sumEt();
1261  }
1262  }
1263  } else if (objType == EVTColContainer::PFMHT) {
1264  for (size_t i = 0; i < cols->pfMHTs->size(); i++) {
1265  LogDebug("ExoticaValidation") << "Inserting PFMHT " << i;
1266  if (_recPFMHTSelector->operator()(cols->pfMHTs->at(i))) {
1267  reco::LeafCandidate m(0, cols->pfMHTs->at(i).p4(), cols->pfMHTs->at(i).vertex(), objType, 0, true);
1268  matches->push_back(m);
1269  if (i == 0)
1270  theSumEt[objType] = cols->pfMHTs->at(i).sumEt();
1271  }
1272  }
1273  } else if (objType == EVTColContainer::GENMET) {
1274  for (size_t i = 0; i < cols->genMETs->size(); i++) {
1275  LogDebug("ExoticaValidation") << "Inserting GENMET " << i;
1276  if (_genMETSelector->operator()(cols->genMETs->at(i))) {
1277  reco::LeafCandidate m(0, cols->genMETs->at(i).p4(), cols->genMETs->at(i).vertex(), objType, 0, true);
1278  matches->push_back(m);
1279  if (i == 0)
1280  theSumEt[objType] = cols->genMETs->at(i).sumEt();
1281  }
1282  }
1283  } else if (objType == EVTColContainer::CALOMET) {
1284  for (size_t i = 0; i < cols->caloMETs->size(); i++) {
1285  LogDebug("ExoticaValidation") << "Inserting CALOMET " << i;
1286  if (_recCaloMETSelector->operator()(cols->caloMETs->at(i))) {
1287  reco::LeafCandidate m(0, cols->caloMETs->at(i).p4(), cols->caloMETs->at(i).vertex(), objType, 0, true);
1288  matches->push_back(m);
1289  if (i == 0)
1290  theSumEt[objType] = cols->caloMETs->at(i).sumEt();
1291  }
1292  }
1293  } else if (objType == EVTColContainer::CALOMHT) {
1294  for (size_t i = 0; i < cols->caloMHTs->size(); i++) {
1295  LogDebug("ExoticaValidation") << "Inserting CaloMHT " << i;
1296  if (_recCaloMHTSelector->operator()(cols->caloMHTs->at(i))) {
1297  reco::LeafCandidate m(0, cols->caloMHTs->at(i).p4(), cols->caloMHTs->at(i).vertex(), objType, 0, true);
1298  matches->push_back(m);
1299  if (i == 0)
1300  theSumEt[objType] = cols->caloMHTs->at(i).sumEt();
1301  }
1302  }
1303  } else if (objType == EVTColContainer::L1MET) {
1304  for (size_t i = 0; i < cols->l1METs->size(); i++) {
1305  LogDebug("ExoticaValidation") << "Inserting L1MET " << i;
1306  if (_l1METSelector->operator()(cols->l1METs->at(i))) {
1307  reco::LeafCandidate m(0, cols->l1METs->at(i).p4(), cols->l1METs->at(i).vertex(), objType, 0, true);
1308  matches->push_back(m);
1309  if (i == 0)
1310  theSumEt[objType] = cols->l1METs->at(i).etTotal();
1311  }
1312  }
1313  } else if (objType == EVTColContainer::PFTAU) {
1314  for (size_t i = 0; i < cols->pfTaus->size(); i++) {
1315  LogDebug("ExoticaValidation") << "Inserting PFtau " << i;
1316  if (_recPFTauSelector->operator()(cols->pfTaus->at(i))) {
1317  reco::LeafCandidate m(0, cols->pfTaus->at(i).p4(), cols->pfTaus->at(i).vertex(), objType, 0, true);
1318  matches->push_back(m);
1319  }
1320  }
1321  } else if (objType == EVTColContainer::PFJET) {
1322  for (size_t i = 0; i < cols->pfJets->size(); i++) {
1323  LogDebug("ExoticaValidation") << "Inserting jet " << i;
1324  if (_recPFJetSelector->operator()(cols->pfJets->at(i))) {
1325  reco::LeafCandidate m(0, cols->pfJets->at(i).p4(), cols->pfJets->at(i).vertex(), objType, 0, true);
1326  matches->push_back(m);
1327  }
1328  }
1329  } else if (objType == EVTColContainer::CALOJET) {
1330  for (size_t i = 0; i < cols->caloJets->size(); i++) {
1331  LogDebug("ExoticaValidation") << "Inserting jet " << i;
1332  if (_recCaloJetSelector->operator()(cols->caloJets->at(i))) {
1333  reco::LeafCandidate m(0, cols->caloJets->at(i).p4(), cols->caloJets->at(i).vertex(), objType, 0, true);
1334  matches->push_back(m);
1335  }
1336  }
1337  }
1338 
1339  /* else
1340  {
1341  FIXME: ERROR NOT IMPLEMENTED
1342  }*/
1343 }

References _genMETSelector, _l1METSelector, _recCaloJetSelector, _recCaloMETSelector, _recCaloMHTSelector, _recElecSelector, _recMuonSelector, _recMuonTrkSelector, _recPFJetSelector, _recPFMETSelector, _recPFMHTSelector, _recPFTauSelector, _recPhotonSelector, _recTrackSelector, EVTColContainer::CALOJET, EVTColContainer::caloJets, EVTColContainer::CALOMET, EVTColContainer::caloMETs, EVTColContainer::CALOMHT, EVTColContainer::caloMHTs, EVTColContainer::ELEC, EVTColContainer::electrons, EVTColContainer::GENMET, EVTColContainer::genMETs, mps_fire::i, EVTColContainer::L1MET, EVTColContainer::l1METs, LogDebug, visualization-live-secondInstance_cfg::m, oniaPATMuonsWithTrigger_cff::matches, EVTColContainer::MUON, EVTColContainer::muons, EVTColContainer::MUTRK, electrons_cff::objType, EVTColContainer::PFJET, EVTColContainer::pfJets, EVTColContainer::PFMET, EVTColContainer::pfMETs, EVTColContainer::PFMHT, EVTColContainer::pfMHTs, EVTColContainer::PFTAU, EVTColContainer::pfTaus, EVTColContainer::PHOTON, EVTColContainer::photons, EVTColContainer::TRACK, and EVTColContainer::tracks.

Referenced by analyze().

◆ registerConsumes()

void HLTExoticaSubAnalysis::registerConsumes ( edm::ConsumesCollector consCollector)
private

Registers consumption of objects.

Definition at line 871 of file HLTExoticaSubAnalysis.cc.

871  {
872  // Register that we are getting genParticles
874 
875  // Register that we are getting the trigger results
877 
878  // Register beamspot
879  _bsToken = iC.consumes<reco::BeamSpot>(_beamSpotLabel);
880 
881  // Loop over _recLabels, see what we need, and register.
882  // Then save the registered token in _tokens.
883  // Remember: _recLabels is a map<uint, edm::InputTag>
884  // Remember: _tokens is a map<uint, edm::EDGetToken>
885  LogDebug("ExoticaValidation") << "We have got " << _recLabels.size() << "recLabels";
886  for (std::map<unsigned int, edm::InputTag>::iterator it = _recLabels.begin(); it != _recLabels.end(); ++it) {
887  if (it->first == EVTColContainer::MUON) {
888  edm::EDGetTokenT<reco::MuonCollection> particularToken = iC.consumes<reco::MuonCollection>(it->second);
889  edm::EDGetToken token(particularToken);
890  _tokens[it->first] = token;
891  } else if (it->first == EVTColContainer::MUTRK) {
892  edm::EDGetTokenT<reco::TrackCollection> particularToken = iC.consumes<reco::TrackCollection>(it->second);
893  edm::EDGetToken token(particularToken);
894  _tokens[it->first] = token;
895  } else if (it->first == EVTColContainer::TRACK) {
896  edm::EDGetTokenT<reco::TrackCollection> particularToken = iC.consumes<reco::TrackCollection>(it->second);
897  edm::EDGetToken token(particularToken);
898  _tokens[it->first] = token;
899  } else if (it->first == EVTColContainer::ELEC) {
901  iC.consumes<reco::GsfElectronCollection>(it->second);
902  edm::EDGetToken token(particularToken);
903  _tokens[it->first] = token;
904  } else if (it->first == EVTColContainer::PHOTON) {
905  edm::EDGetTokenT<reco::PhotonCollection> particularToken = iC.consumes<reco::PhotonCollection>(it->second);
906  edm::EDGetToken token(particularToken);
907  _tokens[it->first] = token;
908  } else if (it->first == EVTColContainer::MET) {
909  edm::EDGetTokenT<reco::METCollection> particularToken = iC.consumes<reco::METCollection>(it->second);
910  edm::EDGetToken token(particularToken);
911  _tokens[it->first] = token;
912  } else if (it->first == EVTColContainer::PFMET) {
913  edm::EDGetTokenT<reco::PFMETCollection> particularToken = iC.consumes<reco::PFMETCollection>(it->second);
914  edm::EDGetToken token(particularToken);
915  _tokens[it->first] = token;
916  } else if (it->first == EVTColContainer::PFMHT) {
917  edm::EDGetTokenT<reco::PFMETCollection> particularToken = iC.consumes<reco::PFMETCollection>(it->second);
918  edm::EDGetToken token(particularToken);
919  _tokens[it->first] = token;
920  } else if (it->first == EVTColContainer::GENMET) {
921  edm::EDGetTokenT<reco::GenMETCollection> particularToken = iC.consumes<reco::GenMETCollection>(it->second);
922  edm::EDGetToken token(particularToken);
923  _tokens[it->first] = token;
924  } else if (it->first == EVTColContainer::CALOMET) {
925  edm::EDGetTokenT<reco::CaloMETCollection> particularToken = iC.consumes<reco::CaloMETCollection>(it->second);
926  edm::EDGetToken token(particularToken);
927  _tokens[it->first] = token;
928  } else if (it->first == EVTColContainer::CALOMHT) {
929  edm::EDGetTokenT<reco::CaloMETCollection> particularToken = iC.consumes<reco::CaloMETCollection>(it->second);
930  edm::EDGetToken token(particularToken);
931  _tokens[it->first] = token;
932  } else if (it->first == EVTColContainer::L1MET) {
934  iC.consumes<l1extra::L1EtMissParticleCollection>(it->second);
935  edm::EDGetToken token(particularToken);
936  _tokens[it->first] = token;
937  } else if (it->first == EVTColContainer::PFTAU) {
938  edm::EDGetTokenT<reco::PFTauCollection> particularToken = iC.consumes<reco::PFTauCollection>(it->second);
939  edm::EDGetToken token(particularToken);
940  _tokens[it->first] = token;
941  } else if (it->first == EVTColContainer::PFJET) {
942  edm::EDGetTokenT<reco::PFJetCollection> particularToken = iC.consumes<reco::PFJetCollection>(it->second);
943  edm::EDGetToken token(particularToken);
944  _tokens[it->first] = token;
945  } else if (it->first == EVTColContainer::CALOJET) {
946  edm::EDGetTokenT<reco::CaloJetCollection> particularToken = iC.consumes<reco::CaloJetCollection>(it->second);
947  edm::EDGetToken token(particularToken);
948  _tokens[it->first] = token;
949  } else {
950  edm::LogError("ExoticaValidation") << "HLTExoticaSubAnalysis::registerConsumes"
951  << " NOT IMPLEMENTED (yet) ERROR: '" << it->second.label() << "'";
952  }
953  }
954 }

References _beamSpotLabel, _bsToken, _genParticleLabel, _genParticleToken, _recLabels, _tokens, _trigResultsLabel, _trigResultsToken, EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, edm::ConsumesCollector::consumes(), EVTColContainer::ELEC, EVTColContainer::GENMET, EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, unpackBuffers-CaloStage2::token, and EVTColContainer::TRACK.

Referenced by HLTExoticaSubAnalysis().

◆ subAnalysisBookHistos()

void HLTExoticaSubAnalysis::subAnalysisBookHistos ( DQMStore::IBooker iBooker,
const edm::Run iRun,
const edm::EventSetup iSetup 
)

Method to book all relevant histograms in the DQMStore. Uses the IBooker interface for thread safety. Intended to be called from master object.

Definition at line 195 of file HLTExoticaSubAnalysis.cc.

197  {
198  LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::subAnalysisBookHistos()";
199 
200  // Create the folder structure inside HLT/Exotica
201  std::string baseDir = "HLT/Exotica/" + _analysisname + "/";
202  iBooker.setCurrentFolder(baseDir);
203 
204  // Book the gen/reco analysis-dependent histograms (denominators)
205  for (std::map<unsigned int, edm::InputTag>::const_iterator it = _recLabels.begin(); it != _recLabels.end(); ++it) {
206  const std::string objStr = EVTColContainer::getTypeString(it->first);
207  std::vector<std::string> sources(2);
208  sources[0] = "gen";
209  sources[1] = "rec";
210 
211  for (size_t i = 0; i < sources.size(); i++) {
213 
214  if (source == "gen") {
215  if (TString(objStr).Contains("MET") || TString(objStr).Contains("MHT") || TString(objStr).Contains("Jet")) {
216  continue;
217  } else {
218  bookHist(iBooker, source, objStr, "MaxPt1");
219  if (!_drop_pt2)
220  bookHist(iBooker, source, objStr, "MaxPt2");
221  if (!_drop_pt3)
222  bookHist(iBooker, source, objStr, "MaxPt3");
223  bookHist(iBooker, source, objStr, "Eta");
224  bookHist(iBooker, source, objStr, "Phi");
225 
226  // If the target is electron or muon,
227  // we will add Dxy plots.
228  if (it->first == EVTColContainer::ELEC || it->first == EVTColContainer::MUON ||
229  it->first == EVTColContainer::MUTRK) {
230  bookHist(iBooker, source, objStr, "Dxy");
231  }
232  }
233  } else { // reco
234  if (TString(objStr).Contains("MET") || TString(objStr).Contains("MHT")) {
235  bookHist(iBooker, source, objStr, "MaxPt1");
236  bookHist(iBooker, source, objStr, "SumEt");
237  } else {
238  bookHist(iBooker, source, objStr, "MaxPt1");
239  if (!_drop_pt2)
240  bookHist(iBooker, source, objStr, "MaxPt2");
241  if (!_drop_pt3)
242  bookHist(iBooker, source, objStr, "MaxPt3");
243  bookHist(iBooker, source, objStr, "Eta");
244  bookHist(iBooker, source, objStr, "Phi");
245 
246  // If the target is electron or muon,
247  // we will add Dxy plots.
248  if (it->first == EVTColContainer::ELEC || it->first == EVTColContainer::MUON ||
249  it->first == EVTColContainer::MUTRK) {
250  bookHist(iBooker, source, objStr, "Dxy");
251  }
252  }
253  }
254  }
255  } // closes loop in _recLabels
256 
257  // Call the plotterBookHistos() (which books all the path dependent
258  // histograms)
259  LogDebug("ExoticaValidation") << " number of plotters = " << _plotters.size();
260  for (std::vector<HLTExoticaPlotter>::iterator it = _plotters.begin(); it != _plotters.end(); ++it) {
261  it->plotterBookHistos(iBooker, iRun, iSetup);
262  }
263 }

References _analysisname, _drop_pt2, _drop_pt3, _plotters, _recLabels, ALCARECODTCalibSynchDQM_cff::baseDir, bookHist(), EVTColContainer::ELEC, EVTColContainer::getTypeString(), mps_fire::i, LogDebug, EVTColContainer::MUON, EVTColContainer::MUTRK, dqm::implementation::NavigatorBase::setCurrentFolder(), source, CalibrationSummaryClient_cfi::sources, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ _analysisname

std::string HLTExoticaSubAnalysis::_analysisname
private

The name of this sub-analysis.

Definition at line 125 of file HLTExoticaSubAnalysis.h.

Referenced by beginRun(), endRun(), getNamesOfObjects(), and subAnalysisBookHistos().

◆ _beamSpotLabel

edm::InputTag HLTExoticaSubAnalysis::_beamSpotLabel
private

Definition at line 141 of file HLTExoticaSubAnalysis.h.

Referenced by registerConsumes().

◆ _bsToken

edm::EDGetTokenT<reco::BeamSpot> HLTExoticaSubAnalysis::_bsToken
private

Definition at line 146 of file HLTExoticaSubAnalysis.h.

Referenced by getHandlesToObjects(), and registerConsumes().

◆ _drop_pt2

bool HLTExoticaSubAnalysis::_drop_pt2
private

Definition at line 157 of file HLTExoticaSubAnalysis.h.

Referenced by analyze(), HLTExoticaSubAnalysis(), and subAnalysisBookHistos().

◆ _drop_pt3

bool HLTExoticaSubAnalysis::_drop_pt3
private

Definition at line 158 of file HLTExoticaSubAnalysis.h.

Referenced by analyze(), HLTExoticaSubAnalysis(), and subAnalysisBookHistos().

◆ _elements

std::map<std::string, MonitorElement *> HLTExoticaSubAnalysis::_elements
private

Structure of the MonitorElements.

Definition at line 196 of file HLTExoticaSubAnalysis.h.

Referenced by bookHist(), and fillHist().

◆ _genCut

std::map<unsigned int, std::string> HLTExoticaSubAnalysis::_genCut
private

gen/rec objects cuts

Definition at line 161 of file HLTExoticaSubAnalysis.h.

Referenced by analyze(), and HLTExoticaSubAnalysis().

◆ _genCut_leading

std::map<unsigned int, std::string> HLTExoticaSubAnalysis::_genCut_leading
private

gen/rec pt-leading objects cuts

Definition at line 164 of file HLTExoticaSubAnalysis.h.

Referenced by analyze(), and HLTExoticaSubAnalysis().

◆ _genMETSelector

StringCutObjectSelector<reco::GenMET>* HLTExoticaSubAnalysis::_genMETSelector
private

Definition at line 177 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _genParticleLabel

edm::InputTag HLTExoticaSubAnalysis::_genParticleLabel
private

Definition at line 139 of file HLTExoticaSubAnalysis.h.

Referenced by registerConsumes().

◆ _genParticleToken

edm::EDGetTokenT<reco::GenParticleCollection> HLTExoticaSubAnalysis::_genParticleToken
private

And also the tokens to get the object collections.

Definition at line 144 of file HLTExoticaSubAnalysis.h.

Referenced by getHandlesToObjects(), and registerConsumes().

◆ _genSelectorMap

std::map<unsigned int, StringCutObjectSelector<reco::GenParticle> *> HLTExoticaSubAnalysis::_genSelectorMap
private

The concrete String selectors (use the string cuts introduced via the config python)

Definition at line 169 of file HLTExoticaSubAnalysis.h.

Referenced by analyze(), getNamesOfObjects(), and ~HLTExoticaSubAnalysis().

◆ _hltConfig

HLTConfigProvider HLTExoticaSubAnalysis::_hltConfig
private

Interface to the HLT information.

Definition at line 193 of file HLTExoticaSubAnalysis.h.

Referenced by beginRun().

◆ _hltPaths

std::set<std::string> HLTExoticaSubAnalysis::_hltPaths
private

The hlt paths found in the hltConfig.

Definition at line 133 of file HLTExoticaSubAnalysis.h.

Referenced by beginRun().

◆ _hltPathsToCheck

std::vector<std::string> HLTExoticaSubAnalysis::_hltPathsToCheck
private

The hlt paths to check for.

Definition at line 131 of file HLTExoticaSubAnalysis.h.

Referenced by beginRun(), and HLTExoticaSubAnalysis().

◆ _hltProcessName

std::string HLTExoticaSubAnalysis::_hltProcessName
private

The labels of the object collections to be used in this analysis.

Definition at line 138 of file HLTExoticaSubAnalysis.h.

Referenced by beginRun().

◆ _l1METSelector

StringCutObjectSelector<l1extra::L1EtMissParticle>* HLTExoticaSubAnalysis::_l1METSelector
private

Definition at line 180 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _minCandidates

unsigned int HLTExoticaSubAnalysis::_minCandidates
private

The minimum number of reco/gen candidates needed by the analysis.

Definition at line 128 of file HLTExoticaSubAnalysis.h.

Referenced by analyze(), and HLTExoticaSubAnalysis().

◆ _parametersDxy

std::vector<double> HLTExoticaSubAnalysis::_parametersDxy
private

Definition at line 154 of file HLTExoticaSubAnalysis.h.

Referenced by bookHist(), and HLTExoticaSubAnalysis().

◆ _parametersEta

std::vector<double> HLTExoticaSubAnalysis::_parametersEta
private

Some kinematical parameters.

Definition at line 150 of file HLTExoticaSubAnalysis.h.

Referenced by bookHist(), and HLTExoticaSubAnalysis().

◆ _parametersPhi

std::vector<double> HLTExoticaSubAnalysis::_parametersPhi
private

Definition at line 151 of file HLTExoticaSubAnalysis.h.

Referenced by bookHist(), and HLTExoticaSubAnalysis().

◆ _parametersTurnOn

std::vector<double> HLTExoticaSubAnalysis::_parametersTurnOn
private

Definition at line 152 of file HLTExoticaSubAnalysis.h.

Referenced by bookHist(), and HLTExoticaSubAnalysis().

◆ _parametersTurnOnSumEt

std::vector<double> HLTExoticaSubAnalysis::_parametersTurnOnSumEt
private

Definition at line 153 of file HLTExoticaSubAnalysis.h.

Referenced by bookHist(), and HLTExoticaSubAnalysis().

◆ _plotters

std::vector<HLTExoticaPlotter> HLTExoticaSubAnalysis::_plotters
private

The plotters: managers of each hlt path where the plots are done.

Definition at line 187 of file HLTExoticaSubAnalysis.h.

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

◆ _pset

edm::ParameterSet HLTExoticaSubAnalysis::_pset
private

Internal, working copy of the PSet passed from above.

Definition at line 122 of file HLTExoticaSubAnalysis.h.

Referenced by beginRun(), and HLTExoticaSubAnalysis().

◆ _recCaloJetSelector

StringCutObjectSelector<reco::CaloJet>* HLTExoticaSubAnalysis::_recCaloJetSelector
private

Definition at line 184 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recCaloMETSelector

StringCutObjectSelector<reco::CaloMET>* HLTExoticaSubAnalysis::_recCaloMETSelector
private

Definition at line 178 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recCaloMHTSelector

StringCutObjectSelector<reco::CaloMET>* HLTExoticaSubAnalysis::_recCaloMHTSelector
private

Definition at line 179 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recCut

std::map<unsigned int, std::string> HLTExoticaSubAnalysis::_recCut
private

Definition at line 162 of file HLTExoticaSubAnalysis.h.

Referenced by HLTExoticaSubAnalysis(), and initSelector().

◆ _recCut_leading

std::map<unsigned int, std::string> HLTExoticaSubAnalysis::_recCut_leading
private

Definition at line 165 of file HLTExoticaSubAnalysis.h.

Referenced by analyze(), and HLTExoticaSubAnalysis().

◆ _recElecSelector

StringCutObjectSelector<reco::GsfElectron>* HLTExoticaSubAnalysis::_recElecSelector
private

Definition at line 173 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recLabels

std::map<unsigned int, edm::InputTag> HLTExoticaSubAnalysis::_recLabels
private

◆ _recMETSelector

StringCutObjectSelector<reco::MET>* HLTExoticaSubAnalysis::_recMETSelector
private

Definition at line 174 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), and ~HLTExoticaSubAnalysis().

◆ _recMuonSelector

StringCutObjectSelector<reco::Muon>* HLTExoticaSubAnalysis::_recMuonSelector
private

Definition at line 170 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recMuonTrkSelector

StringCutObjectSelector<reco::Track>* HLTExoticaSubAnalysis::_recMuonTrkSelector
private

Definition at line 171 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recPFJetSelector

StringCutObjectSelector<reco::PFJet>* HLTExoticaSubAnalysis::_recPFJetSelector
private

Definition at line 183 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recPFMETSelector

StringCutObjectSelector<reco::PFMET>* HLTExoticaSubAnalysis::_recPFMETSelector
private

Definition at line 175 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recPFMHTSelector

StringCutObjectSelector<reco::PFMET>* HLTExoticaSubAnalysis::_recPFMHTSelector
private

Definition at line 176 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recPFTauSelector

StringCutObjectSelector<reco::PFTau>* HLTExoticaSubAnalysis::_recPFTauSelector
private

Definition at line 181 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recPhotonSelector

StringCutObjectSelector<reco::Photon>* HLTExoticaSubAnalysis::_recPhotonSelector
private

Definition at line 182 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _recTrackSelector

StringCutObjectSelector<reco::Track>* HLTExoticaSubAnalysis::_recTrackSelector
private

Definition at line 172 of file HLTExoticaSubAnalysis.h.

Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().

◆ _shortpath2long

std::map<std::string, std::string> HLTExoticaSubAnalysis::_shortpath2long
private

Relation between the short and long versions of the path.

Definition at line 135 of file HLTExoticaSubAnalysis.h.

Referenced by analyze(), and beginRun().

◆ _tokens

std::map<unsigned int, edm::EDGetToken> HLTExoticaSubAnalysis::_tokens
private

Definition at line 147 of file HLTExoticaSubAnalysis.h.

Referenced by getHandlesToObjects(), and registerConsumes().

◆ _triggerCounter

std::map<std::string, int> HLTExoticaSubAnalysis::_triggerCounter
private

counting HLT passed events

Definition at line 190 of file HLTExoticaSubAnalysis.h.

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

◆ _trigResultsLabel

edm::InputTag HLTExoticaSubAnalysis::_trigResultsLabel
private

Definition at line 140 of file HLTExoticaSubAnalysis.h.

Referenced by registerConsumes().

◆ _trigResultsToken

edm::EDGetTokenT<edm::TriggerResults> HLTExoticaSubAnalysis::_trigResultsToken
private

Definition at line 145 of file HLTExoticaSubAnalysis.h.

Referenced by getHandlesToObjects(), and registerConsumes().

HLTExoticaSubAnalysis::_recCut_leading
std::map< unsigned int, std::string > _recCut_leading
Definition: HLTExoticaSubAnalysis.h:165
EVTColContainer::getTypeString
const static std::string getTypeString(const unsigned int &objtype)
Tranform types into strings.
Definition: EVTColContainer.cc:232
HLTExoticaSubAnalysis::_recCut
std::map< unsigned int, std::string > _recCut
Definition: HLTExoticaSubAnalysis.h:162
reco::PFMETCollection
std::vector< reco::PFMET > PFMETCollection
collection of PFMET objects
Definition: PFMETCollection.h:20
HLTExoticaSubAnalysis::_genParticleToken
edm::EDGetTokenT< reco::GenParticleCollection > _genParticleToken
And also the tokens to get the object collections.
Definition: HLTExoticaSubAnalysis.h:144
HLTExoticaSubAnalysis::_recCaloMETSelector
StringCutObjectSelector< reco::CaloMET > * _recCaloMETSelector
Definition: HLTExoticaSubAnalysis.h:178
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
HLTExoticaSubAnalysis::_hltProcessName
std::string _hltProcessName
The labels of the object collections to be used in this analysis.
Definition: HLTExoticaSubAnalysis.h:138
mps_fire.i
i
Definition: mps_fire.py:428
EVTColContainer::PFMHT
Definition: EVTColContainer.cc:55
edm::ParameterSet::retrieve
Entry const & retrieve(char const *) const
Definition: ParameterSet.cc:226
HLTExoticaSubAnalysis::initSelector
void initSelector(const unsigned int &objtype)
Initializes the selectors of the objects based on which object it is.
Definition: HLTExoticaSubAnalysis.cc:1145
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HLTExoticaSubAnalysis::_hltPathsToCheck
std::vector< std::string > _hltPathsToCheck
The hlt paths to check for.
Definition: HLTExoticaSubAnalysis.h:131
EVTColContainer::ELEC
Definition: EVTColContainer.cc:49
trigNames
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
HLTExoticaSubAnalysis::_parametersTurnOnSumEt
std::vector< double > _parametersTurnOnSumEt
Definition: HLTExoticaSubAnalysis.h:153
EVTColContainer::GENMET
Definition: EVTColContainer.cc:57
HLTExoticaSubAnalysis::_trigResultsToken
edm::EDGetTokenT< edm::TriggerResults > _trigResultsToken
Definition: HLTExoticaSubAnalysis.h:145
HLTExoticaSubAnalysis::_genCut_leading
std::map< unsigned int, std::string > _genCut_leading
gen/rec pt-leading objects cuts
Definition: HLTExoticaSubAnalysis.h:164
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::EDGetTokenT< reco::MuonCollection >
cuy.col
col
Definition: cuy.py:1009
singleTopDQM_cfi.select
select
Definition: singleTopDQM_cfi.py:50
HLTExoticaSubAnalysis::_parametersDxy
std::vector< double > _parametersDxy
Definition: HLTExoticaSubAnalysis.h:154
TriggerAnalyzer.hltPath
hltPath
Definition: TriggerAnalyzer.py:62
oniaPATMuonsWithTrigger_cff.matches
matches
Definition: oniaPATMuonsWithTrigger_cff.py:77
reco::GenParticleCollection
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
Definition: GenParticleFwd.h:13
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
HLTExoticaSubAnalysis::_recMuonTrkSelector
StringCutObjectSelector< reco::Track > * _recMuonTrkSelector
Definition: HLTExoticaSubAnalysis.h:171
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
CalibrationSummaryClient_cfi.sources
sources
Definition: CalibrationSummaryClient_cfi.py:23
HLTExoticaSubAnalysis::insertCandidates
void insertCandidates(const unsigned int &objtype, const EVTColContainer *col, std::vector< reco::LeafCandidate > *matches, std::map< int, double > &theSumEt, std::map< int, std::vector< const reco::Track * >> &trkObjs)
Definition: HLTExoticaSubAnalysis.cc:1186
ALCARECODTCalibSynchDQM_cff.baseDir
baseDir
Definition: ALCARECODTCalibSynchDQM_cff.py:16
reco::GsfElectronCollection
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
Definition: GsfElectronFwd.h:14
HLTExoticaSubAnalysis::_l1METSelector
StringCutObjectSelector< l1extra::L1EtMissParticle > * _l1METSelector
Definition: HLTExoticaSubAnalysis.h:180
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
findQualityFiles.v
v
Definition: findQualityFiles.py:179
EVTColContainer::bs
const reco::BeamSpot * bs
Definition: EVTColContainer.cc:86
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
ramdisk_dqm_sourceclient-live_cfg.analyzer
analyzer
Definition: ramdisk_dqm_sourceclient-live_cfg.py:22
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle< edm::TriggerResults >
HLTExoticaSubAnalysis::_genCut
std::map< unsigned int, std::string > _genCut
gen/rec objects cuts
Definition: HLTExoticaSubAnalysis.h:161
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HLTExoticaSubAnalysis::_drop_pt2
bool _drop_pt2
Definition: HLTExoticaSubAnalysis.h:157
EVTColContainer::MUON
Definition: EVTColContainer.cc:50
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
HLTExoticaSubAnalysis::_recElecSelector
StringCutObjectSelector< reco::GsfElectron > * _recElecSelector
Definition: HLTExoticaSubAnalysis.h:173
reco::METCollection
std::vector< reco::MET > METCollection
collection of MET objects
Definition: METCollection.h:22
EVTColContainer::MET
Definition: EVTColContainer.cc:56
EVTColContainer::triggerResults
const edm::TriggerResults * triggerResults
Definition: EVTColContainer.cc:85
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
reco::GenMETCollection
std::vector< reco::GenMET > GenMETCollection
collection of GenMET objects
Definition: GenMETCollection.h:20
HLTExoticaSubAnalysis::_shortpath2long
std::map< std::string, std::string > _shortpath2long
Relation between the short and long versions of the path.
Definition: HLTExoticaSubAnalysis.h:135
HLTExoticaSubAnalysis::_recPFMHTSelector
StringCutObjectSelector< reco::PFMET > * _recPFMHTSelector
Definition: HLTExoticaSubAnalysis.h:176
cms::cuda::co
__host__ __device__ VT * co
Definition: prefixScan.h:47
EVTColContainer::CALOMET
Definition: EVTColContainer.cc:58
HLTExoticaSubAnalysis::_parametersTurnOn
std::vector< double > _parametersTurnOn
Definition: HLTExoticaSubAnalysis.h:152
edm::ParameterSet::insert
void insert(bool ok_to_replace, char const *, Entry const &)
Definition: ParameterSet.cc:380
PVValHelper::eta
Definition: PVValidationHelpers.h:70
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
reco::MuonCollection
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
HLTExoticaSubAnalysis::_elements
std::map< std::string, MonitorElement * > _elements
Structure of the MonitorElements.
Definition: HLTExoticaSubAnalysis.h:196
reco::BeamSpot
Definition: BeamSpot.h:21
reco::PFTauCollection
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
source
static const std::string source
Definition: EdmProvDump.cc:47
HLTExoticaSubAnalysis::getHandlesToObjects
void getHandlesToObjects(const edm::Event &iEvent, EVTColContainer *col)
Gets the collections themselves.
Definition: HLTExoticaSubAnalysis.cc:957
EVTColContainer::TRACK
Definition: EVTColContainer.cc:53
EVTColContainer::CALOJET
Definition: EVTColContainer.cc:62
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
HLTExoticaSubAnalysis::fillHist
void fillHist(const std::string &source, const std::string &objType, const std::string &variable, const float &value)
Definition: HLTExoticaSubAnalysis.cc:1131
EVTColContainer::genParticles
const reco::GenParticleCollection * genParticles
Definition: EVTColContainer.cc:70
seedmultiplicitymonitor_newtracking_cfi.nBins
nBins
Definition: seedmultiplicitymonitor_newtracking_cfi.py:8
h
EVTColContainer::PFMET
Definition: EVTColContainer.cc:54
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
HLTExoticaSubAnalysis::_recPhotonSelector
StringCutObjectSelector< reco::Photon > * _recPhotonSelector
Definition: HLTExoticaSubAnalysis.h:182
HLTExoticaSubAnalysis::_bsToken
edm::EDGetTokenT< reco::BeamSpot > _bsToken
Definition: HLTExoticaSubAnalysis.h:146
HLTExoticaSubAnalysis::_hltConfig
HLTConfigProvider _hltConfig
Interface to the HLT information.
Definition: HLTExoticaSubAnalysis.h:193
HLTExoticaSubAnalysis::_tokens
std::map< unsigned int, edm::EDGetToken > _tokens
Definition: HLTExoticaSubAnalysis.h:147
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
EVTColContainer::MUTRK
Definition: EVTColContainer.cc:51
HLTExoticaSubAnalysis::_genParticleLabel
edm::InputTag _genParticleLabel
Definition: HLTExoticaSubAnalysis.h:139
electrons_cff.objType
objType
Definition: electrons_cff.py:519
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
EVTColContainer::PHOTON
Definition: EVTColContainer.cc:48
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
HLTExoticaSubAnalysis::_recPFJetSelector
StringCutObjectSelector< reco::PFJet > * _recPFJetSelector
Definition: HLTExoticaSubAnalysis.h:183
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HLTExoticaSubAnalysis::_parametersEta
std::vector< double > _parametersEta
Some kinematical parameters.
Definition: HLTExoticaSubAnalysis.h:150
HLTExoticaSubAnalysis::_triggerCounter
std::map< std::string, int > _triggerCounter
counting HLT passed events
Definition: HLTExoticaSubAnalysis.h:190
cand
Definition: decayParser.h:32
EVTColContainer::CALOMHT
Definition: EVTColContainer.cc:63
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
HLTExoticaSubAnalysis::_pset
edm::ParameterSet _pset
Internal, working copy of the PSet passed from above.
Definition: HLTExoticaSubAnalysis.h:122
reco::CaloJetCollection
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
Definition: CaloJetCollection.h:15
l1extra::L1EtMissParticleCollection
std::vector< L1EtMissParticle > L1EtMissParticleCollection
Definition: L1EtMissParticleFwd.h:32
value
Definition: value.py:1
HLTExoticaSubAnalysis::_analysisname
std::string _analysisname
The name of this sub-analysis.
Definition: HLTExoticaSubAnalysis.h:125
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
HLTExoticaSubAnalysis::_genMETSelector
StringCutObjectSelector< reco::GenMET > * _genMETSelector
Definition: HLTExoticaSubAnalysis.h:177
HLTExoticaSubAnalysis::_recMETSelector
StringCutObjectSelector< reco::MET > * _recMETSelector
Definition: HLTExoticaSubAnalysis.h:174
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
HLTExoticaSubAnalysis::_recCaloJetSelector
StringCutObjectSelector< reco::CaloJet > * _recCaloJetSelector
Definition: HLTExoticaSubAnalysis.h:184
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
edm::EDGetToken
Definition: EDGetToken.h:35
SelectiveReadoutTask_cfi.edges
edges
Definition: SelectiveReadoutTask_cfi.py:107
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLTExoticaSubAnalysis::_recCaloMHTSelector
StringCutObjectSelector< reco::CaloMET > * _recCaloMHTSelector
Definition: HLTExoticaSubAnalysis.h:179
reco::Candidate
Definition: Candidate.h:27
HLTExoticaSubAnalysis::_minCandidates
unsigned int _minCandidates
The minimum number of reco/gen candidates needed by the analysis.
Definition: HLTExoticaSubAnalysis.h:128
HLTExoticaSubAnalysis::_plotters
std::vector< HLTExoticaPlotter > _plotters
The plotters: managers of each hlt path where the plots are done.
Definition: HLTExoticaSubAnalysis.h:187
DDAxes::phi
reco::BeamSpot::x0
double x0() const
x coordinate
Definition: BeamSpot.h:61
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
taus_updatedMVAIds_cff.variable
variable
Definition: taus_updatedMVAIds_cff.py:33
HLTExoticaSubAnalysis::_beamSpotLabel
edm::InputTag _beamSpotLabel
Definition: HLTExoticaSubAnalysis.h:141
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
analyzer
Definition: SiPixelLorentzAngle.h:82
HLTExoticaPlotter
Definition: HLTExoticaPlotter.h:43
reco::PFJetCollection
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Definition: PFJetCollection.h:14
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:19
relativeConstraints.value
value
Definition: relativeConstraints.py:53
StringCutObjectSelector< reco::GenParticle >
EVTColContainer::PFTAU
Definition: EVTColContainer.cc:52
HLTExoticaSubAnalysis::getNamesOfObjects
void getNamesOfObjects(const edm::ParameterSet &anpset)
Creates the maps that map which collection should come from which label.
Definition: HLTExoticaSubAnalysis.cc:793
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
edm::TriggerNames
Definition: TriggerNames.h:55
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HLTExoticaSubAnalysis::_recMuonSelector
StringCutObjectSelector< reco::Muon > * _recMuonSelector
Definition: HLTExoticaSubAnalysis.h:170
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ROOT::Math::XYZVector
Transform3DPJ::Vector XYZVector
Definition: Transform3DPJ.cc:34
HLTExoticaSubAnalysis::_parametersPhi
std::vector< double > _parametersPhi
Definition: HLTExoticaSubAnalysis.h:151
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
HLTExoticaSubAnalysis::_hltPaths
std::set< std::string > _hltPaths
The hlt paths found in the hltConfig.
Definition: HLTExoticaSubAnalysis.h:133
edm::HLTGlobalStatus::accept
bool accept() const
Has at least one path accepted the event?
Definition: HLTGlobalStatus.h:49
reco::PhotonCollection
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
reco::LeafCandidate
Definition: LeafCandidate.h:16
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
EVTColContainer::PFJET
Definition: EVTColContainer.cc:61
genParticles_cff.map
map
Definition: genParticles_cff.py:11
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
reco::CaloMETCollection
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
Definition: CaloMETCollection.h:20
HLTExoticaSubAnalysis::_recLabels
std::map< unsigned int, edm::InputTag > _recLabels
Definition: HLTExoticaSubAnalysis.h:142
EVTColContainer::L1MET
Definition: EVTColContainer.cc:60
HLTConfigProvider::triggerNames
const std::vector< std::string > & triggerNames() const
names of trigger paths
Definition: HLTConfigProvider.h:69
HLTExoticaSubAnalysis::_recPFMETSelector
StringCutObjectSelector< reco::PFMET > * _recPFMETSelector
Definition: HLTExoticaSubAnalysis.h:175
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
reco::BeamSpot::y0
double y0() const
y coordinate
Definition: BeamSpot.h:63
HLTExoticaSubAnalysis::_trigResultsLabel
edm::InputTag _trigResultsLabel
Definition: HLTExoticaSubAnalysis.h:140
HLTExoticaSubAnalysis::_recTrackSelector
StringCutObjectSelector< reco::Track > * _recTrackSelector
Definition: HLTExoticaSubAnalysis.h:172
HLTExoticaSubAnalysis::registerConsumes
void registerConsumes(edm::ConsumesCollector &consCollector)
Registers consumption of objects.
Definition: HLTExoticaSubAnalysis.cc:871
HLTExoticaSubAnalysis::bookHist
void bookHist(DQMStore::IBooker &iBooker, const std::string &source, const std::string &objType, const std::string &variable)
The internal functions to book and fill histograms.
Definition: HLTExoticaSubAnalysis.cc:1071
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
HLTExoticaSubAnalysis::_drop_pt3
bool _drop_pt3
Definition: HLTExoticaSubAnalysis.h:158
edm::TriggerResults
Definition: TriggerResults.h:35
HLTExoticaSubAnalysis::_recPFTauSelector
StringCutObjectSelector< reco::PFTau > * _recPFTauSelector
Definition: HLTExoticaSubAnalysis.h:181
HLTExoticaSubAnalysis::_genSelectorMap
std::map< unsigned int, StringCutObjectSelector< reco::GenParticle > * > _genSelectorMap
Definition: HLTExoticaSubAnalysis.h:169
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
Photon_E30GeV_all_cfg.GEN
GEN
Definition: Photon_E30GeV_all_cfg.py:36
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316