Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
17class TGeoTube : public TGeoBBox
18{
19protected :
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 TGeoTube(const TGeoTube&) = delete;
27 TGeoTube& operator=(const TGeoTube&) = delete;
28
29public:
30 // constructors
31 TGeoTube();
32 TGeoTube(Double_t rmin, Double_t rmax, Double_t dz);
33 TGeoTube(const char * name, Double_t rmin, Double_t rmax, Double_t dz);
34 TGeoTube(Double_t *params);
35 // destructor
36 virtual ~TGeoTube();
37 // methods
38
39 virtual Double_t Capacity() const;
40 static Double_t Capacity(Double_t rmin, Double_t rmax, Double_t dz);
41 virtual void ComputeBBox();
42 virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
43 virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
44 static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm,
45 Double_t rmin, Double_t rmax, Double_t dz);
46 virtual Bool_t Contains(const Double_t *point) const;
47 virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
48 static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz);
49 virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
50 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
51 virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
52 static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz);
53 virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
54 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
55 virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
56 static void DistToTube(Double_t rsq, Double_t nsq, Double_t rdotn, Double_t radius, Double_t &b, Double_t &delta);
57 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
58 virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
59 Double_t start, Double_t step);
60 virtual const char *GetAxisName(Int_t iaxis) const;
61 virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
62 virtual void GetBoundingCylinder(Double_t *param) const;
63 virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
64 virtual Int_t GetByteCount() const {return 48;}
65 virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
66 virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
67 virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
68 virtual Int_t GetNmeshVertices() const;
69 virtual Double_t GetRmin() const {return fRmin;}
70 virtual Double_t GetRmax() const {return fRmax;}
71 virtual Double_t GetDz() const {return fDz;}
72 Bool_t HasRmin() const {return (fRmin>0)?kTRUE:kFALSE;}
73 virtual void InspectShape() const;
74 virtual Bool_t IsCylType() const {return kTRUE;}
75 virtual TBuffer3D *MakeBuffer3D() const;
76 virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
77 virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
78 static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Int_t skipz=0);
79 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
80 void SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz);
81 virtual void SetDimensions(Double_t *param);
82 virtual void SetPoints(Double_t *points) const;
83 virtual void SetPoints(Float_t *points) const;
84 virtual void SetSegsAndPols(TBuffer3D &buff) const;
85 virtual void Sizeof3D() const;
86
87 ClassDef(TGeoTube, 1) // cylindrical tube class
88
89};
90
91class TGeoTubeSeg : public TGeoTube
92{
93protected:
94 // data members
95 Double_t fPhi1; // first phi limit
96 Double_t fPhi2; // second phi limit
97 // Transient trigonometric data
98 Double_t fS1; // sin(phi1)
99 Double_t fC1; // cos(phi1)
100 Double_t fS2; // sin(phi2)
101 Double_t fC2; // cos(phi2)
102 Double_t fSm; // sin(0.5*(phi1+phi2))
103 Double_t fCm; // cos(0.5*(phi1+phi2))
104 Double_t fCdfi; // cos(0.5*(phi1-phi2))
105
106 void InitTrigonometry();
107
108public:
109 // constructors
110 TGeoTubeSeg();
111 TGeoTubeSeg(Double_t rmin, Double_t rmax, Double_t dz,
112 Double_t phi1, Double_t phi2);
113 TGeoTubeSeg(const char * name, Double_t rmin, Double_t rmax, Double_t dz,
114 Double_t phi1, Double_t phi2);
115 TGeoTubeSeg(Double_t *params);
116 // destructor
117 virtual ~TGeoTubeSeg();
118 // methods
119 virtual void AfterStreamer();
120 virtual Double_t Capacity() const;
121 static Double_t Capacity(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2);
122 virtual void ComputeBBox();
123 virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
124 virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
125 static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm,
126 Double_t rmin, Double_t rmax, Double_t dz,
128 virtual Bool_t Contains(const Double_t *point) const;
129 virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
130 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
131 static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir,Double_t rmin, Double_t rmax, Double_t dz,
133 virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
134 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
135 virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
136 static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz,
138 virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
139 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
140 virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
141 virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
142 Double_t start, Double_t step);
143 virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
144 virtual void GetBoundingCylinder(Double_t *param) const;
145 virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
146 virtual Int_t GetByteCount() const {return 56;}
147 virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
148 virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
149 virtual Int_t GetNmeshVertices() const;
150 virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
151 Double_t GetPhi1() const {return fPhi1;}
152 Double_t GetPhi2() const {return fPhi2;}
153 virtual void InspectShape() const;
154 virtual TBuffer3D *MakeBuffer3D() const;
155 virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
156 virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
157 static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz,
158 Double_t phi1, Double_t phi2, Int_t skipz=0);
159 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
160 void SetTubsDimensions(Double_t rmin, Double_t rmax, Double_t dz,
161 Double_t phi1, Double_t phi2);
162 virtual void SetDimensions(Double_t *param);
163 virtual void SetPoints(Double_t *points) const;
164 virtual void SetPoints(Float_t *points) const;
165 virtual void SetSegsAndPols(TBuffer3D &buff) const;
166 virtual void Sizeof3D() const;
167
168 ClassDef(TGeoTubeSeg, 2) // cylindrical tube segment class
169};
170
171class TGeoCtub : public TGeoTubeSeg
172{
173protected:
174 // data members
175 Double_t fNlow[3]; // normal to lower cut plane
176 Double_t fNhigh[3]; // normal to higher cut plane
177
178public:
179 // constructors
180 TGeoCtub();
181 TGeoCtub(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2,
182 Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
183 TGeoCtub(const char *name, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2,
184 Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
185 TGeoCtub(Double_t *params);
186 // destructor
187 virtual ~TGeoCtub();
188 // methods
189 virtual Double_t Capacity() const;
190 virtual void ComputeBBox();
191 virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
192 virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
193 virtual Bool_t Contains(const Double_t *point) const;
194 virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
195 virtual Double_t DistFromInside(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 DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
198 virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
199 Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
200 virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
201 virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
202 Double_t start, Double_t step);
203 virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
204 virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
205 virtual Int_t GetByteCount() const {return 98;}
206 virtual Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const;
207 virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
208 virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
209 virtual Int_t GetNmeshVertices() const;
210 const Double_t *GetNlow() const {return &fNlow[0];}
211 const Double_t *GetNhigh() const {return &fNhigh[0];}
212 Double_t GetZcoord(Double_t xc, Double_t yc, Double_t zc) const;
213 virtual void InspectShape() const;
214 virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
215 virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
216 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
217 void SetCtubDimensions(Double_t rmin, Double_t rmax, Double_t dz,
218 Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz,
219 Double_t tx, Double_t ty, Double_t tz);
220 virtual void SetDimensions(Double_t *param);
221 virtual void SetPoints(Double_t *points) const;
222 virtual void SetPoints(Float_t *points) const;
223
224 ClassDef(TGeoCtub, 1) // cut tube segment class
225};
226
227#endif
#define b(i)
Definition RSha256.hxx:100
#define s1(x)
Definition RSha256.hxx:91
int Int_t
Definition RtypesCore.h:45
const Bool_t kFALSE
Definition RtypesCore.h:101
bool Bool_t
Definition RtypesCore.h:63
double Double_t
Definition RtypesCore.h:59
float Float_t
Definition RtypesCore.h:57
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
char name[80]
Definition TGX11.cxx:110
point * points
Definition X3DBuffer.c:22
Generic 3D primitive description class.
Definition TBuffer3D.h:18
Box class.
Definition TGeoBBox.h:18
The cut tubes constructor has the form:
Definition TGeoTube.h:172
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.
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
virtual Bool_t Contains(const Double_t *point) const
check if point is contained in the cut tube check the lower cut plane
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
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...
virtual void ComputeBBox()
compute minimum bounding box of the ctub
virtual ~TGeoCtub()
destructor
const Double_t * GetNlow() const
Definition TGeoTube.h:210
virtual void SetPoints(Double_t *points) const
Create mesh points for the cut tube.
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...
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
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.
virtual void SetDimensions(Double_t *param)
Set dimensions of the cut tube starting from a list.
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const
Get range of shape for a given axis.
virtual void InspectShape() const
print shape parameters
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...
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.
virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
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...
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
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.
virtual Int_t GetByteCount() const
Definition TGeoTube.h:205
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
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
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.
Double_t fNlow[3]
Definition TGeoTube.h:175
Double_t fNhigh[3]
Definition TGeoTube.h:176
const Double_t * GetNhigh() const
Definition TGeoTube.h:211
Geometrical transformation package.
Definition TGeoMatrix.h:41
Base abstract class for all shapes.
Definition TGeoShape.h:26
static Double_t Big()
Definition TGeoShape.h:88
A tube segment is a tube having a range in phi.
Definition TGeoTube.h:92
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,...
virtual void Sizeof3D() const
fill size of this 3-D object
virtual void AfterStreamer()
Function called after streaming an object of this class.
virtual ~TGeoTubeSeg()
destructor
TGeoTubeSeg()
Default constructor.
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
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...
Double_t fPhi1
Definition TGeoTube.h:95
virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
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...
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...
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
virtual void ComputeBBox()
compute bounding box of the tube segment
Double_t fPhi2
Definition TGeoTube.h:96
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
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.
Double_t fC2
Definition TGeoTube.h:101
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
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....
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...
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Double_t fCdfi
Definition TGeoTube.h:104
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const
Get range of shape for a given axis.
virtual void SetPoints(Double_t *points) const
Create tube segment mesh points.
Double_t fCm
Definition TGeoTube.h:103
virtual Int_t GetByteCount() const
Definition TGeoTube.h:146
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.
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.
void InitTrigonometry()
Init frequently used trigonometric values.
void SetTubsDimensions(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Set dimensions of the tube segment.
virtual TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape.
Double_t GetPhi2() const
Definition TGeoTube.h:152
Double_t fC1
Definition TGeoTube.h:99
Double_t fS1
Definition TGeoTube.h:98
Double_t fS2
Definition TGeoTube.h:100
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.
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.
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.
virtual void SetSegsAndPols(TBuffer3D &buff) const
Fill TBuffer3D structure for segments and polygons.
virtual void GetBoundingCylinder(Double_t *param) const
Fill vector param[4] with the bounding cylinder parameters.
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
virtual void InspectShape() const
print shape parameters
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.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute closest distance from point px,py to each corner
Double_t fSm
Definition TGeoTube.h:102
Double_t GetPhi1() const
Definition TGeoTube.h:151
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.
virtual void SetDimensions(Double_t *param)
Set dimensions of the tube segment starting from a list.
Cylindrical tube class.
Definition TGeoTube.h:18
virtual Bool_t IsCylType() const
Definition TGeoTube.h:74
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:352
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.
virtual Double_t GetRmin() const
Definition TGeoTube.h:69
virtual void InspectShape() const
print shape parameters
Definition TGeoTube.cxx:652
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Definition TGeoTube.cxx:214
virtual const char * GetAxisName(Int_t iaxis) const
Returns name of axis IAXIS.
Definition TGeoTube.cxx:563
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:479
void SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz)
Set tube dimensions.
Definition TGeoTube.cxx:929
virtual void GetBoundingCylinder(Double_t *param) const
Fill vector param[4] with the bounding cylinder parameters.
Definition TGeoTube.cxx:609
virtual Int_t GetByteCount() const
Definition TGeoTube.h:64
virtual Double_t GetDz() const
Definition TGeoTube.h:71
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition TGeoTube.cxx:915
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...
virtual void SetSegsAndPols(TBuffer3D &buff) const
Fill TBuffer3D structure for segments and polygons.
Definition TGeoTube.cxx:691
Double_t fRmin
Definition TGeoTube.h:21
virtual void SetDimensions(Double_t *param)
Set tube dimensions starting from a list.
Definition TGeoTube.cxx:941
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:455
Double_t fDz
Definition TGeoTube.h:23
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:368
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:846
virtual void ComputeBBox()
compute bounding box of the tube
Definition TGeoTube.cxx:231
TGeoTube & operator=(const TGeoTube &)=delete
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition TGeoTube.cxx:240
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:886
Double_t fRmax
Definition TGeoTube.h:22
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute closest distance from point px,py to each corner
Definition TGeoTube.cxx:294
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:954
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
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:580
virtual ~TGeoTube()
destructor
Definition TGeoTube.cxx:207
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...
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
virtual void Sizeof3D() const
fill size of this 3-D object
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:267
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.
virtual Bool_t Contains(const Double_t *point) const
test if point is inside this tube
Definition TGeoTube.cxx:283
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:623
virtual void SetPoints(Double_t *points) const
create tube mesh points
Definition TGeoTube.cxx:995
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...
Bool_t HasRmin() const
Definition TGeoTube.h:72
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:501
virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
virtual Double_t GetRmax() const
Definition TGeoTube.h:70
virtual TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape.
Definition TGeoTube.cxx:666
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:308
TGeoTube()
Default constructor.
Definition TGeoTube.cxx:149
TGeoTube(const TGeoTube &)=delete
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:49
return c1
Definition legend1.C:41
return c2
Definition legend2.C:14