# class TGeoGtra: public TGeoTrap

``` 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.

```

## Function Members (Methods)

public:
 TGeoGtra() TGeoGtra(const TGeoGtra&) TGeoGtra(Double_t dz, Double_t theta, Double_t phi, Double_t twist, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2) TGeoGtra(const char* name, Double_t dz, Double_t theta, Double_t phi, Double_t twist, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2) virtual ~TGeoGtra() void TObject::AbstractMethod(const char* method) const virtual void TObject::AppendPad(Option_t* option = "") static Bool_t TGeoBBox::AreOverlapping(const TGeoBBox* box1, const TGeoMatrix* mat1, const TGeoBBox* box2, const TGeoMatrix* mat2) static Double_t TGeoShape::Big() virtual void TObject::Browse(TBrowser* b) virtual Double_t TGeoArb8::Capacity() const static TClass* Class() virtual const char* TObject::ClassName() const virtual void TNamed::Clear(Option_t* option = "") virtual TObject* TNamed::Clone(const char* newname = "") const virtual Int_t TNamed::Compare(const TObject* obj) const virtual void TGeoArb8::ComputeBBox() virtual void TGeoArb8::ComputeNormal(Double_t* point, Double_t* dir, Double_t* norm) void TGeoArb8::ComputeTwist() virtual Bool_t TGeoArb8::Contains(Double_t* point) const virtual void TNamed::Copy(TObject& named) const virtual Bool_t TGeoBBox::CouldBeCrossed(Double_t* point, Double_t* dir) const virtual void TObject::Delete(Option_t* option = "") virtual Int_t TGeoBBox::DistancetoPrimitive(Int_t px, Int_t py) 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 static Double_t TGeoShape::DistToPhiMin(Double_t* point, Double_t* dir, Double_t s1, Double_t c1, Double_t s2, Double_t c2, Double_t sm, Double_t cm, Bool_t in = kTRUE) Double_t TGeoArb8::DistToPlane(Double_t* point, Double_t* dir, Int_t ipl, Bool_t in) const virtual TGeoVolume* TGeoTrap::Divide(TGeoVolume* voldiv, const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) virtual void TGeoShape::Draw(Option_t* option = "") virtual void TObject::DrawClass() const virtual TObject* TObject::DrawClone(Option_t* option = "") const virtual void TObject::Dump() const virtual void TObject::Error(const char* method, const char* msgfmt) const virtual void TObject::Execute(const char* method, const char* params, Int_t* error = 0) virtual void TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) virtual void TGeoShape::ExecuteEvent(Int_t event, Int_t px, Int_t py) virtual void TObject::Fatal(const char* method, const char* msgfmt) const virtual void TNamed::FillBuffer(char*& buffer) virtual TObject* TObject::FindObject(const char* name) const virtual TObject* TObject::FindObject(const TObject* obj) const Double_t TGeoTrap::GetAlpha1() const Double_t TGeoTrap::GetAlpha2() const virtual const char* TGeoBBox::GetAxisName(Int_t iaxis) const virtual Double_t TGeoArb8::GetAxisRange(Int_t iaxis, Double_t& xlo, Double_t& xhi) const Double_t TGeoTrap::GetBl1() const Double_t TGeoTrap::GetBl2() const virtual void TGeoArb8::GetBoundingCylinder(Double_t* param) const virtual const TBuffer3D& TGeoBBox::GetBuffer3D(Int_t reqSections, Bool_t localFrame) const virtual Int_t TGeoArb8::GetByteCount() const virtual Option_t* TObject::GetDrawOption() const static Long_t TObject::GetDtorOnly() virtual Double_t TGeoBBox::GetDX() const virtual Double_t TGeoBBox::GetDY() const Double_t TGeoArb8::GetDz() const virtual Double_t TGeoBBox::GetDZ() const virtual Int_t TGeoArb8::GetFittingBox(const TGeoBBox* parambox, TGeoMatrix* mat, Double_t& dx, Double_t& dy, Double_t& dz) const Double_t TGeoTrap::GetH1() const Double_t TGeoTrap::GetH2() const virtual const char* TObject::GetIconName() const Int_t TGeoShape::GetId() const virtual TGeoShape* GetMakeRuntimeShape(TGeoShape* mother, TGeoMatrix* mat) const virtual void TGeoBBox::GetMeshNumbers(Int_t& nvert, Int_t& nsegs, Int_t& npols) const virtual const char* TGeoShape::GetName() const virtual Int_t TGeoBBox::GetNmeshVertices() const virtual char* TObject::GetObjectInfo(Int_t px, Int_t py) const static Bool_t TObject::GetObjectStat() virtual Option_t* TObject::GetOption() const virtual const Double_t* TGeoBBox::GetOrigin() const Double_t TGeoTrap::GetPhi() const static void TGeoArb8::GetPlaneNormal(Double_t* p1, Double_t* p2, Double_t* p3, Double_t* norm) char* TGeoShape::GetPointerName() const Double_t TGeoTrap::GetTheta() const virtual const char* TNamed::GetTitle() const Double_t TGeoTrap::GetTl1() const Double_t TGeoTrap::GetTl2() const static TGeoMatrix* TGeoShape::GetTransform() Double_t TGeoArb8::GetTwist(Int_t iseg) const Double_t GetTwistAngle() const virtual UInt_t TObject::GetUniqueID() const Double_t* TGeoArb8::GetVertices() virtual Bool_t TObject::HandleTimer(TTimer* timer) virtual ULong_t TNamed::Hash() const virtual void TObject::Info(const char* method, const char* msgfmt) const virtual Bool_t TObject::InheritsFrom(const char* classname) const virtual Bool_t TObject::InheritsFrom(const TClass* cl) const static Bool_t TGeoArb8::InsidePolygon(Double_t x, Double_t y, Double_t* pts) virtual void TObject::Inspect() const virtual void TGeoArb8::InspectShape() const void TObject::InvertBit(UInt_t f) void TGeoShape::InvertShapeBit(UInt_t f) virtual TClass* IsA() const static Bool_t TGeoShape::IsCloseToPhi(Double_t epsil, Double_t* point, Double_t c1, Double_t s1, Double_t c2, Double_t s2) virtual Bool_t TGeoShape::IsComposite() const static Bool_t TGeoShape::IsCrossingSemiplane(Double_t* point, Double_t* dir, Double_t cphi, Double_t sphi, Double_t& snext, Double_t& rxy) virtual Bool_t TGeoArb8::IsCylType() const virtual Bool_t TObject::IsEqual(const TObject* obj) const virtual Bool_t TObject::IsFolder() const static Bool_t TGeoShape::IsInPhiRange(Double_t* point, Double_t phi1, Double_t phi2) virtual Bool_t TGeoBBox::IsNullBox() const Bool_t TObject::IsOnHeap() const virtual Bool_t TGeoShape::IsReflected() const Bool_t TGeoShape::IsRunTimeShape() const static Bool_t TGeoArb8::IsSamePoint(Double_t* p1, Double_t* p2) virtual Bool_t TNamed::IsSortable() const Bool_t TGeoArb8::IsTwisted() const Bool_t TGeoShape::IsValid() const virtual Bool_t TGeoBBox::IsValidBox() const Bool_t TObject::IsZombie() const virtual void TNamed::ls(Option_t* option = "") const virtual TBuffer3D* TGeoBBox::MakeBuffer3D() const void TObject::MayNotUse(const char* method) const static void TGeoShape::NormalPhi(Double_t* point, Double_t* dir, Double_t* norm, Double_t c1, Double_t s1, Double_t c2, Double_t s2) virtual Bool_t TObject::Notify() static void TObject::operator delete(void* ptr) static void TObject::operator delete(void* ptr, void* vp) static void TObject::operator delete[](void* ptr) static void TObject::operator delete[](void* ptr, void* vp) void* TObject::operator new(size_t sz) void* TObject::operator new(size_t sz, void* vp) void* TObject::operator new[](size_t sz) void* TObject::operator new[](size_t sz, void* vp) virtual void TGeoShape::Paint(Option_t* option = "") virtual void TObject::Pop() virtual void TNamed::Print(Option_t* option = "") const virtual Int_t TObject::Read(const char* name) virtual void TObject::RecursiveRemove(TObject* obj) void TObject::ResetBit(UInt_t f) void TGeoShape::ResetShapeBit(UInt_t f) virtual Double_t TGeoTrap::Safety(Double_t* point, Bool_t in = kTRUE) const static Double_t TGeoShape::SafetyPhi(Double_t* point, Bool_t in, Double_t phi1, Double_t phi2) Double_t TGeoArb8::SafetyToFace(Double_t* point, Int_t iseg, Bool_t in) const virtual void TObject::SaveAs(const char* filename = "", Option_t* option = "") const virtual void SavePrimitive(ostream& out, Option_t* option = "") void TObject::SetBit(UInt_t f) void TObject::SetBit(UInt_t f, Bool_t set) void TGeoBBox::SetBoxDimensions(Double_t dx, Double_t dy, Double_t dz, Double_t* origin = 0) void TGeoBBox::SetBoxPoints(Double_t* points) const virtual void SetDimensions(Double_t* param) virtual void TObject::SetDrawOption(Option_t* option = "") static void TObject::SetDtorOnly(void* obj) void TGeoArb8::SetDz(Double_t dz) void TGeoShape::SetId(Int_t id) virtual void TNamed::SetName(const char* name) virtual void TNamed::SetNameTitle(const char* name, const char* title) static void TObject::SetObjectStat(Bool_t stat) void TGeoArb8::SetPlaneVertices(Double_t zpl, Double_t* vertices) const virtual void TGeoArb8::SetPoints(Double_t* points) const virtual void TGeoArb8::SetPoints(Float_t* points) const void TGeoShape::SetRuntime(Bool_t flag = kTRUE) virtual void TGeoBBox::SetSegsAndPols(TBuffer3D& buffer) const void TGeoShape::SetShapeBit(UInt_t f) void TGeoShape::SetShapeBit(UInt_t f, Bool_t set) virtual void TNamed::SetTitle(const char* title = "") static void TGeoShape::SetTransform(TGeoMatrix* matrix) virtual void TObject::SetUniqueID(UInt_t uid) virtual void TGeoArb8::SetVertex(Int_t vnum, Double_t x, Double_t y) Int_t TGeoShape::ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual Int_t TNamed::Sizeof() const virtual void TGeoArb8::Sizeof3D() const virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void TObject::SysError(const char* method, const char* msgfmt) const Bool_t TObject::TestBit(UInt_t f) const Int_t TObject::TestBits(UInt_t f) const Bool_t TGeoShape::TestShapeBit(UInt_t f) const Int_t TGeoShape::TestShapeBits(UInt_t f) const static Double_t TGeoShape::Tolerance() virtual void TObject::UseCurrentStyle() virtual void TObject::Warning(const char* method, const char* msgfmt) const virtual Int_t TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) virtual Int_t TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
 virtual void TObject::DoError(int level, const char* location, const char* fmt, va_list va) const virtual void TGeoBBox::FillBuffer3D(TBuffer3D& buffer, Int_t reqSections, Bool_t localFrame) const Int_t TGeoShape::GetBasicColor() const void TObject::MakeZombie() TGeoArb8& TGeoArb8::operator=(const TGeoArb8&) void TGeoShape::SetOnBoundary(Bool_t) void TGeoShape::TransformPoints(Double_t* points, UInt_t NbPoints) const

## Data Members

public:
 enum TGeoArb8::EGeoArb8Type { kArb8Trap kArb8Tra }; enum TGeoShape::EShapeType { kBitMask32 kGeoNoShape kGeoBad kGeoRSeg kGeoPhiSeg kGeoThetaSeg kGeoVisX kGeoVisY kGeoVisZ kGeoRunTimeShape kGeoInvalidShape kGeoTorus kGeoBox kGeoPara kGeoSph kGeoTube kGeoTubeSeg kGeoCone kGeoConeSeg kGeoPcon kGeoPgon kGeoArb8 kGeoEltu kGeoTrap kGeoCtub kGeoTrd1 kGeoTrd2 kGeoComb kGeoClosedShape kGeoXtru kGeoParaboloid kGeoHalfSpace kGeoHype kGeoSavePrimitive }; enum TObject::EStatusBits { kCanDelete kMustCleanup kObjInCanvas kIsReferenced kHasUUID kCannotPick kNoContextMenu kInvalidObject }; enum TObject::[unnamed] { kIsOnHeap kNotDeleted kZombie kBitMask kSingleKey kOverwrite kWriteDelete };
protected:
 Double_t TGeoTrap::fAlpha1 angle between centers of x edges an y axis at low z Double_t TGeoTrap::fAlpha2 angle between centers of x edges an y axis at low z Double_t TGeoTrap::fBl1 half length in x at low z and y low edge Double_t TGeoTrap::fBl2 half length in x at high z and y low edge Double_t TGeoBBox::fDX X half-length Double_t TGeoBBox::fDY Y half-length Double_t TGeoBBox::fDZ Z half-length Double_t TGeoArb8::fDz half length in Z Double_t TGeoTrap::fH1 half length in y at low z Double_t TGeoTrap::fH2 half length in y at high z TString TNamed::fName object identifier Double_t TGeoBBox::fOrigin[3] box origin Double_t TGeoTrap::fPhi phi angle UInt_t TGeoShape::fShapeBits shape bits Int_t TGeoShape::fShapeId shape id Double_t TGeoTrap::fTheta theta angle TString TNamed::fTitle object title Double_t TGeoTrap::fTl1 half length in x at low z and y high edge Double_t TGeoTrap::fTl2 half length in x at high z and y high edge Double_t* TGeoArb8::fTwist ! [4] tangents of twist angles Double_t fTwistAngle twist angle in degrees Double_t TGeoArb8::fXY[8][2] list of vertices

## Function documentation

TGeoGtra(const TGeoGtra& )
``` Default ctor
```
TGeoGtra(Double_t dz, Double_t theta, Double_t phi, Double_t twist, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
``` Constructor.
```
TGeoGtra(const char* name, Double_t dz, Double_t theta, Double_t phi, Double_t twist, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
``` Constructor providing the name of the shape.
```

``` Destructor.
```
Double_t DistFromInside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
``` Compute distance from inside point to surface of the shape.
```
Double_t DistFromOutside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
``` Compute distance from inside point to surface of the shape.
```
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
```
void SavePrimitive(ostream& out, Option_t* option = "")
``` Save a primitive as a C++ statement(s) on output stream "out".
```
void SetDimensions(Double_t* param)
``` Set all arb8 params in one step.
param[0] = dz
param[1] = theta
param[2] = phi
param[3] = h1
param[4] = bl1
param[5] = tl1
param[6] = alpha1
param[7] = h2
param[8] = bl2
param[9] = tl2
param[10] = alpha2
param[11] = twist
```
TGeoGtra(const TGeoGtra& )
``` constructors
```

`{return fTwistAngle;}`

Author: Andrei Gheata 24/10/01
Last update: root/geom:\$Id: TGeoArb8.h 21425 2007-12-17 15:59:27Z brun \$