ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Trk::AssociatedMaterial Class Reference

#include <AssociatedMaterial.h>

Collaboration diagram for Trk::AssociatedMaterial:

Public Member Functions

 AssociatedMaterial ()
 Default constructor. More...
 
 AssociatedMaterial (const Amg::Vector3D &hitpos, float steplength, float X0, float L0, float A, float Z, float rho, float correctionFactor, const Trk::TrackingVolume *tvol, const Trk::Layer *lay)
 Constructor with explicit arguments
More...
 
 AssociatedMaterial (const Amg::Vector3D &hitpos, float steplength, const Trk::Material &, float correctionFactor, const Trk::TrackingVolume *tvol, const Trk::Layer *lay)
 Constructor with Material. More...
 
 AssociatedMaterial (const Amg::Vector3D &hitpos, const Trk::MaterialProperties *, float correctionFactor, const Trk::TrackingVolume *tvol, const Trk::Layer *lay)
 Constructor with Material Properties - ownership stays with holder. More...
 
 AssociatedMaterial (const Trk::MaterialStep *, float correctionFactor, const Trk::TrackingVolume *tvol, const Trk::Layer *lay)
 Constructor with MaterialStep - ownership stays with holder. More...
 
 AssociatedMaterial (const Amg::Vector3D &hitpos, const Trk::TrackingVolume *tvol, const Trk::Layer *lay)
 Constructor for empty material bin found in validation. More...
 
 AssociatedMaterial (const AssociatedMaterial &am)
 Copy constructor. More...
 
 AssociatedMaterial (AssociatedMaterial &&am) noexcept
 Move constructor. More...
 
 ~AssociatedMaterial ()
 Destructor. More...
 
AssociatedMaterialoperator= (const AssociatedMaterial &am)
 Assignment operator. More...
 
AssociatedMaterialoperator= (AssociatedMaterial &&am) noexcept
 Move Assignment operator. More...
 
const Trk::MaterialPropertiesmaterialProperties () const
 Trivial Access methods. More...
 
const Trk::MaterialStepmaterialStep () const
 Trivial Access methods. More...
 
const Amg::Vector3DmaterialPosition () const
 Trivial Access methods. More...
 
double correctionFactor () const
 Trivial Access methods. More...
 
const Trk::TrackingVolumeassociatedTrackingVolume () const
 Trivial Access methods. More...
 
const Trk::LayerassociatedLayer () const
 Trivial Access methods. More...
 
double steplength () const
 Access method : steplength. More...
 
double steplengthInX0 () const
 Access method : steplength. More...
 
double steplengthInL0 () const
 Access method : steplength. More...
 
double x0 () const
 Access method : material X0/A/Z/rho. More...
 
double l0 () const
 
double A () const
 
double Z () const
 
double rho () const
 
MsgStream & dump (MsgStream &sl) const
 Output Method for MsgStream, to be overloaded by child classes. More...
 
std::ostream & dump (std::ostream &sl) const
 Output Method for std::ostream, to be overloaded by child classes. More...
 

Private Attributes

Amg::Vector3D m_materialPosition
 
float m_correctionFactor
 
const Trk::MaterialPropertiesm_materialProperties
 
const Trk::MaterialStepm_materialStep
 
const Trk::TrackingVolumem_trackingVolume
 
const Trk::Layerm_layer
 
bool m_cleanup
 

Detailed Description

It is used in the Mapping process ( using MaterialSteps ), the validation and recostruction ( using MaterialProperties )

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 33 of file AssociatedMaterial.h.

Constructor & Destructor Documentation

◆ AssociatedMaterial() [1/8]

Trk::AssociatedMaterial::AssociatedMaterial ( )

Default constructor.

Definition at line 18 of file AssociatedMaterial.cxx.

19  : m_materialPosition(Amg::Vector3D(0., 0., 0.)),
21  m_materialProperties(nullptr),
22  m_materialStep(nullptr),
23  m_trackingVolume(nullptr),
24  m_layer(nullptr),
25  m_cleanup(false) {}

◆ AssociatedMaterial() [2/8]

Trk::AssociatedMaterial::AssociatedMaterial ( const Amg::Vector3D hitpos,
float  steplength,
float  X0,
float  L0,
float  A,
float  Z,
float  rho,
float  correctionFactor,
const Trk::TrackingVolume tvol,
const Trk::Layer lay 
)

Constructor with explicit arguments

Definition at line 27 of file AssociatedMaterial.cxx.

33  : m_materialPosition(hitpos),
34  m_correctionFactor(cFactor),
35  m_materialProperties(nullptr),
36  m_materialStep(new Trk::MaterialStep(hitpos.x(), hitpos.y(), hitpos.z(),
37  steplength, X0, L0, A, Z, rho)),
38  m_trackingVolume(tvol),
39  m_layer(lay),
40  m_cleanup(true) {}

◆ AssociatedMaterial() [3/8]

Trk::AssociatedMaterial::AssociatedMaterial ( const Amg::Vector3D hitpos,
float  steplength,
const Trk::Material mat,
float  correctionFactor,
const Trk::TrackingVolume tvol,
const Trk::Layer lay 
)

Constructor with Material.

Definition at line 42 of file AssociatedMaterial.cxx.

45  : m_materialPosition(hitpos),
46  m_correctionFactor(cFactor),
48  m_materialStep(nullptr),
49  m_trackingVolume(tvol),
50  m_layer(lay),
51  m_cleanup(true) {}

◆ AssociatedMaterial() [4/8]

Trk::AssociatedMaterial::AssociatedMaterial ( const Amg::Vector3D hitpos,
const Trk::MaterialProperties mprop,
float  correctionFactor,
const Trk::TrackingVolume tvol,
const Trk::Layer lay 
)

Constructor with Material Properties - ownership stays with holder.

Definition at line 53 of file AssociatedMaterial.cxx.

56  : m_materialPosition(hitpos),
57  m_correctionFactor(cFactor),
58  m_materialProperties(mprop),
59  m_materialStep(nullptr),
60  m_trackingVolume(tvol),
61  m_layer(lay),
62  m_cleanup(false)
63 
64 {}

◆ AssociatedMaterial() [5/8]

Trk::AssociatedMaterial::AssociatedMaterial ( const Trk::MaterialStep ms,
float  correctionFactor,
const Trk::TrackingVolume tvol,
const Trk::Layer lay 
)

Constructor with MaterialStep - ownership stays with holder.

Definition at line 66 of file AssociatedMaterial.cxx.

70  : m_materialPosition(Amg::Vector3D(ms->hitX(), ms->hitY(), ms->hitZ())),
71  m_correctionFactor(cFactor),
72  m_materialProperties(nullptr),
74  m_trackingVolume(tvol),
75  m_layer(lay),
76  m_cleanup(false) {}

◆ AssociatedMaterial() [6/8]

Trk::AssociatedMaterial::AssociatedMaterial ( const Amg::Vector3D hitpos,
const Trk::TrackingVolume tvol,
const Trk::Layer lay 
)

Constructor for empty material bin found in validation.

Definition at line 78 of file AssociatedMaterial.cxx.

81  : m_materialPosition(hitpos),
83  m_materialProperties(nullptr),
84  m_materialStep(nullptr),
85  m_trackingVolume(tvol),
86  m_layer(lay),
87  m_cleanup(false) {}

◆ AssociatedMaterial() [7/8]

Trk::AssociatedMaterial::AssociatedMaterial ( const AssociatedMaterial am)

Copy constructor.

Definition at line 89 of file AssociatedMaterial.cxx.

90  : m_materialPosition(am.m_materialPosition),
91  m_correctionFactor(am.m_correctionFactor),
92  m_materialProperties(am.m_cleanup && am.m_materialProperties
93  ? am.m_materialProperties->clone()
94  : am.m_materialProperties),
95  m_materialStep((am.m_cleanup && am.m_materialStep)
96  ? new Trk::MaterialStep(*am.m_materialStep)
97  : am.m_materialStep),
98  m_trackingVolume(am.m_trackingVolume),
99  m_layer(am.m_layer),
100  m_cleanup(am.m_cleanup) {}

◆ AssociatedMaterial() [8/8]

Trk::AssociatedMaterial::AssociatedMaterial ( Trk::AssociatedMaterial &&  am)
noexcept

Move constructor.

Definition at line 102 of file AssociatedMaterial.cxx.

104  : m_materialPosition(std::move(am.m_materialPosition)),
109  m_layer(am.m_layer),
110  m_cleanup(am.m_cleanup) {
111  am.m_materialProperties = nullptr;
112  am.m_materialStep = nullptr;
113  am.m_cleanup = false;
114 }

◆ ~AssociatedMaterial()

Trk::AssociatedMaterial::~AssociatedMaterial ( )

Destructor.

Definition at line 162 of file AssociatedMaterial.cxx.

162  {
163  if (m_cleanup) {
164  delete m_materialStep;
165  delete m_materialProperties;
166  }
167 }

Member Function Documentation

◆ A()

double Trk::AssociatedMaterial::A ( ) const
inline

Definition at line 195 of file AssociatedMaterial.h.

195  {
197  if (m_materialStep) return m_materialStep->A();
198  return 0.;
199 }

◆ associatedLayer()

const Trk::Layer * Trk::AssociatedMaterial::associatedLayer ( ) const
inline

Trivial Access methods.

Definition at line 155 of file AssociatedMaterial.h.

155  {
156  return m_layer;
157 }

◆ associatedTrackingVolume()

const Trk::TrackingVolume * Trk::AssociatedMaterial::associatedTrackingVolume ( ) const
inline

Trivial Access methods.

Definition at line 149 of file AssociatedMaterial.h.

150  {
151  return m_trackingVolume;
152 }

◆ correctionFactor()

double Trk::AssociatedMaterial::correctionFactor ( ) const
inline

Trivial Access methods.

Definition at line 144 of file AssociatedMaterial.h.

144  {
145  return m_correctionFactor;
146 }

◆ dump() [1/2]

MsgStream & Trk::AssociatedMaterial::dump ( MsgStream &  sl) const

Output Method for MsgStream, to be overloaded by child classes.

Definition at line 169 of file AssociatedMaterial.cxx.

169  {
170  sl << "----> AssociatedMaterial - recorded at (x/y/z) | r : ("
171  << m_materialPosition.x() << "/ ";
172  sl << m_materialPosition.y() << "/ ";
173  sl << m_materialPosition.z() << ")" << std::endl;
174  sl << " Material (t/x0/l0/A/Z/rho) : (" << steplength() << "/ ";
175  sl << x0() << "/ ";
176  sl << l0() << "/ ";
177  sl << A() << "/ ";
178  sl << Z() << "/ ";
179  sl << rho() << ")" << std::endl;
180  if (m_trackingVolume)
181  sl << " Associated to TrackingVolume : "
182  << m_trackingVolume->volumeName() << std::endl;
183  if (m_layer)
184  sl << " and Layer with Index : "
185  << m_layer->layerIndex().value() << std::endl;
186  return sl;
187 }

◆ dump() [2/2]

std::ostream & Trk::AssociatedMaterial::dump ( std::ostream &  sl) const

Output Method for std::ostream, to be overloaded by child classes.

Definition at line 189 of file AssociatedMaterial.cxx.

189  {
190  sl << "----> AssociatedMaterial - recorded at (x/y/z) | r : ("
191  << m_materialPosition.x() << "/ ";
192  sl << m_materialPosition.y() << "/ ";
193  sl << m_materialPosition.z() << ")" << std::endl;
194  sl << " Material (t/x0/l0/A/Z/rho) : (" << steplength() << "/ ";
195  sl << x0() << "/ ";
196  sl << l0() << "/ ";
197  sl << A() << "/ ";
198  sl << Z() << "/ ";
199  sl << rho() << ")" << std::endl;
200  if (m_trackingVolume)
201  sl << " Associated to TrackingVolume : "
202  << m_trackingVolume->volumeName() << std::endl;
203  if (m_layer)
204  sl << " and Layer with Index : "
205  << m_layer->layerIndex().value() << std::endl;
206  return sl;
207 }

◆ l0()

double Trk::AssociatedMaterial::l0 ( ) const
inline

Definition at line 189 of file AssociatedMaterial.h.

189  {
191  if (m_materialStep) return m_materialStep->l0();
192  return 0.;
193 }

◆ materialPosition()

const Amg::Vector3D & Trk::AssociatedMaterial::materialPosition ( ) const
inline

Trivial Access methods.

Definition at line 139 of file AssociatedMaterial.h.

139  {
140  return m_materialPosition;
141 }

◆ materialProperties()

const Trk::MaterialProperties * Trk::AssociatedMaterial::materialProperties ( ) const
inline

Trivial Access methods.

Definition at line 128 of file AssociatedMaterial.h.

129  {
130  return m_materialProperties;
131 }

◆ materialStep()

const Trk::MaterialStep * Trk::AssociatedMaterial::materialStep ( ) const
inline

Trivial Access methods.

Definition at line 134 of file AssociatedMaterial.h.

134  {
135  return m_materialStep;
136 }

◆ operator=() [1/2]

Trk::AssociatedMaterial & Trk::AssociatedMaterial::operator= ( Trk::AssociatedMaterial &&  am)
noexcept

Move Assignment operator.

Definition at line 138 of file AssociatedMaterial.cxx.

139  {
140  m_materialPosition = std::move(am.m_materialPosition);
143  m_layer = am.m_layer;
144  m_cleanup = am.m_cleanup;
145 
147  delete m_materialProperties;
148  }
150  am.m_materialProperties = nullptr;
151 
153  delete m_materialStep;
154  }
156  am.m_materialStep = nullptr;
157 
158  am.m_cleanup = false;
159  return *this;
160 }

◆ operator=() [2/2]

Trk::AssociatedMaterial & Trk::AssociatedMaterial::operator= ( const AssociatedMaterial am)

Assignment operator.

Definition at line 116 of file AssociatedMaterial.cxx.

117  {
118  if (&am != this) {
119  if (m_cleanup) {
120  delete m_materialStep;
121  delete m_materialProperties;
122  }
123  m_materialPosition = am.m_materialPosition;
124  m_correctionFactor = am.m_correctionFactor;
125  m_materialProperties = (am.m_cleanup && am.m_materialProperties)
126  ? am.m_materialProperties->clone()
127  : am.m_materialProperties;
128  m_materialStep = (am.m_cleanup && am.m_materialStep)
129  ? new Trk::MaterialStep(*am.m_materialStep)
130  : am.m_materialStep;
131  m_trackingVolume = am.m_trackingVolume;
132  m_layer = am.m_layer;
133  m_cleanup = am.m_cleanup;
134  }
135  return (*this);
136 }

◆ rho()

double Trk::AssociatedMaterial::rho ( ) const
inline

Definition at line 207 of file AssociatedMaterial.h.

207  {
209  if (m_materialStep) return m_materialStep->rho();
210  return 0.;
211 }

◆ steplength()

double Trk::AssociatedMaterial::steplength ( ) const
inline

Access method : steplength.

Definition at line 167 of file AssociatedMaterial.h.

167  {
170  return 0.;
171 }

◆ steplengthInL0()

double Trk::AssociatedMaterial::steplengthInL0 ( ) const
inline

Access method : steplength.

Definition at line 182 of file AssociatedMaterial.h.

182  {
186  return 0.;
187 }

◆ steplengthInX0()

double Trk::AssociatedMaterial::steplengthInX0 ( ) const
inline

Access method : steplength.

Definition at line 174 of file AssociatedMaterial.h.

174  {
178  return 0.;
179 }

◆ x0()

double Trk::AssociatedMaterial::x0 ( ) const
inline

Access method : material X0/A/Z/rho.

Access method :

Definition at line 160 of file AssociatedMaterial.h.

160  {
162  if (m_materialStep) return m_materialStep->x0();
163  return 0.;
164 }

◆ Z()

double Trk::AssociatedMaterial::Z ( ) const
inline

Definition at line 201 of file AssociatedMaterial.h.

201  {
203  if (m_materialStep) return m_materialStep->Z();
204  return 0.;
205 }

Member Data Documentation

◆ m_cleanup

bool Trk::AssociatedMaterial::m_cleanup
private

Definition at line 124 of file AssociatedMaterial.h.

◆ m_correctionFactor

float Trk::AssociatedMaterial::m_correctionFactor
private

Definition at line 119 of file AssociatedMaterial.h.

◆ m_layer

const Trk::Layer* Trk::AssociatedMaterial::m_layer
private

Definition at line 123 of file AssociatedMaterial.h.

◆ m_materialPosition

Amg::Vector3D Trk::AssociatedMaterial::m_materialPosition
private

Definition at line 118 of file AssociatedMaterial.h.

◆ m_materialProperties

const Trk::MaterialProperties* Trk::AssociatedMaterial::m_materialProperties
private

Definition at line 120 of file AssociatedMaterial.h.

◆ m_materialStep

const Trk::MaterialStep* Trk::AssociatedMaterial::m_materialStep
private

Definition at line 121 of file AssociatedMaterial.h.

◆ m_trackingVolume

const Trk::TrackingVolume* Trk::AssociatedMaterial::m_trackingVolume
private

Definition at line 122 of file AssociatedMaterial.h.


The documentation for this class was generated from the following files:
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].
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
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::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
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Trk::AssociatedMaterial::m_layer
const Trk::Layer * m_layer
Definition: AssociatedMaterial.h:123
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
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::MaterialProperties::clone
MaterialProperties * clone() const
Pseudo-Constructor clone()
Definition: MaterialProperties.cxx:33
Trk::AssociatedMaterial::l0
double l0() const
Definition: AssociatedMaterial.h:189
Trk::LayerIndex::value
int value() const
layerIndex expressed in an integer
Definition: LayerIndex.h:71
Trk::MaterialStep::steplengthInL0
double steplengthInL0() const
Access method : steplength.
Definition: MaterialStep.h:106
Trk::TrackingVolume::volumeName
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
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
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::MaterialProperties
Definition: MaterialProperties.h:40
Trk::AssociatedMaterial::m_materialPosition
Amg::Vector3D m_materialPosition
Definition: AssociatedMaterial.h:118
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::rho
double rho() const
Definition: AssociatedMaterial.h:207
Trk::MaterialStep::rho
double rho() const
Definition: MaterialStep.h:126
Trk::MaterialProperties::l0
float l0() const
Return the nuclear interaction length.
Trk::L0
@ L0
Definition: AlignModuleList.h:32
Trk::MaterialStep::Z
double Z() const
Definition: MaterialStep.h:124
Trk::Layer::layerIndex
const LayerIndex & layerIndex() const
get the layerIndex