ATLAS Offline Software
Loading...
Searching...
No Matches
TruthParticleBase Class Reference

#include <TruthParticleBase.h>

Collaboration diagram for TruthParticleBase:

Public Member Functions

 TruthParticleBase ()
 Default constructor:
 TruthParticleBase (const TruthParticleBase &rhs)
 Copy constructor:
TruthParticleBaseoperator= (const TruthParticleBase &rhs)
 Assignment operator:
 TruthParticleBase (const HepMC::GenParticlePtr mc)
 Constructor with parameters:
 ~TruthParticleBase ()
 Destructor:
HepMC::ConstGenParticlePtr genParticle () const
 return the HepMC::GenParticle which is being proxied
const AthenaBarCodeImplgetAthenaBarCodeImpl () const
 return the (atlas) unique identifier
void setCharge (const ChargeType charge)
 Set the charge of this TruthParticleBase.
void setGenParticle (HepMC::ConstGenParticlePtr particle)
 Fill the data members of ParticleBase from the GenParticle.
AthenaBarCodeImplgetAthenaBarCodeImpl ()
 return the (atlas) unique identifier
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}.
const Trk::RecVertexorigin () const
 Return a RecVertex corresponding to particle Origin.
const ElementLink< VxContainer > & originLink () const
 Return the ElementLink to particle Origin.
bool hasCharge () const
 method to check if charge information is available
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
bool hasPdgId () const
 method to check if particle id information is available
int pdgId () const
 Return eparticle id.
std::ostream & dump (std::ostream &out) const
 Print IParticle content.

Private Attributes

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

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{}
HepMC::ConstGenParticlePtr m_genParticle
The HepMC::GenParticle we are proxying.
AthenaBarCodeImpl m_abc
The AthenaBarCodeImpl held to provide unique identification throughout the whole Atlas EDM.
ChargeType m_charge
The charge of this TruthParticle.

◆ 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.

◆ 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}
bool hasPdgId() const
method to check if particle id information is available
ParticleDataType::DataType dataType() const
Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the f...
int pdgId() const
Return eparticle id.
bool hasCharge() const
method to check if charge information is available
ChargeType charge() const
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...

◆ 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}
const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin.

◆ 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);}
#define x
void setCharge(const ChargeType charge)
Set the charge of this TruthParticleBase.

◆ 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{
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 = std::move(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: