12 #include "CLHEP/Units/PhysicalConstants.h"
13 #include "G4GeometryTolerance.hh"
14 #include "G4Polycone.hh"
21 #ifdef DEBUG_LARWHEELSOLID
22 G4int LArWheelSolid::Verbose = 0;
38 #ifndef PORTABLE_LAR_SHAPE
43 #ifndef PORTABLE_LAR_SHAPE
44 #ifdef LARWHEELSOLID_USE_FANBOUND
47 ATH_MSG_INFO (
"compiled with private find_exit_point" );
126 G4Exception(
"LArWheelSolid",
"UnknownSolidType", FatalException,
127 "Constructor: unknown LArWheelSolid_t");
132 const G4String bs_name =
name +
"-Bounding";
133 #ifdef DEBUG_LARWHEELSOLID
134 const char *venv =
getenv(
"LARWHEELSOLID_VERBOSE");
135 if(venv) Verbose =
atoi(venv);
136 std::cout <<
"The LArWheelSolid build " << __DATE__ <<
" " << __TIME__
138 std::cout <<
"LArWheelSolid verbosity level is " << Verbose << std::endl;
175 G4Exception(
"LArWheelSolid",
"UnknownSolidType", FatalException,
176 "Constructor: unknown LArWheelSolid_t");
180 #ifndef PORTABLE_LAR_SHAPE
186 #ifdef DEBUG_LARWHEELSOLID
188 std::cout <<
"Limits: (" <<
m_Zsect.size() <<
")" << std::endl;
190 std::cout <<
i <<
" " <<
m_Zsect[
i] << std::endl;
193 #ifndef PORTABLE_LAR_SHAPE
212 G4double zPlane[2], rInner[2], rOuter[2];
215 G4double wheel_thickness = zPlane[1] - zPlane[0];
225 m_Ymid = (rInner[0] + rOuter[1]) * 0.5;
233 bs_name +
"Cone", zPlane[0], zPlane[1],
234 rInner[0], rOuter[0], rInner[1], rOuter[1]
239 2, zPlane, rInner, rOuter
242 #ifdef LARWHEELSOLID_USE_FANBOUND
244 FanBound =
new G4Polycone(bs_name +
"ofFan", phi_min, phi_size,
245 2, zPlane, rInner, rOuter);
247 #ifndef PORTABLE_LAR_SHAPE
254 m_Zsect.push_back(sss + half_wave_length * 0.25);
256 for(G4int
i = 2;
i < num_fs;
i ++){
257 const G4double zi = half_wave_length * (
i - 1) + sss;
258 #if LARWHEELSOLID_ZSECT_MULT > 1
269 rInner[0], rInner[1], rOuter[0], rOuter[1],
281 G4double zPlane[3], rInner[3], rOuter[3];
284 G4double wheel_thickness = zPlane[2] - zPlane[0];
287 const G4double phi_min =
292 m_Ymid = (rInner[0] + rOuter[2]) * 0.5;
294 bool hasFrontSections =
false;
295 bool hasBackSections =
false;
304 bs_name +
"FrontCone", zPlane[0], zPlane[1],
305 rInner[0], rOuter[0], rInner[1], rOuter[1]
307 hasFrontSections =
true;
316 bs_name +
"BackCone", zPlane[1], zPlane[2],
317 rInner[1], rOuter[1], rInner[2], rOuter[2]
319 hasBackSections =
true;
325 3, zPlane, rInner, rOuter
327 hasFrontSections =
true;
328 hasBackSections =
true;
333 #ifdef LARWHEELSOLID_USE_FANBOUND
335 FanBound =
new G4Polycone(bs_name +
"ofFan", phi_min, phi_size,
336 3, zPlane, rInner, rOuter);
338 #ifndef PORTABLE_LAR_SHAPE
344 if(hasFrontSections){
346 m_Zsect.push_back(sss + half_wave_length * 0.25);
352 for(G4int
i = 2;
i < num_fs;
i ++){
353 const G4double zi = half_wave_length * (
i - 1) + sss;
354 #if LARWHEELSOLID_ZSECT_MULT > 1
357 if(hasFrontSections && hasBackSections
361 if((zj <
m_Zmid && hasFrontSections)
362 || (zj >
m_Zmid && hasBackSections)){
367 if(hasFrontSections && hasBackSections
371 if((zi <
m_Zmid && hasFrontSections)
372 || (zi >
m_Zmid && hasBackSections)){
377 m_Zsect.push_back(wheel_thickness - sss - half_wave_length * 0.25);
378 m_Zsect.push_back(wheel_thickness);
384 rInner[0], rInner[1], rOuter[0], rOuter[1],