00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 #ifndef ROOT_TPCON
00013 #define ROOT_TPCON
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 #ifndef ROOT_TShape
00028 #include "TShape.h"
00029 #endif
00030 
00031 
00032 const Int_t kDiv = 20;               
00033 
00034 
00035 class TPCON : public TShape {
00036 protected:
00037    
00038    mutable Double_t   *fSiTab;       
00039    mutable Double_t   *fCoTab;       
00040 
00041    Float_t     fPhi1;        
00042    Float_t     fDphi1;       
00043    Int_t       fNdiv;        
00044    Int_t       fNz;          
00045    Float_t    *fRmin;        
00046    Float_t    *fRmax;        
00047    Float_t    *fDz;          
00048         
00049    TPCON(const TPCON&); 
00050    TPCON& operator=(const TPCON&);
00051 
00052    virtual void    MakeTableOfCoSin() const;  
00053    virtual void    FillTableOfCoSin(Double_t phi, Double_t angstep,Int_t n) const; 
00054    virtual void    SetPoints(Double_t *points) const;
00055    virtual Bool_t  SetSegsAndPols(TBuffer3D & buffer) const;
00056 
00057 public:
00058    TPCON();
00059    TPCON(const char *name, const char *title, const char *material, Float_t phi1, Float_t dphi1, Int_t nz);
00060    virtual ~TPCON();
00061 
00062    virtual void     DefineSection(Int_t secNum, Float_t z, Float_t rmin, Float_t rmax);
00063    virtual Int_t    DistancetoPrimitive(Int_t px, Int_t py);
00064    virtual const TBuffer3D &GetBuffer3D(Int_t reqSections) const;
00065    virtual Int_t    GetNumberOfDivisions () const {if (fNdiv) return fNdiv; else return kDiv;}
00066    virtual Float_t  GetPhi1() const  {return fPhi1;}
00067    virtual Float_t  GetDhi1() const  {return fDphi1;}
00068    virtual Int_t    GetNz() const    {return fNz;}
00069    virtual Float_t *GetRmin() const  {return fRmin;}
00070    virtual Float_t *GetRmax() const  {return fRmax;}
00071    virtual Float_t *GetDz() const    {return fDz;}
00072    virtual Int_t    GetNdiv() const  {return fNdiv;}
00073    virtual void     SetNumberOfDivisions (Int_t p);
00074    virtual void     Sizeof3D() const;
00075 
00076    ClassDef(TPCON,2)  
00077 };
00078 
00079 #endif