ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ParticleEvent::Base Class Reference

#include <Base.h>

Collaboration diagram for ParticleEvent::Base:

Public Member Functions

 Base ()
 Default constructor: More...
 
 Base (const Base &rhs)
 Copy constructor: More...
 
Baseoperator= (const Base &rhs)
 Assignment operator: More...
 
virtual ~Base ()
 Constructor with parameters: More...
 
void set_dataType (ParticleDataType::DataType x)
 
void set_charge (ChargeType x)
 
void set_pdgId (int x)
 
void reset_charge ()
 
void reset_pdgId ()
 
void set_origin (const VxContainer *theContainer, int index)
 
void set_origin (const VxContainer *theContainer, const Trk::VxCandidate *vertex)
 
void set_origin (const ElementLink< VxContainer > &origin)
 
AthenaBarCodeImplgetAthenaBarCodeImpl ()
 
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 enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h
More...
 
std::ostream & dump (std::ostream &out) const
 Print IParticle content. More...
 
const AthenaBarCodeImplgetAthenaBarCodeImpl () const
 

Private Attributes

ParticleDataType::DataType m_dataType
 the enum storing the (data) type of this particle More...
 
ElementLink< VxContainerm_origin
 Persistent pointer to the origin of this particle. More...
 
bool m_hasCharge
 Switch to tell if this particle has a charge. More...
 
ChargeType m_charge
 Value of the charge of the particle (this has real meaning, only if hasCharge() returns true) More...
 
bool m_hasPdgId
 Switch to tell if this particle has a PDG Identity. More...
 
int m_pdgId
 Value for the PDG identity (this has real meaning, only if hasPdgId() returns true) More...
 
AthenaBarCodeImpl m_abc
 The AthenaBarCode Part. More...
 

Detailed Description

Definition at line 33 of file Base.h.

Constructor & Destructor Documentation

◆ Base() [1/2]

Base::Base ( )
inline

Default constructor:

Definition at line 163 of file Base.h.

163  :
164  m_dataType ( ),
165  m_origin ( ),
166  m_hasCharge( false ),
167  m_charge ( 0. ),
168  m_hasPdgId ( false ),
169  m_pdgId ( 0 ),
170  m_abc ()
171 {}

◆ Base() [2/2]

Base::Base ( const Base rhs)
inlineexplicit

Copy constructor:

Definition at line 174 of file Base.h.

174  :
175  m_dataType ( rhs.m_dataType ),
176  m_origin ( rhs.m_origin ),
177  m_hasCharge( rhs.m_hasCharge ),
178  m_charge ( rhs.m_charge ),
179  m_hasPdgId ( rhs.m_hasPdgId ),
180  m_pdgId ( rhs.m_pdgId ),
181  m_abc ( rhs.m_abc)
182 {}

◆ ~Base()

Base::~Base ( )
inlinevirtual

Constructor with parameters:

Destructor:

Definition at line 200 of file Base.h.

201 {}

Member Function Documentation

◆ charge()

ChargeType Base::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 224 of file Base.h.

225 {
226  return m_charge;
227 }

◆ dataType()

ParticleDataType::DataType Base::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 204 of file Base.h.

205 {
206  return m_dataType;
207 }

◆ dump()

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

Print IParticle content.

Definition at line 44 of file Base.cxx.

45 {
46  std::stringstream buf;
47  buf << "[dataType] = " << this->dataType() << "\n"
48 
49  << "[charge ] = "
50  << std::setw(5) << std::boolalpha << this->hasCharge()
51  << std::scientific << std::right << std::setw(16) << std::setprecision(8)
52  << this->charge() << "\n"
53 
54  << "[pdg-Id ] = " << std::setw(5) << std::boolalpha << this->hasPdgId()
55  << std::fixed << std::right << std::setw(16) << std::setprecision(8)
56  << this->pdgId() << "\n"
57 
58  << "[origin ] = ";
59  if ( this->origin() ) { this->origin()->dump( buf );
60  } else { buf << " --Null ptr-- ";
61  }
62 
63  this->getAthenaBarCodeImpl().dump(buf);
64 
65  return out << buf.str();
66 }

◆ getAthenaBarCodeImpl() [1/2]

AthenaBarCodeImpl& ParticleEvent::Base::getAthenaBarCodeImpl ( )
inline

Definition at line 115 of file Base.h.

115 {return m_abc;}

◆ getAthenaBarCodeImpl() [2/2]

const AthenaBarCodeImpl& ParticleEvent::Base::getAthenaBarCodeImpl ( ) const
inline

Definition at line 96 of file Base.h.

96 {return m_abc;}

◆ hasCharge()

bool Base::hasCharge ( ) const
inline

method to check if charge information is available

Definition at line 218 of file Base.h.

219 {
220  return m_hasCharge;
221 }

◆ hasPdgId()

bool Base::hasPdgId ( ) const
inline

method to check if particle id information is available

Definition at line 230 of file Base.h.

231 {
232  return m_hasPdgId;
233 }

◆ operator=()

Base & Base::operator= ( const Base rhs)
inline

Assignment operator:

Definition at line 185 of file Base.h.

186 {
187  if ( this != &rhs ) {
188  m_dataType = rhs.m_dataType;
189  m_origin = rhs.m_origin;
190  m_hasCharge = rhs.m_hasCharge;
191  m_charge = rhs.m_charge;
192  m_hasPdgId = rhs.m_hasPdgId;
193  m_pdgId = rhs.m_pdgId;
194  m_abc = rhs.m_abc;
195  }
196  return *this;
197 }

◆ origin()

const Trk::RecVertex * Base::origin ( ) const
inline

Return a RecVertex corresponding to particle Origin

Definition at line 210 of file Base.h.

211 {
212  return (!m_origin.isValid())
213  ? 0
214  : &(**m_origin).recVertex();
215 }

◆ originLink()

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

Return the ElementLink to particle Origin

Definition at line 38 of file Base.cxx.

39 {
40  return m_origin;
41 }

◆ pdgId()

int Base::pdgId ( ) const
inline

Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h

Definition at line 236 of file Base.h.

237 {
238  return m_pdgId;
239 }

◆ reset_charge()

void Base::reset_charge ( )
inline

Definition at line 270 of file Base.h.

271 {
272  m_hasCharge = false;
273 }

◆ reset_pdgId()

void Base::reset_pdgId ( )
inline

Definition at line 277 of file Base.h.

278 {
279  m_hasPdgId = false;
280 }

◆ set_charge()

void Base::set_charge ( ChargeType  x)
inline

Definition at line 254 of file Base.h.

255 {
256  m_charge = x;
257  m_hasCharge = true;
258 }

◆ set_dataType()

void Base::set_dataType ( ParticleDataType::DataType  x)
inline

Definition at line 247 of file Base.h.

248 {
249  m_dataType = x;
250 }

◆ set_origin() [1/3]

void Base::set_origin ( const ElementLink< VxContainer > &  origin)
inline

Definition at line 300 of file Base.h.

301 {
302  m_origin = origin;
303 }

◆ set_origin() [2/3]

void Base::set_origin ( const VxContainer theContainer,
const Trk::VxCandidate vertex 
)
inline

Definition at line 291 of file Base.h.

293 {
295  ((vertex),*theContainer );
296 }

◆ set_origin() [3/3]

void Base::set_origin ( const VxContainer theContainer,
int  index 
)
inline

Definition at line 284 of file Base.h.

285 {
286  m_origin = ElementLink< VxContainer >(*theContainer, index);
287 }

◆ set_pdgId()

void Base::set_pdgId ( int  x)
inline

Definition at line 262 of file Base.h.

263 {
264  m_pdgId = x;
265  m_hasPdgId = true;
266 }

Member Data Documentation

◆ m_abc

AthenaBarCodeImpl ParticleEvent::Base::m_abc
private

The AthenaBarCode Part.

Definition at line 148 of file Base.h.

◆ m_charge

ChargeType ParticleEvent::Base::m_charge
private

Value of the charge of the particle (this has real meaning, only if hasCharge() returns true)

Definition at line 136 of file Base.h.

◆ m_dataType

ParticleDataType::DataType ParticleEvent::Base::m_dataType
private

the enum storing the (data) type of this particle

Definition at line 123 of file Base.h.

◆ m_hasCharge

bool ParticleEvent::Base::m_hasCharge
private

Switch to tell if this particle has a charge.

Definition at line 131 of file Base.h.

◆ m_hasPdgId

bool ParticleEvent::Base::m_hasPdgId
private

Switch to tell if this particle has a PDG Identity.

Definition at line 140 of file Base.h.

◆ m_origin

ElementLink< VxContainer > ParticleEvent::Base::m_origin
private

Persistent pointer to the origin of this particle.

Definition at line 127 of file Base.h.

◆ m_pdgId

int ParticleEvent::Base::m_pdgId
private

Value for the PDG identity (this has real meaning, only if hasPdgId() returns true)

Definition at line 145 of file Base.h.


The documentation for this class was generated from the following files:
ParticleEvent::Base::m_charge
ChargeType m_charge
Value of the charge of the particle (this has real meaning, only if hasCharge() returns true)
Definition: Base.h:136
ParticleEvent::Base::m_hasPdgId
bool m_hasPdgId
Switch to tell if this particle has a PDG Identity.
Definition: Base.h:140
ParticleEvent::Base::m_pdgId
int m_pdgId
Value for the PDG identity (this has real meaning, only if hasPdgId() returns true)
Definition: Base.h:145
index
Definition: index.py:1
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
ParticleEvent::Base::hasCharge
bool hasCharge() const
method to check if charge information is available
Definition: Base.h:218
ParticleEvent::Base::m_hasCharge
bool m_hasCharge
Switch to tell if this particle has a charge.
Definition: Base.h:131
ParticleEvent::Base::charge
ChargeType charge() const
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...
Definition: Base.h:224
x
#define x
ParticleEvent::Base::m_origin
ElementLink< VxContainer > m_origin
Persistent pointer to the origin of this particle.
Definition: Base.h:127
ParticleEvent::Base::m_dataType
ParticleDataType::DataType m_dataType
the enum storing the (data) type of this particle
Definition: Base.h:123
ParticleEvent::Base::pdgId
int pdgId() const
Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg....
Definition: Base.h:236
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
Trk::RecVertex::dump
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition: RecVertex.cxx:56
ParticleEvent::Base::getAthenaBarCodeImpl
const AthenaBarCodeImpl & getAthenaBarCodeImpl() const
Definition: Base.h:96
ParticleEvent::Base::m_abc
AthenaBarCodeImpl m_abc
The AthenaBarCode Part.
Definition: Base.h:148
ParticleEvent::Base::hasPdgId
bool hasPdgId() const
method to check if particle id information is available
Definition: Base.h:230
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
ParticleEvent::Base::dataType
ParticleDataType::DataType dataType() const
Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the f...
Definition: Base.h:204
AthenaBarCodeImpl::dump
std::ostream & dump(std::ostream &out) const
Definition: AthenaBarCodeImpl.cxx:172
ParticleEvent::Base::origin
const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin
Definition: Base.h:210