00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGeoSphere
00013 #define ROOT_TGeoSphere
00014
00015 #ifndef ROOT_TGeoBBox
00016 #include "TGeoBBox.h"
00017 #endif
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 class TGeoSphere : public TGeoBBox
00030 {
00031 protected :
00032
00033 Int_t fNz;
00034 Int_t fNseg;
00035 Double_t fRmin;
00036 Double_t fRmax;
00037 Double_t fTheta1;
00038 Double_t fTheta2;
00039 Double_t fPhi1;
00040 Double_t fPhi2;
00041
00042
00043 public:
00044
00045 TGeoSphere();
00046 TGeoSphere(Double_t rmin, Double_t rmax, Double_t theta1=0, Double_t theta2=180,
00047 Double_t phi1=0, Double_t phi2=360);
00048 TGeoSphere(const char *name, Double_t rmin, Double_t rmax, Double_t theta1=0, Double_t theta2=180,
00049 Double_t phi1=0, Double_t phi2=360);
00050 TGeoSphere(Double_t *param, Int_t nparam=6);
00051
00052 virtual ~TGeoSphere();
00053
00054 virtual Double_t Capacity() const;
00055 virtual void ComputeBBox();
00056 virtual void ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm);
00057 virtual Bool_t Contains(Double_t *point) const;
00058 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00059 virtual Double_t DistFromInside(Double_t *point, Double_t *dir, Int_t iact=1,
00060 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00061 virtual Double_t DistFromOutside(Double_t *point, Double_t *dir, Int_t iact=1,
00062 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00063 Double_t DistToSphere(Double_t *point, Double_t *dir, Double_t rsph, Bool_t check=kTRUE, Bool_t firstcross=kTRUE) const;
00064 virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
00065 Double_t start, Double_t step);
00066 virtual const char *GetAxisName(Int_t iaxis) const;
00067 virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
00068 virtual void GetBoundingCylinder(Double_t *param) const;
00069 virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
00070 virtual Int_t GetByteCount() const {return 42;}
00071 virtual TGeoShape *GetMakeRuntimeShape(TGeoShape * , TGeoMatrix * ) const {return 0;}
00072 virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
00073 virtual Int_t GetNmeshVertices() const;
00074 Int_t GetNumberOfDivisions() const {return fNseg;}
00075 virtual Bool_t GetPointsOnSegments(Int_t , Double_t * ) const {return kFALSE;}
00076 Int_t GetNz() const {return fNz;}
00077 virtual Double_t GetRmin() const {return fRmin;}
00078 virtual Double_t GetRmax() const {return fRmax;}
00079 Double_t GetTheta1() const {return fTheta1;}
00080 Double_t GetTheta2() const {return fTheta2;}
00081 Double_t GetPhi1() const {return fPhi1;}
00082 Double_t GetPhi2() const {return fPhi2;}
00083 virtual void InspectShape() const;
00084 virtual Bool_t IsCylType() const {return kFALSE;}
00085 Int_t IsOnBoundary(Double_t *point) const;
00086 Bool_t IsPointInside(Double_t *point, Bool_t checkR=kTRUE, Bool_t checkTh=kTRUE, Bool_t checkPh=kTRUE) const;
00087 virtual TBuffer3D *MakeBuffer3D() const;
00088 virtual Double_t Safety(Double_t *point, Bool_t in=kTRUE) const;
00089 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00090 void SetSphDimensions(Double_t rmin, Double_t rmax, Double_t theta1,
00091 Double_t theta2, Double_t phi1, Double_t phi2);
00092 virtual void SetNumberOfDivisions(Int_t p);
00093 virtual void SetDimensions(Double_t *param);
00094 virtual void SetPoints(Double_t *points) const;
00095 virtual void SetPoints(Float_t *points) const;
00096 virtual void SetSegsAndPols(TBuffer3D &buff) const;
00097 virtual void Sizeof3D() const;
00098
00099 ClassDef(TGeoSphere, 1)
00100 };
00101
00102 #endif