5 #ifndef GEO2G4_LARWHEELSOLID_H
6 #define GEO2G4_LARWHEELSOLID_H
7 #ifndef PORTABLE_LAR_SHAPE
11 #include "G4VSolid.hh"
23 #define LARWHEELSOLID_USE_BS_DTO
26 #define LARWHEELSOLID_ZSECT_MULT 1
34 #ifdef DEBUG_LARWHEELSOLID
35 #define LWSDBG(a, b) if(Verbose >= a) b
36 #define MSG_VECTOR(v) "(" << v.x() << ", " << v.y() << ", " << v.z() << ")"
44 class G4VGraphicsScene;
49 class G4AffineTransform;
91 #ifndef PORTABLE_LAR_SHAPE
105 EInside Inside(
const G4ThreeVector&)
const;
106 G4double DistanceToIn(
const G4ThreeVector&,
107 const G4ThreeVector&)
const;
108 G4double DistanceToIn(
const G4ThreeVector&)
const;
109 G4double DistanceToOut(
const G4ThreeVector&,
110 const G4ThreeVector&,
111 const G4bool calcNorm =
false,
112 G4bool* validNorm = 0,
113 G4ThreeVector*
n = 0)
const;
114 G4double DistanceToOut(
const G4ThreeVector&)
const;
115 G4ThreeVector SurfaceNormal (
const G4ThreeVector&)
const;
116 G4bool CalculateExtent(
const EAxis,
117 const G4VoxelLimits&,
118 const G4AffineTransform&,
121 G4GeometryType GetEntityType()
const;
122 void DescribeYourselfTo(G4VGraphicsScene&)
const;
123 G4VisExtent GetExtent()
const;
124 G4Polyhedron* CreatePolyhedron()
const;
133 #ifndef PORTABLE_LAR_SHAPE
134 G4ThreeVector GetPointOnSurface(
void)
const;
135 G4double GetCubicVolume(
void);
136 G4double GetSurfaceArea(
void);
155 #ifdef LARWHEELSOLID_USE_FANBOUND
156 G4VSolid* m_FanBound;
173 void inner_solid_init(
const G4String &);
174 void outer_solid_init(
const G4String &);
175 void set_phi_size(
void);
177 virtual G4double distance_to_in(G4ThreeVector &,
178 const G4ThreeVector &,
int)
const;
179 G4double in_iteration_process(
const G4ThreeVector &,
180 G4double, G4ThreeVector &,
int)
const;
181 G4double search_for_nearest_point(
const G4ThreeVector &,
const G4double,
182 const G4ThreeVector &,
int)
const;
183 G4bool search_for_most_remoted_point(
const G4ThreeVector &,
184 const G4ThreeVector &,
185 G4ThreeVector &,
const int)
const;
186 G4double out_iteration_process(
const G4ThreeVector &,
187 G4ThreeVector &,
const int)
const;
194 FanBoundExit_t find_exit_point(
const G4ThreeVector &
p,
195 const G4ThreeVector &
v,
196 G4ThreeVector &
q)
const;
197 G4bool fs_cross_lower(
const G4ThreeVector &
p,
const G4ThreeVector &
v,
198 G4ThreeVector &
q)
const;
199 G4bool fs_cross_upper(
const G4ThreeVector &
p,
const G4ThreeVector &
v,
200 G4ThreeVector &
q)
const;
201 G4bool check_D(G4double &
b,
202 G4double
A, G4double
B, G4double
C, G4bool)
const;
204 G4int select_section(
const G4double &
Z)
const;
206 #ifndef PORTABLE_LAR_SHAPE
207 EInside Inside_accordion(
const G4ThreeVector&)
const;
208 void get_point_on_accordion_surface(G4ThreeVector &)
const;
209 void get_point_on_polycone_surface(G4ThreeVector &)
const;
210 void get_point_on_flat_surface(G4ThreeVector &)
const;
211 void set_failover_point(G4ThreeVector &
p,
const char *
m = 0)
const;
213 G4double get_area_on_polycone(
void)
const;
214 G4double get_area_on_face(
void)
const;
215 G4double get_area_on_side(
void)
const;
217 G4double get_area_at_r(G4double
r)
const;
218 G4double get_length_at_r(G4double
r)
const;
221 void clean_tests(
void);
222 void init_tests(
void);
227 TF1 *m_f_area, *
m_f_vol, *m_f_area_on_pc, *m_f_length, *m_f_side_area;
236 #ifdef DEBUG_LARWHEELSOLID
237 static const char*
inside(EInside
i)
240 case kInside:
return "inside";
break;
241 case kSurface:
return "surface";
break;
242 case kOutside:
return "outside";
break;
250 #ifndef PORTABLE_LAR_SHAPE
251 G4bool test_dti(
const G4ThreeVector &
p,
252 const G4ThreeVector &
v,
const G4double
distance)
const;
253 G4bool test_dto(
const G4ThreeVector &
p,
254 const G4ThreeVector &
v,
const G4double
distance)
const;
261 #endif // GEO2G4_LARWHEELSOLID_H