222 if (
norm[0] * dir[0] +
norm[1] * dir[1] +
norm[2] * dir[2] < 0) {
259 if (
norm[0] * dir[0] +
norm[1] * dir[1] +
norm[2] * dir[2] < 0) {
273 Double_t r2 = point[0] * point[0] + point[1] * point[1];
298 Double_t rsq = point[0] * point[0] + point[1] * point[1];
315 zi = point[2] + sr * dir[2];
321 zi = point[2] + sr * dir[2];
342 zi = point[2] + sr * dir[2];
351 zi = point[2] + sr * dir[2];
357 zi = point[2] + sr * dir[2];
397 if (point[2] <= -
dz) {
400 snxt = (-
dz - point[2]) / dir[2];
401 xp = point[0] +
snxt * dir[0];
402 yp = point[1] +
snxt * dir[1];
408 if (point[2] >=
dz) {
411 snxt = (
dz - point[2]) / dir[2];
412 xp = point[0] +
snxt * dir[0];
413 yp = point[1] +
snxt * dir[1];
421 Double_t rsq = point[0] * point[0] + point[1] * point[1];
450 if (point[2] * dir[2] < 0)
475 zp = point[2] +
snxt * dir[2];
490 zp = point[2] +
snxt * dir[2];
496 zp = point[2] +
snxt * dir[2];
507 zp = point[2] +
din * dir[2];
524 zp = point[2] +
dout * dir[2];
531 zp = point[2] +
dout * dir[2];
573 Double_t rsq = point[0] * point[0] + point[1] * point[1];
576 Double_t a = dir[0] * dir[0] + dir[1] * dir[1] -
tz *
tz * dir[2] * dir[2];
577 b = point[0] * dir[0] + point[1] * dir[1] -
tz *
rc * dir[2];
604 const Int_t numPoints = 4 *
n;
628 Error(
"Divide",
"division of a cone on R not implemented");
639 for (
id = 0;
id < ndiv;
id++) {
640 voldiv->AddNodeOffset(vol,
id, start +
id * step + step / 2, opt.
Data());
649 for (
id = 0;
id < ndiv;
id++) {
660 voldiv->AddNodeOffset(vol,
id, start +
id * step + step / 2, opt.
Data());
664 default:
Error(
"Divide",
"Wrong axis type for division");
return nullptr;
675 case 2:
return "PHI";
677 default:
return "undefined";
710 param[0] *= param[0];
712 param[1] *= param[1];
726 Error(
"GetMakeRuntimeShape",
"invalid mother");
853 printf(
" Bounding box:\n");
866 for (i = 0; i < 4; i++) {
867 for (
j = 0;
j <
n;
j++) {
869 buffer.
fSegs[(i *
n +
j) * 3 + 1] = i *
n +
j;
870 buffer.
fSegs[(i *
n +
j) * 3 + 2] = i *
n +
j + 1;
872 buffer.
fSegs[(i *
n +
j - 1) * 3 + 2] = i *
n;
874 for (i = 4; i < 6; i++) {
875 for (
j = 0;
j <
n;
j++) {
876 buffer.
fSegs[(i *
n +
j) * 3] =
c + 1;
877 buffer.
fSegs[(i *
n +
j) * 3 + 1] = (i - 4) *
n +
j;
878 buffer.
fSegs[(i *
n +
j) * 3 + 2] = (i - 2) *
n +
j;
881 for (i = 6; i < 8; i++) {
882 for (
j = 0;
j <
n;
j++) {
884 buffer.
fSegs[(i *
n +
j) * 3 + 1] = 2 * (i - 6) *
n +
j;
885 buffer.
fSegs[(i *
n +
j) * 3 + 2] = (2 * (i - 6) + 1) *
n +
j;
891 for (
j = 0;
j <
n;
j++) {
902 for (
j = 0;
j <
n;
j++) {
913 for (
j = 0;
j <
n;
j++) {
919 buffer.
fPols[
indx + 4] = ((i - 2) * 2 + 1) *
n +
j;
924 for (
j = 0;
j <
n;
j++) {
930 buffer.
fPols[
indx + 3] = ((i - 2) * 2 + 1) *
n +
j;
998 out <<
" dz = " <<
fDz <<
";" << std::endl;
999 out <<
" rmin1 = " <<
fRmin1 <<
";" << std::endl;
1000 out <<
" rmax1 = " <<
fRmax1 <<
";" << std::endl;
1001 out <<
" rmin2 = " <<
fRmin2 <<
";" << std::endl;
1002 out <<
" rmax2 = " <<
fRmax2 <<
";" << std::endl;
1004 <<
"\", dz,rmin1,rmax1,rmin2,rmax2);" << std::endl;
1022 Warning(
"SetConeDimensions",
"rmin1>rmax1 Switch rmin1<->rmax1");
1044 Warning(
"SetConeDimensions",
"rmin2>rmax2 Switch rmin2<->rmax2");
1088 for (
j = 0;
j <
n;
j++) {
1095 for (
j = 0;
j <
n;
j++) {
1102 for (
j = 0;
j <
n;
j++) {
1109 for (
j = 0;
j <
n;
j++) {
1132 for (
j = 0;
j <
n;
j++) {
1139 for (
j = 0;
j <
n;
j++) {
1146 for (
j = 0;
j <
n;
j++) {
1153 for (
j = 0;
j <
n;
j++) {
1278 :
TGeoCone(), fPhi1(0.), fPhi2(0.), fS1(0.), fC1(0.), fS2(0.), fC2(0.), fSm(0.), fCm(0.), fCdfi(0.)
1338 :
TGeoCone(0, 0, 0, 0, 0), fPhi1(0.), fPhi2(0.), fS1(0.), fC1(0.), fS2(0.), fC2(0.), fSm(0.), fCm(0.), fCdfi(0.)
1493 if (
norm[0] * dir[0] +
norm[1] * dir[1] +
norm[2] * dir[2] < 0) {
1540 if (
norm[0] * dir[0] +
norm[1] * dir[1] +
norm[2] * dir[2] < 0) {
1593 Double_t r0sq = point[0] * point[0] + point[1] * point[1];
1596 Double_t a = dir[0] * dir[0] + dir[1] * dir[1] -
fz *
fz * dir[2] * dir[2];
1597 Double_t b = point[0] * dir[0] + point[1] * dir[1] -
fz *
rc * dir[2];
1671 Double_t rsq = point[0] * point[0] + point[1] * point[1];
1694 xi = point[0] +
sfmin * dir[0];
1695 yi = point[1] +
sfmin * dir[1];
1696 if (
yi * cm - xi *
sm < 0)
1712 xi = point[0] +
sfmin * dir[0];
1713 yi = point[1] +
sfmin * dir[1];
1714 if (
yi * cm - xi *
sm > 0)
1736 return TGeoConeSeg::DistFromInsideS(point, dir,
fDz,
fRmin1,
fRmax1,
fRmin2,
fRmax2,
fC1,
fS1,
fC2,
fS2,
fCm,
fSm,
1760 if (point[2] * dir[2] >= 0)
1763 xi = point[0] + s * dir[0];
1764 yi = point[1] + s * dir[1];
1780 Double_t rsq = point[0] * point[0] + point[1] * point[1];
1802 cpsi = point[0] * cm + point[1] *
sm;
1813 if (point[2] * dir[2] < 0)
1829 if (point[0] *
c1 + point[1] *
s1 > point[0] *
c2 + point[1] *
s2) {
1830 un = dir[0] *
s1 - dir[1] *
c1;
1835 un = -dir[0] *
s2 + dir[1] *
c2;
1837 s = -point[0] *
s2 + point[1] *
c2;
1840 zi = point[2] + s * dir[2];
1842 xi = point[0] + s * dir[0];
1843 yi = point[1] + s * dir[1];
1844 if ((
yi * cm - xi *
sm) > 0) {
1855 un = -dir[0] *
s2 + dir[1] *
c2;
1860 un = dir[0] *
s1 - dir[1] *
c1;
1862 s = point[0] *
s1 - point[1] *
c1;
1865 zi = point[2] + s * dir[2];
1867 xi = point[0] + s * dir[0];
1868 yi = point[1] + s * dir[1];
1869 if ((
yi * cm - xi *
sm) < 0) {
1893 zi = point[2] +
snxt * dir[2];
1896 xi = point[0] +
snxt * dir[0];
1897 yi = point[1] +
snxt * dir[1];
1916 zi = point[2] +
snxt * dir[2];
1920 xi = point[0] +
snxt * dir[0];
1921 yi = point[1] +
snxt * dir[1];
1931 s = point[0] *
s1 - point[1] *
c1;
1934 zi = point[2] + s * dir[2];
1936 xi = point[0] + s * dir[0];
1937 yi = point[1] + s * dir[1];
1938 if ((
yi * cm - xi *
sm) <= 0) {
1948 un = dir[0] *
s2 - dir[1] *
c2;
1950 s = (point[1] *
c2 - point[0] *
s2) /
un;
1952 zi = point[2] + s * dir[2];
1954 xi = point[0] + s * dir[0];
1955 yi = point[1] + s * dir[1];
1956 if ((
yi * cm - xi *
sm) >= 0) {
1977 zi = point[2] + s * dir[2];
1979 xi = point[0] + s * dir[0];
1980 yi = point[1] + s * dir[1];
1989 zi = point[2] + s * dir[2];
1991 xi = point[0] + s * dir[0];
1992 yi = point[1] + s * dir[1];
2007 zi = point[2] + s * dir[2];
2009 xi = point[0] + s * dir[0];
2010 yi = point[1] + s * dir[1];
2020 zi = point[2] + s * dir[2];
2022 xi = point[0] + s * dir[0];
2023 yi = point[1] + s * dir[1];
2037 zi = point[2] + s * dir[2];
2040 xi = point[0] + s * dir[0];
2041 yi = point[1] + s * dir[1];
2072 return TGeoConeSeg::DistFromOutsideS(point, dir,
fDz,
fRmin1,
fRmax1,
fRmin2,
fRmax2,
fC1,
fS1,
fC2,
fS2,
fCm,
fSm,
2082 const Int_t numPoints = 4 *
n;
2104 Double_t end = start + ndiv * step;
2107 Error(
"Divide",
"division of a cone segment on R not implemented");
2121 for (
id = 0;
id < ndiv;
id++) {
2122 voldiv->AddNodeOffset(vol,
id, start +
id * step + step / 2, opt.
Data());
2131 for (
id = 0;
id < ndiv;
id++) {
2142 voldiv->AddNodeOffset(vol,
id, start +
id * step + step / 2, opt.
Data());
2146 default:
Error(
"Divide",
"Wrong axis type for division");
return nullptr;
2180 param[0] *= param[0];
2182 param[1] *= param[1];
2185 while (param[3] < param[2])
2198 Error(
"GetMakeRuntimeShape",
"invalid mother");
2234 printf(
" Bounding box:\n");
2248 for (i = 0; i < 4; i++) {
2249 for (
j = 1;
j <
n;
j++) {
2250 buffer.
fSegs[(i *
n +
j - 1) * 3] =
c;
2251 buffer.
fSegs[(i *
n +
j - 1) * 3 + 1] = i *
n +
j - 1;
2252 buffer.
fSegs[(i *
n +
j - 1) * 3 + 2] = i *
n +
j;
2255 for (i = 4; i < 6; i++) {
2256 for (
j = 0;
j <
n;
j++) {
2257 buffer.
fSegs[(i *
n +
j) * 3] =
c + 1;
2258 buffer.
fSegs[(i *
n +
j) * 3 + 1] = (i - 4) *
n +
j;
2259 buffer.
fSegs[(i *
n +
j) * 3 + 2] = (i - 2) *
n +
j;
2262 for (i = 6; i < 8; i++) {
2263 for (
j = 0;
j <
n;
j++) {
2265 buffer.
fSegs[(i *
n +
j) * 3 + 1] = 2 * (i - 6) *
n +
j;
2266 buffer.
fSegs[(i *
n +
j) * 3 + 2] = (2 * (i - 6) + 1) *
n +
j;
2273 for (
j = 0;
j <
n - 1;
j++) {
2282 for (
j = 0;
j <
n - 1;
j++) {
2291 for (
j = 0;
j <
n - 1;
j++) {
2300 for (
j = 0;
j <
n - 1;
j++) {
2363 out <<
" // Shape: " <<
GetName() <<
" type: " <<
ClassName() << std::endl;
2364 out <<
" dz = " <<
fDz <<
";" << std::endl;
2365 out <<
" rmin1 = " <<
fRmin1 <<
";" << std::endl;
2366 out <<
" rmax1 = " <<
fRmax1 <<
";" << std::endl;
2367 out <<
" rmin2 = " <<
fRmin2 <<
";" << std::endl;
2368 out <<
" rmax2 = " <<
fRmax2 <<
";" << std::endl;
2369 out <<
" phi1 = " <<
fPhi1 <<
";" << std::endl;
2370 out <<
" phi2 = " <<
fPhi2 <<
";" << std::endl;
2372 <<
"\", dz,rmin1,rmax1,rmin2,rmax2,phi1,phi2);" << std::endl;
2431 for (
j = 0;
j <
n;
j++) {
2437 for (
j = 0;
j <
n;
j++) {
2443 for (
j = 0;
j <
n;
j++) {
2449 for (
j = 0;
j <
n;
j++) {
2476 for (
j = 0;
j <
n;
j++) {
2482 for (
j = 0;
j <
n;
j++) {
2488 for (
j = 0;
j <
n;
j++) {
2494 for (
j = 0;
j <
n;
j++) {
2599 return 0.5 * (
r1 +
r2) + 0.5 * (
r2 -
r1) * (z /
fDz);
int Int_t
Signed integer 4 bytes (int)
float Float_t
Float 4 bytes (float)
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
R__EXTERN TGeoManager * gGeoManager
Generic 3D primitive description class.
Bool_t SectionsValid(UInt_t mask) const
void SetSectionsValid(UInt_t mask)
Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity, UInt_t reqSegs, UInt_t reqSegsCapacity, UInt_t reqPols, UInt_t reqPolsCapacity)
Set kRaw tessellation section of buffer with supplied sizes.
void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections, Bool_t localFrame) const override
Fills the supplied buffer, with sections in desired frame See TBuffer3D.h for explanation of sections...
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 box.
void InspectShape() const override
Prints shape parameters.
A cone segment is a cone having a range in phi.
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
void InspectShape() const override
print shape parameters
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
static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
Compute normal to closest surface from POINT.
Double_t Capacity() const override
Computes capacity of the shape in [length^3].
void Sizeof3D() const override
Fill size of this 3-D object.
static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cm, Double_t sm, Double_t cdfi)
compute distance from outside point to surface of arbitrary tube
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoConeSeg()
Default constructor.
Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override
Get range of shape for a given axis.
TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override
Divide this cone segment shape belonging to volume "voldiv" into ndiv volumes called divname,...
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) const override
Compute normal to closest surface from POINT.
void ComputeBBox() override
compute bounding box of the tube segment
Bool_t Contains(const Double_t *point) const override
test if point is inside this sphere
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...
void SetSegsAndPols(TBuffer3D &buffer) const override
Fill TBuffer3D structure for segments and polygons.
void InitTrigonometry()
Init frequently used trigonometric values.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
compute closest distance from point px,py to each corner
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 GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const override
Returns numbers of vertices, segments and polygons composing the shape mesh.
static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2, Int_t skipz=0)
Static method to compute the closest distance from given point to this shape.
Int_t GetNmeshVertices() const override
Return number of vertices of the mesh representation.
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override
Fills a static 3D buffer and returns a reference.
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 SetConsDimensions(Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
Set dimensions of the cone segment.
void AfterStreamer() override
Function called after streaming an object of this class.
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...
~TGeoConeSeg() override
destructor
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
static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cm, Double_t sm, Double_t cdfi)
compute distance from inside point to surface of the tube segment
static Double_t DistToCons(const Double_t *point, const Double_t *dir, Double_t r1, Double_t z1, Double_t r2, Double_t z2, Double_t phi1, Double_t phi2)
Static method to compute distance to a conical surface with :
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.
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.
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 SetPoints(Double_t *points) const override
Create cone segment mesh points.
void SetDimensions(Double_t *param) override
Set dimensions of the cone segment from an array.
void GetBoundingCylinder(Double_t *param) const override
Fill vector param[4] with the bounding cylinder parameters.
The cones are defined by 5 parameters:
void SetDimensions(Double_t *param) override
Set cone dimensions from an array.
Double_t Capacity() const override
Computes capacity of the shape in [length^3].
const char * GetAxisName(Int_t iaxis) const override
Returns name of axis IAXIS.
Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override
Get range of shape for a given axis.
static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Compute normal to closest surface from POINT.
void SetConeDimensions(Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Set cone dimensions.
static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Compute distance from inside point to surface of the cone (static) Boundary safe algorithm.
~TGeoCone() override
destructor
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 SetPoints(Double_t *points) const override
Create cone mesh points.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
compute closest distance from point px,py to each corner
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 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
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...
void ComputeBBox() override
compute bounding box of the sphere
TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override
Divide this cone shape belonging to volume "voldiv" into ndiv volumes called divname,...
static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Compute distance from outside point to surface of the tube Boundary safe algorithm.
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.
TGeoCone()
Default constructor.
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
void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const override
Returns numbers of vertices, segments and polygons composing the shape mesh.
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.
Bool_t Contains(const Double_t *point) const override
test if point is inside this cone
static void DistToCone(const Double_t *point, const Double_t *dir, Double_t dz, Double_t r1, Double_t r2, Double_t &b, Double_t &delta)
Static method to compute distance to a conical surface with :
static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Int_t skipz=0)
computes the closest distance from given point to this shape, according to option.
void Sizeof3D() const override
Fill size of this 3-D object.
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 InspectShape() const override
print shape parameters
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 ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) const override
Compute normal to closest surface from POINT.
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override
Fills a static 3D buffer and returns a reference.
Int_t GetNmeshVertices() const override
Return number of vertices of the mesh representation.
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 cone Boundary safe algorithm.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void GetBoundingCylinder(Double_t *param) const override
Fill vector param[4] with the bounding cylinder parameters.
void SetSegsAndPols(TBuffer3D &buffer) const override
Fill TBuffer3D structure for segments and polygons.
TGeoVolumeMulti * MakeVolumeMulti(const char *name, TGeoMedium *medium)
Make a TGeoVolumeMulti handling a list of volumes.
Int_t GetNsegments() const
Get number of segments approximating circles.
Geometrical transformation package.
Node containing an offset.
a cylindrical phi divison pattern
base finder class for patterns. A pattern is specifying a division type
Base abstract class for all shapes.
Int_t GetBasicColor() const
Get the basic color (0-7).
void TransformPoints(Double_t *points, UInt_t NbPoints) const
Tranform a set of points (LocalToMaster)
void SetShapeBit(UInt_t f, Bool_t set)
Equivalent of TObject::SetBit.
static Double_t DistToPhiMin(const Double_t *point, const Double_t *dir, Double_t s1, Double_t c1, Double_t s2, Double_t c2, Double_t sm, Double_t cm, Bool_t in=kTRUE)
compute distance from point (inside phi) to both phi planes. Return minimum.
static Double_t SafetyPhi(const Double_t *point, Bool_t in, Double_t phi1, Double_t phi2)
Static method to compute safety w.r.t a phi corner defined by cosines/sines of the angles phi1,...
static Bool_t IsSameWithinTolerance(Double_t a, Double_t b)
Check if two numbers differ with less than a tolerance.
const char * GetPointerName() const
Provide a pointer name containing uid.
Int_t ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
Returns distance to shape primitive mesh.
static void NormalPhi(const Double_t *point, const Double_t *dir, Double_t *norm, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
Static method to compute normal to phi planes.
static Double_t SafetySeg(Double_t r, Double_t z, Double_t r1, Double_t z1, Double_t r2, Double_t z2, Bool_t outer)
Compute distance from point of coordinates (r,z) to segment (r1,z1):(r2,z2)
const char * GetName() const override
Get the shape name.
static Double_t Tolerance()
static Bool_t IsCloseToPhi(Double_t epsil, const Double_t *point, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
True if point is closer than epsil to one of the phi planes defined by c1,s1 or c2,...
Bool_t TestShapeBit(UInt_t f) const
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Long64_t LocMin(Long64_t n, const T *a)
Returns index of array with the minimum element.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
T1 Sign(T1 a, T2 b)
Returns a value with the magnitude of a and the sign of b.
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
Long64_t LocMax(Long64_t n, const T *a)
Returns index of array with the maximum element.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
constexpr Double_t TwoPi()