5 #ifndef GEO2G4_LARWHEELSLICESOLID_H
6 #define GEO2G4_LARWHEELSLICESOLID_H
7 #ifndef PORTABLE_LAR_SHAPE
11 #include "G4VSolid.hh"
22 #ifdef DEBUG_LARWHEELSLICESOLID
23 #define LWSDBG(a, b) if(Verbose >= a) b
24 #define MSG_VECTOR(v) "(" << v.x() << ", " << v.y() << ", " << v.z() << ")"
32 class G4VGraphicsScene;
37 class G4AffineTransform;
43 #ifndef PORTABLE_LAR_SHAPE
48 typedef enum { Inner, Outer } pos_t;
49 typedef enum { Absorber, Electrode, Glue, Lead } type_t;
62 EInside Inside(
const G4ThreeVector&)
const;
63 G4double DistanceToIn(
const G4ThreeVector&,
64 const G4ThreeVector&)
const;
65 G4double DistanceToIn(
const G4ThreeVector&)
const;
66 G4double DistanceToOut(
const G4ThreeVector&,
68 const G4bool calcNorm =
false,
69 G4bool* validNorm = 0,
70 G4ThreeVector*
n = 0)
const;
71 G4double DistanceToOut(
const G4ThreeVector&)
const;
72 G4ThreeVector SurfaceNormal (
const G4ThreeVector&)
const;
73 G4bool CalculateExtent(
const EAxis,
75 const G4AffineTransform&,
79 void DescribeYourselfTo(G4VGraphicsScene&)
const;
80 G4VisExtent GetExtent()
const;
81 G4Polyhedron* CreatePolyhedron()
const;
84 #ifndef PORTABLE_LAR_SHAPE
85 G4ThreeVector GetPointOnSurface(
void)
const;
86 G4double GetCubicVolume(
void);
87 G4double GetSurfaceArea(
void);
104 G4VSolid* m_BoundingShape{};
106 G4double m_FanHalfThickness{}, m_FHTplusT{}, m_FHTminusT{};
109 G4double m_Xmin{}, m_Xmax{};
115 G4double m_Zmin{}, m_Zmax{}, m_Rmin{}, m_Rmax{};
117 void inner_solid_init(
const G4String &,
size_t slice);
118 void outer_solid_init(
const G4String &,
size_t slice);
119 void fill_zsect(std::vector<G4double> &, G4double zMid = 0.)
const;
121 virtual G4double distance_to_in(G4ThreeVector &,
const G4ThreeVector &,
int)
const;
122 G4double in_iteration_process(
const G4ThreeVector &,
123 G4double, G4ThreeVector &,
int)
const;
124 G4double search_for_nearest_point(
125 const G4ThreeVector &,
const G4double,
126 const G4ThreeVector &,
int
128 G4bool search_for_most_remoted_point(
129 const G4ThreeVector &,
const G4ThreeVector &,
130 G4ThreeVector &,
const int
132 G4double out_iteration_process(
133 const G4ThreeVector &, G4ThreeVector &,
const int
136 #ifndef PORTABLE_LAR_SHAPE
137 EInside Inside_accordion(
const G4ThreeVector&)
const;
138 void get_point_on_accordion_surface(G4ThreeVector &)
const;
139 void get_point_on_polycone_surface(G4ThreeVector &)
const;
140 void get_point_on_flat_surface(G4ThreeVector &)
const;
141 void set_failover_point(G4ThreeVector &
p,
const char *
m = 0)
const;
143 G4double get_area_on_polycone(
void)
const;
144 G4double get_area_on_face(
void)
const;
145 G4double get_area_on_side(
void)
const;
147 G4double get_area_at_r(G4double
r)
const;
148 G4double get_length_at_r(G4double
r)
const;
151 void clean_tests(
void);
152 void init_tests(
void);
157 #ifndef PORTABLE_LAR_SHAPE
158 TF1 *m_f_area, *
m_f_vol, *m_f_area_on_pc, *m_f_length, *m_f_side_area;
168 #ifdef DEBUG_LARWHEELSLICESOLID
169 static const char*
inside(EInside
i)
172 case kInside:
return "inside";
break;
173 case kSurface:
return "surface";
break;
174 case kOutside:
return "outside";
break;
182 G4bool test_dti(
const G4ThreeVector &
p,
183 const G4ThreeVector &
v,
const G4double
distance)
const;
184 G4bool test_dto(
const G4ThreeVector &
p,
185 const G4ThreeVector &
v,
const G4double
distance)
const;
188 G4String TypeStr(
void)
const;
190 void createSolid(
const G4String&
name, G4int zside,
size_t slice,
const EMECData *emecData);
191 inline void check_slice(
size_t size,
size_t slice)
const;
194 #endif // GEO2G4_LARWHEELSLICESOLID_H