ATLAS Offline Software
LArVolumeBuilder.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // LArVolumeBuilder.cxx, (c) ATLAS Detector software
8 
9 // Calo
11 // LAr
13 // CaloDepth
16 // GeoModel
17 #include "GeoModelKernel/GeoFullPhysVol.h"
18 #include "GeoModelKernel/GeoLogVol.h"
19 #include "GeoModelKernel/GeoShape.h"
20 #include "GeoModelKernel/GeoTubs.h"
21 #include "GeoModelKernel/GeoTube.h"
22 #include "GeoModelKernel/GeoPcon.h"
23 #include "GeoModelKernel/GeoTrd.h"
24 #include "GeoModelKernel/GeoMaterial.h"
27 // Trk
37 #include "TrkGeometry/Material.h"
39 #include "TrkGeometry/DiscLayer.h"
46 #include "TrkSurfaces/DiscBounds.h"
49 #include "GaudiKernel/SystemOfUnits.h"
50 
51 using Gaudi::Units::mm;
52 
53 // constructor
54 LAr::LArVolumeBuilder::LArVolumeBuilder(const std::string& t, const std::string& n, const IInterface* p) :
55  AthAlgTool(t,n,p),
56  m_lArMgrLocation("LArMgr"),
57  m_lArTrackingVolumeHelper("Trk::TrackingVolumeHelper/LArTrackingVolumeHelper"),
58  m_trackingVolumeCreator("Trk::CylinderVolumeCreator/TrackingVolumeCreator"),
59  m_lArBarrelEnvelope(25.*mm),
60  m_lArEndcapEnvelope(25.*mm),
61  m_useCaloSurfBuilder(true),
62  m_lArLayersPerRegion(1),
63  m_useCaloTrackingGeometryBounds(true),
64  m_calosurf("CaloSurfaceBuilder"),
65  m_scale_HECmaterial(1.1)
66 {
67  declareInterface<Trk::ICaloTrackingVolumeBuilder>(this);
68  // declare the properties via Python
69  declareProperty("LArDetManagerLocation", m_lArMgrLocation);
70  declareProperty("TrackingVolumeCreator", m_trackingVolumeCreator);
71  declareProperty("TrackingVolumeHelper", m_lArTrackingVolumeHelper);
72  // endcap
73  declareProperty("BarrelEnvelopeCover", m_lArBarrelEnvelope);
74  declareProperty("EndcapEnvelopeCover", m_lArEndcapEnvelope);
75 
76  declareProperty("UseCaloSurfBuilder", m_useCaloSurfBuilder);
77  declareProperty("LayersPerRegion", m_lArLayersPerRegion);
78  declareProperty("UseCaloTrackingGeometryBounds", m_useCaloTrackingGeometryBounds);
79  declareProperty("CaloSurfaceBuilder", m_calosurf);
80  declareProperty("ScaleFactor_HECmaterial", m_scale_HECmaterial);
81 
82 }
83 
84 // destructor
85 LAr::LArVolumeBuilder::~ LArVolumeBuilder()
86 = default;
87 
88 
89 // Athena standard methods
90 // initialize
92 {
93 
94  // Retrieve the tracking volume helper -------------------------------------------------
95  if (m_lArTrackingVolumeHelper.retrieve().isFailure())
96  {
97  ATH_MSG_FATAL( "Failed to retrieve tool " << m_lArTrackingVolumeHelper );
98  return StatusCode::FAILURE;
99  } else
100  ATH_MSG_DEBUG( "Retrieved tool " << m_lArTrackingVolumeHelper );
101 
102  // Retrieve the volume creator
103  if (m_trackingVolumeCreator.retrieve().isFailure()){
104  ATH_MSG_FATAL( "Failed to retrieve tool " << m_trackingVolumeCreator );
105  return StatusCode::FAILURE;
106  } else
107  ATH_MSG_DEBUG( "Retrieved tool " << m_trackingVolumeCreator );
108 
109  if(m_useCaloSurfBuilder){
110  if(m_calosurf.retrieve().isFailure())
111  {
112  ATH_MSG_FATAL( "Failed to retrieve tool " << m_calosurf );
113  return StatusCode::FAILURE;
114  } else
115  ATH_MSG_DEBUG( "Retrieved tool " << m_calosurf );
116  }
117 
118  ATH_MSG_DEBUG( name() << " initialize() successful" );
119  return StatusCode::SUCCESS;
120 }
121 
122 // finalize
124 {
125  ATH_MSG_DEBUG( "finalize() successful" );
126 
127  // empty the material garbage
128  for ( const auto *mat : m_materialGarbage ) {
129  delete mat;
130  }
131 
132  return StatusCode::SUCCESS;
133 }
134 
135 std::vector<Trk::TrackingVolume*>*
137 {
138  // the return vector
139  std::vector<Trk::TrackingVolume*>* lArTrackingVolumes = new std::vector<Trk::TrackingVolume*>;
140  // the converter helpers
141  //Trk::GeoShapeConverter geoShapeToVolumeBounds;
142  //Trk::GeoMaterialConverter geoMaterialToMaterialProperties;
143 
144  Trk::Material dummyMaterial;
145 
147  struct GarbageCollector {
148  explicit GarbageCollector(MaterialGarbage& globalGarbage) : globalBin(globalGarbage) {}
149  ~GarbageCollector() {
150  static std::mutex mutex;
151  std::scoped_lock lock(mutex);
152  globalBin.merge(bin);
153  }
155  MaterialGarbage& globalBin;
156  };
157 
158  // Local garbage collector
159  GarbageCollector gc(m_materialGarbage);
160 
161  // get LAr Detector Description Manager
162  const LArDetectorManager* lArMgr=nullptr;
163  if (detStore()->retrieve(lArMgr, m_lArMgrLocation).isFailure()) {
164  ATH_MSG_FATAL( "Could not get LArDetectorManager! Calo TrackingGeometry will not be built");
165  }
166 
167  // out of couriosity
168  unsigned int numTreeTops = lArMgr->getNumTreeTops();
169  ATH_MSG_DEBUG( "Retrieved " << numTreeTops << " tree tops from the LArDetDescrManager. " );
170 
171  for (unsigned int itreetop = 0; itreetop<numTreeTops; ++itreetop){
172  PVConstLink currentVPhysVolLink = lArMgr->getTreeTop(itreetop);
173  const GeoLogVol* currentLogVol = currentVPhysVolLink->getLogVol();
174 
175  unsigned int currentChilds = currentVPhysVolLink->getNChildVols();
176 
177  ATH_MSG_DEBUG( "Processing " << currentLogVol->getName() << "... has "
178  << currentChilds << " childs, position " << currentVPhysVolLink->getX().translation());
179  //printInfo( currentVPhysVolLink,2);
180  }
181 
182 
184  // THE BARREL SECTION
185  ATH_MSG_DEBUG( "============ Barrel Section ======================" );
186 
187  Trk::TrackingVolume* solenoid = nullptr;
188  Trk::TrackingVolume* solenoidLArBarrelGap = nullptr;
189  Trk::TrackingVolume* lArBarrelPresampler = nullptr;
190  Trk::TrackingVolume* lArBarrel = nullptr;
191 
192  Trk::CylinderVolumeBounds* solenoidBounds = nullptr;
193  Trk::CylinderVolumeBounds* solenoidLArBarrelGapBounds = nullptr;
194 
195  // dummy objects
196  Trk::LayerArray* dummyLayers = nullptr;
197  Trk::TrackingVolumeArray* dummyVolumes = nullptr;
198 
199  // default material definition
200  Trk::Material solenoidMaterial = Trk::Material( 69.9, 811.5, 28.9, 13.8, 0.003);
201  const Trk::Material* lArBarrelPresamplerMaterial = new Trk::Material(130., 634.4, 33.7, 15.4, 0.0017);
202  const Trk::Material* lArBarrelMaterial = new Trk::Material( 26.2, 436.3, 65.4, 27.8, 0.0035);
203 
204  gc.bin.insert(lArBarrelPresamplerMaterial);
205  gc.bin.insert(lArBarrelMaterial);
206 
207  // load layer surfaces
208  std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>> entrySurf =
209  m_calosurf->entrySurfaces(&caloDDM);
210  std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>> exitSurf =
211  m_calosurf->exitSurfaces(&caloDDM);
212 
213  StoredPhysVol* storedPV = nullptr;
214 
215  // -> The BARREL Section ---------------------------------------------------------
216  ATH_MSG_DEBUG( "Building Barrel ... " );
217 
218  Trk::CylinderVolumeBounds* lArBarrelPosBounds = nullptr;
219  Trk::CylinderVolumeBounds* lArBarrelNegBounds = nullptr;
220 
221  if(detStore()->contains<StoredPhysVol>("EMB_POS"))
222  {
223  if(detStore()->retrieve(storedPV,"EMB_POS")==StatusCode::FAILURE)
224  {
225  ATH_MSG_DEBUG( "Unable to retrieve Stored PV EMB_POS" );
226  storedPV = nullptr;
227  }
228  }
229  GeoFullPhysVol* lArBarrelPosPhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
230 
231  //if (lArBarrelPosPhysVol) printInfo(lArBarrelPosPhysVol,2);
232 
233  if(detStore()->contains<StoredPhysVol>("EMB_NEG"))
234  {
235  if(detStore()->retrieve(storedPV,"EMB_NEG")==StatusCode::FAILURE)
236  {
237  ATH_MSG_DEBUG( "Unable to retrieve Stored PV EMB_NEG" );
238  storedPV = nullptr;
239  }
240  }
241  GeoFullPhysVol* lArBarrelNegPhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
242 
243  const GeoLogVol* lArBarrelPosLogVol = lArBarrelPosPhysVol ? lArBarrelPosPhysVol->getLogVol() : nullptr;
244  const GeoLogVol* lArBarrelNegLogVol = lArBarrelNegPhysVol ? lArBarrelNegPhysVol->getLogVol() : nullptr;
245 
246  // get the material : needs averaging
247 
248  double lArBarrelHalflength = 0.;
249  std::vector<double> zBoundaries;
250 
251  // retrival worked out
252  if (lArBarrelPosLogVol && lArBarrelNegLogVol){
253 
254  int poschilds = lArBarrelPosPhysVol->getNChildVols();
255  int negchilds = lArBarrelNegPhysVol->getNChildVols();
256 
257  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArBarrelPosPhysVol->getAbsoluteName()
258  << " (" << poschilds << " childs) ." );
259  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArBarrelNegPhysVol->getAbsoluteName()
260  << " (" << negchilds << " childs) ." );
261 
262  // and the shapes
263  const GeoShape* lArBarrelPosShape = lArBarrelPosLogVol->getShape();
264  const GeoShape* lArBarrelNegShape = lArBarrelNegLogVol->getShape();
265 
266  // dynamic cast to 'Tubs' shape
267  const GeoPcon* lArBarrelPosPcon = dynamic_cast<const GeoPcon*>(lArBarrelPosShape);
268  lArBarrelPosBounds = (lArBarrelPosPcon) ? Trk::GeoShapeConverter::convert(lArBarrelPosPcon, zBoundaries).release() : nullptr;
269  const GeoPcon* lArBarrelNegPcon = dynamic_cast<const GeoPcon*>(lArBarrelNegShape);
270  lArBarrelNegBounds = (lArBarrelNegPcon) ? Trk::GeoShapeConverter::convert(lArBarrelNegPcon, zBoundaries).release() : nullptr;
271 
272  if (lArBarrelPosBounds)
273  ATH_MSG_VERBOSE( " -> Positive Barrel Bounds: " << *lArBarrelPosBounds );
274  if (lArBarrelNegBounds)
275  ATH_MSG_VERBOSE( " -> Negative Barrel Bounds: " << *lArBarrelNegBounds );
276 
277 
278  }
279  // conversion of PreSamplers done -> make one out of two
280  if (lArBarrelPosBounds && lArBarrelNegBounds){
281 
282  // new dimensions
283  double lArBarrelRmin = lArBarrelPosBounds->innerRadius();
284  double lArBarrelRmax = lArBarrelPosBounds->outerRadius();
285  lArBarrelHalflength = zBoundaries[1];
286 
287  // create the static half-bounds
288  Trk::CylinderVolumeBounds* lArBarrelBoundsPos = new Trk::CylinderVolumeBounds( lArBarrelRmin,
289  lArBarrelRmax,
290  0.5*lArBarrelHalflength);
291  Trk::CylinderVolumeBounds* lArBarrelBoundsNeg = lArBarrelBoundsPos->clone();
292 
293  // position static half-volumes
294  Amg::Vector3D lArBPos(0.,0.,0.5*lArBarrelHalflength);
295  Amg::Vector3D lArBNeg(0.,0.,-0.5*lArBarrelHalflength);
296  Amg::Transform3D* lArBPosTransform = new Amg::Transform3D(Amg::Translation3D(lArBPos));
297  Amg::Transform3D* lArBNegTransform = new Amg::Transform3D(Amg::Translation3D(lArBNeg));
298 
299  // layer entry/exit
300 
301  // binned material for LAr : steering in binEta
302  std::vector<Trk::IdentifiedMaterial> matID;
303  // layer material can be adjusted here
304  int baseID = Trk::GeometrySignature(Trk::Calo)*1000;
305  matID.emplace_back(lArBarrelMaterial,0);
306  matID.emplace_back(lArBarrelMaterial,baseID+1);
307  matID.emplace_back(lArBarrelMaterial,baseID+2);
308  matID.emplace_back(lArBarrelMaterial,baseID+3);
309  // scaling factors refer to avZ(avA) change
310  matID.emplace_back(lArBarrelMaterial->scale(1.3),baseID+1);
311  gc.bin.insert(matID.back().first);
312  matID.emplace_back(lArBarrelMaterial->scale(1.3),baseID+2);
313  gc.bin.insert(matID.back().first);
314  matID.emplace_back(lArBarrelMaterial->scale(0.6),baseID+3);
315  gc.bin.insert(matID.back().first);
316  matID.emplace_back(lArBarrelMaterial->scale(0.7),baseID+3);
317  gc.bin.insert(matID.back().first);
318  matID.emplace_back(lArBarrelMaterial->scale(0.8),baseID+3);
319  gc.bin.insert(matID.back().first);
320  matID.emplace_back(lArBarrelMaterial->scale(0.9),baseID+3);
321  gc.bin.insert(matID.back().first);
322  matID.emplace_back(lArBarrelMaterial->scale(1.1),baseID+3);
323  gc.bin.insert(matID.back().first);
324 
325  //
326  Trk::BinUtility* bubn = new Trk::BinUtility(30,-1.5,0.,Trk::open,Trk::binEta);
327  Trk::BinUtility* bubp = new Trk::BinUtility(30, 0.,1.5,Trk::open,Trk::binEta);
328  // array of indices
329  std::vector<std::vector<size_t> > indexP(bubn->bins());
330  std::vector<std::vector<size_t> > indexN;
331  // binned material for LAr : layer depth per eta bin
332  std::vector< Trk::BinUtility*> layBUN(bubn->bins());
333  std::vector< Trk::BinUtility*> layBUP(bubp->bins());
334  // retrieve offset values (from surfaces on negative side)
335  double r1 = entrySurf[CaloCell_ID::EMB1].second->bounds().r(); // first layer has no modulations
336  double r2 = entrySurf[CaloCell_ID::EMB2].second->bounds().r(); // base value
337  double r3 = entrySurf[CaloCell_ID::EMB3].second->bounds().r(); // base value
338 
339  std::vector<float> offset2{};
340  const Trk::SlidingCylinderSurface* scyl2 = dynamic_cast<const Trk::SlidingCylinderSurface* > (entrySurf[CaloCell_ID::EMB2].second);
341  if (scyl2) offset2 = scyl2->offset();
342  std::vector<float> offset3{};
343  const Trk::SlidingCylinderSurface* scyl3 = dynamic_cast<const Trk::SlidingCylinderSurface* > (entrySurf[CaloCell_ID::EMB3].second);
344  if (scyl3) offset3 = scyl3->offset();
345  // construct bin utilities symmetrically
346  std::vector<float> steps;
347  for (unsigned int i=0; i< bubn->bins(); i++) {
348  steps.clear();
349  steps.push_back(lArBarrelBoundsNeg->innerRadius());
350  std::vector<size_t> indx; indx.clear();
351  indx.push_back(0);
352  steps.push_back(r1);
353  indx.push_back( i<14 ? 1:4 );
354  steps.push_back(r2 + offset2[i] );
355  indx.push_back( i<14 ? 2:5 );
356  steps.push_back(r3 + offset3[i]);
357  // 3rd layer complicated
358  if (i>19) indx.push_back(7);
359  else if (i>17) indx.push_back(8);
360  else if (i>15) indx.push_back(9);
361  else if (i>13) indx.push_back(3);
362  else if (i>11) indx.push_back(6);
363  else if (i>9) indx.push_back(7);
364  else if (i>7) indx.push_back(8);
365  else if (i>5) indx.push_back(8);
366  else if (i>4) indx.push_back(9);
367  else indx.push_back(3);
368  // end 3rd layer
369  steps.push_back(lArBarrelBoundsNeg->outerRadius());
371  layBUN[i] = rBU;
372  layBUP[bubp->bins()-1-i] = rBU->clone();
373  indexN.push_back(indx);
374  indexP[bubp->bins()-1-i] = std::vector<size_t>(indx);
375  }
376 
377  const Trk::BinnedMaterial* lArBarrelMaterialBinPos = new Trk::BinnedMaterial(lArBarrelMaterial,bubp,layBUP,indexP,matID);
378  const Trk::BinnedMaterial* lArBarrelMaterialBinNeg = new Trk::BinnedMaterial(lArBarrelMaterial,bubn,layBUN,indexN,matID);
379 
380  Amg::Transform3D* align=nullptr;
381 
382  Trk::AlignableTrackingVolume* lArBarrelPos = new Trk::AlignableTrackingVolume(lArBPosTransform,align,
383  lArBarrelBoundsPos,
384  lArBarrelMaterialBinPos,
385  1,
386  "Calo::Detectors::LAr::BarrelPos");
387 
388  Trk::AlignableTrackingVolume* lArBarrelNeg = new Trk::AlignableTrackingVolume(lArBNegTransform,align,
389  lArBarrelBoundsNeg,
390  lArBarrelMaterialBinNeg,
391  1,
392  "Calo::Detectors::LAr::BarrelNeg");
393 
394  // glue barrel EM
395  std::vector<Trk::TrackingVolume*> volsB;
396  volsB.push_back(lArBarrelNeg);
397  volsB.push_back(lArBarrelPos);
398 
399  lArBarrel = m_trackingVolumeCreator->createContainerTrackingVolume(volsB,
400  dummyMaterial,
401  "Calo::Container::LAr::Barrel");
402  }
403  // cleanup
404  delete lArBarrelPosBounds; lArBarrelPosBounds = nullptr;
405  delete lArBarrelNegBounds; lArBarrelNegBounds = nullptr;
406 
407  // (1) Build the Solenoid ------------------------------------------------------------
408  ATH_MSG_DEBUG( "Building the Solenoid ... " );
409 
410  if(detStore()->contains<StoredPhysVol>("SOLENOID"))
411  {
412  if(detStore()->retrieve(storedPV,"SOLENOID")==StatusCode::FAILURE)
413  {
414  ATH_MSG_DEBUG( "Unable to retrieve Stored PV SOLENOID" );
415  storedPV = nullptr;
416  }
417  }
418  GeoFullPhysVol* solenoidPhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
419 
420 
421  const GeoLogVol* solenoidLogVol = solenoidPhysVol ? solenoidPhysVol->getLogVol() : nullptr;
422 
423  // retrival worked out
424  if (solenoidLogVol){
425  int childs = solenoidPhysVol->getNChildVols();
426 
427  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume "
428  << solenoidPhysVol->getAbsoluteName() << " (" << childs << " childs) ." );
429 
430  const GeoShape* solenoidShape = solenoidLogVol->getShape();
431  // dynamic cast to 'Tubs' shape
432  const GeoTubs* solenoidTubs = dynamic_cast<const GeoTubs*>(solenoidShape);
433  solenoidBounds = new Trk::CylinderVolumeBounds(solenoidTubs->getRMin(),solenoidTubs->getRMax(),lArBarrelHalflength);
434  // assing the material
435  const GeoMaterial* solenoidMaterialGM = solenoidLogVol->getMaterial();
436  if (solenoidMaterialGM) {
437  solenoidMaterial = Trk::GeoMaterialConverter::convert(solenoidMaterialGM);
438  }
439  }
440 
441  // conversion ok : create the volume
442  if (solenoidBounds) {
443  // output the bounds
444  ATH_MSG_DEBUG( " -> Solenoid Bounds: " << *solenoidBounds );
445 
446  solenoid = new Trk::TrackingVolume(nullptr,
447  solenoidBounds,
448  solenoidMaterial,
449  dummyLayers, dummyVolumes,
450  "Calo::Solenoid");
451 
452  }
453 
454  // (2) Build the Presampler ------------------------------------------------------------
455  ATH_MSG_DEBUG( "Building Barrel Presampler ... " );
456 
457  Trk::CylinderVolumeBounds* lArBarrelPresamplerPosBounds = nullptr;
458  Trk::CylinderVolumeBounds* lArBarrelPresamplerNegBounds = nullptr;
459 
460  if(detStore()->contains<StoredPhysVol>("PRESAMPLER_B_POS"))
461  {
462  if(detStore()->retrieve(storedPV,"PRESAMPLER_B_POS")==StatusCode::FAILURE)
463  {
464  ATH_MSG_DEBUG( "Unable to retrieve Stored PV PRESAMPLER_B_POS" );
465  storedPV = nullptr;
466  }
467  }
468  GeoFullPhysVol* lArBarrelPresamplerPosPhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
469 
470 
471 
472  if(detStore()->contains<StoredPhysVol>("PRESAMPLER_B_NEG"))
473  {
474  if(detStore()->retrieve(storedPV,"PRESAMPLER_B_NEG")==StatusCode::FAILURE)
475  {
476  ATH_MSG_DEBUG( "Unable to retrieve Stored PV PRESAMPLER_B_NEG" );
477  storedPV = nullptr;
478  }
479  }
480  GeoFullPhysVol* lArBarrelPresamplerNegPhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
481 
482 
483  const GeoLogVol* lArBarrelPresamplerPosLogVol = lArBarrelPresamplerPosPhysVol ? lArBarrelPresamplerPosPhysVol->getLogVol() : nullptr;
484  const GeoLogVol* lArBarrelPresamplerNegLogVol = lArBarrelPresamplerNegPhysVol ? lArBarrelPresamplerNegPhysVol->getLogVol() : nullptr;
485 
486  // retrival worked out
487  if (lArBarrelPresamplerPosLogVol && lArBarrelPresamplerNegLogVol){
488 
489  int poschilds = lArBarrelPresamplerPosPhysVol->getNChildVols();
490  int negchilds = lArBarrelPresamplerNegPhysVol->getNChildVols();
491 
492  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume "
493  << lArBarrelPresamplerPosPhysVol->getAbsoluteName() << " (" << poschilds << " childs) ." );
494  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume "
495  << lArBarrelPresamplerNegPhysVol->getAbsoluteName() << " (" << negchilds << " childs) ." );
496 
497  Amg::Vector3D lArBPos(0.,0.,0.5*lArBarrelHalflength);
498  Amg::Vector3D lArBNeg(0.,0.,-0.5*lArBarrelHalflength);
499  Amg::Transform3D* lArPBPosTransform = new Amg::Transform3D(Amg::Translation3D(lArBPos));
500  Amg::Transform3D* lArPBNegTransform = new Amg::Transform3D(Amg::Translation3D(lArBNeg));
501 
502  // and the shapes
503  const GeoShape* lArBarrelPresamplerPosShape = lArBarrelPresamplerPosLogVol->getShape();
504 
505  // dynamic cast to 'Tubs' shape
506  const GeoTubs* lArBarrelPresamplerPosTubs = dynamic_cast<const GeoTubs*>(lArBarrelPresamplerPosShape);
507  lArBarrelPresamplerPosBounds = new Trk::CylinderVolumeBounds(lArBarrelPresamplerPosTubs->getRMin(),
508  lArBarrelPresamplerPosTubs->getRMax(),
509  0.5*lArBarrelHalflength);
510 
511 
512  if (lArBarrelPresamplerPosBounds){
513  lArBarrelPresamplerNegBounds = lArBarrelPresamplerPosBounds->clone();
514  ATH_MSG_VERBOSE( " -> Positive Barrel Presampler Bounds: "
515  << *lArBarrelPresamplerPosBounds );
516  }
517  if (lArBarrelPresamplerNegBounds){
518  ATH_MSG_VERBOSE( " -> Negative Barrel Presampler Bounds: "
519  << *lArBarrelPresamplerNegBounds );
520  }
521 
522  // material needs averaging, don't use pure Ar
523 
524  Amg::Transform3D* align=nullptr;
525 
526  // trivial binning
527  std::vector<float> bpsteps{float(lArBarrelPresamplerPosBounds->innerRadius()),
528  float(lArBarrelPresamplerPosBounds->outerRadius())};
529  Trk::BinUtility* rBU = new Trk::BinUtility(bpsteps, Trk::open, Trk::binR);
530  Trk::BinUtility* rBUc = rBU->clone();
531 
532  std::vector<size_t> dummylay (1,0);
533  // binned material for Presampler :
534  std::vector<Trk::IdentifiedMaterial> matBP;
535  // layer material can be adjusted here
536  int baseID = Trk::GeometrySignature(Trk::Calo)*1000;
537  matBP.emplace_back(lArBarrelPresamplerMaterial,baseID);
538 
539  const Trk::BinnedMaterial* lArBarrelPresamplerMaterialBinPos = new Trk::BinnedMaterial(lArBarrelPresamplerMaterial,rBU,dummylay,matBP);
540  const Trk::BinnedMaterial* lArBarrelPresamplerMaterialBinNeg = new Trk::BinnedMaterial(lArBarrelPresamplerMaterial,rBUc,dummylay,matBP);
541 
542  Trk::AlignableTrackingVolume* lArBarrelPresamplerPos = new Trk::AlignableTrackingVolume(lArPBPosTransform, align,
543  lArBarrelPresamplerPosBounds,
544  lArBarrelPresamplerMaterialBinPos,
545  0,
546  "Calo::Detectors::LAr::BarrelPresamplerPos");
547 
548  Trk::AlignableTrackingVolume* lArBarrelPresamplerNeg = new Trk::AlignableTrackingVolume(lArPBNegTransform, align,
549  lArBarrelPresamplerNegBounds,
550  lArBarrelPresamplerMaterialBinNeg,
551  0,
552  "Calo::Detectors::LAr::BarrelPresamplerNeg");
553 
554  // glue barrel presampler
555  std::vector<Trk::TrackingVolume*> volsBP;
556  volsBP.push_back(lArBarrelPresamplerNeg);
557  volsBP.push_back(lArBarrelPresamplerPos);
558 
559  lArBarrelPresampler = m_trackingVolumeCreator->createContainerTrackingVolume(volsBP,
560  dummyMaterial,
561  "Calo::Container::LAr::BarrelPresampler");
562  }
563 
564  // (3) Build the solenoid gap ------------------------------------------------------------
565 
566  if (solenoidBounds && lArBarrelPresamplerPosBounds) {
567  solenoidLArBarrelGapBounds = new Trk::CylinderVolumeBounds(solenoidBounds->outerRadius(),
568  lArBarrelPresamplerPosBounds->innerRadius(),
569  lArBarrelHalflength);
570 
571  //Trk::MaterialProperties solenoidGapMaterial = Trk::MaterialProperties(1., 93.9/0.5, 0.0028*pow(0.5,3), 39.);
572  // Trk::Material solenoidGapMaterial= Trk::Material(534.9, 2871.2, 18.6, 9.1, 0.0004);
573  Trk::Material solenoidGapMaterial= Trk::Material(182.6, 1007., 22.9, 10.9, 0.0012);
574 
575  solenoidLArBarrelGap = new Trk::TrackingVolume(nullptr,
576  solenoidLArBarrelGapBounds,
577  solenoidGapMaterial,
578  dummyLayers, dummyVolumes,
579  "Calo::GapVolumes::LAr::SolenoidPresamplerGap");
580  }
581 
583  // THE ENDCAP SECTION
584  ATH_MSG_DEBUG( "============ Endcap Section ======================" );
585  // PRESAMPLER_EC_POS, PRESAMPLER_EC_NEG
586  // EMEC_POS, EMEC_NEG
587  // HEC1_POS, HEC1_NEG
588  // HEC2_POS, HEC2_NEG
589  // FCAL1_POS, FCAL1_NEG
590  // FCAL2_POS, FCAL2_NEG
591  // FCAL3_POS, FCAL3_NEG
592 
593  // positive Side
594  Trk::TrackingVolume* lArPositiveEndcapInnerGap = nullptr;
595  Trk::TrackingVolume* lArPositiveEndcap = nullptr;
596  Trk::TrackingVolume* lArPositiveHec = nullptr;
597  Trk::TrackingVolume* lArPositiveHecFcalCover = nullptr;
598  Trk::TrackingVolume* lArPositiveFcal = nullptr;
599  Trk::TrackingVolume* lArPosECPresampler = nullptr;
600 
601  // negative Side
602  Trk::TrackingVolume* lArNegativeEndcapInnerGap = nullptr;
603  Trk::TrackingVolume* lArNegativeEndcap = nullptr;
604  Trk::TrackingVolume* lArNegativeHec = nullptr;
605  Trk::TrackingVolume* lArNegativeHecFcalCover = nullptr;
606  Trk::TrackingVolume* lArNegativeFcal = nullptr;
607  Trk::TrackingVolume* lArNegECPresampler = nullptr;
608 
609  // the smoothed ones
610  Trk::CylinderVolumeBounds* lArPositiveHecBounds = nullptr;
611  Trk::CylinderVolumeBounds* lArPositiveHecFcalCoverBounds = nullptr;
612  Trk::CylinderVolumeBounds* lArPositiveFcalBounds = nullptr;
613 
614  Trk::CylinderVolumeBounds* lArNegativeHecBounds = nullptr;
615  Trk::CylinderVolumeBounds* lArNegativeHecFcalCoverBounds = nullptr;
616  Trk::CylinderVolumeBounds* lArNegativeFcalBounds = nullptr;
617 
618  // (1) now parse the EC
619  std::unique_ptr<Trk::CylinderVolumeBounds> lArPositiveEndcapBounds;
620  std::unique_ptr<Trk::CylinderVolumeBounds> lArNegativeEndcapBounds;
621 
622  if(detStore()->contains<StoredPhysVol>("EMEC_POS"))
623  {
624  if(detStore()->retrieve(storedPV,"EMEC_POS")==StatusCode::FAILURE)
625  {
626  ATH_MSG_DEBUG( "Unable to retrieve Stored PV EMEC_POS" );
627  storedPV = nullptr;
628  }
629  }
630  GeoFullPhysVol* lArPositiveEndcapPhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
631 
632  const GeoLogVol* lArPositiveEndcapLogVol = lArPositiveEndcapPhysVol ? lArPositiveEndcapPhysVol->getLogVol() : nullptr;
633 
634  if(detStore()->contains<StoredPhysVol>("EMEC_NEG"))
635  {
636  if(detStore()->retrieve(storedPV,"EMEC_NEG")==StatusCode::FAILURE)
637  {
638  ATH_MSG_DEBUG( "Unable to retrieve Stored PV EMEC_NEG" );
639  storedPV = nullptr;
640  }
641  }
642  GeoFullPhysVol* lArNegativeEndcapPhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
643 
644  const GeoLogVol* lArNegativeEndcapLogVol = lArNegativeEndcapPhysVol ? lArNegativeEndcapPhysVol->getLogVol() : nullptr;
645 
646  // get the material
647  const GeoMaterial* lArPositiveEndcapMaterial = nullptr;
648  //const GeoMaterial* lArNegativeEndcapMaterial = 0;
649 
650  std::vector<double> positiveEndcapZboundaries;
651  std::vector<double> negativeEndcapZboundaries;
652 
653  double lArEndcapZpos = 0.;
654 
655  // retrival worked out
656  if (lArPositiveEndcapLogVol && lArNegativeEndcapLogVol){
657 
658  int poschilds = lArPositiveEndcapPhysVol->getNChildVols();
659  int negchilds = lArNegativeEndcapPhysVol->getNChildVols();
660 
661  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArPositiveEndcapPhysVol->getAbsoluteName()
662  << " (" << poschilds << " childs)." );
663  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArNegativeEndcapPhysVol->getAbsoluteName()
664  << " (" << negchilds << " childs)." );
665 
666 
667  // and the shapes
668  const GeoShape* lArPositiveEndcapShape = lArPositiveEndcapLogVol->getShape();
669  const GeoShape* lArNegativeEndcapShape = lArNegativeEndcapLogVol->getShape();
670 
671  // get the transforms
672  const Amg::Transform3D& lArPositiveEndcapTransform = lArPositiveEndcapPhysVol->getAbsoluteTransform();
673  //const Amg::Transform3D& lArNegativeEndcapTransform = Amg::CLHEPTransformToEigen(lArNegativeEndcapPhysVol->getAbsoluteTransform());
674  Amg::Vector3D lArPositiveEndcapNomPosition = lArPositiveEndcapTransform.translation();
675  //Amg::Vector3D lArNegativeEndcapNomPosition = lArNegativeEndcapTransform.translation();
676 
677  // dynamic cast to 'Tubs' shape
678  const GeoPcon* lArPositiveEndcapPcon = dynamic_cast<const GeoPcon*>(lArPositiveEndcapShape);
679  if (lArPositiveEndcapPcon)
680  lArPositiveEndcapBounds = std::unique_ptr<Trk::CylinderVolumeBounds>
681  (Trk::GeoShapeConverter::convert(lArPositiveEndcapPcon,
682  positiveEndcapZboundaries));
683 
684  const GeoPcon* lArNegativeEndcapPcon = dynamic_cast<const GeoPcon*>(lArNegativeEndcapShape);
685  if (lArNegativeEndcapPcon)
686  lArNegativeEndcapBounds = std::unique_ptr<Trk::CylinderVolumeBounds>
687  (Trk::GeoShapeConverter::convert(lArNegativeEndcapPcon,
688  negativeEndcapZboundaries));
689 
690  if (lArPositiveEndcapBounds)
691  ATH_MSG_DEBUG( " -> Positive Endcap Bounds: " << *lArPositiveEndcapBounds );
692  if (lArNegativeEndcapBounds)
693  ATH_MSG_DEBUG( " -> Negative Endcap Bounds: " << *lArNegativeEndcapBounds );
694 
695  double positiveEndcapZpos = 0.5 *(positiveEndcapZboundaries[1] + positiveEndcapZboundaries[0]);
696 
697  lArEndcapZpos = positiveEndcapZpos+lArPositiveEndcapNomPosition.z();
698 
699  ATH_MSG_DEBUG( " located at z-positions " << lArEndcapZpos << " / " << -lArEndcapZpos );
700 
701  // assing the material
702  lArPositiveEndcapMaterial = lArPositiveEndcapLogVol->getMaterial();
703  //lArNegativeEndcapMaterial = lArNegativeEndcapLogVol->getMaterial();
704 
705  }
706 
707  double lArEndcapHalfZ = 0.;
708  double lArEndcapZmin = 0.;
709  double lArEndcapZmax = 0.;
710  double lArEndcapInnerRadius = 0;
711  double lArEndcapOuterRadius = 0;
712 
713  // now create the Tracking Volumes
714  if (lArPositiveEndcapBounds && lArNegativeEndcapBounds && lArPositiveEndcapMaterial){
715 
716 
717  // create the material
718  //Trk::MaterialProperties lArEndcapMaterial = Trk::MaterialProperties(1., 22.2/0.99, 0.0027*pow(0.99,3), 39.);
719  const Trk::Material* lArEndcapMaterial=new Trk::Material(22.21, 402.2, 72.6, 30.5, 0.0039);
720  gc.bin.insert(lArEndcapMaterial);
721 
722  lArEndcapHalfZ = lArPositiveEndcapBounds->halflengthZ();
723  lArEndcapZmin = lArEndcapZpos - lArPositiveEndcapBounds->halflengthZ();
724  lArEndcapZmax = lArEndcapZpos + lArPositiveEndcapBounds->halflengthZ();
725  lArEndcapInnerRadius = lArPositiveEndcapBounds->innerRadius();
726  lArEndcapOuterRadius = lArPositiveEndcapBounds->outerRadius();
727 
728  Amg::Vector3D lArEndcapPositionPos(0.,0.,lArEndcapZpos);
729  Amg::Vector3D lArEndcapPositionNeg(0.,0.,-lArEndcapZpos);
730  Amg::Transform3D* lArPositiveEndcapTransform = new Amg::Transform3D(Amg::Translation3D(lArEndcapPositionPos));
731  Amg::Transform3D* lArNegativeEndcapTransform = new Amg::Transform3D(Amg::Translation3D(lArEndcapPositionNeg));
732 
733  Amg::Transform3D* align = nullptr;
734  // binned material for LAr
735  Trk::BinUtility* bup = new Trk::BinUtility(37,1.35,3.2,Trk::open,Trk::binEta);
736  Trk::BinUtility* bun = new Trk::BinUtility(37,-3.2,-1.35,Trk::open,Trk::binEta);
737 
738  // binned material for LAr : steering in binEta
739  std::vector<Trk::IdentifiedMaterial> matEID;
740  // layer material can be adjusted here
741  int baseID = Trk::GeometrySignature(Trk::Calo)*1000 + 4;
742  matEID.emplace_back(lArEndcapMaterial,0);
743  matEID.emplace_back(lArEndcapMaterial,baseID+1);
744  matEID.emplace_back(lArEndcapMaterial,baseID+2);
745  matEID.emplace_back(lArEndcapMaterial,baseID+3);
746  // scaled
747  matEID.emplace_back(lArEndcapMaterial->scale(1.05),baseID+1);
748  gc.bin.insert(matEID.back().first);
749  matEID.emplace_back(lArEndcapMaterial->scale(1.1),baseID+1);
750  gc.bin.insert(matEID.back().first);
751  matEID.emplace_back(lArEndcapMaterial->scale(1.15),baseID+1);
752  gc.bin.insert(matEID.back().first);
753  matEID.emplace_back(lArEndcapMaterial->scale(1.2),baseID+1);
754  gc.bin.insert(matEID.back().first);
755  matEID.emplace_back(lArEndcapMaterial->scale(1.25),baseID+1);
756  gc.bin.insert(matEID.back().first);
757  matEID.emplace_back(lArEndcapMaterial->scale(1.3),baseID+1);
758  gc.bin.insert(matEID.back().first);
759  matEID.emplace_back(lArEndcapMaterial->scale(1.35),baseID+1);
760  gc.bin.insert(matEID.back().first);
761  matEID.emplace_back(lArEndcapMaterial->scale(1.4),baseID+1);
762  gc.bin.insert(matEID.back().first);
763  matEID.emplace_back(lArEndcapMaterial->scale(1.05),baseID+2);
764  gc.bin.insert(matEID.back().first);
765  matEID.emplace_back(lArEndcapMaterial->scale(1.1),baseID+2);
766  gc.bin.insert(matEID.back().first);
767  matEID.emplace_back(lArEndcapMaterial->scale(1.15),baseID+2);
768  gc.bin.insert(matEID.back().first);
769  matEID.emplace_back(lArEndcapMaterial->scale(1.2),baseID+2);
770  gc.bin.insert(matEID.back().first);
771  matEID.emplace_back(lArEndcapMaterial->scale(1.25),baseID+2);
772  gc.bin.insert(matEID.back().first);
773  matEID.emplace_back(lArEndcapMaterial->scale(1.3),baseID+2);
774  gc.bin.insert(matEID.back().first);
775  matEID.emplace_back(lArEndcapMaterial->scale(1.35),baseID+2);
776  gc.bin.insert(matEID.back().first);
777  matEID.emplace_back(lArEndcapMaterial->scale(1.4),baseID+2);
778  gc.bin.insert(matEID.back().first);
779  matEID.emplace_back(lArEndcapMaterial->scale(1.45),baseID+2);
780  gc.bin.insert(matEID.back().first);
781  matEID.emplace_back(lArEndcapMaterial->scale(0.7),baseID+3);
782  gc.bin.insert(matEID.back().first);
783  matEID.emplace_back(lArEndcapMaterial->scale(0.75),baseID+3);
784  gc.bin.insert(matEID.back().first);
785  matEID.emplace_back(lArEndcapMaterial->scale(0.8),baseID+3);
786  gc.bin.insert(matEID.back().first);
787  matEID.emplace_back(lArEndcapMaterial->scale(0.85),baseID+3);
788  gc.bin.insert(matEID.back().first);
789  matEID.emplace_back(lArEndcapMaterial->scale(0.9),baseID+3);
790  gc.bin.insert(matEID.back().first);
791  matEID.emplace_back(lArEndcapMaterial->scale(0.95),baseID+3);
792  gc.bin.insert(matEID.back().first);
793  matEID.emplace_back(lArEndcapMaterial->scale(1.05),baseID+3);
794  gc.bin.insert(matEID.back().first);
795  matEID.emplace_back(lArEndcapMaterial->scale(1.1),baseID+3);
796  gc.bin.insert(matEID.back().first);
797  matEID.emplace_back(lArEndcapMaterial->scale(1.15),baseID+3);
798  gc.bin.insert(matEID.back().first);
799  matEID.emplace_back(lArEndcapMaterial->scale(1.2),baseID+3);
800  gc.bin.insert(matEID.back().first);
801 
802  // binned material for LAr : layer depth per eta bin
803  std::vector< Trk::BinUtility*> layEUP(bup->bins());
804  // array of indices
805  std::vector<std::vector<size_t> > indexEP;
806  // retrieve offset values (positive)
807  float z1 = entrySurf[CaloCell_ID::EME1].first->center().z(); // first layer has no modulations
808  float z2 = entrySurf[CaloCell_ID::EME2].first->center().z(); // base value
809  float z3 = entrySurf[CaloCell_ID::EME3].first->center().z(); // base value
810 
811  std::vector<float> offset2;
812  const Trk::SlidingDiscSurface* sd2 = dynamic_cast<const Trk::SlidingDiscSurface* > (entrySurf[CaloCell_ID::EME2].first);
813  if (sd2) offset2 = sd2->offset();
814  std::vector<float>offset3;
815  const Trk::SlidingDiscSurface* sd3 = dynamic_cast<const Trk::SlidingDiscSurface* > (entrySurf[CaloCell_ID::EME3].first);
816  if (sd3) offset3 = sd3->offset();
817  // construct bin utilities
818  std::vector<float> steps;
819  for (unsigned int i=0; i< bup->bins(); i++) {
820  steps.clear();
821  std::vector<size_t> indx; indx.clear();
822  steps.push_back( lArEndcapZmin);
823  indx.push_back(0);
824  steps.push_back(z1);
825  if (i<4) indx.push_back(1);
826  else if (i<6) indx.push_back(4);
827  else if (i<8) indx.push_back(5);
828  else if (i<10) indx.push_back(6);
829  else if (i<12) indx.push_back(7);
830  else if (i<14) indx.push_back(8);
831  else if (i<16) indx.push_back(9);
832  else if (i<18) indx.push_back(10);
833  else if (i<23) indx.push_back(11);
834  else indx.push_back(1);
835 
836  float z2c = z2 + offset2[i];
837  if (z2c!= steps.back()) { steps.push_back(z2c); indx.push_back(2);}
838  else { indx.back()=2; }
839  if (i<4) {}
840  else if (i<6) indx.back()=12;
841  else if (i<8) indx.back()=13;
842  else if (i<10) indx.back()=14;
843  else if (i<12) indx.back()=15;
844  else if (i<14) indx.back()=16;
845  else if (i<16) indx.back()=17;
846  else if (i<18) indx.back()=18;
847  else if (i<21) indx.back()=19;
848  else if (i<23) indx.back()=20;
849  else if (i<25) indx.back()=14;
850  else if (i<27) indx.back()=15;
851  else if (i<29) indx.back()=16;
852  else if (i<31) indx.back()=17;
853  else if (i<33) indx.back()=18;
854  else if (i<35) indx.back()=19;
855  else if (i<37) indx.back()=20;
856 
857  steps.push_back(z3 + offset3[i] );
858  if (i<6) indx.push_back(21);
859  else if (i<8) indx.push_back(22);
860  else if (i<10) indx.push_back(23);
861  else if (i<12) indx.push_back(24);
862  else if (i<14) indx.push_back(25);
863  else if (i<16) indx.push_back(26);
864  else if (i<18) indx.push_back(3);
865  else if (i<20) indx.push_back(28);
866  else if (i<23) indx.push_back(29);
867  else if (i<25) indx.push_back(22);
868  else if (i<27) indx.push_back(23);
869  else if (i<29) indx.push_back(24);
870  else if (i<31) indx.push_back(26);
871  else if (i<33) indx.push_back(3);
872  else if (i<35) indx.push_back(27);
873  else indx.push_back(28);
874  steps.push_back(lArEndcapZmax);
876  layEUP[i] = zBU;
877  indexEP.push_back(indx);
878  }
879 
880  // binned material for LAr : layer depth per eta bin
881  std::vector< Trk::BinUtility*> layEUN(bun->bins());
882  std::vector<std::vector<size_t> > indexEN;
883  for ( int j=indexEP.size()-1; j>-1; j--) {
884  std::vector<size_t> indx; indx.clear();
885  for ( int jj=indexEP[j].size()-1; jj>-1; jj--) {
886  indx.push_back(indexEP[j][jj]);
887  }
888  indexEN.push_back(indx);
889  }
890  // retrieve offset values (negative)
891  z1 = entrySurf[CaloCell_ID::EME1].second->center().z(); // first layer has no modulations
892  z2 = entrySurf[CaloCell_ID::EME2].second->center().z(); // base value
893  z3 = entrySurf[CaloCell_ID::EME3].second->center().z(); // base value
894 
895  offset2.clear();
896  sd2 = dynamic_cast<const Trk::SlidingDiscSurface* > (entrySurf[CaloCell_ID::EME2].second);
897  if (sd2) offset2 = sd2->offset();
898  offset3.clear();
899  sd3 = dynamic_cast<const Trk::SlidingDiscSurface* > (entrySurf[CaloCell_ID::EME3].second);
900  if (sd3) offset3 = sd3->offset();
901  // construct bin utilities ( in increasing ordering )
902  for (unsigned int i=0; i< bun->bins(); i++) {
903  steps.clear();
904  steps.push_back(-lArEndcapZmax);
905  steps.push_back(z3 + offset3[i] );
906  steps.push_back(z2 + offset2[i] );
907  if (z1!= steps.back()) { steps.push_back(z1); }
908  steps.push_back(-lArEndcapZmin);
910  layEUN[i] = zBU;
911  }
912 
913  const Trk::BinnedMaterial* lArEndcapMaterialBinnedPos = new Trk::BinnedMaterial(lArEndcapMaterial,bup,layEUP,indexEP,matEID);
914  const Trk::BinnedMaterial* lArEndcapMaterialBinnedNeg = new Trk::BinnedMaterial(lArEndcapMaterial,bun,layEUN,indexEN,matEID);
915 
916  lArPositiveEndcap = new Trk::AlignableTrackingVolume(lArPositiveEndcapTransform,align,
917  lArPositiveEndcapBounds.release(),
918  lArEndcapMaterialBinnedPos,
919  5,
920  //lpEntries,
921  "Calo::Detectors::LAr::PositiveEndcap");
922 
923  lArNegativeEndcap = new Trk::AlignableTrackingVolume(lArNegativeEndcapTransform,align,
924  lArNegativeEndcapBounds.release(),
925  lArEndcapMaterialBinnedNeg,
926  5,
927  //lnEntries,
928  "Calo::Detectors::LAr::NegativeEndcap");
929  }
930 
931  // presampler
932  ATH_MSG_DEBUG( "Building Endcap Presampler ... " );
933 
934  Trk::CylinderVolumeBounds* lArECPresamplerBounds = nullptr;
935 
936  if(detStore()->contains<StoredPhysVol>("PRESAMPLER_EC_POS"))
937  {
938  if(detStore()->retrieve(storedPV,"PRESAMPLER_EC_POS")==StatusCode::FAILURE)
939  {
940  ATH_MSG_DEBUG( "Unable to retrieve Stored PV PRESAMPLER_EC_POS" );
941  storedPV = nullptr;
942  }
943  }
944  GeoFullPhysVol* lArECPresamplerPhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
945  // if (lArECPresamplerPhysVol) printInfo(lArECPresamplerPhysVol);
946 
947  const GeoLogVol* lArECPresamplerLogVol = lArECPresamplerPhysVol ? lArECPresamplerPhysVol->getLogVol() : nullptr;
948 
949  // binned material for EC Presampler : layers only
950  std::vector<Trk::IdentifiedMaterial> matECP;
951  const Trk::Material* mAr = new Trk::Material(140., 1170./1.4, 40., 18., 0.0014);
952  const Trk::Material* mAl = new Trk::Material(88.93, 388.8, 27., 13., 0.0027);
953  gc.bin.insert(mAr);
954  gc.bin.insert(mAl);
955 
956  // layer material can be adjusted here
957  int baseID = Trk::GeometrySignature(Trk::Calo)*1000 + 4;
958  matECP.emplace_back(mAl,0);
959  matECP.emplace_back(mAr,baseID);
960 
961  if ( lArECPresamplerLogVol ) {
962 
963  const GeoShape* lArECPresamplerShape = lArECPresamplerLogVol->getShape();
964  const Amg::Transform3D& lArECPresamplerTransform = lArECPresamplerPhysVol->getAbsoluteTransform();
965 
966  // dynamic cast to 'Tubs' shape
967  const GeoTubs* psTubs = dynamic_cast<const GeoTubs*>(lArECPresamplerShape);
968 
969  float d = psTubs->getZHalfLength();
970  // presampler is embedded in 65 mm of Alu
971  float ecd = 32.5 ;
972  // the new HepTransforms
973  float zec = lArECPresamplerTransform.translation().z()-ecd+d;
974  Amg::Vector3D lArECPresamplerPos(0.,0.,zec);
975  Amg::Vector3D lArECPresamplerNeg(0.,0.,-zec);
976  Amg::Transform3D* lArPosECPresamplerTransform = new Amg::Transform3D(Amg::Translation3D(lArECPresamplerPos));
977  Amg::Transform3D* lArNegECPresamplerTransform = new Amg::Transform3D(Amg::Translation3D(lArECPresamplerNeg));
978 
979  lArECPresamplerBounds = new Trk::CylinderVolumeBounds(psTubs->getRMin(),psTubs->getRMax(),ecd);
980 
981  // layer binning in Z
982  std::vector<float> ecp;
983  ecp.push_back( zec-ecd);
984  ecp.push_back( zec+ecd-2*d);
985  ecp.push_back( zec+ecd);
987 
988  // material index
989  std::vector<size_t> iep{0,1};
990 
991  // binned material
992  const Trk::BinnedMaterial* lArECPresamplerMaterialBinPos = new Trk::BinnedMaterial( lArBarrelPresamplerMaterial,hecp,iep,matECP);
993 
994  Amg::Transform3D* align=nullptr;
995 
996  lArPosECPresampler = new Trk::AlignableTrackingVolume(lArPosECPresamplerTransform, align,
997  lArECPresamplerBounds,
998  lArECPresamplerMaterialBinPos,
999  4,
1000  "Calo::Detectors::LAr::PositiveECPresampler");
1001 
1002  // layer binning in Z
1003  std::vector<float> ecpn;
1004  ecpn.push_back(-zec-ecd);
1005  ecpn.push_back(-zec-ecd+2*d);
1006  ecpn.push_back(-zec+ecd);
1008 
1009  // material index
1010  std::vector<size_t> ien{1,0};
1011 
1012  // binned material
1013  const Trk::BinnedMaterial* lArECPresamplerMaterialBinNeg = new Trk::BinnedMaterial( lArBarrelPresamplerMaterial,hecpn,ien,matECP);
1014 
1015  lArNegECPresampler = new Trk::AlignableTrackingVolume(lArNegECPresamplerTransform, align,
1016  lArECPresamplerBounds->clone(),
1017  lArECPresamplerMaterialBinNeg,
1018  4,
1019  "Calo::Detectors::LAr::NegativeECPresampler");
1020 
1021 
1022  }
1023 
1024  // (2) now parse the HEC
1025  Trk::CylinderVolumeBounds* lArPositiveHec1Bounds = nullptr;
1026  Trk::CylinderVolumeBounds* lArPositiveHec2Bounds = nullptr;
1027  Trk::CylinderVolumeBounds* lArNegativeHec1Bounds = nullptr;
1028  Trk::CylinderVolumeBounds* lArNegativeHec2Bounds = nullptr;
1029 
1030 
1031  if(detStore()->contains<StoredPhysVol>("HEC1_POS")){
1032 
1033  if(detStore()->retrieve(storedPV,"HEC1_POS")==StatusCode::FAILURE){
1034  ATH_MSG_DEBUG( "Unable to retrieve Stored PV HEC1_POS" );
1035  storedPV = nullptr;
1036  }
1037 
1038  }
1039  GeoFullPhysVol* lArPositiveHec1PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1040 
1041  if(detStore()->contains<StoredPhysVol>("HEC2_POS")){
1042 
1043  if(detStore()->retrieve(storedPV,"HEC2_POS")==StatusCode::FAILURE){
1044  ATH_MSG_DEBUG( "Unable to retrieve Stored PV HEC2_POS" );
1045  storedPV = nullptr;
1046  }
1047 
1048  }
1049  GeoFullPhysVol* lArPositiveHec2PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1050 
1051  if(detStore()->contains<StoredPhysVol>("HEC1_NEG")){
1052 
1053  if(detStore()->retrieve(storedPV,"HEC1_NEG")==StatusCode::FAILURE){
1054  ATH_MSG_DEBUG( "Unable to retrieve Stored PV HEC1_NEG" );
1055  storedPV = nullptr;
1056  }
1057 
1058  }
1059  GeoFullPhysVol* lArNegativeHec1PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1060 
1061  if(detStore()->contains<StoredPhysVol>("HEC2_NEG")){
1062 
1063  if(detStore()->retrieve(storedPV,"HEC2_NEG")==StatusCode::FAILURE){
1064  ATH_MSG_DEBUG("Unable to retrieve Stored PV HEC2_NEG" );
1065  storedPV = nullptr;
1066  }
1067 
1068  }
1069 
1070  GeoFullPhysVol* lArNegativeHec2PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1071 
1072  const GeoLogVol* lArPositiveHec1LogVol = lArPositiveHec1PhysVol ? lArPositiveHec1PhysVol->getLogVol() : nullptr;
1073  const GeoLogVol* lArPositiveHec2LogVol = lArPositiveHec2PhysVol ? lArPositiveHec2PhysVol->getLogVol() : nullptr;
1074  const GeoLogVol* lArNegativeHec1LogVol = lArNegativeHec1PhysVol ? lArNegativeHec1PhysVol->getLogVol() : nullptr;
1075  const GeoLogVol* lArNegativeHec2LogVol = lArNegativeHec2PhysVol ? lArNegativeHec2PhysVol->getLogVol() : nullptr;
1076 
1077  std::vector<double> positiveEndcapZboundariesHec1;
1078  std::vector<double> positiveEndcapZboundariesHec2;
1079  std::vector<double> negativeEndcapZboundariesHec1;
1080  std::vector<double> negativeEndcapZboundariesHec2;
1081  double hecEnd = 0;
1082 
1083  // retrival worked out
1084  if (lArPositiveHec1LogVol && lArPositiveHec2LogVol && lArNegativeHec1LogVol && lArNegativeHec2LogVol){
1085 
1086  int poschildsHec1 = lArPositiveHec1PhysVol->getNChildVols();
1087  int poschildsHec2 = lArPositiveHec2PhysVol->getNChildVols();
1088  int negchildsHec1 = lArNegativeHec1PhysVol->getNChildVols();
1089  int negchildsHec2 = lArNegativeHec2PhysVol->getNChildVols();
1090 
1091  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArPositiveHec1PhysVol->getAbsoluteName()
1092  << " (" << poschildsHec1 << " childs) ." );
1093  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArNegativeHec2PhysVol->getAbsoluteName()
1094  << " (" << poschildsHec2 << " childs) ." );
1095  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArPositiveHec1PhysVol->getAbsoluteName()
1096  << " (" << negchildsHec1 << " childs) ." );
1097  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArNegativeHec2PhysVol->getAbsoluteName()
1098  << " (" << negchildsHec2 << " childs) ." );
1099 
1100  // and the shapes
1101  const GeoShape* lArPositiveHec1Shape = lArPositiveHec1LogVol->getShape();
1102  const GeoShape* lArPositiveHec2Shape = lArPositiveHec2LogVol->getShape();
1103  const GeoShape* lArNegativeHec1Shape = lArNegativeHec1LogVol->getShape();
1104  const GeoShape* lArNegativeHec2Shape = lArNegativeHec2LogVol->getShape();
1105 
1106  // get the transforms
1107  const Amg::Transform3D& lArPositiveHec1Transform = lArPositiveHec1PhysVol->getAbsoluteTransform();
1108  const Amg::Transform3D& lArPositiveHec2Transform = lArPositiveHec2PhysVol->getAbsoluteTransform();
1109  const Amg::Transform3D& lArNegativeHec1Transform = lArNegativeHec1PhysVol->getAbsoluteTransform();
1110  const Amg::Transform3D& lArNegativeHec2Transform = lArNegativeHec2PhysVol->getAbsoluteTransform();
1111 
1112  Amg::Vector3D lArPositiveHec1NomPosition = lArPositiveHec1Transform.translation();
1113  Amg::Vector3D lArPositiveHec2NomPosition = lArPositiveHec2Transform.translation();
1114  Amg::Vector3D lArNegativeHec1NomPosition = lArNegativeHec1Transform.translation();
1115  Amg::Vector3D lArNegativeHec2NomPosition = lArNegativeHec2Transform.translation();
1116 
1117  // dynamic cast to 'Pcon' shape
1118  const GeoPcon* lArPositiveHec1Pcon = dynamic_cast<const GeoPcon*>(lArPositiveHec1Shape);
1119  lArPositiveHec1Bounds = (lArPositiveHec1Pcon) ? Trk::GeoShapeConverter::convert(lArPositiveHec1Pcon,
1120  positiveEndcapZboundariesHec1).release() : nullptr;
1121  const GeoPcon* lArPositiveHec2Pcon = dynamic_cast<const GeoPcon*>(lArPositiveHec2Shape);
1122  lArPositiveHec2Bounds = (lArPositiveHec2Pcon) ? Trk::GeoShapeConverter::convert(lArPositiveHec2Pcon,
1123  positiveEndcapZboundariesHec2).release() : nullptr;
1124  const GeoPcon* lArNegativeHec1Pcon = dynamic_cast<const GeoPcon*>(lArNegativeHec1Shape);
1125  lArNegativeHec1Bounds = (lArNegativeHec1Pcon) ? Trk::GeoShapeConverter::convert(lArNegativeHec1Pcon,
1126  negativeEndcapZboundariesHec1).release() : nullptr;
1127  const GeoPcon* lArNegativeHec2Pcon = dynamic_cast<const GeoPcon*>(lArNegativeHec2Shape);
1128  lArNegativeHec2Bounds = (lArNegativeHec2Pcon) ? Trk::GeoShapeConverter::convert(lArNegativeHec2Pcon,
1129  negativeEndcapZboundariesHec2).release() : nullptr;
1130 
1131  if (lArPositiveHec1Bounds)
1132  ATH_MSG_VERBOSE( " -> Positive Hec1 Bounds: " << *lArPositiveHec1Bounds );
1133  if (lArPositiveHec2Bounds)
1134  ATH_MSG_VERBOSE( " -> Positive Hec2 Bounds: " << *lArPositiveHec2Bounds );
1135 
1136  if (lArNegativeHec1Bounds)
1137  ATH_MSG_VERBOSE( " -> Negative Hec1 Bounds: " << *lArNegativeHec1Bounds );
1138  if (lArNegativeHec2Bounds)
1139  ATH_MSG_VERBOSE( " -> Negative Hec2 Bounds: " << *lArNegativeHec2Bounds );
1140 
1141 
1142  double positiveHec1Zpos = 0.5 *(positiveEndcapZboundariesHec1[1] + positiveEndcapZboundariesHec1[0]);
1143  double positiveHec2Zpos = 0.5 *(positiveEndcapZboundariesHec2[1] + positiveEndcapZboundariesHec2[0]);
1144  double negativeHec1Zpos = -fabs(0.5 *(negativeEndcapZboundariesHec1[1] + negativeEndcapZboundariesHec1[0]));
1145  double negativeHec2Zpos = -fabs(0.5 *(negativeEndcapZboundariesHec2[1] + negativeEndcapZboundariesHec2[0]));
1146 
1147  ATH_MSG_VERBOSE( " Positive parts located at: " << positiveHec1Zpos + lArPositiveHec1NomPosition.z()
1148  << " / " << positiveHec2Zpos + lArPositiveHec2NomPosition.z() );
1149 
1150  ATH_MSG_VERBOSE( " Negative parts located at: " << negativeHec1Zpos + lArNegativeHec1NomPosition.z()
1151  << " / " << negativeHec2Zpos + lArNegativeHec2NomPosition.z() );
1152 
1153  }
1154 
1155  // (3) Browser the FCAL, we construct some things
1156  // from HEC numbers, but we need the radius to build the HEC too
1157  // So we browse the FCAL before building the HEC
1158  // We will build both later
1159  // FCAL1_POS, FCAL1_NEG
1160  // FCAL2_POS, FCAL2_NEG
1161  // FCAL3_POS, FCAL3_NEG
1162  Trk::CylinderVolumeBounds* lArPositiveFcal1Bounds = nullptr;
1163  Trk::CylinderVolumeBounds* lArPositiveFcal2Bounds = nullptr;
1164  Trk::CylinderVolumeBounds* lArPositiveFcal3Bounds = nullptr;
1165 
1166 
1167  Trk::CylinderVolumeBounds* lArNegativeFcal1Bounds = nullptr;
1168  Trk::CylinderVolumeBounds* lArNegativeFcal2Bounds = nullptr;
1169  Trk::CylinderVolumeBounds* lArNegativeFcal3Bounds = nullptr;
1170 
1171  if(detStore()->contains<StoredPhysVol>("FCAL1_POS"))
1172  {
1173  if(detStore()->retrieve(storedPV,"FCAL1_POS")==StatusCode::FAILURE)
1174  {
1175  ATH_MSG_DEBUG( "Unable to retrieve Stored PV FCAL1_POS" );
1176  storedPV = nullptr;
1177  }
1178  }
1179  GeoFullPhysVol* lArPositiveFcal1PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1180 
1181  if(detStore()->contains<StoredPhysVol>("FCAL2_POS"))
1182  {
1183  if(detStore()->retrieve(storedPV,"FCAL2_POS")==StatusCode::FAILURE)
1184  {
1185  ATH_MSG_DEBUG( "Unable to retrieve Stored PV FCAL2_POS" );
1186  storedPV = nullptr;
1187  }
1188  }
1189  GeoFullPhysVol* lArPositiveFcal2PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1190 
1191 
1192  if(detStore()->contains<StoredPhysVol>("FCAL3_POS"))
1193  {
1194  if(detStore()->retrieve(storedPV,"FCAL3_POS")==StatusCode::FAILURE)
1195  {
1196  ATH_MSG_DEBUG( "Unable to retrieve Stored PV FCAL3_POS" );
1197  storedPV = nullptr;
1198  }
1199  }
1200  GeoFullPhysVol* lArPositiveFcal3PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1201 
1202  if(detStore()->contains<StoredPhysVol>("FCAL1_NEG"))
1203  {
1204  if(detStore()->retrieve(storedPV,"FCAL1_NEG")==StatusCode::FAILURE)
1205  {
1206  ATH_MSG_DEBUG( "Unable to retrieve Stored PV FCAL1_NEG" );
1207  storedPV = nullptr;
1208  }
1209  }
1210  GeoFullPhysVol* lArNegativeFcal1PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1211 
1212  if(detStore()->contains<StoredPhysVol>("FCAL2_NEG"))
1213  {
1214  if(detStore()->retrieve(storedPV,"FCAL2_NEG")==StatusCode::FAILURE)
1215  {
1216  ATH_MSG_DEBUG( "Unable to retrieve Stored PV FCAL2_NEG" );
1217  storedPV = nullptr;
1218  }
1219  }
1220  GeoFullPhysVol* lArNegativeFcal2PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1221 
1222  if(detStore()->contains<StoredPhysVol>("FCAL3_NEG"))
1223  {
1224  if(detStore()->retrieve(storedPV,"FCAL3_NEG")==StatusCode::FAILURE)
1225  {
1226  ATH_MSG_DEBUG( "Unable to retrieve Stored PV FCAL3_NEG" );
1227  storedPV = nullptr;
1228  }
1229  }
1230  GeoFullPhysVol* lArNegativeFcal3PhysVol = storedPV ? storedPV->getPhysVol() : nullptr;
1231 
1232  const GeoLogVol* lArPositiveFcal1LogVol = lArPositiveFcal1PhysVol ? lArPositiveFcal1PhysVol->getLogVol() : nullptr;
1233  const GeoLogVol* lArPositiveFcal2LogVol = lArPositiveFcal2PhysVol ? lArPositiveFcal2PhysVol->getLogVol() : nullptr;
1234  const GeoLogVol* lArPositiveFcal3LogVol = lArPositiveFcal3PhysVol ? lArPositiveFcal3PhysVol->getLogVol() : nullptr;
1235 
1236  const GeoLogVol* lArNegativeFcal1LogVol = lArNegativeFcal1PhysVol ? lArNegativeFcal1PhysVol->getLogVol() : nullptr;
1237  const GeoLogVol* lArNegativeFcal2LogVol = lArNegativeFcal2PhysVol ? lArNegativeFcal2PhysVol->getLogVol() : nullptr;
1238  const GeoLogVol* lArNegativeFcal3LogVol = lArNegativeFcal3PhysVol ? lArNegativeFcal3PhysVol->getLogVol() : nullptr;
1239 
1240  // z position - force to be symmetric
1241  double lArFcalHalflength = 0.;
1242  double lArFcalZposition = 0.;
1243  double lArFcalZmin = 0.;
1244  double lArFcalZmax = 0.;
1245 
1246  // retrival worked out
1247  if (lArPositiveFcal1LogVol &&
1248  lArPositiveFcal2LogVol &&
1249  lArPositiveFcal3LogVol &&
1250  lArNegativeFcal1LogVol &&
1251  lArNegativeFcal2LogVol &&
1252  lArNegativeFcal3LogVol){
1253 
1254  int poschildsFcal1 = lArPositiveFcal1PhysVol->getNChildVols();
1255  int poschildsFcal2 = lArPositiveFcal2PhysVol->getNChildVols();
1256  int poschildsFcal3 = lArPositiveFcal3PhysVol->getNChildVols();
1257 
1258  int negchildsFcal1 = lArNegativeFcal1PhysVol->getNChildVols();
1259  int negchildsFcal2 = lArNegativeFcal2PhysVol->getNChildVols();
1260  int negchildsFcal3 = lArNegativeFcal3PhysVol->getNChildVols();
1261 
1262 
1263  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArPositiveFcal1PhysVol->getAbsoluteName()
1264  << " (" << poschildsFcal1 << " childs) ." );
1265  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArPositiveFcal2PhysVol->getAbsoluteName()
1266  << " (" << poschildsFcal2 << " childs) ." );
1267  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArPositiveFcal3PhysVol->getAbsoluteName()
1268  << " (" << poschildsFcal3 << " childs) ." );
1269 
1270  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArNegativeFcal1PhysVol->getAbsoluteName()
1271  << " (" << negchildsFcal1 << " childs) ." );
1272  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArNegativeFcal2PhysVol->getAbsoluteName()
1273  << " (" << negchildsFcal2 << " childs) ." );
1274  ATH_MSG_VERBOSE( " -> Retrieved GeoModel Volume " << lArNegativeFcal3PhysVol->getAbsoluteName()
1275  << " (" << negchildsFcal3 << " childs) ." );
1276 
1277  // and the shapes
1278  const GeoShape* lArPositiveFcal1Shape = lArPositiveFcal1LogVol->getShape();
1279  const GeoShape* lArPositiveFcal2Shape = lArPositiveFcal2LogVol->getShape();
1280  const GeoShape* lArPositiveFcal3Shape = lArPositiveFcal3LogVol->getShape();
1281 
1282  const GeoShape* lArNegativeFcal1Shape = lArNegativeFcal1LogVol->getShape();
1283  const GeoShape* lArNegativeFcal2Shape = lArNegativeFcal2LogVol->getShape();
1284  const GeoShape* lArNegativeFcal3Shape = lArNegativeFcal3LogVol->getShape();
1285 
1286 
1287  // get the transforms
1288  const Amg::Transform3D& lArPositiveFcal1Transform = lArPositiveFcal1PhysVol->getAbsoluteTransform();
1289  const Amg::Transform3D& lArPositiveFcal2Transform = lArPositiveFcal2PhysVol->getAbsoluteTransform();
1290  const Amg::Transform3D& lArPositiveFcal3Transform = lArPositiveFcal3PhysVol->getAbsoluteTransform();
1291 
1292  const Amg::Transform3D& lArNegativeFcal1Transform = lArNegativeFcal1PhysVol->getAbsoluteTransform();
1293  const Amg::Transform3D& lArNegativeFcal2Transform = lArNegativeFcal2PhysVol->getAbsoluteTransform();
1294  const Amg::Transform3D& lArNegativeFcal3Transform = lArNegativeFcal3PhysVol->getAbsoluteTransform();
1295 
1296  Amg::Vector3D lArPositiveFcal1NomPosition = lArPositiveFcal1Transform.translation();
1297  Amg::Vector3D lArPositiveFcal2NomPosition = lArPositiveFcal2Transform.translation();
1298  Amg::Vector3D lArPositiveFcal3NomPosition = lArPositiveFcal3Transform.translation();
1299 
1300  Amg::Vector3D lArNegativeFcal1NomPosition = lArNegativeFcal1Transform.translation();
1301  Amg::Vector3D lArNegativeFcal2NomPosition = lArNegativeFcal2Transform.translation();
1302  Amg::Vector3D lArNegativeFcal3NomPosition = lArNegativeFcal3Transform.translation();
1303 
1304  // dynamic cast to 'Pcon' shape
1305  const GeoTubs* lArPositiveFcal1Tubs = dynamic_cast<const GeoTubs*>(lArPositiveFcal1Shape);
1306  lArPositiveFcal1Bounds = (lArPositiveFcal1Tubs) ? Trk::GeoShapeConverter::convert(lArPositiveFcal1Tubs).release() : nullptr;
1307  const GeoTubs* lArPositiveFcal2Tubs = dynamic_cast<const GeoTubs*>(lArPositiveFcal2Shape);
1308  lArPositiveFcal2Bounds = (lArPositiveFcal2Tubs) ? Trk::GeoShapeConverter::convert(lArPositiveFcal2Tubs).release() : nullptr;
1309  const GeoTubs* lArPositiveFcal3Tubs = dynamic_cast<const GeoTubs*>(lArPositiveFcal3Shape);
1310  lArPositiveFcal3Bounds = (lArPositiveFcal3Tubs) ? Trk::GeoShapeConverter::convert(lArPositiveFcal3Tubs).release() : nullptr;
1311 
1312  const GeoTubs* lArNegativeFcal1Tubs = dynamic_cast<const GeoTubs*>(lArNegativeFcal1Shape);
1313  lArNegativeFcal1Bounds = (lArNegativeFcal1Tubs) ? Trk::GeoShapeConverter::convert(lArNegativeFcal1Tubs).release() : nullptr;
1314  const GeoTubs* lArNegativeFcal2Tubs = dynamic_cast<const GeoTubs*>(lArNegativeFcal2Shape);
1315  lArNegativeFcal2Bounds = (lArNegativeFcal2Tubs) ? Trk::GeoShapeConverter::convert(lArNegativeFcal2Tubs).release() : nullptr;
1316  const GeoTubs* lArNegativeFcal3Tubs = dynamic_cast<const GeoTubs*>(lArNegativeFcal3Shape);
1317  lArNegativeFcal3Bounds = (lArNegativeFcal3Tubs) ? Trk::GeoShapeConverter::convert(lArNegativeFcal3Tubs).release() : nullptr;
1318 
1319  if (lArPositiveFcal1Bounds)
1320  ATH_MSG_VERBOSE( " -> Positive Fcal1 Bounds: " << *lArPositiveFcal1Bounds );
1321  if (lArPositiveFcal2Bounds)
1322  ATH_MSG_VERBOSE( " -> Positive Fcal2 Bounds: " << *lArPositiveFcal2Bounds );
1323  if (lArPositiveFcal3Bounds)
1324  ATH_MSG_VERBOSE( " -> Positive Fcal3 Bounds: " << *lArPositiveFcal3Bounds );
1325 
1326 
1327  if (lArNegativeFcal1Bounds)
1328  ATH_MSG_VERBOSE( " -> Negative Fcal1 Bounds: " << *lArNegativeFcal1Bounds );
1329  if (lArNegativeFcal2Bounds)
1330  ATH_MSG_VERBOSE( " -> Negative Fcal2 Bounds: " << *lArNegativeFcal2Bounds );
1331  if (lArNegativeFcal3Bounds)
1332  ATH_MSG_VERBOSE( " -> Negative Fcal3 Bounds: " << *lArNegativeFcal3Bounds );
1333 
1334 
1335  ATH_MSG_VERBOSE( " Positive parts located at: " << lArPositiveFcal1NomPosition.z()
1336  << " / " << lArPositiveFcal2NomPosition.z() << " / " << lArPositiveFcal3NomPosition.z() );
1337 
1338  ATH_MSG_VERBOSE( " Negative parts located at: " << lArNegativeFcal1NomPosition.z()
1339  << " / " << lArNegativeFcal2NomPosition.z() << " / " << lArNegativeFcal3NomPosition.z() );
1340 
1341  // construct the halflength
1342  // this is actual halflength
1343  // will change to include the cover, but this is left here for future use
1344  lArFcalHalflength = lArPositiveFcal3NomPosition.z() + lArPositiveFcal3Bounds->halflengthZ()
1345  - lArPositiveFcal1NomPosition.z() + lArNegativeFcal1Bounds->halflengthZ();
1346 
1347  lArFcalHalflength *= 0.5;
1348  // construct the z-Position
1349  // this is actual z-Position
1350  // will change to include the cover, but this is left here for future use
1351  lArFcalZposition = lArPositiveFcal3NomPosition.z() + lArPositiveFcal3Bounds->halflengthZ();
1352  lArFcalZposition += lArPositiveFcal1NomPosition.z() - lArNegativeFcal1Bounds->halflengthZ();
1353  lArFcalZposition *= 0.5;
1354  }
1355 
1356  //Building section, we start with the HEC
1357 
1358  // get position and halflength of the Fill-In-Hec
1359  // First HEC, if we do not use calo surface builder will go
1360  // up to sensitive FCAL (too long)
1361  double lArHecZmax = lArFcalZposition - lArFcalHalflength;
1362  double lArHecZmin = 0;
1363  if (lArPositiveEndcap && lArEndcapHalfZ != 0)
1364  lArHecZmin = lArPositiveEndcap->center().z() + lArEndcapHalfZ;
1365  else
1366  ATH_MSG_ERROR("lArPositiveEndcap/Bounds is null!");
1367 
1368  //small offset between caloSurfaceBuilder and GeoModel
1369  double caloSurfZOffset = 0;
1370 
1371  if(m_useCaloSurfBuilder){
1372 
1373  double z, rmin, rmax, hphi, depth;
1375  m_calosurf->get_disk_surface(CaloCell_ID::HEC0, 1, pos, z, rmin, rmax, hphi, depth, &caloDDM);
1376  caloSurfZOffset = lArHecZmin - z;
1377  lArHecZmax = z + depth + caloSurfZOffset;
1378  m_calosurf->get_disk_surface(CaloCell_ID::HEC3, 1, pos, z, rmin, rmax, hphi, depth, &caloDDM);
1379  hecEnd = z + depth + caloSurfZOffset;
1380  }
1381 
1382  // that creates a position
1383  double lArHecZpos = 0.5*(lArHecZmax + lArHecZmin);
1384  double lArHecHalflength = 0.5*(lArHecZmax - lArHecZmin);
1385 
1386  double hecFcalCoverHalflength = 0.5*(hecEnd - lArHecZmax);
1387  double hecFcalCoverZpos = 0.5*(lArHecZmax + hecEnd);
1388 
1389  lArFcalHalflength = hecFcalCoverHalflength;
1390  lArFcalZposition = hecFcalCoverZpos;
1391 
1392  // binned material for HEC : layers only
1393  std::vector<Trk::IdentifiedMaterial> matHEC;
1394  //Trk::MaterialProperties lArHecFcalCoverMaterial = geoMaterialToMaterialProperties.convert(lArPositiveHec1Material);
1395  //Trk::MaterialProperties lArHecFcalCoverMaterial = Trk::MaterialProperties(1., 18.6, 0.00345, 27.);
1396  const Trk::Material* lArHecFcalCoverMaterial=new Trk::Material(18.4, 201.9, 57.2, 26.1, 0.0071);
1397  const Trk::Material* lArHecMaterial = new Trk::Material(19., 224.4, 56.7, 25.8, 0.007);
1398  gc.bin.insert(lArHecFcalCoverMaterial);
1399  gc.bin.insert(lArHecMaterial);
1400 
1401  // layer material can be adjusted here
1402  baseID = Trk::GeometrySignature(Trk::Calo)*1000 + 8;
1403  matHEC.emplace_back(lArHecFcalCoverMaterial->scale(0.13*m_scale_HECmaterial),0);
1404  gc.bin.insert(matHEC.back().first);
1405  matHEC.emplace_back(lArHecMaterial->scale(m_scale_HECmaterial),baseID);
1406  gc.bin.insert(matHEC.back().first);
1407  matHEC.emplace_back(lArHecFcalCoverMaterial->scale(0.93*m_scale_HECmaterial),baseID+1);
1408  gc.bin.insert(matHEC.back().first);
1409  matHEC.emplace_back(lArHecFcalCoverMaterial->scale(1.09*m_scale_HECmaterial),baseID+2);
1410  gc.bin.insert(matHEC.back().first);
1411  matHEC.emplace_back(lArHecFcalCoverMaterial->scale(1.12*m_scale_HECmaterial),baseID+3);
1412  gc.bin.insert(matHEC.back().first);
1413 
1414  // divide the HEC into two parts per EC :
1415  // - fit one around the FCAL - and adopt to LAr Endcap outer radius
1416  if (lArPositiveFcal1Bounds && lArNegativeFcal1Bounds){
1417  // cleanup the HecBounds
1418  delete lArPositiveHec1Bounds; lArPositiveHec1Bounds = nullptr;
1419  delete lArPositiveHec2Bounds; lArPositiveHec2Bounds = nullptr;
1420  delete lArNegativeHec1Bounds; lArNegativeHec1Bounds = nullptr;
1421  delete lArNegativeHec2Bounds; lArNegativeHec2Bounds = nullptr;
1422 
1423  // adopt the boundaries
1424  lArPositiveHecFcalCoverBounds = new Trk::CylinderVolumeBounds(lArPositiveFcal1Bounds->outerRadius(),
1425  lArEndcapOuterRadius,
1426  hecFcalCoverHalflength);
1427 
1428  lArNegativeHecFcalCoverBounds = lArPositiveHecFcalCoverBounds->clone();
1429  // output
1430  ATH_MSG_DEBUG( "Smoothed LAr Hec (Fcal covering part) bounds : " << *lArPositiveHecFcalCoverBounds );
1431  ATH_MSG_DEBUG( " -> at z-position: +/- " << hecFcalCoverZpos );
1432 
1433  // the new HepTransforms
1434  Amg::Vector3D lArPositiveHecFcalCoverPos(0.,0.,hecFcalCoverZpos);
1435  Amg::Vector3D lArPositiveHecFcalCoverNeg(0.,0.,-hecFcalCoverZpos);
1436  Amg::Transform3D* lArPositiveHecFcalCoverTransform = new Amg::Transform3D(Amg::Translation3D(lArPositiveHecFcalCoverPos));
1437  Amg::Transform3D* lArNegativeHecFcalCoverTransform = new Amg::Transform3D(Amg::Translation3D(lArPositiveHecFcalCoverNeg));
1438 
1439  // building dense volume here
1440  Amg::Transform3D* align = nullptr;
1441 
1442  // layer binning in Z
1443  std::vector<float> spCover;
1444  spCover.push_back(hecFcalCoverZpos-hecFcalCoverHalflength);
1445  spCover.push_back(entrySurf[CaloCell_ID::HEC1].first->center().z());
1446  spCover.push_back(entrySurf[CaloCell_ID::HEC2].first->center().z());
1447  spCover.push_back(entrySurf[CaloCell_ID::HEC3].first->center().z());
1448  spCover.push_back(hecFcalCoverZpos+hecFcalCoverHalflength);
1449  Trk::BinUtility* hfp = new Trk::BinUtility(spCover,Trk::open,Trk::binZ);
1450 
1451  // material index
1452  std::vector<size_t> hfc{0,2,3,4};
1453 
1454  // binned material
1455  const Trk::BinnedMaterial* lArHecFcalCoverMaterialBinPos = new Trk::BinnedMaterial( lArHecFcalCoverMaterial,hfp,hfc,matHEC);
1456 
1457  lArPositiveHecFcalCover = new Trk::AlignableTrackingVolume(lArPositiveHecFcalCoverTransform, align,
1458  lArPositiveHecFcalCoverBounds,
1459  lArHecFcalCoverMaterialBinPos,
1460  9,
1461  //hpEntries,
1462  "Calo::Detectors::LAr::PositiveHecFcalCover");
1463  // layer binning in Z
1464  std::vector<float> snCover;
1465  snCover.push_back(-hecFcalCoverZpos-hecFcalCoverHalflength);
1466  snCover.push_back(entrySurf[CaloCell_ID::HEC3].second->center().z());
1467  snCover.push_back(entrySurf[CaloCell_ID::HEC2].second->center().z());
1468  snCover.push_back(entrySurf[CaloCell_ID::HEC1].second->center().z());
1469  snCover.push_back(-hecFcalCoverZpos+hecFcalCoverHalflength);
1471 
1472  // material index
1473  std::vector<size_t> hfcn{4,3,2,0};
1474 
1475  // binned material
1476  const Trk::BinnedMaterial* lArHecFcalCoverMaterialBinNeg = new Trk::BinnedMaterial( lArHecFcalCoverMaterial,hfn,hfcn,matHEC);
1477 
1478  lArNegativeHecFcalCover = new Trk::AlignableTrackingVolume(lArNegativeHecFcalCoverTransform, align,
1479  lArNegativeHecFcalCoverBounds,
1480  lArHecFcalCoverMaterialBinNeg,
1481  9,
1482  //hnEntries,
1483  "Calo::Detectors::LAr::NegativeHecFcalCover");
1484  }
1485 
1486 
1487  // the second part of the HEC between LAr Endcap and FCAL/HEC cover
1488  if (lArPositiveFcal1Bounds && lArEndcapOuterRadius != 0){
1489 
1490  // get the inner radius
1491  // ST Hec lower radius moved up
1492  double lArHecRmin = 0.5*(lArPositiveFcal1Bounds->outerRadius()+lArEndcapInnerRadius);
1493  double lArHecRmax = lArEndcapOuterRadius;
1494  Amg::Vector3D lArHecZposition(0.,0.,lArHecZpos);
1495  // bounds
1496  lArPositiveHecBounds = new Trk::CylinderVolumeBounds(lArHecRmin, lArHecRmax, lArHecHalflength);
1497  lArNegativeHecBounds = lArPositiveHecBounds->clone();
1498  // output
1499  ATH_MSG_DEBUG( "Smoothed LAr Hec bounds : " << *lArPositiveHecBounds );
1500  ATH_MSG_DEBUG( " -> at z-position: +/- " << lArHecZpos );
1501 
1502  // the new HepTransforms
1503  Amg::Vector3D lArPositiveHecPos(0.,0.,lArHecZpos);
1504  Amg::Vector3D lArPositiveHecNeg(0.,0.,-lArHecZpos);
1505  Amg::Transform3D* lArPositiveHecTransform = new Amg::Transform3D(Amg::Translation3D(lArPositiveHecPos));
1506  Amg::Transform3D* lArNegativeHecTransform = new Amg::Transform3D(Amg::Translation3D(lArPositiveHecNeg));
1507 
1508  // building dense volume here
1509  Amg::Transform3D* align = nullptr;
1510 
1511  // layer binning in Z
1512  std::vector<float> sphec;
1513  sphec.push_back(lArHecZpos-lArHecHalflength);
1514  sphec.push_back(entrySurf[CaloCell_ID::HEC0].first->center().z());
1515  sphec.push_back(lArHecZpos+lArHecHalflength);
1517 
1518  // material index
1519  std::vector<size_t> hf{0,1};
1520 
1521  // binned material
1522  const Trk::BinnedMaterial* lArHecMaterialBinPos = new Trk::BinnedMaterial( lArHecMaterial,hp,hf,matHEC);
1523 
1524  lArPositiveHec = new Trk::AlignableTrackingVolume(lArPositiveHecTransform,align,
1525  lArPositiveHecBounds,
1526  lArHecMaterialBinPos,
1527  8,
1528  //hpEntries,
1529  "Calo::Detectors::LAr::PositiveHec");
1530 
1531  // layer binning in Z
1532  std::vector<float> snhec;
1533  snhec.push_back(-lArHecZpos-lArHecHalflength);
1534  snhec.push_back(entrySurf[CaloCell_ID::HEC0].second->center().z());
1535  snhec.push_back(-lArHecZpos+lArHecHalflength);
1537 
1538  // material index
1539  std::vector<size_t> hfn{1,0};
1540 
1541  // binned material
1542  const Trk::BinnedMaterial* lArHecMaterialBinNeg = new Trk::BinnedMaterial( lArHecMaterial,hn,hfn,matHEC);
1543 
1544  lArNegativeHec = new Trk::AlignableTrackingVolume(lArNegativeHecTransform,align,
1545  lArNegativeHecBounds,
1546  lArHecMaterialBinNeg,
1547  8,
1548  //hnEntries,
1549  "Calo::Detectors::LAr::NegativeHec");
1550  }
1551 
1552  // Now the FCAL
1553  // binned material for FCAL : layers only
1554  std::vector<Trk::IdentifiedMaterial> matFCAL;
1555  // convert the Material
1556  const Trk::Material* lArFcalMaterial =new Trk::Material(8.4, 175.5, 100.8, 42.1, 0.0097);
1557  const Trk::Material* lArFcalMaterial0 =new Trk::Material(96., 560., 30.3, 14.3, 0.0025);
1558  gc.bin.insert(lArFcalMaterial);
1559  gc.bin.insert(lArFcalMaterial0);
1560 
1561  // layer material can be adjusted here
1562  baseID = Trk::GeometrySignature(Trk::Calo)*1000 + 20;
1563  matFCAL.emplace_back(lArFcalMaterial0,0);
1564  matFCAL.emplace_back(lArFcalMaterial->scale(0.5),baseID+1);
1565  gc.bin.insert(matFCAL.back().first);
1566  matFCAL.emplace_back(lArFcalMaterial->scale(1.5),baseID+2);
1567  gc.bin.insert(matFCAL.back().first);
1568  matFCAL.emplace_back(lArFcalMaterial->scale(1.4),baseID+3);
1569  gc.bin.insert(matFCAL.back().first);
1570 
1571  // smooth the FCal to Tube form
1572  if (lArPositiveFcal1Bounds && lArPositiveFcal2Bounds && lArPositiveFcal3Bounds &&
1573  lArNegativeFcal1Bounds && lArNegativeFcal2Bounds && lArNegativeFcal3Bounds){
1574 
1575  // get the minimum/maximmum of the three radii - it's the one of FCAL1
1576  double lArFcalRmin = lArPositiveFcal1Bounds->innerRadius();
1577  double lArFcalRmax = lArPositiveFcal1Bounds->outerRadius();
1578  // assign the bounds
1579  lArPositiveFcalBounds = new Trk::CylinderVolumeBounds(lArFcalRmin, lArFcalRmax, lArFcalHalflength);
1580  lArNegativeFcalBounds = lArPositiveFcalBounds->clone();
1581  // output
1582  ATH_MSG_DEBUG( "Smoothed LAr Fcal bounds : " << *lArPositiveFcalBounds );
1583  ATH_MSG_DEBUG( " -> at z-position: +/- " << lArFcalZposition );
1584 
1585  // get min and max for the Layer Creation
1586  lArFcalZmin = lArFcalZposition - lArFcalHalflength;
1587  lArFcalZmax = lArFcalZposition + lArFcalHalflength;
1588 
1589  // cleanup
1590  delete lArPositiveFcal1Bounds; lArPositiveFcal1Bounds = nullptr;
1591  delete lArPositiveFcal2Bounds; lArPositiveFcal2Bounds = nullptr;
1592  delete lArPositiveFcal3Bounds; lArPositiveFcal3Bounds = nullptr;
1593 
1594  delete lArNegativeFcal1Bounds; lArNegativeFcal1Bounds = nullptr;
1595  delete lArNegativeFcal2Bounds; lArNegativeFcal2Bounds = nullptr;
1596  delete lArNegativeFcal3Bounds; lArNegativeFcal3Bounds = nullptr;
1597 
1598  // layer binning in Z
1599  std::vector<float> spfc;
1600  spfc.push_back(lArFcalZmin);
1601  spfc.push_back(entrySurf[CaloCell_ID::FCAL0].first->center().z());
1602  spfc.push_back(entrySurf[CaloCell_ID::FCAL1].first->center().z());
1603  spfc.push_back(entrySurf[CaloCell_ID::FCAL2].first->center().z());
1604  spfc.push_back(lArFcalZmax);
1606 
1607  // material index
1608  std::vector<size_t> hf{0,1,2,3};
1609 
1610  // binned material
1611  const Trk::BinnedMaterial* lArFcalMaterialBinPos = new Trk::BinnedMaterial( lArFcalMaterial,fcp,hf,matFCAL);
1612 
1613  // layer binning in Z
1614  std::vector<float> snfc;
1615  snfc.push_back(-lArFcalZmax);
1616  snfc.push_back(entrySurf[CaloCell_ID::FCAL2].second->center().z());
1617  snfc.push_back(entrySurf[CaloCell_ID::FCAL1].second->center().z());
1618  snfc.push_back(entrySurf[CaloCell_ID::FCAL0].second->center().z());
1619  snfc.push_back(-lArFcalZmin);
1621 
1622  // material index
1623  std::vector<size_t> hfn{3,2,1,0};
1624 
1625  // binned material
1626  const Trk::BinnedMaterial* lArFcalMaterialBinNeg = new Trk::BinnedMaterial( lArFcalMaterial,fcn,hfn,matFCAL);
1627 
1628  // the new HepTransforms
1629  Amg::Vector3D lArPositiveFcalPos(0.,0.,lArFcalZposition);
1630  Amg::Vector3D lArPositiveFcalNeg(0.,0.,-lArFcalZposition);
1631  Amg::Transform3D* lArPositiveFcalTransform = new Amg::Transform3D(Amg::Translation3D(lArPositiveFcalPos));
1632  Amg::Transform3D* lArNegativeFcalTransform = new Amg::Transform3D(Amg::Translation3D(lArPositiveFcalNeg));
1633 
1634  // building dense volume here
1635  Amg::Transform3D* align = nullptr;
1636 
1637  lArPositiveFcal = new Trk::AlignableTrackingVolume(lArPositiveFcalTransform, align,
1638  lArPositiveFcalBounds,
1639  lArFcalMaterialBinPos,
1640  21,
1641  //fcpEntries,
1642  "Calo::Detectors::LAr::PositiveFcal");
1643 
1644  lArNegativeFcal = new Trk::AlignableTrackingVolume(lArNegativeFcalTransform, align,
1645  lArNegativeFcalBounds,
1646  lArFcalMaterialBinNeg,
1647  21,
1648  //fcnEntries,
1649  "Calo::Detectors::LAr::NegativeFcal");
1650  }
1651 
1652  // fill in the inner Gap
1653  // ST this better to be done by CaloTrackingGeometry ( to glue with BeamPipe )
1654  // pass MBTS info to CaloTG
1655  // MBTS
1656  const PVConstLink topEC = lArMgr->getTreeTop(1U);
1657  Amg::Transform3D trIn= topEC->getX();
1658  Amg::Transform3D tr2(trIn);
1659  const PVConstLink mbts= getChild(topEC,"MBTS_mother",trIn);
1660 
1661  float mbtsZ{-1}; // MBTS layer position
1662  float mbts_rmin{0}; // MBTS layer dimensions
1663  float mbts_rmax{0}; // MBTS layer dimensions
1664 
1665  if (mbts) {
1666  //printChildren(mbts,-1,0,Amg::Transform3D(trIn));
1667  const PVConstLink mbts1= getChild(mbts,"MBTS1",trIn);
1668  if (mbts1) mbtsZ=fabs(trIn.translation().z());
1669  if (mbts1) {
1670  ATH_MSG_VERBOSE("MBTS1 layer found at z "<<mbtsZ);
1671  // retrieve Rmin
1672  const GeoLogVol* clv = mbts1->getLogVol();
1673  const GeoTrd* trd=dynamic_cast<const GeoTrd*> (clv->getShape());
1674  if (trd) mbts_rmin = trIn.translation().perp()-trd->getZHalfLength();
1675  }
1676  // retrieve MBTS2 for Rmax
1677  const PVConstLink mbts2= getChild(mbts,"MBTS2",tr2);
1678  if (mbts2) {
1679  const GeoLogVol* clv = mbts2->getLogVol();
1680  const GeoTrd* trd=dynamic_cast<const GeoTrd*> (clv->getShape());
1681  if (trd) mbts_rmax = (tr2.translation().perp()+trd->getZHalfLength())/cos(acos(-1.)/8);
1682  }
1683  ATH_MSG_VERBOSE("MBTS layer span in R "<<mbts_rmin<<","<<mbts_rmax);
1684 
1685  } else {
1686  ATH_MSG_VERBOSE("MBTS not found ");
1687  }
1688 
1689  if (mbtsZ>0. && mbts_rmin>0. && mbts_rmax>0.){
1690  // create the dummy volume to pass on the MBTS position
1691  Trk::CylinderVolumeBounds* lArNegativeMBTSBounds = new Trk::CylinderVolumeBounds(
1692  mbts_rmin,
1693  mbts_rmax,
1694  10. );
1695 
1696  ATH_MSG_DEBUG( "Filled in LAr MBTS bounds : " << *lArNegativeMBTSBounds );
1697  ATH_MSG_DEBUG( " -> at z-position: +/- " << mbtsZ );
1698 
1699 
1700  Amg::Vector3D lArEndcapInnerGapPos(0.,0., mbtsZ);
1701  Amg::Vector3D lArEndcapInnerGapNeg(0.,0.,-mbtsZ);
1702  Amg::Transform3D* lArPositiveMBTSTransform = new Amg::Transform3D(Amg::Translation3D(lArEndcapInnerGapPos));
1703  Amg::Transform3D* lArNegativeMBTSTransform = new Amg::Transform3D(Amg::Translation3D(lArEndcapInnerGapNeg));
1704 
1705  // building dense volume here
1706  lArPositiveEndcapInnerGap = new Trk::TrackingVolume(lArPositiveMBTSTransform,
1707  lArNegativeMBTSBounds->clone(),
1708  dummyMaterial,
1709  dummyLayers, dummyVolumes,
1710  "Calo::Detectors::MBTS");
1711 
1712  lArNegativeEndcapInnerGap = new Trk::TrackingVolume(lArNegativeMBTSTransform,
1713  lArNegativeMBTSBounds,
1714  dummyMaterial,
1715  dummyLayers, dummyVolumes,
1716  "Calo::Detectors::MBTS");
1717  }
1718 
1719  if (msgLvl(MSG::DEBUG)) {
1720  ATH_MSG_DEBUG( "Checking the existence of all Tracking Volumes:" );
1721  ATH_MSG_DEBUG( " -> Calo::Solenoid ");
1722  printCheckResult(msg(MSG::DEBUG), solenoid);
1723  ATH_MSG_DEBUG( " -> Calo::GapVolumes::LAr::SolenoidPresamplerGap ");
1724  printCheckResult(msg(MSG::DEBUG), solenoidLArBarrelGap);
1725  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::BarrelPresampler ");
1726  printCheckResult(msg(MSG::DEBUG), lArBarrelPresampler);
1727  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::Barrel ");
1728  printCheckResult(msg(MSG::DEBUG), lArBarrel);
1729  if (lArPositiveEndcapInnerGap) {
1730  ATH_MSG_DEBUG( " -> Calo::GapVolumes::LAr::PositiveEndcapInnerGap ");
1731  printCheckResult(msg(MSG::DEBUG), lArPositiveEndcapInnerGap);
1732  }
1733  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::PositiveEndcap ");
1734  printCheckResult(msg(MSG::DEBUG), lArPositiveEndcap);
1735  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::PositiveHec ");
1736  printCheckResult(msg(MSG::DEBUG), lArPositiveHec);
1737  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::PositiveFcal ");
1738  printCheckResult(msg(MSG::DEBUG), lArPositiveFcal);
1739  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::LArPositiveHecFcalCover ");
1740  printCheckResult(msg(MSG::DEBUG), lArPositiveHecFcalCover);
1741  if (lArNegativeEndcapInnerGap) {
1742  ATH_MSG_DEBUG( " -> Calo::GapVolumes::LAr::NegativeEndcapInnerGap ");
1743  printCheckResult(msg(MSG::DEBUG), lArNegativeEndcapInnerGap);
1744  }
1745  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::NegativeEndcap ");
1746  printCheckResult(msg(MSG::DEBUG), lArNegativeEndcap);
1747  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::NegativeHec ");
1748  printCheckResult(msg(MSG::DEBUG), lArNegativeHec);
1749  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::NegativeFcal ");
1750  printCheckResult(msg(MSG::DEBUG), lArNegativeFcal);
1751  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::LArNegativeHecFcalCover ");
1752  printCheckResult(msg(MSG::DEBUG), lArNegativeHecFcalCover);
1753  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::LArPositiveECPresampler ");
1754  printCheckResult(msg(MSG::DEBUG), lArPosECPresampler);
1755  ATH_MSG_DEBUG( " -> Calo::Detectors::LAr::LArNegativeECPresampler ");
1756  printCheckResult(msg(MSG::DEBUG), lArNegECPresampler);
1757  } // end of detailed output
1758 
1759  // check if everything went fine
1760  if (solenoid && solenoidLArBarrelGap && lArBarrelPresampler && lArBarrel &&
1761  lArPositiveEndcap && lArPositiveHec && lArPositiveFcal && lArPositiveHecFcalCover &&
1762  lArNegativeEndcap && lArNegativeHec && lArNegativeFcal && lArNegativeHecFcalCover){
1763 
1764  // + register color code for displaying
1765 
1766  // Barrel Part
1767  lArTrackingVolumes->push_back(solenoid); // 0
1768  solenoid->registerColorCode(6);
1769  lArTrackingVolumes->push_back(solenoidLArBarrelGap); // 1
1770  solenoidLArBarrelGap->registerColorCode(21);
1771  lArTrackingVolumes->push_back(lArBarrelPresampler); // 2
1772  lArBarrelPresampler->registerColorCode(7);
1773  lArTrackingVolumes->push_back(lArBarrel); // 3
1774  lArBarrel->registerColorCode(3);
1775  // Positive Endcap Part
1776  lArTrackingVolumes->push_back(lArPositiveEndcapInnerGap); //4
1777  lArTrackingVolumes->push_back(lArPositiveEndcap); //5
1778  lArPositiveEndcap->registerColorCode(3);
1779  lArTrackingVolumes->push_back(lArPositiveHec); //6
1780  lArPositiveHec->registerColorCode(9);
1781  lArTrackingVolumes->push_back(lArPositiveFcal); //7
1782  lArPositiveFcal->registerColorCode(8);
1783  lArTrackingVolumes->push_back(lArPositiveHecFcalCover); //8
1784  lArPositiveHecFcalCover->registerColorCode(9);
1785  // Positive Endcap Part
1786  lArTrackingVolumes->push_back(lArNegativeEndcapInnerGap); //9
1787  lArTrackingVolumes->push_back(lArNegativeEndcap); //10
1788  lArNegativeEndcap->registerColorCode(3);
1789  lArTrackingVolumes->push_back(lArNegativeHec); //11
1790  lArNegativeHec->registerColorCode(9);
1791  lArTrackingVolumes->push_back(lArNegativeFcal); //12
1792  lArNegativeFcal->registerColorCode(8);
1793  lArTrackingVolumes->push_back(lArNegativeHecFcalCover); //13
1794  lArNegativeHecFcalCover->registerColorCode(9);
1795  lArTrackingVolumes->push_back(lArPosECPresampler); //14
1796  lArPosECPresampler->registerColorCode(7);
1797  lArTrackingVolumes->push_back(lArNegECPresampler); //15
1798  lArNegECPresampler->registerColorCode(7);
1799 
1800  }
1801  return lArTrackingVolumes;
1802 }
1803 
1805 {
1806  if (vol) log << "... ok" << endmsg;
1807  else log << "... missing" << endmsg;
1808 }
1809 
1810 void LAr::LArVolumeBuilder::printInfo(const PVConstLink& pv, int gen) const
1811 {
1812  const GeoLogVol* lv = pv->getLogVol();
1813  ATH_MSG_VERBOSE( "New LAr Object:"<<lv->getName()<<", made of"<<lv->getMaterial()->getName()<<","<<lv->getShape()->type());
1814  const GeoTrd* trd=dynamic_cast<const GeoTrd*> (lv->getShape());
1815  if (trd) ATH_MSG_VERBOSE("trddim:"<< trd->getXHalfLength1()<<","<<trd->getXHalfLength2()<<","<<trd->getYHalfLength1()<<","<<trd->getYHalfLength2()<<","<<trd->getZHalfLength());
1816  const GeoTubs* tub=dynamic_cast<const GeoTubs*> (lv->getShape());
1817  if (tub) ATH_MSG_VERBOSE("tubdim:"<< tub->getRMin()<<","<<tub->getRMax()<<","<<tub->getZHalfLength());
1818  const GeoTube* tube=dynamic_cast<const GeoTube*> (lv->getShape());
1819  if (tube) ATH_MSG_VERBOSE("tubdim:"<< tube->getRMin()<<","<<tube->getRMax()<<","<<tube->getZHalfLength());
1820  const GeoPcon* con=dynamic_cast<const GeoPcon*> (lv->getShape());
1821  if (con) {
1822  const unsigned int nPlanes=con->getNPlanes();
1823  for (unsigned int i=0; i<nPlanes; i++) {
1824  ATH_MSG_VERBOSE("polycone:"<<i<<":"<< con->getRMinPlane(i)<<","<<con->getRMaxPlane(i)<<","<<con->getZPlane(i));
1825  }
1826  }
1827  Amg::Transform3D transf = pv->getX();
1828  ATH_MSG_VERBOSE( "position:"<< "R:"<<transf.translation().perp()<<",phi:"<< transf.translation().phi()<<",x:"<<transf.translation().x()<<",y:"<<transf.translation().y()<<",z:"<<transf.translation().z());
1829  int igen = 0;
1830  printChildren(pv,gen,igen,transf);
1831 }
1832 
1833 void LAr::LArVolumeBuilder::printChildren(const PVConstLink& pv,int gen, int igen, const Amg::Transform3D& trIn) const
1834 {
1835  // subcomponents
1836  unsigned int nc = pv->getNChildVols();
1837  igen++;
1838  if (gen>-1 && igen>gen) return;
1839  std::string cname;
1840  for (unsigned int ic=0; ic<nc; ic++) {
1841  Amg::Transform3D transf = trIn*pv->getXToChildVol(ic);
1842  const PVConstLink cv = pv->getChildVol(ic);
1843  const GeoLogVol* clv = cv->getLogVol();
1844  ATH_MSG_VERBOSE(" ");
1845  ATH_MSG_VERBOSE( "subcomponent:"<<igen<<":"<<ic<<":"<<clv->getName()<<", made of"<<clv->getMaterial()->getName()<<","<<clv->getShape()->type());
1846  ATH_MSG_VERBOSE( "position:"<< "R:"<<transf.translation().perp()<<",phi:"<< transf.translation().phi()<<",x:"<<transf.translation().x()<<",y:"<<transf.translation().y()<<",z:"<<transf.translation().z());
1847  const GeoTrd* trd=dynamic_cast<const GeoTrd*> (clv->getShape());
1848  if (trd) ATH_MSG_VERBOSE("trddim:"<< trd->getXHalfLength1()<<","<<trd->getXHalfLength2()<<","<<trd->getYHalfLength1()<<","<<trd->getYHalfLength2()<<","<<trd->getZHalfLength());
1849  const GeoTubs* tub=dynamic_cast<const GeoTubs*> (clv->getShape());
1850  if (tub) ATH_MSG_VERBOSE("tubdim:"<< tub->getRMin()<<","<<tub->getRMax()<<","<<tub->getZHalfLength());
1851  const GeoTube* tube=dynamic_cast<const GeoTube*> (clv->getShape());
1852  if (tube) ATH_MSG_VERBOSE("tubdim:"<< tube->getRMin()<<","<<tube->getRMax()<<","<<tube->getZHalfLength());
1853  const GeoPcon* con=dynamic_cast<const GeoPcon*> (clv->getShape());
1854  if (con) {
1855  const unsigned int nPlanes=con->getNPlanes();
1856  for (unsigned int i=0; i<nPlanes; i++) {
1857  ATH_MSG_VERBOSE("polycone:"<<i<<":"<< con->getRMinPlane(i)<<","<<con->getRMaxPlane(i)<<","<<con->getZPlane(i));
1858  }
1859  }
1860 
1861  if (ic==0 || cname != clv->getName() ) {
1862  printChildren(cv,gen,igen,transf);
1863  cname = clv->getName();
1864  }
1865  }
1866 
1867 }
1868 
1869 GeoPVConstLink LAr::LArVolumeBuilder::getChild(const GeoPVConstLink& mother, const std::string& name, Amg::Transform3D& trIn) const
1870 {
1871  // subcomponents
1872  for (const GeoVolumeVec_t::value_type& p : geoGetVolumes (&*mother))
1873  {
1874  Amg::Transform3D transf = trIn*p.second;
1875  GeoPVConstLink cv = p.first;
1876  const GeoLogVol* clv = cv->getLogVol();
1877  if (clv->getName().substr(0,name.size())==name) { trIn = transf; return cv; }
1878  GeoPVConstLink next=getChild(cv,name,transf);
1879  if (next) {trIn = transf; return next; }
1880  }
1881  return nullptr;
1882 }
BinnedMaterial.h
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
geoGetVolumes
GeoVolumeVec_t geoGetVolumes(const GeoGraphNode *node, int depthLimit=1, int sizeHint=20)
Return the child volumes and associated transforms.
Definition: GeoVisitVolumes.cxx:211
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
SlidingCylinderSurface.h
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
egammaParameters::depth
@ depth
pointing depth of the shower as calculated in egammaqgcld
Definition: egammaParamDefs.h:276
Example_ReadSampleNoise.hfn
hfn
Definition: Example_ReadSampleNoise.py:46
Trk::SlidingDiscSurface
Definition: SlidingDiscSurface.h:45
LAr::LArVolumeBuilder::printChildren
void printChildren(const GeoPVConstLink &pv, int gen, int igen, const Amg::Transform3D &tr) const
Definition: LArVolumeBuilder.cxx:1833
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
DiscBounds.h
GeometrySignature.h
LAr::LArVolumeBuilder::finalize
virtual StatusCode finalize() override final
AlgTool finalize method.
Definition: LArVolumeBuilder.cxx:123
Trk::binZ
@ binZ
Definition: BinningType.h:49
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
hist_file_dump.d
d
Definition: hist_file_dump.py:137
LArDetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Gets the ith tree top.
Definition: LArDetectorManager.cxx:21
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
BinnedArray.h
Trk::BinnedMaterial
Definition: BinnedMaterial.h:38
CaloDepthTool.h
Declaration of CaloDepthTool. Created by Claire Bourdarios, 25.10.2004.
Trk::GeoMaterialConverter::convert
static Material convert(const GeoMaterial *gm)
Single conversion , input type GeoMaterial - output type Trk::MaterialProperties.
Definition: GeoMaterialConverter.cxx:18
DiscLayer.h
bin
Definition: BinsDiffFromStripMedian.h:43
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
LAr::LArVolumeBuilder::m_trackingVolumeCreator
ToolHandle< Trk::ITrackingVolumeCreator > m_trackingVolumeCreator
Definition: LArVolumeBuilder.h:90
LArDetectorManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Gets the number of tree tops.
Definition: LArDetectorManager.cxx:26
Trk::binEta
@ binEta
Definition: BinningType.h:54
LAr::LArVolumeBuilder::m_lArLayersPerRegion
unsigned int m_lArLayersPerRegion
if true use DetDescr based layering, if false use biequidistant layering
Definition: LArVolumeBuilder.h:99
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
LAr::LArVolumeBuilder::m_lArEndcapEnvelope
double m_lArEndcapEnvelope
envelope Cover of the Endcap
Definition: LArVolumeBuilder.h:93
Trk::Calo
@ Calo
Definition: GeometrySignature.h:28
Trk::TrackingVolume::registerColorCode
void registerColorCode(unsigned int icolor)
Register the color code.
LAr::LArVolumeBuilder::MaterialGarbage
std::set< const Trk::Material * > MaterialGarbage
Definition: LArVolumeBuilder.h:109
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
master.gen
gen
Definition: master.py:32
Trk::BinUtility::bins
size_t bins(size_t ba=0) const
Number of bins.
Definition: BinUtility.h:223
RunTileMonitoring.mbts
mbts
Definition: RunTileMonitoring.py:133
LAr::LArVolumeBuilder::m_useCaloTrackingGeometryBounds
bool m_useCaloTrackingGeometryBounds
tool required for DetDescr-based layering
Definition: LArVolumeBuilder.h:103
StoredPhysVol
Definition: StoredPhysVol.h:27
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
GeometryStatics.h
GeoVisitVolumes.h
Visitor to process all volumes under a GeoModel node.
LAr::LArVolumeBuilder::trackingVolumes
virtual std::vector< Trk::TrackingVolume * > * trackingVolumes(const CaloDetDescrManager &caloDDM) const override final
TrackingVolumeBuilder interface method - returns vector of Volumes.
Definition: LArVolumeBuilder.cxx:136
CylinderVolumeBounds.h
StoredPhysVol::getPhysVol
GeoFullPhysVol * getPhysVol()
Destructor.
Definition: StoredPhysVol.cxx:20
Trk::GeometrySignature
GeometrySignature
Definition: GeometrySignature.h:24
beamspotman.steps
int steps
Definition: beamspotman.py:505
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
SlidingDiscSurface.h
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
LAr::LArVolumeBuilder::printCheckResult
static void printCheckResult(MsgStream &log, const Trk::TrackingVolume *vol)
Definition: LArVolumeBuilder.cxx:1804
Trk::SlidingDiscSurface::offset
const std::vector< float > & offset() const
This method allows access to the radial offset values.
Definition: SlidingDiscSurface.h:128
Trk::SlidingCylinderSurface::offset
const std::vector< float > offset() const
This method allows access to the radial offset values.
Definition: SlidingCylinderSurface.h:82
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
ITrackingVolumeCreator.h
CylinderSurface.h
Trk::CylinderVolumeBounds::halflengthZ
double halflengthZ() const
This method returns the halflengthZ.
Definition: CylinderVolumeBounds.h:207
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
CylinderLayer.h
Trk::Volume::center
const Amg::Vector3D & center() const
returns the center of the volume
Definition: Volume.h:86
LAr::LArVolumeBuilder::m_lArTrackingVolumeHelper
ToolHandle< Trk::ITrackingVolumeHelper > m_lArTrackingVolumeHelper
helper for volume creation
Definition: LArVolumeBuilder.h:88
LArDetectorManager
Stored in storegate. Provides access to EMB, EMEC, HEC and FCAL Detector Managers....
Definition: LArDetectorManager.h:26
fcn
void fcn(int &, double *, double &result, double par[], int)
this is where we write out chi2
Definition: Chi2LJets.cxx:183
Trk::BinUtility
Definition: BinUtility.h:39
grepfile.ic
int ic
Definition: grepfile.py:33
LAr::LArVolumeBuilder::m_scale_HECmaterial
float m_scale_HECmaterial
Definition: LArVolumeBuilder.h:113
LAr::LArVolumeBuilder::getChild
GeoPVConstLink getChild(const GeoPVConstLink &mother, const std::string &name, Amg::Transform3D &trIn) const
Definition: LArVolumeBuilder.cxx:1869
Trk::CylinderVolumeBounds
Definition: CylinderVolumeBounds.h:70
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::CylinderVolumeBounds::outerRadius
double outerRadius() const
This method returns the outer radius.
Definition: CylinderVolumeBounds.h:191
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
GeoMaterialConverter.h
LAr::LArVolumeBuilder::printInfo
void printInfo(const GeoPVConstLink &pv, int gen=-1) const
Definition: LArVolumeBuilder.cxx:1810
LAr::LArVolumeBuilder::m_useCaloSurfBuilder
bool m_useCaloSurfBuilder
if true use DetDescr based layering, if false use biequidistant layering
Definition: LArVolumeBuilder.h:95
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
LArDetectorManager.h
LAr::LArVolumeBuilder::initialize
virtual StatusCode initialize() override final
AlgTool initialize method.
Definition: LArVolumeBuilder.cxx:91
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
Trk::open
@ open
Definition: BinningType.h:40
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
CylinderBounds.h
Trk::binR
@ binR
Definition: BinningType.h:50
TrackingVolume.h
Trk::GeoShapeConverter::convert
static std::unique_ptr< CylinderVolumeBounds > convert(const GeoTubs *gtub)
Convert a tubs.
Definition: GeoShapeConverter.cxx:57
LAr::LArVolumeBuilder::m_calosurf
ToolHandle< ICaloSurfaceBuilder > m_calosurf
Definition: LArVolumeBuilder.h:106
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
Trk::CylinderVolumeBounds::innerRadius
double innerRadius() const
This method returns the inner radius.
Definition: CylinderVolumeBounds.h:187
LArVolumeBuilder.h
DeMoScan.first
bool first
Definition: DeMoScan.py:534
DEBUG
#define DEBUG
Definition: page_access.h:11
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Trk::BinUtility::clone
BinUtility * clone() const
Implizit Constructor.
Definition: BinUtility.h:130
python.changerun.pv
pv
Definition: changerun.py:81
GeoShapeConverter.h
DiscSurface.h
Trk::SlidingCylinderSurface
Definition: SlidingCylinderSurface.h:34
Trk::Material::scale
Material * scale(float sf) const
scaling method
Definition: Material.h:239
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
LAr::LArVolumeBuilder::m_lArBarrelEnvelope
double m_lArBarrelEnvelope
envelope Cover of the Barrel
Definition: LArVolumeBuilder.h:92
Trk::Material
Definition: Material.h:116
LAr::LArVolumeBuilder::LArVolumeBuilder
LArVolumeBuilder(const std::string &, const std::string &, const IInterface *)
AlgTool style constructor.
Definition: LArVolumeBuilder.cxx:54
Trk::BinnedArray
Definition: BinnedArray.h:38
AthAlgTool
Definition: AthAlgTool.h:26
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
Trk::TrackingVolume
Definition: TrackingVolume.h:121
Trk::CylinderVolumeBounds::clone
CylinderVolumeBounds * clone() const override
Virtual constructor.
Definition: CylinderVolumeBounds.h:171
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
Material
@ Material
Definition: MaterialTypes.h:8
AlignableTrackingVolume.h
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
readCCLHist.float
float
Definition: readCCLHist.py:83
calibdata.tube
tube
Definition: calibdata.py:31
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83
Material.h
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
LayerMaterialProperties.h
StoredPhysVol.h
Trk::AlignableTrackingVolume
Definition: AlignableTrackingVolume.h:36
ITrackingVolumeHelper.h
LAr::LArVolumeBuilder::m_lArMgrLocation
std::string m_lArMgrLocation
Location of the CaloDetDescrMgr.
Definition: LArVolumeBuilder.h:85