TGeoTrd2.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoTrd2.h 21425 2007-12-17 15:59:27Z brun $
00002 // Author: Andrei Gheata   31/01/02
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_TGeoTrd2
00013 #define ROOT_TGeoTrd2
00014 
00015 #ifndef ROOT_TGeoBBox
00016 #include "TGeoBBox.h"
00017 #endif
00018 
00019   
00020 ////////////////////////////////////////////////////////////////////////////
00021 //                                                                        //
00022 // TGeoTrd2 - a trapezoid with both x and y lengths varying with z. It    //
00023 //   has 5 parameters, the half lengths in x at -dz and +dz, the half     //
00024 //  lengths in y at -dz and +dz, and the half length in z (dz).           //
00025 //                                                                        //
00026 ////////////////////////////////////////////////////////////////////////////
00027 
00028 class TGeoTrd2 : public TGeoBBox
00029 {
00030 protected:
00031    // data members
00032    Double_t              fDx1; // half length in X at lower Z surface (-dz)
00033    Double_t              fDx2; // half length in X at higher Z surface (+dz)
00034    Double_t              fDy1; // half length in Y at lower Z surface (-dz)
00035    Double_t              fDy2; // half length in Y at higher Z surface (+dz)
00036    Double_t              fDz;  // half length in Z
00037  
00038    // methods
00039 
00040 public:
00041    // constructors
00042    TGeoTrd2();
00043    TGeoTrd2(Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz);
00044    TGeoTrd2(const char *name, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz);
00045    TGeoTrd2(Double_t *params);
00046    // destructor
00047    virtual ~TGeoTrd2();
00048    // methods
00049 
00050    virtual Double_t      Capacity() const;
00051    virtual Bool_t        Contains(Double_t *point) const;
00052    virtual void          ComputeBBox();
00053    virtual void          ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm);
00054    virtual Double_t      DistFromInside(Double_t *point, Double_t *dir, Int_t iact=1, 
00055                                    Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00056    virtual Double_t      DistFromOutside(Double_t *point, Double_t *dir, Int_t iact=1, 
00057                                    Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00058    virtual TGeoVolume   *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, 
00059                                 Double_t start, Double_t step);
00060    virtual Double_t      GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
00061    virtual void          GetBoundingCylinder(Double_t *param) const;
00062    virtual Int_t         GetByteCount() const {return 56;}
00063    Double_t              GetDx1() const {return fDx1;}
00064    Double_t              GetDx2() const {return fDx2;}
00065    Double_t              GetDy1() const {return fDy1;}
00066    Double_t              GetDy2() const {return fDy2;}
00067    Double_t              GetDz() const  {return fDz;}
00068    virtual Int_t         GetFittingBox(const TGeoBBox *parambox, TGeoMatrix *mat, Double_t &dx, Double_t &dy, Double_t &dz) const;
00069    virtual TGeoShape    *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
00070    void                  GetVisibleCorner(Double_t *point, Double_t *vertex, Double_t *normals) const;
00071    void                  GetOppositeCorner(Double_t *point, Int_t inorm, Double_t *vertex, Double_t *normals) const;
00072    virtual void          InspectShape() const;
00073    virtual Bool_t        IsCylType() const {return kFALSE;}
00074    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
00075    virtual void          SavePrimitive(ostream &out, Option_t *option = "");
00076    virtual void          SetDimensions(Double_t *param);
00077    virtual void          SetPoints(Double_t *points) const;
00078    virtual void          SetPoints(Float_t *points) const;
00079    void                  SetVertex(Double_t *vertex) const;
00080    virtual void          Sizeof3D() const;
00081 
00082    ClassDef(TGeoTrd2, 1)         // TRD2 shape class
00083 };
00084 
00085 #endif

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