library: libGeom
#include "TGeoTube.h"

TGeoTube


class description - header file - source file
viewCVS header - viewCVS source

class TGeoTube: public TGeoBBox

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TGeoTube()
TGeoTube(Double_t* params)
TGeoTube(const TGeoTube&)
TGeoTube(Double_t rmin, Double_t rmax, Double_t dz)
TGeoTube(const char* name, Double_t rmin, Double_t rmax, Double_t dz)
virtual~TGeoTube()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
static Bool_tTGeoBBox::AreOverlapping(const TGeoBBox* box1, const TGeoMatrix* mat1, const TGeoBBox* box2, const TGeoMatrix* mat2)
static Double_tTGeoShape::Big()
virtual voidTObject::Browse(TBrowser* b)
virtual Double_tCapacity() const
static Double_tCapacity(Double_t rmin, Double_t rmax, Double_t dz)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidComputeBBox()
virtual voidComputeNormal(Double_t* point, Double_t* dir, Double_t* norm)
static voidComputeNormalS(Double_t* point, Double_t* dir, Double_t* norm, Double_t rmin, Double_t rmax, Double_t dz)
virtual Bool_tContains(Double_t* point) const
virtual voidTNamed::Copy(TObject& named) const
virtual Bool_tTGeoBBox::CouldBeCrossed(Double_t* point, Double_t* dir) const
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tDistancetoPrimitive(Int_t px, Int_t py)
virtual Double_tDistFromInside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
static Double_tDistFromInsideS(Double_t* point, Double_t* dir, Double_t rmin, Double_t rmax, Double_t dz)
virtual Double_tDistFromOutside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
static Double_tDistFromOutsideS(Double_t* point, Double_t* dir, Double_t rmin, Double_t rmax, Double_t dz)
static Double_tTGeoShape::DistToPhiMin(Double_t* point, Double_t* dir, Double_t s1, Double_t c1, Double_t s2, Double_t c2, Double_t sm, Double_t cm, Bool_t in = kTRUE)
static voidDistToTube(Double_t rsq, Double_t nsq, Double_t rdotn, Double_t radius, Double_t& b, Double_t& delta)
virtual TGeoVolume*Divide(TGeoVolume* voldiv, const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
virtual voidTGeoShape::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTGeoShape::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual const char*GetAxisName(Int_t iaxis) const
virtual Double_tGetAxisRange(Int_t iaxis, Double_t& xlo, Double_t& xhi) const
virtual voidGetBoundingCylinder(Double_t* param) const
virtual const TBuffer3D&GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
virtual Int_tGetByteCount() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Double_tTGeoBBox::GetDX() const
virtual Double_tTGeoBBox::GetDY() const
virtual Double_tGetDz() const
virtual Double_tTGeoBBox::GetDZ() const
virtual Int_tTGeoBBox::GetFittingBox(const TGeoBBox* parambox, TGeoMatrix* mat, Double_t& dx, Double_t& dy, Double_t& dz) const
virtual const char*TObject::GetIconName() const
Int_tTGeoShape::GetId() const
virtual TGeoShape*GetMakeRuntimeShape(TGeoShape* mother, TGeoMatrix* mat) const
virtual const char*TGeoShape::GetName() const
virtual Int_tGetNmeshVertices() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const Double_t*TGeoBBox::GetOrigin() const
char*TGeoShape::GetPointerName() const
virtual Double_tGetRmax() const
virtual Double_tGetRmin() const
virtual const char*TNamed::GetTitle() const
static TGeoMatrix*TGeoShape::GetTransform()
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
Bool_tHasRmin() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
virtual voidInspectShape() const
voidTObject::InvertBit(UInt_t f)
voidTGeoShape::InvertShapeBit(UInt_t f)
virtual TClass*IsA() const
static Bool_tTGeoShape::IsCloseToPhi(Double_t epsil, Double_t* point, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
virtual Bool_tTGeoShape::IsComposite() const
static Bool_tTGeoShape::IsCrossingSemiplane(Double_t* point, Double_t* dir, Double_t cphi, Double_t sphi, Double_t& snext, Double_t& rxy)
virtual Bool_tIsCylType() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
static Bool_tTGeoShape::IsInPhiRange(Double_t* point, Double_t phi1, Double_t phi2)
virtual Bool_tTGeoBBox::IsNullBox() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTGeoShape::IsReflected() const
Bool_tTGeoShape::IsRunTimeShape() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTGeoShape::IsValid() const
virtual Bool_tTGeoBBox::IsValidBox() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
virtual TBuffer3D*MakeBuffer3D() const
voidTObject::MayNotUse(const char* method) const
static voidTGeoShape::NormalPhi(Double_t* point, Double_t* dir, Double_t* norm, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TGeoTube&operator=(const TGeoTube&)
virtual voidTGeoShape::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidTGeoShape::ResetShapeBit(UInt_t f)
virtual Double_tSafety(Double_t* point, Bool_t in = kTRUE) const
static Double_tTGeoShape::SafetyPhi(Double_t* point, Bool_t in, Double_t phi1, Double_t phi2)
static Double_tSafetyS(Double_t* point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Int_t skipz = 0)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidSavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTGeoBBox::SetBoxDimensions(Double_t dx, Double_t dy, Double_t dz, Double_t* origin = 0)
voidTGeoBBox::SetBoxPoints(Double_t* points) const
virtual voidSetDimensions(Double_t* param)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
voidTGeoShape::SetId(Int_t id)
virtual voidTNamed::SetName(const char* name)
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetPoints(Double_t* points) const
virtual voidSetPoints(Float_t* points) const
voidTGeoShape::SetRuntime(Bool_t flag = kTRUE)
virtual voidSetSegsAndPols(TBuffer3D& buff) const
voidTGeoShape::SetShapeBit(UInt_t f)
voidTGeoShape::SetShapeBit(UInt_t f, Bool_t set)
virtual voidTNamed::SetTitle(const char* title = "")
static voidTGeoShape::SetTransform(TGeoMatrix* matrix)
voidSetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz)
virtual voidTObject::SetUniqueID(UInt_t uid)
Int_tTGeoShape::ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidSizeof3D() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
Bool_tTGeoShape::TestShapeBit(UInt_t f) const
Int_tTGeoShape::TestShapeBits(UInt_t f) const
static Double_tTGeoShape::Tolerance()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidTGeoBBox::FillBuffer3D(TBuffer3D& buffer, Int_t reqSections, Bool_t localFrame) const
Int_tTGeoShape::GetBasicColor() const
voidTObject::MakeZombie()
voidTGeoShape::SetOnBoundary(Bool_t)
voidTGeoShape::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_tfRmininner radius
Double_tfRmaxouter radius
Double_tfDzhalf length
Double_tTGeoBBox::fDXX half-length
Double_tTGeoBBox::fDYY half-length
Double_tTGeoBBox::fDZZ half-length
Double_tTGeoBBox::fOrigin[3]box origin
Int_tTGeoShape::fShapeIdshape id
UInt_tTGeoShape::fShapeBitsshape bits
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title

Class Description

 TGeoTube - cylindrical tube class. It takes 3 parameters :
            inner radius, outer radius and half-length dz.

_____________________________________________________________________________
/* */

/*

*/

/*

*/

/*

*/

/*

*/

/*

*/

/*

*/
_____________________________________________________________________________
 TGeoTubeSeg - a phi segment of a tube. Has 5 parameters :
            - the same 3 as a tube;
            - first phi limit (in degrees)
            - second phi limit

_____________________________________________________________________________
/* */

/*

*/

/*

*/

/*

*/
_____________________________________________________________________________
 TGeoCtub - a tube segment cut with 2 planes. Has 11 parameters :
            - the same 5 as a tube segment;
            - x, y, z components of the normal to the -dZ cut plane in
              point (0, 0, -dZ);
            - x, y, z components of the normal to the +dZ cut plane in
              point (0, 0, dZ);

_____________________________________________________________________________
/* */
TGeoTube()
 Default constructor
TGeoTube(Double_t rmin, Double_t rmax, Double_t dz)
 Default constructor specifying minimum and maximum radius
TGeoTube(const char *name, Double_t rmin, Double_t rmax, Double_t dz)
 Default constructor specifying minimum and maximum radius
TGeoTube(Double_t *param)
 Default constructor specifying minimum and maximum radius
 param[0] = Rmin
 param[1] = Rmax
 param[2] = dz
~TGeoTube()
 destructor
Double_t Capacity()
 Computes capacity of the shape in [length^3]
Double_t Capacity(Double_t rmin, Double_t rmax, Double_t dz)
 Computes capacity of the shape in [length^3]
void ComputeBBox()
 compute bounding box of the tube
void ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm)
 Compute normal to closest surface from POINT.
void ComputeNormalS(Double_t *point, Double_t *dir, Double_t *norm, Double_t /*rmin*/, Double_t /*rmax*/, Double_t /*dz*/)
 Compute normal to closest surface from POINT.
Bool_t Contains(Double_t *point)
 test if point is inside this tube
Int_t DistancetoPrimitive(Int_t px, Int_t py)
 compute closest distance from point px,py to each corner
Double_t DistFromInsideS(Double_t *point, Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz)
 Compute distance from inside point to surface of the tube (static)
 Boundary safe algorithm.
 compute distance to surface
 Do Z
Double_t DistFromInside(Double_t *point, Double_t *dir, Int_t iact, Double_t step, Double_t *safe)
 Compute distance from inside point to surface of the tube
 Boundary safe algorithm.
Double_t DistFromOutsideS(Double_t *point, Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz)
 Static method to compute distance from outside point to a tube with given parameters
 Boundary safe algorithm.
 check Z planes
Double_t DistFromOutside(Double_t *point, Double_t *dir, Int_t iact, Double_t step, Double_t *safe)
 Compute distance from outside point to surface of the tube and safe distance
 Boundary safe algorithm.
 fist localize point w.r.t tube
void DistToTube(Double_t rsq, Double_t nsq, Double_t rdotn, Double_t radius, Double_t &b, Double_t &delta)
 Static method computing the distance to a tube with given radius, starting from
 POINT along DIR director cosines. The distance is computed as :
    RSQ   = point[0]*point[0]+point[1]*point[1]
    NSQ   = dir[0]*dir[0]+dir[1]*dir[1]  ---> should NOT be 0 !!!
    RDOTN = point[0]*dir[0]+point[1]*dir[1]
 The distance can be computed as :
    D = -B +/- DELTA
 where DELTA.GT.0 and D.GT.0
TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
--- Divide this tube shape belonging to volume "voldiv" into ndiv volumes
 called divname, from start position with the given step. Returns pointer
 to created division cell volume in case of Z divisions. For radial division
 creates all volumes with different shapes and returns pointer to volume that
 was divided. In case a wrong division axis is supplied, returns pointer to
 volume that was divided.
const char * GetAxisName(Int_t iaxis)
 Returns name of axis IAXIS.
Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi)
 Get range of shape for a given axis.
void GetBoundingCylinder(Double_t *param)
--- 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*/)
 in case shape has some negative parameters, these has to be computed
 in order to fit the mother
void InspectShape()
 print shape parameters
TBuffer3D * MakeBuffer3D()
 Creates a TBuffer3D describing *this* shape.
 Coordinates are in local reference frame.
void SetSegsAndPols(TBuffer3D &buffer)
 Fill TBuffer3D structure for segments and polygons.
Double_t Safety(Double_t *point, Bool_t in)
 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 SafetyS(Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Int_t skipz)
 computes the closest distance from given point to this shape, according
 to option. The matching point on the shape is stored in spoint.
void SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 Save a primitive as a C++ statement(s) on output stream "out".
void SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz)
 Set tube dimensions.
void SetDimensions(Double_t *param)
 Set tube dimensions starting from a list.
void SetPoints(Double_t *points)
 create tube mesh points
void SetPoints(Float_t *points)
 create tube mesh points
Int_t GetNmeshVertices()
 Return number of vertices of the mesh representation
void Sizeof3D()
/// 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;
/    painter->AddSize3D(numPoints, numSegs, numPolys);
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame)
 Fills a static 3D buffer and returns a reference.
TGeoTube()
 constructors
Int_t GetByteCount()
{return 48;}
Double_t GetRmin()
{return fRmin;}
Double_t GetRmax()
{return fRmax;}
Double_t GetDz()
{return fDz;}
Bool_t HasRmin()
{return (fRmin>0)?kTRUE:kFALSE;}
Bool_t IsCylType()
{return kTRUE;}

Author: Andrei Gheata 24/10/01
Last update: root/geom:$Name: $:$Id: TGeoTube.cxx,v 1.69 2006/11/16 11:26:23 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.