ATLAS Offline Software
Public Member Functions | Protected Attributes | Friends | List of all members
Trk::MaterialStep Class Reference

#include <MaterialStep.h>

Collaboration diagram for Trk::MaterialStep:

Public Member Functions

 MaterialStep ()=default
 Default Constructor needed for POOL. More...
 
 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. More...
 
 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. More...
 
 MaterialStep (const MaterialStep &mstep)=default
 Copy / Move Constructors. More...
 
 MaterialStep (MaterialStep &&mstep)=default
 
MaterialStepoperator= (const MaterialStep &mstep)=default
 Assignment operators. More...
 
MaterialStepoperator= (MaterialStep &&mstep)=default
 
 ~MaterialStep ()=default
 Destructor. More...
 
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...
 
double steplength () const
 Access method : steplength. More...
 
double steplengthInX0 () const
 Access method : steplength. More...
 
double steplengthInL0 () const
 Access method : steplength. More...
 
double hitX () const
 Access method : hitX,Y,Z,R. More...
 
double hitY () const
 
double hitZ () const
 
double hitR () const
 
double x0 () const
 Access method : material X0/A/Z/rho. More...
 
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) {}

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

◆ 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; }

Friends And Related Function Documentation

◆ ::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.

◆ 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:
Trk::MaterialStep::A
double A() const
Definition: MaterialStep.h:122
Trk::y
@ y
Definition: ParamDefs.h:62
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:63
Trk::Material::L0
float L0
Definition: Material.h:120
Trk::MaterialStep::hitX
double hitX() const
Access method : hitX,Y,Z,R.
Definition: MaterialStep.h:110
Trk::Material::Z
float Z
Definition: Material.h:122
Trk::MaterialComposition
Definition: Material.h:60
Trk::MaterialStep::hitR
double hitR() const
Definition: MaterialStep.h:116
Trk::MaterialStep::x0
double x0() const
Access method : material X0/A/Z/rho.
Definition: MaterialStep.h:118
Trk::MaterialStep::steplength
double steplength() const
Access method : steplength.
Definition: MaterialStep.h:100
Trk::Material::A
float A
Definition: Material.h:121
Trk::MaterialStep::l0
double l0() const
Definition: MaterialStep.h:120
Trk::MaterialStep::hitY
double hitY() const
Definition: MaterialStep.h:112
Trk::Material::X0
float X0
Definition: Material.h:119
Trk::MaterialStep::m_hitY
float m_hitY
Definition: MaterialStep.h:94
Trk::MaterialStep::m_hitX
float m_hitX
Definition: MaterialStep.h:93
Trk::MaterialStep::m_material
Material m_material
Definition: MaterialStep.h:97
Trk::Material::rho
float rho
Definition: Material.h:123
Trk::MaterialStep::m_steplength
float m_steplength
Definition: MaterialStep.h:92
Trk::MaterialStep::rho
double rho() const
Definition: MaterialStep.h:126
Trk::x
@ x
Definition: ParamDefs.h:61
Trk::MaterialStep::m_hitZ
float m_hitZ
Definition: MaterialStep.h:95
Trk::MaterialStep::m_hitR
float m_hitR
Definition: MaterialStep.h:96
Trk::MaterialStep::Z
double Z() const
Definition: MaterialStep.h:124
Trk::MaterialStep::hitZ
double hitZ() const
Definition: MaterialStep.h:114