ATLAS Offline Software
Loading...
Searching...
No Matches
SiHit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SiHit.h
7// Header file for class SiHit
9// Class for the Pixel and SCT hits
11
12#ifndef INDETSIMEVENT_SIHIT_H
13#define INDETSIMEVENT_SIHIT_H
14
15// Data members classes
16#include "CLHEP/Geometry/Point3D.h"
18
19class SiHit final {
20
22 // Public methods:
24public:
25
26 // Constructor with parameters:
27 // local start position of the energy deposit
28 // local end position of the energy deposit
29 // deposited energy
30 // time of energy deposition
31 // number of track which released this energy
32 //
33 SiHit(const HepGeom::Point3D<double> &localStartPosition,
34 const HepGeom::Point3D<double> &localEndPosition,
35 const double energyLoss,
36 const double meanTime,
37 const int truthBarcode,
38 const unsigned int id);
39
40 SiHit(const HepGeom::Point3D<double> &localStartPosition,
41 const HepGeom::Point3D<double> &localEndPosition,
42 const double energyLoss,
43 const double meanTime,
44 const int truthBarcode,
45 const int, const int, const int, const int, const int, const int);
46 // Constructor with parameters:
47 // local start position of the energy deposit
48 // local end position of the energy deposit
49 // deposited energy
50 // time of energy deposition
51 // link to particle which released this energy
52 //
53 SiHit(const HepGeom::Point3D<double> &localStartPosition,
54 const HepGeom::Point3D<double> &localEndPosition,
55 const double energyLoss,
56 const double meanTime,
57 const HepMcParticleLink &track,
58 const unsigned int id);
59
60 SiHit(const HepGeom::Point3D<double> &localStartPosition,
61 const HepGeom::Point3D<double> &localEndPosition,
62 const double energyLoss,
63 const double meanTime,
64 const HepMcParticleLink &track,
65 const int, const int, const int, const int, const int, const int);
66 // needed by athenaRoot
67 SiHit();
68
69 // Destructor:
70 ~SiHit() = default;
71
72 //move assignment defaulted
73 SiHit & operator = (SiHit &&) noexcept = default;
74 //assignment defaulted
75 SiHit & operator = (const SiHit &) = default;
76 //copy c'tor defaulted
77 SiHit(const SiHit &) = default;
78 //move c'tor defaulted
79 SiHit(SiHit &&) noexcept = default;
80
81
83 // Const methods:
85
86 unsigned int identify() const;
87
88 // local start position of the energy deposit:
89 HepGeom::Point3D<double> localStartPosition() const;
90
91 HepGeom::Point3D<double> localEndPosition() const;
92
93 // deposited energy:
94 double energyLoss() const;
95
96 // time of energy deposition: FIXME name!
97 double meanTime() const;
98
99 // Set the time of energy deposition: FIXME name!
100 void setMeanTime(float meanTime);
101
102 // truth barcode of the track which released this energy:
103 int truthBarcode() const;
104
105 // GenParticle::id of the track which released this energy:
106 int truthID() const;
107
108 // link to the particle generating the hit
110
111 // Pixel, SCT, or HGTD
112 bool isPixel() const;
113 bool isSCT() const;
114 bool isHGTD() const;
115 bool isPLR() const;
116
117 // Barrel or Endcap
119
120 // Layer/Disk
121 int getLayerDisk() const;
122
123 // eta module
124 int getEtaModule() const;
125
126 // phi module
127 int getPhiModule() const;
128
129 // side
130 int getSide() const;
131
132 // some print-out:
133 void print() const;
134
135 bool operator < (const SiHit& rhs) const
136 {return m_ID < rhs.m_ID;}
137
139 // Non-const methods:
141 // Scale the length, used to go from cm to mm, of whatever we like.
142 void ScaleLength(double);
143
145 // copy c'tor made public on 23-5-2008 to allow copy of athenahitsvector<sihit>
147
148
150 // Private data:
152private:
153
156 float m_energyLoss; // deposited energy
157 float m_meanTime; // time of energy deposition
159 unsigned int m_ID;
160public:
161 enum
162 { xDep = 0, xPhi = 1, xEta = 2};
163};
164
165
167// Inline methods:
169
170inline unsigned int SiHit::identify() const
171{
172 return m_ID;
173}
174
175inline double SiHit::energyLoss() const
176{
177 return (double) m_energyLoss;
178}
179
180inline double SiHit::meanTime() const
181{
182 return (double) m_meanTime;
183}
184
185inline void SiHit::setMeanTime(float meanTime)
186{
188}
189
191{
192 return m_partLink;
193}
194
195
196
198// open functions:
200
201inline float hitTime(const SiHit& hit)
202{
203 return (float) hit.meanTime();
204}
205
206#endif // INDETSIMEVENT_SIHIT_H
float hitTime(const SiHit &hit)
Definition SiHit.h:201
Definition SiHit.h:19
float m_enZ
Definition SiHit.h:155
float m_meanTime
Definition SiHit.h:157
float m_enY
Definition SiHit.h:155
void print() const
Definition SiHit.cxx:180
double energyLoss() const
Definition SiHit.h:175
SiHit()
Definition SiHit.cxx:10
int truthID() const
Definition SiHit.cxx:208
HepMcParticleLink m_partLink
Definition SiHit.h:158
void ScaleLength(double)
Definition SiHit.cxx:119
float m_energyLoss
Definition SiHit.h:156
float m_stY
Definition SiHit.h:154
HepGeom::Point3D< double > localStartPosition() const
Definition SiHit.cxx:146
unsigned int identify() const
Definition SiHit.h:170
@ xPhi
Definition SiHit.h:162
@ xEta
Definition SiHit.h:162
@ xDep
Definition SiHit.h:162
bool isPixel() const
Definition SiHit.cxx:130
int getPhiModule() const
Definition SiHit.cxx:172
double meanTime() const
Definition SiHit.h:180
int truthBarcode() const
Definition SiHit.cxx:202
bool isHGTD() const
Definition SiHit.cxx:138
~SiHit()=default
int getBarrelEndcap() const
Definition SiHit.cxx:160
float m_stX
Definition SiHit.h:154
int getSide() const
Definition SiHit.cxx:176
float m_enX
Definition SiHit.h:155
void setMeanTime(float meanTime)
Definition SiHit.h:185
SiHit & operator=(SiHit &&) noexcept=default
int getEtaModule() const
Definition SiHit.cxx:168
bool isSCT() const
Definition SiHit.cxx:134
float m_stZ
Definition SiHit.h:154
bool isPLR() const
Definition SiHit.cxx:142
unsigned int m_ID
Definition SiHit.h:159
SiHit(const HepGeom::Point3D< double > &localStartPosition, const HepGeom::Point3D< double > &localEndPosition, const double energyLoss, const double meanTime, const int truthBarcode, const unsigned int id)
Definition SiHit.cxx:26
const HepMcParticleLink & particleLink() const
Definition SiHit.h:190
int getLayerDisk() const
Definition SiHit.cxx:164
HepGeom::Point3D< double > localEndPosition() const
Definition SiHit.cxx:153