ATLAS Offline Software
LayerMaterialProperties.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // LayerMaterialProperties.h, (c) ATLAS Detector software
8 
9 #ifndef TRKGEOMETY_LAYERMATERIALPROPERTIES_H
10 #define TRKGEOMETY_LAYERMATERIALPROPERTIES_H
11 
12 // Amg
14 // Trk
18 // Gaudi
19 #include "GaudiKernel/MsgStream.h"
20 // STD
21 #include <vector>
22 
24 
25 namespace Trk {
26 
27 class BinUtility;
28 class ElementTable;
29 
39 
63  public:
66 
68  LayerMaterialProperties(double splitFactor) : m_splitFactor(splitFactor) {}
69 
72 
74  virtual LayerMaterialProperties* clone() const = 0;
75 
78 
81  const Amg::Vector3D& gp) const = 0;
82 
84  virtual const MaterialProperties* material(size_t ib0, size_t ib1) const = 0;
85 
88 
90  const ElementTable* elementTable() const { return nullptr; }
91 
93  double factor(PropDirection pDir, MaterialUpdateStage mStage) const;
94 
97  double alongPreFactor() const;
98 
101  double alongPostFactor() const;
102 
105  double oppositePreFactor() const;
106 
109  double oppositePostFactor() const;
110 
112  virtual const BinUtility* binUtility() const = 0;
113 
116  virtual void updateBinning(BinUtility* bu) = 0;
117 
119  virtual MsgStream& dump(MsgStream& sl) const = 0;
120 
122  virtual std::ostream& dump(std::ostream& sl) const = 0;
123 
124  protected:
125  friend class ::BinnedLayerMaterialCnv_p1;
126  double m_splitFactor;
127 };
128 
131  PropDirection pDir, MaterialUpdateStage mStage) const {
132  if (mStage == Trk::fullUpdate) return 1.;
133  return (static_cast<int>(pDir) * static_cast<int>(mStage) > 0 ?
135 }
136 
139  return (1. - m_splitFactor);
140 }
141 
143  return m_splitFactor;
144 }
145 
147  return m_splitFactor;
148 }
149 
151  return (1. - m_splitFactor);
152 }
153 
154 //**Overload of << operator for both, MsgStream and std::ostream for debug
155 //output*/
156 
157 MsgStream& operator<<(MsgStream& sl, const LayerMaterialProperties& mprop);
158 
159 std::ostream& operator<<(std::ostream& sl,
160  const LayerMaterialProperties& mprop);
161 
162 } // namespace Trk
163 
164 #endif // TRKGEOMETY_LAYERMATERIALPROPERTIES_H
165 
Trk::MaterialConcentration
MaterialConcentration
Definition: LayerMaterialProperties.h:38
Trk::alongPre
@ alongPre
Definition: LayerMaterialProperties.h:38
Trk::MaterialUpdateStage
MaterialUpdateStage
This is a steering enum to tell which material update stage:
Definition: PropDirection.h:40
Trk::LayerMaterialProperties::fullMaterial
virtual const MaterialProperties * fullMaterial(const Amg::Vector3D &gp) const =0
Return method for full material description of the Layer.
MaterialProperties.h
Trk::LayerMaterialProperties::LayerMaterialProperties
LayerMaterialProperties(double splitFactor)
Constructor.
Definition: LayerMaterialProperties.h:68
PropDirection.h
Trk::LayerMaterialProperties::oppositePostFactor
double oppositePostFactor() const
Return method for post update material description of the Layer along normalvector.
Definition: LayerMaterialProperties.h:150
Trk::LayerMaterialProperties::updateBinning
virtual void updateBinning(BinUtility *bu)=0
Update the BinUtility if necessary - passing ownership of the utility class.
Trk::LayerMaterialProperties::factor
double factor(PropDirection pDir, MaterialUpdateStage mStage) const
Update pre factor.
Definition: LayerMaterialProperties.h:130
Trk::LayerMaterialProperties::material
virtual const MaterialProperties * material(size_t ib0, size_t ib1) const =0
Direct access via bins to the MaterialProperties.
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
Trk::fullUpdate
@ fullUpdate
Definition: PropDirection.h:43
GeoPrimitives.h
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Trk::LayerMaterialProperties::m_splitFactor
double m_splitFactor
the split factor in favour of oppositePre
Definition: LayerMaterialProperties.h:126
BinnedLayerMaterialCnv_p1
Definition: BinnedLayerMaterialCnv_p1.h:23
Trk::LayerMaterialProperties
Definition: LayerMaterialProperties.h:62
Trk::LayerMaterialProperties::updateElementTable
void updateElementTable(const SharedObject< const ElementTable > &) const
Update the ElementTable.
Definition: LayerMaterialProperties.h:87
Trk::LayerMaterialProperties::dump
virtual std::ostream & dump(std::ostream &sl) const =0
Output Method for std::ostream, to be overloaded by child classes.
Trk::LayerMaterialProperties::alongPostFactor
double alongPostFactor() const
Return method for post update material description of the Layer along normalvector.
Definition: LayerMaterialProperties.h:142
Trk::LayerMaterialProperties::oppositePreFactor
double oppositePreFactor() const
Return method for pre update material description of the Layer along normalvector.
Definition: LayerMaterialProperties.h:146
SharedObject.h
Trk::LayerMaterialProperties::binUtility
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
Trk::BinUtility
Definition: BinUtility.h:39
Trk::LayerMaterialProperties::operator*=
virtual LayerMaterialProperties & operator*=(double scale)=0
Scale operator.
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::oppositePre
@ oppositePre
Definition: LayerMaterialProperties.h:38
Trk::MaterialProperties
Definition: MaterialProperties.h:40
Trk::SharedObject
std::shared_ptr< T > SharedObject
Definition: SharedObject.h:24
Trk::ElementTable
Definition: ElementTable.h:24
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
Trk::LayerMaterialProperties::~LayerMaterialProperties
virtual ~LayerMaterialProperties()
Destructor.
Definition: LayerMaterialProperties.h:71
Trk::LayerMaterialProperties::clone
virtual LayerMaterialProperties * clone() const =0
Pseudo-Constructor clone()
Trk::LayerMaterialProperties::elementTable
const ElementTable * elementTable() const
Get the ElementTable.
Definition: LayerMaterialProperties.h:90
Trk::LayerMaterialProperties::LayerMaterialProperties
LayerMaterialProperties()
Constructor.
Definition: LayerMaterialProperties.h:65
Trk::LayerMaterialProperties::alongPreFactor
double alongPreFactor() const
Return method for pre update material description of the Layer along normalvector.
Definition: LayerMaterialProperties.h:138
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
Trk::LayerMaterialProperties::dump
virtual MsgStream & dump(MsgStream &sl) const =0
Output Method for MsgStream, to be overloaded by child classes.