library: libGeom #include "TGeoArb8.h"

# TGeoTrap

class description - source file - inheritance tree (.pdf)

## class TGeoTrap : public TGeoArb8

| Inheritance Chart:

`TObject`

<-

`TNamed`

<-

`TGeoShape`

<-

`TGeoBBox`

<-

`TGeoArb8`

<-

`TGeoTrap`

<-

`TGeoGtra` |

        public:

                              TGeoTrap()
                              TGeoTrap(Double_t dz, Double_t theta, Double_t phi)
                              TGeoTrap(Double_t dz, Double_t theta, Double_t phi, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
                              TGeoTrap(const char* name, Double_t dz, Double_t theta, Double_t phi, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
                              TGeoTrap(const TGeoTrap&)
                      virtual ~TGeoTrap()
               static TClass* Class()
             virtual Double_t DistFromInside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
             virtual Double_t DistFromOutside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
          virtual TGeoVolume* Divide(TGeoVolume* voldiv, const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
                     Double_t GetAlpha1() const
                     Double_t GetAlpha2() const
                     Double_t GetBl1() const
                     Double_t GetBl2() const
                     Double_t GetH1() const
                     Double_t GetH2() const
           virtual TGeoShape* GetMakeRuntimeShape(TGeoShape* mother, TGeoMatrix* mat) const
                virtual Int_t GetNmeshVertices() const
                     Double_t GetPhi() const
                     Double_t GetTheta() const
                     Double_t GetTl1() const
                     Double_t GetTl2() const
              virtual TClass* IsA() const
                    TGeoTrap& operator=(const TGeoTrap&)
             virtual Double_t Safety(Double_t* point, Bool_t in = kTRUE) const
                 virtual void SavePrimitive(ofstream& out, Option_t* option)
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

          Double_t fTheta   theta angle
          Double_t fPhi     phi angle
          Double_t fH1      half length in y at low z
          Double_t fBl1     half length in x at low z and y low edge
          Double_t fTl1     half length in x at low z and y high edge
          Double_t fAlpha1  angle between centers of x edges an y axis at low z
          Double_t fH2      half length in y at high z
          Double_t fBl2     half length in x at high z and y low edge
          Double_t fTl2     half length in x at high z and y high edge
          Double_t fAlpha2  angle between centers of x edges an y axis at low z

## Class Description

     TGeoArb8 - a arbitrary trapezoid with less than 8 vertices standing on
       two paralel planes perpendicular to Z axis. Parameters :
                - dz - half length in Z;
                - xy[8][2] - vector of (x,y) coordinates of vertices
                   - first four points (xy[i][j], i<4, j<2) are the (x,y)
                     coordinates of the vertices sitting on the -dz plane;
                   - last four points (xy[i][j], i>=4, j<2) are the (x,y)
                     coordinates of the vertices sitting on the +dz plane;
       The order of defining the vertices of an arb8 is the following :
          - point 0 is connected with points 1,3,4
          - point 1 is connected with points 0,2,5
          - point 2 is connected with points 1,3,6
          - point 3 is connected with points 0,2,7
          - point 4 is connected with points 0,5,7
          - point 5 is connected with points 1,4,6
          - point 6 is connected with points 2,5,7
          - point 7 is connected with points 3,4,6
       Points can be identical in order to create shapes with less than
       8 vertices.

TGeoTrap()

     dummy ctor

TGeoTrap(Double_t dz, Double_t theta, Double_t phi) :TGeoArb8("", 0, 0)

TGeoTrap(Double_t dz, Double_t theta, Double_t phi, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2) :TGeoArb8("", 0, 0)

     constructor.

TGeoTrap(const char *name, Double_t dz, Double_t theta, Double_t phi, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2) :TGeoArb8(name, 0, 0)

     constructor with name

~TGeoTrap()

     destructor

Double_t DistFromInside(Double_t *point, Double_t *dir, Int_t iact, Double_t step, Double_t *safe) const

     compute distance from inside point to surface of the arb8

Double_t DistFromOutside(Double_t *point, Double_t *dir, Int_t iact, Double_t step, Double_t *safe) const

     compute distance from outside point to surface of the arb8

TGeoVolume* Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)

    --- Divide this trapezoid shape belonging to volume "voldiv" into ndiv volumes
     called divname, from start position with the given step. Only Z divisions
     are supported. For Z divisions just return the pointer to the volume to be
     divided. In case a wrong division axis is supplied, returns pointer to
     volume that was divided.

TGeoShape* GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix * /*mat*/) const

     in case shape has some negative parameters, these has to be computed
     in order to fit the mother

Double_t Safety(Double_t *point, Bool_t in) const

     Computes the closest distance from given point to this shape, according
     to option.

void SavePrimitive(ofstream &out, Option_t * /*option*/)

     Save a primitive as a C++ statement(s) on output stream "out".

### Inline Functions

               Double_t GetTheta() const
               Double_t GetPhi() const
               Double_t GetH1() const
               Double_t GetBl1() const
               Double_t GetTl1() const
               Double_t GetAlpha1() const
               Double_t GetH2() const
               Double_t GetBl2() const
               Double_t GetTl2() const
               Double_t GetAlpha2() const
                  Int_t GetNmeshVertices() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
               TGeoTrap TGeoTrap(const TGeoTrap&)
              TGeoTrap& operator=(const TGeoTrap&)

Author: Andrei Gheata 31/01/02
Last update: root/geom:$Name: $:$Id: TGeoArb8.cxx,v 1.43 2005/05/13 16:20:38 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *