12 #include "Gaudi/Property.h"
13 #include "GaudiKernel/IService.h"
14 #include "GaudiKernel/IToolSvc.h"
27 #include "GeoModelKernel/GeoFullPhysVol.h"
28 #include "GeoModelKernel/GeoDefinitions.h"
29 #include "GaudiKernel/SystemOfUnits.h"
37 const std::string&
name,
50 std::string strTag =
"ATLAS-00";
51 std::string strNode =
"ATLAS";
53 SmartIF<IGeoModelSvc> geoModelSvc{service(
"GeoModelSvc")};
58 <<
" " << detectorKey.
tag());
59 if ( detectorKey.
tag() !=
"LAr-H8-00" && detectorKey.
tag() !=
"LAr-H6-00"
60 && detectorKey.
tag() !=
"LAr-G3-00")
62 strTag = detectorKey.
tag();
63 strNode = detectorKey.
node();
65 ATH_MSG_INFO (
"LAr simplified geometry will use : " << strTag <<
" " << strNode);
68 SmartIF<IGeoDbTagSvc> geoDbTag{service(
"GeoDbTagSvc")};
70 SmartIF<IRDBAccessSvc> rdbSvc{service(geoDbTag->getParamSvcName())};
75 m_recCryoCyl = rdbSvc->getRecordsetPtr(
"CryoCylinders",strTag,strNode);
77 m_recCryoCyl = rdbSvc->getRecordsetPtr(
"CryoCylinders",
"CryoCylinders-00");
79 m_recPresGeo = rdbSvc->getRecordsetPtr(
"PresamplerGeometry",strTag,strNode);
81 m_recPresGeo = rdbSvc->getRecordsetPtr(
"PresamplerGeometry",
"PresamplerGeometry-00");
83 m_recBarrGeo = rdbSvc->getRecordsetPtr(
"BarrelGeometry",strTag,strNode);
85 m_recBarrGeo = rdbSvc->getRecordsetPtr(
"BarrelGeometry",
"BarrelGeometry-00");
89 m_recPresPos = rdbSvc->getRecordsetPtr(
"PresamplerPosition",detectorKeyAtl.
tag(),detectorKeyAtl.
node());
92 m_recPresPos = rdbSvc->getRecordsetPtr(
"PresamplerPosition",strTag,strNode);
95 m_EmecGeo = rdbSvc->getRecordsetPtr(
"EmecGeometry",strTag,strNode);
97 m_HEC = rdbSvc->getRecordsetPtr(
"HadronicEndcap",strTag,strNode);
99 m_HEC = rdbSvc->getRecordsetPtr(
"HadronicEndcap",
"HadronicEndcap-00");
101 ATH_MSG_INFO (
" LArRecoSimpleGeomTool successfully initialized ");
102 return StatusCode::SUCCESS;
108 std::vector<double>&
radius,
109 std::vector<double>&
depth,
110 std::vector<double>& hlength )
const
130 GeoFullPhysVol* fullPV = storedPV->
getPhysVol();
131 htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse();
143 if (lar->size()<14)
return false;
159 depth.push_back( dep/2. );
160 hlength.push_back( len );
169 if (lar->size()<15)
return false;
182 depth.push_back( dep /2.);
183 hlength.push_back( len );
196 depth.push_back( dep /2.);
197 hlength.push_back( len );
210 depth.push_back( dep /2.);
211 hlength.push_back( len );
224 depth.push_back( dep /2.);
225 hlength.push_back( len );
235 if (lar->size()==0)
return false;
242 if ( !lar || lar->size()==0)
return false;
252 depth.push_back( dep /2.);
253 hlength.push_back( len );
263 if (lar->size()==0)
return false;
275 depth.push_back( dep /2.);
276 hlength.push_back( len );
287 std::vector<double>&
z,
288 std::vector<double>&
depth,
289 std::vector<double>& rmin, std::vector<double>& rmax )
const
308 GeoFullPhysVol* fullPV = storedPV->
getPhysVol();
309 htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse();
317 double ri,ra,dep,zcent;
325 if (lar->size()<60)
return false;
340 rmin.push_back( ri );
341 rmax.push_back( ra );
342 depth.push_back( dep/2. );
343 z.push_back( zcent );
359 rmin.push_back( ri );
360 rmax.push_back( ra );
361 depth.push_back( dep/2. );
362 z.push_back( zcent );
386 rmin.push_back( ri );
387 rmax.push_back( ra );
388 depth.push_back( dep/2. );
389 z.push_back( zcent );
413 rmin.push_back( ri );
414 rmax.push_back( ra );
415 depth.push_back( dep/2. );
416 z.push_back( zcent );
426 if (lar->size()==0)
return false;
444 rmin.push_back( ri );
445 rmax.push_back( ra );
446 depth.push_back( dep/2. );
447 z.push_back( zcent );
458 if (lar->size()==0)
return false;
481 rmin.push_back( ri );
482 rmax.push_back( ra );
483 depth.push_back( dep/2. );
484 z.push_back( zcent );
494 rmin.push_back(
nb );
496 rmax.push_back(
nb );
513 rmin.push_back(
nb );
515 rmax.push_back(
nb );
532 rmin.push_back(
nb );
534 rmax.push_back(
nb );
557 std::vector<double>&
radius,
558 std::vector<double>&
depth,
559 std::vector<double>& hlength )
575 GeoFullPhysVol* fullPV = storedPV->
getPhysVol();
576 htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse();
589 std::vector<double>&
radius,
590 std::vector<double>&
depth,
591 std::vector<double>& hlength )
607 GeoFullPhysVol* fullPV = storedPV->
getPhysVol();
608 htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse();
624 return std::string(
"LARCRYO_B");
626 return std::string(
"LARCRYO_EC_POS");
628 return std::string(
"LARCRYO_EC_NEG");
630 return std::string(
"SOLENOID");
632 return std::string(
"PRESAMPLER_B_POS");
634 return std::string(
"PRESAMPLER_B_NEG");
636 return std::string(
"EMB_POS");
638 return std::string(
"EMB_NEG");
640 return std::string(
"PRESAMPLER_EC_POS");
642 return std::string(
"PRESAMPLER_EC_NEG");
644 return std::string(
"EMEC_POS");
646 return std::string(
"EMEC_NEG");
648 return std::string(
"HEC1_POS");
650 return std::string(
"HEC1_NEG");
652 return std::string(
"HEC2_POS");
654 return std::string(
"HEC2_NEG");
656 return std::string(
"FCAL1_POS");
658 return std::string(
"FCAL1_NEG");
660 return std::string(
"FCAL2_POS");
662 return std::string(
"FCAL2_NEG");
664 return std::string(
"FCAL3_POS");
666 return std::string(
"FCAL3_NEG");
668 return std::string(
"");