library: libGeom #include "TGeoCone.h"

# TGeoConeSeg

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

## class TGeoConeSeg : public TGeoCone

| Inheritance Chart:

`TObject`

<-

`TNamed`

<-

`TGeoShape`

<-

`TGeoBBox`

<-

`TGeoCone`

<-

`TGeoConeSeg`

        public:

                              TGeoConeSeg()
                              TGeoConeSeg(Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
                              TGeoConeSeg(const char* name, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
                              TGeoConeSeg(Double_t* params)
                              TGeoConeSeg(const TGeoConeSeg&)
                      virtual ~TGeoConeSeg()
               static TClass* Class()
                 virtual void ComputeBBox()
                 virtual void ComputeNormal(Double_t* point, Double_t* dir, Double_t* norm)
                  static void ComputeNormalS(Double_t* point, Double_t* dir, Double_t* norm, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
               virtual Bool_t Contains(Double_t* point) const
                virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
              static Double_t DistToCons(Double_t* point, Double_t* dir, Double_t r1, Double_t z1, Double_t r2, Double_t z2, Double_t phi1, Double_t phi2)
             virtual Double_t DistToIn(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
              static Double_t DistToInS(Double_t* point, Double_t* dir, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t dz, Double_t phi1, Double_t phi2)
             virtual Double_t DistToOut(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const
              static Double_t DistToOutS(Double_t* point, Double_t* dir, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
              static Double_t 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)
          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
           virtual TGeoShape* GetMakeRuntimeShape(TGeoShape* mother, TGeoMatrix* mat) const
                virtual Int_t GetNmeshVertices() const
                     Double_t GetPhi1() const
                     Double_t GetPhi2() const
                 virtual void InspectShape() const
              virtual TClass* IsA() const
                virtual void* Make3DBuffer(const TGeoVolume* vol) const
                 TGeoConeSeg& operator=(const TGeoConeSeg&)
                 virtual void Paint(Option_t* option)
             virtual Double_t Safety(Double_t* point, Bool_t in = kTRUE) const
              static Double_t SafetyS(Double_t* point, Bool_t in, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2, Int_t skipz = 0)
                         void SetConsDimensions(Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
                 virtual void SetDimensions(Double_t* param)
                 virtual void SetPoints(Double_t* buff) const
                 virtual void SetPoints(Float_t* buff) const
                 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 fPhi1  first phi limit
          Double_t fPhi2  second phi limit

## Class Description

TGeoConeSeg()

     Default constructor

TGeoConeSeg(Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2) :TGeoCone(dz, rmin1, rmax1, rmin2, rmax2)

     Default constructor specifying minimum and maximum radius

TGeoConeSeg(const char *name, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2) :TGeoCone(name, dz, rmin1, rmax1, rmin2, rmax2)

     Default constructor specifying minimum and maximum radius

TGeoConeSeg(Double_t *param) :TGeoCone(0,0,0,0,0)

     Default constructor specifying minimum and maximum radius
     param[0] = dz
     param[1] = Rmin1
     param[2] = Rmax1
     param[3] = Rmin2
     param[4] = Rmax2
     param[5] = phi1
     param[6] = phi2

~TGeoConeSeg()

     destructor

void ComputeBBox()

     compute bounding box of the tube segment

void ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm)

     Compute normal to closest surface from POINT.

void ComputeNormalS(Double_t *point, Double_t *dir, Double_t *norm, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t c1, Double_t s1, Double_t c2, Double_t s2)

     Compute normal to closest surface from POINT.

Bool_t Contains(Double_t *point) const

     test if point is inside this sphere

Double_t DistToCons(Double_t *point, Double_t *dir, Double_t r1, Double_t z1, Double_t r2, Double_t z2, Double_t phi1, Double_t phi2)

     Static method to compute distance to a conical surface with :
     - r1, z1 - radius and Z position of lower base
     - r2, z2 - radius and Z position of upper base
     - phi1, phi2 - phi limits

Double_t 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)

     compute distance from poin to both phi planes. Return minimum.

Double_t DistToOutS(Double_t *point, Double_t *dir, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)

     compute distance from inside point to surface of the tube segment

Double_t DistToOut(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 tube segment

Double_t DistToInS(Double_t *point, Double_t *dir, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t dz, Double_t phi1, Double_t phi2)

     compute distance from outside point to surface of arbitrary tube

Double_t DistToIn(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
     compute safe radius

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 cone segment 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. For Z division
     creates all volumes with different shapes and returns pointer to volume that
     was divided. In case a wrong division axis is supplied, returns pointer to
     volume that was divided.

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

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 InspectShape() const

     print shape parameters

void* Make3DBuffer(const TGeoVolume *vol) const

void Paint(Option_t *option)

     paint this shape according to option

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 SafetyS(Double_t *point, Bool_t in, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2, Int_t skipz)

     Static method to compute the closest distance from given point to this shape.

void SetConsDimensions(Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)

void SetDimensions(Double_t *param)

void SetPoints(Double_t *buff) const

     create cone segment mesh points

void SetPoints(Float_t *buff) const

     create cone segment mesh points

Int_t GetNmeshVertices() const

     Return number of vertices of the mesh representation

void Sizeof3D() const

     fill size of this 3-D object

### Inline Functions

                   Int_t GetByteCount() const
                Double_t GetPhi1() const
                Double_t GetPhi2() const
                 TClass* Class()
                 TClass* IsA() const
                    void ShowMembers(TMemberInspector& insp, char* parent)
                    void Streamer(TBuffer& b)
                    void StreamerNVirtual(TBuffer& b)
             TGeoConeSeg TGeoConeSeg(const TGeoConeSeg&)
            TGeoConeSeg& operator=(const TGeoConeSeg&)

Author: Andrei Gheata 31/01/02
Last update: root/geom:$Name: $:$Id: TGeoCone.cxx,v 1.29 2004/06/25 11:59:55 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *