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