ROOT  6.06/09
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 #ifndef ROOT_TGeoBBox
16 #include "TGeoBBox.h"
17 #endif
18 
19 ////////////////////////////////////////////////////////////////////////////
20 // //
21 // TGeoTube - cylindrical tube class. A tube has 3 parameters : //
22 // Rmin - minimum radius //
23 // Rmax - maximum radius //
24 // dz - half length //
25 // //
26 ////////////////////////////////////////////////////////////////////////////
27 
28 class TGeoTube : public TGeoBBox
29 {
30 protected :
31 // data members
32  Double_t fRmin; // inner radius
33  Double_t fRmax; // outer radius
34  Double_t fDz; // half length
35 // methods
36 
37 public:
38  // constructors
39  TGeoTube();
40  TGeoTube(Double_t rmin, Double_t rmax, Double_t dz);
41  TGeoTube(const char * name, Double_t rmin, Double_t rmax, Double_t dz);
42  TGeoTube(Double_t *params);
43  // destructor
44  virtual ~TGeoTube();
45  // methods
46 
47  virtual Double_t Capacity() const;
48  static Double_t Capacity(Double_t rmin, Double_t rmax, Double_t dz);
49  virtual void ComputeBBox();
50  virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
51  virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
52  static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm,
53  Double_t rmin, Double_t rmax, Double_t dz);
54  virtual Bool_t Contains(const Double_t *point) const;
55  virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
56  static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz);
57  virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
58  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
59  virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
60  static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz);
61  virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
62  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
63  virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
64  static void DistToTube(Double_t rsq, Double_t nsq, Double_t rdotn, Double_t radius, Double_t &b, Double_t &delta);
65  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
66  virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
67  Double_t start, Double_t step);
68  virtual const char *GetAxisName(Int_t iaxis) const;
69  virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
70  virtual void GetBoundingCylinder(Double_t *param) const;
71  virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
72  virtual Int_t GetByteCount() const {return 48;}
73  virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
74  virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
75  virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
76  virtual Int_t GetNmeshVertices() const;
77  virtual Double_t GetRmin() const {return fRmin;}
78  virtual Double_t GetRmax() const {return fRmax;}
79  virtual Double_t GetDz() const {return fDz;}
80  Bool_t HasRmin() const {return (fRmin>0)?kTRUE:kFALSE;}
81  virtual void InspectShape() const;
82  virtual Bool_t IsCylType() const {return kTRUE;}
83  virtual TBuffer3D *MakeBuffer3D() const;
84  virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
85  virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
86  static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Int_t skipz=0);
87  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
88  void SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz);
89  virtual void SetDimensions(Double_t *param);
90  virtual void SetPoints(Double_t *points) const;
91  virtual void SetPoints(Float_t *points) const;
92  virtual void SetSegsAndPols(TBuffer3D &buff) const;
93  virtual void Sizeof3D() const;
94 
95  ClassDef(TGeoTube, 1) // cylindrical tube class
96 
97 };
98 
99 ////////////////////////////////////////////////////////////////////////////
100 // //
101 // TGeoTubeSeg - a phi segment of a tube. Has 5 parameters : //
102 // - the same 3 as a tube; //
103 // - first phi limit (in degrees) //
104 // - second phi limit //
105 // //
106 ////////////////////////////////////////////////////////////////////////////
107 
108 class TGeoTubeSeg : public TGeoTube
109 {
110 protected:
111  // data members
112  Double_t fPhi1; // first phi limit
113  Double_t fPhi2; // second phi limit
114  // Transient trigonometric data
115  Double_t fS1; //!sin(phi1)
116  Double_t fC1; //!cos(phi1)
117  Double_t fS2; //!sin(phi2)
118  Double_t fC2; //!cos(phi2)
119  Double_t fSm; //!sin(0.5*(phi1+phi2))
120  Double_t fCm; //!cos(0.5*(phi1+phi2))
121  Double_t fCdfi; //!cos(0.5*(phi1-phi2))
122 
123  void InitTrigonometry();
124 
125 public:
126  // constructors
127  TGeoTubeSeg();
128  TGeoTubeSeg(Double_t rmin, Double_t rmax, Double_t dz,
129  Double_t phi1, Double_t phi2);
130  TGeoTubeSeg(const char * name, Double_t rmin, Double_t rmax, Double_t dz,
131  Double_t phi1, Double_t phi2);
132  TGeoTubeSeg(Double_t *params);
133  // destructor
134  virtual ~TGeoTubeSeg();
135  // methods
136  virtual void AfterStreamer();
137  virtual Double_t Capacity() const;
138  static Double_t Capacity(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2);
139  virtual void ComputeBBox();
140  virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
141  virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
142  static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm,
143  Double_t rmin, Double_t rmax, Double_t dz,
145  virtual Bool_t Contains(const Double_t *point) const;
146  virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
147  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
148  static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir,Double_t rmin, Double_t rmax, Double_t dz,
149  Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cm, Double_t sm, Double_t cdfi);
150  virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
151  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
152  virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
153  static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz,
154  Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cm, Double_t sm, Double_t cdfi);
155  virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
156  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
157  virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
158  virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
159  Double_t start, Double_t step);
160  virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
161  virtual void GetBoundingCylinder(Double_t *param) const;
162  virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
163  virtual Int_t GetByteCount() const {return 56;}
164  virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
165  virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
166  virtual Int_t GetNmeshVertices() const;
167  virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
168  Double_t GetPhi1() const {return fPhi1;}
169  Double_t GetPhi2() const {return fPhi2;}
170  virtual void InspectShape() const;
171  virtual TBuffer3D *MakeBuffer3D() const;
172  virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
173  virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
174  static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz,
175  Double_t phi1, Double_t phi2, Int_t skipz=0);
176  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
177  void SetTubsDimensions(Double_t rmin, Double_t rmax, Double_t dz,
178  Double_t phi1, Double_t phi2);
179  virtual void SetDimensions(Double_t *param);
180  virtual void SetPoints(Double_t *points) const;
181  virtual void SetPoints(Float_t *points) const;
182  virtual void SetSegsAndPols(TBuffer3D &buff) const;
183  virtual void Sizeof3D() const;
184 
185  ClassDef(TGeoTubeSeg, 1) // cylindrical tube segment class
186 };
187 
188 ////////////////////////////////////////////////////////////////////////////
189 // //
190 // TGeoCtub - a tube segment cut with 2 planes. Has 11 parameters : //
191 // - the same 5 as a tube segment; //
192 // - x,y,z components of the normal to the -dZ cut plane in //
193 // point (0,0,-dZ) //
194 // - x,y,z components of the normal to the +dZ cut plane in //
195 // point (0,0,dZ) //
196 // //
197 ////////////////////////////////////////////////////////////////////////////
198 
199 class TGeoCtub : public TGeoTubeSeg
200 {
201 protected:
202  // data members
203  Double_t fNlow[3]; // normal to lower cut plane
204  Double_t fNhigh[3]; // normal to highet cut plane
205 
206 public:
207  // constructors
208  TGeoCtub();
209  TGeoCtub(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2,
210  Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
211  TGeoCtub(const char *name, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2,
212  Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
213  TGeoCtub(Double_t *params);
214  // destructor
215  virtual ~TGeoCtub();
216  // methods
217  virtual Double_t Capacity() const;
218  virtual void ComputeBBox();
219  virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
220  virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
221  virtual Bool_t Contains(const Double_t *point) const;
222  virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
223  virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
224  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
225  virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
226  virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
227  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
228  virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
229  virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
230  Double_t start, Double_t step);
231  virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
232  virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
233  virtual Int_t GetByteCount() const {return 98;}
234  virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
235  virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
236  virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
237  virtual Int_t GetNmeshVertices() const;
238  const Double_t *GetNlow() const {return &fNlow[0];}
239  const Double_t *GetNhigh() const {return &fNhigh[0];}
240  Double_t GetZcoord(Double_t xc, Double_t yc, Double_t zc) const;
241  virtual void InspectShape() const;
242  virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
243  virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
244  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
245  void SetCtubDimensions(Double_t rmin, Double_t rmax, Double_t dz,
246  Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz,
247  Double_t tx, Double_t ty, Double_t tz);
248  virtual void SetDimensions(Double_t *param);
249  virtual void SetPoints(Double_t *points) const;
250  virtual void SetPoints(Float_t *points) const;
251 
252  ClassDef(TGeoCtub, 1) // cut tube segment class
253 };
254 
255 #endif
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
Definition: TGeoTube.cxx:2380
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:1428
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 specisied by dirs. Store output in dist...
Definition: TGeoTube.cxx:1199
Double_t fCm
sin(0.5*(phi1+phi2))
Definition: TGeoTube.h:120
Double_t fPhi2
Definition: TGeoTube.h:113
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
Definition: TGeoTube.cxx:2354
Double_t fPhi1
Definition: TGeoTube.h:112
virtual void SetPoints(Double_t *points) const
Create tube segment mesh points.
Definition: TGeoTube.cxx:2259
virtual void ComputeBBox()
compute bounding box of the tube
Definition: TGeoTube.cxx:194
void InitTrigonometry()
cos(0.5*(phi1-phi2))
Definition: TGeoTube.cxx:1287
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:3237
float Float_t
Definition: RtypesCore.h:53
Double_t fS1
Definition: TGeoTube.h:115
const char Option_t
Definition: RtypesCore.h:62
virtual void SetPoints(Double_t *points) const
Create mesh points for the cut tube.
Definition: TGeoTube.cxx:3089
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition: TGeoTube.cxx:1369
TCanvas * c1
Definition: legend1.C:2
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition: TGeoTube.cxx:203
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:919
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:2952
virtual void Sizeof3D() const
Definition: TGeoTube.cxx:2373
virtual void ComputeBBox()
compute bounding box of the tube segment
Definition: TGeoTube.cxx:1322
Double_t fC2
sin(phi2)
Definition: TGeoTube.h:118
virtual Bool_t Contains(const Double_t *point) const
test if point is inside this tube
Definition: TGeoTube.cxx:246
virtual void ComputeBBox()
compute minimum bounding box of the ctub
Definition: TGeoTube.cxx:2535
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
Definition: TGeoTube.cxx:1131
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:3032
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual void GetBoundingCylinder(Double_t *param) const
— Fill vector param[4] with the bounding cylinder parameters.
Definition: TGeoTube.cxx:1890
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:1400
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 specisied by dirs. Store output in dist...
Definition: TGeoTube.cxx:3263
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:3081
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:2188
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute closest distance from point px,py to each corner
Definition: TGeoTube.cxx:1437
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoTube.cxx:2171
Double_t GetPhi2() const
Definition: TGeoTube.h:169
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute closest distance from point px,py to each corner
Definition: TGeoTube.cxx:257
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:3273
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
Definition: TGeoTube.cxx:3191
virtual void InspectShape() const
print shape parameters
Definition: TGeoTube.cxx:2987
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:2963
virtual void SetSegsAndPols(TBuffer3D &buff) const
Fill TBuffer3D structure for segments and polygons.
Definition: TGeoTube.cxx:656
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:2715
const Double_t * GetNlow() const
Definition: TGeoTube.h:238
virtual void InspectShape() const
print shape parameters
Definition: TGeoTube.cxx:617
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:1209
Double_t fDz
Definition: TGeoTube.h:34
virtual void SetDimensions(Double_t *param)
Set tube dimensions starting from a list.
Definition: TGeoTube.cxx:906
char * out
Definition: TBase64.cxx:29
virtual Int_t GetByteCount() const
Definition: TGeoTube.h:163
point * points
Definition: X3DBuffer.c:20
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:1514
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 specisied by dirs. Store output in dist...
Definition: TGeoTube.cxx:3255
Double_t fC1
sin(phi1)
Definition: TGeoTube.h:116
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:2739
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:2456
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:271
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 specisied by dirs. Store output in dist...
Definition: TGeoTube.cxx:2446
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:811
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoTube.cxx:880
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:2893
virtual Double_t GetRmin() const
Definition: TGeoTube.h:77
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:444
virtual void SetDimensions(Double_t *param)
Set dimensions of the cut tube starting from a list.
Definition: TGeoTube.cxx:3069
virtual void InspectShape() const
print shape parameters
Definition: TGeoTube.cxx:1927
Generic 3D primitive description class.
Definition: TBuffer3D.h:19
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:230
Double_t fCdfi
cos(0.5*(phi1+phi2))
Definition: TGeoTube.h:121
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, from start position with the given step.
Definition: TGeoTube.cxx:466
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:2430
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:3173
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:1097
virtual Int_t GetByteCount() const
Definition: TGeoTube.h:72
const Double_t * GetNhigh() const
Definition: TGeoTube.h:239
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:1183
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:851
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition: TGeoTube.cxx:2639
virtual void Sizeof3D() const
Definition: TGeoTube.cxx:1124
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:420
Double_t GetPhi1() const
Definition: TGeoTube.h:168
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
Definition: TGeoTube.cxx:1086
return c2
Definition: legend2.C:14
virtual Int_t GetByteCount() const
Definition: TGeoTube.h:233
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:1449
virtual TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape.
Definition: TGeoTube.cxx:631
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:1904
double Double_t
Definition: RtypesCore.h:55
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:2420
Double_t fS2
cos(phi1)
Definition: TGeoTube.h:117
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:2220
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:2049
virtual void AfterStreamer()
Function called after streaming an object of this class.
Definition: TGeoTube.cxx:1279
Double_t fSm
cos(phi2)
Definition: TGeoTube.h:119
Bool_t HasRmin() const
Definition: TGeoTube.h:80
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:3247
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:2096
static Double_t Big()
Definition: TGeoShape.h:98
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:2750
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:1497
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:588
#define name(a, b)
Definition: linkTestLib0.cpp:5
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:2691
virtual TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape.
Definition: TGeoTube.cxx:1943
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:545
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
Definition: TGeoTube.cxx:3181
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:1795
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:1771
Double_t fRmin
Definition: TGeoTube.h:32
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:3003
virtual const char * GetAxisName(Int_t iaxis) const
Returns name of axis IAXIS.
Definition: TGeoTube.cxx:528
virtual ~TGeoCtub()
destructor
Definition: TGeoTube.cxx:2519
virtual Bool_t IsCylType() const
Definition: TGeoTube.h:82
virtual void SetSegsAndPols(TBuffer3D &buff) const
Fill TBuffer3D structure for segments and polygons.
Definition: TGeoTube.cxx:1964
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:1173
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:332
virtual void GetBoundingCylinder(Double_t *param) const
— Fill vector param[4] with the bounding cylinder parameters.
Definition: TGeoTube.cxx:574
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 specisied by dirs. Store output in dist...
Definition: TGeoTube.cxx:1191
virtual Double_t GetDz() const
Definition: TGeoTube.h:79
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:316
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Definition: TGeoTube.cxx:2526
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Definition: TGeoTube.cxx:1305
virtual void SetDimensions(Double_t *param)
Set dimensions of the tube segment starting from a list.
Definition: TGeoTube.cxx:2205
const Bool_t kTRUE
Definition: Rtypes.h:91
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:1861
virtual ~TGeoTube()
destructor
Definition: TGeoTube.cxx:170
double norm(double *x, double *p)
Definition: unuranDistr.cxx:40
virtual ~TGeoTubeSeg()
destructor
Definition: TGeoTube.cxx:1272
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoTube.cxx:3048
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:2343
void SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz)
Set tube dimensions.
Definition: TGeoTube.cxx:894
Double_t fRmax
Definition: TGeoTube.h:33
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Definition: TGeoTube.cxx:177
virtual Double_t GetRmax() const
Definition: TGeoTube.h:78
virtual void SetPoints(Double_t *points) const
create tube mesh points
Definition: TGeoTube.cxx:960
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 specisied by dirs. Store output in dist...
Definition: TGeoTube.cxx:2438