ATLAS Offline Software
Loading...
Searching...
No Matches
sTGCSimHit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONSIMEVENT_sTGCSimHit_H
6#define MUONSIMEVENT_sTGCSimHit_H 1
7
10
11#include <string>
12
13typedef int HitID;
14
15class sTGCSimHit final{
16 public:
17 //
18 // construction/destruction
19 //
20 // needed by athenaRoot
21 sTGCSimHit();
22
23 // Destructor:
25 sTGCSimHit(HitID id, double time, const Amg::Vector3D& position,
26 const int particleEncoding, const Amg::Vector3D& direction,
27 const double depositEnergy, const int truthBarcode);
28 sTGCSimHit(HitID id, double time, const Amg::Vector3D& position,
29 const int particleEncoding, const Amg::Vector3D& direction,
30 const double depositEnergy, const HepMcParticleLink& hmpl);
31 sTGCSimHit(HitID id, double time, const Amg::Vector3D& position,
32 const int particleEncoding, const Amg::Vector3D& direction,
33 const double depositEnergy, const HepMcParticleLink& hmpl,
34 const double kineticEnergy, const Amg::Vector3D& preposition);
35
36 //
37 // member functions
38 //
39
40 //postStep globalTime
41 double globalTime() const { return (double) m_globalTime; }
42
43 //postStep Global and Local Position
45 int particleEncoding() const { return m_particleEncoding; }
47 double depositEnergy() const { return (double) m_depositEnergy; }
48 double kineticEnergy() const { return static_cast<double>(m_kineticEnergy); }
50
51 HitID sTGCId() const { return m_sTGCId; }
52 std::string print() const;
53
54 bool operator< (const sTGCSimHit& rhs) const
55 { return m_sTGCId < rhs.m_sTGCId; }
56
57 double meanTime() const;
58
59 void setGlobalTime( const double time ) { m_globalTime = time; }
63
64 // truth barcode of the track which released this energy:
65 int truthBarcode() const;
66
67 // GenParticle::id of the track which released this energy:
68 int truthID() const;
69
70 // link to the particle generating the hit
71 const HepMcParticleLink& particleLink() const;
72
73 private:
74 //
75 // member data
76 //
79 // postStep
81
82 int m_particleEncoding; // PDG id
83
86
88
89 //float m_stepLength;
92};
93
94//inline methods
95
97{ return m_partLink; }
98inline double sTGCSimHit::meanTime() const
99{ return (double) m_globalTime; }
100inline float hitTime(const sTGCSimHit& hit)
101{ return (float) hit.meanTime(); }
102
103#endif
int HitID
std::string print() const
Amg::Vector3D m_globalPosition
Definition sTGCSimHit.h:80
const Amg::Vector3D & globalPrePosition() const
Definition sTGCSimHit.h:49
HitID sTGCId() const
Definition sTGCSimHit.h:51
double globalTime() const
Definition sTGCSimHit.h:41
const Amg::Vector3D & globalDirection() const
Definition sTGCSimHit.h:46
HepMcParticleLink m_partLink
Definition sTGCSimHit.h:87
float m_depositEnergy
Definition sTGCSimHit.h:85
double kineticEnergy() const
Definition sTGCSimHit.h:48
const Amg::Vector3D & globalPosition() const
Definition sTGCSimHit.h:44
Amg::Vector3D m_globalPrePosition
Definition sTGCSimHit.h:91
float m_kineticEnergy
Definition sTGCSimHit.h:90
void setDepositEnergy(const double depositEnergy)
Definition sTGCSimHit.h:60
float m_globalTime
Definition sTGCSimHit.h:78
const HepMcParticleLink & particleLink() const
Definition sTGCSimHit.h:96
void setGlobalDirection(const Amg::Vector3D &globalDirection)
sets the direction expressed in global coordinates
Definition sTGCSimHit.h:62
bool operator<(const sTGCSimHit &rhs) const
Definition sTGCSimHit.h:54
int truthBarcode() const
int particleEncoding() const
Definition sTGCSimHit.h:45
int truthID() const
HitID m_sTGCId
Definition sTGCSimHit.h:77
double depositEnergy() const
Definition sTGCSimHit.h:47
void setGlobalPosition(const Amg::Vector3D &globalPosition)
sets the position expressed in global coordinates
Definition sTGCSimHit.h:61
void setGlobalTime(const double time)
Definition sTGCSimHit.h:59
int m_particleEncoding
Definition sTGCSimHit.h:82
double meanTime() const
Definition sTGCSimHit.h:98
Amg::Vector3D m_globalDirection
Definition sTGCSimHit.h:84
Eigen::Matrix< double, 3, 1 > Vector3D
float hitTime(const sTGCSimHit &hit)
Definition sTGCSimHit.h:100