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  {
  MUON, ELEC, PHOTON, CALOMET,
  PFTAU, _nMAX
}
 

Public Member Functions

 EVTColContainer ()
 
const unsigned int getSize (const unsigned int &objtype) const
 
bool isAllInit ()
 
bool isCommonInit ()
 
void reset ()
 
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::CaloMETCollection *v)
 
void set (const reco::PFTauCollection *v)
 

Static Public Member Functions

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::Muon > * muons
 
int nInitialized
 
int nOfCollections
 
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

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 33 of file EVTColContainer.cc.

Member Enumeration Documentation

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 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 trigger::TriggerEventWithRefs * rawTriggerEvent
const std::vector< reco::Photon > * photons
const edm::TriggerResults * triggerResults
const std::vector< reco::GsfElectron > * electrons
const reco::GenParticleCollection * genParticles
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Muon > * muons

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::Photon > * photons
const std::vector< reco::CaloMET > * caloMETs
const std::vector< reco::GsfElectron > * electrons
const std::vector< reco::PFTau > * pfTaus
tuple size
Write out results.
const std::vector< reco::Muon > * muons
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.

Referenced by HLTHiggsPlotter::analyze(), HLTHiggsSubAnalysis::analyze(), HLTHiggsPlotter::beginRun(), HLTHiggsSubAnalysis::beginRun(), HLTHiggsSubAnalysis::getObjectsType(), HLTHiggsPlotter::HLTHiggsPlotter(), and HLTHiggsSubAnalysis::HLTHiggsSubAnalysis().

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 72 of file EVTColContainer.cc.

References nInitialized, and nOfCollections.

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

Definition at line 77 of file EVTColContainer.cc.

References rawTriggerEvent.

Referenced by HLTHiggsSubAnalysis::initobjects().

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

Definition at line 82 of file EVTColContainer.cc.

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

Referenced by HLTHiggsValidator::analyze().

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 trigger::TriggerEventWithRefs * rawTriggerEvent
const std::vector< reco::Photon > * photons
const std::vector< reco::CaloMET > * caloMETs
const edm::TriggerResults * triggerResults
const std::vector< reco::GsfElectron > * electrons
const reco::GenParticleCollection * genParticles
const std::vector< reco::PFTau > * pfTaus
const std::vector< reco::Muon > * muons
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(), and HLTHiggsSubAnalysis::initobjects().

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::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::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

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

Definition at line 50 of file EVTColContainer.cc.

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

const reco::GenParticleCollection* EVTColContainer::genParticles
const std::vector<reco::Muon>* EVTColContainer::muons

Definition at line 49 of file EVTColContainer.cc.

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

int EVTColContainer::nInitialized

Definition at line 47 of file EVTColContainer.cc.

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

int EVTColContainer::nOfCollections

Definition at line 46 of file EVTColContainer.cc.

Referenced by isAllInit().

const std::vector<reco::PFTau>* EVTColContainer::pfTaus

Definition at line 53 of file EVTColContainer.cc.

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

const std::vector<reco::Photon>* EVTColContainer::photons

Definition at line 51 of file EVTColContainer.cc.

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

const trigger::TriggerEventWithRefs* EVTColContainer::rawTriggerEvent

Definition at line 55 of file EVTColContainer.cc.

Referenced by isCommonInit(), and reset().

const edm::TriggerResults* EVTColContainer::triggerResults