ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::AssociatedMaterial Class Reference

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

#include <AssociatedMaterial.h>

Collaboration diagram for Trk::AssociatedMaterial:

Public Member Functions

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

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) {}
const Trk::TrackingVolume * m_trackingVolume
const Trk::MaterialStep * m_materialStep
const Trk::MaterialProperties * m_materialProperties
Eigen::Matrix< double, 3, 1 > Vector3D

◆ 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) {}
double steplength() const
Access method : steplength.

◆ 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),
47 m_materialProperties(new Trk::MaterialProperties(mat, steplength)),
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),
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.

◆ ~AssociatedMaterial()

Trk::AssociatedMaterial::~AssociatedMaterial ( )

Destructor.

Definition at line 162 of file AssociatedMaterial.cxx.

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

Member Function Documentation

◆ A()

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

Definition at line 195 of file AssociatedMaterial.h.

195 {
196 if (m_materialProperties) return m_materialProperties->averageA();
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;
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}
double x0() const
Access method : material X0/A/Z/rho.

◆ 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;
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 {
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 {
143 m_layer = am.m_layer;
144 m_cleanup = am.m_cleanup;
145
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;
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 {
208 if (m_materialProperties) return m_materialProperties->averageRho();
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 {
169 if (m_materialStep) return m_materialStep->steplength();
170 return 0.;
171}

◆ steplengthInL0()

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

Access method : steplength.

Definition at line 182 of file AssociatedMaterial.h.

182 {
184 return m_materialProperties->thicknessInL0() * m_correctionFactor;
185 if (m_materialStep) return m_materialStep->steplengthInL0();
186 return 0.;
187}

◆ steplengthInX0()

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

Access method : steplength.

Definition at line 174 of file AssociatedMaterial.h.

174 {
176 return m_materialProperties->thicknessInX0() * m_correctionFactor;
177 if (m_materialStep) return m_materialStep->steplengthInX0();
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 {
202 if (m_materialProperties) return m_materialProperties->averageZ();
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: