154 throw std::runtime_error(
"Error in ModulesConstruction, cannot access Material manager");
158 ISvcLocator *svcLocator = Gaudi::svcLocator();
160 if (svcLocator->service(
"MessageSvc",
msgSvc,
true )==StatusCode::FAILURE) {
161 throw std::runtime_error(
"Error in ModulesConstructionH62004, cannot access MessageSvc");
163 MsgStream
log(
msgSvc,
"ModulesConstructionH62004");
165 log <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
166 log <<
"+ +" << std::endl;
167 log <<
"+ Start of H62004 GeoModel definition +" << std::endl;
168 log <<
"+ +" << std::endl;
169 log <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
171 const GeoMaterial *
LAr = materialManager->
getMaterial(
"std::LiquidArgon");
172 if (!
LAr)
throw std::runtime_error(
"Error in ModulesConstruction, std::LiquidArgon is not found.");
181 const GeoElement*
C=materialManager->
getElement(
"Carbon");
182 const GeoElement*
H=materialManager->
getElement(
"Hydrogen");
183 const GeoElement*
O=materialManager->
getElement(
"Oxygen");
184 const GeoElement*
N=materialManager->
getElement(
"Nitrogen");
186 Rohacell->add(C,0.6465);
187 Rohacell->add(H,0.07836);
188 Rohacell->add(O,0.19137);
189 Rohacell->add(
N,0.08377);
199 const GeoMaterial *Alu = materialManager->
getMaterial(
"std::Aluminium");
200 if (!Alu)
throw std::runtime_error(
"Error in ModulesConstruction, std::Aluminium is not found.");
220 double bepo_y_ex = bcry_rlar-bepo_excluder_shift;
230 double bepo_y_e = bcry_rlar-bepo_emec_shift;
233 std::string baseName =
"LArGeoTB::LeakageDet::";
241 GeoTubs *shapeMother =
new GeoTubs( 0.0*
Gaudi::Units::cm, bcry_rlar, ylen, bcry_phistart,bcry_phiend);
242 GeoLogVol *logMother =
new GeoLogVol(baseName +
"LAr", shapeMother,
LAr);
246 std::string
tag = std::string(
"MODULES_POS");
250 if(!
status.isSuccess())
throw std::runtime_error ((std::string(
"Cannot store")+
tag).c_str());
277 ExcluderConstructionH62004 excluder(0);
280 GeoIntrusivePtr<GeoVFullPhysVol> excluderEnvelope = excluder.GetEnvelope();
282 GeoTrf::Transform3D rot2 = GeoTrf::RotateX3D(bepo_Beta) * GeoTrf::RotateX3D(bepo_ty) * GeoTrf::RotateZ3D(bepo_tz);
293 ExcluderConstructionH62004 fcexcluder(1);
296 GeoIntrusivePtr<GeoVFullPhysVol> fcexcluderEnvelope = fcexcluder.GetEnvelope();
297 if(fcexcluderEnvelope ){
298 GeoTrf::Transform3D rot2 = GeoTrf::RotateX3D(0.8*bepo_Beta) * GeoTrf::RotateX3D(-bepo_ty) * GeoTrf::RotateZ3D(bepo_tx);
309 ExcluderConstructionH62004 frontexcluder(2);
312 GeoIntrusivePtr<GeoVFullPhysVol> frontexcluderEnvelope = frontexcluder.GetEnvelope();
313 if(frontexcluderEnvelope ){
334 ExcluderConstructionH62004 backexcluder(3);
337 GeoIntrusivePtr<GeoVFullPhysVol> backexcluderEnvelope = backexcluder.GetEnvelope();
338 if(backexcluderEnvelope ){
362 GeoTrf::Transform3D rota = GeoTrf::RotateX3D(bepo_Beta) * GeoTrf::RotateX3D(bepo_ty) * GeoTrf::RotateZ3D(-bepo_pz);
375 GeoTrf::RotateZ3D MrotEmec(bepo_tz_e);
381 , (bepo_x_e + bepo_y_emecshift )/2./
sin(bepo_tz_e)
388 EMECModuleConstruction emecConstruction(
true,
true,
false);
390 GeoIntrusivePtr<GeoVFullPhysVol> emecEnvelope = emecConstruction.GetEnvelope();
393 m_ModulesPhys->add(
new GeoTransform( pos3Emec * MrotEmec ));
402 HECConstructionH62004 hec;
404 PVLink hecEnvelope = hec.GetEnvelope();
418 m_ModulesPhys->add(
new GeoTransform(GeoTrf::Translate3D((bepo_x - bepo_y_hecshift)/2./
sin(bepo_tz_e)
419 , (bepo_x + bepo_y_hecshift)/2./
sin(bepo_tz_e)
420 , HECzStart-EMECzStart)) );
429 FCALConstructionH62004 fcal;
432 PVLink fcalEnvelope = fcal.GetEnvelope();
443 ,FCALzStart-EMECzStart+(FCALzEnd-FCALzStart)/2.)) );
473 GeoBox* Box1 =
new GeoBox(box_x, box_y, box_z);
474 double alpha = acos(box_x/tub_r);
475 double ax =
M_PI - 2*alpha;
476 GeoTubs* Tub=
new GeoTubs(0., tub_r, box_z, alpha,
ax);
479 GeoTrf::Translate3D TubTrans(0.,btot-box_y-tub_r,0.);
480 const GeoShapeUnion &uSolid = (*Box1).add((*Tub)<<TubTrans);
482 GeoTubs* Tub1 =
new GeoTubs(tub_r, tub_r+tub1_dr, tub1_z, alpha,
ax);
487 const GeoShapeUnion &uSolid2 = uSolid.add((*Tub1)<<UnTrans);
489 GeoCons*
Cone =
new GeoCons(cyl_r2, cyl_r1, cyl_r2+cyl_dr, cyl_r1+cyl_dr, cyl_z,
M_PI/4.,
M_PI/2.);
496 const GeoShapeUnion &uSolid3 = uSolid2.add((*Cone)<<CylTrans);
498 GeoLogVol* Cnose =
new GeoLogVol(
"LArGeoTB::LeakageDet::ColdNose", &uSolid3 , Alu);
499 GeoIntrusivePtr<GeoPhysVol>PhysCnose =
new GeoPhysVol(Cnose);