library: libGeom
#include "TGeoArb8.h"

TGeoArb8


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

class TGeoArb8 : public TGeoBBox

Inheritance Chart:
TObject
<-
TNamed
<-
TGeoShape
<-
TGeoBBox
<-
TGeoArb8
<-
TGeoTrap
<-
TGeoGtra

    public:
TGeoArb8() TGeoArb8(Double_t dz, Double_t* vertices = 0) TGeoArb8(const char* name, Double_t dz, Double_t* vertices = 0) TGeoArb8(const TGeoArb8&) virtual ~TGeoArb8() static TClass* Class() virtual void ComputeBBox() virtual void ComputeNormal(Double_t* point, Double_t* dir, Double_t* norm) void ComputeTwist() virtual Bool_t Contains(Double_t* point) const 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 Double_t DistToPlane(Double_t* point, 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 Double_t GetAxisRange(Int_t iaxis, Double_t& xlo, Double_t& xhi) const virtual void GetBoundingCylinder(Double_t* param) const virtual Int_t GetByteCount() const Double_t GetDz() const virtual Int_t GetFittingBox(const TGeoBBox* parambox, TGeoMatrix* mat, Double_t& dx, Double_t& dy, Double_t& dz) const virtual TGeoShape* GetMakeRuntimeShape(TGeoShape*, TGeoMatrix*) const virtual Int_t GetNmeshVertices() const static void GetPlaneNormal(Double_t* p1, Double_t* p2, Double_t* p3, Double_t* norm) Double_t GetTwist(Int_t iseg) const Double_t* GetVertices() static Bool_t InsidePolygon(Double_t x, Double_t y, Double_t* pts) virtual void InspectShape() const virtual TClass* IsA() const virtual Bool_t IsCylType() const static Bool_t IsSamePoint(Double_t* p1, Double_t* p2) Bool_t IsTwisted() const TGeoArb8& operator=(const TGeoArb8&) virtual Double_t Safety(Double_t* point, Bool_t in = kTRUE) const Double_t SafetyToFace(Double_t* point, Int_t iseg, Bool_t in) const virtual void SavePrimitive(ofstream& out, Option_t* option) virtual void SetDimensions(Double_t* param) void SetPlaneVertices(Double_t zpl, Double_t* vertices) const virtual void SetPoints(Double_t* points) const virtual void SetPoints(Float_t* points) const virtual void SetVertex(Int_t vnum, Double_t x, Double_t y) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Sizeof3D() const virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
Double_t fDz half length in Z Double_t* fTwist ! [4] tangents of twist angles Double_t fXY[8][2] list of vertices public:
static const TGeoArb8::EGeoArb8Type kArb8Trap static const TGeoArb8::EGeoArb8Type kArb8Tra

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.


TGeoArb8()
 dummy ctor

TGeoArb8(Double_t dz, Double_t *vertices) :TGeoBBox(0,0,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) :TGeoBBox(name, 0,0,0)
 constructor. If the array of vertices is not null, this should be
 in the format : (x0, y0, x1, y1, ... , x7, y7)

~TGeoArb8()
 destructor

void ComputeBBox()
 compute bounding box for a Arb8

void ComputeTwist()
 compute tangents of twist angles (angles between projections on XY plane
 of corresponding -dz +dz edges). Called after last point [7] was set.

Double_t GetTwist(Int_t iseg) const
 Get twist for segment I in range [0,3]

void ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm)
 Compute normal to closest surface from POINT.

Bool_t Contains(Double_t *point) const
 test if point is inside this sphere
 first check Z range

Double_t DistToPlane(Double_t *point, Double_t *dir, Int_t ipl, Bool_t in) const
 compute 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(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

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

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

Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const

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)
 Compute normal to plane defined by P1, P2 and P3

Bool_t InsidePolygon(Double_t x, Double_t y, Double_t *pts)
 Find if a point in XY plane is inside the polygon defines by PTS.

void InspectShape() const
 print shape parameters

Double_t Safety(Double_t *point, Bool_t in) const
 computes the closest distance from given point to this shape, according
 to option. The matching point on the shape is stored in spoint.

Double_t SafetyToFace(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(ofstream &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
 compute intersection points between plane at zpl and non-horizontal edges

void SetDimensions(Double_t *param)
 set arb8 params in one step :

void SetPoints(Double_t *points) const
 create arb8 mesh points

void SetPoints(Float_t *points) const
 create 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



Inline Functions


              Int_t GetByteCount() const
           Double_t GetDz() const
         TGeoShape* GetMakeRuntimeShape(TGeoShape*, TGeoMatrix*) const
              Int_t GetNmeshVertices() const
          Double_t* GetVertices()
             Bool_t IsCylType() const
             Bool_t IsSamePoint(Double_t* p1, Double_t* p2)
             Bool_t IsTwisted() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
           TGeoArb8 TGeoArb8(const TGeoArb8&)
          TGeoArb8& operator=(const TGeoArb8&)


Author: Andrei Gheata 31/01/02
Last update: root/geom:$Name: $:$Id: TGeoArb8.cxx,v 1.44 2005/09/04 15:12:08 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.