Logo ROOT  
Reference Guide
TGeoTube.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Andrei Gheata 24/10/01
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGeoTube
13 #define ROOT_TGeoTube
14 
15 #include "TGeoBBox.h"
16 
17 class TGeoTube : public TGeoBBox
18 {
19 protected :
20 // data members
21  Double_t fRmin; // inner radius
22  Double_t fRmax; // outer radius
23  Double_t fDz; // half length
24 // methods
25 
26 public:
27  // constructors
28  TGeoTube();
29  TGeoTube(Double_t rmin, Double_t rmax, Double_t dz);
30  TGeoTube(const char * name, Double_t rmin, Double_t rmax, Double_t dz);
31  TGeoTube(Double_t *params);
32  // destructor
33  virtual ~TGeoTube();
34  // methods
35 
36  virtual Double_t Capacity() const;
37  static Double_t Capacity(Double_t rmin, Double_t rmax, Double_t dz);
38  virtual void ComputeBBox();
39  virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
40  virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
41  static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm,
42  Double_t rmin, Double_t rmax, Double_t dz);
43  virtual Bool_t Contains(const Double_t *point) const;
44  virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
45  static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz);
46  virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
47  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
48  virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
49  static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz);
50  virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
51  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
52  virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
53  static void DistToTube(Double_t rsq, Double_t nsq, Double_t rdotn, Double_t radius, Double_t &b, Double_t &delta);
54  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
55  virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
56  Double_t start, Double_t step);
57  virtual const char *GetAxisName(Int_t iaxis) const;
58  virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
59  virtual void GetBoundingCylinder(Double_t *param) const;
60  virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
61  virtual Int_t GetByteCount() const {return 48;}
62  virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
63  virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
64  virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
65  virtual Int_t GetNmeshVertices() const;
66  virtual Double_t GetRmin() const {return fRmin;}
67  virtual Double_t GetRmax() const {return fRmax;}
68  virtual Double_t GetDz() const {return fDz;}
69  Bool_t HasRmin() const {return (fRmin>0)?kTRUE:kFALSE;}
70  virtual void InspectShape() const;
71  virtual Bool_t IsCylType() const {return kTRUE;}
72  virtual TBuffer3D *MakeBuffer3D() const;
73  virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
74  virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
75  static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Int_t skipz=0);
76  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
77  void SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz);
78  virtual void SetDimensions(Double_t *param);
79  virtual void SetPoints(Double_t *points) const;
80  virtual void SetPoints(Float_t *points) const;
81  virtual void SetSegsAndPols(TBuffer3D &buff) const;
82  virtual void Sizeof3D() const;
83 
84  ClassDef(TGeoTube, 1) // cylindrical tube class
85 
86 };
87 
88 class TGeoTubeSeg : public TGeoTube
89 {
90 protected:
91  // data members
92  Double_t fPhi1; // first phi limit
93  Double_t fPhi2; // second phi limit
94  // Transient trigonometric data
95  Double_t fS1; // sin(phi1)
96  Double_t fC1; // cos(phi1)
97  Double_t fS2; // sin(phi2)
98  Double_t fC2; // cos(phi2)
99  Double_t fSm; // sin(0.5*(phi1+phi2))
100  Double_t fCm; // cos(0.5*(phi1+phi2))
101  Double_t fCdfi; // cos(0.5*(phi1-phi2))
102 
103  void InitTrigonometry();
104 
105 public:
106  // constructors
107  TGeoTubeSeg();
108  TGeoTubeSeg(Double_t rmin, Double_t rmax, Double_t dz,
109  Double_t phi1, Double_t phi2);
110  TGeoTubeSeg(const char * name, Double_t rmin, Double_t rmax, Double_t dz,
111  Double_t phi1, Double_t phi2);
112  TGeoTubeSeg(Double_t *params);
113  // destructor
114  virtual ~TGeoTubeSeg();
115  // methods
116  virtual void AfterStreamer();
117  virtual Double_t Capacity() const;
118  static Double_t Capacity(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2);
119  virtual void ComputeBBox();
120  virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
121  virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
122  static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm,
123  Double_t rmin, Double_t rmax, Double_t dz,
125  virtual Bool_t Contains(const Double_t *point) const;
126  virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
127  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
128  static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir,Double_t rmin, Double_t rmax, Double_t dz,
130  virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
131  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
132  virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
133  static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz,
135  virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
136  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
137  virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
138  virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
139  Double_t start, Double_t step);
140  virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
141  virtual void GetBoundingCylinder(Double_t *param) const;
142  virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
143  virtual Int_t GetByteCount() const {return 56;}
144  virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
145  virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
146  virtual Int_t GetNmeshVertices() const;
147  virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
148  Double_t GetPhi1() const {return fPhi1;}
149  Double_t GetPhi2() const {return fPhi2;}
150  virtual void InspectShape() const;
151  virtual TBuffer3D *MakeBuffer3D() const;
152  virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
153  virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
154  static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz,
155  Double_t phi1, Double_t phi2, Int_t skipz=0);
156  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
157  void SetTubsDimensions(Double_t rmin, Double_t rmax, Double_t dz,
158  Double_t phi1, Double_t phi2);
159  virtual void SetDimensions(Double_t *param);
160  virtual void SetPoints(Double_t *points) const;
161  virtual void SetPoints(Float_t *points) const;
162  virtual void SetSegsAndPols(TBuffer3D &buff) const;
163  virtual void Sizeof3D() const;
164 
165  ClassDef(TGeoTubeSeg, 2) // cylindrical tube segment class
166 };
167 
168 class TGeoCtub : public TGeoTubeSeg
169 {
170 protected:
171  // data members
172  Double_t fNlow[3]; // normal to lower cut plane
173  Double_t fNhigh[3]; // normal to higher cut plane
174 
175 public:
176  // constructors
177  TGeoCtub();
178  TGeoCtub(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2,
179  Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
180  TGeoCtub(const char *name, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2,
181  Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
182  TGeoCtub(Double_t *params);
183  // destructor
184  virtual ~TGeoCtub();
185  // methods
186  virtual Double_t Capacity() const;
187  virtual void ComputeBBox();
188  virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
189  virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
190  virtual Bool_t Contains(const Double_t *point) const;
191  virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
192  virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
193  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
194  virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
195  virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
196  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
197  virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
198  virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
199  Double_t start, Double_t step);
200  virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
201  virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
202  virtual Int_t GetByteCount() const {return 98;}
203  virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
204  virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
205  virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
206  virtual Int_t GetNmeshVertices() const;
207  const Double_t *GetNlow() const {return &fNlow[0];}
208  const Double_t *GetNhigh() const {return &fNhigh[0];}
209  Double_t GetZcoord(Double_t xc, Double_t yc, Double_t zc) const;
210  virtual void InspectShape() const;
211  virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
212  virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
213  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
214  void SetCtubDimensions(Double_t rmin, Double_t rmax, Double_t dz,
215  Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz,
216  Double_t tx, Double_t ty, Double_t tz);
217  virtual void SetDimensions(Double_t *param);
218  virtual void SetPoints(Double_t *points) const;
219  virtual void SetPoints(Float_t *points) const;
220 
221  ClassDef(TGeoCtub, 1) // cut tube segment class
222 };
223 
224 #endif
TGeoTube::SafetyS
static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Int_t skipz=0)
computes the closest distance from given point to this shape, according to option.
Definition: TGeoTube.cxx:866
TGeoTubeSeg::fC2
Double_t fC2
Definition: TGeoTube.h:98
TGeoCtub::DistFromInside
virtual 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 cut tube
Definition: TGeoTube.cxx:2892
TGeoCtub::GetAxisRange
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const
Get range of shape for a given axis.
Definition: TGeoTube.cxx:2714
TGeoTube::Safety
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const
computes the closest distance from given point to this shape, according to option.
Definition: TGeoTube.cxx:826
TGeoTubeSeg::InitTrigonometry
void InitTrigonometry()
Init frequently used trigonometric values.
Definition: TGeoTube.cxx:1295
TGeoCtub::GetByteCount
virtual Int_t GetByteCount() const
Definition: TGeoTube.h:202
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TGeoTube::DistFromInsideS
static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz)
Compute distance from inside point to surface of the tube (static) Boundary safe algorithm.
Definition: TGeoTube.cxx:286
TGeoTube::DistFromOutside
virtual 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
Compute distance from outside point to surface of the tube and safe distance Boundary safe algorithm.
Definition: TGeoTube.cxx:435
TGeoTube::fRmin
Double_t fRmin
Definition: TGeoTube.h:21
TGeoTube::GetMeshNumbers
virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
Definition: TGeoTube.cxx:1112
TGeoTubeSeg::fCm
Double_t fCm
Definition: TGeoTube.h:100
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGeoTubeSeg::ComputeNormalS
static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm, Double_t rmin, Double_t rmax, Double_t dz, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
Compute normal to closest surface from POINT.
Definition: TGeoTube.cxx:1408
TGeoCtub::DistFromOutside
virtual 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
compute distance from outside point to surface of the cut tube
Definition: TGeoTube.cxx:2749
TGeoTube::DistToTube
static void DistToTube(Double_t rsq, Double_t nsq, Double_t rdotn, Double_t radius, Double_t &b, Double_t &delta)
Static method computing the distance to a tube with given radius, starting from POINT along DIR direc...
Definition: TGeoTube.cxx:459
TGeoTubeSeg::SetTubsDimensions
void SetTubsDimensions(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Set dimensions of the tube segment.
Definition: TGeoTube.cxx:2196
TGeoCtub
A tube segment cut with 2 planes.
Definition: TGeoTube.h:169
TGeoTubeSeg::GetByteCount
virtual Int_t GetByteCount() const
Definition: TGeoTube.h:143
TGeoCtub::Safety_v
virtual 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.
Definition: TGeoTube.cxx:3272
TGeoTubeSeg::DistancetoPrimitive
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute closest distance from point px,py to each corner
Definition: TGeoTube.cxx:1445
TGeoTubeSeg::fS1
Double_t fS1
Definition: TGeoTube.h:95
TGeoTube::DistFromInside_v
virtual 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 specified by dirs. Store output in dist...
Definition: TGeoTube.cxx:1199
TGeoTubeSeg::Contains
virtual Bool_t Contains(const Double_t *point) const
test if point is inside this tube segment first check if point is inside the tube
Definition: TGeoTube.cxx:1436
TGeoTubeSeg::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoTube.cxx:2179
TGeoTube::ComputeNormal_v
virtual 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 coor...
Definition: TGeoTube.cxx:1191
TGeoTube::TGeoTube
TGeoTube()
Default constructor.
Definition: TGeoTube.cxx:127
TGeoTubeSeg::InspectShape
virtual void InspectShape() const
print shape parameters
Definition: TGeoTube.cxx:1935
TGeoCtub::Divide
virtual TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
Divide the tube along one axis.
Definition: TGeoTube.cxx:2951
Float_t
float Float_t
Definition: RtypesCore.h:57
TGeoCtub::GetMakeRuntimeShape
virtual 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
Definition: TGeoTube.cxx:2962
TGeoTube::Sizeof3D
virtual void Sizeof3D() const
fill size of this 3-D object
Definition: TGeoTube.cxx:1132
Int_t
int Int_t
Definition: RtypesCore.h:45
TGeoTubeSeg::GetMeshNumbers
virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
Definition: TGeoTube.cxx:2351
TGeoTube::ComputeBBox
virtual void ComputeBBox()
compute bounding box of the tube
Definition: TGeoTube.cxx:209
TGeoCtub::Capacity
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Definition: TGeoTube.cxx:2525
TGeoTubeSeg::GetPhi1
Double_t GetPhi1() const
Definition: TGeoTube.h:148
TGeoTubeSeg::GetBoundingCylinder
virtual void GetBoundingCylinder(Double_t *param) const
Fill vector param[4] with the bounding cylinder parameters.
Definition: TGeoTube.cxx:1898
TGeoCtub::SetPoints
virtual void SetPoints(Double_t *points) const
Create mesh points for the cut tube.
Definition: TGeoTube.cxx:3088
TGeoTubeSeg::Capacity
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Definition: TGeoTube.cxx:1313
TGeoCtub::fNhigh
Double_t fNhigh[3]
Definition: TGeoTube.h:173
TGeoTube::Contains
virtual Bool_t Contains(const Double_t *point) const
test if point is inside this tube
Definition: TGeoTube.cxx:261
TGeoTube::InspectShape
virtual void InspectShape() const
print shape parameters
Definition: TGeoTube.cxx:632
TGeoTubeSeg
A phi segment of a tube.
Definition: TGeoTube.h:89
TGeoTubeSeg::DistFromInside_v
virtual 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 specified by dirs. Store output in dist...
Definition: TGeoTube.cxx:2437
TGeoTube::DistFromOutside_v
virtual 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 specified by dirs. Store output in dist...
Definition: TGeoTube.cxx:1207
TGeoBBox.h
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGeant4Unit::cm
static constexpr double cm
Definition: TGeant4SystemOfUnits.h:112
TGeoTubeSeg::DistFromOutsideS
static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz, Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cm, Double_t sm, Double_t cdfi)
Static method to compute distance to arbitrary tube segment from outside point Boundary safe algorith...
Definition: TGeoTube.cxx:1522
TGeoTube::GetBoundingCylinder
virtual void GetBoundingCylinder(Double_t *param) const
Fill vector param[4] with the bounding cylinder parameters.
Definition: TGeoTube.cxx:589
b
#define b(i)
Definition: RSha256.hxx:100
bool
TGeoCtub::Safety
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const
computes the closest distance from given point to this shape, according to option.
Definition: TGeoTube.cxx:3002
TGeoTube::fRmax
Double_t fRmax
Definition: TGeoTube.h:22
TGeoCtub::ComputeBBox
virtual void ComputeBBox()
compute minimum bounding box of the ctub
Definition: TGeoTube.cxx:2534
TGeoTube::GetPointsOnSegments
virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const
Fills array with n random points located on the line segments of the shape mesh.
Definition: TGeoTube.cxx:934
TGeoTubeSeg::SetSegsAndPols
virtual void SetSegsAndPols(TBuffer3D &buff) const
Fill TBuffer3D structure for segments and polygons.
Definition: TGeoTube.cxx:1972
TGeoTube::GetNmeshVertices
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
Definition: TGeoTube.cxx:1101
TGeoTube::~TGeoTube
virtual ~TGeoTube()
destructor
Definition: TGeoTube.cxx:185
TGeoTube::GetDz
virtual Double_t GetDz() const
Definition: TGeoTube.h:68
TGeoTubeSeg::Contains_v
virtual 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.
Definition: TGeoTube.cxx:2419
TGeoTube::SetPoints
virtual void SetPoints(Double_t *points) const
create tube mesh points
Definition: TGeoTube.cxx:975
TGeoTube::GetAxisName
virtual const char * GetAxisName(Int_t iaxis) const
Returns name of axis IAXIS.
Definition: TGeoTube.cxx:543
TGeoCtub::GetZcoord
Double_t GetZcoord(Double_t xc, Double_t yc, Double_t zc) const
compute real Z coordinate of a point belonging to either lower or higher caps (z should be either +fD...
Definition: TGeoTube.cxx:2738
TBuffer3D
Generic 3D primitive description class.
Definition: TBuffer3D.h:18
TGeoTube::SetSegsAndPols
virtual void SetSegsAndPols(TBuffer3D &buff) const
Fill TBuffer3D structure for segments and polygons.
Definition: TGeoTube.cxx:671
TGeoTubeSeg::fC1
Double_t fC1
Definition: TGeoTube.h:96
TGeoTubeSeg::fCdfi
Double_t fCdfi
Definition: TGeoTube.h:101
TGeoTubeSeg::GetAxisRange
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const
Get range of shape for a given axis.
Definition: TGeoTube.cxx:1869
TGeoShape
Base abstract class for all shapes.
Definition: TGeoShape.h:26
TGeoTube::Contains_v
virtual 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.
Definition: TGeoTube.cxx:1181
TGeoTube::DistFromInside
virtual 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 tube Boundary safe algorithm.
Definition: TGeoTube.cxx:331
TGeoTube::ComputeNormal
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition: TGeoTube.cxx:218
TGeoTubeSeg::GetMakeRuntimeShape
virtual 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
Definition: TGeoTube.cxx:1912
TGeoCtub::DistFromInside_v
virtual 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 specified by dirs. Store output in dist...
Definition: TGeoTube.cxx:3254
TGeoCtub::GetNmeshVertices
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
Definition: TGeoTube.cxx:3180
TGeoTube::SetTubeDimensions
void SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz)
Set tube dimensions.
Definition: TGeoTube.cxx:909
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
s1
#define s1(x)
Definition: RSha256.hxx:91
TGeoTube::GetByteCount
virtual Int_t GetByteCount() const
Definition: TGeoTube.h:61
TGeoCtub::GetBuffer3D
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
Definition: TGeoTube.cxx:3190
TGeoCtub::SetDimensions
virtual void SetDimensions(Double_t *param)
Set dimensions of the cut tube starting from a list.
Definition: TGeoTube.cxx:3068
TGeoTube::HasRmin
Bool_t HasRmin() const
Definition: TGeoTube.h:69
TGeoTubeSeg::DistFromOutside
virtual 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
compute distance from outside point to surface of the tube segment fist localize point w....
Definition: TGeoTube.cxx:1779
TGeoTube
Cylindrical tube class.
Definition: TGeoTube.h:18
TGeoTube::GetAxisRange
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const
Get range of shape for a given axis.
Definition: TGeoTube.cxx:560
TGeoTube::DistancetoPrimitive
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute closest distance from point px,py to each corner
Definition: TGeoTube.cxx:272
TGeoTubeSeg::Safety_v
virtual 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.
Definition: TGeoTube.cxx:2455
TGeoCtub::GetNhigh
const Double_t * GetNhigh() const
Definition: TGeoTube.h:208
TGeoTubeSeg::SafetyS
static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2, Int_t skipz=0)
Static method to compute the closest distance from given point to this shape.
Definition: TGeoTube.cxx:2104
TGeoBBox
Box class.
Definition: TGeoBBox.h:18
TGeoTubeSeg::Divide
virtual TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
Divide this tube segment shape belonging to volume "voldiv" into ndiv volumes called divname,...
Definition: TGeoTube.cxx:1803
TGeoTube::fDz
Double_t fDz
Definition: TGeoTube.h:23
TGeoTubeSeg::DistFromInsideS
static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz, Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cm, Double_t sm, Double_t cdfi)
Compute distance from inside point to surface of the tube segment (static) Boundary safe algorithm.
Definition: TGeoTube.cxx:1457
TGeoTubeSeg::DistFromInside
virtual 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 tube segment Boundary safe algorithm.
Definition: TGeoTube.cxx:1505
TGeoCtub::GetPointsOnSegments
virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const
Fills array with n random points located on the line segments of the shape mesh.
Definition: TGeoTube.cxx:3080
TGeoTubeSeg::ComputeNormal_v
virtual 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 coor...
Definition: TGeoTube.cxx:2429
TGeoCtub::fNlow
Double_t fNlow[3]
Definition: TGeoTube.h:172
TGeoTubeSeg::AfterStreamer
virtual void AfterStreamer()
Function called after streaming an object of this class.
Definition: TGeoTube.cxx:1287
TGeoTubeSeg::MakeBuffer3D
virtual TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape.
Definition: TGeoTube.cxx:1951
TGeoTubeSeg::GetBuffer3D
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
Definition: TGeoTube.cxx:2379
TGeoTube::ComputeNormalS
static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm, Double_t rmin, Double_t rmax, Double_t dz)
Compute normal to closest surface from POINT.
Definition: TGeoTube.cxx:245
TGeoTube::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoTube.cxx:895
TGeoCtub::GetMeshNumbers
virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
Definition: TGeoTube.cxx:3172
TGeoCtub::Contains_v
virtual 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.
Definition: TGeoTube.cxx:3236
Double_t
double Double_t
Definition: RtypesCore.h:59
TGeoMatrix
Geometrical transformation package.
Definition: TGeoMatrix.h:41
TGeoCtub::ComputeNormal_v
virtual 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 coor...
Definition: TGeoTube.cxx:3246
TGeoTubeSeg::SetPoints
virtual void SetPoints(Double_t *points) const
Create tube segment mesh points.
Definition: TGeoTube.cxx:2267
TGeoTubeSeg::SetDimensions
virtual void SetDimensions(Double_t *param)
Set dimensions of the tube segment starting from a list.
Definition: TGeoTube.cxx:2213
TGeoTube::DistFromOutsideS
static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz)
Static method to compute distance from outside point to a tube with given parameters Boundary safe al...
Definition: TGeoTube.cxx:347
points
point * points
Definition: X3DBuffer.c:22
TGeoTube::GetRmin
virtual Double_t GetRmin() const
Definition: TGeoTube.h:66
TGeoCtub::Contains
virtual Bool_t Contains(const Double_t *point) const
check if point is contained in the cut tube check the lower cut plane
Definition: TGeoTube.cxx:2690
TGeoTube::MakeBuffer3D
virtual TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape.
Definition: TGeoTube.cxx:646
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGeoCtub::ComputeNormal
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition: TGeoTube.cxx:2638
TGeoTubeSeg::DistFromOutside_v
virtual 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 specified by dirs. Store output in dist...
Definition: TGeoTube.cxx:2445
TGeoTube::SetDimensions
virtual void SetDimensions(Double_t *param)
Set tube dimensions starting from a list.
Definition: TGeoTube.cxx:921
TGeoTube::GetBuffer3D
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
Definition: TGeoTube.cxx:1139
name
char name[80]
Definition: TGX11.cxx:110
TGeoCtub::SetCtubDimensions
void SetCtubDimensions(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz)
set dimensions of a cut tube
Definition: TGeoTube.cxx:3031
c2
return c2
Definition: legend2.C:14
TGeoCtub::~TGeoCtub
virtual ~TGeoCtub()
destructor
Definition: TGeoTube.cxx:2518
TGeoTube::Divide
virtual TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
Divide this tube shape belonging to volume "voldiv" into ndiv volumes called divname,...
Definition: TGeoTube.cxx:481
TGeoCtub::DistFromOutside_v
virtual 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 specified by dirs. Store output in dist...
Definition: TGeoTube.cxx:3262
TGeoCtub::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoTube.cxx:3047
TGeoTubeSeg::TGeoTubeSeg
TGeoTubeSeg()
Default constructor.
Definition: TGeoTube.cxx:1227
TGeoShape::Big
static Double_t Big()
Definition: TGeoShape.h:88
TGeoTubeSeg::fS2
Double_t fS2
Definition: TGeoTube.h:97
TGeoTubeSeg::~TGeoTubeSeg
virtual ~TGeoTubeSeg()
destructor
Definition: TGeoTube.cxx:1280
TGeoTubeSeg::fPhi1
Double_t fPhi1
Definition: TGeoTube.h:92
TGeoTubeSeg::GetPointsOnSegments
virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const
Fills array with n random points located on the line segments of the shape mesh.
Definition: TGeoTube.cxx:2228
TGeoTube::GetMakeRuntimeShape
virtual 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
Definition: TGeoTube.cxx:603
TGeoTubeSeg::fSm
Double_t fSm
Definition: TGeoTube.h:99
TGeoTubeSeg::GetNmeshVertices
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
Definition: TGeoTube.cxx:2362
TGeoTubeSeg::Sizeof3D
virtual void Sizeof3D() const
fill size of this 3-D object
Definition: TGeoTube.cxx:2372
TGeoCtub::InspectShape
virtual void InspectShape() const
print shape parameters
Definition: TGeoTube.cxx:2986
TGeoTube::IsCylType
virtual Bool_t IsCylType() const
Definition: TGeoTube.h:71
TGeoVolume
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:49
TGeoTubeSeg::GetPhi2
Double_t GetPhi2() const
Definition: TGeoTube.h:149
TGeoTube::Safety_v
virtual 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.
Definition: TGeoTube.cxx:1217
TGeoTubeSeg::Safety
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const
computes the closest distance from given point InitTrigonometry();to this shape, according to option.
Definition: TGeoTube.cxx:2057
TGeoTubeSeg::ComputeNormal
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition: TGeoTube.cxx:1377
TGeoCtub::GetNlow
const Double_t * GetNlow() const
Definition: TGeoTube.h:207
TGeoTube::GetRmax
virtual Double_t GetRmax() const
Definition: TGeoTube.h:67
TGeoCtub::TGeoCtub
TGeoCtub()
Definition: TGeoTube.cxx:2462
int
TGeoTube::Capacity
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Definition: TGeoTube.cxx:192
c1
return c1
Definition: legend1.C:41
TGeoTubeSeg::fPhi2
Double_t fPhi2
Definition: TGeoTube.h:93
TGeoTubeSeg::ComputeBBox
virtual void ComputeBBox()
compute bounding box of the tube segment
Definition: TGeoTube.cxx:1330