00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGeoTorus
00013 #define ROOT_TGeoTorus
00014
00015 #ifndef ROOT_TGeoBBox
00016 #include "TGeoBBox.h"
00017 #endif
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 class TGeoTorus : public TGeoBBox
00031 {
00032 protected :
00033
00034 Double_t fR;
00035 Double_t fRmin;
00036 Double_t fRmax;
00037 Double_t fPhi1;
00038 Double_t fDphi;
00039
00040
00041 public:
00042 virtual Double_t Capacity() const;
00043 Double_t Daxis(Double_t *pt, Double_t *dir, Double_t t) const;
00044 Double_t DDaxis(Double_t *pt, Double_t *dir, Double_t t) const;
00045 Double_t DDDaxis(Double_t *pt, Double_t *dir, Double_t t) const;
00046 Double_t ToBoundary(Double_t *pt, Double_t *dir, Double_t r) const;
00047 Int_t SolveCubic(Double_t a, Double_t b, Double_t c, Double_t *x) const;
00048 Int_t SolveQuartic(Double_t a, Double_t b, Double_t c, Double_t d, Double_t *x) const;
00049 public:
00050
00051 TGeoTorus();
00052 TGeoTorus(Double_t r, Double_t rmin, Double_t rmax, Double_t phi1=0, Double_t dphi=360);
00053 TGeoTorus(const char * name, Double_t r, Double_t rmin, Double_t rmax, Double_t phi1=0, Double_t dphi=360);
00054 TGeoTorus(Double_t *params);
00055
00056 virtual ~TGeoTorus() {}
00057
00058
00059 virtual void ComputeBBox();
00060 virtual void ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm);
00061 virtual Bool_t Contains(Double_t *point) const;
00062 virtual Double_t DistFromInside(Double_t *point, Double_t *dir, Int_t iact=1,
00063 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00064 virtual Double_t DistFromOutside(Double_t *point, Double_t *dir, Int_t iact=1,
00065 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00066 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00067 virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
00068 Double_t start, Double_t step);
00069 virtual const char *GetAxisName(Int_t iaxis) const;
00070 virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
00071 virtual void GetBoundingCylinder(Double_t *param) const;
00072 virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
00073 virtual Int_t GetByteCount() const {return 56;}
00074 virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
00075 virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
00076 virtual Int_t GetNmeshVertices() const;
00077 virtual Bool_t GetPointsOnSegments(Int_t , Double_t * ) const {return kFALSE;}
00078 Double_t GetR() const {return fR;}
00079 Double_t GetRmin() const {return fRmin;}
00080 Double_t GetRmax() const {return fRmax;}
00081 Double_t GetPhi1() const {return fPhi1;}
00082 Double_t GetDphi() const {return fDphi;}
00083 virtual void InspectShape() const;
00084 virtual Bool_t IsCylType() const {return kTRUE;}
00085 virtual TBuffer3D *MakeBuffer3D() const;
00086 virtual Double_t Safety(Double_t *point, Bool_t in=kTRUE) const;
00087 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00088 void SetTorusDimensions(Double_t r, Double_t rmin, Double_t rmax, Double_t phi1, Double_t dphi);
00089 virtual void SetDimensions(Double_t *param);
00090 virtual void SetPoints(Double_t *points) const;
00091 virtual void SetPoints(Float_t *points) const;
00092 virtual void SetSegsAndPols(TBuffer3D &buff) const;
00093 virtual void Sizeof3D() const;
00094
00095 ClassDef(TGeoTorus, 1)
00096
00097 };
00098
00099 #endif