ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::HomogeneousLayerMaterial Class Referencefinal

It extends the LayerMaterialProperties base class. More...

#include <HomogeneousLayerMaterial.h>

Inheritance diagram for Trk::HomogeneousLayerMaterial:
Collaboration diagram for Trk::HomogeneousLayerMaterial:

Public Member Functions

 HomogeneousLayerMaterial ()
 Default Constructor - creates empty HomogeneousLayerMaterial.
 HomogeneousLayerMaterial (const MaterialProperties &full, double splitFactor)
 Explicit constructor with only full MaterialProperties.
 HomogeneousLayerMaterial (const HomogeneousLayerMaterial &mprop)
 Copy Constructor.
virtual ~HomogeneousLayerMaterial () override
 Destructor.
virtual HomogeneousLayerMaterialclone () const override
 Pseudo-Constructor clone()
HomogeneousLayerMaterialoperator= (const HomogeneousLayerMaterial &lmp)
 Assignment operator.
 HomogeneousLayerMaterial (Trk::HomogeneousLayerMaterial &&lmp)=default
 Default move constructor.
HomogeneousLayerMaterialoperator= (Trk::HomogeneousLayerMaterial &&lmp)=default
 Default move assignment operator.
virtual HomogeneousLayerMaterialoperator*= (double scale) override
 Scale operator.
virtual const MaterialPropertiesfullMaterial (const Amg::Vector3D &gp) const override
 Return method for full material description of the Layer.
virtual const MaterialPropertiesmaterial (size_t ib0, size_t ib1) const override
 Direct access via bins to the MaterialProperties.
virtual const BinUtilitybinUtility () const override
 Return the BinUtility.
virtual void updateBinning (BinUtility *) override
 Update the BinUtility if necessary - passing ownership of the utility class.
virtual MsgStream & dump (MsgStream &sl) const override
 Output Method for MsgStream, to be overloaded by child classes.
virtual std::ostream & dump (std::ostream &sl) const override
 Output Method for std::ostream, to be overloaded by child classes.
void updateElementTable (const std::shared_ptr< const ElementTable > &) const
 Update the ElementTable.
const ElementTableelementTable () const
 Get the ElementTable.
double factor (PropDirection pDir, MaterialUpdateStage mStage) const
 Update pre factor.
double alongPreFactor () const
 Return method for pre update material description of the Layer along normalvector.
double alongPostFactor () const
 Return method for post update material description of the Layer along normalvector.
double oppositePreFactor () const
 Return method for pre update material description of the Layer along normalvector.
double oppositePostFactor () const
 Return method for post update material description of the Layer along normalvector.

Protected Attributes

double m_splitFactor
 the split factor in favour of oppositePre

Private Attributes

std::unique_ptr< MaterialPropertiesm_fullMaterial
 The five different MaterialProperties.

Friends

class ::HomogeneousLayerMaterialCnv_p1

Detailed Description

It extends the LayerMaterialProperties base class.

This class encapsulates the logic to build pre/post/full update material for Layer structures, it hosts 5 different MaterialProperties in the following order:

  • fullUpdate (crossing full Layer in both directions)
  • alongPreUpdate (passing material to sensitive part in the direction of the normal vector)
  • alongPostUpdate (passing material after sensitive part in the direction of the normal vector)
  • oppositePreUpdate (passing material to sensitive part in the opposite direction to the normal vector)
  • oppositePostUpdate (passing material after sensitive part in the opposite direction to the normal vector)

This is handled by a full Layer information and a split factor.

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

Definition at line 53 of file HomogeneousLayerMaterial.h.

Constructor & Destructor Documentation

◆ HomogeneousLayerMaterial() [1/4]

Trk::HomogeneousLayerMaterial::HomogeneousLayerMaterial ( )

Default Constructor - creates empty HomogeneousLayerMaterial.

Definition at line 13 of file HomogeneousLayerMaterial.cxx.

14 : Trk::LayerMaterialProperties(), m_fullMaterial(nullptr) {}
std::unique_ptr< MaterialProperties > m_fullMaterial
The five different MaterialProperties.

◆ HomogeneousLayerMaterial() [2/4]

Trk::HomogeneousLayerMaterial::HomogeneousLayerMaterial ( const MaterialProperties & full,
double splitFactor )

Explicit constructor with only full MaterialProperties.

alongPre and oppositePre, alongPre and oppositePost are obviously swapped

Definition at line 16 of file HomogeneousLayerMaterial.cxx.

18 : Trk::LayerMaterialProperties(splitFactor), m_fullMaterial(full.clone()) {}

◆ HomogeneousLayerMaterial() [3/4]

Trk::HomogeneousLayerMaterial::HomogeneousLayerMaterial ( const HomogeneousLayerMaterial & mprop)

Copy Constructor.

Definition at line 20 of file HomogeneousLayerMaterial.cxx.

22 : LayerMaterialProperties(lmp.m_splitFactor),
23 m_fullMaterial(lmp.m_fullMaterial ? lmp.m_fullMaterial->clone()
24 : nullptr) {}

◆ ~HomogeneousLayerMaterial()

Trk::HomogeneousLayerMaterial::~HomogeneousLayerMaterial ( )
overridevirtualdefault

Destructor.

◆ HomogeneousLayerMaterial() [4/4]

Trk::HomogeneousLayerMaterial::HomogeneousLayerMaterial ( Trk::HomogeneousLayerMaterial && lmp)
default

Default move constructor.

Member Function Documentation

◆ alongPostFactor()

double Trk::LayerMaterialProperties::alongPostFactor ( ) const
inlineinherited

Return method for post update material description of the Layer along normalvector.

Definition at line 142 of file LayerMaterialProperties.h.

142 {
143 return m_splitFactor;
144}
double m_splitFactor
the split factor in favour of oppositePre

◆ alongPreFactor()

double Trk::LayerMaterialProperties::alongPreFactor ( ) const
inlineinherited

Return method for pre update material description of the Layer along normalvector.

inline return methods for the pre/post factors

Definition at line 138 of file LayerMaterialProperties.h.

138 {
139 return (1. - m_splitFactor);
140}

◆ binUtility()

virtual const BinUtility * Trk::HomogeneousLayerMaterial::binUtility ( ) const
inlineoverridevirtual

Return the BinUtility.

Implements Trk::LayerMaterialProperties.

Definition at line 93 of file HomogeneousLayerMaterial.h.

93{ return nullptr; }

◆ clone()

HomogeneousLayerMaterial * Trk::HomogeneousLayerMaterial::clone ( ) const
inlineoverridevirtual

Pseudo-Constructor clone()

Implements Trk::LayerMaterialProperties.

Definition at line 111 of file HomogeneousLayerMaterial.h.

111 {
112 return new HomogeneousLayerMaterial(*this);
113}
HomogeneousLayerMaterial()
Default Constructor - creates empty HomogeneousLayerMaterial.

◆ dump() [1/2]

MsgStream & Trk::HomogeneousLayerMaterial::dump ( MsgStream & sl) const
overridevirtual

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

Implements Trk::LayerMaterialProperties.

Definition at line 47 of file HomogeneousLayerMaterial.cxx.

47 {
48 sl << "Trk::HomogeneousLayerMaterial : " << std::endl;
49 if (m_fullMaterial) {
50 sl << " - fullMaterial : " << *m_fullMaterial << std::endl;
51 }
52 sl << " - split factor : " << m_splitFactor << std::endl;
53
54 return sl;
55}

◆ dump() [2/2]

std::ostream & Trk::HomogeneousLayerMaterial::dump ( std::ostream & sl) const
overridevirtual

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

Implements Trk::LayerMaterialProperties.

Definition at line 57 of file HomogeneousLayerMaterial.cxx.

57 {
58 sl << "Trk::HomogeneousLayerMaterial : " << std::endl;
59 if (m_fullMaterial) {
60 sl << " - fullMaterial : " << *m_fullMaterial << std::endl;
61 }
62 sl << " - split factor : " << m_splitFactor << std::endl;
63 return sl;
64}

◆ elementTable()

const ElementTable * Trk::LayerMaterialProperties::elementTable ( ) const
inlineinherited

Get the ElementTable.

Definition at line 90 of file LayerMaterialProperties.h.

90{ return nullptr; }

◆ factor()

double Trk::LayerMaterialProperties::factor ( PropDirection pDir,
MaterialUpdateStage mStage ) const
inlineinherited

Update pre factor.

inline return methods for the pre/post factors

Definition at line 130 of file LayerMaterialProperties.h.

131 {
132 if (mStage == Trk::fullUpdate) return 1.;
133 return (static_cast<int>(pDir) * static_cast<int>(mStage) > 0 ?
135}
@ fullUpdate

◆ fullMaterial()

const MaterialProperties * Trk::HomogeneousLayerMaterial::fullMaterial ( const Amg::Vector3D & gp) const
inlineoverridevirtual

Return method for full material description of the Layer.

Implements Trk::LayerMaterialProperties.

Definition at line 115 of file HomogeneousLayerMaterial.h.

116 {
117 return m_fullMaterial.get();
118}

◆ material()

const MaterialProperties * Trk::HomogeneousLayerMaterial::material ( size_t ib0,
size_t ib1 ) const
inlineoverridevirtual

Direct access via bins to the MaterialProperties.

Implements Trk::LayerMaterialProperties.

Definition at line 120 of file HomogeneousLayerMaterial.h.

121 {
122 return m_fullMaterial.get();
123}

◆ operator*=()

Trk::HomogeneousLayerMaterial & Trk::HomogeneousLayerMaterial::operator*= ( double scale)
overridevirtual

Scale operator.

Implements Trk::LayerMaterialProperties.

Definition at line 39 of file HomogeneousLayerMaterial.cxx.

40 {
41 // scale the sub-properties
42 if (m_fullMaterial) (*m_fullMaterial) *= scale;
43
44 return (*this);
45}

◆ operator=() [1/2]

Trk::HomogeneousLayerMaterial & Trk::HomogeneousLayerMaterial::operator= ( const HomogeneousLayerMaterial & lmp)

Assignment operator.

Definition at line 28 of file HomogeneousLayerMaterial.cxx.

29 {
30 if (this != &lmp) {
31 // now refill everything
32 m_fullMaterial.reset(lmp.m_fullMaterial ? lmp.m_fullMaterial->clone()
33 : nullptr);
35 }
36 return (*this);
37}

◆ operator=() [2/2]

HomogeneousLayerMaterial & Trk::HomogeneousLayerMaterial::operator= ( Trk::HomogeneousLayerMaterial && lmp)
default

Default move assignment operator.

◆ oppositePostFactor()

double Trk::LayerMaterialProperties::oppositePostFactor ( ) const
inlineinherited

Return method for post update material description of the Layer along normalvector.

Definition at line 150 of file LayerMaterialProperties.h.

150 {
151 return (1. - m_splitFactor);
152}

◆ oppositePreFactor()

double Trk::LayerMaterialProperties::oppositePreFactor ( ) const
inlineinherited

Return method for pre update material description of the Layer along normalvector.

Definition at line 146 of file LayerMaterialProperties.h.

146 {
147 return m_splitFactor;
148}

◆ updateBinning()

virtual void Trk::HomogeneousLayerMaterial::updateBinning ( BinUtility * )
inlineoverridevirtual

Update the BinUtility if necessary - passing ownership of the utility class.

Implements Trk::LayerMaterialProperties.

Definition at line 97 of file HomogeneousLayerMaterial.h.

97{}

◆ updateElementTable()

void Trk::LayerMaterialProperties::updateElementTable ( const std::shared_ptr< const ElementTable > & ) const
inlineinherited

Update the ElementTable.

Definition at line 87 of file LayerMaterialProperties.h.

87{}

◆ ::HomogeneousLayerMaterialCnv_p1

friend class ::HomogeneousLayerMaterialCnv_p1
friend

Definition at line 105 of file HomogeneousLayerMaterial.h.

Member Data Documentation

◆ m_fullMaterial

std::unique_ptr<MaterialProperties> Trk::HomogeneousLayerMaterial::m_fullMaterial
private

The five different MaterialProperties.

Definition at line 108 of file HomogeneousLayerMaterial.h.

◆ m_splitFactor

double Trk::LayerMaterialProperties::m_splitFactor
protectedinherited

the split factor in favour of oppositePre

Definition at line 126 of file LayerMaterialProperties.h.


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