|
ATLAS Offline Software
|
This class implements the CaloDetDescr/ICaloRecoMaterialTool and provides the average materials needed for the LAr part of the Calorimeter/CaloTrackingGeometry volumes.
More...
#include <LArRecoMaterialTool.h>
|
| LArRecoMaterialTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
| ~LArRecoMaterialTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual bool | get_material (CaloSubdetNames::ALIGNVOL alvol, double &mass, double &volume, double &x0, double &dEdx, double &aveA, double &aveZ) const override |
|
virtual void | get_default_material (double &density, double &x0, double &dEdx, double &aveA, double &aveZ) const override |
| default material used to fill the envelope More...
|
|
void | print () const override |
|
|
void | ScanTree () |
| Private method called at initialisation : fills all arrays by calling the "optimised" methods. More...
|
|
bool | ScanCRYO (CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ) |
| Private optimised methods for each subsystem. More...
|
|
bool | ScanPS (CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ) |
|
bool | ScanEMB (CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ) |
|
bool | ScanEMEC (CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ) |
|
bool | ScanHEC (CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ) |
|
bool | ScanFCAL (CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ) |
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
std::string | map_av (CaloSubdetNames::ALIGNVOL alvol) |
|
This class implements the CaloDetDescr/ICaloRecoMaterialTool and provides the average materials needed for the LAr part of the Calorimeter/CaloTrackingGeometry volumes.
For this, it uses the PVLinks provided by the LArSubdetPosHelper.
Note that it means that eta/phi dependencies of the material within a given GeoModel volume is not supported : although an interface using the CaloDM identifiers is foreseen, numbers will be averaged.
Interface and implementation are preliminary !!!!
Definition at line 38 of file LArRecoMaterialTool.h.
◆ LArRecoMaterialTool()
LArRecoMaterialTool::LArRecoMaterialTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~LArRecoMaterialTool()
LArRecoMaterialTool::~LArRecoMaterialTool |
( |
| ) |
|
|
default |
◆ addMaterialFraction()
void LArRecoMaterialTool::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 |
Private method to add material.
Definition at line 1051 of file LArRecoMaterialTool.cxx.
1059 const GeoShape* childShape = geoVol.getShape();
1060 const GeoMaterial* childMaterial = geoVol.getMaterial();
1062 double childVolume = childShape->volume();
1064 double childNumberOfElements = childMaterial->getNumElements();
1065 double childX0 = childMaterial->getRadLength ();
1066 double childDeDx = childMaterial->getDeDxMin();
1067 double childRho = childMaterial->getDensity();
1070 <<
" has volume=" << childVolume <<
" mm**3 and "
1071 << childNumberOfElements <<
" elements ");
1073 for (
unsigned int iEl=0; iEl<childNumberOfElements; iEl++){
1074 const GeoElement* geoEl = childMaterial->getElement(iEl);
1075 double fraction = childMaterial->getFraction(iEl);
1077 ATH_MSG_DEBUG (
" direct child : " << geoEl->getName() <<
" fraction = " << fraction
1080 volume.push_back(fraction*childVolume);
1081 mass.push_back(fraction*childVolume*childRho);
1082 x0.push_back(fraction*childX0);
1083 dEdX.push_back(fraction*childDeDx);
1085 aveZ.push_back(fraction*(geoEl->getZ()));
◆ averageFraction()
void LArRecoMaterialTool::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 |
Private method to average results stored in private arrays.
Definition at line 1091 of file LArRecoMaterialTool.cxx.
1101 unsigned int parsedVolumes = massFractions.size();
1103 << parsedVolumes <<
" elements ");
1113 for (
unsigned int ivols = 0; ivols < parsedVolumes; ++ivols) {
1114 childMass += massFractions[ivols];
1115 childVolume += volumeFractions[ivols];
1118 for (
unsigned int ivolfrac = 0; ivolfrac < parsedVolumes; ++ivolfrac){
1119 double volfrac = volumeFractions[ivolfrac]/childVolume;
1120 childX0 += volfrac * x0Fractions[ivolfrac];
1121 childDeDx += volfrac * dEdXFractions[ivolfrac];
1122 double massfrac = massFractions[ivolfrac]/childMass;
1123 childAverageA += massfrac * averageAFractions[ivolfrac];
1124 childAverageZ += massfrac * averageZFractions[ivolfrac];
1130 ATH_MSG_DEBUG (
" + averaged over " << parsedVolumes <<
" volumes ");
◆ blendGeoVolume()
void LArRecoMaterialTool::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 |
Private method to blend GeoLogVolume.
Definition at line 1030 of file LArRecoMaterialTool.cxx.
1039 const GeoLogVol* currentVol = geoVolLink->getLogVol();
1042 unsigned int currentVolChilds = geoVolLink->getNChildVols();
1043 for (
unsigned int ichild = 0; ichild < currentVolChilds; ichild++){
1044 GeoPVConstLink childVolumeLink = geoVolLink->getChildVol(ichild);
◆ get_default_material()
void LArRecoMaterialTool::get_default_material |
( |
double & |
density, |
|
|
double & |
x0, |
|
|
double & |
dEdx, |
|
|
double & |
aveA, |
|
|
double & |
aveZ |
|
) |
| const |
|
overridevirtual |
◆ get_material()
bool LArRecoMaterialTool::get_material |
( |
CaloSubdetNames::ALIGNVOL |
alvol, |
|
|
double & |
mass, |
|
|
double & |
volume, |
|
|
double & |
x0, |
|
|
double & |
dEdx, |
|
|
double & |
aveA, |
|
|
double & |
aveZ |
|
) |
| const |
|
overridevirtual |
◆ initialize()
StatusCode LArRecoMaterialTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ map_av()
Definition at line 1143 of file LArRecoMaterialTool.cxx.
1148 return std::string(
"LARCRYO_B");
1150 return std::string(
"LARCRYO_EC_POS");
1152 return std::string(
"LARCRYO_EC_NEG");
1154 return std::string(
"SOLENOID");
1156 return std::string(
"PRESAMPLER_B_POS");
1158 return std::string(
"PRESAMPLER_B_NEG");
1160 return std::string(
"EMB_POS");
1162 return std::string(
"EMB_NEG");
1164 return std::string(
"PRESAMPLER_EC_POS");
1166 return std::string(
"PRESAMPLER_EC_NEG");
1168 return std::string(
"EMEC_POS");
1170 return std::string(
"EMEC_NEG");
1172 return std::string(
"HEC1_POS");
1174 return std::string(
"HEC1_NEG");
1176 return std::string(
"HEC2_POS");
1178 return std::string(
"HEC2_NEG");
1180 return std::string(
"FCAL1_POS");
1182 return std::string(
"FCAL1_NEG");
1184 return std::string(
"FCAL2_POS");
1186 return std::string(
"FCAL2_NEG");
1188 return std::string(
"FCAL3_POS");
1190 return std::string(
"FCAL3_NEG");
1192 return std::string(
"");
◆ print()
void LArRecoMaterialTool::print |
( |
| ) |
const |
|
override |
◆ ScanCRYO()
bool LArRecoMaterialTool::ScanCRYO |
( |
CaloSubdetNames::ALIGNVOL |
alvol, |
|
|
double & |
mass, |
|
|
double & |
x0, |
|
|
double & |
dEdx, |
|
|
double & |
aveA, |
|
|
double & |
aveZ |
|
) |
| |
|
private |
Private optimised methods for each subsystem.
Definition at line 173 of file LArRecoMaterialTool.cxx.
187 ATH_MSG_INFO (
"method ScanCryo does not support CaloSubdetNames::ALIGNVOL " << (
int) alvol);
228 double childVolume = 0.;
229 double childMass = 0.;
231 double childDeDx = 0.;
232 double childAverageA = 0.;
233 double childAverageZ = 0.;
234 double childRho = 0.;
251 const GeoFullPhysVol* larTopVolLink = storedPV->
getPhysVol();
254 unsigned int larChilds = larTopVolLink->getNChildVols();
256 for (
unsigned int ichild = 0; ichild<larChilds; ++ichild){
262 larTopVolLink->getNameOfChildVol(ichild) ==
"Total LAR Volume")
stop =
true;
264 larTopVolLink->getNameOfChildVol(ichild) ==
"Total LAR Volume")
stop =
true;
269 <<
" Direct Child " << ichild <<
" - with name : "
270 << larTopVolLink->getNameOfChildVol(ichild));
272 PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
295 childMass, childVolume,
297 childAverageA, childAverageZ, childRho );
312 ATH_MSG_DEBUG (
"Final average for CaloSubdetNames::ALIGNVOL " << (
int) alvol
320 childMass, childVolume,
322 childAverageA, childAverageZ, childRho );
327 aveA = childAverageA;
328 aveZ = childAverageZ;
◆ ScanEMB()
bool LArRecoMaterialTool::ScanEMB |
( |
CaloSubdetNames::ALIGNVOL |
alvol, |
|
|
double & |
mass, |
|
|
double & |
x0, |
|
|
double & |
dEdx, |
|
|
double & |
aveA, |
|
|
double & |
aveZ |
|
) |
| |
|
private |
Definition at line 501 of file LArRecoMaterialTool.cxx.
513 ATH_MSG_INFO (
"method ScanEMB does not support CaloSubdetNames::ALIGNVOL " << (
int) alvol);
539 double childVolume = 0.;
540 double childMass = 0.;
542 double childDeDx = 0.;
543 double childAverageA = 0.;
544 double childAverageZ = 0.;
545 double childRho = 0.;
567 const GeoFullPhysVol* larTopVolLink = storedPV->
getPhysVol();
570 unsigned int larChilds = larTopVolLink->getNChildVols();
572 for (
unsigned int ichild = 0; ichild<larChilds; ++ichild){
583 <<
" Direct Child " << ichild <<
" - with name : "
584 << larTopVolLink->getNameOfChildVol(ichild));
586 PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
609 childMass, childVolume,
611 childAverageA, childAverageZ, childRho );
626 ATH_MSG_DEBUG (
"Final average for CaloSubdetNames::ALIGNVOL " << (
int) alvol
634 childMass, childVolume,
636 childAverageA, childAverageZ, childRho );
641 aveA = childAverageA;
642 aveZ = childAverageZ;
◆ ScanEMEC()
bool LArRecoMaterialTool::ScanEMEC |
( |
CaloSubdetNames::ALIGNVOL |
alvol, |
|
|
double & |
mass, |
|
|
double & |
x0, |
|
|
double & |
dEdx, |
|
|
double & |
aveA, |
|
|
double & |
aveZ |
|
) |
| |
|
private |
◆ ScanFCAL()
bool LArRecoMaterialTool::ScanFCAL |
( |
CaloSubdetNames::ALIGNVOL |
alvol, |
|
|
double & |
mass, |
|
|
double & |
x0, |
|
|
double & |
dEdx, |
|
|
double & |
aveA, |
|
|
double & |
aveZ |
|
) |
| |
|
private |
Definition at line 852 of file LArRecoMaterialTool.cxx.
868 ATH_MSG_INFO (
"method ScanEMB does not support CaloSubdetNames::ALIGNVOL "
913 double childVolume = 0.;
914 double childMass = 0.;
916 double childDeDx = 0.;
917 double childAverageA = 0.;
918 double childAverageZ = 0.;
919 double childRho = 0.;
941 const GeoFullPhysVol* larTopVolLink = storedPV->
getPhysVol();
944 unsigned int larChilds = larTopVolLink->getNChildVols();
946 for (
unsigned int ichild = 0; ichild<larChilds; ++ichild){
957 <<
" Direct Child " << ichild <<
" - with name : "
958 << larTopVolLink->getNameOfChildVol(ichild));
960 PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
983 childMass, childVolume,
985 childAverageA, childAverageZ, childRho );
1000 ATH_MSG_DEBUG (
"Final average for CaloSubdetNames::ALIGNVOL " << (
int) alvol
1008 childMass, childVolume,
1010 childAverageA, childAverageZ, childRho );
1015 aveA = childAverageA;
1016 aveZ = childAverageZ;
◆ ScanHEC()
bool LArRecoMaterialTool::ScanHEC |
( |
CaloSubdetNames::ALIGNVOL |
alvol, |
|
|
double & |
mass, |
|
|
double & |
x0, |
|
|
double & |
dEdx, |
|
|
double & |
aveA, |
|
|
double & |
aveZ |
|
) |
| |
|
private |
Definition at line 694 of file LArRecoMaterialTool.cxx.
708 ATH_MSG_INFO (
"method ScanEMB does not support CaloSubdetNames::ALIGNVOL "
735 double childVolume = 0.;
736 double childMass = 0.;
738 double childDeDx = 0.;
739 double childAverageA = 0.;
740 double childAverageZ = 0.;
741 double childRho = 0.;
763 const GeoFullPhysVol* larTopVolLink = storedPV->
getPhysVol();
766 unsigned int larChilds = larTopVolLink->getNChildVols();
768 for (
unsigned int ichild = 0; ichild<larChilds; ++ichild){
779 <<
" Direct Child " << ichild <<
" - with name : "
780 << larTopVolLink->getNameOfChildVol(ichild));
782 PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
805 childMass, childVolume,
807 childAverageA, childAverageZ, childRho );
822 ATH_MSG_DEBUG (
"Final average for CaloSubdetNames::ALIGNVOL " << (
int) alvol
830 childMass, childVolume,
832 childAverageA, childAverageZ, childRho );
837 aveA = childAverageA;
838 aveZ = childAverageZ;
◆ ScanPS()
bool LArRecoMaterialTool::ScanPS |
( |
CaloSubdetNames::ALIGNVOL |
alvol, |
|
|
double & |
mass, |
|
|
double & |
x0, |
|
|
double & |
dEdx, |
|
|
double & |
aveA, |
|
|
double & |
aveZ |
|
) |
| |
|
private |
Definition at line 343 of file LArRecoMaterialTool.cxx.
358 ATH_MSG_INFO (
"method ScanCryo does not support CaloSubdetNames::ALIGNVOL " << (
int) alvol);
389 double childVolume = 0.;
390 double childMass = 0.;
392 double childDeDx = 0.;
393 double childAverageA = 0.;
394 double childAverageZ = 0.;
395 double childRho = 0.;
412 const GeoFullPhysVol* larTopVolLink = storedPV->
getPhysVol();
415 unsigned int larChilds = larTopVolLink->getNChildVols();
417 for (
unsigned int ichild = 0; ichild<larChilds; ++ichild){
428 <<
" Direct Child " << ichild <<
" - with name : "
429 << larTopVolLink->getNameOfChildVol(ichild));
431 PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
454 childMass, childVolume,
456 childAverageA, childAverageZ, childRho );
471 ATH_MSG_DEBUG (
"Final average for CaloSubdetNames::ALIGNVOL " << (
int) alvol
479 childMass, childVolume,
481 childAverageA, childAverageZ, childRho );
486 aveA = childAverageA;
487 aveZ = childAverageZ;
◆ ScanTree()
void LArRecoMaterialTool::ScanTree |
( |
| ) |
|
|
private |
Private method called at initialisation : fills all arrays by calling the "optimised" methods.
Definition at line 125 of file LArRecoMaterialTool.cxx.
◆ m_alignvol_aveA
std::vector<double> LArRecoMaterialTool::m_alignvol_aveA |
|
private |
◆ m_alignvol_aveZ
std::vector<double> LArRecoMaterialTool::m_alignvol_aveZ |
|
private |
◆ m_alignvol_dEdX
std::vector<double> LArRecoMaterialTool::m_alignvol_dEdX |
|
private |
◆ m_alignvol_mass
std::vector<double> LArRecoMaterialTool::m_alignvol_mass |
|
private |
◆ m_alignvol_number
◆ m_alignvol_x0
std::vector<double> LArRecoMaterialTool::m_alignvol_x0 |
|
private |
◆ m_averageAFractions
std::vector<double> LArRecoMaterialTool::m_averageAFractions |
|
private |
◆ m_averageZFractions
std::vector<double> LArRecoMaterialTool::m_averageZFractions |
|
private |
◆ m_calo_id
◆ m_child_averageAFractions
std::vector<double> LArRecoMaterialTool::m_child_averageAFractions |
|
private |
◆ m_child_averageZFractions
std::vector<double> LArRecoMaterialTool::m_child_averageZFractions |
|
private |
◆ m_child_dEdXFractions
std::vector<double> LArRecoMaterialTool::m_child_dEdXFractions |
|
private |
◆ m_child_Mass
std::vector<double> LArRecoMaterialTool::m_child_Mass |
|
private |
◆ m_child_massFractions
std::vector<double> LArRecoMaterialTool::m_child_massFractions |
|
private |
◆ m_child_Rho
std::vector<double> LArRecoMaterialTool::m_child_Rho |
|
private |
◆ m_child_Volume
std::vector<double> LArRecoMaterialTool::m_child_Volume |
|
private |
◆ m_child_volumeFractions
std::vector<double> LArRecoMaterialTool::m_child_volumeFractions |
|
private |
◆ m_child_x0Fractions
std::vector<double> LArRecoMaterialTool::m_child_x0Fractions |
|
private |
◆ m_dEdXFractions
std::vector<double> LArRecoMaterialTool::m_dEdXFractions |
|
private |
◆ m_dm_id
◆ m_massFractions
std::vector<double> LArRecoMaterialTool::m_massFractions |
|
private |
◆ m_parseGeoModelForMaterial
bool LArRecoMaterialTool::m_parseGeoModelForMaterial = false |
|
private |
◆ m_volumeFractions
std::vector<double> LArRecoMaterialTool::m_volumeFractions |
|
private |
◆ m_x0Fractions
std::vector<double> LArRecoMaterialTool::m_x0Fractions |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
GeoFullPhysVol * getPhysVol()
Destructor.