ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
SiHit Class Referencefinal

#include <SiHit.h>

Collaboration diagram for SiHit:

Public Types

enum  { xDep = 0, xPhi = 1, xEta = 2 }
 

Public Member Functions

 SiHit (const HepGeom::Point3D< double > &localStartPosition, const HepGeom::Point3D< double > &localEndPosition, const double energyLoss, const double meanTime, const int truthBarcode, const unsigned int id)
 
 SiHit (const HepGeom::Point3D< double > &localStartPosition, const HepGeom::Point3D< double > &localEndPosition, const double energyLoss, const double meanTime, const int truthBarcode, const int, const int, const int, const int, const int, const int)
 
 SiHit (const HepGeom::Point3D< double > &localStartPosition, const HepGeom::Point3D< double > &localEndPosition, const double energyLoss, const double meanTime, const HepMcParticleLink &track, const unsigned int id)
 
 SiHit (const HepGeom::Point3D< double > &localStartPosition, const HepGeom::Point3D< double > &localEndPosition, const double energyLoss, const double meanTime, const HepMcParticleLink &track, const int, const int, const int, const int, const int, const int)
 
 SiHit ()
 
 ~SiHit ()=default
 
SiHitoperator= (SiHit &&) noexcept=default
 
SiHitoperator= (const SiHit &)=default
 
 SiHit (const SiHit &)=default
 
 SiHit (SiHit &&) noexcept=default
 
unsigned int identify () const
 
HepGeom::Point3D< double > localStartPosition () const
 
HepGeom::Point3D< double > localEndPosition () const
 
double energyLoss () const
 
double meanTime () const
 
void setMeanTime (float meanTime)
 
int truthBarcode () const
 
int truthID () const
 
const HepMcParticleLinkparticleLink () const
 
bool isPixel () const
 
bool isSCT () const
 
bool isHGTD () const
 
bool isPLR () const
 
int getBarrelEndcap () const
 
int getLayerDisk () const
 
int getEtaModule () const
 
int getPhiModule () const
 
int getSide () const
 
void print () const
 
bool operator< (const SiHit &rhs) const
 
void ScaleLength (double)
 

Private Attributes

float m_stX
 
float m_stY
 
float m_stZ
 
float m_enX
 
float m_enY
 
float m_enZ
 
float m_energyLoss
 
float m_meanTime
 
HepMcParticleLink m_partLink
 
unsigned int m_ID
 

Detailed Description

Definition at line 19 of file SiHit.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
xDep 
xPhi 
xEta 

Definition at line 161 of file SiHit.h.

162 { xDep = 0, xPhi = 1, xEta = 2};

Constructor & Destructor Documentation

◆ SiHit() [1/7]

SiHit::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 at line 26 of file SiHit.cxx.

31  :
32  // m_localStartPosition(localStartPosition),
33  // m_localEndPosition(localEndPosition),
34  m_stX( (float) localStartPosition.x() ),
35  m_stY( (float) localStartPosition.y() ),
36  m_stZ( (float) localStartPosition.z() ),
37  m_enX( (float) localEndPosition.x() ),
38  m_enY( (float) localEndPosition.y() ),
39  m_enZ( (float) localEndPosition.z() ),
43  m_ID(id)
44 {
45 }

◆ SiHit() [2/7]

SiHit::SiHit ( const HepGeom::Point3D< double > &  localStartPosition,
const HepGeom::Point3D< double > &  localEndPosition,
const double  energyLoss,
const double  meanTime,
const int  truthBarcode,
const int  Part,
const int  BrlECap,
const int  LayerDisk,
const int  etaM,
const int  phiM,
const int  side 
)

Definition at line 48 of file SiHit.cxx.

54  :
55  // m_localStartPosition(localStartPosition),
56  // m_localEndPosition(localEndPosition),
57  m_stX( (float) localStartPosition.x() ),
58  m_stY( (float) localStartPosition.y() ),
59  m_stZ( (float) localStartPosition.z() ),
60  m_enX( (float) localEndPosition.x() ),
61  m_enY( (float) localEndPosition.y() ),
62  m_enZ( (float) localEndPosition.z() ),
66  m_ID(0)
67 {
68  // Compress the location info into the integer:
70 }

◆ SiHit() [3/7]

SiHit::SiHit ( const HepGeom::Point3D< double > &  localStartPosition,
const HepGeom::Point3D< double > &  localEndPosition,
const double  energyLoss,
const double  meanTime,
const HepMcParticleLink track,
const unsigned int  id 
)

Definition at line 73 of file SiHit.cxx.

78  :
79  // m_localStartPosition(localStartPosition),
80  // m_localEndPosition(localEndPosition),
81  m_stX( (float) localStartPosition.x() ),
82  m_stY( (float) localStartPosition.y() ),
83  m_stZ( (float) localStartPosition.z() ),
84  m_enX( (float) localEndPosition.x() ),
85  m_enY( (float) localEndPosition.y() ),
86  m_enZ( (float) localEndPosition.z() ),
90  m_ID(id)
91 {
92 }

◆ SiHit() [4/7]

SiHit::SiHit ( const HepGeom::Point3D< double > &  localStartPosition,
const HepGeom::Point3D< double > &  localEndPosition,
const double  energyLoss,
const double  meanTime,
const HepMcParticleLink track,
const int  Part,
const int  BrlECap,
const int  LayerDisk,
const int  etaM,
const int  phiM,
const int  side 
)

Definition at line 95 of file SiHit.cxx.

101  :
102  // m_localStartPosition(localStartPosition),
103  // m_localEndPosition(localEndPosition),
104  m_stX( (float) localStartPosition.x() ),
105  m_stY( (float) localStartPosition.y() ),
106  m_stZ( (float) localStartPosition.z() ),
107  m_enX( (float) localEndPosition.x() ),
108  m_enY( (float) localEndPosition.y() ),
109  m_enZ( (float) localEndPosition.z() ),
112  m_partLink(track),
113  m_ID(0)
114 {
115  // Compress the location info into the integer:
116  m_ID = SiHitIdHelper::GetHelper()->buildHitId(Part,BrlECap,LayerDisk,etaM,phiM,side);
117 }

◆ SiHit() [5/7]

SiHit::SiHit ( )

Definition at line 10 of file SiHit.cxx.

10  :
11  m_stX(0.),
12  m_stY(0.),
13  m_stZ(0.),
14  m_enX(0.),
15  m_enY(0.),
16  m_enZ(0.),
17  m_energyLoss(0.),
18  m_meanTime(0.),
19  m_partLink(),
20  m_ID(0xffff)
21 {
22 
23 }

◆ ~SiHit()

SiHit::~SiHit ( )
default

◆ SiHit() [6/7]

SiHit::SiHit ( const SiHit )
default

◆ SiHit() [7/7]

SiHit::SiHit ( SiHit &&  )
defaultnoexcept

Member Function Documentation

◆ energyLoss()

double SiHit::energyLoss ( ) const
inline

Definition at line 175 of file SiHit.h.

176 {
177  return (double) m_energyLoss;
178 }

◆ getBarrelEndcap()

int SiHit::getBarrelEndcap ( ) const

Definition at line 160 of file SiHit.cxx.

160  {
162 }

◆ getEtaModule()

int SiHit::getEtaModule ( ) const

Definition at line 168 of file SiHit.cxx.

168  {
170 }

◆ getLayerDisk()

int SiHit::getLayerDisk ( ) const

Definition at line 164 of file SiHit.cxx.

164  {
166 }

◆ getPhiModule()

int SiHit::getPhiModule ( ) const

Definition at line 172 of file SiHit.cxx.

172  {
174 }

◆ getSide()

int SiHit::getSide ( ) const

Definition at line 176 of file SiHit.cxx.

176  {
178 }

◆ identify()

unsigned int SiHit::identify ( ) const
inline

Definition at line 170 of file SiHit.h.

171 {
172  return m_ID;
173 }

◆ isHGTD()

bool SiHit::isHGTD ( ) const

Definition at line 138 of file SiHit.cxx.

138  {
140 }

◆ isPixel()

bool SiHit::isPixel ( ) const

Definition at line 130 of file SiHit.cxx.

130  {
132 }

◆ isPLR()

bool SiHit::isPLR ( ) const

Definition at line 142 of file SiHit.cxx.

142  {
144 }

◆ isSCT()

bool SiHit::isSCT ( ) const

Definition at line 134 of file SiHit.cxx.

134  {
136 }

◆ localEndPosition()

HepGeom::Point3D< double > SiHit::localEndPosition ( ) const

Definition at line 153 of file SiHit.cxx.

154 {
155  return { static_cast<double>(m_enX),
156  static_cast<double>(m_enY),
157  static_cast<double>(m_enZ) };
158 }

◆ localStartPosition()

HepGeom::Point3D< double > SiHit::localStartPosition ( ) const

Definition at line 146 of file SiHit.cxx.

147 {
148  return { static_cast<double>(m_stX),
149  static_cast<double>(m_stY),
150  static_cast<double>(m_stZ) };
151 }

◆ meanTime()

double SiHit::meanTime ( ) const
inline

Definition at line 180 of file SiHit.h.

181 {
182  return (double) m_meanTime;
183 }

◆ operator<()

bool SiHit::operator< ( const SiHit rhs) const
inline

Definition at line 135 of file SiHit.h.

136  {return m_ID < rhs.m_ID;}

◆ operator=() [1/2]

SiHit& SiHit::operator= ( const SiHit )
default

◆ operator=() [2/2]

SiHit& SiHit::operator= ( SiHit &&  )
defaultnoexcept

◆ particleLink()

const HepMcParticleLink & SiHit::particleLink ( ) const
inline

Definition at line 190 of file SiHit.h.

191 {
192  return m_partLink;
193 }

◆ print()

void SiHit::print ( ) const

Definition at line 180 of file SiHit.cxx.

180  {
181  if (isPixel()) {
182  if (isPLR()) {
183  std::cout << "*** PLR Hit " << std::endl;
184  } else {
185  std::cout << "*** Pixel Hit " << std::endl;
186  }
187  } else if (isSCT()) {
188  std::cout << "*** SCT Hit " << std::endl;
189  }
190  else {
191  std::cout << "*** HGTD Hit " << std::endl;
192  }
193  std::cout << " Barrel/ EndCap Number " << getBarrelEndcap() << std::endl;
194  std::cout << " Layer/Disk Number " << getLayerDisk() << std::endl;
195  std::cout << " Eta Number " << getEtaModule() << std::endl;
196  std::cout << " Phi Number " << getPhiModule() << std::endl;
197  std::cout << " Side Number " << getSide() << std::endl;
198 }

◆ ScaleLength()

void SiHit::ScaleLength ( double  sfactor)

Definition at line 119 of file SiHit.cxx.

119  {
120  // m_localStartPosition *= sfactor;
121  // m_localEndPosition *= sfactor;
122  m_stX *= (float) sfactor;
123  m_stY *= (float) sfactor;
124  m_stZ *= (float) sfactor;
125  m_enX *= (float) sfactor;
126  m_enY *= (float) sfactor;
127  m_enZ *= (float) sfactor;
128 }

◆ setMeanTime()

void SiHit::setMeanTime ( float  meanTime)
inline

Definition at line 185 of file SiHit.h.

186 {
188 }

◆ truthBarcode()

int SiHit::truthBarcode ( ) const

Definition at line 202 of file SiHit.cxx.

203 {
204  return m_partLink.barcode();
205 }

◆ truthID()

int SiHit::truthID ( ) const

Definition at line 208 of file SiHit.cxx.

209 {
210  return m_partLink.id();
211 }

Member Data Documentation

◆ m_energyLoss

float SiHit::m_energyLoss
private

Definition at line 156 of file SiHit.h.

◆ m_enX

float SiHit::m_enX
private

Definition at line 155 of file SiHit.h.

◆ m_enY

float SiHit::m_enY
private

Definition at line 155 of file SiHit.h.

◆ m_enZ

float SiHit::m_enZ
private

Definition at line 155 of file SiHit.h.

◆ m_ID

unsigned int SiHit::m_ID
private

Definition at line 159 of file SiHit.h.

◆ m_meanTime

float SiHit::m_meanTime
private

Definition at line 157 of file SiHit.h.

◆ m_partLink

HepMcParticleLink SiHit::m_partLink
private

Definition at line 158 of file SiHit.h.

◆ m_stX

float SiHit::m_stX
private

Definition at line 154 of file SiHit.h.

◆ m_stY

float SiHit::m_stY
private

Definition at line 154 of file SiHit.h.

◆ m_stZ

float SiHit::m_stZ
private

Definition at line 154 of file SiHit.h.


The documentation for this class was generated from the following files:
SiHitIdHelper::getPhiModule
int getPhiModule(const int &hid) const
Definition: SiHitIdHelper.cxx:104
SiHit::m_enZ
float m_enZ
Definition: SiHit.h:155
SiHit::xDep
@ xDep
Definition: SiHit.h:162
SiHit::localEndPosition
HepGeom::Point3D< double > localEndPosition() const
Definition: SiHit.cxx:153
SiHit::m_ID
unsigned int m_ID
Definition: SiHit.h:159
SiHit::m_enX
float m_enX
Definition: SiHit.h:155
SiHitIdHelper::getSide
int getSide(const int &hid) const
Definition: SiHitIdHelper.cxx:110
SiHit::getLayerDisk
int getLayerDisk() const
Definition: SiHit.cxx:164
SiHit::xPhi
@ xPhi
Definition: SiHit.h:162
SiHit::getPhiModule
int getPhiModule() const
Definition: SiHit.cxx:172
SiHit::m_energyLoss
float m_energyLoss
Definition: SiHit.h:156
SiHit::m_meanTime
float m_meanTime
Definition: SiHit.h:157
SiHit::isPLR
bool isPLR() const
Definition: SiHit.cxx:142
TRT::Hit::side
@ side
Definition: HitInfo.h:83
SiHit::meanTime
double meanTime() const
Definition: SiHit.h:180
LayerDisk
Definition: WaferTree.h:57
SiHit::getEtaModule
int getEtaModule() const
Definition: SiHit.cxx:168
SiHit::m_stZ
float m_stZ
Definition: SiHit.h:154
SiHit::truthBarcode
int truthBarcode() const
Definition: SiHit.cxx:202
SiHit::getBarrelEndcap
int getBarrelEndcap() const
Definition: SiHit.cxx:160
SiHitIdHelper::getLayerDisk
int getLayerDisk(const int &hid) const
Definition: SiHitIdHelper.cxx:92
SiHit::energyLoss
double energyLoss() const
Definition: SiHit.h:175
SiHit::m_partLink
HepMcParticleLink m_partLink
Definition: SiHit.h:158
SiHit::getSide
int getSide() const
Definition: SiHit.cxx:176
SiHitIdHelper::getEtaModule
int getEtaModule(const int &hid) const
Definition: SiHitIdHelper.cxx:98
SiHit::xEta
@ xEta
Definition: SiHit.h:162
SiHit::m_stY
float m_stY
Definition: SiHit.h:154
SiHitIdHelper::isPixel
bool isPixel(const int &hid) const
Definition: SiHitIdHelper.cxx:58
SiHit::isPixel
bool isPixel() const
Definition: SiHit.cxx:130
DetType::Part
Part
Definition: DetType.h:14
SiHitIdHelper::getBarrelEndcap
int getBarrelEndcap(const int &hid) const
Definition: SiHitIdHelper.cxx:86
SiHitIdHelper::GetHelper
static const SiHitIdHelper * GetHelper()
Definition: SiHitIdHelper.cxx:19
SiHitIdHelper::isPLR
bool isPLR(const int &hid) const
Definition: SiHitIdHelper.cxx:76
SiHitIdHelper::isSCT
bool isSCT(const int &hid) const
Definition: SiHitIdHelper.cxx:64
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
SiHit::m_enY
float m_enY
Definition: SiHit.h:155
SiHitIdHelper::buildHitId
int buildHitId(const int, const int, const int, const int, const int, const int) const
Definition: SiHitIdHelper.cxx:118
SiHit::m_stX
float m_stX
Definition: SiHit.h:154
readCCLHist.float
float
Definition: readCCLHist.py:83
SiHitIdHelper::isHGTD
bool isHGTD(const int &hid) const
Definition: SiHitIdHelper.cxx:70
SiHit::localStartPosition
HepGeom::Point3D< double > localStartPosition() const
Definition: SiHit.cxx:146
SiHit::isSCT
bool isSCT() const
Definition: SiHit.cxx:134