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#include <memory>
18// Gaudi
19#include "GaudiKernel/MsgStream.h"
20// STD
21#include <vector>
22
24
25namespace Trk {
26
27class BinUtility;
28class ElementTable;
29
37
39
61
63 public:
66
68 LayerMaterialProperties(double splitFactor) : m_splitFactor(splitFactor) {}
69
72
74 virtual LayerMaterialProperties* clone() const = 0;
75
77 virtual LayerMaterialProperties& operator*=(double scale) = 0;
78
81 const Amg::Vector3D& gp) const = 0;
82
84 virtual const MaterialProperties* material(size_t ib0, size_t ib1) const = 0;
85
87 void updateElementTable(const std::shared_ptr<const ElementTable>&) const {}
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;
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
157MsgStream& operator<<(MsgStream& sl, const LayerMaterialProperties& mprop);
158
159std::ostream& operator<<(std::ostream& sl,
160 const LayerMaterialProperties& mprop);
161
162} // namespace Trk
163
164#endif // TRKGEOMETY_LAYERMATERIALPROPERTIES_H
165
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 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()
Destructor.
virtual LayerMaterialProperties & operator*=(double scale)=0
Scale operator.
LayerMaterialProperties(double splitFactor)
Constructor.
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
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.
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,...