ATLAS Offline Software
LArRecoMaterialTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // ***************************************************************************
6 //
7 // 3.8.2005 Creation of the tool by claire.bourdarios@cern.ch
8 //
9 // ***************************************************************************
10 
11 #ifndef LARDETDESCR_LARRECOMATERIALTOOL_H
12 #define LARDETDESCR_LARRECOMATERIALTOOL_H
13 
16 
17 class CaloCell_ID;
18 class CaloDM_ID;
19 
20 #include "GeoModelKernel/GeoVPhysVol.h"
21 #include "GeoModelKernel/GeoLogVol.h"
22 
23 #include <string>
24 
38 class LArRecoMaterialTool : public extends<AthAlgTool, ICaloRecoMaterialTool>
39 {
40 public:
41 
42  // Constructor:
43  LArRecoMaterialTool(const std::string& type,
44  const std::string& name,
45  const IInterface* parent);
46 
47  ~LArRecoMaterialTool() = default;
48  virtual StatusCode initialize() override;
49 
50  virtual
52  double& mass, double& volume,
53  double& x0, double& dEdx,
54  double& aveA, double& aveZ
55  ) const override;
56 
58  virtual
59  void get_default_material (double& density,
60  double& x0, double& dEdx,
61  double& aveA, double& aveZ
62  ) const override;
63 
64  void print() const override;
65 
66 private:
67 
71 
74  void ScanTree();
75 
79  double& mass, double& x0, double& dEdx,
80  double& aveA, double& aveZ);
81 
83  double& mass, double& x0, double& dEdx,
84  double& aveA, double& aveZ);
85 
87  double& mass, double& x0, double& dEdx,
88  double& aveA, double& aveZ);
89 
91  double& mass, double& x0, double& dEdx,
92  double& aveA, double& aveZ);
93 
95  double& mass, double& x0, double& dEdx,
96  double& aveA, double& aveZ);
97 
99  double& mass, double& x0, double& dEdx,
100  double& aveA, double& aveZ);
101 
103  void blendGeoVolume(GeoPVConstLink& geoVolLink,
104  std::vector<double>& volume,
105  std::vector<double>& mass,
106  std::vector<double>& x0,
107  std::vector<double>& dEdX,
108  std::vector<double>& aveA,
109  std::vector<double>& aveZ) const;
110 
112  void addMaterialFraction(const GeoLogVol& geoVol,
113  std::vector<double>& volume,
114  std::vector<double>& mass,
115  std::vector<double>& x0,
116  std::vector<double>& dEdX,
117  std::vector<double>& aveA,
118  std::vector<double>& aveZ) const;
119 
121  void averageFraction (std::vector<double>& volumeFractions,
122  std::vector<double>& massFractions,
123  std::vector<double>& x0Fractions,
124  std::vector<double>& dEdXFractions,
125  std::vector<double>& aveAFractions,
126  std::vector<double>& aveZFractions,
127  double& mass, double& volume,
128  double& x0, double& dEdx,
129  double& aveA, double& aveZ, double& rho );
130 
131  // mapping between ALIGNVOL and strings (need to retrieve StoredPV-s)
132  std::string map_av(CaloSubdetNames::ALIGNVOL alvol);
133 
134 
135  const CaloCell_ID* m_calo_id{nullptr};
136  const CaloDM_ID* m_dm_id{nullptr};
137 
138  // Store results per ALIGNVOL :
139  std::vector<CaloSubdetNames::ALIGNVOL> m_alignvol_number;
140  std::vector<double> m_alignvol_mass;
141  std::vector<double> m_alignvol_x0;
142  std::vector<double> m_alignvol_dEdX;
143  std::vector<double> m_alignvol_aveA;
144  std::vector<double> m_alignvol_aveZ;
145 
146  // intermediate vectors, cleared and filled within several methods :
147  std::vector<double> m_massFractions;
148  std::vector<double> m_volumeFractions;
149  std::vector<double> m_x0Fractions;
150  std::vector<double> m_dEdXFractions;
151  std::vector<double> m_averageAFractions;
152  std::vector<double> m_averageZFractions;
153 
154  std::vector<double> m_child_massFractions;
155  std::vector<double> m_child_volumeFractions;
156  std::vector<double> m_child_x0Fractions;
157  std::vector<double> m_child_dEdXFractions;
158  std::vector<double> m_child_averageAFractions;
159  std::vector<double> m_child_averageZFractions;
160  std::vector<double> m_child_Rho;
161  std::vector<double> m_child_Volume;
162  std::vector<double> m_child_Mass;
163 
164 };
165 
166 #endif // LARDETDESCR_LARMATERIALTOOL_H
167 
168 
169 
170 
171 
172 
LArRecoMaterialTool::m_child_averageZFractions
std::vector< double > m_child_averageZFractions
Definition: LArRecoMaterialTool.h:159
LArRecoMaterialTool::ScanEMEC
bool ScanEMEC(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:656
LArRecoMaterialTool::m_alignvol_mass
std::vector< double > m_alignvol_mass
Definition: LArRecoMaterialTool.h:140
LArRecoMaterialTool::LArRecoMaterialTool
LArRecoMaterialTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LArRecoMaterialTool.cxx:29
LArRecoMaterialTool::m_child_Mass
std::vector< double > m_child_Mass
Definition: LArRecoMaterialTool.h:162
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
LArRecoMaterialTool::m_dm_id
const CaloDM_ID * m_dm_id
Definition: LArRecoMaterialTool.h:136
LArRecoMaterialTool
This class implements the CaloDetDescr/ICaloRecoMaterialTool and provides the average materials neede...
Definition: LArRecoMaterialTool.h:39
LArRecoMaterialTool::m_child_Volume
std::vector< double > m_child_Volume
Definition: LArRecoMaterialTool.h:161
LArRecoMaterialTool::m_averageZFractions
std::vector< double > m_averageZFractions
Definition: LArRecoMaterialTool.h:152
LArRecoMaterialTool::m_child_volumeFractions
std::vector< double > m_child_volumeFractions
Definition: LArRecoMaterialTool.h:155
LArRecoMaterialTool::m_calo_id
const CaloCell_ID * m_calo_id
Definition: LArRecoMaterialTool.h:135
LArRecoMaterialTool::ScanPS
bool ScanPS(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:343
LArRecoMaterialTool::ScanTree
void ScanTree()
Private method called at initialisation : fills all arrays by calling the "optimised" methods.
Definition: LArRecoMaterialTool.cxx:125
LArRecoMaterialTool::print
void print() const override
Definition: LArRecoMaterialTool.cxx:110
LArRecoMaterialTool::m_alignvol_aveZ
std::vector< double > m_alignvol_aveZ
Definition: LArRecoMaterialTool.h:144
LArRecoMaterialTool::ScanEMB
bool ScanEMB(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:501
LArRecoMaterialTool::m_child_averageAFractions
std::vector< double > m_child_averageAFractions
Definition: LArRecoMaterialTool.h:158
LArRecoMaterialTool::m_child_x0Fractions
std::vector< double > m_child_x0Fractions
Definition: LArRecoMaterialTool.h:156
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArRecoMaterialTool::m_alignvol_aveA
std::vector< double > m_alignvol_aveA
Definition: LArRecoMaterialTool.h:143
AthAlgTool.h
LArRecoMaterialTool::get_material
virtual bool get_material(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &volume, double &x0, double &dEdx, double &aveA, double &aveZ) const override
Definition: LArRecoMaterialTool.cxx:69
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArRecoMaterialTool::ScanFCAL
bool ScanFCAL(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:852
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
LArRecoMaterialTool::get_default_material
virtual void get_default_material(double &density, double &x0, double &dEdx, double &aveA, double &aveZ) const override
default material used to fill the envelope
Definition: LArRecoMaterialTool.cxx:95
LArRecoMaterialTool::m_child_Rho
std::vector< double > m_child_Rho
Definition: LArRecoMaterialTool.h:160
LArRecoMaterialTool::m_dEdXFractions
std::vector< double > m_dEdXFractions
Definition: LArRecoMaterialTool.h:150
LArRecoMaterialTool::m_massFractions
std::vector< double > m_massFractions
Definition: LArRecoMaterialTool.h:147
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArRecoMaterialTool::ScanCRYO
bool ScanCRYO(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Private optimised methods for each subsystem.
Definition: LArRecoMaterialTool.cxx:173
LArRecoMaterialTool::m_child_massFractions
std::vector< double > m_child_massFractions
Definition: LArRecoMaterialTool.h:154
LArRecoMaterialTool::m_averageAFractions
std::vector< double > m_averageAFractions
Definition: LArRecoMaterialTool.h:151
LArRecoMaterialTool::~LArRecoMaterialTool
~LArRecoMaterialTool()=default
LArRecoMaterialTool::m_alignvol_dEdX
std::vector< double > m_alignvol_dEdX
Definition: LArRecoMaterialTool.h:142
LArRecoMaterialTool::blendGeoVolume
void blendGeoVolume(GeoPVConstLink &geoVolLink, std::vector< double > &volume, std::vector< double > &mass, std::vector< double > &x0, std::vector< double > &dEdX, std::vector< double > &aveA, std::vector< double > &aveZ) const
Private method to blend GeoLogVolume.
Definition: LArRecoMaterialTool.cxx:1030
LArRecoMaterialTool::map_av
std::string map_av(CaloSubdetNames::ALIGNVOL alvol)
Definition: LArRecoMaterialTool.cxx:1143
LArRecoMaterialTool::m_parseGeoModelForMaterial
bool m_parseGeoModelForMaterial
Private bool set at initialisation : decides if the GeoModel is parsed or bypassed.
Definition: LArRecoMaterialTool.h:70
LArRecoMaterialTool::ScanHEC
bool ScanHEC(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:694
CaloDM_ID
Helper class for Calo Dead Material offline identifiers.
Definition: CaloDM_ID.h:102
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArRecoMaterialTool::m_child_dEdXFractions
std::vector< double > m_child_dEdXFractions
Definition: LArRecoMaterialTool.h:157
LArRecoMaterialTool::m_alignvol_x0
std::vector< double > m_alignvol_x0
Definition: LArRecoMaterialTool.h:141
ICaloRecoMaterialTool.h
LArRecoMaterialTool::m_x0Fractions
std::vector< double > m_x0Fractions
Definition: LArRecoMaterialTool.h:149
LArRecoMaterialTool::addMaterialFraction
void addMaterialFraction(const GeoLogVol &geoVol, std::vector< double > &volume, std::vector< double > &mass, std::vector< double > &x0, std::vector< double > &dEdX, std::vector< double > &aveA, std::vector< double > &aveZ) const
Private method to add material.
Definition: LArRecoMaterialTool.cxx:1051
LArRecoMaterialTool::averageFraction
void averageFraction(std::vector< double > &volumeFractions, std::vector< double > &massFractions, std::vector< double > &x0Fractions, std::vector< double > &dEdXFractions, std::vector< double > &aveAFractions, std::vector< double > &aveZFractions, double &mass, double &volume, double &x0, double &dEdx, double &aveA, double &aveZ, double &rho)
Private method to average results stored in private arrays.
Definition: LArRecoMaterialTool.cxx:1091
fitman.rho
rho
Definition: fitman.py:532
LArRecoMaterialTool::initialize
virtual StatusCode initialize() override
Definition: LArRecoMaterialTool.cxx:37
LArRecoMaterialTool::m_volumeFractions
std::vector< double > m_volumeFractions
Definition: LArRecoMaterialTool.h:148
CaloSubdetNames::ALIGNVOL
ALIGNVOL
LAr Alignable volumes.
Definition: CaloSubdetNames.h:36
LArRecoMaterialTool::m_alignvol_number
std::vector< CaloSubdetNames::ALIGNVOL > m_alignvol_number
Definition: LArRecoMaterialTool.h:139