ATLAS Offline Software
MuonSpectrometer
MuonSimEvent
MuonSimEvent
MDTSimHit.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MUONSIMEVENT_MDTSIMHIT_H
6
#define MUONSIMEVENT_MDTSIMHIT_H 1
7
8
#include "
GeoPrimitives/GeoPrimitives.h
"
9
#include "
GeneratorObjects/HepMcParticleLink.h
"
10
11
#include <string>
12
13
//---------------------
14
// back to the situation of tag MuonSimEvent-00-00-25 to avoid
15
// uncompatibility between 8.0.2 and 8.2.0 ----->
16
// redundant time methods are present (globalTime() and meanTime() return the
17
// same time) --->NOT TO BE FIXED!!<----
18
19
typedef
int
HitID
;
20
21
class
MDTSimHit
final{
22
public
:
23
//
24
// construction/destruction
25
//
26
// needed by athenaRoot
27
MDTSimHit
();
28
29
// Destructor:
30
~MDTSimHit
();
31
32
MDTSimHit
(
HitID
id
,
double
time
,
double
radius
,
33
const
Amg::Vector3D
& position);
34
MDTSimHit
(
HitID
id
,
double
time
,
double
radius
,
35
const
Amg::Vector3D
& position,
const
int
truthBarcode
);
36
MDTSimHit
(
HitID
id
,
double
time
,
double
radius
,
37
const
Amg::Vector3D
& position,
const
int
truthBarcode
,
38
const
double
stepLength
,
const
double
energyDeposit
,
39
const
int
particleEncoding
,
const
double
kineticEnergy
);
40
MDTSimHit
(
HitID
id
,
double
time
,
double
radius
,
41
const
Amg::Vector3D
& position,
const
HepMcParticleLink
& hmpl,
42
const
double
stepLength
,
const
double
energyDeposit
,
43
const
int
particleEncoding
,
const
double
kineticEnergy
);
44
45
//
46
// member functions
47
//
48
double
globalTime
()
const
{
return
(
double
)
m_globalTime
; }
49
void
setGlobalTime
(
double
time
) {
m_globalTime
=
time
; }
50
51
double
driftRadius
()
const
{
return
(
double
)
m_driftRadius
; }
52
void
setDriftRadius
(
double
radius
) {
m_driftRadius
=
radius
; }
// Need to adjust this when applyin deformations during digitization
53
54
const
Amg::Vector3D
&
localPosition
()
const
{
return
m_localPosition
; }
55
void
setLocalPosition
(
Amg::Vector3D
&
localPosition
) {
m_localPosition
=
localPosition
; }
// Need to adjust this when applyin deformations during digitization
56
57
double
stepLength
()
const
{
return
static_cast<
double
>
(
m_stepLength
); }
58
double
energyDeposit
()
const
{
return
static_cast<
double
>
(
m_energyDeposit
); }
59
int
particleEncoding
()
const
{
return
m_particleEncoding
; }
60
double
kineticEnergy
()
const
{
return
static_cast<
double
>
(
m_kineticEnergy
); }
61
62
HitID
MDTid
()
const
{
return
m_MDTid
; }
63
std::string
print
()
const
;
64
bool
operator<
(
const
MDTSimHit
& rhs)
const
65
{
return
m_MDTid
< rhs.
m_MDTid
; }
66
double
meanTime
()
const
;
67
68
// truth barcode of the track which released this energy:
69
int
truthBarcode
()
const
;
70
71
// GenParticle::id of the track which released this energy:
72
int
truthID
()
const
;
73
74
// link to the particle generating the hit
75
const
HepMcParticleLink
&
particleLink
()
const
;
76
77
78
private
:
79
//
80
// member data
81
//
82
HitID
m_MDTid
;
83
float
m_globalTime
;
84
float
m_driftRadius
;
85
Amg::Vector3D
m_localPosition
;
86
HepMcParticleLink
m_partLink
;
87
88
float
m_stepLength
;
89
float
m_energyDeposit
;
//Geant4 de/dx
90
int
m_particleEncoding
;
// PDG id
91
float
m_kineticEnergy
;
// kinetic energy of the particle
92
93
94
};
95
//inline methods
96
97
inline
double
MDTSimHit::meanTime
()
const
98
{
return
(
double
)
m_globalTime
; }
99
100
inline
const
HepMcParticleLink
&
MDTSimHit::particleLink
()
const
101
{
return
m_partLink
; }
102
103
104
// open functions
105
106
inline
float
hitTime
(
const
MDTSimHit
& hit)
107
{
return
(
float
) hit.
meanTime
(); }
108
109
#endif // MUONSIMEVENT_MDTSIMHIT_H
MDTSimHit::m_energyDeposit
float m_energyDeposit
Definition:
MDTSimHit.h:89
MDTSimHit::m_localPosition
Amg::Vector3D m_localPosition
Definition:
MDTSimHit.h:85
HepMcParticleLink.h
MDTSimHit::m_kineticEnergy
float m_kineticEnergy
Definition:
MDTSimHit.h:91
MDTSimHit::localPosition
const Amg::Vector3D & localPosition() const
Definition:
MDTSimHit.h:54
MDTSimHit::setDriftRadius
void setDriftRadius(double radius)
Definition:
MDTSimHit.h:52
MDTSimHit::m_particleEncoding
int m_particleEncoding
Definition:
MDTSimHit.h:90
MDTSimHit
Definition:
MDTSimHit.h:21
MDTSimHit::truthID
int truthID() const
Definition:
MDTSimHit.cxx:121
MDTSimHit::operator<
bool operator<(const MDTSimHit &rhs) const
Definition:
MDTSimHit.h:64
MDTSimHit::m_driftRadius
float m_driftRadius
Definition:
MDTSimHit.h:84
MDTSimHit::meanTime
double meanTime() const
Definition:
MDTSimHit.h:97
GeoPrimitives.h
HepMcParticleLink
a link optimized in size for a GenParticle in a McEventCollection
Definition:
HepMcParticleLink.h:72
MDTSimHit::~MDTSimHit
~MDTSimHit()
HitID
int HitID
Definition:
MDTSimHit.h:19
hitTime
float hitTime(const MDTSimHit &hit)
Definition:
MDTSimHit.h:106
MDTSimHit::m_globalTime
float m_globalTime
Definition:
MDTSimHit.h:83
MDTSimHit::setLocalPosition
void setLocalPosition(Amg::Vector3D &localPosition)
Definition:
MDTSimHit.h:55
MDTSimHit::energyDeposit
double energyDeposit() const
Definition:
MDTSimHit.h:58
MDTSimHit::kineticEnergy
double kineticEnergy() const
Definition:
MDTSimHit.h:60
MDTSimHit::globalTime
double globalTime() const
Definition:
MDTSimHit.h:48
MDTSimHit::MDTid
HitID MDTid() const
Definition:
MDTSimHit.h:62
MDTSimHit::MDTSimHit
MDTSimHit()
Definition:
MDTSimHit.cxx:11
MDTSimHit::driftRadius
double driftRadius() const
Definition:
MDTSimHit.h:51
MDTSimHit::m_MDTid
HitID m_MDTid
Definition:
MDTSimHit.h:82
MDTSimHit::m_stepLength
float m_stepLength
Definition:
MDTSimHit.h:88
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition:
GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition:
ParticleGun_SamplingFraction.py:96
MDTSimHit::particleEncoding
int particleEncoding() const
Definition:
MDTSimHit.h:59
MDTSimHit::print
std::string print() const
Definition:
MDTSimHit.cxx:100
MDTSimHit::particleLink
const HepMcParticleLink & particleLink() const
Definition:
MDTSimHit.h:100
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition:
CaloSwCorrections.py:242
MDTSimHit::truthBarcode
int truthBarcode() const
Definition:
MDTSimHit.cxx:118
MDTSimHit::m_partLink
HepMcParticleLink m_partLink
Definition:
MDTSimHit.h:86
HitID
int HitID
Definition:
GenericMuonSimHit.h:13
MDTSimHit::stepLength
double stepLength() const
Definition:
MDTSimHit.h:57
MDTSimHit::setGlobalTime
void setGlobalTime(double time)
Definition:
MDTSimHit.h:49
Generated on Thu Nov 7 2024 21:20:46 for ATLAS Offline Software by
1.8.18