CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
TtEventPartons Class Referenceabstract

Common base class for TtFullLepEvtPartons, TtFullHadEvtPartons and TtSemiLepEvtPartons. More...

#include "AnalysisDataFormats/TopObjects/interface/TtEventPartons.h"

Inheritance diagram for TtEventPartons:
TtFullHadEvtPartons TtFullLepEvtPartons TtSemiLepEvtPartons

Public Member Functions

void expand (std::vector< int > &vec) const
 insert dummy index -3 for all partons that were chosen to be ignored More...
 
 TtEventPartons ()=default
 default constructor More...
 
virtual std::vector< const
reco::Candidate * > 
vec (const TtGenEvent &genEvt) const =0
 
virtual ~TtEventPartons ()=default
 default destructor More...
 

Protected Member Functions

reco::CandidatedummyCandidatePtr () const
 return pointer to an empty reco::Candidate More...
 
void prune (std::vector< const reco::Candidate * > &vec) const
 erase partons from vector if they where chosen to be ignored More...
 

Protected Attributes

std::vector< bool > ignorePartons_
 flag partons that were chosen not to be used More...
 

Detailed Description

Common base class for TtFullLepEvtPartons, TtFullHadEvtPartons and TtSemiLepEvtPartons.

Definition at line 19 of file TtEventPartons.h.

Constructor & Destructor Documentation

TtEventPartons::TtEventPartons ( )
default

default constructor

virtual TtEventPartons::~TtEventPartons ( )
virtualdefault

default destructor

Member Function Documentation

reco::Candidate* TtEventPartons::dummyCandidatePtr ( ) const
inlineprotected

return pointer to an empty reco::Candidate

Definition at line 35 of file TtEventPartons.h.

References GenParticle::GenParticle.

Referenced by TtFullHadEvtPartons::vec(), TtSemiLepEvtPartons::vec(), and TtFullLepEvtPartons::vec().

35  {
37  };
math::XYZPoint Point
point in the space
Definition: Particle.h:25
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void TtEventPartons::expand ( std::vector< int > &  vec) const

insert dummy index -3 for all partons that were chosen to be ignored

Definition at line 3 of file TtEventPartons.cc.

References mps_fire::i, and ignorePartons_.

3  {
4  std::vector<int>::iterator vecIter = vec.begin();
5  for (unsigned i = 0; i < ignorePartons_.size(); i++) {
6  if (ignorePartons_[i]) {
7  vecIter = vec.insert(vecIter, -3);
8  }
9  ++vecIter;
10  }
11 }
std::vector< bool > ignorePartons_
flag partons that were chosen not to be used
virtual std::vector< const reco::Candidate * > vec(const TtGenEvent &genEvt) const =0
void TtEventPartons::prune ( std::vector< const reco::Candidate * > &  vec) const
protected

erase partons from vector if they where chosen to be ignored

Definition at line 13 of file TtEventPartons.cc.

References mps_fire::i, and ignorePartons_.

Referenced by dirstructure.Directory::prune(), TtFullLepEvtPartons::vec(), TtSemiLepEvtPartons::vec(), and TtFullHadEvtPartons::vec().

13  {
14  unsigned int nIgnoredPartons = 0;
15  for (unsigned i = 0; i < ignorePartons_.size(); i++) {
16  if (ignorePartons_[i]) {
17  vec.erase(vec.begin() + (i - nIgnoredPartons));
18  nIgnoredPartons++;
19  }
20  }
21 }
std::vector< bool > ignorePartons_
flag partons that were chosen not to be used
virtual std::vector< const reco::Candidate * > vec(const TtGenEvent &genEvt) const =0
virtual std::vector<const reco::Candidate*> TtEventPartons::vec ( const TtGenEvent genEvt) const
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.

Member Data Documentation

std::vector<bool> TtEventPartons::ignorePartons_
protected