TGeoParaboloid.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoParaboloid.h 24879 2008-07-18 08:04:40Z brun $
00002 // Author: Mihaela Gheata   20/06/04
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_TGeoParaboloid
00013 #define ROOT_TGeoParaboloid
00014 
00015 #ifndef ROOT_TGeoBBox
00016 #include "TGeoBBox.h"
00017 #endif
00018 
00019 ////////////////////////////////////////////////////////////////////////////
00020 //                                                                        
00021 // TGeoParaboloid - Paraboloid  class. A paraboloid is the solid bounded by
00022 //            the following surfaces:
00023 //            - 2 planes parallel with XY cutting the Z axis at Z=-dz and Z=+dz
00024 //            - the surface of revolution of a parabola described by:
00025 //                 z = a*(x*x + y*y) + b
00026 //       The parameters a and b are automatically computed from:
00027 //            - rlo - the radius of the circle of intersection between the 
00028 //              parabolic surface and the plane z = -dz
00029 //            - rhi - the radius of the circle of intersection between the 
00030 //              parabolic surface and the plane z = +dz
00031 //         | -dz = a*rlo*rlo + b
00032 //         |  dz = a*rhi*rhi + b      where: rlo != rhi, both >= 0
00033 //                                                                        
00034 ////////////////////////////////////////////////////////////////////////////
00035 
00036 
00037 class TGeoParaboloid : public TGeoBBox
00038 {
00039 private:
00040    Double_t              fRlo;                  // radius at z=-dz
00041    Double_t              fRhi;                  // radius at z=+dz
00042    Double_t              fDz;                   // range on Z axis [-dz, dz]
00043    Double_t              fA;                    // quadratic coeff.
00044    Double_t              fB;                    // Z value of parabola at x=y=0
00045 public:
00046    // constructors
00047    TGeoParaboloid();
00048    TGeoParaboloid(Double_t rlo, Double_t rhi, Double_t dz);
00049    TGeoParaboloid(const char *name, Double_t rlo, Double_t rhi, Double_t dz);
00050    TGeoParaboloid(Double_t *params);
00051    // destructor
00052    virtual ~TGeoParaboloid();
00053    // methods
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    Double_t              DistToParaboloid(Double_t *point, Double_t *dir) const;
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    virtual TGeoVolume   *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, 
00065                                 Double_t start, Double_t step);
00066    virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
00067    Double_t              GetRlo() const    {return fRlo;}
00068    Double_t              GetRhi() const    {return fRhi;}
00069    Double_t              GetDz() const     {return fDz;}
00070    
00071    virtual void          GetBoundingCylinder(Double_t *param) const;
00072    virtual TGeoShape    *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
00073    virtual void          GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
00074    virtual Int_t         GetNmeshVertices() const;
00075    virtual Bool_t        GetPointsOnSegments(Int_t /*npoints*/, Double_t * /*array*/) const {return kFALSE;}
00076    virtual void          InspectShape() const;
00077    virtual Bool_t        IsCylType() const {return kTRUE;}
00078    virtual TBuffer3D    *MakeBuffer3D() const;
00079    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
00080    virtual void          SavePrimitive(ostream &out, Option_t *option = "");
00081    void                  SetParaboloidDimensions(Double_t rlo, Double_t rhi, Double_t dz);
00082    virtual void          SetDimensions(Double_t *param);
00083    virtual void          SetPoints(Double_t *points) const;
00084    virtual void          SetPoints(Float_t *points) const;
00085    virtual void          SetSegsAndPols(TBuffer3D &buff) const;
00086    virtual void          Sizeof3D() const;
00087 
00088    ClassDef(TGeoParaboloid, 1)         // paraboloid class
00089 
00090 };
00091 
00092 
00093 #endif

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