CMS 3D CMS Logo

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

container with all the objects needed More...

Public Types

enum  {
  ELEC = 11, MUON = 13, PFTAU = 15, PHOTON = 22,
  PFMET = 39, JET = 211, _nMAX
}
 
enum  {
  MUON = 13, ELEC = 11, PHOTON = 22, CALOMET,
  PFTAU = 15, _nMAX
}
 

Public Member Functions

 EVTColContainer ()
 
 EVTColContainer ()
 
const unsigned int getSize (const unsigned int &objtype) const
 
const unsigned int getSize (const unsigned int &objtype) const
 Get size of collections. More...
 
bool isAllInit ()
 
bool isAllInit ()
 
bool isCommonInit ()
 
bool isCommonInit ()
 
void reset ()
 Reset: clear all collections. More...
 
void reset ()
 
void set (const reco::MuonCollection *v)
 Setter: multiple overloaded function. More...
 
void set (const reco::MuonCollection *v)
 Setter: multiple overloaded function. More...
 
void set (const reco::GsfElectronCollection *v)
 
void set (const reco::GsfElectronCollection *v)
 
void set (const reco::PhotonCollection *v)
 
void set (const reco::PhotonCollection *v)
 
void set (const reco::CaloMETCollection *v)
 
void set (const reco::PFMETCollection *v)
 
void set (const reco::PFTauCollection *v)
 
void set (const reco::PFTauCollection *v)
 
void set (const reco::PFJetCollection *v)
 

Static Public Member Functions

static const std::string getTypeString (const unsigned int &objtype)
 Tranform types into strings. More...
 
static std::string getTypeString (const unsigned int &objtype)
 

Public Attributes

const std::vector
< reco::CaloMET > * 
caloMETs
 
const std::vector
< reco::GsfElectron > * 
electrons
 
const reco::GenParticleCollectiongenParticles
 
const std::vector< reco::PFJet > * jets
 
const std::vector< reco::Muon > * muons
 
int nInitialized
 
int nOfCollections
 
const std::vector< reco::PFMET > * pfMETs
 
const std::vector< reco::PFTau > * pfTaus
 
const std::vector< reco::Photon > * photons
 
const
trigger::TriggerEventWithRefs
rawTriggerEvent
 
const edm::TriggerResultstriggerResults
 

Detailed Description

container with all the objects needed

Container with all the objects needed Notice that I have "more or less" followed the pdgIds of the particles involved.

Class to manage all the object collections in the Exotica Validation package.

Author
J. Duarte Campderros

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

Author
J. Duarte Campderros

Definition at line 34 of file EVTColContainer.cc.

Member Enumeration Documentation

anonymous enum
Enumerator
ELEC 
MUON 
PFTAU 
PHOTON 
PFMET 
JET 
_nMAX 

Definition at line 35 of file EVTColContainer.cc.

35  {
36  ELEC = 11,
37  MUON = 13,
38  PFTAU = 15,
39  PHOTON = 22,
40  PFMET = 39,
41  JET = 211,
42  _nMAX
43  };
Computes the MET from a collection of PFCandidates. HF missing!
Definition: PFMET.h:30
anonymous enum
Enumerator
MUON 
ELEC 
PHOTON 
CALOMET 
PFTAU 
_nMAX 

Definition at line 35 of file EVTColContainer.cc.

Constructor & Destructor Documentation

EVTColContainer::EVTColContainer ( )
inline

Definition at line 55 of file EVTColContainer.cc.

55  :
56  nOfCollections(6),
57  nInitialized(0),
58  genParticles(0),
59  muons(0),
60  electrons(0),
61  photons(0),
62  pfMETs(0),
63  pfTaus(0),
64  jets(0),
66  {
67  }
const std::vector< reco::Muon > * muons
const std::vector< reco::PFJet > * jets
const reco::GenParticleCollection * genParticles
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::GsfElectron > * electrons
const std::vector< reco::PFMET > * pfMETs
const edm::TriggerResults * triggerResults
EVTColContainer::EVTColContainer ( )
inline

Definition at line 57 of file EVTColContainer.cc.

57  :
58 // nOfCollections(6),
59  nOfCollections(5),
60  nInitialized(0),
61  genParticles(0),
62  muons(0),
63  electrons(0),
64  photons(0),
65  pfTaus(0),
66  //tracks(0),
67  rawTriggerEvent(0),
69  {
70  }
const std::vector< reco::Muon > * muons
const trigger::TriggerEventWithRefs * rawTriggerEvent
const reco::GenParticleCollection * genParticles
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::GsfElectron > * electrons
const edm::TriggerResults * triggerResults

Member Function Documentation

const unsigned int EVTColContainer::getSize ( const unsigned int &  objtype) const
inline

Definition at line 121 of file EVTColContainer.cc.

References CALOMET, caloMETs, ELEC, electrons, MUON, muons, PFTAU, pfTaus, PHOTON, photons, and findQualityFiles::size.

122  {
123  unsigned int size = 0;
124  if( objtype == EVTColContainer::MUON && muons != 0 )
125  {
126  size = muons->size();
127  }
128  else if( objtype == EVTColContainer::ELEC && electrons != 0 )
129  {
130  size = electrons->size();
131  }
132  else if( objtype == EVTColContainer::PHOTON && photons != 0 )
133  {
134  size = photons->size();
135  }
136  else if( objtype == EVTColContainer::CALOMET && caloMETs != 0 )
137  {
138  size = caloMETs->size();
139  }
140  else if( objtype == EVTColContainer::PFTAU && pfTaus != 0 )
141  {
142  size = pfTaus->size();
143  }
144  /*else if( objtype == EVTColContainer::TRACK && tracks != 0 )
145  {
146  size = tracks->size();
147  }*/
148 
149  return size;
150  }
const std::vector< reco::Muon > * muons
const std::vector< reco::CaloMET > * caloMETs
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::GsfElectron > * electrons
tuple size
Write out results.
const unsigned int EVTColContainer::getSize ( const unsigned int &  objtype) const
inline

Get size of collections.

Definition at line 126 of file EVTColContainer.cc.

References ELEC, electrons, JET, jets, MUON, muons, PFMET, pfMETs, PFTAU, pfTaus, PHOTON, photons, and findQualityFiles::size.

127  {
128  unsigned int size = 0;
129  if (objtype == EVTColContainer::MUON && muons != 0) {
130  size = muons->size();
131  } else if (objtype == EVTColContainer::ELEC && electrons != 0) {
132  size = electrons->size();
133  } else if (objtype == EVTColContainer::PHOTON && photons != 0) {
134  size = photons->size();
135  } else if (objtype == EVTColContainer::PFMET && pfMETs != 0) {
136  size = pfMETs->size();
137  } else if (objtype == EVTColContainer::PFTAU && pfTaus != 0) {
138  size = pfTaus->size();
139  } else if (objtype == EVTColContainer::JET && jets != 0) {
140  size = jets->size();
141  }
142 
143  return size;
144  }
const std::vector< reco::Muon > * muons
const std::vector< reco::PFJet > * jets
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::GsfElectron > * electrons
const std::vector< reco::PFMET > * pfMETs
tuple size
Write out results.
static const std::string EVTColContainer::getTypeString ( const unsigned int &  objtype)
inlinestatic

Tranform types into strings.

Definition at line 147 of file EVTColContainer.cc.

References ELEC, JET, MUON, PFMET, PFTAU, PHOTON, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by HLTExoticaPlotter::analyze(), HLTHiggsPlotter::analyze(), HLTHiggsSubAnalysis::analyze(), HLTExoticaSubAnalysis::analyze(), HLTHiggsSubAnalysis::beginRun(), HLTHiggsPlotter::bookHistograms(), HLTHiggsSubAnalysis::bookHistograms(), HLTHiggsSubAnalysis::getObjectsType(), HLTExoticaSubAnalysis::getObjectsType(), HLTExoticaSubAnalysis::HLTExoticaSubAnalysis(), HLTHiggsPlotter::HLTHiggsPlotter(), HLTHiggsSubAnalysis::HLTHiggsSubAnalysis(), HLTExoticaPlotter::plotterBookHistos(), and HLTExoticaSubAnalysis::subAnalysisBookHistos().

148  {
149  std::string objTypestr;
150 
151  if (objtype == EVTColContainer::MUON) {
152  objTypestr = "Mu";
153  } else if (objtype == EVTColContainer::ELEC) {
154  objTypestr = "Ele";
155  } else if (objtype == EVTColContainer::PHOTON) {
156  objTypestr = "Photon";
157  } else if (objtype == EVTColContainer::PFMET) {
158  objTypestr = "MET";
159  } else if (objtype == EVTColContainer::PFTAU) {
160  objTypestr = "PFTau";
161  } else if (objtype == EVTColContainer::JET) {
162  objTypestr = "Jet";
163  } else {
164  edm::LogError("ExoticaValidations") << "EVTColContainer::getTypeString, "
165  << "NOT Implemented error (object type id='" << objtype << "')" << std::endl;;
166  }
167 
168  return objTypestr;
169  }
static std::string EVTColContainer::getTypeString ( const unsigned int &  objtype)
inlinestatic

Definition at line 152 of file EVTColContainer.cc.

References CALOMET, ELEC, MUON, PFTAU, PHOTON, and AlCaHLTBitMon_QueryRunRegistry::string.

153  {
154  std::string objTypestr;
155 
156  if( objtype == EVTColContainer::MUON )
157  {
158  objTypestr = "Mu";
159  }
160  else if( objtype == EVTColContainer::ELEC )
161  {
162  objTypestr = "Ele";
163  }
164  else if( objtype == EVTColContainer::PHOTON )
165  {
166  objTypestr = "Photon";
167  }
168  else if( objtype == EVTColContainer::CALOMET )
169  {
170  objTypestr = "MET";
171  }
172  else if( objtype == EVTColContainer::PFTAU )
173  {
174  objTypestr = "PFTau";
175  }
176  /*else if( objtype == EVTColContainer::TRACK )
177  {
178  // FIXME: decide what to do! Just a patch
179  objTypestr = "TkMu";
180  }*/
181  else
182  {
183  edm::LogError("HiggsValidations") << "EVTColContainer::getTypeString, "
184  << "NOT Implemented error (object type id='" << objtype << "')" << std::endl;;
185  }
186 
187  return objTypestr;
188  }
bool EVTColContainer::isAllInit ( )
inline

Definition at line 69 of file EVTColContainer.cc.

References nInitialized, and nOfCollections.

70  {
71  return (nInitialized == nOfCollections);
72  }
bool EVTColContainer::isAllInit ( )
inline

Definition at line 72 of file EVTColContainer.cc.

References nInitialized, and nOfCollections.

73  {
74  return (nInitialized == nOfCollections);
75  }
bool EVTColContainer::isCommonInit ( )
inline

Definition at line 74 of file EVTColContainer.cc.

Referenced by HLTExoticaSubAnalysis::getHandlesToObjects(), and HLTHiggsSubAnalysis::initobjects().

75  {
76  return false;
77  }
bool EVTColContainer::isCommonInit ( )
inline

Definition at line 77 of file EVTColContainer.cc.

References rawTriggerEvent.

78  {
79  return (rawTriggerEvent != 0);
80  }
const trigger::TriggerEventWithRefs * rawTriggerEvent
void EVTColContainer::reset ( void  )
inline

Reset: clear all collections.

Definition at line 80 of file EVTColContainer.cc.

References electrons, genParticles, jets, muons, nInitialized, pfMETs, pfTaus, photons, and triggerResults.

Referenced by HLTHiggsValidator::analyze(), and HLTExoticaValidator::analyze().

81  {
82  nInitialized = 0;
83  genParticles = 0;
84  muons = 0;
85  electrons = 0;
86  photons = 0;
87  pfMETs = 0;
88  pfTaus = 0;
89  jets = 0;
90  triggerResults = 0;
91  }
const std::vector< reco::Muon > * muons
const std::vector< reco::PFJet > * jets
const reco::GenParticleCollection * genParticles
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::GsfElectron > * electrons
const std::vector< reco::PFMET > * pfMETs
const edm::TriggerResults * triggerResults
void EVTColContainer::reset ( void  )
inline

Definition at line 82 of file EVTColContainer.cc.

References caloMETs, electrons, genParticles, muons, nInitialized, pfTaus, photons, rawTriggerEvent, and triggerResults.

83  {
84  nInitialized = 0;
85  genParticles = 0;
86  muons = 0; electrons = 0; photons = 0; pfTaus=0; caloMETs=0; //tracks=0;
87  rawTriggerEvent = 0;
88  triggerResults = 0;
89  }
const std::vector< reco::Muon > * muons
const trigger::TriggerEventWithRefs * rawTriggerEvent
const std::vector< reco::CaloMET > * caloMETs
const reco::GenParticleCollection * genParticles
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::GsfElectron > * electrons
const edm::TriggerResults * triggerResults
void EVTColContainer::set ( const reco::MuonCollection v)
inline

Setter: multiple overloaded function.

Definition at line 91 of file EVTColContainer.cc.

References muons, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

92  {
93  muons = v;
94  ++nInitialized;
95  }
const std::vector< reco::Muon > * muons
void EVTColContainer::set ( const reco::MuonCollection v)
inline

Setter: multiple overloaded function.

Definition at line 94 of file EVTColContainer.cc.

References muons, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral(), HLTExoticaSubAnalysis::getHandlesToObjects(), and HLTHiggsSubAnalysis::initobjects().

95  {
96  muons = v;
97  ++nInitialized;
98  }
const std::vector< reco::Muon > * muons
void EVTColContainer::set ( const reco::GsfElectronCollection v)
inline

Definition at line 96 of file EVTColContainer.cc.

References electrons, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

97  {
98  electrons = v;
99  ++nInitialized;
100  }
const std::vector< reco::GsfElectron > * electrons
void EVTColContainer::set ( const reco::GsfElectronCollection v)
inline

Definition at line 99 of file EVTColContainer.cc.

References electrons, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

100  {
101  electrons = v;
102  ++nInitialized;
103  }
const std::vector< reco::GsfElectron > * electrons
void EVTColContainer::set ( const reco::PhotonCollection v)
inline

Definition at line 101 of file EVTColContainer.cc.

References nInitialized, photons, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

102  {
103  photons = v;
104  ++nInitialized;
105  }
const std::vector< reco::Photon > * photons
void EVTColContainer::set ( const reco::PhotonCollection v)
inline

Definition at line 104 of file EVTColContainer.cc.

References nInitialized, photons, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

105  {
106  photons = v;
107  ++nInitialized;
108  }
const std::vector< reco::Photon > * photons
void EVTColContainer::set ( const reco::CaloMETCollection v)
inline

Definition at line 106 of file EVTColContainer.cc.

References caloMETs, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

107  {
108  caloMETs = v;
109  ++nInitialized;
110  }
const std::vector< reco::CaloMET > * caloMETs
void EVTColContainer::set ( const reco::PFMETCollection v)
inline

Definition at line 109 of file EVTColContainer.cc.

References nInitialized, pfMETs, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

110  {
111  pfMETs = v;
112  ++nInitialized;
113  }
const std::vector< reco::PFMET > * pfMETs
void EVTColContainer::set ( const reco::PFTauCollection v)
inline

Definition at line 111 of file EVTColContainer.cc.

References nInitialized, pfTaus, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

112  {
113  pfTaus = v;
114  ++nInitialized;
115  }
const std::vector< reco::PFTau > * pfTaus
void EVTColContainer::set ( const reco::PFTauCollection v)
inline

Definition at line 114 of file EVTColContainer.cc.

References nInitialized, pfTaus, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

115  {
116  pfTaus = v;
117  ++nInitialized;
118  }
const std::vector< reco::PFTau > * pfTaus
void EVTColContainer::set ( const reco::PFJetCollection v)
inline

Definition at line 119 of file EVTColContainer.cc.

References jets, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

120  {
121  jets = v;
122  ++nInitialized;
123  }
const std::vector< reco::PFJet > * jets

Member Data Documentation

const std::vector<reco::CaloMET>* EVTColContainer::caloMETs

Definition at line 52 of file EVTColContainer.cc.

Referenced by getSize(), HLTHiggsSubAnalysis::insertcandidates(), reset(), and set().

const std::vector< reco::GsfElectron > * EVTColContainer::electrons
const reco::GenParticleCollection * EVTColContainer::genParticles
const std::vector<reco::PFJet>* EVTColContainer::jets

Definition at line 53 of file EVTColContainer.cc.

Referenced by getSize(), HLTExoticaSubAnalysis::insertCandidates(), reset(), and set().

const std::vector< reco::Muon > * EVTColContainer::muons
int EVTColContainer::nInitialized

Definition at line 46 of file EVTColContainer.cc.

Referenced by isAllInit(), reset(), and set().

int EVTColContainer::nOfCollections

Definition at line 45 of file EVTColContainer.cc.

Referenced by isAllInit().

const std::vector<reco::PFMET>* EVTColContainer::pfMETs

Definition at line 51 of file EVTColContainer.cc.

Referenced by getSize(), HLTExoticaSubAnalysis::insertCandidates(), reset(), and set().

const std::vector< reco::PFTau > * EVTColContainer::pfTaus
const std::vector< reco::Photon > * EVTColContainer::photons
const trigger::TriggerEventWithRefs* EVTColContainer::rawTriggerEvent

Definition at line 55 of file EVTColContainer.cc.

Referenced by isCommonInit(), and reset().

const edm::TriggerResults * EVTColContainer::triggerResults