ATLAS Offline Software
Loading...
Searching...
No Matches
LayerMaterialProperties.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
15
18
19// STD
20#include <vector>
21#include <iosfwd>
22#include <memory>
23
24class MsgStream;
26
27namespace Trk {
28
29class BinUtility;
30class ElementTable;
31
39
41
63
65 public:
68
71
73 LayerMaterialProperties& operator=(LayerMaterialProperties&&) noexcept = default;
74
76 LayerMaterialProperties(double splitFactor) : m_splitFactor(splitFactor) {}
77
79 virtual ~LayerMaterialProperties() = default;
80
82 virtual LayerMaterialProperties* clone() const = 0;
83
85 virtual LayerMaterialProperties& operator*=(double scale) = 0;
86
89 const Amg::Vector3D& gp) const = 0;
90
92 virtual const MaterialProperties* material(size_t ib0, size_t ib1) const = 0;
93
95 void updateElementTable(const std::shared_ptr<const ElementTable>&) const {}
96
98 const ElementTable* elementTable() const { return nullptr; }
99
101 double factor(PropDirection pDir, MaterialUpdateStage mStage) const;
102
105 double alongPreFactor() const;
106
109 double alongPostFactor() const;
110
113 double oppositePreFactor() const;
114
117 double oppositePostFactor() const;
118
120 virtual const BinUtility* binUtility() const = 0;
121
124 virtual void updateBinning(BinUtility* bu) = 0;
125
127 virtual MsgStream& dump(MsgStream& sl) const = 0;
128
130 virtual std::ostream& dump(std::ostream& sl) const = 0;
131
132 protected:
133 friend class ::BinnedLayerMaterialCnv_p1;
134 double m_splitFactor{1.};
135};
136
139 PropDirection pDir, MaterialUpdateStage mStage) const {
140 if (mStage == Trk::fullUpdate) return 1.;
141 return (static_cast<int>(pDir) * static_cast<int>(mStage) > 0 ?
143}
144
147 return (1. - m_splitFactor);
148}
149
151 return m_splitFactor;
152}
153
155 return m_splitFactor;
156}
157
159 return (1. - m_splitFactor);
160}
161
162//**Overload of << operator for both, MsgStream and std::ostream for debug
163//output*/
164
165MsgStream& operator<<(MsgStream& sl, const LayerMaterialProperties& mprop);
166
167std::ostream& operator<<(std::ostream& sl,
168 const LayerMaterialProperties& mprop);
169
170} // namespace Trk
171
172#endif // TRKGEOMETY_LAYERMATERIALPROPERTIES_H
173
A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type...
Definition BinUtility.h:39
This virtual base class encapsulates the logics to build pre/post/full update material for Layer stru...
virtual ~LayerMaterialProperties()=default
Destructor.
LayerMaterialProperties()=default
Constructor.
virtual MsgStream & dump(MsgStream &sl) const =0
Output Method for MsgStream, to be overloaded by child classes.
virtual const MaterialProperties * fullMaterial(const Amg::Vector3D &gp) const =0
Return method for full material description of the Layer.
virtual LayerMaterialProperties & operator*=(double scale)=0
Scale operator.
virtual LayerMaterialProperties * clone() const =0
Pseudo-Constructor clone().
void updateElementTable(const std::shared_ptr< const ElementTable > &) const
Update the ElementTable.
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
double oppositePostFactor() const
Return method for post update material description of the Layer along normalvector.
const ElementTable * elementTable() const
Get the ElementTable.
double alongPreFactor() const
Return method for pre update material description of the Layer along normalvector.
virtual void updateBinning(BinUtility *bu)=0
Update the BinUtility if necessary - passing ownership of the utility class.
double alongPostFactor() const
Return method for post update material description of the Layer along normalvector.
double m_splitFactor
the split factor in favour of oppositePre
LayerMaterialProperties(LayerMaterialProperties &&) noexcept=default
virtual const MaterialProperties * material(size_t ib0, size_t ib1) const =0
Direct access via bins to the MaterialProperties.
virtual std::ostream & dump(std::ostream &sl) const =0
Output Method for std::ostream, to be overloaded by child classes.
double oppositePreFactor() const
Return method for pre update material description of the Layer along normalvector.
LayerMaterialProperties(const LayerMaterialProperties &)=default
double factor(PropDirection pDir, MaterialUpdateStage mStage) const
Update pre factor.
Material with information about thickness of material.
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
PropDirection
PropDirection, enum for direction of the propagation.
MaterialUpdateStage
This is a steering enum to tell which material update stage:
@ fullUpdate
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
MaterialConcentration
Simple enum to identify when a material update on a non-structured layer should be done,...