ATLAS Offline Software
AssociatedMaterial.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // AssociatedMaterial.h, (c) ATLAS Detector software
8 
9 #ifndef TRKGEOMETRY_ASSOCIATEDMATERIAL_H
10 #define TRKGEOMETRY_ASSOCIATEDMATERIAL_H
11 
12 // Amg
14 // Trk includes
17 
18 class MsgStream;
19 
20 namespace Trk {
21 
22 class Layer;
23 class TrackingVolume;
24 
34  public:
37 
39  AssociatedMaterial(const Amg::Vector3D& hitpos, float steplength, float X0,
40  float L0, float A, float Z, float rho,
41  float correctionFactor, const Trk::TrackingVolume* tvol,
42  const Trk::Layer* lay);
43 
45  AssociatedMaterial(const Amg::Vector3D& hitpos, float steplength,
46  const Trk::Material&, float correctionFactor,
47  const Trk::TrackingVolume* tvol, const Trk::Layer* lay);
48 
50  AssociatedMaterial(const Amg::Vector3D& hitpos,
52  const Trk::TrackingVolume* tvol, const Trk::Layer* lay);
53 
56  const Trk::TrackingVolume* tvol, const Trk::Layer* lay);
57 
59  AssociatedMaterial(const Amg::Vector3D& hitpos,
60  const Trk::TrackingVolume* tvol, const Trk::Layer* lay);
61 
64 
67 
70 
73 
76 
79 
81  const Trk::MaterialStep* materialStep() const;
82 
84  const Amg::Vector3D& materialPosition() const;
85 
87  double correctionFactor() const;
88 
91 
93  const Trk::Layer* associatedLayer() const;
94 
96  double steplength() const;
97 
99  double steplengthInX0() const;
100 
102  double steplengthInL0() const;
103 
105  double x0() const;
106  double l0() const;
107  double A() const;
108  double Z() const;
109  double rho() const;
110 
112  MsgStream& dump(MsgStream& sl) const;
113 
115  std::ostream& dump(std::ostream& sl) const;
116 
117  private:
124  bool m_cleanup;
125 };
126 
129  const {
130  return m_materialProperties;
131 }
132 
135  return m_materialStep;
136 }
137 
140  return m_materialPosition;
141 }
142 
145  return m_correctionFactor;
146 }
147 
150  const {
151  return m_trackingVolume;
152 }
153 
156  return m_layer;
157 }
158 
160 inline double AssociatedMaterial::x0() const {
162  if (m_materialStep) return m_materialStep->x0();
163  return 0.;
164 }
165 
167 inline double AssociatedMaterial::steplength() const {
170  return 0.;
171 }
172 
174 inline double AssociatedMaterial::steplengthInX0() const {
178  return 0.;
179 }
180 
182 inline double AssociatedMaterial::steplengthInL0() const {
186  return 0.;
187 }
188 
189 inline double AssociatedMaterial::l0() const {
191  if (m_materialStep) return m_materialStep->l0();
192  return 0.;
193 }
194 
195 inline double AssociatedMaterial::A() const {
197  if (m_materialStep) return m_materialStep->A();
198  return 0.;
199 }
200 
201 inline double AssociatedMaterial::Z() const {
203  if (m_materialStep) return m_materialStep->Z();
204  return 0.;
205 }
206 
207 inline double AssociatedMaterial::rho() const {
209  if (m_materialStep) return m_materialStep->rho();
210  return 0.;
211 }
212 
215 MsgStream& operator<<(MsgStream& sl, const AssociatedMaterial& mstep);
216 std::ostream& operator<<(std::ostream& sl, const AssociatedMaterial& mstep);
217 
218 } // namespace Trk
219 
220 #endif
Trk::MaterialStep::A
double A() const
Definition: MaterialStep.h:122
Trk::AssociatedMaterial::m_materialProperties
const Trk::MaterialProperties * m_materialProperties
Definition: AssociatedMaterial.h:120
Trk::MaterialProperties::averageA
float averageA() const
Return the average A of the material [gram/mole].
Trk::AssociatedMaterial::steplengthInL0
double steplengthInL0() const
Access method : steplength.
Definition: AssociatedMaterial.h:182
MaterialProperties.h
Trk::AssociatedMaterial::m_materialStep
const Trk::MaterialStep * m_materialStep
Definition: AssociatedMaterial.h:121
Trk::AssociatedMaterial::steplength
double steplength() const
Access method : steplength.
Definition: AssociatedMaterial.h:167
Trk::MaterialProperties::thicknessInX0
float thicknessInX0() const
Return the radiationlength fraction.
Trk::AssociatedMaterial::materialStep
const Trk::MaterialStep * materialStep() const
Trivial Access methods.
Definition: AssociatedMaterial.h:134
Trk::AssociatedMaterial::associatedLayer
const Trk::Layer * associatedLayer() const
Trivial Access methods.
Definition: AssociatedMaterial.h:155
Trk::AssociatedMaterial::AssociatedMaterial
AssociatedMaterial()
Default constructor.
Definition: AssociatedMaterial.cxx:18
Trk::MaterialStep::steplengthInX0
double steplengthInX0() const
Access method : steplength.
Definition: MaterialStep.h:102
Trk::MaterialProperties::averageRho
float averageRho() const
Return the average density of the material.
Trk::MaterialProperties::thicknessInL0
float thicknessInL0() const
Return the nuclear interaction length fraction.
Trk::MaterialProperties::x0
float x0() const
Return the radiation length.
Trk::AssociatedMaterial::x0
double x0() const
Access method : material X0/A/Z/rho.
Definition: AssociatedMaterial.h:160
Trk::AssociatedMaterial::operator=
AssociatedMaterial & operator=(const AssociatedMaterial &am)
Assignment operator.
Definition: AssociatedMaterial.cxx:116
Trk::AssociatedMaterial::m_layer
const Trk::Layer * m_layer
Definition: AssociatedMaterial.h:123
python.RingerConstants.Layer
Layer
Definition: RingerConstants.py:42
Trk::MaterialStep::x0
double x0() const
Access method : material X0/A/Z/rho.
Definition: MaterialStep.h:118
pdg_comparison.X0
X0
Definition: pdg_comparison.py:314
GeoPrimitives.h
Trk::MaterialStep
Definition: MaterialStep.h:34
A
Trk::MaterialStep::steplength
double steplength() const
Access method : steplength.
Definition: MaterialStep.h:100
Trk::MaterialStep::l0
double l0() const
Definition: MaterialStep.h:120
Trk::AssociatedMaterial::A
double A() const
Definition: AssociatedMaterial.h:195
Trk::AssociatedMaterial::l0
double l0() const
Definition: AssociatedMaterial.h:189
Trk::AssociatedMaterial::associatedTrackingVolume
const Trk::TrackingVolume * associatedTrackingVolume() const
Trivial Access methods.
Definition: AssociatedMaterial.h:149
Trk::AssociatedMaterial
Definition: AssociatedMaterial.h:33
Trk::MaterialStep::steplengthInL0
double steplengthInL0() const
Access method : steplength.
Definition: MaterialStep.h:106
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::AssociatedMaterial::Z
double Z() const
Definition: AssociatedMaterial.h:201
Trk::AssociatedMaterial::m_cleanup
bool m_cleanup
Definition: AssociatedMaterial.h:124
Trk::AssociatedMaterial::m_correctionFactor
float m_correctionFactor
Definition: AssociatedMaterial.h:119
Trk::AssociatedMaterial::materialPosition
const Amg::Vector3D & materialPosition() const
Trivial Access methods.
Definition: AssociatedMaterial.h:139
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::AssociatedMaterial::correctionFactor
double correctionFactor() const
Trivial Access methods.
Definition: AssociatedMaterial.h:144
Trk::MaterialProperties
Definition: MaterialProperties.h:40
Trk::AssociatedMaterial::m_materialPosition
Amg::Vector3D m_materialPosition
Definition: AssociatedMaterial.h:118
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
Trk::MaterialProperties::averageZ
float averageZ() const
Returns the average Z of the material.
Trk::AssociatedMaterial::m_trackingVolume
const Trk::TrackingVolume * m_trackingVolume
Definition: AssociatedMaterial.h:122
Trk::AssociatedMaterial::steplengthInX0
double steplengthInX0() const
Access method : steplength.
Definition: AssociatedMaterial.h:174
Trk::AssociatedMaterial::rho
double rho() const
Definition: AssociatedMaterial.h:207
Trk::Material
Definition: Material.h:116
Trk::MaterialStep::rho
double rho() const
Definition: MaterialStep.h:126
Trk::MaterialProperties::l0
float l0() const
Return the nuclear interaction length.
Trk::TrackingVolume
Definition: TrackingVolume.h:121
Trk::AssociatedMaterial::materialProperties
const Trk::MaterialProperties * materialProperties() const
Trivial Access methods.
Definition: AssociatedMaterial.h:128
Trk::L0
@ L0
Definition: AlignModuleList.h:32
Trk::MaterialStep::Z
double Z() const
Definition: MaterialStep.h:124
Trk::AssociatedMaterial::~AssociatedMaterial
~AssociatedMaterial()
Destructor.
Definition: AssociatedMaterial.cxx:162
Trk::AssociatedMaterial::dump
MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition: AssociatedMaterial.cxx:169
Trk::Layer
Definition: Layer.h:73
MaterialStep.h