ATLAS Offline Software
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 {
12 public:
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:
28  ~TRTUncompressedHit() = default;
29 
30  //copy c'tor defaulted
32  //Move c'tor defaulted
34  //assignment defaulted
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 
55  int GetParticleEncoding() const
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 
88 private:
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
95  float m_preStepX;
96  float m_preStepY;
97  float m_preStepZ;
98  float m_postStepX;
99  float m_postStepY;
100  float m_postStepZ;
102 };
103 
104 
106 // open functions:
108 
110 {
111  return m_partLink;
112 }
113 
114 
115 inline float hitTime(const TRTUncompressedHit& hit)
116 {
117  return (float) hit.GetGlobalTime();
118 }
119 
120 #endif // INDETSIMEVENT_TRTUncompressedHit_h
columnar::final
CM final
Definition: ColumnAccessor.h:106
TRTUncompressedHit::~TRTUncompressedHit
~TRTUncompressedHit()=default
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
TRTUncompressedHit::GetHitID
int GetHitID() const
Definition: TRTUncompressedHit.h:42
TRTUncompressedHit::m_hitID
int m_hitID
Definition: TRTUncompressedHit.h:89
TRTUncompressedHit::GetPreStepY
float GetPreStepY() const
Definition: TRTUncompressedHit.h:67
TRTUncompressedHit::GetParticleEncoding
int GetParticleEncoding() const
Definition: TRTUncompressedHit.h:55
TRTUncompressedHit::m_energyDeposit
float m_energyDeposit
Definition: TRTUncompressedHit.h:94
TRTUncompressedHit
Definition: TRTUncompressedHit.h:11
TRTUncompressedHit::GetPostStepY
float GetPostStepY() const
Definition: TRTUncompressedHit.h:76
TRTUncompressedHit::m_preStepY
float m_preStepY
Definition: TRTUncompressedHit.h:96
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
TRTUncompressedHit::truthID
int truthID() const
Definition: TRTUncompressedHit.cxx:64
TRTUncompressedHit::GetGlobalTime
float GetGlobalTime() const
Definition: TRTUncompressedHit.h:82
TRTUncompressedHit::GetPreStepZ
float GetPreStepZ() const
Definition: TRTUncompressedHit.h:70
TRTUncompressedHit::m_preStepX
float m_preStepX
Definition: TRTUncompressedHit.h:95
TRTUncompressedHit::m_postStepZ
float m_postStepZ
Definition: TRTUncompressedHit.h:100
TRTUncompressedHit::m_globalTime
float m_globalTime
Definition: TRTUncompressedHit.h:101
TRTUncompressedHit::m_particleEncoding
int m_particleEncoding
Definition: TRTUncompressedHit.h:92
TRTUncompressedHit::m_partLink
HepMcParticleLink m_partLink
Definition: TRTUncompressedHit.h:91
TRTUncompressedHit::GetKineticEnergy
float GetKineticEnergy() const
Definition: TRTUncompressedHit.h:58
TRTUncompressedHit::m_preStepZ
float m_preStepZ
Definition: TRTUncompressedHit.h:97
hitTime
float hitTime(const TRTUncompressedHit &hit)
Definition: TRTUncompressedHit.h:115
TRTUncompressedHit::truthBarcode
int truthBarcode() const
Definition: TRTUncompressedHit.cxx:58
TRTUncompressedHit::TRTUncompressedHit
TRTUncompressedHit(TRTUncompressedHit &&) noexcept=default
TRTUncompressedHit::m_postStepX
float m_postStepX
Definition: TRTUncompressedHit.h:98
TRTUncompressedHit::GetEnergyDeposit
float GetEnergyDeposit() const
Definition: TRTUncompressedHit.h:61
TRTUncompressedHit::TRTUncompressedHit
TRTUncompressedHit()
Definition: TRTUncompressedHit.cxx:46
python.CaloAddPedShiftConfig.default
default
Definition: CaloAddPedShiftConfig.py:43
TRTUncompressedHit::GetPreStepX
float GetPreStepX() const
Definition: TRTUncompressedHit.h:64
TRTUncompressedHit::m_postStepY
float m_postStepY
Definition: TRTUncompressedHit.h:99
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
TRTUncompressedHit::GetPostStepX
float GetPostStepX() const
Definition: TRTUncompressedHit.h:73
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
python.PyAthena.obj
obj
Definition: PyAthena.py:132
TRTUncompressedHit::particleLink
const HepMcParticleLink & particleLink() const
Definition: TRTUncompressedHit.h:109
TRTUncompressedHit::TRTUncompressedHit
TRTUncompressedHit(const TRTUncompressedHit &)=default
TRTUncompressedHit::GetPostStepZ
float GetPostStepZ() const
Definition: TRTUncompressedHit.h:79
TRTUncompressedHit::SetGlobalTime
void SetGlobalTime(float newGlobalTime)
Definition: TRTUncompressedHit.h:85
TRTUncompressedHit::m_kineticEnergy
float m_kineticEnergy
Definition: TRTUncompressedHit.h:93