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, MUONTRACK = 130000, PFTAU = 15,
  PHOTON = 22, PFMET = 39, PFJET = 211, CALOJET = 111,
  _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 ()
 
void reset ()
 Reset: clear all collections. More...
 
void set (const reco::MuonCollection *v)
 Setter: multiple overloaded function. More...
 
void set (const reco::GsfElectronCollection *v)
 
void set (const reco::PhotonCollection *v)
 
void set (const reco::MuonCollection *v)
 Setter: multiple overloaded function. More...
 
void set (const reco::CaloMETCollection *v)
 
void set (const reco::TrackCollection *v)
 
void set (const reco::PFTauCollection *v)
 
void set (const reco::GsfElectronCollection *v)
 
void set (const reco::PhotonCollection *v)
 
void set (const reco::PFMETCollection *v)
 
void set (const reco::PFTauCollection *v)
 
void set (const reco::PFJetCollection *v)
 
void set (const reco::CaloJetCollection *v)
 

Static Public Member Functions

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

Public Attributes

const std::vector
< reco::CaloJet > * 
caloJets
 
const std::vector
< reco::CaloMET > * 
caloMETs
 
const std::vector
< reco::GsfElectron > * 
electrons
 
const reco::GenParticleCollectiongenParticles
 
const std::vector< reco::Muon > * muons
 
const std::vector< reco::Track > * muonTracks
 
int nInitialized
 
int nOfCollections
 
const std::vector< reco::PFJet > * pfJets
 
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 36 of file EVTColContainer.cc.

Member Enumeration Documentation

anonymous enum
Enumerator
ELEC 
MUON 
MUONTRACK 
PFTAU 
PHOTON 
PFMET 
PFJET 
CALOJET 
_nMAX 

Definition at line 37 of file EVTColContainer.cc.

37  {
38  ELEC = 11,
39  MUON = 13,
40  MUONTRACK = 130000, //RY
41  PFTAU = 15,
42  PHOTON = 22,
43  PFMET = 39,
44  PFJET = 211,
45  CALOJET = 111, //ND
46  _nMAX
47  };
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 61 of file EVTColContainer.cc.

61  :
62  nOfCollections(6),
63  nInitialized(0),
64  genParticles(0),
65  muons(0),
66  muonTracks(0),
67  electrons(0),
68  photons(0),
69  pfMETs(0),
70  pfTaus(0),
71  pfJets(0),
72  caloJets(0),
74  {
75  }
const std::vector< reco::Muon > * muons
const std::vector< reco::PFJet > * pfJets
const std::vector< reco::CaloJet > * caloJets
const reco::GenParticleCollection * genParticles
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::Track > * muonTracks
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 146 of file EVTColContainer.cc.

References CALOJET, caloJets, ELEC, electrons, MUON, muons, MUONTRACK, muonTracks, PFJET, pfJets, PFMET, pfMETs, PFTAU, pfTaus, PHOTON, photons, and findQualityFiles::size.

147  {
148  unsigned int size = 0;
149  if (objtype == EVTColContainer::MUON && muons != 0) {
150  size = muons->size();
151  } else if (objtype == EVTColContainer::MUONTRACK && muonTracks != 0) {
152  size = muonTracks->size();
153  } else if (objtype == EVTColContainer::ELEC && electrons != 0) {
154  size = electrons->size();
155  } else if (objtype == EVTColContainer::PHOTON && photons != 0) {
156  size = photons->size();
157  } else if (objtype == EVTColContainer::PFMET && pfMETs != 0) {
158  size = pfMETs->size();
159  } else if (objtype == EVTColContainer::PFTAU && pfTaus != 0) {
160  size = pfTaus->size();
161  } else if (objtype == EVTColContainer::PFJET && pfJets != 0) {
162  size = pfJets->size();
163  } else if (objtype == EVTColContainer::CALOJET && caloJets != 0) {
164  size = caloJets->size();
165  }
166 
167  return size;
168  }
const std::vector< reco::Muon > * muons
const std::vector< reco::PFJet > * pfJets
const std::vector< reco::CaloJet > * caloJets
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::Track > * muonTracks
const std::vector< reco::GsfElectron > * electrons
const std::vector< reco::PFMET > * pfMETs
tuple size
Write out results.
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  }
static const std::string EVTColContainer::getTypeString ( const unsigned int &  objtype)
inlinestatic

Tranform types into strings.

Definition at line 171 of file EVTColContainer.cc.

References CALOJET, ELEC, MUON, MUONTRACK, PFJET, 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().

172  {
173  std::string objTypestr;
174 
175  if (objtype == EVTColContainer::MUON) {
176  objTypestr = "Mu";
177  } else if (objtype == EVTColContainer::MUONTRACK) {
178  objTypestr = "refittedStandAloneMuons";
179  } else if (objtype == EVTColContainer::ELEC) {
180  objTypestr = "Ele";
181  } else if (objtype == EVTColContainer::PHOTON) {
182  objTypestr = "Photon";
183  } else if (objtype == EVTColContainer::PFMET) {
184  objTypestr = "PFMET";
185  } else if (objtype == EVTColContainer::PFTAU) {
186  objTypestr = "PFTau";
187  } else if (objtype == EVTColContainer::PFJET) {
188  objTypestr = "PFJet";
189  } else if (objtype == EVTColContainer::CALOJET) {
190  objTypestr = "CaloJet";
191  } else {
192  edm::LogError("ExoticaValidations") << "EVTColContainer::getTypeString, "
193  << "NOT Implemented error (object type id='" << objtype << "')" << std::endl;;
194  }
195 
196  return objTypestr;
197  }
bool EVTColContainer::isAllInit ( )
inline

Definition at line 72 of file EVTColContainer.cc.

References nInitialized, and nOfCollections.

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

Definition at line 77 of file EVTColContainer.cc.

References nInitialized, and nOfCollections.

78  {
79  return (nInitialized == nOfCollections);
80  }
bool EVTColContainer::isCommonInit ( )
inline

Definition at line 77 of file EVTColContainer.cc.

References rawTriggerEvent.

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

Definition at line 82 of file EVTColContainer.cc.

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

83  {
84  return false;
85  }
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::reset ( void  )
inline

Reset: clear all collections.

Definition at line 88 of file EVTColContainer.cc.

References caloJets, electrons, genParticles, muons, muonTracks, nInitialized, pfJets, pfMETs, pfTaus, photons, and triggerResults.

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

89  {
90  nInitialized = 0;
91  genParticles = 0;
92  muons = 0;
93  muonTracks = 0;
94  electrons = 0;
95  photons = 0;
96  pfMETs = 0;
97  pfTaus = 0;
98  pfJets = 0;
99  caloJets = 0;
100  triggerResults = 0;
101  }
const std::vector< reco::Muon > * muons
const std::vector< reco::PFJet > * pfJets
const std::vector< reco::CaloJet > * caloJets
const reco::GenParticleCollection * genParticles
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Photon > * photons
const std::vector< reco::Track > * muonTracks
const std::vector< reco::GsfElectron > * electrons
const std::vector< reco::PFMET > * pfMETs
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::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::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::MuonCollection v)
inline

Setter: multiple overloaded function.

Definition at line 104 of file EVTColContainer.cc.

References muons, nInitialized, and findQualityFiles::v.

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

105  {
106  muons = v;
107  ++nInitialized;
108  }
const std::vector< reco::Muon > * muons
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::TrackCollection v)
inline

Definition at line 109 of file EVTColContainer.cc.

References muonTracks, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

110  {
111  muonTracks = v;
112  ++nInitialized;
113  }
const std::vector< reco::Track > * muonTracks
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::GsfElectronCollection v)
inline

Definition at line 114 of file EVTColContainer.cc.

References electrons, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

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

Definition at line 119 of file EVTColContainer.cc.

References nInitialized, photons, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

120  {
121  photons = v;
122  ++nInitialized;
123  }
const std::vector< reco::Photon > * photons
void EVTColContainer::set ( const reco::PFMETCollection v)
inline

Definition at line 124 of file EVTColContainer.cc.

References nInitialized, pfMETs, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

125  {
126  pfMETs = v;
127  ++nInitialized;
128  }
const std::vector< reco::PFMET > * pfMETs
void EVTColContainer::set ( const reco::PFTauCollection v)
inline

Definition at line 129 of file EVTColContainer.cc.

References nInitialized, pfTaus, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

130  {
131  pfTaus = v;
132  ++nInitialized;
133  }
const std::vector< reco::PFTau > * pfTaus
void EVTColContainer::set ( const reco::PFJetCollection v)
inline

Definition at line 134 of file EVTColContainer.cc.

References nInitialized, pfJets, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

135  {
136  pfJets = v;
137  ++nInitialized;
138  }
const std::vector< reco::PFJet > * pfJets
void EVTColContainer::set ( const reco::CaloJetCollection v)
inline

Definition at line 139 of file EVTColContainer.cc.

References caloJets, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

140  {
141  caloJets = v;
142  ++nInitialized;
143  }
const std::vector< reco::CaloJet > * caloJets

Member Data Documentation

const std::vector<reco::CaloJet>* EVTColContainer::caloJets

Definition at line 59 of file EVTColContainer.cc.

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

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::Muon > * EVTColContainer::muons
const std::vector<reco::Track>* EVTColContainer::muonTracks

Definition at line 53 of file EVTColContainer.cc.

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

int EVTColContainer::nInitialized

Definition at line 50 of file EVTColContainer.cc.

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

int EVTColContainer::nOfCollections

Definition at line 49 of file EVTColContainer.cc.

Referenced by isAllInit().

const std::vector<reco::PFJet>* EVTColContainer::pfJets

Definition at line 58 of file EVTColContainer.cc.

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

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

Definition at line 56 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