ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSpectrometer
MuonSimEvent
src
MMSimHit.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonSimEvent/MMSimHit.h
"
6
#include <sstream>
7
/*******************************************************************************/
8
MMSimHit::MMSimHit
():
9
m_MMId
(0xffff),
10
m_globalTime
(0.),
11
m_particleEncoding
(0),
// PDG_ID
12
m_kineticEnergy
(-9999.),
// energy of the particle
13
m_depositEnergy
(-9999.),
//Geant4 deposited energy
14
m_partLink
()
15
{
16
}
17
/*******************************************************************************/
18
MMSimHit::MMSimHit
(
HitID
id
,
double
time,
19
const
Amg::Vector3D
& position,
20
const
int
particleEncoding
,
21
const
double
kineticEnergy
,
22
const
Amg::Vector3D
& direction,
23
const
double
depositEnergy
,
24
const
int
truthBarcode
)
25
:
m_MMId
(id),
m_globalTime
(time)
26
,
m_globalPosition
(position)
27
,
m_particleEncoding
(
particleEncoding
)
28
,
m_kineticEnergy
(
kineticEnergy
)
29
,
m_globalDirection
(direction)
30
,
m_depositEnergy
(
depositEnergy
)
31
,
m_partLink
(
truthBarcode
, 0,
HepMcParticleLink
::IS_POSITION,
HepMcParticleLink
::IS_BARCODE)
// FIXME barcode-based
32
{
33
}
34
35
MMSimHit::MMSimHit
(
HitID
id
,
double
time,
36
const
Amg::Vector3D
& position,
37
const
int
particleEncoding
,
38
const
double
kineticEnergy
,
39
const
Amg::Vector3D
& direction,
40
const
double
depositEnergy
,
41
const
HepMcParticleLink
& hmpl)
42
:
m_MMId
(id),
m_globalTime
(time)
43
,
m_globalPosition
(position)
44
,
m_particleEncoding
(
particleEncoding
)
45
,
m_kineticEnergy
(
kineticEnergy
)
46
,
m_globalDirection
(direction)
47
,
m_depositEnergy
(
depositEnergy
)
48
,
m_partLink
(hmpl)
49
{
50
}
51
/*******************************************************************************/
52
std::string
MMSimHit::print
()
const
{
53
54
std::stringstream
ss
;
55
56
ss
<<
"-------------------------------------------------------------"
<< std::endl;
57
ss
<<
"MMSimHit:"
<<std::endl;
58
ss
<<
" identifier: "
<<
m_MMId
;
59
ss
<<
" t: "
<<
m_globalTime
;
60
ss
<<
" x : ("
<<
m_globalPosition
.x()
61
<<
","
<<
m_globalPosition
.y()
62
<<
","
<<
m_globalPosition
.z()
63
<<
")"
<<std::endl;
64
ss
<<
" pdgId: "
<<
m_particleEncoding
<<
" kineticEnergy: "
<<
m_kineticEnergy
<<std::endl;
65
66
return
ss
.str();
67
}
68
/*******************************************************************************/
69
int
MMSimHit::truthBarcode
()
const
70
{
return
m_partLink
.barcode(); }
71
/*******************************************************************************/
72
int
MMSimHit::truthID
()
const
73
{
return
m_partLink
.id(); }
74
/*******************************************************************************/
HitID
int HitID
Definition
GenericMuonSimHit.h:13
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
MMSimHit.h
HepMcParticleLink
a link optimized in size for a GenParticle in a McEventCollection
Definition
HepMcParticleLink.h:72
MMSimHit::m_kineticEnergy
double m_kineticEnergy
Definition
MMSimHit.h:77
MMSimHit::m_globalDirection
Amg::Vector3D m_globalDirection
Definition
MMSimHit.h:79
MMSimHit::m_partLink
HepMcParticleLink m_partLink
Definition
MMSimHit.h:82
MMSimHit::m_MMId
HitID m_MMId
Definition
MMSimHit.h:71
MMSimHit::m_globalPosition
Amg::Vector3D m_globalPosition
Definition
MMSimHit.h:74
MMSimHit::depositEnergy
double depositEnergy() const
Definition
MMSimHit.h:42
MMSimHit::m_globalTime
double m_globalTime
Definition
MMSimHit.h:72
MMSimHit::truthBarcode
int truthBarcode() const
Definition
MMSimHit.cxx:69
MMSimHit::kineticEnergy
double kineticEnergy() const
Definition
MMSimHit.h:40
MMSimHit::m_particleEncoding
int m_particleEncoding
Definition
MMSimHit.h:76
MMSimHit::particleEncoding
int particleEncoding() const
Definition
MMSimHit.h:39
MMSimHit::print
std::string print() const
Definition
MMSimHit.cxx:52
MMSimHit::truthID
int truthID() const
Definition
MMSimHit.cxx:72
MMSimHit::MMSimHit
MMSimHit()
Definition
MMSimHit.cxx:8
MMSimHit::m_depositEnergy
double m_depositEnergy
Definition
MMSimHit.h:80
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Generated on
for ATLAS Offline Software by
1.14.0