53 UCons(
const std::string& pName,
54 double pRmin1,
double pRmax1,
55 double pRmin2,
double pRmax2,
57 double pSPhi,
double pDPhi);
105 double aPstep = UUtils::kInfinity)
const;
115 std::ostream&
StreamInfo(std::ostream& os)
const;
129 double r2, rl, rh, pPhi, tolRMin, tolRMax;
132 static const double halfRadTolerance = kRadTolerance * 0.5;
133 static const double halfAngTolerance = kAngTolerance * 0.5;
135 if (std::fabs(p.
z) > fDz + halfCarTolerance)
139 else if (std::fabs(p.
z) >= fDz - halfCarTolerance)
148 r2 = p.
x * p.
x + p.
y * p.
y;
149 rl = 0.5 * (fRmin2 * (p.
z + fDz) + fRmin1 * (fDz - p.
z)) / fDz;
150 rh = 0.5 * (fRmax2 * (p.
z + fDz) + fRmax1 * (fDz - p.
z)) / fDz;
154 tolRMin = rl - halfRadTolerance;
159 tolRMax = rh + halfRadTolerance;
161 if ((r2 < tolRMin * tolRMin) || (r2 > tolRMax * tolRMax))
168 tolRMin = rl + halfRadTolerance;
174 tolRMax = rh - halfRadTolerance;
178 if ((r2 < tolRMin * tolRMin) || (r2 >= tolRMax * tolRMax))
183 if (!fPhiFullCone && ((p.
x != 0.0) || (p.
y != 0.0)))
185 pPhi = std::atan2(p.
y, p.
x);
187 if (pPhi < fSPhi - halfAngTolerance)
189 pPhi += 2 * UUtils::kPi;
191 else if (pPhi > fSPhi + fDPhi + halfAngTolerance)
193 pPhi -= 2 * UUtils::kPi;
196 if ((pPhi < fSPhi - halfAngTolerance) ||
197 (pPhi > fSPhi + fDPhi + halfAngTolerance))
204 if ((pPhi < fSPhi + halfAngTolerance) ||
205 (pPhi > fSPhi + fDPhi - halfAngTolerance))
211 else if (!fPhiFullCone)
237 inline double GetDz()
const;
243 double fCubicVolume, fSurfaceArea;
245 inline double Capacity();
246 inline double SurfaceArea();
248 inline void Initialize();
252 inline void CheckSPhiAngle(
double sPhi);
253 inline void CheckDPhiAngle(
double dPhi);
254 inline void CheckPhiAngles(
double sPhi,
double dPhi);
258 inline void InitializeTrigonometry();
271 enum ESide {kNull, kRMin, kRMax, kSPhi, kEPhi, kPZ, kMZ};
275 enum ENorm {kNRMin, kNRMax, kNSPhi, kNEPhi, kNZ};
277 double kRadTolerance, kAngTolerance;
281 double fRmin1, fRmin2, fRmax1, fRmax2, fDz, fSPhi, fDPhi;
285 double sinCPhi, cosCPhi, cosHDPhiOT, cosHDPhiIT,
286 sinSPhi, cosSPhi, sinEPhi, cosEPhi;
292 double secRMin, tanRMin, tanRMax, secRMax;
void SetZHalfLength(double newDz)
double SafetyFromOutside(const UVector3 &p, bool precise) const
virtual void ComputeBBox(UBBox *, bool)
VUSolid::EnumInside Inside(const UVector3 &p) const
void SetOuterRadiusMinusZ(double Rmax1)
UGeometryType GetEntityType() const
std::ostream & StreamInfo(std::ostream &os) const
double DistanceToIn(const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
UCons & operator=(const UCons &rhs)
double SafetyFromInside(const UVector3 &p, bool precise) const
double GetOuterRadiusPlusZ() const
static double Tolerance()
void SetDeltaPhiAngle(double newDPhi)
double GetStartPhiAngle() const
bool Normal(const UVector3 &p, UVector3 &n) const
double GetZHalfLength() const
double GetInnerRadiusPlusZ() const
double GetOuterRadiusMinusZ() const
void Extent(UVector3 &aMin, UVector3 &aMax) const
virtual void GetParametersList(int, double *) const
void SetInnerRadiusPlusZ(double Rmin2)
double GetDeltaPhiAngle() const
std::string UGeometryType
double GetInnerRadiusMinusZ() const
void SetOuterRadiusPlusZ(double Rmax2)
UVector3 GetPointOnSurface() const
void SetInnerRadiusMinusZ(double Rmin1)
void SetStartPhiAngle(double newSPhi, bool trig=true)
double DistanceToOut(const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const