# class TGeoHype: public TGeoTube

``` TGeoHype - Hyperboloid class defined by 5 parameters. Bounded by:
- Two z planes at z=+/-dz
- Inner and outer lateral surfaces. These represent the surfaces
described by the revolution of 2 hyperbolas about the Z axis:
r^2 - (t*z)^2 = a^2

r = distance between hyperbola and Z axis at coordinate z
t = tangent of the stereo angle (angle made by hyperbola
asimptotic lines and Z axis). t=0 means cylindrical surface.
a = distance between hyperbola and Z axis at z=0

The inner hyperbolic surface is described by:
r^2 - (tin*z)^2 = rin^2
- absence of the inner surface (filled hyperboloid can be forced
by rin=0 and sin=0
The outer hyperbolic surface is described by:
r^2 - (tout*z)^2 = rout^2
TGeoHype parameters: dz[cm], rin[cm], sin[deg], rout[cm], sout[deg].
MANDATORY conditions:
- rin < rout
- rout > 0
- rin^2 + (tin*dz)^2 > rout^2 + (tout*dz)^2
SUPPORTED CASES:
- rin = 0, tin != 0     => inner surface conical
- tin=0 AND/OR tout=0   => corresponding surface(s) cyllindrical
e.g. tin=0 AND tout=0 => shape becomes a tube with: rmin,rmax,dz

```

## Function Members (Methods)

public:
protected:
 virtual void TObject::DoError(int level, const char* location, const char* fmt, va_list va) const virtual void TGeoBBox::FillBuffer3D(TBuffer3D& buffer, Int_t reqSections, Bool_t localFrame) const Int_t TGeoShape::GetBasicColor() const void TObject::MakeZombie() void TGeoShape::SetOnBoundary(Bool_t) void TGeoShape::TransformPoints(Double_t* points, UInt_t NbPoints) const

## Data Members

public:
 static TObject::(anonymous) TObject::kBitMask static TGeoShape::EShapeType TGeoShape::kBitMask32 static TObject::EStatusBits TObject::kCanDelete static TObject::EStatusBits TObject::kCannotPick static TGeoShape::EShapeType TGeoShape::kGeoArb8 static TGeoShape::EShapeType TGeoShape::kGeoBad static TGeoShape::EShapeType TGeoShape::kGeoBox static TGeoShape::EShapeType TGeoShape::kGeoClosedShape static TGeoShape::EShapeType TGeoShape::kGeoComb static TGeoShape::EShapeType TGeoShape::kGeoCone static TGeoShape::EShapeType TGeoShape::kGeoConeSeg static TGeoShape::EShapeType TGeoShape::kGeoCtub static TGeoShape::EShapeType TGeoShape::kGeoEltu static TGeoShape::EShapeType TGeoShape::kGeoHalfSpace static TGeoShape::EShapeType TGeoShape::kGeoHype static TGeoShape::EShapeType TGeoShape::kGeoInvalidShape static TGeoShape::EShapeType TGeoShape::kGeoNoShape static TGeoShape::EShapeType TGeoShape::kGeoPara static TGeoShape::EShapeType TGeoShape::kGeoParaboloid static TGeoShape::EShapeType TGeoShape::kGeoPcon static TGeoShape::EShapeType TGeoShape::kGeoPgon static TGeoShape::EShapeType TGeoShape::kGeoPhiSeg static TGeoShape::EShapeType TGeoShape::kGeoRSeg static TGeoShape::EShapeType TGeoShape::kGeoRunTimeShape static TGeoShape::EShapeType TGeoShape::kGeoSavePrimitive static TGeoShape::EShapeType TGeoShape::kGeoSph static TGeoShape::EShapeType TGeoShape::kGeoThetaSeg static TGeoShape::EShapeType TGeoShape::kGeoTorus static TGeoShape::EShapeType TGeoShape::kGeoTrap static TGeoShape::EShapeType TGeoShape::kGeoTrd1 static TGeoShape::EShapeType TGeoShape::kGeoTrd2 static TGeoShape::EShapeType TGeoShape::kGeoTube static TGeoShape::EShapeType TGeoShape::kGeoTubeSeg static TGeoShape::EShapeType TGeoShape::kGeoVisX static TGeoShape::EShapeType TGeoShape::kGeoVisY static TGeoShape::EShapeType TGeoShape::kGeoVisZ static TGeoShape::EShapeType TGeoShape::kGeoXtru static TObject::EStatusBits TObject::kHasUUID static TObject::EStatusBits TObject::kInvalidObject static TObject::(anonymous) TObject::kIsOnHeap static TObject::EStatusBits TObject::kIsReferenced static TObject::EStatusBits TObject::kMustCleanup static TObject::EStatusBits TObject::kNoContextMenu static TObject::(anonymous) TObject::kNotDeleted static TObject::EStatusBits TObject::kObjInCanvas static TObject::(anonymous) TObject::kOverwrite static TObject::(anonymous) TObject::kSingleKey static TObject::(anonymous) TObject::kWriteDelete static TObject::(anonymous) TObject::kZombie
protected:
 Double_t TGeoBBox::fDX X half-length Double_t TGeoBBox::fDY Y half-length Double_t TGeoBBox::fDZ Z half-length Double_t TGeoTube::fDz half length TString TNamed::fName object identifier Double_t TGeoBBox::fOrigin[3] box origin Double_t TGeoTube::fRmax outer radius Double_t TGeoTube::fRmin inner radius UInt_t TGeoShape::fShapeBits shape bits Int_t TGeoShape::fShapeId shape id Double_t fStIn Stereo angle for inner surface Double_t fStOut Stereo angle for inner surface TString TNamed::fTitle object title
private:
 Double_t fTin Tangent of stereo angle for inner surface Double_t fTinsq Squared tangent of stereo angle for inner surface Double_t fTout Tangent of stereo angle for outer surface Double_t fToutsq Squared tangent of stereo angle for outer surface

## Function documentation

TGeoHype()
``` Default constructor
```
TGeoHype(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
``` Constructor specifying hyperboloid parameters.
```
TGeoHype(const char* name, Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
``` Constructor specifying parameters and name.
```
TGeoHype(Double_t* params)
``` Default constructor specifying a list of parameters
param[0] = dz
param[1] = rin
param[2] = stin
param[3] = rout
param[4] = stout
```

``` destructor
```
Double_t Capacity() const
``` Computes capacity of the shape in [length^3]
```
void ComputeBBox()
``` Compute bounding box of the hyperboloid
```
void ComputeNormal(const Double_t* point, const Double_t* dir, Double_t* norm)
``` Compute normal to closest surface from POINT.
```
Bool_t Contains(const Double_t* point) const
``` test if point is inside this tube
```

``` compute closest distance from point px,py to each corner
```
Double_t DistFromInside(const Double_t* point, const Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
``` Compute distance from inside point to surface 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 = 0) const
``` compute distance from outside point to surface of the hyperboloid.
```
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.
Returns number of positive solutions. S[2] contains the solutions.
```
TGeoVolume * Divide(TGeoVolume* voldiv, const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
``` Cannot divide hyperboloids.
```
Double_t GetAxisRange(Int_t iaxis, Double_t& xlo, Double_t& xhi) const
``` Get range of shape for a given axis.
```
void GetBoundingCylinder(Double_t* param) const
```--- Fill vector param[4] with the bounding cylinder parameters. The order
is the following : Rmin, Rmax, Phi1, Phi2, dZ
```
TGeoShape * GetMakeRuntimeShape(TGeoShape* mother, TGeoMatrix* mat) const
``` in case shape has some negative parameters, these has to be computed
in order to fit the mother
```
void InspectShape() const
``` print shape parameters
```
TBuffer3D * MakeBuffer3D() const
``` Creates a TBuffer3D describing *this* shape.
Coordinates are in local reference frame.
```
void SetSegsAndPols(TBuffer3D& buff) const
``` Fill TBuffer3D structure for segments and polygons.
```
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.
```
Double_t ZHypeSq(Double_t r, Bool_t inner) const
``` Compute z^2 at a given  r^2, for either inner or outer hyperbolas.
```
Double_t Safety(const Double_t* point, Bool_t in = kTRUE) const
``` computes the closest distance from given point to this shape, according
to option. The matching point on the shape is stored in spoint.
```
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.
```
void SavePrimitive(ostream& out, Option_t* option = "")
``` Save a primitive as a C++ statement(s) on output stream "out".
```
void SetHypeDimensions(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
``` Set dimensions of the hyperboloid.
```
void SetDimensions(Double_t* param)
``` Set dimensions of the hyperboloid starting from an array.
param[0] = dz
param[1] = rin
param[2] = stin
param[3] = rout
param[4] = stout
```
void SetPoints(Double_t* points) const
``` create tube mesh points
```
void SetPoints(Float_t* points) const
``` create tube mesh points
```
void GetMeshNumbers(Int_t& nvert, Int_t& nsegs, Int_t& npols) const
``` Returns numbers of vertices, segments and polygons composing the shape mesh.
```
Int_t GetNmeshVertices() const
``` Return number of vertices of the mesh representation
```
void Sizeof3D() const
``` fill size of this 3-D object
TVirtualGeoPainter *painter = gGeoManager->GetGeomPainter();
if (!painter) return;
Int_t n = gGeoManager->GetNsegments();
Int_t numPoints = n*4;
Int_t numSegs   = n*8;
Int_t numPolys  = n*4;
```
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
``` Fills a static 3D buffer and returns a reference.
```
void Contains_v(const Double_t* points, Bool_t* inside, Int_t vecsize) const
``` Check the inside status for each of the points in the array.
Input: Array of point coordinates + vector size
Output: Array of Booleans for the inside of each point
```
void ComputeNormal_v(const Double_t* points, const Double_t* dirs, Double_t* norms, Int_t vecsize)
``` Compute the normal for an array o points so that norm.dot.dir is positive
Input: Arrays of point coordinates and directions + vector size
Output: Array of normal directions
```
void DistFromInside_v(const Double_t* points, const Double_t* dirs, Double_t* dists, Int_t vecsize, Double_t* step) const
``` Compute distance from array of input points having directions specisied by dirs. Store output in dists
```
void DistFromOutside_v(const Double_t* points, const Double_t* dirs, Double_t* dists, Int_t vecsize, Double_t* step) const
``` Compute distance from array of input points having directions specisied by dirs. Store output in dists
```
void Safety_v(const Double_t* points, const Bool_t* inside, Double_t* safe, Int_t vecsize) const
``` Compute safe distance from each of the points in the input array.
Input: Array of point coordinates, array of statuses for these points, size of the arrays
Output: Safety values
```
TGeoHype()
``` constructors
```
Int_t GetByteCount() const
`{return 64;}`
Bool_t GetPointsOnSegments(Int_t , Double_t* ) const
`{return kFALSE;}`
Double_t GetStIn() const
`{return fStIn;}`
Double_t GetStOut() const
`{return fStOut;}`
Bool_t HasInner() const
`{return !TestShapeBit(kGeoRSeg);}`
Bool_t IsCylType() const
`{return kTRUE;}`