ATLAS Offline Software
Loading...
Searching...
No Matches
ISFParticle.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_EVENT_ISFPARTICLE_H
6#define ISF_EVENT_ISFPARTICLE_H
7
8// Gaudi Kernel
9#include "GaudiKernel/MsgStream.h"
10// Barcode includes
12// ISF include
14#include "ISF_Event/SimSvcID.h"
17// DetectorDescription
19// Amg classes
21// CHLEP classes
22#include "CLHEP/Geometry/Point3D.h"
23#include "CLHEP/Geometry/Vector3D.h"
24// Common classes
26
27namespace ISF {
28
30 typedef std::pair< AtlasDetDescr::AtlasRegion, ISF::SimSvcID > DetRegionSvcIDPair;
32 typedef std::vector< DetRegionSvcIDPair > ParticleHistory;
33
41
43
44 public:
46 ISFParticle() = delete;
47
49 ISFParticle(const Amg::Vector3D& pos,
50 const Amg::Vector3D& mom,
51 double mass,
52 double charge,
53 int pdgCode,
54 int status,
55 double time,
56 const ISFParticle &parent,
57 int id,
59 TruthBinding* truth = nullptr,
60 const HepMcParticleLink * partLink = nullptr );
61
63 ISFParticle(const HepGeom::Point3D<double>& pos,
64 const HepGeom::Vector3D<double>& mom,
65 double mass,
66 double charge,
67 int pdgCode,
68 int status,
69 double time,
70 const ISFParticle &parent,
71 int id,
73 TruthBinding* truth = nullptr,
74 const HepMcParticleLink * partLink = nullptr );
75
77 ISFParticle(const Amg::Vector3D& pos,
78 const Amg::Vector3D& mom,
79 double mass,
80 double charge,
81 int pdgCode,
82 int status,
83 double time,
84 const DetRegionSvcIDPair &origin,
85 int id,
87 TruthBinding* truth = nullptr,
88 const HepMcParticleLink * partLink = nullptr );
89
91 ISFParticle(const ISFParticle& isfp);
92
95
98
100 ISFParticle& operator=(const ISFParticle& rhs);
101
104
106 bool operator==(const ISFParticle& rhs) const;
107 bool isEqual(const ISFParticle& rhs) const;
108 bool isIdent(const ISFParticle& rhs) const;
109
111 const Amg::Vector3D& momentum() const;
112
114 const Amg::Vector3D& position() const;
115
118
121
123 double mass() const;
124
126 double charge() const;
127
129 double timeStamp() const;
130
132 int pdgCode() const;
133
135 double ekin() const;
136
138 const ParticleHistory& history() const;
155
157 int barcode() const; // FIXME barcode-based
159 void setBarcode(int bc); // FIXME barcode-based
160
162 int id() const;
164 void setId(int id);
165
170
172 inline const HepMcParticleLink* getParticleLink() const {return m_partLink;};
173 inline void setParticleLink(const HepMcParticleLink* partLink) {m_partLink=partLink;};
174
178
183
185 MsgStream& dump(MsgStream& out) const;
186 std::ostream& dump(std::ostream& out) const;
187
188 void setStatus(int a) { m_status=a; }
189 int status() const { return m_status;}
190
191 private :
194 double m_mass;
195 double m_charge;
198 double m_tstamp;
201 int m_uid;
206 };
207
208 // Overload of << operator for MsgStream for debug output
209 //
210 inline MsgStream& operator << ( MsgStream& sl, const ISF::ISFParticle& isfp) { isfp.dump(sl); return sl; }
211 inline std::ostream& operator << ( std::ostream& sl, const ISF::ISFParticle& isfp) { isfp.dump(sl); return sl; }
212
213} // end of namespace
214
215/* implementation for inlined methods */
217
218#endif // ISF_EVENT_ISFPARTICLE_H
static Double_t a
The generic ISF particle definition,.
Definition ISFParticle.h:42
SimSvcID originSimID() const
the simulation service the particle originates from
TruthBinding * m_truth
< unique ID
const TruthBinding * getTruthBinding() const
pointer to the simulation truth - optional, can be 0
Amg::Vector3D m_momentum
ParticleOrder m_order
particle simulation order
AtlasDetDescr::AtlasRegion prevGeoID() const
previous geoID that the particle was simulated in
std::ostream & dump(std::ostream &out) const
int barcode() const
the barcode
double charge() const
charge of the particle
const HepMcParticleLink * getParticleLink() const
HepMcParticleLink accessors.
int id() const
unique ID
void setNextSimID(SimSvcID simID)
register the next SimSvcID
void setUserInformation(ParticleUserInformation *userInfo)
void updatePosition(const Amg::Vector3D &position)
Update the position of the ISFParticle.
~ISFParticle()
Destructor.
const HepMcParticleLink * m_partLink
MsgStream & dump(MsgStream &out) const
Dump methods to be used by the overloaded stream operator (inheritance!)
const ParticleUserInformation * getUserInformation() const
get/set ParticleUserInformation
TruthBinding * getTruthBinding()
void setBarcode(int bc)
set a new barcode
Amg::Vector3D m_position
void setOrder(ParticleOrder order)
ISFParticle & operator=(const ISFParticle &rhs)
Assignment operator.
int m_barcode
barcode TODO remove in favour of m_status + m_uid
ISFParticle()=delete
disallow default constructor
ParticleOrder getOrder() const
return the particle order (eg used to assure ID->Calo->MS simulation order)
const ParticleHistory & history() const
the particle's full history
double ekin() const
Kinetic energy.
bool isEqual(const ISFParticle &rhs) const
ParticleHistory m_history
bool isIdent(const ISFParticle &rhs) const
void setId(int id)
set a new unique ID
void setStatus(int a)
const Amg::Vector3D & momentum() const
The current momentum vector of the ISFParticle.
SimSvcID nextSimID() const
the next simulation service the particle will be sent to
void setNextGeoID(AtlasDetDescr::AtlasRegion geoID)
register the next AtlasDetDescr::AtlasRegion
void setParticleLink(const HepMcParticleLink *partLink)
AtlasDetDescr::AtlasRegion originGeoID() const
the sub-detector ID the particle's originates from
double timeStamp() const
Timestamp of the ISFParticle.
ParticleUserInformation * m_userInfo
user information stored with the ISFParticle
bool operator==(const ISFParticle &rhs) const
Comparisons.
const Amg::Vector3D & position() const
The current position of the ISFParticle.
int pdgCode() const
PDG value.
double mass() const
mass of the particle
ParticleUserInformation * getUserInformation()
SimSvcID prevSimID() const
the simulation service that previously treated this particle
int status() const
AtlasDetDescr::AtlasRegion nextGeoID() const
next geoID the particle will be simulated in
void updateMomentum(const Amg::Vector3D &momentum)
Update the momentum of the ISFParticle.
void setTruthBinding(TruthBinding *truth)
Each ISFParticle carries a pointer to this class.
Eigen::Matrix< double, 3, 1 > Vector3D
AtlasRegion
A simple enum of ATLAS regions and sub-detectors.
Definition AtlasRegion.h:21
constexpr int UNDEFINED_ID
ISFParticleOrderedQueue.
std::pair< AtlasDetDescr::AtlasRegion, ISF::SimSvcID > DetRegionSvcIDPair
the datatype to be used to store each individual particle hop
Definition ISFParticle.h:30
std::vector< DetRegionSvcIDPair > ParticleHistory
the container type to be used for the particle hops
Definition ISFParticle.h:32
MsgStream & operator<<(MsgStream &sl, const ISF::ISFParticle &isfp)
uint8_t SimSvcID
Simulation service ID datatype.
Definition SimSvcID.h:28
int ParticleOrder
particle order definition
#define private