Common base class for TtFullLepEvtPartons, TtFullHadEvtPartons and TtSemiLepEvtPartons. More...
#include <AnalysisDataFormats/TopObjects/interface/TtEventPartons.h>
Public Member Functions | |
void | expand (std::vector< int > &vec) |
insert dummy index -3 for all partons that were chosen to be ignored | |
TtEventPartons () | |
default constructor | |
virtual std::vector< const reco::Candidate * > | vec (const TtGenEvent &genEvt)=0 |
virtual | ~TtEventPartons () |
default destructor | |
Protected Member Functions | |
reco::Candidate * | dummyCandidatePtr () const |
return pointer to an empty reco::Candidate | |
void | prune (std::vector< const reco::Candidate * > &vec) |
erase partons from vector if they where chosen to be ignored | |
Protected Attributes | |
std::vector< bool > | ignorePartons_ |
flag partons that were chosen not to be used |
Common base class for TtFullLepEvtPartons, TtFullHadEvtPartons and TtSemiLepEvtPartons.
Definition at line 17 of file TtEventPartons.h.
TtEventPartons::TtEventPartons | ( | ) | [inline] |
virtual TtEventPartons::~TtEventPartons | ( | ) | [inline, virtual] |
reco::Candidate* TtEventPartons::dummyCandidatePtr | ( | ) | const [inline, protected] |
return pointer to an empty reco::Candidate
Definition at line 36 of file TtEventPartons.h.
References configurableAnalysis::GenParticle.
Referenced by TtSemiLepEvtPartons::vec(), TtFullHadEvtPartons::vec(), and TtFullLepEvtPartons::vec().
{ return new reco::GenParticle(0, reco::Particle::LorentzVector(), reco::Particle::Point(), 0, 0, false); };
void TtEventPartons::expand | ( | std::vector< int > & | vec | ) |
insert dummy index -3 for all partons that were chosen to be ignored
Definition at line 4 of file TtEventPartons.cc.
References i, and ignorePartons_.
{ std::vector<int>::iterator vecIter = vec.begin(); for(unsigned i=0; i<ignorePartons_.size(); i++) { if(ignorePartons_[i]) { vecIter = vec.insert(vecIter, -3); } ++vecIter; } }
void TtEventPartons::prune | ( | std::vector< const reco::Candidate * > & | vec | ) | [protected] |
erase partons from vector if they where chosen to be ignored
Definition at line 16 of file TtEventPartons.cc.
References i, and ignorePartons_.
Referenced by TtSemiLepEvtPartons::vec(), TtFullLepEvtPartons::vec(), and TtFullHadEvtPartons::vec().
{ unsigned int nIgnoredPartons = 0; for(unsigned i=0; i<ignorePartons_.size(); i++) { if(ignorePartons_[i]) { vec.erase(vec.begin()+(i-nIgnoredPartons)); nIgnoredPartons++; } } }
virtual std::vector<const reco::Candidate*> TtEventPartons::vec | ( | const TtGenEvent & | genEvt | ) | [pure virtual] |
return vector of partons in the order defined in the corresponding enum (method implemented in the derived classes)
Implemented in TtFullHadEvtPartons, TtFullLepEvtPartons, and TtSemiLepEvtPartons.
std::vector<bool> TtEventPartons::ignorePartons_ [protected] |
flag partons that were chosen not to be used
Definition at line 42 of file TtEventPartons.h.
Referenced by expand(), prune(), TtFullHadEvtPartons::TtFullHadEvtPartons(), TtFullLepEvtPartons::TtFullLepEvtPartons(), and TtSemiLepEvtPartons::TtSemiLepEvtPartons().