58 ISvcLocator *svcLocator = Gaudi::svcLocator();
61 if (svcLocator->service(
"DetectorStore", detectorStore,
false )==StatusCode::FAILURE) {
62 throw std::runtime_error(
"Error in ModulesConstruction, cannot access DetectorStore");
65 if (StatusCode::SUCCESS != detectorStore->
retrieve(materialManager, std::string(
"MATERIALS"))) {
70 const GeoElement *elH = materialManager->
getElement(
"Hydrogen");
71 if (!elH)
throw std::runtime_error(
"Error in ExcluderConstruction, Hydrogen is not found.");
73 const GeoElement *elC = materialManager->
getElement(
"Carbon");
74 if (!elC)
throw std::runtime_error(
"Error in ExcluderConstruction, Carbon is not found.");
76 const GeoElement* elN = materialManager->
getElement(
"Nitrogen");
77 if (!elN)
throw std::runtime_error(
"Error in ExcluderConstruction, Nitrogen is not found.");
79 const GeoElement *elO = materialManager->
getElement(
"Oxygen");
80 if (!elO)
throw std::runtime_error(
"Error in ExcluderConstruction, Oxygen is not found.");
82 const GeoMaterial*
LAr = materialManager->
getMaterial(
"std::LiquidArgon");
83 if (!
LAr)
throw std::runtime_error(
"Error in ExcluderConstruction, std::LiquidArgon is not found.");
85 const GeoMaterial* Fe = materialManager->
getMaterial(
"std::Iron");
86 if (!Fe)
throw std::runtime_error(
"Error in ExcluderConstruction, std::Iron is not found.");
88 const GeoMaterial* Cu = materialManager->
getMaterial(
"std::Copper");
89 if (!Cu)
throw std::runtime_error(
"Error in ExcluderConstruction, std::Copper is not found.");
97 const GeoElement*
C=materialManager->
getElement(
"Carbon");
98 const GeoElement*
H=materialManager->
getElement(
"Hydrogen");
99 const GeoElement*
O=materialManager->
getElement(
"Oxygen");
100 const GeoElement*
N=materialManager->
getElement(
"Nitrogen");
102 Rohacell->add(C,0.6465);
103 Rohacell->add(H,0.07836);
104 Rohacell->add(O,0.19137);
105 Rohacell->add(
N,0.08377);
124 GeoLogVol* logicEx =
nullptr;
125 GeoIntrusivePtr<GeoVFullPhysVol> physiEx =
nullptr;
161 const int zplanes = 2;
162 const double rmin[zplanes] = {
Rmin,
Rmin};
163 const double rmin_2[zplanes] = {Rmin_2,Rmin_2};
164 const double rmax[zplanes] = {Rmax,Rmax};
165 const double zcoord[2*zplanes] = {-Zall/2., -Zall/2.+Zfront, Zall/2.-Zback, Zall/2.};
169 fEx =
new GeoPcon(-(alpha-delta),2*(alpha-delta));
170 for(
int i=0;
i<zplanes; ++
i) {
171 fEx->addPlane(zcoord[
i],rmin[
i],rmax[
i]);
179 mEx =
new GeoPcon(-(alpha+
beta),2*(alpha+
beta));
180 for(
int i=0;
i<zplanes; ++
i) {
181 mEx->addPlane(zcoord[
i+1],rmin[
i],rmax[
i]);
189 bEx =
new GeoPcon(-(alpha+
beta),2*(alpha+
beta));
190 for(
int i=0;
i<zplanes; ++
i) {
191 bEx->addPlane(zcoord[
i+2],rmin_2[
i],rmax[
i]);
203 const GeoShapeUnion & usf = (*fEx).add(*mEx<<rot);
204 const GeoShapeUnion & usf1 = usf.add(*bEx<<rot);
205 logicEx =
new GeoLogVol(
"LArGeoTB::EMEC::Excluder",&usf1,Rohacell);
222 double Rmax_1 = Rmax - 2.*Zall*
tan(bepo_Beta);
225 GeoCons *tEx =
new GeoCons(0.,0.,Rmax,Rmax_1,Zall,0.,
M_PI);
226 GeoBox *box =
new GeoBox(Yall,Xall,Zall);
227 GeoTrf::RotateX3D Rot(bepo_Beta);
230 const GeoShapeIntersection &is = (*tEx).intersect(*box<<
offset);
232 GeoTrf::Transform3D Rot1 = GeoTrf::RotateX3D(bepo_Beta) * GeoTrf::RotateZ3D(bepo_ty) * GeoTrf::RotateY3D(bepo_ty);
236 const GeoShapeUnion &us = is.add(*pEx<<offset1);
237 std::string bExName =
"LArGeoTB::FCAL::Excluder";
238 logicEx =
new GeoLogVol(bExName, &us,Rohacell);
256 GeoTubs *tEx =
new GeoTubs(0.,Rmax,Zall,-
angle/2.,
angle);
257 GeoPara *box =
new GeoPara(Xall,Yall,1.1*Zall,0.,-bepo_Beta,0.);
260 const GeoShapeSubtraction &is = (*tEx).subtract((*box)<<(
offset));
262 std::string FrontExName =
"LArGeoTB::Front::Excluder";
263 logicEx =
new GeoLogVol(FrontExName,&is,Rohacell);
278 GeoTubs *tEx =
new GeoTubs(0.,Rmax,Zall,0.,
angle);
279 GeoBox *box =
new GeoBox(Xall,Yall,1.1*Zall);
280 GeoTrf::RotateZ3D Rot(
angle/2.);
283 const GeoShapeSubtraction &is = (*tEx).subtract((*box)<<(
offset));
284 std::string BackExName =
"LArGeoTB::Back::Excluder";
285 logicEx =
new GeoLogVol(BackExName,&is,Rohacell);
292 physiEx =
new GeoFullPhysVol(logicEx);