ROOT logo
ROOT » GEOM » GEOM » TGeoPgon

class TGeoPgon: public TGeoPcon

 TGeoPgon - a polygone. It has at least 10 parameters :
            - the lower phi limit;
            - the range in phi;
            - the number of edges on each z plane;
            - the number of z planes (at least two) where the inner/outer
              radii are changing;
            - z coordinate, inner and outer radius for each z plane



/* */

/* */

Function Members (Methods)

public:
TGeoPgon()
TGeoPgon(Double_t* params)
TGeoPgon(const TGeoPgon&)
TGeoPgon(Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
TGeoPgon(const char* name, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
virtual~TGeoPgon()
voidTObject::AbstractMethod(const char* method) const
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 TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidComputeBBox()
static Double_tTGeoShape::ComputeEpsMch()
virtual voidComputeNormal(Double_t* point, Double_t* dir, Double_t* norm)
virtual Bool_tContains(Double_t* point) const
virtual voidTNamed::Copy(TObject& named) const
virtual Bool_tTGeoBBox::CouldBeCrossed(Double_t* point, Double_t* dir) const
virtual voidTGeoPcon::DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tDistancetoPrimitive(Int_t px, Int_t py)
virtual Double_tDistFromInside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
virtual Double_tDistFromOutside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
static Double_tTGeoShape::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_tTGeoPcon::DistToSegZ(Double_t* point, Double_t* dir, Int_t& iz, Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cfio, Double_t sfio, Double_t cdfi) const
virtual TGeoVolume*Divide(TGeoVolume* voldiv, const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
Double_t&TGeoPcon::Dphi()
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*TGeoPcon::GetAxisName(Int_t iaxis) const
virtual Double_tTGeoPcon::GetAxisRange(Int_t iaxis, Double_t& xlo, Double_t& xhi) const
virtual voidGetBoundingCylinder(Double_t* param) const
virtual const TBuffer3D&GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
virtual Int_tGetByteCount() const
Double_tTGeoPcon::GetDphi() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Double_tTGeoBBox::GetDX() const
virtual Double_tTGeoBBox::GetDY() const
virtual Double_tTGeoBBox::GetDZ() const
virtual Double_tTGeoBBox::GetFacetArea(Int_t index = 0) const
virtual Int_tTGeoBBox::GetFittingBox(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 voidGetMeshNumbers(Int_t& nvert, Int_t& nsegs, Int_t& npols) const
virtual const char*TGeoShape::GetName() const
Int_tGetNedges() const
virtual Int_tGetNmeshVertices() const
virtual Int_tGetNsegments() const
Int_tTGeoPcon::GetNz() 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
Double_tTGeoPcon::GetPhi1() const
const char*TGeoShape::GetPointerName() const
virtual Bool_tTGeoBBox::GetPointsOnFacet(Int_t index, Int_t npoints, Double_t* array) const
virtual Bool_tGetPointsOnSegments(Int_t npoints, Double_t* array) const
Double_t*TGeoPcon::GetRmax() const
Double_tTGeoPcon::GetRmax(Int_t ipl) const
Double_t*TGeoPcon::GetRmin() const
Double_tTGeoPcon::GetRmin(Int_t ipl) const
virtual const char*TNamed::GetTitle() const
static TGeoMatrix*TGeoShape::GetTransform()
virtual UInt_tTObject::GetUniqueID() const
Double_t*TGeoPcon::GetZ() const
Double_tTGeoPcon::GetZ(Int_t ipl) const
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
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, Double_t* point, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
virtual Bool_tTGeoShape::IsComposite() const
static Bool_tTGeoShape::IsCrossingSemiplane(Double_t* point, Double_t* dir, Double_t cphi, Double_t sphi, Double_t& snext, Double_t& rxy)
virtual Bool_tTGeoPcon::IsCylType() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
static Bool_tTGeoShape::IsInPhiRange(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_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_tTGeoShape::IsValid() const
virtual Bool_tTGeoBBox::IsValidBox() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
virtual TBuffer3D*MakeBuffer3D() const
voidTObject::MayNotUse(const char* method) const
static voidTGeoShape::NormalPhi(Double_t* point, 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 = "")
Double_t&TGeoPcon::Phi1()
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)
Double_t&TGeoPcon::Rmax(Int_t ipl)
Double_t&TGeoPcon::Rmin(Int_t ipl)
virtual Double_tSafety(Double_t* point, Bool_t in = kTRUE) const
static Double_tTGeoShape::SafetyPhi(Double_t* point, Bool_t in, Double_t phi1, Double_t phi2)
Double_tSafetyToSegment(Double_t* point, Int_t ipl, Int_t iphi, Bool_t in, Double_t safphi, Double_t safmin = TGeoShape::Big()) 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)
voidTGeoShape::SetId(Int_t id)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNedges(Int_t ne)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetPoints(Double_t* points) const
virtual voidSetPoints(Float_t* points) const
voidTGeoShape::SetRuntime(Bool_t flag = kTRUE)
virtual voidSetSegsAndPols(TBuffer3D& buff) 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)
Int_tTGeoShape::ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
virtual voidShowMembers(TMemberInspector& insp)
virtual Int_tTNamed::Sizeof() const
virtual voidSizeof3D() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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
Double_t&TGeoPcon::Z(Int_t ipl)
protected:
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
Int_tGetPhiCrossList(Double_t* point, Double_t* dir, Int_t istart, Double_t* sphi, Int_t* iphi, Double_t stepmax = TGeoShape::Big()) const
Bool_tIsCrossingSlice(Double_t* point, Double_t* dir, Int_t iphi, Double_t sstart, Int_t& ipl, Double_t& snext, Double_t stepmax) const
voidLocatePhi(Double_t* point, Int_t& ipsec) const
voidTObject::MakeZombie()
TGeoPcon&TGeoPcon::operator=(const TGeoPcon&)
Double_tRpg(Double_t z, Int_t ipl, Bool_t inner, Double_t& a, Double_t& b) const
Double_tRproj(Double_t z, Double_t* point, Double_t* dir, Double_t cphi, Double_t sphi, Double_t& a, Double_t& b) const
voidTGeoShape::SetOnBoundary(Bool_t)
Bool_tSliceCrossing(Double_t* point, Double_t* dir, Int_t nphi, Int_t* iphi, Double_t* sphi, Double_t& snext, Double_t stepmax) const
Bool_tSliceCrossingIn(Double_t* point, Double_t* dir, Int_t ipl, Int_t nphi, Int_t* iphi, Double_t* sphi, Double_t& snext, Double_t stepmax) const
Bool_tSliceCrossingInZ(Double_t* point, Double_t* dir, Int_t nphi, Int_t* iphi, Double_t* sphi, Double_t& snext, Double_t stepmax) const
Bool_tSliceCrossingZ(Double_t* point, Double_t* dir, Int_t nphi, Int_t* iphi, Double_t* sphi, Double_t& snext, Double_t stepmax) const
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_tTGeoPcon::fDphiphi range
TStringTNamed::fNameobject identifier
Int_tfNedgesnumber of edges (at least one)
Int_tTGeoPcon::fNznumber of z planes (at least two)
Double_tTGeoBBox::fOrigin[3]box origin
Double_tTGeoPcon::fPhi1lower phi limit
Double_t*TGeoPcon::fRmax[fNz] pointer to array of outer radii
Double_t*TGeoPcon::fRmin[fNz] pointer to array of inner radii
UInt_tTGeoShape::fShapeBitsshape bits
Int_tTGeoShape::fShapeIdshape id
TStringTNamed::fTitleobject title
Double_t*TGeoPcon::fZ[fNz] pointer to array of Z planes positions

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGeoPgon()
 dummy ctor
TGeoPgon(Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
 Default constructor
TGeoPgon(const char* name, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
 Default constructor
TGeoPgon(Double_t* params)
 Default constructor in GEANT3 style
 param[0] = phi1
 param[1] = dphi
 param[2] = nedges
 param[3] = nz

 param[4] = z1
 param[5] = Rmin1
 param[6] = Rmax1

~TGeoPgon()
 destructor
Double_t Capacity() const
 Computes capacity of the shape in [length^3]
void ComputeBBox()
 compute bounding box for a polygone
 Check if the sections are in increasing Z order
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 shape
 check total z range
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 polygone
 first find out in which Z section the point is in
void LocatePhi(Double_t* point, Int_t& ipsec) const
 Locates index IPSEC of the phi sector containing POINT.
Int_t GetPhiCrossList(Double_t* point, Double_t* dir, Int_t istart, Double_t* sphi, Int_t* iphi, Double_t stepmax = TGeoShape::Big()) const
 Returns lists of PGON phi crossings for a ray starting from POINT.
Bool_t SliceCrossingInZ(Double_t* point, Double_t* dir, Int_t nphi, Int_t* iphi, Double_t* sphi, Double_t& snext, Double_t stepmax) const
 Performs ray propagation between Z segments.
Bool_t SliceCrossingZ(Double_t* point, Double_t* dir, Int_t nphi, Int_t* iphi, Double_t* sphi, Double_t& snext, Double_t stepmax) const
 Performs ray propagation between Z segments.
Bool_t SliceCrossingIn(Double_t* point, Double_t* dir, Int_t ipl, Int_t nphi, Int_t* iphi, Double_t* sphi, Double_t& snext, Double_t stepmax) const
 Check boundary crossing inside phi slices. Return distance snext to first crossing
 if smaller than stepmax.
 Protection in case point is in phi gap or close to phi boundaries and exiting
Bool_t SliceCrossing(Double_t* point, Double_t* dir, Int_t nphi, Int_t* iphi, Double_t* sphi, Double_t& snext, Double_t stepmax) const
 Check boundary crossing inside phi slices. Return distance snext to first crossing
 if smaller than stepmax.
Bool_t IsCrossingSlice(Double_t* point, Double_t* dir, Int_t iphi, Double_t sstart, Int_t& ipl, Double_t& snext, Double_t stepmax) const
 Check crossing of a given pgon slice, from a starting point inside the slice
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 outside point to surface of the polygone
Int_t DistancetoPrimitive(Int_t px, Int_t py)
 compute closest distance from point px,py to each corner
TGeoVolume * Divide(TGeoVolume* voldiv, const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
--- Divide this polygone shape belonging to volume "voldiv" into ndiv volumes
 called divname, from start position with the given step. Returns pointer
 to created division cell volume in case of Z divisions. Phi divisions are
 allowed only if nedges%ndiv=0 and create polygone "segments" with nedges/ndiv edges.
 Z divisions can be performed if the divided range is in between two consecutive Z planes.
 In case a wrong division axis is supplied, returns pointer to volume that was divided.
void GetBoundingCylinder(Double_t* param) const
--- Fill vector param[4] with the bounding cylinder parameters. The order
 is the following : Rmin, Rmax, Phi1, Phi2
void InspectShape() const
 Inspect the PGON parameters.
TBuffer3D * MakeBuffer3D() const
 Creates a TBuffer3D describing *this* shape.
 Coordinates are in local reference frame.
void SetSegsAndPols(TBuffer3D& buff) const
 Fill TBuffer3D structure for segments and polygons.
Double_t Rpg(Double_t z, Int_t ipl, Bool_t inner, Double_t& a, Double_t& b) const
 Computes projected pgon radius (inner or outer) corresponding to a given Z
 value. Fills corresponding coefficients of:
   Rpg(z) = a + b*z
 Note: ipl must be in range [0,fNz-2]
Double_t Rproj(Double_t z, Double_t* point, Double_t* dir, Double_t cphi, Double_t sphi, Double_t& a, Double_t& b) const
 Computes projected distance at a given Z for a given ray inside a given sector
 and fills coefficients:
   Rproj = a + b*z
Double_t SafetyToSegment(Double_t* point, Int_t ipl, Int_t iphi, Bool_t in, Double_t safphi, Double_t safmin = TGeoShape::Big()) const
 Compute safety from POINT to segment between planes ipl, ipl+1 within safmin.
Double_t Safety(Double_t* point, Bool_t in = kTRUE) const
 computes the closest distance from given point to this shape, according
 to option. The matching point on the shape is stored in spoint.
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 PGON dimensions starting from an array.
void SetPoints(Double_t* points) const
 create polygone mesh points
void SetPoints(Float_t* points) const
 create polygone mesh points
void GetMeshNumbers(Int_t& nvert, Int_t& nsegs, Int_t& npols) const
 Returns numbers of vertices, segments and polygons composing the shape mesh.
Int_t GetNmeshVertices() const
 Return number of vertices of the mesh representation
void Sizeof3D() const
 fill size of this 3-D object
    TVirtualGeoPainter *painter = gGeoManager->GetGeomPainter();
    if (!painter) return;
    Int_t n;

    n = fNedges+1;

    Int_t numPoints = fNz*2*n;
    Int_t numSegs   = 4*(fNz*n-1+(fDphi == 360));
    Int_t numPolys  = 2*(fNz*n-1+(fDphi == 360));
    painter->AddSize3D(numPoints, numSegs, numPolys);
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
 Fills a static 3D buffer and returns a reference.
TGeoPgon()
 constructors
Int_t GetByteCount() const
{return 64+12*fNz;}
TGeoShape * GetMakeRuntimeShape(TGeoShape* , TGeoMatrix* ) const
{return 0;}
Int_t GetNedges() const
{return fNedges;}
Int_t GetNsegments() const
{return fNedges;}
Bool_t GetPointsOnSegments(Int_t npoints, Double_t* array) const
{return TGeoBBox::GetPointsOnSegments(npoints,array);}
void SetNedges(Int_t ne)
{if (ne>2) fNedges=ne;}