TGeoTrd1.h

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

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