ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TruthParticleBase Class Reference

#include <TruthParticleBase.h>

Collaboration diagram for TruthParticleBase:

Public Member Functions

 TruthParticleBase ()
 Default constructor: More...
 
 TruthParticleBase (const TruthParticleBase &rhs)
 Copy constructor: More...
 
TruthParticleBaseoperator= (const TruthParticleBase &rhs)
 Assignment operator: More...
 
 TruthParticleBase (const HepMC::GenParticlePtr mc)
 Constructor with parameters: More...
 
 ~TruthParticleBase ()
 Destructor: More...
 
HepMC::ConstGenParticlePtr genParticle () const
 return the HepMC::GenParticle which is being proxied More...
 
const AthenaBarCodeImplgetAthenaBarCodeImpl () const
 return the (atlas) unique identifier More...
 
void setCharge (const ChargeType charge)
 Set the charge of this TruthParticleBase. More...
 
void setGenParticle (HepMC::ConstGenParticlePtr particle)
 Fill the data members of ParticleBase from the GenParticle. More...
 
AthenaBarCodeImplgetAthenaBarCodeImpl ()
 return the (atlas) unique identifier More...
 
void set_dataType (ParticleDataType::DataType)
 
void set_charge (ChargeType x)
 
void set_pdgId (int)
 
void set_origin (const VxContainer *, int)
 
void set_origin (const VxContainer *, const Trk::VxCandidate *)
 
ParticleDataType::DataType dataType () const
 Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the following values: {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4}
More...
 
const Trk::RecVertexorigin () const
 Return a RecVertex corresponding to particle Origin
More...
 
const ElementLink< VxContainer > & originLink () const
 Return the ElementLink to particle Origin
More...
 
bool hasCharge () const
 method to check if charge information is available More...
 
ChargeType charge () const
 returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface
More...
 
bool hasPdgId () const
 method to check if particle id information is available More...
 
int pdgId () const
 Return eparticle id. More...
 
std::ostream & dump (std::ostream &out) const
 Print IParticle content. More...
 

Private Attributes

ChargeType m_charge
 The charge of this TruthParticle. More...
 
HepMC::ConstGenParticlePtr m_genParticle
 The HepMC::GenParticle we are proxying. More...
 
AthenaBarCodeImpl m_abc
 The AthenaBarCodeImpl held to provide unique identification throughout the whole Atlas EDM. More...
 

Detailed Description

Definition at line 33 of file TruthParticleBase.h.

Constructor & Destructor Documentation

◆ TruthParticleBase() [1/3]

TruthParticleBase::TruthParticleBase ( )

Default constructor:

Definition at line 28 of file TruthParticleBase.cxx.

28  :
29  m_charge ( -999. ),
30  m_genParticle( 0 ),
31  m_abc ()
32 {}

◆ TruthParticleBase() [2/3]

TruthParticleBase::TruthParticleBase ( const TruthParticleBase rhs)

Copy constructor:

Definition at line 34 of file TruthParticleBase.cxx.

34  :
35  m_charge ( rhs.m_charge ),
37  m_abc ( rhs.m_abc)
38 {}

◆ TruthParticleBase() [3/3]

TruthParticleBase::TruthParticleBase ( const HepMC::GenParticlePtr  mc)

Constructor with parameters:

Definition at line 51 of file TruthParticleBase.cxx.

51  :
52  m_charge ( -999. ),
53  m_genParticle( mc ),
54  m_abc ()
55 {}

◆ ~TruthParticleBase()

TruthParticleBase::~TruthParticleBase ( )

Destructor:

Definition at line 61 of file TruthParticleBase.cxx.

62 {}

Member Function Documentation

◆ charge()

ChargeType TruthParticleBase::charge ( ) const
inline

returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface

Definition at line 162 of file TruthParticleBase.h.

163 {
164  return m_charge;
165 }

◆ dataType()

ParticleDataType::DataType TruthParticleBase::dataType ( ) const
inline

Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the following values: {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4}

IParticle interface-like declaration

Definition at line 150 of file TruthParticleBase.h.

151 {
152  return ParticleDataType::True;
153 }

◆ dump()

std::ostream & TruthParticleBase::dump ( std::ostream &  out) const

Print IParticle content.

Definition at line 83 of file TruthParticleBase.cxx.

84 {
85  std::stringstream buf;
86  buf << "[dataType] = " << this->dataType() << "\n"
87 
88  << "[charge ] = "
89  << std::setw(5) << std::boolalpha << this->hasCharge()
90  << std::scientific << std::right << std::setw(16) << std::setprecision(8)
91  << this->charge() << "\n"
92 
93  << "[pdg-Id ] = " << std::setw(5) << std::boolalpha << this->hasPdgId()
94  << std::fixed << std::right << std::setw(16) << std::setprecision(8)
95  << this->pdgId() << "\n"
96 
97  << "[origin ] = --Null ptr-- ";
98 
99  out << buf.str();
100 
101  //Dump the AthenaBarCode Part
102  m_abc.dump(out);
103 
104  return out;
105 }

◆ genParticle()

HepMC::ConstGenParticlePtr TruthParticleBase::genParticle ( ) const
inline

return the HepMC::GenParticle which is being proxied

Definition at line 180 of file TruthParticleBase.h.

181 {
182  return m_genParticle;
183 }

◆ getAthenaBarCodeImpl() [1/2]

AthenaBarCodeImpl& TruthParticleBase::getAthenaBarCodeImpl ( )
inline

return the (atlas) unique identifier

Definition at line 116 of file TruthParticleBase.h.

116 {return m_abc;}

◆ getAthenaBarCodeImpl() [2/2]

const AthenaBarCodeImpl& TruthParticleBase::getAthenaBarCodeImpl ( ) const
inline

return the (atlas) unique identifier

Definition at line 103 of file TruthParticleBase.h.

103 {return m_abc;}

◆ hasCharge()

bool TruthParticleBase::hasCharge ( ) const
inline

method to check if charge information is available

Definition at line 156 of file TruthParticleBase.h.

157 {
158  return true;
159 }

◆ hasPdgId()

bool TruthParticleBase::hasPdgId ( ) const
inline

method to check if particle id information is available

Definition at line 168 of file TruthParticleBase.h.

169 {
170  return true;
171 }

◆ operator=()

TruthParticleBase & TruthParticleBase::operator= ( const TruthParticleBase rhs)

Assignment operator:

Definition at line 41 of file TruthParticleBase.cxx.

42 {
43  if ( this != &rhs ) {
44  m_charge = rhs.m_charge;
46  m_abc = rhs.m_abc;
47  }
48  return *this;
49 }

◆ origin()

const Trk::RecVertex * TruthParticleBase::origin ( ) const

Return a RecVertex corresponding to particle Origin

Definition at line 69 of file TruthParticleBase.cxx.

70 {
71  return 0;
72 }

◆ originLink()

const ElementLink< VxContainer > & TruthParticleBase::originLink ( ) const

Return the ElementLink to particle Origin

Definition at line 76 of file TruthParticleBase.cxx.

77 {
78  static const ElementLink<VxContainer> origin;
79  return origin;
80 }

◆ pdgId()

int TruthParticleBase::pdgId ( ) const
inline

Return eparticle id.

Definition at line 174 of file TruthParticleBase.h.

175 {
176  return m_genParticle->pdg_id();
177 }

◆ set_charge()

void TruthParticleBase::set_charge ( ChargeType  x)
inline

Definition at line 120 of file TruthParticleBase.h.

120 {setCharge(x);}

◆ set_dataType()

void TruthParticleBase::set_dataType ( ParticleDataType::DataType  )
inline

Definition at line 119 of file TruthParticleBase.h.

119 {std::abort();}

◆ set_origin() [1/2]

void TruthParticleBase::set_origin ( const VxContainer ,
const Trk::VxCandidate  
)
inline

Definition at line 124 of file TruthParticleBase.h.

126  {std::abort();}

◆ set_origin() [2/2]

void TruthParticleBase::set_origin ( const VxContainer ,
int   
)
inline

Definition at line 122 of file TruthParticleBase.h.

123  {std::abort();}

◆ set_pdgId()

void TruthParticleBase::set_pdgId ( int  )
inline

Definition at line 121 of file TruthParticleBase.h.

121 {std::abort();}

◆ setCharge()

void TruthParticleBase::setCharge ( const ChargeType  charge)
inline

Set the charge of this TruthParticleBase.

Definition at line 186 of file TruthParticleBase.h.

187 {
188  m_charge = charge;
189 }

◆ setGenParticle()

void TruthParticleBase::setGenParticle ( HepMC::ConstGenParticlePtr  particle)
inline

Fill the data members of ParticleBase from the GenParticle.

Definition at line 192 of file TruthParticleBase.h.

193 {
194  m_genParticle = mc;
195 }

Member Data Documentation

◆ m_abc

AthenaBarCodeImpl TruthParticleBase::m_abc
private

The AthenaBarCodeImpl held to provide unique identification throughout the whole Atlas EDM.

Definition at line 141 of file TruthParticleBase.h.

◆ m_charge

ChargeType TruthParticleBase::m_charge
private

The charge of this TruthParticle.

Definition at line 134 of file TruthParticleBase.h.

◆ m_genParticle

HepMC::ConstGenParticlePtr TruthParticleBase::m_genParticle
private

The HepMC::GenParticle we are proxying.

Definition at line 137 of file TruthParticleBase.h.


The documentation for this class was generated from the following files:
TruthParticleBase::m_abc
AthenaBarCodeImpl m_abc
The AthenaBarCodeImpl held to provide unique identification throughout the whole Atlas EDM.
Definition: TruthParticleBase.h:141
TruthParticleBase::hasPdgId
bool hasPdgId() const
method to check if particle id information is available
Definition: TruthParticleBase.h:168
TruthParticleBase::m_genParticle
HepMC::ConstGenParticlePtr m_genParticle
The HepMC::GenParticle we are proxying.
Definition: TruthParticleBase.h:137
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
x
#define x
TruthParticleBase::pdgId
int pdgId() const
Return eparticle id.
Definition: TruthParticleBase.h:174
TruthParticleBase::charge
ChargeType charge() const
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...
Definition: TruthParticleBase.h:162
mc
Definition: mc.PG_single_nu_valid.py:1
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
TruthParticleBase::hasCharge
bool hasCharge() const
method to check if charge information is available
Definition: TruthParticleBase.h:156
TruthParticleBase::origin
const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin
Definition: TruthParticleBase.cxx:69
ParticleDataType::True
@ True
Definition: Event/EventKernel/EventKernel/IParticle.h:36
TruthParticleBase::setCharge
void setCharge(const ChargeType charge)
Set the charge of this TruthParticleBase.
Definition: TruthParticleBase.h:186
TruthParticleBase::dataType
ParticleDataType::DataType dataType() const
Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the f...
Definition: TruthParticleBase.h:150
TruthParticleBase::m_charge
ChargeType m_charge
The charge of this TruthParticle.
Definition: TruthParticleBase.h:134
AthenaBarCodeImpl::dump
std::ostream & dump(std::ostream &out) const
Definition: AthenaBarCodeImpl.cxx:172
covarianceTool.mc
mc
Definition: covarianceTool.py:554