6 #include "GeoModelKernel/GeoElement.h"
7 #include "GeoModelKernel/GeoMaterial.h"
8 #include "GeoModelKernel/GeoFullPhysVol.h"
9 #include "GeoModelKernel/GeoPhysVol.h"
10 #include "GeoModelKernel/GeoVPhysVol.h"
11 #include "GeoModelKernel/GeoLogVol.h"
12 #include "GeoModelKernel/GeoTubs.h"
13 #include "GeoModelKernel/GeoNameTag.h"
14 #include "GeoModelKernel/GeoIdentifierTag.h"
15 #include "GeoModelKernel/GeoDefinitions.h"
17 #include "GeoModelKernel/GeoShapeUnion.h"
18 #include "GeoModelKernel/GeoShapeShift.h"
21 #include "GaudiKernel/MsgStream.h"
22 #include "GaudiKernel/Bootstrap.h"
23 #include "GaudiKernel/SystemOfUnits.h"
58 ISvcLocator *svcLocator = Gaudi::svcLocator();
59 SmartIF<StoreGateSvc>
detStore{svcLocator->service(
"DetectorStore")};
61 throw std::runtime_error(
"Error in EndcapCryostatConstruction, cannot access DetectorStore");
65 if (StatusCode::SUCCESS !=
detStore->retrieve(materialManager, std::string(
"MATERIALS")))
return nullptr;
67 const GeoMaterial *
LAr = materialManager->
getMaterial(
"std::LiquidArgon");
69 throw std::runtime_error(
"Error in EndcapCryostatConstruction, std::LiquidArgon is not found.");
74 SmartIF<IRDBAccessSvc> pAccessSvc{svcLocator->service(
"RDBAccessSvc")};
75 if (!pAccessSvc.isValid()) {
76 throw std::runtime_error (
"Cannot locate RDBAccessSvc!!");
79 SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
80 if (!geoModel.isValid()) {
81 throw std::runtime_error (
"Cannot locate GeoModelSvc!!");
85 std::string LArVersion = geoModel->LAr_VersionOverride();
87 std::string detectorKey = LArVersion.empty() ?
AtlasVersion : LArVersion;
88 std::string detectorNode = LArVersion.empty() ?
"ATLAS" :
"LAr";
102 double HalfZ = ((*presamplerPosition)[0]->getDouble(
"TCK")/2.)*
Gaudi::Units::cm;
105 std::string
name =
"LAr::Endcap::Presampler::LiquidArgon";
108 double start_phi = 0.;
115 GeoTubs* endcapPresamplerSolid =
new GeoTubs(
Rmin, Rmax, HalfZ, start_phi, phi_size);
117 const GeoLogVol* endcapPresamplerLog =
new GeoLogVol(
name,endcapPresamplerSolid,
LAr);