ATLAS Offline Software
Loading...
Searching...
No Matches
LayerMaterialRecord.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// LayerMaterialRecord.h, (c) ATLAS Detector software
8
9#ifndef TRKGEOMETRY_LAYERMATERIALRECORD_H
10#define TRKGEOMETRY_LAYERMATERIALRECORD_H
11
12
13
18
19#include <climits>
20#include <vector>
21
22#ifndef UCHARCONV
23#define UCHARCONV
24#define ucharbin 0.00392157 // 1./double(1.*UCHAR_MAX)
25// int to unsigned char and vv
26#define uchar2uint(uchar) static_cast<unsigned int>(uchar)
27#define uint2uchar(unint) static_cast<unsigned char>(unint)
28// double to unsigned char and vv
29#define uchar2dfrac(uchar) double(uchar * ucharbin)
30#define dfrac2uchar(dfrac) lrint(dfrac* UCHAR_MAX)
31#endif
32
33namespace Trk {
34
41
42class Layer;
43class AssociatedMaterial;
44
46 public:
49
51 LayerMaterialRecord(double tlayer, const BinUtility* binutils,
52 double minFraction,
54
57
60
63
65 void associateGeantinoHit(const Amg::Vector3D& pos, double s,
66 const Trk::Material& mat);
67
70 void associateEmptyHit(const Amg::Vector3D& pos);
71
74 bool fullHit = false);
75
77 void finalizeRun(bool recordElements = true);
78
81
83 const std::vector<std::vector<unsigned int> >& binCounts() const;
84
86 const Trk::BinUtility* binUtility() const;
87
88 private:
91 int m_bins0;
92 int m_bins1;
94
98
101 double m_s;
102 double m_s_in_x0;
103 double m_s_in_l0;
104 double m_a;
105 double m_z;
106 double m_rho;
107 std::map<unsigned int, double> m_elements;
109
111 std::vector<std::vector<unsigned int> > m_run_events;
112 std::vector<std::vector<Amg::Vector3D> > m_run_pos;
113 std::vector<std::vector<double> > m_run_s;
114 std::vector<std::vector<double> > m_run_s_in_x0;
115 std::vector<std::vector<double> > m_run_s_in_l0;
116 std::vector<std::vector<double> > m_run_a;
117 std::vector<std::vector<double> > m_run_z;
118 std::vector<std::vector<double> > m_run_rho;
119
120 std::vector<std::vector<std::map<unsigned int, double> > > m_run_elements;
121
124
126 void clearMaterial();
128 void copyMaterial(const MaterialPropertiesMatrix& mat);
129};
130
131inline const MaterialPropertiesMatrix&
135
136inline const std::vector<std::vector<unsigned int> >&
140
142 return m_binUtility;
143}
144
145} // namespace Trk
146
147#endif // TRKGEOMETRY_LAYERMATERIALRECORD_H
148
It is used in the Mapping process ( using MaterialSteps ), the validation and recostruction ( using M...
A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type...
Definition BinUtility.h:39
int m_bins1
number of bins in coordinate 2
std::vector< std::vector< unsigned int > > m_run_events
LayerMaterialRecord()
Default Constructor.
std::vector< std::vector< double > > m_run_s_in_x0
double m_layerThickness
record the layerThickness
std::vector< std::vector< double > > m_run_s
LayerMaterialRecord & operator=(const LayerMaterialRecord &lmr)
Assignment operator.
std::map< unsigned int, double > m_elements
Amg::Vector3D m_pos
event related information
std::vector< std::vector< double > > m_run_a
MaterialAssociationType m_assoc
type of hit association
void finalizeRun(bool recordElements=true)
finalize the Run
AssociatedMaterial * finalizeEvent(const Trk::Layer &lay, bool fullHit=false)
finalize the Event
std::vector< std::vector< Amg::Vector3D > > m_run_pos
MaterialPropertiesMatrix m_associatedLayerMaterial
clear the material -> calls delete
BinUtility * m_binUtility
record the BinnedArray
std::vector< std::vector< std::map< unsigned int, double > > > m_run_elements
the final material properties
void clearMaterial()
copy from another vector
const std::vector< std::vector< unsigned int > > & binCounts() const
return method for the events used for this
void associateGeantinoHit(const Amg::Vector3D &pos, double s, const Trk::Material &mat)
adding the information about the Geantino hit
void copyMaterial(const MaterialPropertiesMatrix &mat)
const MaterialPropertiesMatrix & associatedLayerMaterial() const
return method for the LayerMaterial
void associateEmptyHit(const Amg::Vector3D &pos)
adding the information about an empty hit scaling- particle crossed layer, but no mapping information
const Trk::BinUtility * binUtility() const
return the BinUtility
std::vector< std::vector< double > > m_run_s_in_l0
std::vector< std::vector< double > > m_run_z
double m_minFraction
minimum element fraction to be recorded
int m_bins0
number of bins in coordinate 1
std::vector< std::vector< double > > m_run_rho
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
A common object to be contained by.
Definition Material.h:117
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
std::vector< std::vector< const MaterialProperties * > > MaterialPropertiesMatrix