ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkGeometry
TrkGeometry
CompressedLayerMaterial.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// CompressedLayerMaterial.h, (c) ATLAS Detector software
8
9
#ifndef TRKGEOMETRY_COMPRESSEDLAYERMATERIAL_H
10
#define TRKGEOMETRY_COMPRESSEDLAYERMATERIAL_H
11
12
// Trk
13
#include "
TrkDetDescrUtils/BinUtility.h
"
14
#include "
TrkGeometry/LayerMaterialProperties.h
"
15
#include "
TrkGeometry/MaterialProperties.h
"
16
// Amg
17
#include "
GeoPrimitives/GeoPrimitives.h
"
18
#include <iosfwd>
19
20
class
MsgStream;
21
namespace
Trk
{
22
30
31
class
CompressedLayerMaterial
final :
public
LayerMaterialProperties
{
32
public
:
34
CompressedLayerMaterial
();
35
37
CompressedLayerMaterial
(
BinUtility
& binutility);
38
49
CompressedLayerMaterial
(
50
const
Trk::BinUtility
& binutility,
51
const
MaterialPropertiesVector
& fullProperties,
52
const
std::vector<unsigned short int>& materialIndices,
53
double
splitFactor = 0.);
54
55
CompressedLayerMaterial
(
56
std::unique_ptr<Trk::BinUtility> binutility,
57
const
MaterialPropertiesVector
&& fullProperties,
58
const
std::vector<unsigned short int>& materialIndices,
59
double
splitFactor = 0.);
60
62
CompressedLayerMaterial
(
const
CompressedLayerMaterial
& mprop);
63
65
virtual
~CompressedLayerMaterial
()
override
;
66
68
virtual
CompressedLayerMaterial
*
clone
()
const
override
final
;
69
71
CompressedLayerMaterial
&
operator=
(
const
CompressedLayerMaterial
& lmp);
72
74
virtual
CompressedLayerMaterial
&
operator*=
(
double
scale)
override
final
;
75
77
virtual
const
BinUtility
*
binUtility
()
const
override
final
;
78
81
virtual
void
updateBinning
(
BinUtility
* bu)
override
final
;
82
84
const
MaterialPropertiesVector
&
fullMaterial
()
const
;
85
87
const
std::vector<unsigned short int>&
materialBins
()
const
;
88
90
virtual
const
MaterialProperties
*
fullMaterial
(
91
const
Amg::Vector3D
& gp)
const override
;
92
94
virtual
const
MaterialProperties
*
material
(
size_t
bin0,
95
size_t
bin1)
const
override
final
;
96
98
virtual
MsgStream&
dump
(MsgStream& sl)
const
override
final
;
100
virtual
std::ostream&
dump
(std::ostream& sl)
const
override
final
;
101
102
private
:
103
BinUtility
*
m_binUtility
;
104
106
MaterialPropertiesVector
m_fullMaterial
;
107
std::vector<unsigned short int>
m_materialBins
;
108
110
void
clearMaterial
();
111
113
void
fillMaterial
(
const
MaterialPropertiesVector
& matVector);
114
};
115
116
inline
const
BinUtility
*
CompressedLayerMaterial::binUtility
()
const
{
117
return
m_binUtility
;
118
}
119
120
inline
const
MaterialPropertiesVector
&
CompressedLayerMaterial::fullMaterial
()
121
const
{
122
return
m_fullMaterial
;
123
}
124
125
inline
const
std::vector<unsigned short int>&
126
CompressedLayerMaterial::materialBins
()
const
{
127
return
m_materialBins
;
128
}
129
130
inline
const
MaterialProperties
*
CompressedLayerMaterial::material
(
131
size_t
bin0,
size_t
bin1)
const
{
132
int
accessBin = bin1 * (
m_binUtility
->max(0) + 1) + bin0;
133
// safety check
134
if
(bin0 <= (
unsigned
int
)
m_binUtility
->max(0) &&
135
bin1 <= (
unsigned
int
)
m_binUtility
->max(1) && !
m_fullMaterial
.empty() &&
136
accessBin <
int
(
m_materialBins
.size()))
137
return
m_fullMaterial
[
m_materialBins
[accessBin]];
138
return
nullptr
;
139
}
140
141
inline
void
CompressedLayerMaterial::updateBinning
(
BinUtility
* bu) {
142
if
(bu) {
143
delete
m_binUtility
;
144
m_binUtility
= bu;
145
}
146
}
147
148
}
// namespace Trk
149
150
#endif
BinUtility.h
GeoPrimitives.h
LayerMaterialProperties.h
MaterialProperties.h
Trk::BinUtility
A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type...
Definition
BinUtility.h:39
Trk::CompressedLayerMaterial::materialBins
const std::vector< unsigned short int > & materialBins() const
Return method for index vector, needs BinUtility to interpret this.
Definition
CompressedLayerMaterial.h:126
Trk::CompressedLayerMaterial::fullMaterial
const MaterialPropertiesVector & fullMaterial() const
Return method for full material description of the Layer - for all bins.
Definition
CompressedLayerMaterial.h:120
Trk::CompressedLayerMaterial::material
virtual const MaterialProperties * material(size_t bin0, size_t bin1) const override final
Access the single bin.
Definition
CompressedLayerMaterial.h:130
Trk::CompressedLayerMaterial::updateBinning
virtual void updateBinning(BinUtility *bu) override final
Update the BinUtility if necessary - passing ownership of the utility class.
Definition
CompressedLayerMaterial.h:141
Trk::CompressedLayerMaterial::~CompressedLayerMaterial
virtual ~CompressedLayerMaterial() override
Destructor.
Definition
CompressedLayerMaterial.cxx:38
Trk::CompressedLayerMaterial::operator=
CompressedLayerMaterial & operator=(const CompressedLayerMaterial &lmp)
Assignment operator.
Definition
CompressedLayerMaterial.cxx:54
Trk::CompressedLayerMaterial::m_binUtility
BinUtility * m_binUtility
the helper for the bin finding
Definition
CompressedLayerMaterial.h:103
Trk::CompressedLayerMaterial::fillMaterial
void fillMaterial(const MaterialPropertiesVector &matVector)
helper method - to refill the material
Definition
CompressedLayerMaterial.cxx:80
Trk::CompressedLayerMaterial::m_materialBins
std::vector< unsigned short int > m_materialBins
Definition
CompressedLayerMaterial.h:107
Trk::CompressedLayerMaterial::binUtility
virtual const BinUtility * binUtility() const override final
Return the BinUtility.
Definition
CompressedLayerMaterial.h:116
Trk::CompressedLayerMaterial::m_fullMaterial
MaterialPropertiesVector m_fullMaterial
The five different MaterialProperties.
Definition
CompressedLayerMaterial.h:106
Trk::CompressedLayerMaterial::operator*=
virtual CompressedLayerMaterial & operator*=(double scale) override final
Scale operator.
Definition
CompressedLayerMaterial.cxx:89
Trk::CompressedLayerMaterial::CompressedLayerMaterial
CompressedLayerMaterial()
Default Constructor - needed by POOL.
Definition
CompressedLayerMaterial.cxx:13
Trk::CompressedLayerMaterial::clearMaterial
void clearMaterial()
helper method - to clear the material
Definition
CompressedLayerMaterial.cxx:74
Trk::CompressedLayerMaterial::clone
virtual CompressedLayerMaterial * clone() const override final
Pseudo-Constructor clone().
Definition
CompressedLayerMaterial.cxx:70
Trk::LayerMaterialProperties::LayerMaterialProperties
LayerMaterialProperties()=default
Constructor.
Trk::MaterialProperties
Material with information about thickness of material.
Definition
MaterialProperties.h:40
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::MaterialPropertiesVector
std::vector< const MaterialProperties * > MaterialPropertiesVector
Useful typedefs.
Definition
MaterialProperties.h:133
dump
-event-from-file
Generated on
for ATLAS Offline Software by
1.17.0