ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
Trk::HomogeneousLayerMaterial Class Referencefinal

#include <HomogeneousLayerMaterial.h>

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

Public Member Functions

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

Protected Attributes

double m_splitFactor
 the split factor in favour of oppositePre More...
 

Private Attributes

std::unique_ptr< MaterialPropertiesm_fullMaterial
 The five different MaterialProperties. More...
 

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:

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.

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

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

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

◆ 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 SharedObject< const ElementTable > &  ) const
inlineinherited

Update the ElementTable.

Definition at line 87 of file LayerMaterialProperties.h.

87 {}

Friends And Related Function Documentation

◆ ::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:
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
Trk::fullUpdate
@ fullUpdate
Definition: PropDirection.h:43
Trk::HomogeneousLayerMaterial::m_fullMaterial
std::unique_ptr< MaterialProperties > m_fullMaterial
The five different MaterialProperties.
Definition: HomogeneousLayerMaterial.h:108
Trk::LayerMaterialProperties::m_splitFactor
double m_splitFactor
the split factor in favour of oppositePre
Definition: LayerMaterialProperties.h:126
Trk::LayerMaterialProperties
Definition: LayerMaterialProperties.h:62
find_data.full
full
Definition: find_data.py:27
Trk::LayerMaterialProperties::LayerMaterialProperties
LayerMaterialProperties()
Constructor.
Definition: LayerMaterialProperties.h:65
Trk::HomogeneousLayerMaterial::HomogeneousLayerMaterial
HomogeneousLayerMaterial()
Default Constructor - creates empty HomogeneousLayerMaterial.
Definition: HomogeneousLayerMaterial.cxx:13