ATLAS Offline Software
LArRecoMaterialTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // ***************************************************************************
6 // LArCalorimeter/LArDetDescr/LArRecoMaterialTool.cxx
7 // -------------------------------------------------------------
8 //****************************************************************************
9 
11 
12 #include "GaudiKernel/Bootstrap.h"
13 #include "Gaudi/Property.h"
14 #include "GaudiKernel/IService.h"
15 #include "GaudiKernel/IToolSvc.h"
16 #include <vector>
17 
19 #include "GeoModelKernel/GeoFullPhysVol.h"
20 #include "GeoModelKernel/Units.h"
21 #include "GaudiKernel/SystemOfUnits.h"
22 
25 
26 #include <iostream>
27 #include <iomanip>
28 
29 static const InterfaceID IID_LArRecoMaterialTool("LArRecoMaterialTool", 1, 0);
30 
31 const InterfaceID& LArRecoMaterialTool::interfaceID( )
32 { return IID_LArRecoMaterialTool; }
33 
35  const std::string& name,
36  const IInterface* parent) :
38  m_calo_id(nullptr),m_dm_id(nullptr)
39 {
40  declareInterface<LArRecoMaterialTool>( this );
41 }
42 
45 {
46  ATH_CHECK( detStore()->retrieve (m_calo_id, "CaloCell_ID") );
47  ATH_CHECK( detStore()->retrieve (m_dm_id, "CaloDM_ID") );
48 
49  // These vectors will contain the results :
50  m_alignvol_number.resize(0);
51  m_alignvol_mass.resize(0);
52  m_alignvol_x0.resize(0);
53  m_alignvol_dEdX.resize(0);
54  m_alignvol_aveA.resize(0);
55  m_alignvol_aveZ.resize(0);
56 
57  // ---------- Fill arrays :
58 
59  // going though the full tree is too slow to be used as default,
60  // if you want to do it set this flag to true :
61  // ( will become a property at some point ! )
63 
64  this->ScanTree();
65  //this->print();
66 
67 
68  // ---------- That's it
69 
70 
71  ATH_MSG_INFO (" LArRecoMaterialTool successfully initialized ");
72  return StatusCode::SUCCESS;
73 }
74 
76 {
77 }
78 
81 {
82  return StatusCode::SUCCESS;
83 }
84 
85 
86 bool
88  double& mass, double& volume,
89  double& x0, double& dEdx,
90  double& aveA, double& aveZ
91  ) const
92 {
93  bool result = false;
94 
95  for ( unsigned int i = 0; i < m_alignvol_number.size(); i++ )
96  {
97  if ( m_alignvol_number[i] == alvol ) {
99  x0 = m_alignvol_x0[i];
100  dEdx = m_alignvol_dEdX[i];
101  aveA = m_alignvol_aveA[i];
102  aveZ = m_alignvol_aveZ[i];
103  // FIXME
104  volume = 1000.;
105  result = true;
106  }
107  }
108 
109  return result;
110 }
111 
112 void
114  double& x0, double& dEdx,
115  double& aveA, double& aveZ
116  ) const
117 {
118  // FIXME ! should take real LAr numbers
119  density = 1.;
120  x0 = 5.;
121  dEdx = 1.1e-24;
122  aveA = 39.948;
123  aveZ = 18.;
124 
125 }
126 
127 void
129 {
130 
131  for ( unsigned int i = 0; i < m_alignvol_number.size(); i++ )
132  {
133  ATH_MSG_INFO (" + Result for ALIGNVOL " << m_alignvol_number[i]);
134  ATH_MSG_INFO (" - mass [gram] " << m_alignvol_mass[i]);
135  ATH_MSG_INFO (" - X0 " << m_alignvol_x0[i]);
136  ATH_MSG_INFO (" - DeDx " << m_alignvol_dEdX[i]);
137  ATH_MSG_INFO (" - AverageA " << m_alignvol_aveA[i]);
138  ATH_MSG_INFO (" - AverageZ " << m_alignvol_aveZ[i]);
139  }
140 }
141 
142 void
144 {
145  double mass = 0.;
146  double x0 = 0.;
147  double dEdx = 0.;
148  double aveA = 0.;
149  double aveZ = 0.;
150 
151  bool result = false;
152 
153  ATH_MSG_INFO (" Entering method ScanTree() ");
154 
155  result = this->ScanCRYO(CaloSubdetNames::LARCRYO_B,mass,x0,dEdx,aveA,aveZ);
156  result = this->ScanCRYO(CaloSubdetNames::LARCRYO_EC_POS,mass,x0,dEdx,aveA,aveZ);
157  result = this->ScanCRYO(CaloSubdetNames::LARCRYO_EC_NEG,mass,x0,dEdx,aveA,aveZ);
158  result = this->ScanCRYO(CaloSubdetNames::SOLENOID,mass,x0,dEdx,aveA,aveZ);
159 
160  result = this->ScanPS(CaloSubdetNames::PRESAMPLER_B_POS,mass,x0,dEdx,aveA,aveZ);
161  result = this->ScanPS(CaloSubdetNames::PRESAMPLER_B_NEG,mass,x0,dEdx,aveA,aveZ);
162 
163  result = this->ScanEMB(CaloSubdetNames::EMB_POS,mass,x0,dEdx,aveA,aveZ);
164  result = this->ScanEMB(CaloSubdetNames::EMB_NEG,mass,x0,dEdx,aveA,aveZ);
165 
166  result = this->ScanPS(CaloSubdetNames::PRESAMPLER_EC_POS,mass,x0,dEdx,aveA,aveZ);
167  result = this->ScanPS(CaloSubdetNames::PRESAMPLER_EC_NEG,mass,x0,dEdx,aveA,aveZ);
168 
169  result = this->ScanEMEC(CaloSubdetNames::EMEC_POS,mass,x0,dEdx,aveA,aveZ);
170  result = this->ScanEMEC(CaloSubdetNames::EMEC_NEG,mass,x0,dEdx,aveA,aveZ);
171 
172  result = this->ScanHEC(CaloSubdetNames::HEC1_POS,mass,x0,dEdx,aveA,aveZ);
173  result = this->ScanHEC(CaloSubdetNames::HEC1_NEG,mass,x0,dEdx,aveA,aveZ);
174  result = this->ScanHEC(CaloSubdetNames::HEC2_POS,mass,x0,dEdx,aveA,aveZ);
175  result = this->ScanHEC(CaloSubdetNames::HEC2_NEG,mass,x0,dEdx,aveA,aveZ);
176 
177  result = this->ScanFCAL(CaloSubdetNames::FCAL1_POS,mass,x0,dEdx,aveA,aveZ);
178  result = this->ScanFCAL(CaloSubdetNames::FCAL1_NEG,mass,x0,dEdx,aveA,aveZ);
179  result = this->ScanFCAL(CaloSubdetNames::FCAL2_POS,mass,x0,dEdx,aveA,aveZ);
180  result = this->ScanFCAL(CaloSubdetNames::FCAL2_NEG,mass,x0,dEdx,aveA,aveZ);
181  result = this->ScanFCAL(CaloSubdetNames::FCAL3_POS,mass,x0,dEdx,aveA,aveZ);
182  result = this->ScanFCAL(CaloSubdetNames::FCAL3_NEG,mass,x0,dEdx,aveA,aveZ);
183 
184  if (!result)
185  ATH_MSG_INFO (" If seems to have failed ?");
186 
187  return;
188 }
189 
190 bool
192  double& mass, double& x0, double& dEdx,
193  double& aveA, double& aveZ)
194 {
195  mass = 0.;
196  x0 = 0.;
197  dEdx = 0.;
198  aveA = 0.;
199  aveZ = 0.;
200 
201  if ( alvol != CaloSubdetNames::LARCRYO_B
204  && alvol != CaloSubdetNames::SOLENOID ) {
205  ATH_MSG_INFO ("method ScanCryo does not support CaloSubdetNames::ALIGNVOL " << (int) alvol);
206  return false;
207  }
208 
209  // For EC, link to GeoModel does not exist (yet) : take barrel numbers
210 
211  // Shortcut :
213  {
214  //if ( alvol == CaloSubdetNames::LARCRYO_B || alvol == CaloSubdetNames::SOLENOID) {
215  mass = 3.61158e+07 ;
216  x0 = 89.411;
217  dEdx = 7.47033e-24 ;
218  aveA = 27.9728;
219  aveZ = 13.4253 ;
220 #if 0
221  } else {
222  mass = 3.61158e+07 ;
223  x0 = 89.411;
224  dEdx = 7.47033e-24 ;
225  aveA = 27.9728;
226  aveZ = 13.4253 ;
227  }
228 #endif
229  }
230 #if 0
231  // Dead code as long as m_parseGeoModelForMaterial is false.
232  // Comment out to avoid coverity warnings.
233  else {
234 
235  // Go for it :
236  m_child_massFractions.clear();
237  m_child_volumeFractions.clear();
238  m_child_x0Fractions.clear();
239  m_child_dEdXFractions.clear();
240  m_child_averageAFractions.clear();
241  m_child_averageZFractions.clear();
242  m_child_Rho.clear();
243  m_child_Volume.clear();
244  m_child_Mass.clear();
245 
246  double childVolume = 0.;
247  double childMass = 0.;
248  double childX0 = 0.;
249  double childDeDx = 0.;
250  double childAverageA = 0.;
251  double childAverageZ = 0.;
252  double childRho = 0.;
253 
254  const StoredPhysVol* storedPV = 0;
255  std::string key = map_av(alvol);
256  if(detStore()->contains<StoredPhysVol>(key))
257  {
258  if(detStore()->retrieve(storedPV,key)==StatusCode::FAILURE)
259  {
260  ATH_MSG_INFO ("Unable to retrieve Stored PV " << key);
261  }
262  }
263 
264  if (!storedPV) {
265  ATH_MSG_INFO ("no Volume for " << key);
266  return false;
267  }
268 
269  const GeoFullPhysVol* larTopVolLink = storedPV->getPhysVol();
270 
271  // get the number of direct childs
272  unsigned int larChilds = larTopVolLink->getNChildVols();
273 
274  for (unsigned int ichild = 0; ichild<larChilds; ++ichild){
275 
276  bool stop = false;
277 
278  // Skip some some of the children : list will get longer in future
279  if ( alvol == CaloSubdetNames::LARCRYO_B &&
280  larTopVolLink->getNameOfChildVol(ichild) == "Total LAR Volume") stop = true;
281  if ( alvol == CaloSubdetNames::SOLENOID &&
282  larTopVolLink->getNameOfChildVol(ichild) == "Total LAR Volume") stop = true;
283 
284  if (!stop) {
285 
286  ATH_MSG_DEBUG ("CaloSubdetNames::ALIGNVOL " << (int) alvol
287  <<" Direct Child " << ichild << " - with name : "
288  << larTopVolLink->getNameOfChildVol(ichild));
289 
290  PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
291 
292  m_massFractions.clear();
293  m_volumeFractions.clear();
294  m_x0Fractions.clear();
295  m_dEdXFractions.clear();
296  m_averageAFractions.clear();
297  m_averageZFractions.clear();
298 
299  this->blendGeoVolume(childVolLink,
300  m_volumeFractions,
301  m_massFractions,
302  m_x0Fractions,
303  m_dEdXFractions,
304  m_averageAFractions,
305  m_averageZFractions);
306 
307  this->averageFraction(m_volumeFractions,
308  m_massFractions,
309  m_x0Fractions,
310  m_dEdXFractions,
311  m_averageAFractions,
312  m_averageZFractions,
313  childMass, childVolume,
314  childX0, childDeDx,
315  childAverageA, childAverageZ, childRho );
316 
317  m_child_x0Fractions.push_back( childX0 );
318  m_child_dEdXFractions.push_back( childDeDx );
319  m_child_averageAFractions.push_back( childAverageA );
320  m_child_averageZFractions.push_back( childAverageZ );
321  m_child_Rho.push_back( childRho );
322  m_child_Volume.push_back( childVolume );
323  m_child_Mass.push_back( childMass );
324 
325  }
326  }
327 
328  // Now do the final average and store it :
329 
330  ATH_MSG_DEBUG ("Final average for CaloSubdetNames::ALIGNVOL " << (int) alvol
331  << " !!!!! ");
332 
333  this->averageFraction(m_child_Volume, m_child_Mass,
334  m_child_x0Fractions,
335  m_child_dEdXFractions,
336  m_child_averageAFractions,
337  m_child_averageZFractions,
338  childMass, childVolume,
339  childX0, childDeDx,
340  childAverageA, childAverageZ, childRho );
341 
342  mass = childMass/GeoModelKernelUnits::gram;
343  x0 = childX0;
344  dEdx = childDeDx;
345  aveA = childAverageA;
346  aveZ = childAverageZ;
347  }
348 #endif
349 
350  m_alignvol_number.push_back( alvol );
351  m_alignvol_mass.push_back( mass );
352  m_alignvol_x0.push_back( x0 );
353  m_alignvol_dEdX.push_back( dEdx );
354  m_alignvol_aveA.push_back( aveA );
355  m_alignvol_aveZ.push_back( aveZ );
356 
357  return true;
358 }
359 
360 bool
362  double& mass, double& x0, double& dEdx,
363  double& aveA, double& aveZ)
364 {
365  mass = 0.;
366  x0 = 0.;
367  dEdx = 0.;
368  aveA = 0.;
369  aveZ = 0.;
370 
371  if ( alvol != CaloSubdetNames::PRESAMPLER_B_POS
375  ) {
376  ATH_MSG_INFO ("method ScanCryo does not support CaloSubdetNames::ALIGNVOL " << (int) alvol);
377  return false;
378  }
379 
380  // for EMEC take Barrel numbers
381 
382  // Shortcut :
386  {
387  mass = 1.80785e+06 ;
388  x0 = 141.837;
389  dEdx = 3.55847e-24;
390  aveA = 39.5576;
391  aveZ = 17.8274;
392  }
393 
394  else {
395 
396  // Go for it :
397  m_child_massFractions.clear();
398  m_child_volumeFractions.clear();
399  m_child_x0Fractions.clear();
400  m_child_dEdXFractions.clear();
403  m_child_Rho.clear();
404  m_child_Volume.clear();
405  m_child_Mass.clear();
406 
407  double childVolume = 0.;
408  double childMass = 0.;
409  double childX0 = 0.;
410  double childDeDx = 0.;
411  double childAverageA = 0.;
412  double childAverageZ = 0.;
413  double childRho = 0.;
414 
415  StoredPhysVol* storedPV = nullptr;
416  std::string key = map_av(alvol);
417  if(detStore()->contains<StoredPhysVol>(key))
418  {
419  if(detStore()->retrieve(storedPV,key)==StatusCode::FAILURE)
420  {
421  ATH_MSG_INFO ("Unable to retrieve Stored PV " << key);
422  }
423  }
424 
425  if (!storedPV) {
426  ATH_MSG_INFO ("no Volume for " << key);
427  return false;
428  }
429 
430  const GeoFullPhysVol* larTopVolLink = storedPV->getPhysVol();
431 
432  // get the number of direct childs
433  unsigned int larChilds = larTopVolLink->getNChildVols();
434 
435  for (unsigned int ichild = 0; ichild<larChilds; ++ichild){
436 
437  bool stop = false;
438 
439  // Skip some some of the children : list will get longer in future
440  //if ( alvol == CaloSubdetNames::LARCRYO_B &&
441  // larTopVolLink->getNameOfChildVol(ichild) == "Total LAR Volume") stop = true;
442 
443  if (!stop) {
444 
445  ATH_MSG_DEBUG ("CaloSubdetNames::ALIGNVOL " << (int) alvol
446  <<" Direct Child " << ichild << " - with name : "
447  << larTopVolLink->getNameOfChildVol(ichild));
448 
449  PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
450 
451  m_massFractions.clear();
452  m_volumeFractions.clear();
453  m_x0Fractions.clear();
454  m_dEdXFractions.clear();
455  m_averageAFractions.clear();
456  m_averageZFractions.clear();
457 
458  this->blendGeoVolume(childVolLink,
465 
472  childMass, childVolume,
473  childX0, childDeDx,
474  childAverageA, childAverageZ, childRho );
475 
476  m_child_x0Fractions.push_back( childX0 );
477  m_child_dEdXFractions.push_back( childDeDx );
478  m_child_averageAFractions.push_back( childAverageA );
479  m_child_averageZFractions.push_back( childAverageZ );
480  m_child_Rho.push_back( childRho );
481  m_child_Volume.push_back( childVolume );
482  m_child_Mass.push_back( childMass );
483 
484  }
485  }
486 
487  // Now do the final average and store it :
488 
489  ATH_MSG_DEBUG ("Final average for CaloSubdetNames::ALIGNVOL " << (int) alvol
490  << " !!!!! ");
491 
497  childMass, childVolume,
498  childX0, childDeDx,
499  childAverageA, childAverageZ, childRho );
500 
501  mass = childMass*(1./GeoModelKernelUnits::gram);
502  x0 = childX0;
503  dEdx = childDeDx;
504  aveA = childAverageA;
505  aveZ = childAverageZ;
506  }
507 
508  m_alignvol_number.push_back( alvol );
509  m_alignvol_mass.push_back( mass );
510  m_alignvol_x0.push_back( x0 );
511  m_alignvol_dEdX.push_back( dEdx );
512  m_alignvol_aveA.push_back( aveA );
513  m_alignvol_aveZ.push_back( aveZ );
514 
515  return true;
516 }
517 
518 bool
520  double& mass, double& x0, double& dEdx,
521  double& aveA, double& aveZ)
522 {
523  mass = 0.;
524  x0 = 0.;
525  dEdx = 0.;
526  aveA = 0.;
527  aveZ = 0.;
528 
529  if ( alvol != CaloSubdetNames::EMB_POS &&
530  alvol != CaloSubdetNames::EMB_NEG ) {
531  ATH_MSG_INFO ("method ScanEMB does not support CaloSubdetNames::ALIGNVOL " << (int) alvol);
532  return false;
533  }
534 
535  // Shortcut :
537  {
538  mass = 9.40439e+07 ;
539  x0 = 93.9601;
540  dEdx = 6.0789e-24;
541  aveA = 98.5676;
542  aveZ = 39.7406;
543  }
544  else {
545 
546  // Here we go :
547  m_child_massFractions.clear();
548  m_child_volumeFractions.clear();
549  m_child_x0Fractions.clear();
550  m_child_dEdXFractions.clear();
553  m_child_Rho.clear();
554  m_child_Volume.clear();
555  m_child_Mass.clear();
556 
557  double childVolume = 0.;
558  double childMass = 0.;
559  double childX0 = 0.;
560  double childDeDx = 0.;
561  double childAverageA = 0.;
562  double childAverageZ = 0.;
563  double childRho = 0.;
564 
565  StoredPhysVol* storedPV = nullptr;
566  std::string key = map_av(alvol);
567  if(detStore()->contains<StoredPhysVol>(key))
568  {
569  if(detStore()->retrieve(storedPV,key)==StatusCode::FAILURE)
570  {
571  ATH_MSG_INFO ("Unable to retrieve Stored PV " << key);
572  }
573  }
574 
575  if (!storedPV) {
576  ATH_MSG_INFO ("no Volume for " << key);
577  mass = 0.;
578  x0 = 0.;
579  dEdx = 0.;
580  aveA = 0.;
581  aveZ = 0.;
582  return false;
583  }
584 
585  const GeoFullPhysVol* larTopVolLink = storedPV->getPhysVol();
586 
587  // get the number of direct childs
588  unsigned int larChilds = larTopVolLink->getNChildVols();
589 
590  for (unsigned int ichild = 0; ichild<larChilds; ++ichild){
591 
592  bool stop = false;
593 
594  // Skip some some of the children : list will get longer in future
595  //if ( alvol == CaloSubdetNames::LARCRYO_B &&
596  // larTopVolLink->getNameOfChildVol(ichild) == "Total LAR Volume") stop = true;
597 
598  if (!stop) {
599 
600  ATH_MSG_DEBUG ("CaloSubdetNames::ALIGNVOL " << (int) alvol
601  <<" Direct Child " << ichild << " - with name : "
602  << larTopVolLink->getNameOfChildVol(ichild));
603 
604  PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
605 
606  m_massFractions.clear();
607  m_volumeFractions.clear();
608  m_x0Fractions.clear();
609  m_dEdXFractions.clear();
610  m_averageAFractions.clear();
611  m_averageZFractions.clear();
612 
613  this->blendGeoVolume(childVolLink,
620 
627  childMass, childVolume,
628  childX0, childDeDx,
629  childAverageA, childAverageZ, childRho );
630 
631  m_child_x0Fractions.push_back( childX0 );
632  m_child_dEdXFractions.push_back( childDeDx );
633  m_child_averageAFractions.push_back( childAverageA );
634  m_child_averageZFractions.push_back( childAverageZ );
635  m_child_Rho.push_back( childRho );
636  m_child_Volume.push_back( childVolume );
637  m_child_Mass.push_back( childMass );
638 
639  }
640  }
641 
642  // Now do the final average and store it :
643 
644  ATH_MSG_DEBUG ("Final average for CaloSubdetNames::ALIGNVOL " << (int) alvol
645  << " !!!!! ");
646 
652  childMass, childVolume,
653  childX0, childDeDx,
654  childAverageA, childAverageZ, childRho );
655 
656  mass = childMass*(1./GeoModelKernelUnits::gram);
657  x0 = childX0;
658  dEdx = childDeDx;
659  aveA = childAverageA;
660  aveZ = childAverageZ;
661  }
662 
663  m_alignvol_number.push_back( alvol );
664  m_alignvol_mass.push_back( mass );
665  m_alignvol_x0.push_back( x0 );
666  m_alignvol_dEdX.push_back( dEdx );
667  m_alignvol_aveA.push_back( aveA );
668  m_alignvol_aveZ.push_back( aveZ );
669 
670  return true;
671 }
672 
673 bool
675  double& mass, double& x0, double& dEdx,
676  double& aveA, double& aveZ)
677 {
678  mass = 0.;
679  x0 = 0.;
680  dEdx = 0.;
681  aveA = 0.;
682  aveZ = 0.;
683 
684  if ( alvol != CaloSubdetNames::EMEC_POS && alvol != CaloSubdetNames::EMEC_NEG ) {
685  ATH_MSG_INFO ("method ScanEMEM does not support CaloSubdetNames::ALIGNVOL " << (int) alvol);
686  return false;
687  }
688 
689  // EMEC use a couple of custom volumes :
690  // LAr::EMEC::OuterWheel::Absorber has volume=0 mm**3 and 5 elements
691  // LAr::EMEC::OuterWheel::Electrode has volume=0 mm**3 and 5 elements
692  // ==> with volume = 0 avarages cannot work !!!
693  // Take EMB's density for now ....
694  mass = 9.40439e+07 ;
695  x0 = 93.9601;
696  dEdx = 6.0789e-24;
697  aveA = 98.5676;
698  aveZ = 39.7406;
699 
700 
701  m_alignvol_number.push_back( alvol );
702  m_alignvol_mass.push_back( mass );
703  m_alignvol_x0.push_back( x0 );
704  m_alignvol_dEdX.push_back( dEdx );
705  m_alignvol_aveA.push_back( aveA );
706  m_alignvol_aveZ.push_back( aveZ );
707 
708  return true;
709 }
710 
711 bool
713  double& mass, double& x0, double& dEdx,
714  double& aveA, double& aveZ)
715 {
716  mass = 0.;
717  x0 = 0.;
718  dEdx = 0.;
719  aveA = 0.;
720  aveZ = 0.;
721 
722  if ( alvol != CaloSubdetNames::HEC1_POS &&
723  alvol != CaloSubdetNames::HEC1_NEG &&
724  alvol != CaloSubdetNames::HEC2_POS &&
725  alvol != CaloSubdetNames::HEC2_NEG ) {
726  ATH_MSG_INFO ("method ScanEMB does not support CaloSubdetNames::ALIGNVOL "
727  << (int) alvol);
728  return false;
729  }
730 
731  // Shortcut :
733  {
734  mass = 6.06935e+06;
735  x0 = 91.1845;
736  dEdx = 1.14141e-23;
737  aveA = 58.9808;
738  aveZ = 26.8777;
739  }
740  else {
741 
742  // Here we go :
743  m_child_massFractions.clear();
744  m_child_volumeFractions.clear();
745  m_child_x0Fractions.clear();
746  m_child_dEdXFractions.clear();
749  m_child_Rho.clear();
750  m_child_Volume.clear();
751  m_child_Mass.clear();
752 
753  double childVolume = 0.;
754  double childMass = 0.;
755  double childX0 = 0.;
756  double childDeDx = 0.;
757  double childAverageA = 0.;
758  double childAverageZ = 0.;
759  double childRho = 0.;
760 
761  StoredPhysVol* storedPV = nullptr;
762  std::string key = map_av(alvol);
763  if(detStore()->contains<StoredPhysVol>(key))
764  {
765  if(detStore()->retrieve(storedPV,key)==StatusCode::FAILURE)
766  {
767  ATH_MSG_INFO ("Unable to retrieve Stored PV " << key);
768  }
769  }
770 
771  if (!storedPV) {
772  ATH_MSG_INFO ("no Volume for " << key);
773  mass = 0.;
774  x0 = 0.;
775  dEdx = 0.;
776  aveA = 0.;
777  aveZ = 0.;
778  return false;
779  }
780 
781  const GeoFullPhysVol* larTopVolLink = storedPV->getPhysVol();
782 
783  // get the number of direct childs
784  unsigned int larChilds = larTopVolLink->getNChildVols();
785 
786  for (unsigned int ichild = 0; ichild<larChilds; ++ichild){
787 
788  bool stop = false;
789 
790  // Skip some some of the children : list will get longer in future
791  //if ( alvol == CaloSubdetNames::LARCRYO_B &&
792  // larTopVolLink->getNameOfChildVol(ichild) == "Total LAR Volume") stop = true;
793 
794  if (!stop) {
795 
796  ATH_MSG_DEBUG ("CaloSubdetNames::ALIGNVOL " << (int) alvol
797  <<" Direct Child " << ichild << " - with name : "
798  << larTopVolLink->getNameOfChildVol(ichild));
799 
800  PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
801 
802  m_massFractions.clear();
803  m_volumeFractions.clear();
804  m_x0Fractions.clear();
805  m_dEdXFractions.clear();
806  m_averageAFractions.clear();
807  m_averageZFractions.clear();
808 
809  this->blendGeoVolume(childVolLink,
816 
823  childMass, childVolume,
824  childX0, childDeDx,
825  childAverageA, childAverageZ, childRho );
826 
827  m_child_x0Fractions.push_back( childX0 );
828  m_child_dEdXFractions.push_back( childDeDx );
829  m_child_averageAFractions.push_back( childAverageA );
830  m_child_averageZFractions.push_back( childAverageZ );
831  m_child_Rho.push_back( childRho );
832  m_child_Volume.push_back( childVolume );
833  m_child_Mass.push_back( childMass );
834 
835  }
836  }
837 
838  // Now do the final average and store it :
839 
840  ATH_MSG_DEBUG ("Final average for CaloSubdetNames::ALIGNVOL " << (int) alvol
841  << " !!!!! ");
842 
848  childMass, childVolume,
849  childX0, childDeDx,
850  childAverageA, childAverageZ, childRho );
851 
852  mass = childMass*(1./GeoModelKernelUnits::gram);
853  x0 = childX0;
854  dEdx = childDeDx;
855  aveA = childAverageA;
856  aveZ = childAverageZ;
857  }
858 
859  m_alignvol_number.push_back( alvol );
860  m_alignvol_mass.push_back( mass );
861  m_alignvol_x0.push_back( x0 );
862  m_alignvol_dEdX.push_back( dEdx );
863  m_alignvol_aveA.push_back( aveA );
864  m_alignvol_aveZ.push_back( aveZ );
865 
866  return true;
867 }
868 
869 bool
871  double& mass, double& x0, double& dEdx,
872  double& aveA, double& aveZ)
873 {
874  mass = 0.;
875  x0 = 0.;
876  dEdx = 0.;
877  aveA = 0.;
878  aveZ = 0.;
879 
880  if ( alvol != CaloSubdetNames::FCAL1_POS &&
881  alvol != CaloSubdetNames::FCAL1_NEG &&
882  alvol != CaloSubdetNames::FCAL2_POS &&
883  alvol != CaloSubdetNames::FCAL2_NEG &&
884  alvol != CaloSubdetNames::FCAL3_POS &&
885  alvol != CaloSubdetNames::FCAL3_NEG ) {
886  ATH_MSG_INFO ("method ScanEMB does not support CaloSubdetNames::ALIGNVOL "
887  << (int) alvol);
888  return false;
889  }
890 
891  // Shortcut :
893  {
894  if (alvol == CaloSubdetNames::FCAL1_POS || alvol == CaloSubdetNames::FCAL1_NEG) {
895  mass = 47825.7;
896  x0 = 127.627;
897  dEdx = 4.36158e-24;
898  aveA = 42.5374;
899  aveZ = 19.2601;
900  }
901  else if (alvol == CaloSubdetNames::FCAL2_POS || alvol == CaloSubdetNames::FCAL2_NEG) {
902  mass = 1.77759e+06;
903  x0 = 81.6747;
904  dEdx = 1.9157e-23;
905  aveA = 159.937;
906  aveZ = 64.5724;
907  }
908  else if (alvol == CaloSubdetNames::FCAL3_POS || alvol == CaloSubdetNames::FCAL3_NEG) {
909  mass = 1.80016e+06;
910  x0 = 82.9447;
911  dEdx = 1.86512e-23;
912  aveA = 158.884;
913  aveZ = 64.1669;
914  }
915 
916  }
917 
918  else {
919 
920  // Here we go :
921  m_child_massFractions.clear();
922  m_child_volumeFractions.clear();
923  m_child_x0Fractions.clear();
924  m_child_dEdXFractions.clear();
927  m_child_Rho.clear();
928  m_child_Volume.clear();
929  m_child_Mass.clear();
930 
931  double childVolume = 0.;
932  double childMass = 0.;
933  double childX0 = 0.;
934  double childDeDx = 0.;
935  double childAverageA = 0.;
936  double childAverageZ = 0.;
937  double childRho = 0.;
938 
939  StoredPhysVol* storedPV = nullptr;
940  std::string key = map_av(alvol);
941  if(detStore()->contains<StoredPhysVol>(key))
942  {
943  if(detStore()->retrieve(storedPV,key)==StatusCode::FAILURE)
944  {
945  ATH_MSG_INFO ("Unable to retrieve Stored PV " << key);
946  }
947  }
948 
949  if (!storedPV) {
950  ATH_MSG_INFO ("no Volume for " << key);
951  mass = 0.;
952  x0 = 0.;
953  dEdx = 0.;
954  aveA = 0.;
955  aveZ = 0.;
956  return false;
957  }
958 
959  const GeoFullPhysVol* larTopVolLink = storedPV->getPhysVol();
960 
961  // get the number of direct childs
962  unsigned int larChilds = larTopVolLink->getNChildVols();
963 
964  for (unsigned int ichild = 0; ichild<larChilds; ++ichild){
965 
966  bool stop = false;
967 
968  // Skip some some of the children : list will get longer in future
969  //if ( alvol == CaloSubdetNames::LARCRYO_B &&
970  // larTopVolLink->getNameOfChildVol(ichild) == "Total LAR Volume") stop = true;
971 
972  if (!stop) {
973 
974  ATH_MSG_DEBUG ("CaloSubdetNames::ALIGNVOL " << (int) alvol
975  <<" Direct Child " << ichild << " - with name : "
976  << larTopVolLink->getNameOfChildVol(ichild));
977 
978  PVConstLink childVolLink = larTopVolLink->getChildVol(ichild);
979 
980  m_massFractions.clear();
981  m_volumeFractions.clear();
982  m_x0Fractions.clear();
983  m_dEdXFractions.clear();
984  m_averageAFractions.clear();
985  m_averageZFractions.clear();
986 
987  this->blendGeoVolume(childVolLink,
994 
1001  childMass, childVolume,
1002  childX0, childDeDx,
1003  childAverageA, childAverageZ, childRho );
1004 
1005  m_child_x0Fractions.push_back( childX0 );
1006  m_child_dEdXFractions.push_back( childDeDx );
1007  m_child_averageAFractions.push_back( childAverageA );
1008  m_child_averageZFractions.push_back( childAverageZ );
1009  m_child_Rho.push_back( childRho );
1010  m_child_Volume.push_back( childVolume );
1011  m_child_Mass.push_back( childMass );
1012 
1013  }
1014  }
1015 
1016  // Now do the final average and store it :
1017 
1018  ATH_MSG_DEBUG ("Final average for CaloSubdetNames::ALIGNVOL " << (int) alvol
1019  << " !!!!! ");
1020 
1026  childMass, childVolume,
1027  childX0, childDeDx,
1028  childAverageA, childAverageZ, childRho );
1029 
1030  mass = childMass*(1./GeoModelKernelUnits::gram);
1031  x0 = childX0;
1032  dEdx = childDeDx;
1033  aveA = childAverageA;
1034  aveZ = childAverageZ;
1035  }
1036 
1037  m_alignvol_number.push_back( alvol );
1038  m_alignvol_mass.push_back( mass );
1039  m_alignvol_x0.push_back( x0 );
1040  m_alignvol_dEdX.push_back( dEdx );
1041  m_alignvol_aveA.push_back( aveA );
1042  m_alignvol_aveZ.push_back( aveZ );
1043 
1044  return true;
1045 }
1046 
1047 void
1048 LArRecoMaterialTool::blendGeoVolume(GeoPVConstLink& geoVolLink,
1049  std::vector<double>& volume,
1050  std::vector<double>& mass,
1051  std::vector<double>& x0,
1052  std::vector<double>& dEdX,
1053  std::vector<double>& aveA,
1054  std::vector<double>& aveZ) const
1055 {
1056 
1057  const GeoLogVol* currentVol = geoVolLink->getLogVol();
1058  if (currentVol){
1059  this->addMaterialFraction(*currentVol, volume, mass, x0, dEdX, aveA, aveZ);
1060  unsigned int currentVolChilds = geoVolLink->getNChildVols();
1061  for (unsigned int ichild = 0; ichild < currentVolChilds; ichild++){
1062  GeoPVConstLink childVolumeLink = geoVolLink->getChildVol(ichild);
1063  this->blendGeoVolume(childVolumeLink, volume, mass, x0, dEdX, aveA, aveZ);
1064  }
1065  }
1066 }
1067 
1068 void
1070  std::vector<double>& volume,
1071  std::vector<double>& mass,
1072  std::vector<double>& x0,
1073  std::vector<double>& dEdX,
1074  std::vector<double>& aveA,
1075  std::vector<double>& aveZ) const
1076 {
1077  const GeoShape* childShape = geoVol.getShape();
1078  const GeoMaterial* childMaterial = geoVol.getMaterial();
1079 
1080  double childVolume = childShape->volume();
1081 
1082  double childNumberOfElements = childMaterial->getNumElements();
1083  double childX0 = childMaterial->getRadLength ();
1084  double childDeDx = childMaterial->getDeDxMin();
1085  double childRho = childMaterial->getDensity();
1086 
1087  ATH_MSG_DEBUG ("addMaterialFraction : " << geoVol.getName()
1088  << " has volume=" << childVolume << " mm**3 and "
1089  << childNumberOfElements << " elements ");
1090 
1091  for (unsigned int iEl=0; iEl<childNumberOfElements; iEl++){
1092  const GeoElement* geoEl = childMaterial->getElement(iEl);
1093  double fraction = childMaterial->getFraction(iEl);
1094 
1095  ATH_MSG_DEBUG (" direct child : " << geoEl->getName() << " fraction = " << fraction
1096  << " A= " << geoEl->getA()*(1./GeoModelKernelUnits::gram) << " Z= " << geoEl->getZ());
1097 
1098  volume.push_back(fraction*childVolume);
1099  mass.push_back(fraction*childVolume*childRho);
1100  x0.push_back(fraction*childX0);
1101  dEdX.push_back(fraction*childDeDx);
1102  aveA.push_back(fraction*(geoEl->getA()*(1./GeoModelKernelUnits::gram)));
1103  aveZ.push_back(fraction*(geoEl->getZ()));
1104  }
1105 
1106 }
1107 
1108 void
1109 LArRecoMaterialTool::averageFraction (std::vector<double>& volumeFractions,
1110  std::vector<double>& massFractions,
1111  std::vector<double>& x0Fractions,
1112  std::vector<double>& dEdXFractions,
1113  std::vector<double>& averageAFractions,
1114  std::vector<double>& averageZFractions,
1115  double& childMass, double& childVolume,
1116  double& childX0, double& childDeDx,
1117  double& childAverageA, double& childAverageZ, double& childRho )
1118 {
1119  unsigned int parsedVolumes = massFractions.size();
1120  ATH_MSG_DEBUG (" averageFraction : will average over... "
1121  << parsedVolumes << " elements ");
1122 
1123  childMass = 0.;
1124  childVolume = 0.;
1125  childX0 = 0.;
1126  childDeDx = 0.;
1127  childAverageA = 0.;
1128  childAverageZ = 0.;
1129  childRho = 0.;
1130 
1131  for (unsigned int ivols = 0; ivols < parsedVolumes; ++ivols) {
1132  childMass += massFractions[ivols];
1133  childVolume += volumeFractions[ivols];
1134  }
1135 
1136  for (unsigned int ivolfrac = 0; ivolfrac < parsedVolumes; ++ivolfrac){
1137  double volfrac = volumeFractions[ivolfrac]/childVolume;
1138  childX0 += volfrac * x0Fractions[ivolfrac];
1139  childDeDx += volfrac * dEdXFractions[ivolfrac];
1140  double massfrac = massFractions[ivolfrac]/childMass;
1141  childAverageA += massfrac * averageAFractions[ivolfrac];
1142  childAverageZ += massfrac * averageZFractions[ivolfrac];
1143  }
1144 
1145  childRho = childMass/(GeoModelKernelUnits::gram*childVolume);
1146 
1147  ATH_MSG_DEBUG ("");
1148  ATH_MSG_DEBUG (" + averaged over " << parsedVolumes << " volumes ");
1149  ATH_MSG_DEBUG (" - volume [mm^3] : " << childVolume);
1150  ATH_MSG_DEBUG (" - mass [gram] : " << childMass*(1./GeoModelKernelUnits::gram));
1151  ATH_MSG_DEBUG (" - rho [gram/mm^3] : " << childRho);
1152  ATH_MSG_DEBUG (" - X0 : " << childX0);
1153  ATH_MSG_DEBUG (" - DeDx : " << childDeDx);
1154  ATH_MSG_DEBUG (" - AverageA : " << childAverageA);
1155  ATH_MSG_DEBUG (" - AverageZ : " << childAverageZ);
1156  ATH_MSG_DEBUG ("");
1157 
1158 }
1159 
1160 std::string
1162 {
1163  switch(alvol)
1164  {
1166  return std::string("LARCRYO_B");
1168  return std::string("LARCRYO_EC_POS");
1170  return std::string("LARCRYO_EC_NEG");
1172  return std::string("SOLENOID");
1174  return std::string("PRESAMPLER_B_POS");
1176  return std::string("PRESAMPLER_B_NEG");
1178  return std::string("EMB_POS");
1180  return std::string("EMB_NEG");
1182  return std::string("PRESAMPLER_EC_POS");
1184  return std::string("PRESAMPLER_EC_NEG");
1186  return std::string("EMEC_POS");
1188  return std::string("EMEC_NEG");
1190  return std::string("HEC1_POS");
1192  return std::string("HEC1_NEG");
1194  return std::string("HEC2_POS");
1196  return std::string("HEC2_NEG");
1198  return std::string("FCAL1_POS");
1200  return std::string("FCAL1_NEG");
1202  return std::string("FCAL2_POS");
1204  return std::string("FCAL2_NEG");
1206  return std::string("FCAL3_POS");
1208  return std::string("FCAL3_NEG");
1209  default:
1210  return std::string("");
1211  }
1212 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArRecoMaterialTool::m_child_averageZFractions
std::vector< double > m_child_averageZFractions
Definition: LArRecoMaterialTool.h:168
LArRecoMaterialTool::ScanEMEC
bool ScanEMEC(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:674
CaloSubdetNames::HEC2_POS
@ HEC2_POS
Definition: CaloSubdetNames.h:42
get_generator_info.result
result
Definition: get_generator_info.py:21
LArRecoMaterialTool::m_alignvol_mass
std::vector< double > m_alignvol_mass
Definition: LArRecoMaterialTool.h:149
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArRecoMaterialTool::LArRecoMaterialTool
LArRecoMaterialTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LArRecoMaterialTool.cxx:34
LArRecoMaterialTool::m_child_Mass
std::vector< double > m_child_Mass
Definition: LArRecoMaterialTool.h:171
CaloSubdetNames::EMB_POS
@ EMB_POS
Definition: CaloSubdetNames.h:38
LArRecoMaterialTool::m_dm_id
const CaloDM_ID * m_dm_id
Definition: LArRecoMaterialTool.h:145
CaloSubdetNames::PRESAMPLER_B_NEG
@ PRESAMPLER_B_NEG
Definition: CaloSubdetNames.h:37
CaloSubdetNames::FCAL2_POS
@ FCAL2_POS
Definition: CaloSubdetNames.h:44
LArRecoMaterialTool::m_child_Volume
std::vector< double > m_child_Volume
Definition: LArRecoMaterialTool.h:170
LArRecoMaterialTool::~LArRecoMaterialTool
~LArRecoMaterialTool()
Definition: LArRecoMaterialTool.cxx:75
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
python.SystemOfUnits.gram
int gram
Definition: SystemOfUnits.py:165
LArRecoMaterialTool::m_averageZFractions
std::vector< double > m_averageZFractions
Definition: LArRecoMaterialTool.h:161
LArRecoMaterialTool::m_child_volumeFractions
std::vector< double > m_child_volumeFractions
Definition: LArRecoMaterialTool.h:164
LArRecoMaterialTool::m_calo_id
const CaloCell_ID * m_calo_id
Definition: LArRecoMaterialTool.h:144
LArRecoMaterialTool::ScanPS
bool ScanPS(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:361
CaloSubdetNames::HEC1_NEG
@ HEC1_NEG
Definition: CaloSubdetNames.h:41
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
CaloSubdetNames::FCAL1_POS
@ FCAL1_POS
Definition: CaloSubdetNames.h:43
LArRecoMaterialTool::ScanTree
void ScanTree()
Private method called at initialisation : fills all arrays by calling the "optimised" methods.
Definition: LArRecoMaterialTool.cxx:143
LArRecoMaterialTool::print
void print() const override
printout method
Definition: LArRecoMaterialTool.cxx:128
CaloSubdetNames::EMEC_POS
@ EMEC_POS
Definition: CaloSubdetNames.h:40
CaloCell_ID.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
LArRecoMaterialTool::m_alignvol_aveZ
std::vector< double > m_alignvol_aveZ
Definition: LArRecoMaterialTool.h:153
CaloSubdetNames::HEC2_NEG
@ HEC2_NEG
Definition: CaloSubdetNames.h:42
CaloSubdetNames::FCAL3_POS
@ FCAL3_POS
Definition: CaloSubdetNames.h:45
StoredPhysVol
Definition: StoredPhysVol.h:27
CaloSubdetNames::PRESAMPLER_EC_POS
@ PRESAMPLER_EC_POS
Definition: CaloSubdetNames.h:39
CaloSubdetNames::PRESAMPLER_B_POS
@ PRESAMPLER_B_POS
Definition: CaloSubdetNames.h:37
CaloSubdetNames::EMEC_NEG
@ EMEC_NEG
Definition: CaloSubdetNames.h:40
StoredPhysVol::getPhysVol
GeoFullPhysVol * getPhysVol()
Destructor.
Definition: StoredPhysVol.cxx:20
LArRecoMaterialTool::ScanEMB
bool ScanEMB(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:519
CaloSubdetNames::LARCRYO_B
@ LARCRYO_B
Definition: CaloSubdetNames.h:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArRecoMaterialTool::m_child_averageAFractions
std::vector< double > m_child_averageAFractions
Definition: LArRecoMaterialTool.h:167
LArRecoMaterialTool::m_child_x0Fractions
std::vector< double > m_child_x0Fractions
Definition: LArRecoMaterialTool.h:165
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LArRecoMaterialTool::m_alignvol_aveA
std::vector< double > m_alignvol_aveA
Definition: LArRecoMaterialTool.h:152
CaloSubdetNames::LARCRYO_EC_POS
@ LARCRYO_EC_POS
Definition: CaloSubdetNames.h:36
CaloSubdetNames::FCAL3_NEG
@ FCAL3_NEG
Definition: CaloSubdetNames.h:45
LArRecoMaterialTool::get_material
virtual bool get_material(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &volume, double &x0, double &dEdx, double &aveA, double &aveZ) const override
the enum ALIGNVOL covers all LAr pieces, including cryostats
Definition: LArRecoMaterialTool.cxx:87
LArRecoMaterialTool::finalize
virtual StatusCode finalize() override
Definition: LArRecoMaterialTool.cxx:80
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArRecoMaterialTool.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArRecoMaterialTool::ScanFCAL
bool ScanFCAL(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:870
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:113
CaloDM_ID.h
LArRecoMaterialTool::m_child_Rho
std::vector< double > m_child_Rho
Definition: LArRecoMaterialTool.h:169
CaloSubdetNames::HEC1_POS
@ HEC1_POS
Definition: CaloSubdetNames.h:41
LArRecoMaterialTool::m_dEdXFractions
std::vector< double > m_dEdXFractions
Definition: LArRecoMaterialTool.h:159
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
LArRecoMaterialTool::m_massFractions
std::vector< double > m_massFractions
Definition: LArRecoMaterialTool.h:156
CaloSubdetNames::PRESAMPLER_EC_NEG
@ PRESAMPLER_EC_NEG
Definition: CaloSubdetNames.h:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CaloSubdetNames::EMB_NEG
@ EMB_NEG
Definition: CaloSubdetNames.h:38
CaloSubdetNames::FCAL2_NEG
@ FCAL2_NEG
Definition: CaloSubdetNames.h:44
CaloSubdetNames::SOLENOID
@ SOLENOID
Definition: CaloSubdetNames.h:46
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:191
LArRecoMaterialTool::m_child_massFractions
std::vector< double > m_child_massFractions
Definition: LArRecoMaterialTool.h:163
LArRecoMaterialTool::m_averageAFractions
std::vector< double > m_averageAFractions
Definition: LArRecoMaterialTool.h:160
LArRecoMaterialTool::m_alignvol_dEdX
std::vector< double > m_alignvol_dEdX
Definition: LArRecoMaterialTool.h:151
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:1048
LArRecoMaterialTool::map_av
std::string map_av(CaloSubdetNames::ALIGNVOL alvol)
Definition: LArRecoMaterialTool.cxx:1161
LArRecoMaterialTool::m_parseGeoModelForMaterial
bool m_parseGeoModelForMaterial
Private bool set at initialisation : decides if the GeoModel is parsed or bypassed.
Definition: LArRecoMaterialTool.h:79
LArRecoMaterialTool::ScanHEC
bool ScanHEC(CaloSubdetNames::ALIGNVOL alvol, double &mass, double &x0, double &dEdx, double &aveA, double &aveZ)
Definition: LArRecoMaterialTool.cxx:712
CaloSubdetNames::FCAL1_NEG
@ FCAL1_NEG
Definition: CaloSubdetNames.h:43
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArRecoMaterialTool::m_child_dEdXFractions
std::vector< double > m_child_dEdXFractions
Definition: LArRecoMaterialTool.h:166
LArRecoMaterialTool::interfaceID
static const InterfaceID & interfaceID()
Definition: LArRecoMaterialTool.cxx:31
LArRecoMaterialTool::m_alignvol_x0
std::vector< double > m_alignvol_x0
Definition: LArRecoMaterialTool.h:150
AthAlgTool
Definition: AthAlgTool.h:26
LArRecoMaterialTool::m_x0Fractions
std::vector< double > m_x0Fractions
Definition: LArRecoMaterialTool.h:158
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:1069
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:1109
CaloSubdetNames::LARCRYO_EC_NEG
@ LARCRYO_EC_NEG
Definition: CaloSubdetNames.h:36
LArRecoMaterialTool::initialize
virtual StatusCode initialize() override
Definition: LArRecoMaterialTool.cxx:44
LArRecoMaterialTool::m_volumeFractions
std::vector< double > m_volumeFractions
Definition: LArRecoMaterialTool.h:157
StoredPhysVol.h
CaloSubdetNames::ALIGNVOL
ALIGNVOL
LAr Alignable volumes.
Definition: CaloSubdetNames.h:36
LArRecoMaterialTool::m_alignvol_number
std::vector< CaloSubdetNames::ALIGNVOL > m_alignvol_number
Definition: LArRecoMaterialTool.h:148
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37