7 #include "GeoModelKernel/GeoMaterial.h"
8 #include "GeoModelKernel/GeoBox.h"
9 #include "GeoModelKernel/GeoPcon.h"
10 #include "GeoModelKernel/GeoTube.h"
11 #include "GeoModelKernel/GeoTubs.h"
12 #include "GeoModelKernel/GeoTrd.h"
13 #include "GeoModelKernel/GeoCons.h"
14 #include "GeoModelKernel/GeoLogVol.h"
15 #include "GeoModelKernel/GeoShapeShift.h"
16 #include "GeoModelKernel/GeoShapeIntersection.h"
17 #include "GeoModelKernel/GeoShapeSubtraction.h"
18 #include "GeoModelKernel/GeoNameTag.h"
19 #include "GeoModelKernel/GeoPhysVol.h"
20 #include "GeoModelKernel/GeoFullPhysVol.h"
21 #include "GeoModelKernel/GeoVFullPhysVol.h"
22 #include "GeoModelKernel/GeoTransform.h"
23 #include "GeoModelKernel/GeoSerialDenominator.h"
24 #include "GeoModelKernel/GeoSerialIdentifier.h"
25 #include "GeoModelKernel/GeoAlignableTransform.h"
26 #include "GeoModelKernel/GeoSerialTransformer.h"
27 #include "GeoModelKernel/GeoIdentifierTag.h"
28 #include "GeoModelKernel/GeoShapeUnion.h"
29 #include "GeoModelKernel/GeoDefinitions.h"
30 #include "GeoModelKernel/Units.h"
31 #include "GeoGenericFunctions/AbsFunction.h"
32 #include "GeoGenericFunctions/Variable.h"
33 #include "GeoGenericFunctions/Sin.h"
34 #include "GeoGenericFunctions/Cos.h"
39 #include "GaudiKernel/MsgStream.h"
40 #include "GaudiKernel/Bootstrap.h"
41 #include "GaudiKernel/SystemOfUnits.h"
54 ISvcLocator* svcLocator = Gaudi::svcLocator();
55 if (svcLocator->service(
"DetectorStore",
m_detectorStore,
false )==StatusCode::FAILURE) {
56 throw std::runtime_error(
"Error in ModulesConstruction, cannot access DetectorStore");
66 if (StatusCode::SUCCESS != m_detectorStore->retrieve(materialManager, std::string(
"MATERIALS"))) {
67 throw std::runtime_error(
"Error in ModulesConstruction, cannot access Material manager");
70 if (m_WarmTCPhys)
return (m_WarmTCPhys);
71 ISvcLocator *svcLocator = Gaudi::svcLocator();
73 if (svcLocator->service(
"MessageSvc",
msgSvc,
true )==StatusCode::FAILURE) {
74 throw std::runtime_error(
"Error in WarmTCConstructionH62004, cannot access MessageSvc");
76 MsgStream
log(
msgSvc,
"WarmTCConstructionH62004");
97 double x_m = WTC_high / 2;
98 double y_m = WTC_high / 2;
104 double Fe_x = WTC_high / 2;
105 double Fe_y = WTC_high / 2;
110 double x_x = 6 * WTC_sci_x / 2;
112 double x_y = WTC_sci_y / 2;
116 double y_x = WTC_sci_y / 2;
117 double y_y = 6 * WTC_sci_x / 2;
121 double z_s = WTC_sci_z / 2;
126 double z_x[3], z_y[3], z_Fe[4];
127 z_x[0] = -
z_m + Muon_dist + Muon_z + z_s;
136 z_x[2] = z_Fe[0] - Fe_z + WTC_len;
149 const GeoElement* elH = materialManager->
getElement(
"Hydrogen");
150 const GeoElement* elC = materialManager->
getElement(
"Carbon");
153 const GeoMaterial* Iron = materialManager->
getMaterial(
"std::Iron");
154 const GeoMaterial *Air = materialManager->
getMaterial(
"std::Air");
157 GeoMaterial* Scintillator=
new GeoMaterial(
"Scintillator",density);
158 Scintillator->add(elC,0.9147);
159 Scintillator->add(elH,0.0853);
160 Scintillator->lock();
166 std::string mname = std::string(
"WarmTC_Mother");
167 GeoBox *wtc_box =
new GeoBox(x_m,y_m,
z_m);
168 GeoLogVol *wtc_log =
new GeoLogVol(mname,wtc_box,Air);
170 m_WarmTCPhys =
new GeoFullPhysVol(wtc_log);
172 std::string
tag = std::string(
"WARMTC_POS");
174 status=m_detectorStore->record(sPhysVol,
tag);
175 if(!
status.isSuccess())
throw std::runtime_error ((std::string(
"Cannot store ")+
tag).c_str());
180 std::string muname =
"LAr::WarmTC::MuonWall";
181 GeoBox *mu_box =
new GeoBox(Muon_x/2, Muon_y/2, Muon_z/2);
182 GeoLogVol *mu_log =
new GeoLogVol(muname, mu_box, Scintillator);
183 GeoIntrusivePtr<GeoPhysVol>mu_phys =
new GeoPhysVol(mu_log);
184 for(
int i=1;
i<=3; ++
i) {
186 n =
pow(-1,
i) * Muon_z/2 -
z_m + Muon_z;
188 m_WarmTCPhys->add(
new GeoSerialIdentifier(6-
i));
190 m_WarmTCPhys->add(mu_phys);
192 n =
pow(-1,
i+1) * Muon_z/2 -
z_m + Muon_z;
193 m_WarmTCPhys->add(
new GeoSerialIdentifier(5+
i));
195 m_WarmTCPhys->add(mu_phys);
202 std::string
aname =
"LAr::WarmTC::Absorber";
203 GeoBox *Fe_box =
new GeoBox(Fe_x,Fe_y,Fe_z);
204 GeoLogVol *Fe_log =
new GeoLogVol(
aname,Fe_box,Iron);
205 GeoIntrusivePtr<GeoPhysVol>Fe_phys =
new GeoPhysVol(Fe_log);
207 for(
int i=0;
i<4;
i++) {
208 m_WarmTCPhys->add(
new GeoSerialIdentifier(
i+1));
210 m_WarmTCPhys->add(Fe_phys);
216 std::string sname =
"LAr::WarmTC::Sci";
217 GeoBox *X_box =
new GeoBox(x_x,x_y,z_s);
218 GeoLogVol *X_log =
new GeoLogVol(sname+
"::X", X_box,Scintillator);
219 GeoIntrusivePtr<GeoPhysVol>X_phys =
new GeoPhysVol(X_log);
221 for(
int i=0;
i<3;
i++) {
222 m_WarmTCPhys->add(
new GeoSerialIdentifier(
i+1));
224 m_WarmTCPhys->add(X_phys);
230 sname =
"LAr::WarmTC::Sci";
231 GeoBox *Y_box =
new GeoBox(y_x,y_y,z_s);
232 GeoLogVol *Y_log =
new GeoLogVol(sname+
"::Y", Y_box,Scintillator);
233 GeoIntrusivePtr<GeoPhysVol>Y_phys =
new GeoPhysVol(Y_log);
235 for(
int i=0;
i<3;
i++) {
236 m_WarmTCPhys->add(
new GeoSerialIdentifier(
i+1));
238 m_WarmTCPhys->add(Y_phys);
241 std::cout<<
"About to return WarmTC PhysVol"<<std::endl;