12#include "CLHEP/Units/PhysicalConstants.h"
13#include "G4GeometryTolerance.hh"
14#include "G4Polycone.hh"
21#ifdef DEBUG_LARWHEELSOLID
22G4int 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;
189 for(
size_t i = 0; i <
m_Zsect.size(); ++ i){
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],
#define LARWHEELSOLID_ZSECT_MULT
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
This class separates some of the geometry details of the LAr endcap.
double GetFanStepOnPhi() const
int GetNumberOfHalfWaves() const
double GetFanHalfThickness(LArG4::LArWheelCalculator_t) const
double GetHalfWaveLength() const
double GetStraightStartSection() const
double GetWheelThickness() const
double GetWheelInnerRadius(std::array< double, 2 > &rInner) const
static const char * LArWheelCalculatorTypeString(LArG4::LArWheelCalculator_t)
void GetWheelOuterRadius(std::array< double, 2 > &rOuter) const
LArWheelCalculator * m_Calculator
void outer_solid_init(const G4String &)
static const G4double s_IterationPrecision2
const LArWheelSolid_t m_Type
static const G4double s_IterationPrecision
static const G4double s_Tolerance
LArWheelSolid(const G4String &name, LArWheelSolid_t type, G4int zside=1, LArWheelCalculator *calc=0, const EMECData *emecData=0)
std::vector< G4double > m_Zsect
G4VSolid * m_BoundingShape
static const unsigned int s_IterationsLimit
G4int m_Zsect_start_search
static const G4double s_AngularTolerance
G4double m_FanPhiAmplitude
const G4double m_PhiPosition
void inner_solid_init(const G4String &)
G4double m_FanHalfThickness
const LArWheelCalculator * GetCalculator(void) const