13 #include "GeoModelKernel/GeoElement.h"
14 #include "GeoModelKernel/GeoMaterial.h"
15 #include "GeoModelKernel/GeoFullPhysVol.h"
16 #include "GeoModelKernel/GeoPhysVol.h"
17 #include "GeoModelKernel/GeoVPhysVol.h"
18 #include "GeoModelKernel/GeoVFullPhysVol.h"
19 #include "GeoModelKernel/GeoLogVol.h"
20 #include "GeoModelKernel/GeoTube.h"
21 #include "GeoModelKernel/GeoNameTag.h"
22 #include "GeoModelKernel/GeoTransform.h"
23 #include "GeoModelKernel/GeoAlignableTransform.h"
24 #include "GeoModelKernel/GeoIdentifierTag.h"
25 #include "GeoModelKernel/GeoDefinitions.h"
27 #include "GeoModelKernel/GeoShapeUnion.h"
28 #include "GeoModelKernel/GeoShapeShift.h"
39 #include "GaudiKernel/MsgStream.h"
40 #include "GaudiKernel/Bootstrap.h"
41 #include "GaudiKernel/SystemOfUnits.h"
47 m_cryoMotherPhysical(nullptr),
48 m_cryoLArPhys(nullptr)
56 if (m_cryoMotherPhysical)
return m_cryoMotherPhysical;
59 ISvcLocator *svcLocator = Gaudi::svcLocator();
61 if (svcLocator->service(
"DetectorStore",
detStore,
false )==StatusCode::FAILURE) {
62 throw std::runtime_error(
"Error in H6CryostatConstruction, cannot access DetectorStore");
67 if (StatusCode::SUCCESS !=
detStore->retrieve(materialManager, std::string(
"MATERIALS")))
return nullptr;
69 const GeoMaterial *Air = materialManager->
getMaterial(
"std::Air");
71 throw std::runtime_error(
"Error in H6CryostatConstruction, std::Air is not found.");
73 const GeoMaterial *Iron = materialManager->
getMaterial(
"std::Iron");
75 throw std::runtime_error(
"Error in H6CryostatConstruction, std::Iron is not found.");
77 const GeoMaterial *
LAr = materialManager->
getMaterial(
"std::LiquidArgon");
79 throw std::runtime_error(
"Error in H6CryostatConstruction, std::LiquidArgon is not found.");
84 if (geoModelSvc.retrieve().isFailure()) {
85 throw std::runtime_error (
"Cannot locate GeoModelSvc!!");
89 std::string LArVersion = geoModelSvc->LAr_VersionOverride();
91 std::string detectorKey = LArVersion.empty() ?
AtlasVersion : LArVersion;
92 std::string detectorNode = LArVersion.empty() ?
"ATLAS" :
"LAr";
114 std::string cryoMotherName =
"LAr::H6::Cryostat::MotherVolume";
117 GeoTube* cryoMotherShape =
new GeoTube(0.0 , rwarm+10.0, zcryo+10.0*
Gaudi::Units::mm);
119 const GeoLogVol* cryoMotherLogical =
new GeoLogVol(cryoMotherName, cryoMotherShape, Air);
120 m_cryoMotherPhysical =
new GeoFullPhysVol(cryoMotherLogical);
127 std::string baseName =
"LArTB::H6::Cryostat::" ;
128 std::string cryoWallName =
"LArTB::H6::Cryostat" ;
129 std::string cryoWarmWallName = baseName +
"WarmWall" ;
130 std::string cryoVacuumGapName = baseName +
"Vacuum" ;
131 std::string cryoColdWallName = baseName +
"ColdWall" ;
132 std::string cryoLArName = baseName +
"LAr" ;
136 GeoTube* cryoWarmWallShape =
new GeoTube(0. , rwarm, zcryo);
137 const GeoLogVol* cryoWarmWallLog =
new GeoLogVol(cryoWarmWallName, cryoWarmWallShape, Iron);
139 GeoIntrusivePtr<GeoPhysVol> cryoWarmWallPhys =
new GeoPhysVol(cryoWarmWallLog);
140 m_cryoMotherPhysical->add(cryoWarmWallPhys);
143 GeoTube* cryoVacuumGapShape =
new GeoTube(0. , rvac, zcryo-2.0*
Gaudi::Units::mm);
144 const GeoLogVol* cryoVacuumGapLog =
new GeoLogVol(cryoVacuumGapName, cryoVacuumGapShape, Air);
145 GeoIntrusivePtr<GeoPhysVol> cryoVacuumGapPhys =
new GeoPhysVol(cryoVacuumGapLog);
146 cryoWarmWallPhys->add(cryoVacuumGapPhys);
149 GeoTube* cryoColdWallShape =
new GeoTube(0. , rcold, zcryo-4.0*
Gaudi::Units::mm);
150 const GeoLogVol* cryoColdWallLog =
new GeoLogVol(cryoColdWallName, cryoColdWallShape, Iron);
151 GeoIntrusivePtr<GeoPhysVol> cryoColdWallPhys =
new GeoPhysVol(cryoColdWallLog);
152 cryoVacuumGapPhys->add(cryoColdWallPhys);
162 const GeoLogVol* cryoLArLog =
new GeoLogVol(cryoLArName, cryoLArShape,
LAr);
163 m_cryoMotherPhysical->add(
new GeoNameTag(std::string(
"Cryostat LAr Physical")));
165 m_cryoLArPhys =
new GeoPhysVol(cryoLArLog);
166 cryoColdWallPhys->add(m_cryoLArPhys);
172 return m_cryoMotherPhysical;
179 return m_cryoLArPhys;