ATLAS Offline Software
Loading...
Searching...
No Matches
TruthParticleBase.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7// TruthParticleBase.h
8// Header file for class TruthParticleBase
9// Author: S.Binet<binet@cern.ch>
11#ifndef MCPARTICLEEVENT_TRUTHPARTICLEBASE_H
12#define MCPARTICLEEVENT_TRUTHPARTICLEBASE_H
13
14// STL includes
15
16// HepMC / CLHEP includes
18
19// Gaudi includes
20
21// EventKernel includes
22#include "EventKernel/IParticle.h" // for {Charge,ParticleDataType::Data}Type
23
24// Navigation includes
26#include "AthLinks/ElementLink.h"
28
29// Forward declaration
30namespace Trk { class RecVertex; }
31namespace Trk { class VxCandidate;}
32
34{
35
37 // Public methods:
39 public:
40
44
48
52
56
60
62 // Const methods:
64
67
72
74 const Trk::RecVertex* origin() const;
75
78
80 bool hasCharge() const;
81
85 ChargeType charge() const;
86
88 bool hasPdgId() const;
89
91 int pdgId() const;
92
94 std::ostream& dump( std::ostream& out ) const;
95
98
101
104
106 // Non-const methods:
108
110 void setCharge( const ChargeType charge );
111
114
117
118 // Set functions (for IParticle) (all dummy)
119 void set_dataType( ParticleDataType::DataType /*x*/ ) {std::abort();}
121 void set_pdgId( int /*x*/ ) {std::abort();}
122 void set_origin( const VxContainer* /*theContainer*/, int /*index*/ )
123 {std::abort();}
124 void set_origin( const VxContainer* /*theContainer*/,
125 const Trk::VxCandidate * /*vertex*/ )
126 {std::abort();}
127
129 // Private data:
131 private:
132
135
138
142
143};
144
146// Inline methods:
148
149inline
154
155inline
157{
158 return true;
159}
160
161inline
163{
164 return m_charge;
165}
166
167inline
169{
170 return true;
171}
172
173inline
175{
176 return m_genParticle->pdg_id();
177}
178
179inline
184
185inline
190
191inline
196
197#endif //> MCPARTICLEEVENT_TRUTHPARTICLEBASE_H
double charge(const T &p)
Definition AtlasPID.h:997
double ChargeType
typedef ChargeType used to anticipate changes here
#define x
Trk::RecVertex inherits from Trk::Vertex.
Definition RecVertex.h:44
void setCharge(const ChargeType charge)
Set the charge of this TruthParticleBase.
void set_dataType(ParticleDataType::DataType)
bool hasPdgId() const
method to check if particle id information is available
AthenaBarCodeImpl & getAthenaBarCodeImpl()
return the (atlas) unique identifier
ParticleDataType::DataType dataType() const
Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the f...
HepMC::ConstGenParticlePtr m_genParticle
The HepMC::GenParticle we are proxying.
const ElementLink< VxContainer > & originLink() const
Return the ElementLink to particle Origin.
AthenaBarCodeImpl m_abc
The AthenaBarCodeImpl held to provide unique identification throughout the whole Atlas EDM.
ChargeType m_charge
The charge of this TruthParticle.
const AthenaBarCodeImpl & getAthenaBarCodeImpl() const
return the (atlas) unique identifier
void set_origin(const VxContainer *, int)
void set_charge(ChargeType x)
int pdgId() const
Return eparticle id.
bool hasCharge() const
method to check if charge information is available
TruthParticleBase & operator=(const TruthParticleBase &rhs)
Assignment operator:
const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin.
ChargeType charge() const
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...
TruthParticleBase()
Default constructor:
HepMC::ConstGenParticlePtr genParticle() const
return the HepMC::GenParticle which is being proxied
void setGenParticle(HepMC::ConstGenParticlePtr particle)
Fill the data members of ParticleBase from the GenParticle.
~TruthParticleBase()
Destructor:
void set_origin(const VxContainer *, const Trk::VxCandidate *)
GenParticle * GenParticlePtr
Definition GenParticle.h:37
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38
Ensure that the ATLAS eigen extensions are properly loaded.
-event-from-file