8 #include "GeoModelKernel/GeoElement.h"
9 #include "GeoModelKernel/GeoMaterial.h"
10 #include "GeoModelKernel/GeoFullPhysVol.h"
11 #include "GeoModelKernel/GeoVFullPhysVol.h"
12 #include "GeoModelKernel/GeoPhysVol.h"
13 #include "GeoModelKernel/GeoVPhysVol.h"
14 #include "GeoModelKernel/GeoLogVol.h"
15 #include "GeoModelKernel/GeoBox.h"
16 #include "GeoModelKernel/GeoTubs.h"
17 #include "GeoModelKernel/GeoTube.h"
18 #include "GeoModelKernel/GeoNameTag.h"
19 #include "GeoModelKernel/GeoTransform.h"
20 #include "GeoModelKernel/GeoSerialIdentifier.h"
21 #include "GeoModelKernel/GeoSerialTransformer.h"
22 #include "GeoModelKernel/GeoAlignableTransform.h"
23 #include "GeoModelKernel/GeoIdentifierTag.h"
24 #include "GeoModelKernel/GeoSerialDenominator.h"
25 #include "GeoModelKernel/GeoDefinitions.h"
28 #include "GeoModelKernel/GeoShapeUnion.h"
29 #include "GeoModelKernel/GeoShapeShift.h"
32 #include "GeoGenericFunctions/Variable.h"
39 #include "GaudiKernel/MsgStream.h"
40 #include "GaudiKernel/Bootstrap.h"
41 #include "GaudiKernel/SystemOfUnits.h"
48 :m_H62004MiddleBeamPhysical(nullptr),
49 m_detectorManager(nullptr)
62 if (m_H62004MiddleBeamPhysical)
return m_H62004MiddleBeamPhysical;
66 ISvcLocator *svcLocator = Gaudi::svcLocator();
68 if (svcLocator->service(
"MessageSvc",
msgSvc,
true )==StatusCode::FAILURE) {
69 throw std::runtime_error(
"Error in MiddleBeamConstructionH62004, cannot access MessageSvc");
72 MsgStream
log(
msgSvc,
"LArGeo::MiddleBeamConstructionH62004");
73 log << MSG::INFO <<
"+ HELLO from LArGeo::MiddleBeamConstructionH62004 +" <<
endmsg;
77 if (svcLocator->service(
"DetectorStore",
detStore,
false )==StatusCode::FAILURE) {
78 throw std::runtime_error(
"Error in MiddleBeamConstructionH62004, cannot access DetectorStore");
85 if (StatusCode::SUCCESS !=
detStore->retrieve(materialManager, std::string(
"MATERIALS")))
return nullptr;
87 const GeoMaterial *Air = materialManager->
getMaterial(
"std::Air");
88 if (!Air)
throw std::runtime_error(
"Error in MiddleBeamConstructionH62004, std::Air is not found.");
106 std::string baseName =
"LAr::TBH62004";
107 std::string H62004MiddleBeamName = baseName +
"::MiddleBeam";
120 GeoBox* H62004MiddleBeamShape =
new GeoBox( bmtb_x, bmtb_y, bmtb_z );
121 const GeoLogVol* H62004MiddleBeamLogical =
new GeoLogVol( H62004MiddleBeamName, H62004MiddleBeamShape, Air );
123 m_H62004MiddleBeamPhysical =
new GeoPhysVol(H62004MiddleBeamLogical);
127 log << MSG::INFO <<
" Create BPC 1&2 " <<
endmsg;
131 for(
int i=0;
i<4; ++
i) {
132 m_H62004MiddleBeamPhysical->add(
new GeoIdentifierTag((3+
i/2)*10+
i) );
136 m_H62004MiddleBeamPhysical->add(BPCPhysical);
140 m_H62004MiddleBeamPhysical->add(BPCPhysical);
148 return m_H62004MiddleBeamPhysical;