# 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:
 enum TGeoShape::EShapeType { kBitMask32 kGeoNoShape kGeoBad kGeoRSeg kGeoPhiSeg kGeoThetaSeg kGeoVisX kGeoVisY kGeoVisZ kGeoRunTimeShape kGeoInvalidShape kGeoTorus kGeoBox kGeoPara kGeoSph kGeoTube kGeoTubeSeg kGeoCone kGeoConeSeg kGeoPcon kGeoPgon kGeoArb8 kGeoEltu kGeoTrap kGeoCtub kGeoTrd1 kGeoTrd2 kGeoComb kGeoClosedShape kGeoXtru kGeoParaboloid kGeoHalfSpace kGeoHype kGeoSavePrimitive }; enum TObject::EStatusBits { kCanDelete kMustCleanup kObjInCanvas kIsReferenced kHasUUID kCannotPick kNoContextMenu kInvalidObject }; enum TObject::[unnamed] { kIsOnHeap kNotDeleted kZombie kBitMask kSingleKey kOverwrite kWriteDelete };
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 *param)
``` 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(Double_t* point, Double_t* dir, Double_t* norm)
``` Compute normal to closest surface from POINT.
```
Bool_t Contains(Double_t* point) const
``` test if point is inside this tube
```

``` compute closest distance from point px,py to each corner
```
Double_t DistFromInside(Double_t* point, 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(Double_t* point, 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(Double_t* point, Double_t* dir, Double_t* s, Bool_t inner) 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(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(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)
``` create tube mesh points
```
void SetPoints(Float_t *points)
``` 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.
```
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;}`