library: libGeom
#include "TGeoPcon.h"

TGeoPcon


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

class TGeoPcon : public TGeoBBox

Inheritance Chart:
TObject
<-
TNamed
<-
TGeoShape
<-
TGeoBBox
<-
TGeoPcon
<-
TGeoPgon

    public:
TGeoPcon() TGeoPcon(Double_t phi, Double_t dphi, Int_t nz) TGeoPcon(const char* name, Double_t phi, Double_t dphi, Int_t nz) TGeoPcon(Double_t* params) TGeoPcon(const TGeoPcon&) virtual ~TGeoPcon() static TClass* Class() virtual void ComputeBBox() virtual void ComputeNormal(Double_t* point, Double_t* dir, Double_t* norm) virtual Bool_t Contains(Double_t* point) const virtual void DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax) virtual Int_t 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 Double_t 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& Dphi() virtual const char* GetAxisName(Int_t iaxis) const 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 GetDphi() const virtual TGeoShape* GetMakeRuntimeShape(TGeoShape*, TGeoMatrix*) const virtual Int_t GetNmeshVertices() const virtual Int_t GetNsegments() const Int_t GetNz() const Double_t GetPhi1() const Double_t* GetRmax() const Double_t GetRmax(Int_t ipl) const Double_t* GetRmin() const Double_t GetRmin(Int_t ipl) const Double_t* GetZ() const Double_t GetZ(Int_t ipl) const virtual void InspectShape() const virtual TClass* IsA() const virtual Bool_t IsCylType() const virtual TBuffer3D* MakeBuffer3D() const TGeoPcon& operator=(const TGeoPcon&) virtual void Paint(Option_t* option) Double_t& Phi1() Double_t& Rmax(Int_t ipl) Double_t& Rmin(Int_t ipl) virtual Double_t Safety(Double_t* point, Bool_t in = kTRUE) const Double_t SafetyToSegment(Double_t* point, Int_t ipl, Bool_t in = kTRUE, Double_t safmin = TGeoShape::Big()) const virtual void SetDimensions(Double_t* param) virtual void SetPoints(Double_t* buff) const virtual void SetPoints(Float_t* buff) const virtual void SetSegsAndPols(TBuffer3D* buff) const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Sizeof3D() const virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) Double_t& Z(Int_t ipl)

Data Members


    protected:
Int_t fNz number of z planes (at least two) Double_t fPhi1 lower phi limit Double_t fDphi phi range Double_t* fRmin [fNz] pointer to array of inner radii Double_t* fRmax [fNz] pointer to array of outer radii Double_t* fZ [fNz] pointer to array of Z planes positions

Class Description

 TGeoPcon - a polycone. It has at least 9 parameters :
            - the lower phi limit;
            - the range in phi;
            - 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

_____________________________________________________________________________
/* */

TGeoPcon() :TGeoBBox(0, 0, 0)
 dummy ctor

TGeoPcon(Double_t phi, Double_t dphi, Int_t nz) :TGeoBBox(0, 0, 0)
 Default constructor

TGeoPcon(const char *name, Double_t phi, Double_t dphi, Int_t nz) :TGeoBBox(name, 0, 0, 0)
 Default constructor

TGeoPcon(Double_t *param) :TGeoBBox(0, 0, 0), fRmin(0), fRmax(0), fZ(0)
 Default constructor in GEANT3 style
 param[0] = phi1
 param[1] = dphi
 param[2] = nz

 param[3] = z1
 param[4] = Rmin1
 param[5] = Rmax1
 ...

~TGeoPcon()
 destructor

void ComputeBBox()
 compute bounding box of the pcon

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

Int_t DistancetoPrimitive(Int_t px, Int_t py)
 compute closest distance from point px,py to each corner

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 polycone

Double_t 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
 compute distance to a pcon Z slice. Segment iz must be valid

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 tube

void DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax)
 defines z position of a section plane, rmin and rmax at this z.

Int_t GetNsegments() const

TGeoVolume* Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
--- Divide this polycone 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. 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.

const char* GetAxisName(Int_t iaxis) const
 Returns name of axis IAXIS.

Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const
 Get range of shape for 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

Double_t GetRmin(Int_t ipl) const

Double_t GetRmax(Int_t ipl) const

Double_t GetZ(Int_t ipl) const

void InspectShape() const
 print shape parameters

TBuffer3D* MakeBuffer3D() const
 Creates a TBuffer3D describing *this* shape.
 Coordinates are in local reference frame.

void Paint(Option_t *option)
 Paint this shape according to option

void SetSegsAndPols(TBuffer3D *buff) const
 Fill TBuffer3D structure for segments and polygons.

Double_t SafetyToSegment(Double_t *point, Int_t ipl, Bool_t in, Double_t safmin) const
 Compute safety from POINT to segment between planes ipl, ipl+1 within safmin.

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.
---> localize the Z segment

void SetDimensions(Double_t *param)

void SetPoints(Double_t *buff) const
 create polycone mesh points

void SetPoints(Float_t *buff) const
 create polycone mesh points

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 = gGeoManager->GetNsegments()+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);



Inline Functions


              Int_t GetByteCount() const
           Double_t GetPhi1() const
           Double_t GetDphi() const
              Int_t GetNz() const
           Double_t GetRmin(Int_t ipl) const
           Double_t GetRmax(Int_t ipl) const
           Double_t GetZ(Int_t ipl) const
         TGeoShape* GetMakeRuntimeShape(TGeoShape*, TGeoMatrix*) const
             Bool_t IsCylType() const
          Double_t& Phi1()
          Double_t& Dphi()
          Double_t& Rmin(Int_t ipl)
          Double_t& Rmax(Int_t ipl)
          Double_t& Z(Int_t ipl)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
           TGeoPcon TGeoPcon(const TGeoPcon&)
          TGeoPcon& operator=(const TGeoPcon&)


Author: Andrei Gheata 24/10/01
Last update: root/geom:$Name: $:$Id: TGeoPcon.cxx,v 1.38 2004/12/07 14:24:57 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.