ROOT logo
ROOT » GEOM » GEOM » TGeoArb8

class TGeoArb8: public TGeoBBox

 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:
TGeoArb8()
TGeoArb8(Double_t dz, Double_t* vertices = 0)
TGeoArb8(const char* name, Double_t dz, Double_t* vertices = 0)
virtual~TGeoArb8()
voidTObject::AbstractMethod(const char* method) const
virtual voidTGeoShape::AfterStreamer()
virtual voidTObject::AppendPad(Option_t* option = "")
static Bool_tTGeoBBox::AreOverlapping(const TGeoBBox* box1, const TGeoMatrix* mat1, const TGeoBBox* box2, const TGeoMatrix* mat2)
static Double_tTGeoShape::Big()
virtual voidTObject::Browse(TBrowser* b)
virtual Double_tCapacity() const
voidTGeoShape::CheckShape(Int_t testNo, Int_t nsamples = 10000, Option_t* option = "")
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual voidTGeoShape::ClearThreadData() const
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidComputeBBox()
static Double_tTGeoShape::ComputeEpsMch()
virtual voidComputeNormal(const Double_t* point, const Double_t* dir, Double_t* norm)
virtual voidComputeNormal_v(const Double_t* points, const Double_t* dirs, Double_t* norms, Int_t vecsize)
voidComputeTwist()
virtual Bool_tContains(const Double_t* point) const
virtual voidContains_v(const Double_t* points, Bool_t* inside, Int_t vecsize) const
virtual voidTNamed::Copy(TObject& named) const
virtual Bool_tTGeoBBox::CouldBeCrossed(const Double_t* point, const Double_t* dir) const
virtual voidTGeoShape::CreateThreadData(Int_t)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTGeoBBox::DistancetoPrimitive(Int_t px, Int_t py)
virtual Double_tDistFromInside(const Double_t* point, const Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
virtual voidDistFromInside_v(const Double_t* points, const Double_t* dirs, Double_t* dists, Int_t vecsize, Double_t* step) const
virtual Double_tDistFromOutside(const Double_t* point, const Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
virtual voidDistFromOutside_v(const Double_t* points, const Double_t* dirs, Double_t* dists, Int_t vecsize, Double_t* step) const
static Double_tTGeoShape::DistToPhiMin(const Double_t* point, const 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_tDistToPlane(const Double_t* point, const Double_t* dir, Int_t ipl, Bool_t in) const
virtual TGeoVolume*Divide(TGeoVolume* voldiv, const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
virtual voidTGeoShape::Draw(Option_t* option = "")MENU
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
static Double_tTGeoShape::EpsMch()
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTGeoShape::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual const char*TGeoBBox::GetAxisName(Int_t iaxis) const
virtual Double_tGetAxisRange(Int_t iaxis, Double_t& xlo, Double_t& xhi) const
virtual voidGetBoundingCylinder(Double_t* param) const
virtual const TBuffer3D&TGeoBBox::GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
virtual Int_tGetByteCount() const
Double_tGetClosestEdge(const Double_t* point, Double_t* vert, Int_t& isegment) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Double_tTGeoBBox::GetDX() const
virtual Double_tTGeoBBox::GetDY() const
Double_tGetDz() const
virtual Double_tTGeoBBox::GetDZ() const
virtual Double_tTGeoBBox::GetFacetArea(Int_t index = 0) const
virtual Int_tGetFittingBox(const TGeoBBox* parambox, TGeoMatrix* mat, Double_t& dx, Double_t& dy, Double_t& dz) const
virtual const char*TObject::GetIconName() const
Int_tTGeoShape::GetId() const
virtual TGeoShape*GetMakeRuntimeShape(TGeoShape*, TGeoMatrix*) const
virtual voidTGeoBBox::GetMeshNumbers(Int_t& nvert, Int_t& nsegs, Int_t& npols) const
virtual const char*TGeoShape::GetName() const
virtual Int_tTGeoBBox::GetNmeshVertices() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const Double_t*TGeoBBox::GetOrigin() const
static voidGetPlaneNormal(Double_t* p1, Double_t* p2, Double_t* p3, Double_t* norm)
const char*TGeoShape::GetPointerName() const
virtual Bool_tGetPointsOnFacet(Int_t, Int_t, Double_t*) const
virtual Bool_tTGeoBBox::GetPointsOnSegments(Int_t npoints, Double_t* array) const
virtual const char*TNamed::GetTitle() const
static TGeoMatrix*TGeoShape::GetTransform()
Double_tGetTwist(Int_t iseg) const
virtual UInt_tTObject::GetUniqueID() const
Double_t*GetVertices()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
static Bool_tInsidePolygon(Double_t x, Double_t y, Double_t* pts)
virtual voidTObject::Inspect() constMENU
virtual voidInspectShape() const
voidTObject::InvertBit(UInt_t f)
voidTGeoShape::InvertShapeBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTGeoShape::IsAssembly() const
static Bool_tTGeoShape::IsCloseToPhi(Double_t epsil, const Double_t* point, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
virtual Bool_tTGeoShape::IsComposite() const
static Bool_tTGeoShape::IsCrossingSemiplane(const Double_t* point, const Double_t* dir, Double_t cphi, Double_t sphi, Double_t& snext, Double_t& rxy)
virtual Bool_tIsCylType() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
static Bool_tTGeoShape::IsInPhiRange(const Double_t* point, Double_t phi1, Double_t phi2)
virtual Bool_tTGeoBBox::IsNullBox() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTGeoShape::IsReflected() const
Bool_tTGeoShape::IsRunTimeShape() const
static Bool_tIsSamePoint(const Double_t* p1, const Double_t* p2)
static Bool_tTGeoShape::IsSameWithinTolerance(Double_t a, Double_t b)
static Bool_tTGeoShape::IsSegCrossing(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Double_t x3, Double_t y3, Double_t x4, Double_t y4)
virtual Bool_tTNamed::IsSortable() const
Bool_tIsTwisted() const
Bool_tTGeoShape::IsValid() const
virtual Bool_tTGeoBBox::IsValidBox() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
virtual TBuffer3D*TGeoBBox::MakeBuffer3D() const
voidTObject::MayNotUse(const char* method) const
static voidTGeoShape::NormalPhi(const Double_t* point, const Double_t* dir, Double_t* norm, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::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 voidTGeoShape::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidTGeoShape::ResetShapeBit(UInt_t f)
virtual Double_tSafety(const Double_t* point, Bool_t in = kTRUE) const
virtual voidSafety_v(const Double_t* points, const Bool_t* inside, Double_t* safe, Int_t vecsize) const
static Double_tTGeoShape::SafetyPhi(const Double_t* point, Bool_t in, Double_t phi1, Double_t phi2)
static Double_tTGeoShape::SafetySeg(Double_t r, Double_t z, Double_t r1, Double_t z1, Double_t r2, Double_t z2, Bool_t outer)
Double_tSafetyToFace(const Double_t* point, Int_t iseg, Bool_t in) const
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidSavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTGeoBBox::SetBoxDimensions(Double_t dx, Double_t dy, Double_t dz, Double_t* origin = 0)
voidTGeoBBox::SetBoxPoints(Double_t* points) const
virtual voidSetDimensions(Double_t* param)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetDz(Double_t dz)
voidTGeoShape::SetId(Int_t id)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPlaneVertices(Double_t zpl, Double_t* vertices) const
virtual voidSetPoints(Double_t* points) const
virtual voidSetPoints(Float_t* points) const
voidTGeoShape::SetRuntime(Bool_t flag = kTRUE)
virtual voidTGeoBBox::SetSegsAndPols(TBuffer3D& buffer) const
voidTGeoShape::SetShapeBit(UInt_t f)
voidTGeoShape::SetShapeBit(UInt_t f, Bool_t set)
virtual voidTNamed::SetTitle(const char* title = "")MENU
static voidTGeoShape::SetTransform(TGeoMatrix* matrix)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidSetVertex(Int_t vnum, Double_t x, Double_t y)
Int_tTGeoShape::ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidSizeof3D() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
Bool_tTGeoShape::TestShapeBit(UInt_t f) const
Int_tTGeoShape::TestShapeBits(UInt_t f) const
static Double_tTGeoShape::Tolerance()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
TGeoArb8(const TGeoArb8&)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidTGeoBBox::FillBuffer3D(TBuffer3D& buffer, Int_t reqSections, Bool_t localFrame) const
Int_tTGeoShape::GetBasicColor() const
voidTObject::MakeZombie()
TGeoArb8&operator=(const TGeoArb8&)
voidTGeoShape::SetOnBoundary(Bool_t)
voidTGeoShape::TransformPoints(Double_t* points, UInt_t NbPoints) const

Data Members

protected:
Double_tTGeoBBox::fDXX half-length
Double_tTGeoBBox::fDYY half-length
Double_tTGeoBBox::fDZZ half-length
Double_tfDzhalf length in Z
TStringTNamed::fNameobject identifier
Double_tTGeoBBox::fOrigin[3]box origin
UInt_tTGeoShape::fShapeBitsshape bits
Int_tTGeoShape::fShapeIdshape id
TStringTNamed::fTitleobject title
Double_t*fTwist! [4] tangents of twist angles
Double_tfXY[8][2]list of vertices

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGeoArb8()
 Default ctor.
TGeoArb8(Double_t dz, Double_t* vertices = 0)
 Constructor. If the array of vertices is not null, this should be
 in the format : (x0, y0, x1, y1, ... , x7, y7)
TGeoArb8(const char* name, Double_t dz, Double_t* vertices = 0)
 Named constructor. If the array of vertices is not null, this should be
 in the format : (x0, y0, x1, y1, ... , x7, y7)
TGeoArb8(const TGeoArb8& )
copy constructor
TGeoArb8& operator=(const TGeoArb8& )
assignment operator
~TGeoArb8()
 Destructor.
Double_t Capacity() const
 Computes capacity of the shape in [length^3].
void ComputeBBox()
 Computes bounding box for an Arb8 shape.
void ComputeTwist()
 Computes tangents of twist angles (angles between projections on XY plane
 of corresponding -dz +dz edges). Computes also if the vertices are defined
 clockwise or anti-clockwise.
Double_t GetTwist(Int_t iseg) const
 Get twist for segment I in range [0,3]
Double_t GetClosestEdge(const Double_t* point, Double_t* vert, Int_t& isegment) const
 Get index of the edge of the quadrilater represented by vert closest to point.
 If [P1,P2] is the closest segment and P is the point, the function returns the fraction of the
 projection of (P1P) over (P1P2). If projection of P is not in range [P1,P2] return -1.
void ComputeNormal(const Double_t* point, const Double_t* dir, Double_t* norm)
 Compute normal to closest surface from POINT.
Bool_t Contains(const Double_t* point) const
 Test if point is inside this shape.
 first check Z range
Double_t DistToPlane(const Double_t* point, const Double_t* dir, Int_t ipl, Bool_t in) const
 Computes distance to plane ipl :
 ipl=0 : points 0,4,1,5
 ipl=1 : points 1,5,2,6
 ipl=2 : points 2,6,3,7
 ipl=3 : points 3,7,0,4
Double_t DistFromOutside(const Double_t* point, const Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
 Computes distance from outside point to surface of the shape.
Double_t DistFromInside(const Double_t* point, const 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.
TGeoVolume * Divide(TGeoVolume* voldiv, const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
 Divide this shape along one axis.
Double_t GetAxisRange(Int_t iaxis, Double_t& xlo, Double_t& xhi) const
 Get shape range on a given axis.
void GetBoundingCylinder(Double_t* param) const
--- Fill vector param[4] with the bounding cylinder parameters. The order
 is the following : Rmin, Rmax, Phi1, Phi2
--- first compute rmin/rmax
Int_t GetFittingBox(const TGeoBBox* parambox, TGeoMatrix* mat, Double_t& dx, Double_t& dy, Double_t& dz) const
 Fills real parameters of a positioned box inside this arb8. Returns 0 if successfull.
void GetPlaneNormal(Double_t* p1, Double_t* p2, Double_t* p3, Double_t* norm)
 Computes normal to plane defined by P1, P2 and P3
Bool_t GetPointsOnFacet(Int_t , Int_t , Double_t* ) const
 Fills array with n random points located on the surface of indexed facet.
 The output array must be provided with a length of minimum 3*npoints. Returns
 true if operation succeeded.
 Possible index values:
    0 - all facets togeather
    1 to 6 - facet index from bottom to top Z
Bool_t InsidePolygon(Double_t x, Double_t y, Double_t* pts)
 Finds if a point in XY plane is inside the polygon defines by PTS.
void InspectShape() const
 Prints shape parameters
Double_t Safety(const Double_t* point, Bool_t in = kTRUE) const
 Computes the closest distance from given point to this shape.
Double_t SafetyToFace(const Double_t* point, Int_t iseg, Bool_t in) const
 Estimate safety to lateral plane defined by segment iseg in range [0,3]
 Might be negative: plane seen only from inside.
void SavePrimitive(ostream& out, Option_t* option = "")
 Save a primitive as a C++ statement(s) on output stream "out".
void SetPlaneVertices(Double_t zpl, Double_t* vertices) const
 Computes intersection points between plane at zpl and non-horizontal edges.
void SetDimensions(Double_t* param)
 Set all arb8 params in one step.
 param[0] = dz
 param[1] = x0
 param[2] = y0

void SetPoints(Double_t* points) const
 Creates arb8 mesh points
void SetPoints(Float_t* points) const
 Creates arb8 mesh points
void SetVertex(Int_t vnum, Double_t x, Double_t y)
  Set values for a given vertex.
void Sizeof3D() const
 Fill size of this 3-D object
void Streamer(TBuffer& )
 Stream an object of class TGeoManager.
void Contains_v(const Double_t* points, Bool_t* inside, Int_t vecsize) const
 Check the inside status for each of the points in the array.
 Input: Array of point coordinates + vector size
 Output: Array of Booleans for the inside of each point
void ComputeNormal_v(const Double_t* points, const Double_t* dirs, Double_t* norms, Int_t vecsize)
 Compute the normal for an array o points so that norm.dot.dir is positive
 Input: Arrays of point coordinates and directions + vector size
 Output: Array of normal directions
void DistFromInside_v(const Double_t* points, const Double_t* dirs, Double_t* dists, Int_t vecsize, Double_t* step) const
 Compute distance from array of input points having directions specisied by dirs. Store output in dists
void DistFromOutside_v(const Double_t* points, const Double_t* dirs, Double_t* dists, Int_t vecsize, Double_t* step) const
 Compute distance from array of input points having directions specisied by dirs. Store output in dists
void Safety_v(const Double_t* points, const Bool_t* inside, Double_t* safe, Int_t vecsize) const
 Compute safe distance from each of the points in the input array.
 Input: Array of point coordinates, array of statuses for these points, size of the arrays
 Output: Safety values
Int_t GetByteCount() const
{return 100;}
Double_t GetDz() const
{return fDz;}
TGeoShape * GetMakeRuntimeShape(TGeoShape* , TGeoMatrix* ) const
{return 0;}
Double_t * GetVertices()
{return &fXY[0][0];}
Bool_t IsCylType() const
{return kFALSE;}
Bool_t IsSamePoint(const Double_t* p1, const Double_t* p2)
{return (TMath::Abs(p1[0]-p2[0])<1.E-16 && TMath::Abs(p1[1]-p2[1])<1.E-16)?kTRUE:kFALSE;}
Bool_t IsTwisted() const
{return (fTwist==0)?kFALSE:kTRUE;}
void SetDz(Double_t dz)
{fDz = dz;}