ATLAS Offline Software
Loading...
Searching...
No Matches
LayerMaterialRecord.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 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#include <climits>
13
18
19#ifndef UCHARCONV
20#define UCHARCONV
21#define ucharbin 0.00392157 // 1./double(1.*UCHAR_MAX)
22// int to unsigned char and vv
23#define uchar2uint(uchar) static_cast<unsigned int>(uchar)
24#define uint2uchar(unint) static_cast<unsigned char>(unint)
25// double to unsigned char and vv
26#define uchar2dfrac(uchar) double(uchar * ucharbin)
27#define dfrac2uchar(dfrac) lrint(dfrac* UCHAR_MAX)
28#endif
29
30namespace Trk {
31
38
39class Layer;
40class AssociatedMaterial;
41
43 public:
46
48 LayerMaterialRecord(double tlayer, const BinUtility* binutils,
49 double minFraction,
51
54
57
60
62 void associateGeantinoHit(const Amg::Vector3D& pos, double s,
63 const Trk::Material& mat);
64
67 void associateEmptyHit(const Amg::Vector3D& pos);
68
71 bool fullHit = false);
72
74 void finalizeRun(bool recordElements = true);
75
78
80 const std::vector<std::vector<unsigned int> >& binCounts() const;
81
83 const Trk::BinUtility* binUtility() const;
84
85 private:
88 int m_bins0;
89 int m_bins1;
91
95
98 double m_s;
99 double m_s_in_x0;
100 double m_s_in_l0;
101 double m_a;
102 double m_z;
103 double m_rho;
104 std::map<unsigned int, double> m_elements;
106
108 std::vector<std::vector<unsigned int> > m_run_events;
109 std::vector<std::vector<Amg::Vector3D> > m_run_pos;
110 std::vector<std::vector<double> > m_run_s;
111 std::vector<std::vector<double> > m_run_s_in_x0;
112 std::vector<std::vector<double> > m_run_s_in_l0;
113 std::vector<std::vector<double> > m_run_a;
114 std::vector<std::vector<double> > m_run_z;
115 std::vector<std::vector<double> > m_run_rho;
116
117 std::vector<std::vector<std::map<unsigned int, double> > > m_run_elements;
118
121
123 void clearMaterial();
125 void copyMaterial(const MaterialPropertiesMatrix& mat);
126};
127
128inline const MaterialPropertiesMatrix&
132
133inline const std::vector<std::vector<unsigned int> >&
137
139 return m_binUtility;
140}
141
142} // namespace Trk
143
144#endif // TRKGEOMETRY_LAYERMATERIALRECORD_H
145
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