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

is needed for the recording of MaterialProperties from Geant4 and read them in with the mapping algorithm More...

#include <MaterialStep.h>

Collaboration diagram for Trk::MaterialStep:

Public Member Functions

 MaterialStep ()=default
 Default Constructor needed for POOL.
 MaterialStep (float x, float y, float z, float t, float matX0, float matL0, float matA, float matZ, float matRho, float matdEdX=0.)
 Constructor with arguments.
 MaterialStep (float x, float y, float z, float t, float matX0, float matL0, float matA, float matZ, float matRho, const std::vector< unsigned char > &elements, const std::vector< unsigned char > &fractions, float matdEdX=0.)
 Constructor with arguments - used for compound material maps.
 MaterialStep (const MaterialStep &mstep)=default
 Copy / Move Constructors.
 MaterialStep (MaterialStep &&mstep)=default
MaterialStepoperator= (const MaterialStep &mstep)=default
 Assignment operators.
MaterialStepoperator= (MaterialStep &&mstep)=default
 ~MaterialStep ()=default
 Destructor.
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.
double steplength () const
 Access method : steplength.
double steplengthInX0 () const
 Access method : steplength.
double steplengthInL0 () const
 Access method : steplength.
double hitX () const
 Access method : hitX,Y,Z,R.
double hitY () const
double hitZ () const
double hitR () const
double x0 () const
 Access method : material X0/A/Z/rho.
double l0 () const
double A () const
double Z () const
double rho () const
const MaterialfullMaterial () const

Protected Attributes

float m_steplength = 0
float m_hitX = 0
float m_hitY = 0
float m_hitZ = 0
float m_hitR = 0
Material m_material {}

Friends

class ::MaterialStepCnv_p1

Detailed Description

is needed for the recording of MaterialProperties from Geant4 and read them in with the mapping algorithm

The class is very much simplified for the ease of persistency issues.

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

Definition at line 34 of file MaterialStep.h.

Constructor & Destructor Documentation

◆ MaterialStep() [1/5]

Trk::MaterialStep::MaterialStep ( )
default

Default Constructor needed for POOL.

◆ MaterialStep() [2/5]

Trk::MaterialStep::MaterialStep ( float x,
float y,
float z,
float t,
float matX0,
float matL0,
float matA,
float matZ,
float matRho,
float matdEdX = 0. )

Constructor with arguments.

Definition at line 16 of file MaterialStep.cxx.

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) {}
@ x
Definition ParamDefs.h:55
@ z
global position (cartesian)
Definition ParamDefs.h:57
@ y
Definition ParamDefs.h:56

◆ MaterialStep() [3/5]

Trk::MaterialStep::MaterialStep ( float x,
float y,
float z,
float t,
float matX0,
float matL0,
float matA,
float matZ,
float matRho,
const std::vector< unsigned char > & elements,
const std::vector< unsigned char > & fractions,
float matdEdX = 0. )

Constructor with arguments - used for compound material maps.

Definition at line 26 of file MaterialStep.cxx.

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{}

◆ MaterialStep() [4/5]

Trk::MaterialStep::MaterialStep ( const MaterialStep & mstep)
default

Copy / Move Constructors.

◆ MaterialStep() [5/5]

Trk::MaterialStep::MaterialStep ( MaterialStep && mstep)
default

◆ ~MaterialStep()

Trk::MaterialStep::~MaterialStep ( )
default

Destructor.

Member Function Documentation

◆ A()

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

Definition at line 122 of file MaterialStep.h.

122{ return m_material.A; }

◆ dump() [1/2]

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

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

Definition at line 42 of file MaterialStep.cxx.

42 {
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}
double rho() const
double Z() const
double l0() const
double hitY() const
double steplength() const
Access method : steplength.
double hitR() const
double A() const
double x0() const
Access method : material X0/A/Z/rho.
double hitX() const
Access method : hitX,Y,Z,R.
double hitZ() const

◆ dump() [2/2]

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

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

Definition at line 56 of file MaterialStep.cxx.

56 {
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}

◆ fullMaterial()

const Material & Trk::MaterialStep::fullMaterial ( ) const
inline

Definition at line 128 of file MaterialStep.h.

128{ return m_material; }

◆ hitR()

double Trk::MaterialStep::hitR ( ) const
inline

Definition at line 116 of file MaterialStep.h.

116{ return m_hitR; }

◆ hitX()

double Trk::MaterialStep::hitX ( ) const
inline

Access method : hitX,Y,Z,R.

Definition at line 110 of file MaterialStep.h.

110{ return m_hitX; }

◆ hitY()

double Trk::MaterialStep::hitY ( ) const
inline

Definition at line 112 of file MaterialStep.h.

112{ return m_hitY; }

◆ hitZ()

double Trk::MaterialStep::hitZ ( ) const
inline

Definition at line 114 of file MaterialStep.h.

114{ return m_hitZ; }

◆ l0()

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

Definition at line 120 of file MaterialStep.h.

120{ return m_material.L0; }

◆ operator=() [1/2]

MaterialStep & Trk::MaterialStep::operator= ( const MaterialStep & mstep)
default

Assignment operators.

◆ operator=() [2/2]

MaterialStep & Trk::MaterialStep::operator= ( MaterialStep && mstep)
default

◆ rho()

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

Definition at line 126 of file MaterialStep.h.

126{ return m_material.rho; }

◆ steplength()

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

Access method : steplength.

Definition at line 100 of file MaterialStep.h.

100{ return m_steplength; }

◆ steplengthInL0()

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

Access method : steplength.

Definition at line 106 of file MaterialStep.h.

106 {
107 return (m_steplength / m_material.L0);
108}

◆ steplengthInX0()

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

Access method : steplength.

Definition at line 102 of file MaterialStep.h.

102 {
103 return (m_steplength / m_material.X0);
104}

◆ x0()

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

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

Definition at line 118 of file MaterialStep.h.

118{ return m_material.X0; }

◆ Z()

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

Definition at line 124 of file MaterialStep.h.

124{ return m_material.Z; }

◆ ::MaterialStepCnv_p1

friend class ::MaterialStepCnv_p1
friend

Definition at line 91 of file MaterialStep.h.

Member Data Documentation

◆ m_hitR

float Trk::MaterialStep::m_hitR = 0
protected

Definition at line 96 of file MaterialStep.h.

◆ m_hitX

float Trk::MaterialStep::m_hitX = 0
protected

Definition at line 93 of file MaterialStep.h.

◆ m_hitY

float Trk::MaterialStep::m_hitY = 0
protected

Definition at line 94 of file MaterialStep.h.

◆ m_hitZ

float Trk::MaterialStep::m_hitZ = 0
protected

Definition at line 95 of file MaterialStep.h.

◆ m_material

Material Trk::MaterialStep::m_material {}
protected

Definition at line 97 of file MaterialStep.h.

97{};

◆ m_steplength

float Trk::MaterialStep::m_steplength = 0
protected

Definition at line 92 of file MaterialStep.h.


The documentation for this class was generated from the following files: