Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TPCON.h

Go to the documentation of this file.
00001 // @(#)root/g3d:$Name:  $:$Id: TPCON.h,v 1.3 2000/12/13 15:13:46 brun Exp $
00002 // Author: Nenad Buncic   29/09/95
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TPCON
00013 #define ROOT_TPCON
00014 
00015 
00017 //                                                                        //
00018 // TPCON                                                                  //
00019 //                                                                        //
00020 // PCON is a polycone. It has at least 9 parameters, the lower phi limit, //
00021 // the range in phi, the number (at least two) of z planes where the      //
00022 // radius is changing for each z boundary and the z coordinate, the       //
00023 // minimum radius and the maximum radius.                                 //
00024 //                                                                        //
00026 
00027 #ifndef ROOT_TShape
00028 #include "TShape.h"
00029 #endif
00030 
00031 
00032 const Int_t kDiv = 20;               //default number of divisions
00033 
00034 
00035 class TPCON : public TShape {
00036 
00037     protected:
00038 
00039         Double_t   *fSiTab;       
00040         Double_t   *fCoTab;       
00041 
00042         Float_t     fPhi1;        // lower phi limit
00043         Float_t     fDphi1;       // range in phi
00044         Int_t       fNdiv;        // number of divisions
00045         Int_t       fNz;          // number of z segments
00046         Float_t    *fRmin;        //[fNz] pointer to array of inside radiuses
00047         Float_t    *fRmax;        //[fNz] pointer to array of outside radiuses
00048         Float_t    *fDz;          //[fNz] pointer to array of half lengths in z
00049         
00050         virtual void    MakeTableOfCoSin();  // Create the table of the fSiTab; fCoTab
00051         virtual void    FillTableOfCoSin(Double_t phi, Double_t angstep,Int_t n); // Fill the table of cosin
00052         virtual void    PaintGLPoints(Float_t *vertex);
00053 
00054     public:
00055         TPCON();
00056         TPCON(const char *name, const char *title, const char *material, Float_t phi1, Float_t dphi1, Int_t nz);
00057         virtual ~TPCON();
00058 
00059         virtual void     DefineSection(Int_t secNum, Float_t z, Float_t rmin, Float_t rmax);
00060         virtual Int_t    DistancetoPrimitive(Int_t px, Int_t py);
00061         virtual Int_t    GetNumberOfDivisions () const {if (fNdiv) return fNdiv; else return kDiv;}
00062         virtual Float_t  GetPhi1() const  {return fPhi1;}
00063         virtual Float_t  GetDhi1() const  {return fDphi1;}
00064         virtual Int_t    GetNz() const    {return fNz;}
00065         virtual Float_t *GetRmin() const  {return fRmin;}
00066         virtual Float_t *GetRmax() const  {return fRmax;}
00067         virtual Float_t *GetDz() const    {return fDz;}
00068         virtual Int_t    GetNdiv() const  {return fNdiv;}
00069         virtual void     Paint(Option_t *option);
00070         virtual void     SetNumberOfDivisions (Int_t p);
00071         virtual void     SetPoints(Float_t *buff);
00072         virtual void     Sizeof3D() const;
00073 
00074         ClassDef(TPCON,2)  //PCON shape
00075 };
00076 
00077 #endif

Generated on Thu Dec 18 14:52:23 2003 for ROOT by doxygen1.2.16