164 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
166 throw std::runtime_error(
"Error in LArDetectorConstructionTBEC, cannot access DetectorStore");
172 if (StatusCode::SUCCESS !=
detStore->retrieve(materialManager, std::string(
"MATERIALS")))
return nullptr;
174 const GeoMaterial *Air = materialManager->
getMaterial(
"std::Air");
175 if (!Air)
throw std::runtime_error(
"Error in LArDetectorConstructionTBEC, std::Air is not found.");
177 const GeoMaterial *Lead = materialManager->
getMaterial(
"std::Lead");
178 if (!Lead)
throw std::runtime_error(
"Error in LArDetectorConstructionTBEC, std::Lead is not found.");
191 std::string baseName =
"LAr::TBEC";
202 std::string tbecMotherName = baseName +
"::MotherVolume";
204 const GeoLogVol* tbecMotherLogical =
new GeoLogVol( tbecMotherName, tbecMotherShape, Air );
205 GeoIntrusivePtr<GeoFullPhysVol> tbecMotherPhysical =
new GeoFullPhysVol( tbecMotherLogical );
224 std::string XAxisName = baseName +
"::XAxis";
225 const GeoLogVol* XAxisLogical =
new GeoLogVol( XAxisName, axisShape, Air );
226 GeoIntrusivePtr<GeoPhysVol> XAxisPhysVol =
new GeoPhysVol( XAxisLogical );
228 tbecMotherPhysical->add(
new GeoIdentifierTag( 1 ) );
230 tbecMotherPhysical->add( XAxisPhysVol );
233 std::string YAxisName = baseName +
"::YAxis";
234 const GeoLogVol* YAxisLogical =
new GeoLogVol( YAxisName, axisShape, Air );
235 GeoIntrusivePtr<GeoPhysVol> YAxisPhysVol =
new GeoPhysVol( YAxisLogical );
237 tbecMotherPhysical->add(
new GeoIdentifierTag( 1 ) );
239 tbecMotherPhysical->add( YAxisPhysVol );
242 std::string ZAxisName = baseName +
"::ZAxis";
243 const GeoLogVol* ZAxisLogical =
new GeoLogVol( ZAxisName, axisShape, Air );
244 GeoIntrusivePtr<GeoPhysVol> ZAxisPhysVol =
new GeoPhysVol( ZAxisLogical );
246 tbecMotherPhysical->add(
new GeoIdentifierTag( 1 ) );
247 tbecMotherPhysical->add(
new GeoTransform( GeoTrf::TranslateZ3D( axisZHalfLength ) ) );
248 tbecMotherPhysical->add( ZAxisPhysVol );
254 std::string CompensatorName = baseName +
"::LeadCompensator";
256 const GeoLogVol* CompensatorLogical =
new GeoLogVol( CompensatorName, CompensatorShape, Lead );
257 GeoIntrusivePtr<GeoPhysVol> CompensatorPhysical =
new GeoPhysVol( CompensatorLogical );
259 tbecMotherPhysical->add(
new GeoIdentifierTag( 1 ) );
263 GeoTrf::Translate3D tmpxf1(tmpvec1Rotated.x(),tmpvec1Rotated.y(),tmpvec1Rotated.z());
264 tbecMotherPhysical->add(
new GeoTransform( tmpxf1 * GeoTrf::RotateY3D(
m_eta_pos)));
265 tbecMotherPhysical->add( CompensatorPhysical );
270 CryostatConstructionTBEC cryoConstruction;
271 GeoIntrusivePtr<GeoVFullPhysVol> cryoPhys = cryoConstruction.GetEnvelope();
272 GeoIntrusivePtr<GeoPhysVol> LArPhysical = cryoConstruction.GetLArPhysical();
274 tbecMotherPhysical->add(
new GeoIdentifierTag( 1 ) );
277 GeoTrf::Translate3D tmpxf2(tmpvec2Rotated.x(),tmpvec2Rotated.y(),tmpvec2Rotated.z());
278 tbecMotherPhysical->add(
new GeoTransform( tmpxf2 * GeoTrf::RotateY3D(
m_eta_pos)));
279 tbecMotherPhysical->add( cryoPhys );
288 GeoBox* BeamCShape =
new GeoBox( beamCSize, beamCSize, beamCTh );
289 for (
int i = 0;
i < 4;
i++ ) {
290 std::string BeamCName = baseName +
"::BeamChamber";
291 BeamCName+=
char(
i ) +
'0';
292 GeoLogVol* BeamCLogical =
new GeoLogVol( BeamCName, BeamCShape, Air );
293 GeoIntrusivePtr<GeoPhysVol> BeamCPhysical =
new GeoPhysVol( BeamCLogical );
295 tbecMotherPhysical->add(
new GeoIdentifierTag( 1 ) );
297 tbecMotherPhysical->add( BeamCPhysical );
309 EMECConstruction emecModuleConstruction(
true,
true,
true );
310 GeoIntrusivePtr<GeoFullPhysVol>emecEnvelope= (GeoIntrusivePtr<GeoFullPhysVol>) emecModuleConstruction.GetEnvelope();
313 if(!
status.isSuccess())
throw std::runtime_error (
"Cannot store EMEC_POS");
320 LArPhysical->add(
new GeoIdentifierTag( 1 ) );
322 LArPhysical->add( emecEnvelope );
330 GeoIntrusivePtr<GeoFullPhysVol> PresamplerEnvelope = PresamplerConstruction.Envelope();
334 if(!
status.isSuccess())
throw std::runtime_error (
"Cannot store PRESAMPLER_EC_POS");
338 LArPhysical->add(
new GeoIdentifierTag( 1 ) );
340 LArPhysical->add( PresamplerEnvelope );
344 return tbecMotherPhysical;