224   if (
norm[0] * dir[0] + 
norm[1] * dir[1] + 
norm[2] * dir[2] < 0) {
 
 
  261   if (
norm[0] * dir[0] + 
norm[1] * dir[1] + 
norm[2] * dir[2] < 0) {
 
 
  275   Double_t r2 = point[0] * point[0] + point[1] * point[1];
 
 
  300   Double_t rsq = point[0] * point[0] + point[1] * point[1];
 
  317               zi = point[2] + sr * dir[2];
 
  323               zi = point[2] + sr * dir[2];
 
  344      zi = point[2] + sr * dir[2];
 
  353         zi = point[2] + sr * dir[2];
 
  359         zi = point[2] + sr * dir[2];
 
 
  399   if (point[2] <= -
dz) {
 
  402      snxt = (-
dz - point[2]) / dir[2];
 
  403      xp = point[0] + 
snxt * dir[0];
 
  404      yp = point[1] + 
snxt * dir[1];
 
  410      if (point[2] >= 
dz) {
 
  413         snxt = (
dz - point[2]) / dir[2];
 
  414         xp = point[0] + 
snxt * dir[0];
 
  415         yp = point[1] + 
snxt * dir[1];
 
  423   Double_t rsq = point[0] * point[0] + point[1] * point[1];
 
  452         if (point[2] * dir[2] < 0)
 
  477      zp = point[2] + 
snxt * dir[2];
 
  492         zp = point[2] + 
snxt * dir[2];
 
  498         zp = point[2] + 
snxt * dir[2];
 
  509               zp = point[2] + 
din * dir[2];
 
  526      zp = point[2] + 
dout * dir[2];
 
  533   zp = point[2] + 
dout * dir[2];
 
 
  575   Double_t rsq = point[0] * point[0] + point[1] * point[1];
 
  578   Double_t a = dir[0] * dir[0] + dir[1] * dir[1] - 
tz * 
tz * dir[2] * dir[2];
 
  579   b = point[0] * dir[0] + point[1] * dir[1] - 
tz * 
rc * dir[2];
 
 
  606   const Int_t numPoints = 4 * 
n;
 
 
  630      Error(
"Divide", 
"division of a cone on R not implemented");
 
  641      for (
id = 0; 
id < ndiv; 
id++) {
 
  642         voldiv->AddNodeOffset(vol, 
id, start + 
id * step + step / 2, opt.
Data());
 
  651      for (
id = 0; 
id < ndiv; 
id++) {
 
  662         voldiv->AddNodeOffset(vol, 
id, start + 
id * step + step / 2, opt.
Data());
 
  666   default: 
Error(
"Divide", 
"Wrong axis type for division"); 
return nullptr;
 
 
  677   case 2: 
return "PHI";
 
  679   default: 
return "undefined";
 
 
  712   param[0] *= param[0];
 
  714   param[1] *= param[1];
 
 
  728      Error(
"GetMakeRuntimeShape", 
"invalid mother");
 
 
  759      Error(
"GetPointsOnSegments", 
"Npoints must be even number");
 
  782   for (
Int_t i = 0; i < nc; i++) {
 
 
  816   printf(
" Bounding box:\n");
 
 
  849   for (i = 0; i < 4; i++) {
 
  850      for (
j = 0; 
j < 
n; 
j++) {
 
  852         buffer.
fSegs[(i * 
n + 
j) * 3 + 1] = i * 
n + 
j;
 
  853         buffer.
fSegs[(i * 
n + 
j) * 3 + 2] = i * 
n + 
j + 1;
 
  855      buffer.
fSegs[(i * 
n + 
j - 1) * 3 + 2] = i * 
n;
 
  857   for (i = 4; i < 6; i++) {
 
  858      for (
j = 0; 
j < 
n; 
j++) {
 
  859         buffer.
fSegs[(i * 
n + 
j) * 3] = 
c + 1;
 
  860         buffer.
fSegs[(i * 
n + 
j) * 3 + 1] = (i - 4) * 
n + 
j;
 
  861         buffer.
fSegs[(i * 
n + 
j) * 3 + 2] = (i - 2) * 
n + 
j;
 
  864   for (i = 6; i < 8; i++) {
 
  865      for (
j = 0; 
j < 
n; 
j++) {
 
  867         buffer.
fSegs[(i * 
n + 
j) * 3 + 1] = 2 * (i - 6) * 
n + 
j;
 
  868         buffer.
fSegs[(i * 
n + 
j) * 3 + 2] = (2 * (i - 6) + 1) * 
n + 
j;
 
  874   for (
j = 0; 
j < 
n; 
j++) {
 
  885   for (
j = 0; 
j < 
n; 
j++) {
 
  896   for (
j = 0; 
j < 
n; 
j++) {
 
  902      buffer.
fPols[
indx + 4] = ((i - 2) * 2 + 1) * 
n + 
j;
 
  907   for (
j = 0; 
j < 
n; 
j++) {
 
  913      buffer.
fPols[
indx + 3] = ((i - 2) * 2 + 1) * 
n + 
j;
 
 
  981   out << 
"   dz    = " << 
fDz << 
";" << std::endl;
 
  982   out << 
"   rmin1 = " << 
fRmin1 << 
";" << std::endl;
 
  983   out << 
"   rmax1 = " << 
fRmax1 << 
";" << std::endl;
 
  984   out << 
"   rmin2 = " << 
fRmin2 << 
";" << std::endl;
 
  985   out << 
"   rmax2 = " << 
fRmax2 << 
";" << std::endl;
 
  987       << 
"\", dz,rmin1,rmax1,rmin2,rmax2);" << std::endl;
 
 
 1005            Warning(
"SetConeDimensions", 
"rmin1>rmax1 Switch rmin1<->rmax1");
 
 1027            Warning(
"SetConeDimensions", 
"rmin2>rmax2 Switch rmin2<->rmax2");
 
 
 1071      for (
j = 0; 
j < 
n; 
j++) {
 
 1078      for (
j = 0; 
j < 
n; 
j++) {
 
 1085      for (
j = 0; 
j < 
n; 
j++) {
 
 1092      for (
j = 0; 
j < 
n; 
j++) {
 
 
 1115      for (
j = 0; 
j < 
n; 
j++) {
 
 1122      for (
j = 0; 
j < 
n; 
j++) {
 
 1129      for (
j = 0; 
j < 
n; 
j++) {
 
 1136      for (
j = 0; 
j < 
n; 
j++) {
 
 
 1263   : 
TGeoCone(), fPhi1(0.), fPhi2(0.), fS1(0.), fC1(0.), fS2(0.), fC2(0.), fSm(0.), fCm(0.), fCdfi(0.)
 
 
 1323   : 
TGeoCone(0, 0, 0, 0, 0), fPhi1(0.), fPhi2(0.), fS1(0.), fC1(0.), fS2(0.), fC2(0.), fSm(0.), fCm(0.), fCdfi(0.)
 
 
 1478   if (
norm[0] * dir[0] + 
norm[1] * dir[1] + 
norm[2] * dir[2] < 0) {
 
 
 1525   if (
norm[0] * dir[0] + 
norm[1] * dir[1] + 
norm[2] * dir[2] < 0) {
 
 
 1578   Double_t r0sq = point[0] * point[0] + point[1] * point[1];
 
 1581   Double_t a = dir[0] * dir[0] + dir[1] * dir[1] - 
fz * 
fz * dir[2] * dir[2];
 
 1582   Double_t b = point[0] * dir[0] + point[1] * dir[1] - 
fz * 
rc * dir[2];
 
 
 1656   Double_t rsq = point[0] * point[0] + point[1] * point[1];
 
 1679      xi = point[0] + 
sfmin * dir[0];
 
 1680      yi = point[1] + 
sfmin * dir[1];
 
 1681      if (
yi * cm - xi * 
sm < 0)
 
 1697   xi = point[0] + 
sfmin * dir[0];
 
 1698   yi = point[1] + 
sfmin * dir[1];
 
 1699   if (
yi * cm - xi * 
sm > 0)
 
 
 1721   return TGeoConeSeg::DistFromInsideS(point, dir, 
fDz, 
fRmin1, 
fRmax1, 
fRmin2, 
fRmax2, 
fC1, 
fS1, 
fC2, 
fS2, 
fCm, 
fSm,
 
 
 1745      if (point[2] * dir[2] >= 0)
 
 1748      xi = point[0] + s * dir[0];
 
 1749      yi = point[1] + s * dir[1];
 
 1765   Double_t rsq = point[0] * point[0] + point[1] * point[1];
 
 1787   cpsi = point[0] * cm + point[1] * 
sm;
 
 1798         if (point[2] * dir[2] < 0)
 
 1814         if (point[0] * 
c1 + point[1] * 
s1 > point[0] * 
c2 + point[1] * 
s2) {
 
 1815            un = dir[0] * 
s1 - dir[1] * 
c1;
 
 1820            un = -dir[0] * 
s2 + dir[1] * 
c2;
 
 1822               s = -point[0] * 
s2 + point[1] * 
c2;
 
 1825                  zi = point[2] + s * dir[2];
 
 1827                     xi = point[0] + s * dir[0];
 
 1828                     yi = point[1] + s * dir[1];
 
 1829                     if ((
yi * cm - xi * 
sm) > 0) {
 
 1840            un = -dir[0] * 
s2 + dir[1] * 
c2;
 
 1845            un = dir[0] * 
s1 - dir[1] * 
c1;
 
 1847               s = point[0] * 
s1 - point[1] * 
c1;
 
 1850                  zi = point[2] + s * dir[2];
 
 1852                     xi = point[0] + s * dir[0];
 
 1853                     yi = point[1] + s * dir[1];
 
 1854                     if ((
yi * cm - xi * 
sm) < 0) {
 
 1878         zi = point[2] + 
snxt * dir[2];
 
 1881         xi = point[0] + 
snxt * dir[0];
 
 1882         yi = point[1] + 
snxt * dir[1];
 
 1901      zi = point[2] + 
snxt * dir[2];
 
 1905      xi = point[0] + 
snxt * dir[0];
 
 1906      yi = point[1] + 
snxt * dir[1];
 
 1916         s = point[0] * 
s1 - point[1] * 
c1;
 
 1919            zi = point[2] + s * dir[2];
 
 1921               xi = point[0] + s * dir[0];
 
 1922               yi = point[1] + s * dir[1];
 
 1923               if ((
yi * cm - xi * 
sm) <= 0) {
 
 1933      un = dir[0] * 
s2 - dir[1] * 
c2;
 
 1935         s = (point[1] * 
c2 - point[0] * 
s2) / 
un;
 
 1937            zi = point[2] + s * dir[2];
 
 1939               xi = point[0] + s * dir[0];
 
 1940               yi = point[1] + s * dir[1];
 
 1941               if ((
yi * cm - xi * 
sm) >= 0) {
 
 1962            zi = point[2] + s * dir[2];
 
 1964               xi = point[0] + s * dir[0];
 
 1965               yi = point[1] + s * dir[1];
 
 1974            zi = point[2] + s * dir[2];
 
 1976               xi = point[0] + s * dir[0];
 
 1977               yi = point[1] + s * dir[1];
 
 1992         zi = point[2] + s * dir[2];
 
 1994            xi = point[0] + s * dir[0];
 
 1995            yi = point[1] + s * dir[1];
 
 2005            zi = point[2] + s * dir[2];
 
 2007               xi = point[0] + s * dir[0];
 
 2008               yi = point[1] + s * dir[1];
 
 2022   zi = point[2] + s * dir[2];
 
 2025   xi = point[0] + s * dir[0];
 
 2026   yi = point[1] + s * dir[1];
 
 
 2057   return TGeoConeSeg::DistFromOutsideS(point, dir, 
fDz, 
fRmin1, 
fRmax1, 
fRmin2, 
fRmax2, 
fC1, 
fS1, 
fC2, 
fS2, 
fCm, 
fSm,
 
 
 2067   const Int_t numPoints = 4 * 
n;
 
 
 2089   Double_t end = start + ndiv * step;
 
 2092      Error(
"Divide", 
"division of a cone segment on R not implemented");
 
 2106      for (
id = 0; 
id < ndiv; 
id++) {
 
 2107         voldiv->AddNodeOffset(vol, 
id, start + 
id * step + step / 2, opt.
Data());
 
 2116      for (
id = 0; 
id < ndiv; 
id++) {
 
 2127         voldiv->AddNodeOffset(vol, 
id, start + 
id * step + step / 2, opt.
Data());
 
 2131   default: 
Error(
"Divide", 
"Wrong axis type for division"); 
return nullptr;
 
 
 2165   param[0] *= param[0];
 
 2167   param[1] *= param[1];
 
 2170   while (param[3] < param[2])
 
 
 2183      Error(
"GetMakeRuntimeShape", 
"invalid mother");
 
 
 2219   printf(
" Bounding box:\n");
 
 
 2254   for (i = 0; i < 4; i++) {
 
 2255      for (
j = 1; 
j < 
n; 
j++) {
 
 2256         buffer.
fSegs[(i * 
n + 
j - 1) * 3] = 
c;
 
 2257         buffer.
fSegs[(i * 
n + 
j - 1) * 3 + 1] = i * 
n + 
j - 1;
 
 2258         buffer.
fSegs[(i * 
n + 
j - 1) * 3 + 2] = i * 
n + 
j;
 
 2261   for (i = 4; i < 6; i++) {
 
 2262      for (
j = 0; 
j < 
n; 
j++) {
 
 2263         buffer.
fSegs[(i * 
n + 
j) * 3] = 
c + 1;
 
 2264         buffer.
fSegs[(i * 
n + 
j) * 3 + 1] = (i - 4) * 
n + 
j;
 
 2265         buffer.
fSegs[(i * 
n + 
j) * 3 + 2] = (i - 2) * 
n + 
j;
 
 2268   for (i = 6; i < 8; i++) {
 
 2269      for (
j = 0; 
j < 
n; 
j++) {
 
 2271         buffer.
fSegs[(i * 
n + 
j) * 3 + 1] = 2 * (i - 6) * 
n + 
j;
 
 2272         buffer.
fSegs[(i * 
n + 
j) * 3 + 2] = (2 * (i - 6) + 1) * 
n + 
j;
 
 2279   for (
j = 0; 
j < 
n - 1; 
j++) {
 
 2288   for (
j = 0; 
j < 
n - 1; 
j++) {
 
 2297   for (
j = 0; 
j < 
n - 1; 
j++) {
 
 2306   for (
j = 0; 
j < 
n - 1; 
j++) {
 
 
 2369   out << 
"   // Shape: " << 
GetName() << 
" type: " << 
ClassName() << std::endl;
 
 2370   out << 
"   dz    = " << 
fDz << 
";" << std::endl;
 
 2371   out << 
"   rmin1 = " << 
fRmin1 << 
";" << std::endl;
 
 2372   out << 
"   rmax1 = " << 
fRmax1 << 
";" << std::endl;
 
 2373   out << 
"   rmin2 = " << 
fRmin2 << 
";" << std::endl;
 
 2374   out << 
"   rmax2 = " << 
fRmax2 << 
";" << std::endl;
 
 2375   out << 
"   phi1  = " << 
fPhi1 << 
";" << std::endl;
 
 2376   out << 
"   phi2  = " << 
fPhi2 << 
";" << std::endl;
 
 2378       << 
"\", dz,rmin1,rmax1,rmin2,rmax2,phi1,phi2);" << std::endl;
 
 
 2437      for (
j = 0; 
j < 
n; 
j++) {
 
 2443      for (
j = 0; 
j < 
n; 
j++) {
 
 2449      for (
j = 0; 
j < 
n; 
j++) {
 
 2455      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++) {
 
 2500      for (
j = 0; 
j < 
n; 
j++) {
 
 
 2574      Error(
"GetPointsOnSegments", 
"Npoints must be even number");
 
 2589   for (
Int_t i = 0; i < nc; i++) {
 
 2590      if (i == (nc - 1)) {
 
 
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.
TBuffer3D * MakeBuffer3D() const override
Creates a TBuffer3D describing this shape.
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.
TBuffer3D * MakeBuffer3D() const override
Creates a TBuffer3D describing this shape.
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()