ATLAS Offline Software
Loading...
Searching...
No Matches
MDTSimHit.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 MUONSIMEVENT_MDTSIMHIT_H
6#define MUONSIMEVENT_MDTSIMHIT_H 1
7
10
11#include <string>
12
13//---------------------
14// back to the situation of tag MuonSimEvent-00-00-25 to avoid
15// uncompatibility between 8.0.2 and 8.2.0 ----->
16// redundant time methods are present (globalTime() and meanTime() return the
17// same time) --->NOT TO BE FIXED!!<----
18
19typedef int HitID;
20
21class MDTSimHit final{
22public:
23 //
24 // construction/destruction
25 //
26 // needed by athenaRoot
27 MDTSimHit();
28
29 // Destructor:
31
32 MDTSimHit(HitID id, double time, double radius,
33 const Amg::Vector3D& position);
34 MDTSimHit(HitID id, double time, double radius,
35 const Amg::Vector3D& position, const int truthBarcode);
36 MDTSimHit(HitID id, double time, double radius,
37 const Amg::Vector3D& position, const int truthBarcode,
38 const double stepLength, const double energyDeposit,
39 const int particleEncoding, const double kineticEnergy);
40 MDTSimHit(HitID id, double time, double radius,
41 const Amg::Vector3D& position, const HepMcParticleLink& hmpl,
42 const double stepLength, const double energyDeposit,
43 const int particleEncoding, const double kineticEnergy);
44
45 //
46 // member functions
47 //
48 double globalTime() const { return (double) m_globalTime; }
49 void setGlobalTime( double time ) { m_globalTime = time; }
50
51 double driftRadius() const { return (double) m_driftRadius; }
52 void setDriftRadius( double radius ) { m_driftRadius = radius; } // Need to adjust this when applyin deformations during digitization
53
54 const Amg::Vector3D& localPosition() const { return m_localPosition; }
55 void setLocalPosition( Amg::Vector3D& localPosition ) { m_localPosition = localPosition; } // Need to adjust this when applyin deformations during digitization
56
57 double stepLength() const { return static_cast<double>(m_stepLength); }
58 double energyDeposit() const { return static_cast<double>(m_energyDeposit); }
59 int particleEncoding() const { return m_particleEncoding; }
60 double kineticEnergy() const { return static_cast<double>(m_kineticEnergy); }
61
62 HitID MDTid() const { return m_MDTid; }
63 std::string print() const;
64 bool operator< (const MDTSimHit& rhs) const
65 { return m_MDTid < rhs.m_MDTid; }
66 double meanTime() const;
67
68 // truth barcode of the track which released this energy:
69 int truthBarcode() const;
70
71 // GenParticle::id of the track which released this energy:
72 int truthID() const;
73
74 // link to the particle generating the hit
75 const HepMcParticleLink& particleLink() const;
76
77
78private:
79 //
80 // member data
81 //
87
89 float m_energyDeposit; //Geant4 de/dx
90 int m_particleEncoding; // PDG id
91 float m_kineticEnergy; // kinetic energy of the particle
92
93
94};
95//inline methods
96
97inline double MDTSimHit::meanTime() const
98{ return (double) m_globalTime; }
99
101{ return m_partLink; }
102
103
104// open functions
105
106inline float hitTime(const MDTSimHit& hit)
107{ return (float) hit.meanTime(); }
108
109#endif // MUONSIMEVENT_MDTSIMHIT_H
int HitID
float hitTime(const MDTSimHit &hit)
Definition MDTSimHit.h:106
int m_particleEncoding
Definition MDTSimHit.h:90
int truthID() const
double stepLength() const
Definition MDTSimHit.h:57
HitID m_MDTid
Definition MDTSimHit.h:82
void setLocalPosition(Amg::Vector3D &localPosition)
Definition MDTSimHit.h:55
double kineticEnergy() const
Definition MDTSimHit.h:60
float m_stepLength
Definition MDTSimHit.h:88
const Amg::Vector3D & localPosition() const
Definition MDTSimHit.h:54
int truthBarcode() const
void setDriftRadius(double radius)
Definition MDTSimHit.h:52
bool operator<(const MDTSimHit &rhs) const
Definition MDTSimHit.h:64
double driftRadius() const
Definition MDTSimHit.h:51
float m_driftRadius
Definition MDTSimHit.h:84
HitID MDTid() const
Definition MDTSimHit.h:62
int particleEncoding() const
Definition MDTSimHit.h:59
float m_energyDeposit
Definition MDTSimHit.h:89
HepMcParticleLink m_partLink
Definition MDTSimHit.h:86
float m_kineticEnergy
Definition MDTSimHit.h:91
double meanTime() const
Definition MDTSimHit.h:97
void setGlobalTime(double time)
Definition MDTSimHit.h:49
double energyDeposit() const
Definition MDTSimHit.h:58
const HepMcParticleLink & particleLink() const
Definition MDTSimHit.h:100
std::string print() const
float m_globalTime
Definition MDTSimHit.h:83
double globalTime() const
Definition MDTSimHit.h:48
Amg::Vector3D m_localPosition
Definition MDTSimHit.h:85
Eigen::Matrix< double, 3, 1 > Vector3D