Classes | Public Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
gar::rec::PFParticle Class Reference

#include <PFParticle.h>

Classes

struct  ParticleIDData
 

Public Member Functions

 PFParticle ()
 
 PFParticle (int type, float energy, float pos[3], float mom[3], float charge, int pdg, float goodness, size_t parent, std::vector< size_t > daughters)
 
 PFParticle (const gar::rec::PFParticle &)=default
 
bool operator== (const PFParticle &rhs) const
 
bool operator!= (const PFParticle &rhs) const
 
gar::rec::IDNumber getIDNumber () const
 
void setType (int type)
 
void setEnergy (float energy)
 
void setPosition (const float pos[3])
 
void setMomentum (const float mom[3])
 
void setMass (float mass)
 
void setCharge (float charge)
 
void setParticleID (int pdg, float goodness)
 
void setParent (size_t parent)
 
void setDaughters (std::vector< size_t > daughters)
 
int Type () const
 
float Energy () const
 
const float * Position () const
 
const float * Momentum () const
 
float Mass () const
 
float Charge () const
 
int Pdg () const
 
float GoodnessOfPdg () const
 
size_t Parent () const
 
const std::vector< size_t > Daughters () const
 
size_t NDaughters () const
 

Private Attributes

gar::rec::IDNumber fIDnumero
 
int fType {0}
 type of the PFParticle More...
 
float fEnergy {0.}
 energy of the PFParticle in GeV More...
 
float fPos [3]
 position of the PFParticle (cluster CoG) More...
 
float fMom [3]
 momentum of the PFParticle in GeV More...
 
float fMass {0}
 mass of the PFParticle More...
 
float fCharge {0}
 charge of the PFParticle More...
 
int fPdg
 PDG of the PFParticle. More...
 
float fGoodness
 Goodness of the PDG of the PFParticle. More...
 
size_t fParent {0}
 Parent of the PFParticle. More...
 
std::vector< size_t > fDaughters
 Daughters of the PFParticle. More...
 

Static Private Attributes

static gar::rec::IDNumber const FirstNumber = 800000
 

Friends

std::ostream & operator<< (std::ostream &o, gar::rec::PFParticle const &h)
 

Detailed Description

Definition at line 21 of file PFParticle.h.

Constructor & Destructor Documentation

gar::rec::PFParticle::PFParticle ( )

Definition at line 8 of file PFParticle.cxx.

9  : fType(0),
10  fEnergy(0.),
11  fMass(0.),
12  fCharge(0.),
13  fPdg(0),
14  fGoodness(0.),
15  fParent(-1),
16  fDaughters(0)
17  {
18  // The default constructor is used e.g. by art::DataViewImpl::getHandle
19  // Make sure all Cluster objects are numbered, lest art deep-copy uninitialized
20  // instances and then operator==() evaluates meaninglessly true.
23 
24  fPos[0] = 0.;
25  fPos[1] = 0.;
26  fPos[2] = 0.;
27 
28  fMom[0] = 0.;
29  fMom[1] = 0.;
30  fMom[2] = 0.;
31 
32  return;
33  }
float fCharge
charge of the PFParticle
Definition: PFParticle.h:45
static gar::rec::IDNumber const FirstNumber
Definition: PFParticle.h:37
float fPos[3]
position of the PFParticle (cluster CoG)
Definition: PFParticle.h:42
gar::rec::IDNumber fIDnumero
Definition: PFParticle.h:38
std::vector< size_t > fDaughters
Daughters of the PFParticle.
Definition: PFParticle.h:49
int fPdg
PDG of the PFParticle.
Definition: PFParticle.h:46
static IDNumberGen * create(IDNumber iniValue=std::numeric_limits< IDNumber >::max())
Definition: IDNumberGen.cxx:18
float fMass
mass of the PFParticle
Definition: PFParticle.h:44
float fGoodness
Goodness of the PDG of the PFParticle.
Definition: PFParticle.h:47
float fMom[3]
momentum of the PFParticle in GeV
Definition: PFParticle.h:43
float fEnergy
energy of the PFParticle in GeV
Definition: PFParticle.h:41
int fType
type of the PFParticle
Definition: PFParticle.h:40
size_t fParent
Parent of the PFParticle.
Definition: PFParticle.h:48
gar::rec::PFParticle::PFParticle ( int  type,
float  energy,
float  pos[3],
float  mom[3],
float  charge,
int  pdg,
float  goodness,
size_t  parent,
std::vector< size_t >  daughters 
)

Definition at line 36 of file PFParticle.cxx.

37  : fType(type),
38  fEnergy(energy),
39  fMass(0.),
40  fCharge(charge),
41  fPdg(pdg),
42  fGoodness(goodness),
43  fParent(parent),
44  fDaughters(daughters)
45  {
46  fPos[0] = pos[0];
47  fPos[1] = pos[1];
48  fPos[2] = pos[2];
49 
50  fMom[0] = mom[0];
51  fMom[1] = mom[1];
52  fMom[2] = mom[2];
53  }
float fCharge
charge of the PFParticle
Definition: PFParticle.h:45
float fPos[3]
position of the PFParticle (cluster CoG)
Definition: PFParticle.h:42
std::vector< size_t > fDaughters
Daughters of the PFParticle.
Definition: PFParticle.h:49
int fPdg
PDG of the PFParticle.
Definition: PFParticle.h:46
float fMass
mass of the PFParticle
Definition: PFParticle.h:44
float fGoodness
Goodness of the PDG of the PFParticle.
Definition: PFParticle.h:47
float fMom[3]
momentum of the PFParticle in GeV
Definition: PFParticle.h:43
float fEnergy
energy of the PFParticle in GeV
Definition: PFParticle.h:41
int fType
type of the PFParticle
Definition: PFParticle.h:40
size_t fParent
Parent of the PFParticle.
Definition: PFParticle.h:48
def parent(G, child, parent_type)
Definition: graph.py:67
gar::rec::PFParticle::PFParticle ( const gar::rec::PFParticle )
default

Member Function Documentation

float gar::rec::PFParticle::Charge ( ) const
inline

Definition at line 95 of file PFParticle.h.

95 { return fCharge; }
float fCharge
charge of the PFParticle
Definition: PFParticle.h:45
const std::vector< size_t > gar::rec::PFParticle::Daughters ( ) const
inline

Definition at line 99 of file PFParticle.h.

99 { return fDaughters; }
std::vector< size_t > fDaughters
Daughters of the PFParticle.
Definition: PFParticle.h:49
float gar::rec::PFParticle::Energy ( ) const
inline

Definition at line 91 of file PFParticle.h.

91 { return fEnergy; }
float fEnergy
energy of the PFParticle in GeV
Definition: PFParticle.h:41
gar::rec::IDNumber gar::rec::PFParticle::getIDNumber ( ) const

Definition at line 139 of file PFParticle.cxx.

139 { return fIDnumero; }
gar::rec::IDNumber fIDnumero
Definition: PFParticle.h:38
float gar::rec::PFParticle::GoodnessOfPdg ( ) const
inline

Definition at line 97 of file PFParticle.h.

97 { return fGoodness; }
float fGoodness
Goodness of the PDG of the PFParticle.
Definition: PFParticle.h:47
float gar::rec::PFParticle::Mass ( ) const
inline

Definition at line 94 of file PFParticle.h.

94 { return fMass; }
float fMass
mass of the PFParticle
Definition: PFParticle.h:44
const float * gar::rec::PFParticle::Momentum ( ) const
inline

Definition at line 93 of file PFParticle.h.

93 { return &fMom[0]; }
float fMom[3]
momentum of the PFParticle in GeV
Definition: PFParticle.h:43
size_t gar::rec::PFParticle::NDaughters ( ) const
inline

Definition at line 100 of file PFParticle.h.

100 { return fDaughters.size(); }
std::vector< size_t > fDaughters
Daughters of the PFParticle.
Definition: PFParticle.h:49
bool gar::rec::PFParticle::operator!= ( const PFParticle rhs) const

Definition at line 135 of file PFParticle.cxx.

135  {
136  return (this->fIDnumero != rhs.fIDnumero);
137  }
gar::rec::IDNumber fIDnumero
Definition: PFParticle.h:38
bool gar::rec::PFParticle::operator== ( const PFParticle rhs) const

Definition at line 131 of file PFParticle.cxx.

131  {
132  return (this->fIDnumero == rhs.fIDnumero);
133  }
gar::rec::IDNumber fIDnumero
Definition: PFParticle.h:38
size_t gar::rec::PFParticle::Parent ( ) const
inline

Definition at line 98 of file PFParticle.h.

98 { return fParent; }
size_t fParent
Parent of the PFParticle.
Definition: PFParticle.h:48
int gar::rec::PFParticle::Pdg ( ) const
inline

Definition at line 96 of file PFParticle.h.

96 { return fPdg; }
int fPdg
PDG of the PFParticle.
Definition: PFParticle.h:46
const float * gar::rec::PFParticle::Position ( ) const
inline

Definition at line 92 of file PFParticle.h.

92 { return &fPos[0]; }
float fPos[3]
position of the PFParticle (cluster CoG)
Definition: PFParticle.h:42
void gar::rec::PFParticle::setCharge ( float  charge)

Definition at line 85 of file PFParticle.cxx.

85  {
86  fCharge = charge;
87  }
float fCharge
charge of the PFParticle
Definition: PFParticle.h:45
void gar::rec::PFParticle::setDaughters ( std::vector< size_t >  daughters)

Definition at line 101 of file PFParticle.cxx.

101  {
102  fDaughters = daughters;
103  }
std::vector< size_t > fDaughters
Daughters of the PFParticle.
Definition: PFParticle.h:49
void gar::rec::PFParticle::setEnergy ( float  energy)

Definition at line 61 of file PFParticle.cxx.

61  {
62  fEnergy = energy;
63  }
float fEnergy
energy of the PFParticle in GeV
Definition: PFParticle.h:41
void gar::rec::PFParticle::setMass ( float  mass)

Definition at line 80 of file PFParticle.cxx.

80  {
81  fMass = mass;
82  }
float fMass
mass of the PFParticle
Definition: PFParticle.h:44
void gar::rec::PFParticle::setMomentum ( const float  mom[3])

Definition at line 73 of file PFParticle.cxx.

73  {
74  fMom[0] = mom[0];
75  fMom[1] = mom[1];
76  fMom[2] = mom[2];
77  }
float fMom[3]
momentum of the PFParticle in GeV
Definition: PFParticle.h:43
void gar::rec::PFParticle::setParent ( size_t  parent)

Definition at line 96 of file PFParticle.cxx.

96  {
97  fParent = parent;
98  }
size_t fParent
Parent of the PFParticle.
Definition: PFParticle.h:48
def parent(G, child, parent_type)
Definition: graph.py:67
void gar::rec::PFParticle::setParticleID ( int  pdg,
float  goodness 
)

Definition at line 90 of file PFParticle.cxx.

90  {
91  fPdg = pdg;
92  fGoodness = goodness;
93  }
int fPdg
PDG of the PFParticle.
Definition: PFParticle.h:46
float fGoodness
Goodness of the PDG of the PFParticle.
Definition: PFParticle.h:47
void gar::rec::PFParticle::setPosition ( const float  pos[3])

Definition at line 66 of file PFParticle.cxx.

66  {
67  fPos[0] = pos[0];
68  fPos[1] = pos[1];
69  fPos[2] = pos[2];
70  }
float fPos[3]
position of the PFParticle (cluster CoG)
Definition: PFParticle.h:42
void gar::rec::PFParticle::setType ( int  type)

Definition at line 56 of file PFParticle.cxx.

56  {
57  fType = type;
58  }
int fType
type of the PFParticle
Definition: PFParticle.h:40
static QCString type
Definition: declinfo.cpp:672
int gar::rec::PFParticle::Type ( ) const
inline

Definition at line 90 of file PFParticle.h.

90 { return fType; }
int fType
type of the PFParticle
Definition: PFParticle.h:40

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
gar::rec::PFParticle const &  h 
)
friend

Definition at line 106 of file PFParticle.cxx.

107  {
108  o << "Reconstructed Particle "
109  << "\n\tType = "
110  << h.Type()
111  << "\n\tEnergy = "
112  << h.Energy()
113  << "\n\tMomentum = "
114  << h.Momentum()[0] << ", " << h.Momentum()[1] << ", " << h.Momentum()[2] << ")"
115  << "\n\tPID = "
116  << h.Pdg() << ", goodness " << h.GoodnessOfPdg()
117  << "\n\tMass = "
118  << h.Mass()
119  << "\n\tID number = "
120  << h.getIDNumber()
121  << "\n\tPosition = "
122  << h.Position()[0] << ", " << h.Position()[1] << ", " << h.Position()[2] << ")";
123 
124  return o;
125  }

Member Data Documentation

float gar::rec::PFParticle::fCharge {0}
private

charge of the PFParticle

Definition at line 45 of file PFParticle.h.

std::vector<size_t> gar::rec::PFParticle::fDaughters
private

Daughters of the PFParticle.

Definition at line 49 of file PFParticle.h.

float gar::rec::PFParticle::fEnergy {0.}
private

energy of the PFParticle in GeV

Definition at line 41 of file PFParticle.h.

float gar::rec::PFParticle::fGoodness
private

Goodness of the PDG of the PFParticle.

Definition at line 47 of file PFParticle.h.

gar::rec::IDNumber gar::rec::PFParticle::fIDnumero
private

Definition at line 38 of file PFParticle.h.

gar::rec::IDNumber const gar::rec::PFParticle::FirstNumber = 800000
staticprivate

Definition at line 37 of file PFParticle.h.

float gar::rec::PFParticle::fMass {0}
private

mass of the PFParticle

Definition at line 44 of file PFParticle.h.

float gar::rec::PFParticle::fMom[3]
private

momentum of the PFParticle in GeV

Definition at line 43 of file PFParticle.h.

size_t gar::rec::PFParticle::fParent {0}
private

Parent of the PFParticle.

Definition at line 48 of file PFParticle.h.

int gar::rec::PFParticle::fPdg
private

PDG of the PFParticle.

Definition at line 46 of file PFParticle.h.

float gar::rec::PFParticle::fPos[3]
private

position of the PFParticle (cluster CoG)

Definition at line 42 of file PFParticle.h.

int gar::rec::PFParticle::fType {0}
private

type of the PFParticle

Definition at line 40 of file PFParticle.h.


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