|
ATLAS Offline Software
|
#include <LayerMaterialRecord.h>
Helper Class to record the material during the GeantinoNtupleMappingProcess
- Author
- Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Definition at line 42 of file LayerMaterialRecord.h.
◆ LayerMaterialRecord() [1/3]
Trk::LayerMaterialRecord::LayerMaterialRecord |
( |
| ) |
|
◆ LayerMaterialRecord() [2/3]
Constructor.
Definition at line 43 of file LayerMaterialRecord.cxx.
48 m_bins0(binutils ? (binutils->max(0) + 1) : 1),
49 m_bins1(binutils && binutils->dimensions() > 1 ? (binutils->max(1) + 1)
63 const auto zeroedVectorDbl = std::vector<double>(
m_bins0, 0.);
64 const auto zeroedVectorUInt = std::vector<unsigned int>(
m_bins0, 0);
65 const auto zeroedVectorVector3D = std::vector<Amg::Vector3D>(
m_bins0,
m_pos);
66 using Element_t = std::map<unsigned int, double>;
67 const auto zeroedVectorElements =
68 std::vector<Element_t>(
m_bins0, Element_t());
69 for (
int ibin = 0; ibin <
m_bins1; ++ibin) {
71 m_run_pos.push_back(zeroedVectorVector3D);
73 m_run_s.push_back(zeroedVectorDbl);
76 m_run_a.push_back(zeroedVectorDbl);
77 m_run_z.push_back(zeroedVectorDbl);
◆ LayerMaterialRecord() [3/3]
◆ ~LayerMaterialRecord()
Trk::LayerMaterialRecord::~LayerMaterialRecord |
( |
| ) |
|
◆ associatedLayerMaterial()
◆ associateEmptyHit()
adding the information about an empty hit scaling- particle crossed layer, but no mapping information
Definition at line 188 of file LayerMaterialRecord.cxx.
◆ associateGeantinoHit()
adding the information about the Geantino hit
Definition at line 154 of file LayerMaterialRecord.cxx.
172 MaterialComposition* mComposition =
mat.composition;
174 for (
auto&
it : (*mComposition)) {
◆ binCounts()
const std::vector< std::vector< unsigned int > > & Trk::LayerMaterialRecord::binCounts |
( |
| ) |
const |
|
inline |
◆ binUtility()
◆ clearMaterial()
void Trk::LayerMaterialRecord::clearMaterial |
( |
| ) |
|
|
private |
copy from another vector
Definition at line 361 of file LayerMaterialRecord.cxx.
366 for (; matMatrixIter != matMatrixIterEnd; ++matMatrixIter) {
369 (*matMatrixIter).begin();
371 (*matMatrixIter).end();
372 for (; matIter != matIterEnd; ++matIter)
delete (*matIter);
◆ copyMaterial()
Definition at line 377 of file LayerMaterialRecord.cxx.
382 Trk::MaterialPropertiesMatrix::const_iterator matMatrixIter =
383 materialMatrix.begin();
384 Trk::MaterialPropertiesMatrix::const_iterator matMatrixIterEnd =
385 materialMatrix.end();
386 for (; matMatrixIter != matMatrixIterEnd; ++matMatrixIter) {
389 std::vector<const Trk::MaterialProperties*>::const_iterator matIter =
390 (*matMatrixIter).begin();
391 std::vector<const Trk::MaterialProperties*>::const_iterator matIterEnd =
392 (*matMatrixIter).end();
393 for (; matIter != matIterEnd; ++matIter) {
395 matProp.push_back(((*matIter) ? (*matIter)->clone() :
nullptr));
◆ finalizeEvent()
finalize the Event
Constructor with explicit arguments
Definition at line 195 of file LayerMaterialRecord.cxx.
213 hitPosition, hitPosition));
235 double nef = eIter.second * corrFactorInv /
m_s_in_l0;
250 double a =
m_run_a[rBin1][rBin0] * eventNorm;
251 double z =
m_run_z[rBin1][rBin0] * eventNorm;
265 hitPosition,
m_run_s[rBin1][rBin0] * eventNorm, x0,
l0,
a,
z,
rho,
282 return fullHitMaterial;
◆ finalizeRun()
void Trk::LayerMaterialRecord::finalizeRun |
( |
bool |
recordElements = true | ) |
|
finalize the Run
Definition at line 285 of file LayerMaterialRecord.cxx.
288 for (
int ibin1 = 0; ibin1 <
m_bins1; ++ibin1) {
293 for (
int ibin0 = 0; ibin0 <
m_bins0; ++ibin0) {
301 m_run_a[ibin1][ibin0] *= eventNorm;
302 m_run_z[ibin1][ibin0] *= eventNorm;
316 if (recordElements) {
318 double preTotalFraction = 0.;
319 std::map<unsigned int, double> binElements =
321 for (
auto& peIter : binElements) {
323 peIter.second *= eventNorm;
324 preTotalFraction += peIter.second;
327 std::map<double, unsigned int> probabilityOrdered;
328 double totalFraction = 0.;
329 for (
auto& eIter : binElements) {
331 double eFraction = eIter.second / preTotalFraction;
333 probabilityOrdered[eIter.second] = eIter.first;
334 totalFraction += eIter.second;
337 std::vector<Trk::ElementFraction> elementFractions;
338 elementFractions.reserve(binElements.size());
339 for (
auto& poEl : probabilityOrdered) {
340 double fracEl = poEl.first / totalFraction;
341 unsigned int fracEluChar = fracEl * UCHAR_MAX;
342 elementFractions.emplace_back(poEl.second, fracEluChar);
345 std::reverse(elementFractions.begin(), elementFractions.end());
355 matVector.push_back(binMaterial);
◆ operator=()
◆ m_a
double Trk::LayerMaterialRecord::m_a |
|
private |
◆ m_assoc
type of hit association
run related information - normalized per event
Definition at line 105 of file LayerMaterialRecord.h.
◆ m_associatedLayerMaterial
◆ m_bins0
int Trk::LayerMaterialRecord::m_bins0 |
|
private |
◆ m_bins1
int Trk::LayerMaterialRecord::m_bins1 |
|
private |
◆ m_binUtility
BinUtility* Trk::LayerMaterialRecord::m_binUtility |
|
private |
◆ m_elements
std::map<unsigned int, double> Trk::LayerMaterialRecord::m_elements |
|
private |
◆ m_emptyHitCase
bool Trk::LayerMaterialRecord::m_emptyHitCase |
|
private |
◆ m_layerThickness
double Trk::LayerMaterialRecord::m_layerThickness |
|
private |
◆ m_minFraction
double Trk::LayerMaterialRecord::m_minFraction |
|
private |
◆ m_pos
◆ m_rho
double Trk::LayerMaterialRecord::m_rho |
|
private |
◆ m_run_a
std::vector<std::vector<double> > Trk::LayerMaterialRecord::m_run_a |
|
private |
◆ m_run_elements
std::vector<std::vector<std::map<unsigned int, double> > > Trk::LayerMaterialRecord::m_run_elements |
|
private |
◆ m_run_events
std::vector<std::vector<unsigned int> > Trk::LayerMaterialRecord::m_run_events |
|
private |
◆ m_run_pos
std::vector<std::vector<Amg::Vector3D> > Trk::LayerMaterialRecord::m_run_pos |
|
private |
◆ m_run_rho
std::vector<std::vector<double> > Trk::LayerMaterialRecord::m_run_rho |
|
private |
◆ m_run_s
std::vector<std::vector<double> > Trk::LayerMaterialRecord::m_run_s |
|
private |
◆ m_run_s_in_l0
std::vector<std::vector<double> > Trk::LayerMaterialRecord::m_run_s_in_l0 |
|
private |
◆ m_run_s_in_x0
std::vector<std::vector<double> > Trk::LayerMaterialRecord::m_run_s_in_x0 |
|
private |
◆ m_run_z
std::vector<std::vector<double> > Trk::LayerMaterialRecord::m_run_z |
|
private |
◆ m_s
double Trk::LayerMaterialRecord::m_s |
|
private |
◆ m_s_in_l0
double Trk::LayerMaterialRecord::m_s_in_l0 |
|
private |
◆ m_s_in_x0
double Trk::LayerMaterialRecord::m_s_in_x0 |
|
private |
◆ m_steps
int Trk::LayerMaterialRecord::m_steps |
|
private |
◆ m_z
double Trk::LayerMaterialRecord::m_z |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
BinUtility * m_binUtility
record the BinnedArray
virtual double pathCorrection(const Amg::Vector3D &pos, const Amg::Vector3D &mom) const
the pathCorrection for derived classes with thickness - it reflects if the direction projection is po...
size_t dimensions() const
First bin maximal value.
@ z
global position (cartesian)
std::vector< std::vector< Amg::Vector3D > > m_run_pos
std::string find(const std::string &s)
return a remapped string
std::vector< std::vector< std::map< unsigned int, double > > > m_run_elements
the final material properties
double m_minFraction
minimum element fraction to be recorded
#define uchar2dfrac(uchar)
MaterialPropertiesMatrix m_associatedLayerMaterial
clear the material -> calls delete
std::vector< std::vector< double > > m_run_s_in_x0
std::vector< std::vector< double > > m_run_a
std::vector< const MaterialProperties * > MaterialPropertiesVector
Useful typedefs.
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
MaterialAssociationType m_assoc
type of hit association
void clearMaterial()
copy from another vector
int m_bins1
number of bins in coordinate 2
#define uchar2uint(uchar)
std::vector< std::vector< double > > m_run_s
std::map< unsigned int, double > m_elements
std::vector< std::vector< double > > m_run_rho
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Vector3D m_pos
event related information
std::vector< std::vector< double > > m_run_s_in_l0
BinUtility * clone() const
Implizit Constructor.
const TrackingVolume * enclosingTrackingVolume() const
get the confining TrackingVolume
double m_layerThickness
record the layerThickness
size_t bin(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
std::vector< std::vector< double > > m_run_z
void copyMaterial(const MaterialPropertiesMatrix &mat)
int m_bins0
number of bins in coordinate 1
std::vector< std::vector< unsigned int > > m_run_events