ATLAS Offline Software
Loading...
Searching...
No Matches
MaterialStep.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// MaterialStep.h, (c) ATLAS Detector software
8
9#ifndef TRKGEOMETRY_MATERIALSTEP_H
10#define TRKGEOMETRY_MATERIALSTEP_H
11
12#include <iostream>
13#include <vector>
14
16
17class MsgStream;
18
20
21namespace Trk {
22
35 public:
37 MaterialStep() = default;
38
40 MaterialStep(float x, float y, float z, float t, float matX0, float matL0,
41 float matA, float matZ, float matRho, float matdEdX = 0.);
42
44 MaterialStep(float x, float y, float z, float t, float matX0, float matL0,
45 float matA, float matZ, float matRho,
46 const std::vector<unsigned char>& elements,
47 const std::vector<unsigned char>& fractions, float matdEdX = 0.);
48
50 MaterialStep(const MaterialStep& mstep) = default;
51 MaterialStep(MaterialStep&& mstep) = default;
52
54 MaterialStep& operator=(const MaterialStep& mstep) = default;
55 MaterialStep& operator=(MaterialStep&& mstep) = default;
56
58 ~MaterialStep() = default;
59
61 MsgStream& dump(MsgStream& sl) const;
62
64 std::ostream& dump(std::ostream& sl) const;
65
67 double steplength() const;
68
70 double steplengthInX0() const;
71
73 double steplengthInL0() const;
74
76 double hitX() const;
77 double hitY() const;
78 double hitZ() const;
79 double hitR() const;
80
82 double x0() const;
83 double l0() const;
84 double A() const;
85 double Z() const;
86 double rho() const;
87
88 const Material& fullMaterial() const;
89
90 protected:
91 friend class ::MaterialStepCnv_p1;
92 float m_steplength = 0;
93 float m_hitX = 0;
94 float m_hitY = 0;
95 float m_hitZ = 0;
96 float m_hitR = 0;
98};
99
100inline double MaterialStep::steplength() const { return m_steplength; }
101
102inline double MaterialStep::steplengthInX0() const {
103 return (m_steplength / m_material.X0);
104}
105
106inline double MaterialStep::steplengthInL0() const {
107 return (m_steplength / m_material.L0);
108}
109
110inline double MaterialStep::hitX() const { return m_hitX; }
111
112inline double MaterialStep::hitY() const { return m_hitY; }
113
114inline double MaterialStep::hitZ() const { return m_hitZ; }
115
116inline double MaterialStep::hitR() const { return m_hitR; }
117
118inline double MaterialStep::x0() const { return m_material.X0; }
119
120inline double MaterialStep::l0() const { return m_material.L0; }
121
122inline double MaterialStep::A() const { return m_material.A; }
123
124inline double MaterialStep::Z() const { return m_material.Z; }
125
126inline double MaterialStep::rho() const { return m_material.rho; }
127
128inline const Material& MaterialStep::fullMaterial() const { return m_material; }
129
132MsgStream& operator<<(MsgStream& sl, const MaterialStep& mstep);
133std::ostream& operator<<(std::ostream& sl, const MaterialStep& mstep);
134
135} // namespace Trk
136
137#endif
is needed for the recording of MaterialProperties from Geant4 and read them in with the mapping algor...
const Material & fullMaterial() const
double rho() const
double steplengthInL0() const
Access method : steplength.
double Z() const
MaterialStep()=default
Default Constructor needed for POOL.
MaterialStep(const MaterialStep &mstep)=default
Copy / Move Constructors.
~MaterialStep()=default
Destructor.
double l0() const
MaterialStep & operator=(const MaterialStep &mstep)=default
Assignment operators.
MaterialStep(MaterialStep &&mstep)=default
double hitY() const
double steplength() const
Access method : steplength.
double hitR() const
MaterialStep & operator=(MaterialStep &&mstep)=default
double A() const
double x0() const
Access method : material X0/A/Z/rho.
double steplengthInX0() const
Access method : steplength.
double hitX() const
Access method : hitX,Y,Z,R.
double hitZ() const
A common object to be contained by.
Definition Material.h:117
Ensure that the ATLAS eigen extensions are properly loaded.
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
@ x
Definition ParamDefs.h:55
@ z
global position (cartesian)
Definition ParamDefs.h:57
@ y
Definition ParamDefs.h:56
-event-from-file