170      Error(
"ComputeBBox", 
"Shape %s hyperbolic surfaces are malformed: rin=%g, stin=%g, rout=%g, stout=%g", 
GetName(),
 
 
  185   Double_t rsq = point[0] * point[0] + point[1] * point[1];
 
  193   if (i == 0 || 
r < 1.E-10) {
 
  210   if (
norm[0] * dir[0] + 
norm[1] * dir[1] + 
norm[2] * dir[2] < 0) {
 
 
  224   Double_t r2 = point[0] * point[0] + point[1] * point[1];
 
 
  262      sz = (
fDz - point[2]) / dir[2];
 
  267         sz = -(
fDz + point[2]) / dir[2];
 
 
  312      if ((point[2] * dir[2]) < 0) {
 
  316         xi = point[0] + 
sz * dir[0];
 
  317         yi = point[1] + 
sz * dir[1];
 
  334      zi = point[2] + s[0] * dir[2];
 
  337      else if (
npos == 2) {
 
  338         zi = point[2] + s[1] * dir[2];
 
  345      zi = point[2] + s[0] * dir[2];
 
  348      else if (
npos == 2) {
 
  349         zi = point[2] + s[1] * dir[2];
 
 
  373   Double_t a = dir[0] * dir[0] + dir[1] * dir[1] - 
t0 * dir[2] * dir[2];
 
  374   Double_t b = 
t0 * point[2] * dir[2] - point[0] * dir[0] - point[1] * dir[1];
 
  375   Double_t c = point[0] * point[0] + point[1] * point[1] - 
t0 * point[2] * point[2] - 
r0 * 
r0;
 
 
  424   Error(
"Divide", 
"Hyperboloids cannot be divided. Division volume %s not created", 
divname);
 
 
  463   param[0] *= param[0];
 
  465   param[1] *= param[1];
 
 
  481      mother->GetAxisRange(3, zmin, zmax);
 
  486      Error(
"GetMakeRuntimeShape", 
"Shape %s does not have negative Z range", 
GetName());
 
 
  505   printf(
" Bounding box:\n");
 
 
  583      for (i = 0; i < 
n; i++) {
 
  584         for (
j = 0; 
j < 
n; 
j++) {
 
  592      for (i = 0; i < 
n - 1; i++) {
 
  593         for (
j = 0; 
j < 
n; 
j++) {
 
  602   for (i = 0; i < 
n; i++) {
 
  603      for (
j = 0; 
j < 
n; 
j++) {
 
  611   for (i = 0; i < 
n - 1; i++) {
 
  612      for (
j = 0; 
j < 
n; 
j++) {
 
  620   for (
j = 0; 
j < 
n; 
j++) {
 
  629   for (
j = 0; 
j < 
n; 
j++) {
 
  666      for (i = 0; i < 
n - 1; i++) {
 
  667         for (
j = 0; 
j < 
n; 
j++) {
 
  679   for (i = 0; i < 
n - 1; i++) {
 
  680      for (
j = 0; 
j < 
n; 
j++) {
 
  692      for (
j = 0; 
j < 
n; 
j++) {
 
  701      for (
j = 0; 
j < 
n; 
j++) {
 
  711      for (
j = 0; 
j < 
n; 
j++) {
 
  719      for (
j = 0; 
j < 
n; 
j++) {
 
 
  743   return (
r0 * 
r0 + 
tsq * z * z);
 
 
  800   rsq = point[0] * point[0] + point[1] * point[1];
 
 
  843   out << 
"   rin   = " << 
fRmin << 
";" << std::endl;
 
  844   out << 
"   stin  = " << 
fStIn << 
";" << std::endl;
 
  845   out << 
"   rout  = " << 
fRmax << 
";" << std::endl;
 
  846   out << 
"   stout = " << 
fStOut << 
";" << std::endl;
 
  847   out << 
"   dz    = " << 
fDz << 
";" << std::endl;
 
  848   out << 
"   TGeoShape *" << 
GetPointerName() << 
" = new TGeoHype(\"" << 
GetName() << 
"\",rin,stin,rout,stout,dz);" 
 
  909      for (i = 0; i < 
n; i++) {
 
  912         for (
j = 0; 
j < 
n; 
j++) {
 
  928   for (i = 0; i < 
n; i++) {
 
  931      for (
j = 0; 
j < 
n; 
j++) {
 
 
  958      for (i = 0; i < 
n; i++) {
 
  961         for (
j = 0; 
j < 
n; 
j++) {
 
  977   for (i = 0; i < 
n; i++) {
 
  980      for (
j = 0; 
j < 
n; 
j++) {
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
 
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
 
R__EXTERN TGeoManager * gGeoManager
 
#define isin(address, start, length)
 
Generic 3D primitive description class.
 
Bool_t SectionsValid(UInt_t mask) const
 
void SetSectionsValid(UInt_t mask)
 
Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity, UInt_t reqSegs, UInt_t reqSegsCapacity, UInt_t reqPols, UInt_t reqPolsCapacity)
Set kRaw tessellation section of buffer with supplied sizes.
 
void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections, Bool_t localFrame) const override
Fills the supplied buffer, with sections in desired frame See TBuffer3D.h for explanation of sections...
 
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
Compute distance from outside point to surface of the box.
 
void InspectShape() const override
Prints shape parameters.
 
A hyperboloid is represented as a solid limited by two planes perpendicular to the Z axis (top and bo...
 
Int_t GetNmeshVertices() const override
Return number of vertices of the mesh representation.
 
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override
Fills a static 3D buffer and returns a reference.
 
Double_t SafetyToHype(const Double_t *point, Bool_t inner, Bool_t in) const
Compute an underestimate of the closest distance from a point to inner or outer infinite hyperbolas.
 
TGeoShape * GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const override
in case shape has some negative parameters, these has to be computed in order to fit the mother
 
Double_t ZHypeSq(Double_t r, Bool_t inner) const
Compute z^2 at a given r^2, for either inner or outer hyperbolas.
 
~TGeoHype() override
destructor
 
void SetSegsAndPols(TBuffer3D &buff) const override
Fill TBuffer3D structure for segments and polygons.
 
void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const override
Compute distance from array of input points having directions specified by dirs. Store output in dist...
 
Double_t RadiusHypeSq(Double_t z, Bool_t inner) const
Compute r^2 = x^2 + y^2 at a given z coordinate, for either inner or outer hyperbolas.
 
TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override
Cannot divide hyperboloids.
 
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const override
computes the closest distance from given point to this shape, according to option.
 
void ComputeBBox() override
Compute bounding box of the hyperboloid.
 
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
 
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
compute closest distance from point px,py to each corner
 
Double_t Capacity() const override
Computes capacity of the shape in [length^3].
 
void Sizeof3D() const override
fill size of this 3-D object
 
Int_t DistToHype(const Double_t *point, const Double_t *dir, Double_t *s, Bool_t inner, Bool_t in) const
Compute distance from an arbitrary point to inner/outer surface of hyperboloid.
 
void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize) override
Compute the normal for an array o points so that norm.dot.dir is positive Input: Arrays of point coor...
 
void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const override
Compute safe distance from each of the points in the input array.
 
void SetDimensions(Double_t *param) override
Set dimensions of the hyperboloid starting from an array.
 
void SetPoints(Double_t *points) const override
create tube mesh points
 
TGeoHype()
Default constructor.
 
Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
Compute distance from inside point to surface of the hyperboloid.
 
void GetBoundingCylinder(Double_t *param) const override
Fill vector param[4] with the bounding cylinder parameters.
 
void SetHypeDimensions(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
Set dimensions of the hyperboloid.
 
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
compute distance from outside point to surface of the hyperboloid.
 
void InspectShape() const override
print shape parameters
 
Bool_t Contains(const Double_t *point) const override
test if point is inside this tube
 
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) const override
Compute normal to closest surface from POINT.
 
void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const override
Returns numbers of vertices, segments and polygons composing the shape mesh.
 
Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override
Get range of shape for a given axis.
 
TBuffer3D * MakeBuffer3D() const override
Creates a TBuffer3D describing this shape.
 
void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const override
Compute distance from array of input points having directions specified by dirs. Store output in dist...
 
void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const override
Check the inside status for each of the points in the array.
 
Int_t GetNsegments() const
Get number of segments approximating circles.
 
Geometrical transformation package.
 
Base abstract class for all shapes.
 
Int_t GetBasicColor() const
Get the basic color (0-7).
 
void TransformPoints(Double_t *points, UInt_t NbPoints) const
Tranform a set of points (LocalToMaster)
 
void SetShapeBit(UInt_t f, Bool_t set)
Equivalent of TObject::SetBit.
 
const char * GetPointerName() const
Provide a pointer name containing uid.
 
Int_t ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
Returns distance to shape primitive mesh.
 
const char * GetName() const override
Get the shape name.
 
static Double_t Tolerance()
 
Bool_t TestShapeBit(UInt_t f) const
 
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
 
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
 
virtual const char * ClassName() const
Returns name of class to which the object belongs.
 
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
 
Long64_t LocMin(Long64_t n, const T *a)
Returns index of array with the minimum element.
 
T1 Sign(T1 a, T2 b)
Returns a value with the magnitude of a and the sign of b.
 
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
 
constexpr Double_t DegToRad()
Conversion from degree to radian: .
 
Double_t Sqrt(Double_t x)
Returns the square root of x.
 
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
 
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
 
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
 
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
 
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.