ATLAS Offline Software
Loading...
Searching...
No Matches
TRTUncompressedHit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETSIMEVENT_TRTUncompressedHit_h
6#define INDETSIMEVENT_TRTUncompressedHit_h
7
9
11{
12public:
13 TRTUncompressedHit(int hit, int track, int particle,
14 float kinEnergy, float eneDeposit,
15 float preX, float preY, float preZ,
16 float postX, float postY, float postZ,
17 float time);
18 TRTUncompressedHit(int hit, const HepMcParticleLink& partLink, int particle,
19 float kinEnergy, float eneDeposit,
20 float preX, float preY, float preZ,
21 float postX, float postY, float postZ,
22 float time);
23
24 // needed by athenaRoot
26
27 // Destructor:
29
30 //copy c'tor defaulted
32 //Move c'tor defaulted
33 TRTUncompressedHit(TRTUncompressedHit &&) noexcept = default;
34 //assignment defaulted
35 TRTUncompressedHit & operator = (const TRTUncompressedHit &) = default;
36 //move assignment defaulted
37 TRTUncompressedHit & operator = (TRTUncompressedHit &&) noexcept = default;
38
39 bool operator < (const TRTUncompressedHit& obj) const
40 {return m_hitID < obj.m_hitID;}
41
42 int GetHitID() const
43 {return m_hitID;}
44
45 // truth barcode of the track which released this energy:
46 int truthBarcode() const;
47
48 // GenParticle::id of the track which released this energy:
49 int truthID() const;
50
51 // link to the particle generating the hit
52 const HepMcParticleLink& particleLink() const;
53
54
56 {return m_particleEncoding;}
57
58 float GetKineticEnergy() const
59 {return m_kineticEnergy;}
60
61 float GetEnergyDeposit() const
62 {return m_energyDeposit;}
63
64 float GetPreStepX() const
65 {return m_preStepX;}
66
67 float GetPreStepY() const
68 {return m_preStepY;}
69
70 float GetPreStepZ() const
71 {return m_preStepZ;}
72
73 float GetPostStepX() const
74 {return m_postStepX;}
75
76 float GetPostStepY() const
77 {return m_postStepY;}
78
79 float GetPostStepZ() const
80 {return m_postStepZ;}
81
82 float GetGlobalTime() const
83 {return m_globalTime;}
84
85 void SetGlobalTime(float newGlobalTime)
86 {m_globalTime=newGlobalTime;}
87
88private:
89 int m_hitID; // To identify the hit
90 // int trackID;
91 HepMcParticleLink m_partLink; // link to the particle generating the hit
92 int m_particleEncoding; // PDG id
93 float m_kineticEnergy; // kin energy of the particle
94 float m_energyDeposit; // energy deposit by the hit
102};
103
104
106// open functions:
108
110{
111 return m_partLink;
112}
113
114
115inline float hitTime(const TRTUncompressedHit& hit)
116{
117 return (float) hit.GetGlobalTime();
118}
119
120#endif // INDETSIMEVENT_TRTUncompressedHit_h
float hitTime(const TRTUncompressedHit &hit)
float GetPostStepY() const
const HepMcParticleLink & particleLink() const
void SetGlobalTime(float newGlobalTime)
float GetPostStepZ() const
float GetPreStepZ() const
float GetGlobalTime() const
TRTUncompressedHit(const TRTUncompressedHit &)=default
HepMcParticleLink m_partLink
int GetParticleEncoding() const
float GetPreStepY() const
float GetEnergyDeposit() const
TRTUncompressedHit(int hit, int track, int particle, float kinEnergy, float eneDeposit, float preX, float preY, float preZ, float postX, float postY, float postZ, float time)
float GetPreStepX() const
float GetPostStepX() const
TRTUncompressedHit(TRTUncompressedHit &&) noexcept=default
float GetKineticEnergy() const
~TRTUncompressedHit()=default