ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkGeometry
src
MaterialStep.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// MaterialStep.cxx, (c) ATLAS Detector software
8
9
#include "
TrkGeometry/MaterialStep.h
"
10
// Gaudi
11
#include "GaudiKernel/MsgStream.h"
12
// STD
13
#include <cmath>
14
#include <iostream>
15
16
Trk::MaterialStep::MaterialStep
(
float
x
,
float
y
,
float
z
,
float
stepL,
17
float
matX0,
float
matL0,
float
matA,
18
float
matZ,
float
matRho,
float
matdEdX)
19
:
m_steplength
(stepL),
20
m_hitX
(
x
),
21
m_hitY
(
y
),
22
m_hitZ
(
z
),
23
m_hitR
(
std
::sqrt(
x
*
x
+
y
*
y
)),
24
m_material
(matX0, matL0, matA, matZ, matRho, matdEdX) {}
25
26
Trk::MaterialStep::MaterialStep
(
float
x
,
float
y
,
float
z
,
float
stepL,
27
float
matX0,
float
matL0,
float
matA,
28
float
matZ,
float
matRho,
29
const
std::vector<unsigned char>& elements,
30
const
std::vector<unsigned char>& fractions,
31
float
matdEdX)
32
:
m_steplength
(stepL),
33
m_hitX
(
x
),
34
m_hitY
(
y
),
35
m_hitZ
(
z
),
36
m_hitR
(
std
::sqrt(
x
*
x
+
y
*
y
)),
37
m_material
(matX0, matL0, matA, matZ, matRho, matdEdX,
38
new
Trk
::
MaterialComposition
(elements, fractions))
39
40
{}
41
42
MsgStream&
Trk::MaterialStep::dump
(MsgStream& sl)
const
{
43
sl <<
"----> MaterialStep - recorded at (x/y/z) | r : ("
<<
hitX
() <<
"/ "
;
44
sl <<
hitY
() <<
"/ "
;
45
sl <<
hitZ
() <<
") | "
;
46
sl <<
hitR
() << std::endl;
47
sl <<
" Material (t/x0/l0/A/Z/rho) : ("
<<
steplength
() <<
"/ "
;
48
sl <<
x0
() <<
"/ "
;
49
sl <<
l0
() <<
"/ "
;
50
sl <<
A
() <<
"/ "
;
51
sl <<
Z
() <<
"/ "
;
52
sl <<
rho
() <<
")"
<< std::endl;
53
return
sl;
54
}
55
56
std::ostream&
Trk::MaterialStep::dump
(std::ostream& sl)
const
{
57
sl <<
"----> MaterialStep - recorded at (x/y/z) | r : ("
<<
hitX
() <<
"/ "
;
58
sl <<
hitY
() <<
"/ "
;
59
sl <<
hitZ
() <<
") | "
;
60
sl <<
hitR
() << std::endl;
61
sl <<
" Material (t/x0/l0/A/Z/rho) : ("
<<
steplength
() <<
"/ "
;
62
sl <<
x0
() <<
"/ "
;
63
sl <<
l0
() <<
"/ "
;
64
sl <<
A
() <<
"/ "
;
65
sl <<
Z
() <<
"/ "
;
66
sl <<
rho
() <<
")"
<< std::endl;
67
return
sl;
68
}
69
70
MsgStream&
Trk::operator<<
(MsgStream& sl,
const
Trk::MaterialStep
& mstep) {
71
return
mstep.
dump
(sl);
72
}
73
74
std::ostream&
Trk::operator<<
(std::ostream& sl,
75
const
Trk::MaterialStep
& mstep) {
76
return
mstep.
dump
(sl);
77
}
78
MaterialStep.h
Trk::MaterialComposition
Definition
Material.h:61
Trk::MaterialStep
is needed for the recording of MaterialProperties from Geant4 and read them in with the mapping algor...
Definition
MaterialStep.h:34
Trk::MaterialStep::m_hitY
float m_hitY
Definition
MaterialStep.h:94
Trk::MaterialStep::m_hitX
float m_hitX
Definition
MaterialStep.h:93
Trk::MaterialStep::rho
double rho() const
Definition
MaterialStep.h:126
Trk::MaterialStep::Z
double Z() const
Definition
MaterialStep.h:124
Trk::MaterialStep::MaterialStep
MaterialStep()=default
Default Constructor needed for POOL.
Trk::MaterialStep::l0
double l0() const
Definition
MaterialStep.h:120
Trk::MaterialStep::m_steplength
float m_steplength
Definition
MaterialStep.h:92
Trk::MaterialStep::m_hitR
float m_hitR
Definition
MaterialStep.h:96
Trk::MaterialStep::hitY
double hitY() const
Definition
MaterialStep.h:112
Trk::MaterialStep::m_material
Material m_material
Definition
MaterialStep.h:97
Trk::MaterialStep::steplength
double steplength() const
Access method : steplength.
Definition
MaterialStep.h:100
Trk::MaterialStep::hitR
double hitR() const
Definition
MaterialStep.h:116
Trk::MaterialStep::dump
MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition
MaterialStep.cxx:42
Trk::MaterialStep::A
double A() const
Definition
MaterialStep.h:122
Trk::MaterialStep::m_hitZ
float m_hitZ
Definition
MaterialStep.h:95
Trk::MaterialStep::x0
double x0() const
Access method : material X0/A/Z/rho.
Definition
MaterialStep.h:118
Trk::MaterialStep::hitX
double hitX() const
Access method : hitX,Y,Z,R.
Definition
MaterialStep.h:110
Trk::MaterialStep::hitZ
double hitZ() const
Definition
MaterialStep.h:114
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition
AlignModule.cxx:204
Trk::x
@ x
Definition
ParamDefs.h:55
Trk::z
@ z
global position (cartesian)
Definition
ParamDefs.h:57
Trk::y
@ y
Definition
ParamDefs.h:56
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0