9 #include "GeoModelKernel/GeoElement.h"
10 #include "GeoModelKernel/GeoMaterial.h"
11 #include "GeoModelKernel/GeoFullPhysVol.h"
12 #include "GeoModelKernel/GeoPhysVol.h"
13 #include "GeoModelKernel/GeoVPhysVol.h"
14 #include "GeoModelKernel/GeoLogVol.h"
15 #include "GeoModelKernel/GeoPcon.h"
16 #include "GeoModelKernel/GeoBox.h"
17 #include "GeoModelKernel/GeoTube.h"
18 #include "GeoModelKernel/GeoTubs.h"
19 #include "GeoModelKernel/GeoCons.h"
20 #include "GeoModelKernel/GeoTrd.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"
31 #include "GaudiKernel/MsgStream.h"
32 #include "GaudiKernel/Bootstrap.h"
33 #include "GaudiKernel/SystemOfUnits.h"
47 log << MSG::INFO <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++" <<
endmsg;
49 log << MSG::INFO <<
"+ HELLO from LArGeo::CryostatConstructionTBEC +" <<
endmsg;
51 log << MSG::INFO <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++" <<
endmsg;
54 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
56 throw std::runtime_error(
"Error in CryostatConstructionTBEC, cannot access DetectorStore");
62 if (StatusCode::SUCCESS !=
detStore->retrieve(materialManager, std::string(
"MATERIALS")))
return nullptr;
64 const GeoMaterial *Air = materialManager->
getMaterial(
"std::Air");
65 if (!Air)
throw std::runtime_error(
"Error in CryostatConstructionTBEC, std::Air is not found.");
67 const GeoMaterial *Al = materialManager->
getMaterial(
"std::Aluminium");
68 if (!Al)
throw std::runtime_error(
"Error in CryostatConstructionTBEC, std::Aluminium is not found.");
70 const GeoMaterial *
LAr = materialManager->
getMaterial(
"std::LiquidArgon");
71 if (!
LAr)
throw std::runtime_error(
"Error in CryostatConstructionTBEC, std::LiquidArgon is not found.");
73 const GeoMaterial *Iron = materialManager->
getMaterial(
"std::Iron");
74 if (!Iron)
throw std::runtime_error(
"Error in CryostatConstructionTBEC, std::Iron is not found.");
76 const GeoMaterial *Gten = materialManager->
getMaterial(
"LAr::G10");
77 if (!Gten)
throw std::runtime_error(
"Error in CryostatConstructionTBEC, LAr::G10 is not found.");
79 const GeoMaterial *Vacuum = materialManager->
getMaterial(
"LAr::Vacuum");
80 if (!Vacuum)
throw std::runtime_error(
"Error in CryostatConstructionTBEC, std::Vacuum is not found.");
91 std::string baseName =
"LAr::TBEC::Cryostat";
102 std::string cryoMotherName = baseName +
"::MotherVolume";
104 const GeoLogVol* cryoMotherLogical =
new GeoLogVol( cryoMotherName, cryoMotherShape, Air );
110 std::string ExtWallName = baseName +
"::ExternalWarmWall";
112 const GeoLogVol* ExtWallLogical =
new GeoLogVol( ExtWallName, ExtWallShape, Al );
113 GeoIntrusivePtr<GeoPhysVol> ExtWallPhysical =
new GeoPhysVol( ExtWallLogical );
115 std::string WallName = baseName +
"::WarmWallInterval";
117 const GeoLogVol* WallLogical =
new GeoLogVol( WallName, WallShape, Vacuum );
118 GeoIntrusivePtr<GeoPhysVol> WallPhysical =
new GeoPhysVol( WallLogical );
120 std::string IntWallName = baseName +
"::InternalWarmWall";
122 const GeoLogVol* IntWallLogical =
new GeoLogVol( IntWallName, IntWallShape, Al );
123 GeoIntrusivePtr<GeoPhysVol> IntWallPhysical =
new GeoPhysVol( IntWallLogical );
125 std::string VacuumName = baseName +
"::Vacuum";
127 const GeoLogVol* VacuumLogical =
new GeoLogVol( VacuumName, VacuumShape, Vacuum );
128 GeoIntrusivePtr<GeoPhysVol> VacuumPhysical =
new GeoPhysVol( VacuumLogical );
130 std::string ColdWallName = baseName +
"::ColdWall";
132 const GeoLogVol* ColdWallLogical =
new GeoLogVol( ColdWallName, ColdWallShape, Iron );
133 GeoIntrusivePtr<GeoPhysVol> ColdWallPhysical =
new GeoPhysVol( ColdWallLogical );
135 std::string LArName = baseName +
"::LiquidArgon";
137 const GeoLogVol* LArLogical =
new GeoLogVol( LArName, LArShape,
LAr );
141 ColdWallPhysical->add(
new GeoIdentifierTag( 1 ) );
145 VacuumPhysical->add(
new GeoIdentifierTag( 1 ) );
147 VacuumPhysical->add( ColdWallPhysical );
149 IntWallPhysical->add(
new GeoIdentifierTag( 1 ) );
151 IntWallPhysical->add( VacuumPhysical );
153 WallPhysical->add(
new GeoIdentifierTag( 1 ) );
155 WallPhysical->add( IntWallPhysical );
157 ExtWallPhysical->add(
new GeoIdentifierTag( 1 ) );
159 ExtWallPhysical->add( WallPhysical );
167 std::string PConeName = baseName +
"::PressureCone::Mother";
169 const GeoLogVol* PConeLogical =
new GeoLogVol( PConeName, PConeShape, Vacuum );
170 GeoIntrusivePtr<GeoPhysVol> PConePhysical =
new GeoPhysVol( PConeLogical );
172 std::string IntFlangeName = baseName +
"::PressureCone::InternalFlange";
174 const GeoLogVol* IntFlangeLogical =
new GeoLogVol( IntFlangeName, IntFlangeShape, Gten );
175 GeoIntrusivePtr<GeoPhysVol> IntFlangePhysical =
new GeoPhysVol( IntFlangeLogical );
177 std::string ExtFlangeName = baseName +
"::PressureCone::ExternalFlange";
179 const GeoLogVol* ExtFlangeLogical =
new GeoLogVol( ExtFlangeName, ExtFlangeShape, Gten );
180 GeoIntrusivePtr<GeoPhysVol> ExtFlangePhysical =
new GeoPhysVol( ExtFlangeLogical );
182 std::string ConeName = baseName +
"::PressureCone::Cone";
184 const GeoLogVol* ConeLogical =
new GeoLogVol( ConeName, ConeShape, Gten );
185 GeoIntrusivePtr<GeoPhysVol> ConePhysical =
new GeoPhysVol( ConeLogical );
187 PConePhysical->add(
new GeoIdentifierTag( 1 ) );
189 PConePhysical->add( IntFlangePhysical );
191 PConePhysical->add(
new GeoIdentifierTag( 1 ) );
193 PConePhysical->add( ExtFlangePhysical );
195 PConePhysical->add(
new GeoIdentifierTag( 1 ) );
197 PConePhysical->add( ConePhysical );
199 for (
int i = 0;
i < 3;
i++ )
for (
int j = 0; j < 13; j++ ) {
202 VacuumPhysical->add(
new GeoIdentifierTag( 1 +
i*13 + j ) );
203 VacuumPhysical->add(
new GeoTransform( GeoTrf::Translate3D(
x,
y, -42.*
Gaudi::Units::cm ) ) );
204 VacuumPhysical->add( PConePhysical );
209 std::string ZigZagMotherName = baseName +
"::ZigZag::Mother";
211 const GeoLogVol* ZigZagMotherLogical =
new GeoLogVol( ZigZagMotherName, ZigZagMotherShape, Vacuum );
212 GeoIntrusivePtr<GeoPhysVol> ZigZagMotherPhysical =
new GeoPhysVol( ZigZagMotherLogical );
214 std::string ZigZagStrAName = baseName +
"::ZigZag::StrA";
216 const GeoLogVol* ZigZagStrALogical =
new GeoLogVol( ZigZagStrAName, ZigZagStrAShape, Al );
217 GeoIntrusivePtr<GeoPhysVol> ZigZagStrAPhysical =
new GeoPhysVol( ZigZagStrALogical );
219 std::string ZigZagStrBName = baseName +
"::ZigZag::StrB";
221 const GeoLogVol* ZigZagStrBLogical =
new GeoLogVol( ZigZagStrBName, ZigZagStrBShape, Al );
222 GeoIntrusivePtr<GeoPhysVol> ZigZagStrBPhysical =
new GeoPhysVol( ZigZagStrBLogical );
224 std::string ZigZagStrCName = baseName +
"::ZigZag::StrC";
226 const GeoLogVol* ZigZagStrCLogical =
new GeoLogVol( ZigZagStrCName, ZigZagStrCShape, Al );
227 GeoIntrusivePtr<GeoPhysVol> ZigZagStrCPhysical =
new GeoPhysVol( ZigZagStrCLogical );
229 std::string ZigZagStrDName = baseName +
"::ZigZag::StrD";
231 const GeoLogVol* ZigZagStrDLogical =
new GeoLogVol( ZigZagStrDName, ZigZagStrDShape, Al );
232 GeoIntrusivePtr<GeoPhysVol> ZigZagStrDPhysical =
new GeoPhysVol( ZigZagStrDLogical );
236 for (
int i = 0;
i < 9;
i++ ) {
237 ZigZagMotherPhysical->add(
new GeoIdentifierTag( StrAIdTag ) );
239 ZigZagMotherPhysical->add( ZigZagStrAPhysical );
242 for (
int j = 0; j < 2; j++ )
for (
int i = 0;
i < 8;
i++ ) {
243 ZigZagMotherPhysical->add(
new GeoIdentifierTag( StrAIdTag ) );
245 ZigZagMotherPhysical->add( ZigZagStrAPhysical );
254 for (
int k = 0;
k < 2;
k++ )
for (
int i = 0;
i < 8;
i++ ) {
255 ZigZagMotherPhysical->add(
new GeoIdentifierTag( StrBIdTag ) );
257 ZigZagMotherPhysical->add( ZigZagStrBPhysical );
260 for (
int j = 0; j < 2; j++ ) {
261 ZigZagMotherPhysical->add(
new GeoIdentifierTag( StrBIdTag ) );
263 ZigZagMotherPhysical->add( ZigZagStrBPhysical );
270 for (
int i = 0;
i < 9;
i++ ) {
272 ZigZagMotherPhysical->add(
new GeoIdentifierTag( StrCIdTag ) );
274 ZigZagMotherPhysical->add( ZigZagStrCPhysical );
277 for (
int j = 0; j < 2; j++ ) {
278 ZigZagMotherPhysical->add(
new GeoIdentifierTag( StrCIdTag ) );
280 ZigZagMotherPhysical->add( ZigZagStrCPhysical );
290 for (
int k = 0;
k < 2;
k++ )
for (
int i = 0;
i < 9;
i++ ) {
291 ZigZagMotherPhysical->add(
new GeoIdentifierTag( StrDIdTag ) );
293 ZigZagMotherPhysical->add( ZigZagStrDPhysical );
296 if (
i < 8 )
for (
int j = 0; j < 2; j++ ) {
297 ZigZagMotherPhysical->add(
new GeoIdentifierTag( StrDIdTag ) );
299 ZigZagMotherPhysical->add( ZigZagStrDPhysical );
304 WallPhysical->add(
new GeoIdentifierTag( 1 ) );
306 WallPhysical->add( ZigZagMotherPhysical );
313 return m_LArPhysical;