CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

EVTColContainer Class Reference

container with all the objects needed More...

List of all members.

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::GsfElectronCollection *v)
void set (const reco::MuonCollection *v)
 Setter: multiple overloaded function.
void set (const reco::PFTauCollection *v)
void set (const reco::CaloMETCollection *v)
void set (const reco::PhotonCollection *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.

        {
                MUON,
                ELEC,
                PHOTON,
                CALOMET,
                PFTAU,
//              TRACK,
                _nMAX
        };

Constructor & Destructor Documentation

EVTColContainer::EVTColContainer ( ) [inline]

Definition at line 59 of file EVTColContainer.cc.

                         :
//              nOfCollections(6),
                nOfCollections(5),
                nInitialized(0),
                genParticles(0),
                muons(0),
                electrons(0),
                photons(0),
                pfTaus(0),
                //tracks(0),
                rawTriggerEvent(0),
                triggerResults(0)
        {
        }

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.

        {
                unsigned int size = 0;
                if( objtype == EVTColContainer::MUON && muons != 0 )
                {
                        size = muons->size();
                }
                else if( objtype == EVTColContainer::ELEC && electrons != 0 )
                {
                        size = electrons->size();
                }
                else if( objtype == EVTColContainer::PHOTON && photons != 0 )
                {
                        size = photons->size();
                }
                else if( objtype == EVTColContainer::CALOMET && caloMETs != 0 )
                {
                        size = caloMETs->size();
                }
                else if( objtype == EVTColContainer::PFTAU && pfTaus != 0 )
                {
                        size = pfTaus->size();
                }
                /*else if( objtype == EVTColContainer::TRACK && tracks != 0 )
                {
                        size = tracks->size();
                }*/

                return size;
        }
static std::string EVTColContainer::getTypeString ( const unsigned int &  objtype) [inline, static]

Definition at line 154 of file EVTColContainer.cc.

References CALOMET, ELEC, MUON, PFTAU, and PHOTON.

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

        {
                std::string objTypestr;
                
                if( objtype == EVTColContainer::MUON )
                {
                        objTypestr = "Mu";
                }
                else if( objtype == EVTColContainer::ELEC )
                {
                        objTypestr = "Ele";
                }
                else if( objtype == EVTColContainer::PHOTON )
                {
                        objTypestr = "Photon";
                }
                else if( objtype == EVTColContainer::CALOMET )
                {
                        objTypestr = "MET";
                }
                else if( objtype == EVTColContainer::PFTAU )
                {
                        objTypestr = "PFTau";
                }
                /*else if( objtype == EVTColContainer::TRACK )
                {
                        // FIXME: decide what to do! Just a patch
                        objTypestr = "TkMu";
                }*/
                else
                { 
                        edm::LogError("HiggsValidations") << "EVTColContainer::getTypeString, "
                                << "NOT Implemented error (object type id='" << objtype << "')" << std::endl;;
                }
                
                return objTypestr;
        }
bool EVTColContainer::isAllInit ( ) [inline]

Definition at line 74 of file EVTColContainer.cc.

References nInitialized, and nOfCollections.

        {
                return (nInitialized == nOfCollections);
        }
bool EVTColContainer::isCommonInit ( ) [inline]

Definition at line 79 of file EVTColContainer.cc.

References rawTriggerEvent.

Referenced by HLTHiggsSubAnalysis::initobjects().

        {
                return (rawTriggerEvent != 0);
        }
void EVTColContainer::reset ( void  ) [inline]
void EVTColContainer::set ( const reco::PhotonCollection v) [inline]

Definition at line 103 of file EVTColContainer.cc.

References nInitialized, photons, and v.

        {
                photons = v;
                ++nInitialized;
        }
void EVTColContainer::set ( const reco::GsfElectronCollection v) [inline]

Definition at line 98 of file EVTColContainer.cc.

References electrons, nInitialized, and v.

void EVTColContainer::set ( const reco::MuonCollection v) [inline]

Setter: multiple overloaded function.

Definition at line 93 of file EVTColContainer.cc.

References muons, nInitialized, and v.

Referenced by HLTHiggsSubAnalysis::initobjects().

        {
                muons = v;
                ++nInitialized;
        }
void EVTColContainer::set ( const reco::CaloMETCollection v) [inline]

Definition at line 108 of file EVTColContainer.cc.

References caloMETs, nInitialized, and v.

        {
                caloMETs = v;
                ++nInitialized;
        }
void EVTColContainer::set ( const reco::PFTauCollection v) [inline]

Definition at line 113 of file EVTColContainer.cc.

References nInitialized, pfTaus, and v.

        {
                pfTaus = v;
                ++nInitialized;
        }

Member Data Documentation

Definition at line 54 of file EVTColContainer.cc.

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

Definition at line 52 of file EVTColContainer.cc.

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

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

Definition at line 51 of file EVTColContainer.cc.

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

Definition at line 49 of file EVTColContainer.cc.

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

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().

Definition at line 53 of file EVTColContainer.cc.

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

Definition at line 57 of file EVTColContainer.cc.

Referenced by isCommonInit(), and reset().