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

Date:
2012/03/23 11:50:56
Revision:
1.7
Author
J. Duarte Campderros

Definition at line 35 of file EVTColContainer.cc.

Member Enumeration Documentation

anonymous enum
Enumerator
MUON 
ELEC 
PHOTON 
CALOMET 
PFTAU 
_nMAX 

Definition at line 37 of file EVTColContainer.cc.

Constructor & Destructor Documentation

EVTColContainer::EVTColContainer ( )
inline

Definition at line 59 of file EVTColContainer.cc.

59  :
60 // nOfCollections(6),
61  nOfCollections(5),
62  nInitialized(0),
63  genParticles(0),
64  muons(0),
65  electrons(0),
66  photons(0),
67  pfTaus(0),
68  //tracks(0),
69  rawTriggerEvent(0),
71  {
72  }
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 123 of file EVTColContainer.cc.

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

124  {
125  unsigned int size = 0;
126  if( objtype == EVTColContainer::MUON && muons != 0 )
127  {
128  size = muons->size();
129  }
130  else if( objtype == EVTColContainer::ELEC && electrons != 0 )
131  {
132  size = electrons->size();
133  }
134  else if( objtype == EVTColContainer::PHOTON && photons != 0 )
135  {
136  size = photons->size();
137  }
138  else if( objtype == EVTColContainer::CALOMET && caloMETs != 0 )
139  {
140  size = caloMETs->size();
141  }
142  else if( objtype == EVTColContainer::PFTAU && pfTaus != 0 )
143  {
144  size = pfTaus->size();
145  }
146  /*else if( objtype == EVTColContainer::TRACK && tracks != 0 )
147  {
148  size = tracks->size();
149  }*/
150 
151  return size;
152  }
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 154 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().

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

Definition at line 74 of file EVTColContainer.cc.

References nInitialized, and nOfCollections.

75  {
76  return (nInitialized == nOfCollections);
77  }
bool EVTColContainer::isCommonInit ( )
inline

Definition at line 79 of file EVTColContainer.cc.

References rawTriggerEvent.

Referenced by HLTHiggsSubAnalysis::initobjects().

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

Definition at line 84 of file EVTColContainer.cc.

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

Referenced by HLTHiggsValidator::analyze().

85  {
86  nInitialized = 0;
87  genParticles = 0;
88  muons = 0; electrons = 0; photons = 0; pfTaus=0; caloMETs=0; //tracks=0;
89  rawTriggerEvent = 0;
90  triggerResults = 0;
91  }
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 93 of file EVTColContainer.cc.

References muons, nInitialized, and findQualityFiles::v.

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

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

Definition at line 98 of file EVTColContainer.cc.

References electrons, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

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

Definition at line 103 of file EVTColContainer.cc.

References nInitialized, photons, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

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

Definition at line 108 of file EVTColContainer.cc.

References caloMETs, nInitialized, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

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

Definition at line 113 of file EVTColContainer.cc.

References nInitialized, pfTaus, and findQualityFiles::v.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

114  {
115  pfTaus = v;
116  ++nInitialized;
117  }
const std::vector< reco::PFTau > * pfTaus

Member Data Documentation

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

Definition at line 54 of file EVTColContainer.cc.

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

const std::vector<reco::GsfElectron>* EVTColContainer::electrons

Definition at line 52 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 51 of file EVTColContainer.cc.

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

int EVTColContainer::nInitialized

Definition at line 49 of file EVTColContainer.cc.

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

int EVTColContainer::nOfCollections

Definition at line 48 of file EVTColContainer.cc.

Referenced by isAllInit().

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

Definition at line 55 of file EVTColContainer.cc.

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

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

Definition at line 53 of file EVTColContainer.cc.

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

const trigger::TriggerEventWithRefs* EVTColContainer::rawTriggerEvent

Definition at line 57 of file EVTColContainer.cc.

Referenced by isCommonInit(), and reset().

const edm::TriggerResults* EVTColContainer::triggerResults