66 ISvcLocator *svcLocator = Gaudi::svcLocator();
69 sc = svcLocator->service(
"MessageSvc",
msgSvc,
true );
70 if (
sc==StatusCode::FAILURE) {
71 throw std::runtime_error(
"Error in MovableTableConstructionH62004, cannot access MessageSvc");
74 MsgStream
log(
msgSvc,
"LArGeo::MovableTableConstructionH62004");
75 log << MSG::INFO <<
"+ HELLO from LArGeo::MovableTableConstructionH62004 +" <<
endmsg;
79 sc=svcLocator->service(
"DetectorStore",
detStore,
false );
80 if (
sc==StatusCode::FAILURE) {
81 throw std::runtime_error(
"Error in MovableTableConstructionH62004, cannot access DetectorStore");
90 sc=
detStore->retrieve(materialManager, std::string(
"MATERIALS"));
91 if (StatusCode::SUCCESS !=
sc)
return nullptr;
93 const GeoMaterial *Air = materialManager->
getMaterial(
"std::Air");
94 if (!Air)
throw std::runtime_error(
"Error in MovableTableConstructionH62004, std::Air is not found.");
103 const GeoMaterial *Scint = materialManager->
getMaterial(
"std::Polystyrene");
104 if (!Scint)
throw std::runtime_error(
"Error in MovableTableConstructionH62004, std::Polystyrene is not found.");
116 std::string baseName =
"LAr::TBH62004";
117 std::string H62004MovableName = baseName +
"::MovableTable";
142 GeoBox* H62004MovableShape =
new GeoBox( bttb_x, bttb_y, bttb_z );
143 const GeoLogVol* H62004FrontBeamLogical =
new GeoLogVol( H62004MovableName, H62004MovableShape, Air );
158 log << MSG::INFO <<
"Create Movable Scintillators ..." <<
endmsg;
163 GeoBox* ScintShapeS23 =
new GeoBox(btas_x/2., btas_y/2., btas_z/2.);
164 std::string ScintName = H62004MovableName +
"::Scintillator";
165 GeoLogVol* S1ScintLogical =
new GeoLogVol( ScintName, ScintShapeS1, Scint );
166 GeoLogVol* S23ScintLogical =
new GeoLogVol( ScintName, ScintShapeS23, Scint );
167 GeoIntrusivePtr<GeoPhysVol> S1ScintPhysical =
new GeoPhysVol( S1ScintLogical );
168 GeoIntrusivePtr<GeoPhysVol> S2ScintPhysical =
new GeoPhysVol( S23ScintLogical );
173 for (
unsigned int i = 1;
i <3; ++
i ) {
179 GeoBox* boxH =
new GeoBox(bh_x/2., bh_x/2., btas_z/2.);
180 GeoTubs* tubH =
new GeoTubs(0., bh_d/2., btas_z/2., 0., 2*
M_PI);
181 const GeoShapeSubtraction &shapeHSc = (*boxH).subtract(*tubH);
182 GeoLogVol* logHSc =
new GeoLogVol( ScintName, &shapeHSc, Scint);
183 GeoIntrusivePtr<GeoPhysVol> physHSc =
new GeoPhysVol(logHSc);
188 GeoBox* boxB =
new GeoBox(bb2_x/2., bb2_x/2., (btas_z+2.5*
Gaudi::Units::cm)/2.);
189 GeoLogVol* logBSc =
new GeoLogVol( ScintName, boxB, Scint);
190 GeoIntrusivePtr<GeoPhysVol> physBSc =
new GeoPhysVol(logBSc);
198 log << MSG::INFO <<
" Create MWPC's " <<
endmsg;
201 PVLink MwpcPhysical = MWPC.GetEnvelope();
203 for(
int i = 1;
i < 4; ++
i){
211 log << MSG::INFO <<
" Create BPC 5&6 " <<
endmsg;
213 BPCConstruction BPC(
false);
214 PVLink BPCPhysical = BPC.GetEnvelope();
215 for(
int i=1;
i<3; ++
i) {