DESY Hbb Analysis Framework
Public Member Functions | Private Attributes | List of all members
analysis::tools::GenParticle Class Reference

#include <GenParticle.h>

Inheritance diagram for analysis::tools::GenParticle:
analysis::tools::Candidate

Public Member Functions

void daughter (const int &, const int &)
 
int daughter (const int &n=1)
 
 GenParticle ()
 
 GenParticle (const float &pt, const float &eta, const float &phi, const float &e, const float &q)
 
void higgsDaughter (const bool &higgs_dau)
 
bool higgsDaughter ()
 
void index (const int &)
 
int index ()
 
void mother (const int &, const int &)
 
int mother (const int &n=1)
 
void pdgId (const int &pdgId)
 
int pdgId ()
 
void status (const int &status)
 
int status ()
 
 ~GenParticle ()
 
- Public Member Functions inherited from analysis::tools::Candidate
 Candidate ()
 default constructor More...
 
 Candidate (const float &pt, const float &eta, const float &phi, const float &e, const float &q)
 constructor from 4-momentum information More...
 
 Candidate (const float &px, const float &py, const float &pz)
 constructor from 3-momentum information More...
 
 Candidate (const float &px, const float &py, const float &pz, const float &q)
 constructor from 3-momentum and charge information More...
 
float deltaPhi (const Candidate &) const
 returns the deltaPhi between this and another candidate More...
 
float deltaR (const Candidate &) const
 returns the deltaR between this and another candidate More...
 
float e () const
 returns the energy More...
 
void e (const float &)
 sets the energy More...
 
float eta () const
 returns the pseudorapidity More...
 
float m () const
 returns the mass More...
 
float mass () const
 returns the mass More...
 
const Candidatematched (const std::string &name)
 returns the pointer to the matched candidate object More...
 
const Candidatematched (const std::string &name) const
 returns the pointer to the matched candidate object More...
 
virtual bool matchTo (const std::vector< Candidate > *cands, const std::string &name, const float &deltaR=0.5)
 function to match this candidate to another object from a list of pointers with a name More...
 
virtual bool matchTo (const std::vector< Candidate > *cands, const std::string &name, const float &delta_pT, const float &deltaR)
 
TVector3 p3 () const
 returns the 4-momentum (TVector3) More...
 
TLorentzVector p4 () const
 returns the 4-momentum (TLorentzVector) More...
 
void p4 (const TLorentzVector &)
 sets the 4-momentum (TLorentzVector) More...
 
float phi () const
 returns the azimuthal angle More...
 
float pt () const
 returns the transverse momentum More...
 
float px () const
 returns the x component of the momentum More...
 
void px (const float &)
 sets the x component of the momentum More...
 
float py () const
 returns the y component of the momentum More...
 
void py (const float &)
 sets the y component of the momentum More...
 
float pz () const
 returns the z component of the momentum More...
 
void pz (const float &)
 sets the z component of the momentum More...
 
int q () const
 returns the charge More...
 
void q (const float &)
 sets the charge More...
 
void unmatch (const std::string &)
 unmatch a matched candidate object, i.e. set it to nullptr, useful to remove possible duplicated matching More...
 
virtual ~Candidate ()
 destructor More...
 

Private Attributes

int da_ [2]
 
bool higgs_dau_
 
int indx_
 
int mo_ [2]
 
int pdgid_
 
int status_
 

Additional Inherited Members

- Protected Attributes inherited from analysis::tools::Candidate
std::map< std::string, const Candidate * > matched_
 map of matched candidates More...
 
TLorentzVector p4_
 the 4-momentum More...
 
float q_
 the charge More...
 

Detailed Description

Definition at line 34 of file GenParticle.h.

Constructor & Destructor Documentation

GenParticle::GenParticle ( )

Definition at line 21 of file GenParticle.cc.

21  : Candidate()
22 {
23 }
Candidate()
default constructor
Definition: Candidate.cc:18
GenParticle::GenParticle ( const float &  pt,
const float &  eta,
const float &  phi,
const float &  e,
const float &  q 
)

Definition at line 24 of file GenParticle.cc.

References da_, indx_, and mo_.

24  :
25  Candidate(pt,eta,phi,e,q)
26 {
27  indx_ = -1;
28  mo_[0] = -1;
29  mo_[1] = -1;
30  da_[0] = -1;
31  da_[1] = -1;
32 
33 }
Candidate()
default constructor
Definition: Candidate.cc:18
float eta() const
returns the pseudorapidity
Definition: Candidate.cc:134
float e() const
returns the energy
Definition: Candidate.cc:136
float phi() const
returns the azimuthal angle
Definition: Candidate.cc:135
float pt() const
returns the transverse momentum
Definition: Candidate.cc:133
int q() const
returns the charge
Definition: Candidate.cc:139
GenParticle::~GenParticle ( )

Definition at line 34 of file GenParticle.cc.

35 {
36  // do anything here that needs to be done at desctruction time
37  // (e.g. close files, deallocate resources etc.)
38 }

Member Function Documentation

void analysis::tools::GenParticle::daughter ( const int &  n,
const int &  da 
)
inline

Definition at line 94 of file GenParticle.h.

References da_.

Referenced by analysis::tools::PhysicsObjectTree< Object >::collection().

95  {
96  if ( n < 1 || n > 2 ) { std::cout << "*w* GenParticle has two possible daughters" << std::endl; }
97  else da_[n-1] = da ;
98  }
int analysis::tools::GenParticle::daughter ( const int &  n = 1)
inline

Definition at line 78 of file GenParticle.h.

References da_.

79  {
80  if ( n < 1 || n > 2 ) { std::cout << "*w* GenParticle has two possible daughters" << std::endl; return -1; }
81  return da_[n-1] ;
82  }
void analysis::tools::GenParticle::higgsDaughter ( const bool &  higgs_dau)
inline

Definition at line 86 of file GenParticle.h.

References higgs_dau_.

Referenced by analysis::tools::PhysicsObjectTree< Object >::collection().

86 { higgs_dau_ = higgs_dau; }
bool analysis::tools::GenParticle::higgsDaughter ( )
inline

Definition at line 70 of file GenParticle.h.

References higgs_dau_.

70 { return higgs_dau_; }
void analysis::tools::GenParticle::index ( const int &  indx)
inline

Definition at line 88 of file GenParticle.h.

References indx_.

Referenced by analysis::tools::PhysicsObjectTree< Object >::collection().

88 { indx_ = indx ; }
int analysis::tools::GenParticle::index ( )
inline

Definition at line 72 of file GenParticle.h.

References indx_.

72 { return indx_ ; }
void analysis::tools::GenParticle::mother ( const int &  n,
const int &  mo 
)
inline

Definition at line 89 of file GenParticle.h.

References mo_.

Referenced by analysis::tools::PhysicsObjectTree< Object >::collection().

90  {
91  if ( n < 1 || n > 2 ) { std::cout << "*w* GenParticle has two possible mothers" << std::endl; }
92  else mo_[n-1] = mo ;
93  }
int analysis::tools::GenParticle::mother ( const int &  n = 1)
inline

Definition at line 73 of file GenParticle.h.

References mo_.

74  {
75  if ( n < 1 || n > 2 ) { std::cout << "*w* GenParticle has two possible mothers" << std::endl; return -1; }
76  return mo_[n-1] ;
77  }
void analysis::tools::GenParticle::pdgId ( const int &  pdgId)
inline
int analysis::tools::GenParticle::pdgId ( )
inline

Definition at line 68 of file GenParticle.h.

References pdgid_.

Referenced by pdgId().

68 { return pdgid_ ; }
void analysis::tools::GenParticle::status ( const int &  status)
inline
int analysis::tools::GenParticle::status ( )
inline

Definition at line 69 of file GenParticle.h.

References status_.

Referenced by status().

69 { return status_ ; }

Member Data Documentation

int analysis::tools::GenParticle::da_[2]
private

Definition at line 61 of file GenParticle.h.

Referenced by daughter(), and GenParticle().

bool analysis::tools::GenParticle::higgs_dau_
private

Definition at line 58 of file GenParticle.h.

Referenced by higgsDaughter().

int analysis::tools::GenParticle::indx_
private

Definition at line 59 of file GenParticle.h.

Referenced by GenParticle(), and index().

int analysis::tools::GenParticle::mo_[2]
private

Definition at line 60 of file GenParticle.h.

Referenced by GenParticle(), and mother().

int analysis::tools::GenParticle::pdgid_
private

Definition at line 56 of file GenParticle.h.

Referenced by pdgId().

int analysis::tools::GenParticle::status_
private

Definition at line 57 of file GenParticle.h.

Referenced by status().


The documentation for this class was generated from the following files: