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 std::array<G4double,2> zPlane{}, rInner{}, rOuter{};
214 G4double wheel_thickness = zPlane[1] - zPlane[0];
224 m_Ymid = (rInner[0] + rOuter[1]) * 0.5;
232 bs_name +
"Cone", zPlane[0], zPlane[1],
233 rInner[0], rOuter[0], rInner[1], rOuter[1]
238 2, zPlane.data(), rInner.data(), rOuter.data()
241 #ifdef LARWHEELSOLID_USE_FANBOUND
243 FanBound =
new G4Polycone(bs_name +
"ofFan", phi_min, phi_size,
244 2, zPlane, rInner, rOuter);
246 #ifndef PORTABLE_LAR_SHAPE
253 m_Zsect.push_back(sss + half_wave_length * 0.25);
255 for(G4int
i = 2;
i < num_fs;
i ++){
256 const G4double zi = half_wave_length * (
i - 1) + sss;
257 #if LARWHEELSOLID_ZSECT_MULT > 1
268 rInner[0], rInner[1], rOuter[0], rOuter[1],
280 std::array<G4double,3> zPlane{}, rInner{}, rOuter{};
282 G4double wheel_thickness = zPlane[2] - zPlane[0];
285 const G4double phi_min =
290 m_Ymid = (rInner[0] + rOuter[2]) * 0.5;
292 bool hasFrontSections =
false;
293 bool hasBackSections =
false;
302 bs_name +
"FrontCone", zPlane[0], zPlane[1],
303 rInner[0], rOuter[0], rInner[1], rOuter[1]
305 hasFrontSections =
true;
314 bs_name +
"BackCone", zPlane[1], zPlane[2],
315 rInner[1], rOuter[1], rInner[2], rOuter[2]
317 hasBackSections =
true;
323 3, zPlane.data(), rInner.data(), rOuter.data()
325 hasFrontSections =
true;
326 hasBackSections =
true;
331 #ifdef LARWHEELSOLID_USE_FANBOUND
333 FanBound =
new G4Polycone(bs_name +
"ofFan", phi_min, phi_size,
334 3, zPlane, rInner, rOuter);
336 #ifndef PORTABLE_LAR_SHAPE
342 if(hasFrontSections){
344 m_Zsect.push_back(sss + half_wave_length * 0.25);
350 for(G4int
i = 2;
i < num_fs;
i ++){
351 const G4double zi = half_wave_length * (
i - 1) + sss;
352 #if LARWHEELSOLID_ZSECT_MULT > 1
355 if(hasFrontSections && hasBackSections
359 if((zj <
m_Zmid && hasFrontSections)
360 || (zj >
m_Zmid && hasBackSections)){
365 if(hasFrontSections && hasBackSections
369 if((zi <
m_Zmid && hasFrontSections)
370 || (zi >
m_Zmid && hasBackSections)){
375 m_Zsect.push_back(wheel_thickness - sss - half_wave_length * 0.25);
376 m_Zsect.push_back(wheel_thickness);
382 rInner[0], rInner[1], rOuter[0], rOuter[1],