TGeoPcon.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoPcon.h 24879 2008-07-18 08:04:40Z brun $
00002 // Author: Andrei Gheata   24/10/01
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_TGeoPcon
00013 #define ROOT_TGeoPcon
00014 
00015 #ifndef ROOT_TGeoBBox
00016 #include "TGeoBBox.h"
00017 #endif
00018 
00019   
00020 //////////////////////////////////////////////////////////////////////////////
00021 //                                                                          //
00022 // TGeoPcon - a composite polycone. It has at least 9 parameters :          //
00023 //            - the lower phi limit;                                        //
00024 //            - the range in phi;                                           //
00025 //            - the number of z planes (at least two) where the inner/outer //
00026 //              radii are changing;                                         //
00027 //            - z coordinate, inner and outer radius for each z plane       //
00028 //                                                                          //
00029 //////////////////////////////////////////////////////////////////////////////
00030 
00031 class TGeoPcon : public TGeoBBox
00032 {
00033 protected:
00034    // data members
00035    Int_t                 fNz;    // number of z planes (at least two)
00036    Double_t              fPhi1;  // lower phi limit 
00037    Double_t              fDphi;  // phi range
00038    Double_t             *fRmin;  //[fNz] pointer to array of inner radii 
00039    Double_t             *fRmax;  //[fNz] pointer to array of outer radii 
00040    Double_t             *fZ;     //[fNz] pointer to array of Z planes positions 
00041    
00042    // methods
00043    TGeoPcon(const TGeoPcon&); 
00044    TGeoPcon& operator=(const TGeoPcon&); 
00045 
00046 public:
00047    // constructors
00048    TGeoPcon();
00049    TGeoPcon(Double_t phi, Double_t dphi, Int_t nz);
00050    TGeoPcon(const char *name, Double_t phi, Double_t dphi, Int_t nz);
00051    TGeoPcon(Double_t *params);
00052    // destructor
00053    virtual ~TGeoPcon();
00054    // methods
00055    virtual Double_t      Capacity() const;
00056    virtual void          ComputeBBox();
00057    virtual void          ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm);
00058    virtual Bool_t        Contains(Double_t *point) const;
00059    virtual void          DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax);
00060    virtual Double_t      DistFromInside(Double_t *point, Double_t *dir, Int_t iact=1, 
00061                                    Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00062    virtual Double_t      DistFromOutside(Double_t *point, Double_t *dir, Int_t iact=1, 
00063                                    Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00064    Double_t              DistToSegZ(Double_t *point, Double_t *dir, Int_t &iz, Double_t c1, Double_t s1,
00065                                     Double_t c2, Double_t s2, Double_t cfio, Double_t sfio, Double_t cdfi) 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 60+12*fNz;}
00074    Double_t              GetPhi1() const {return fPhi1;}
00075    Double_t              GetDphi() const {return fDphi;}
00076    Int_t                 GetNz() const   {return fNz;}
00077    virtual Int_t         GetNsegments() const;
00078    Double_t             *GetRmin() const {return fRmin;}
00079    Double_t              GetRmin(Int_t ipl) const;
00080    Double_t             *GetRmax() const {return fRmax;}
00081    Double_t              GetRmax(Int_t ipl) const;
00082    Double_t             *GetZ() const    {return fZ;}
00083    Double_t              GetZ(Int_t ipl) const;
00084    virtual TGeoShape    *GetMakeRuntimeShape(TGeoShape * /*mother*/, TGeoMatrix * /*mat*/) const {return 0;}
00085    virtual Int_t         GetNmeshVertices() const;
00086    virtual Bool_t        GetPointsOnSegments(Int_t /*npoints*/, Double_t * /*array*/) const {return kFALSE;}
00087    virtual void          GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
00088    virtual void          InspectShape() const;
00089    virtual Bool_t        IsCylType() const {return kTRUE;}
00090    virtual TBuffer3D    *MakeBuffer3D() const;
00091    Double_t             &Phi1()          {return fPhi1;}
00092    Double_t             &Dphi()          {return fDphi;}
00093    Double_t             &Rmin(Int_t ipl) {return fRmin[ipl];}
00094    Double_t             &Rmax(Int_t ipl) {return fRmax[ipl];}
00095    Double_t             &Z(Int_t ipl) {return fZ[ipl];}
00096    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
00097    Double_t              SafetyToSegment(Double_t *point, Int_t ipl, Bool_t in=kTRUE, Double_t safmin=TGeoShape::Big()) const;
00098    virtual void          SavePrimitive(ostream &out, Option_t *option = "");
00099    virtual void          SetDimensions(Double_t *param);
00100    virtual void          SetPoints(Double_t *points) const;
00101    virtual void          SetPoints(Float_t *points) const;
00102    virtual void          SetSegsAndPols(TBuffer3D &buff) const;
00103    virtual void          Sizeof3D() const;
00104 
00105    ClassDef(TGeoPcon, 1)         // polycone class 
00106 };
00107 
00108 #endif

Generated on Tue Jul 5 14:12:19 2011 for ROOT_528-00b_version by  doxygen 1.5.1