147    if (ddp<0) ddp+= 360;
   150    if (ddp<0) ddp+= 360;
   151    if (ddp>360) ddp-=360;
   154    if (ddp<0) ddp+= 360;
   155    if (ddp>360) ddp-=360;
   158    if (ddp<0) ddp+= 360;
   159    if (ddp>360) ddp-=360;
   195    for (
Int_t i=0; i<3; i++) {
   196       norm[i] = point[i] - r0[i];
   197       normsq += norm[i]*norm[i];
   204    if (dir[0]*norm[0]+dir[1]*norm[1]+dir[2]*norm[2] < 0) {
   219       if (phi < 0) phi+=360.0;
   221       if (ddp<0) ddp+=360.;
   238    Int_t numPoints = n*(n-1);
   239    if (
fRmin>0) numPoints *= 2;
   240    else if (
fDphi<360) numPoints += 2;
   250    for (
Int_t i=0; i<3; i++) p[i] = pt[i]+t*dir[i];
   261    for (
Int_t i=0; i<3; i++) p[i] = pt[i]+t*dir[i];
   266    Double_t dd = (p[0]*dir[0]+p[1]*dir[1]+p[2]*dir[2] - (p[0]*dir[0]+p[1]*dir[1])*
fR/rxy)/d;
   276    for (
Int_t i=0; i<3; i++) p[i] = pt[i]+t*dir[i];
   278    if (rxy<1
E-6) 
return 0;
   281    Double_t ddaxis = (p[0]*dir[0]+p[1]*dir[1]+p[2]*dir[2] - (p[0]*dir[0]+p[1]*dir[1])*
fR/rxy)/daxis;
   282    Double_t dddaxis = 1 - ddaxis*ddaxis - (1-dir[2]*dir[2])*
fR/rxy +
   283                       fR*(p[0]*dir[0]+p[1]*dir[1])*(p[0]*dir[0]+p[1]*dir[1])/(rxy*rxy*rxy);
   293    if (iact<3 && safe) {
   320       dphi = 
TGeoTubeSeg::DistFromInsideS(point,dir,
fR-
fRmax,
fR+
fRmax, 
fRmax, c1,s1,c2,s2,cm,sm,cdfi);
   332    if (iact<3 && safe) {
   356       if (ddp<0) ddp+=360;;
   359       phi2=(fPhi1+
fDphi)*TMath::DegToRad();
   372       rxy2 = point[0]*point[0]+point[1]*point[1];
   374          if (!hasphi || inphi) inbring=
kTRUE;
   383    memcpy(pt,point,3*
sizeof(
Double_t));
   385       if (hasphi) dring = 
TGeoTubeSeg::DistFromOutsideS(point,dir,
TMath::Max(0.,
fR-
fRmax-eps),
fR+
fRmax+eps, 
fRmax+eps, c1,s1,
c2,s2,cm,sm,cdfi);
   391       daxis = 
Daxis(point,dir,snext);
   394       for (i=0; i<3; i++) pt[i] = point[i]+snext*dir[i];
   398    if (daxis<0) daxis = 
Daxis(pt,dir,0);
   404          for (i=0; i<3; i++) pt[i] += 0.1*eps*dir[i];
   410       if (hasphi) dring = 
TGeoTubeSeg::DistFromInsideS(pt,dir,
fR-
fRmin,
fR+
fRmin, 
fRmin, c1,s1,
c2,s2,cm,sm,cdfi);
   412       if (dd<dring) 
return (snext+dd);
   415       for (i=0; i<3; i++) pt[i] = point[i] + snext*dir[i];
   424       for (i=0; i<3; i++) pt[i] += 0.1*eps*dir[i];
   428    if (hasphi) dring = 
TGeoTubeSeg::DistFromInsideS(pt,dir,
TMath::Max(0.,
fR-
fRmax-eps),
fR+
fRmax+eps, 
fRmax+eps, c1,s1,
c2,s2,cm,sm,cdfi);
   436    for (i=0; i<3; i++) pt[i] = point[i] + snext*dir[i];
   512    Error(
"GetMakeRuntimeShape", 
"parametrized toruses not supported");
   521    printf(
"*** Shape %s: TGeoTorus ***\n", 
GetName());
   522    printf(
"    R    = %11.5f\n", 
fR);
   523    printf(
"    Rmin = %11.5f\n", 
fRmin);
   524    printf(
"    Rmax = %11.5f\n", 
fRmax);
   525    printf(
"    Phi1 = %11.5f\n", 
fPhi1);
   526    printf(
"    Dphi = %11.5f\n", 
fDphi);
   527    printf(
" Bounding box:\n");
   538    Int_t nbPnts = n*(n-1);
   541    if (hasrmin) nbPnts *= 2;
   542    else if (hasphi) nbPnts += 2;
   544    Int_t nbSegs = (2*n-1)*(n-1);
   545    Int_t nbPols = (n-1)*(n-1);
   547       nbSegs += (2*n-1)*(n-1);
   548       nbPols += (n-1)*(n-1);
   556                                    nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols);
   573    Int_t nbPnts = n*(n-1);
   574    Int_t indx, indp, startcap=0;
   577    if (hasrmin) nbPnts *= 2;
   578    else if (hasphi) nbPnts += 2;
   587    for (i = 0; i < 
n; i++) { 
   588       for (j = 0; j < n-1; j++) {  
   589          buff.
fSegs[indx+(i*(n-1)+j)*3] = 
c;
   590          buff.
fSegs[indx+(i*(n-1)+j)*3+1] = i*(n-1)+j;   
   591          buff.
fSegs[indx+(i*(n-1)+j)*3+2] = i*(n-1)+((j+1)%(n-1)); 
   597    for (i = 0; i < n-1; i++) { 
   598       for (j = 0; j < n-1; j++) {  
   599          buff.
fSegs[indx+(i*(n-1)+j)*3] = 
c;
   600          buff.
fSegs[indx+(i*(n-1)+j)*3+1] = i*(n-1)+j;     
   601          buff.
fSegs[indx+(i*(n-1)+j)*3+2] = (i+1)*(n-1)+j; 
   604    indx += 3*(n-1)*(n-1);
   605    startcap = (2*n-1)*(n-1);
   610       for (i = 0; i < 
n; i++) { 
   611          for (j = 0; j < n-1; j++) {  
   612             buff.
fSegs[indx+(i*(n-1)+j)*3] = 
c;              
   613             buff.
fSegs[indx+(i*(n-1)+j)*3+1] = indp + i*(n-1)+j;   
   614             buff.
fSegs[indx+(i*(n-1)+j)*3+2] = indp + i*(n-1)+((j+1)%(n-1)); 
   620       for (i = 0; i < n-1; i++) { 
   621          for (j = 0; j < n-1; j++) {  
   622             buff.
fSegs[indx+(i*(n-1)+j)*3] = 
c;                
   623             buff.
fSegs[indx+(i*(n-1)+j)*3+1] = indp + i*(n-1)+j;     
   624             buff.
fSegs[indx+(i*(n-1)+j)*3+2] = indp + (i+1)*(n-1)+j; 
   627       indx += 3*(n-1)*(n-1);
   628       startcap = (4*n-2)*(n-1);
   635          for (j = 0; j < n-1; j++) {
   636             buff.
fSegs[indx+j*3] = c+1;
   637             buff.
fSegs[indx+j*3+1] = (n-1)*i+j;     
   638             buff.
fSegs[indx+j*3+2] = indp+(n-1)*i+j; 
   642          for (j = 0; j < n-1; j++) {
   643             buff.
fSegs[indx+j*3] = c+1;
   644             buff.
fSegs[indx+j*3+1] = (n-1)*i+j;     
   645             buff.
fSegs[indx+j*3+2] = indp+(n-1)*i+j; 
   650          for (j = 0; j < n-1; j++) {
   651             buff.
fSegs[indx+j*3] = c+1;
   652             buff.
fSegs[indx+j*3+1] = (n-1)*i+j;     
   653             buff.
fSegs[indx+j*3+2] = n*(n-1);       
   657          for (j = 0; j < n-1; j++) {
   658             buff.
fSegs[indx+j*3] = c+1;
   659             buff.
fSegs[indx+j*3+1] = (n-1)*i+j;     
   660             buff.
fSegs[indx+j*3+2] = n*(n-1)+1;     
   671    for (i=0; i<n-1; i++) {
   672       for (j=0; j<n-1; j++) {
   674          buff.
fPols[indx++] = 4;
   675          buff.
fPols[indx++] = n*(n-1)+(n-1)*i+((j+1)%(n-1)); 
   676          buff.
fPols[indx++] = (n-1)*(i+1)+j; 
   677          buff.
fPols[indx++] = n*(n-1)+(n-1)*i+j; 
   678          buff.
fPols[indx++] = (n-1)*i+j; 
   682       indp = (2*n-1)*(n-1); 
   685       for (i=0; i<n-1; i++) {
   686          for (j=0; j<n-1; j++) {
   688             buff.
fPols[indx++] = 4;
   689             buff.
fPols[indx++] = indp+n*(n-1)+(n-1)*i+j; 
   690             buff.
fPols[indx++] = indp+(n-1)*(i+1)+j; 
   691             buff.
fPols[indx++] = indp+n*(n-1)+(n-1)*i+((j+1)%(n-1)); 
   692             buff.
fPols[indx++] = indp+(n-1)*i+j; 
   699       Int_t np = (hasrmin)?4:3;
   700       for (j=0; j<n-1; j++) {
   701          buff.
fPols[indx++] = c+1;
   702          buff.
fPols[indx++] = np;
   703          buff.
fPols[indx++] = j;         
   704          buff.
fPols[indx++] = startcap+j;        
   706             buff.
fPols[indx++] = indp+j; 
   707          buff.
fPols[indx++] = startcap+((j+1)%(n-1)); 
   711       for (j=0; j<n-1; j++) {
   712          buff.
fPols[indx++] = c+1;
   713          buff.
fPols[indx++] = np;
   714          buff.
fPols[indx++] = (n-1)*i+j;         
   715          buff.
fPols[indx++] = startcap+(n-1)+((j+1)%(n-1));    
   717             buff.
fPols[indx++] = indp+(n-1)*i+j; 
   718          buff.
fPols[indx++] = startcap+(n-1)+j;      
   737       for (i=0; i<2; i++) saf[i]=-saf[i];
   747    for (i=0; i<2; i++) saf[i]=-saf[i];
   759    out << 
"   r    = " << 
fR << 
";" << std::endl;
   760    out << 
"   rmin = " << 
fRmin << 
";" << std::endl;
   761    out << 
"   rmax = " << 
fRmax << 
";" << std::endl;
   762    out << 
"   phi1 = " << 
fPhi1 << 
";" << std::endl;
   763    out << 
"   dphi = " << 
fDphi << 
";" << std::endl;
   764    out << 
"   TGeoShape *" << 
GetPointerName() << 
" = new TGeoTorus(\"" << 
GetName() << 
"\",r,rmin,rmax,phi1,dphi);" << std::endl;
   805    for (i=0; i<
n; i++) {
   809       for (j=0; j<n-1; j++) {
   813          points[indx++] = (
fR+
fRmax*ci)*co;
   814          points[indx++] = (
fR+
fRmax*ci)*so;
   815          points[indx++] = 
fRmax*si;
   821       for (i=0; i<
n; i++) {
   825          for (j=0; j<n-1; j++) {
   829             points[indx++] = (
fR+
fRmin*ci)*co;
   830             points[indx++] = (
fR+
fRmin*ci)*so;
   831             points[indx++] = 
fRmin*si;
   863    for (i=0; i<
n; i++) {
   867       for (j=0; j<n-1; j++) {
   871          points[indx++] = (
fR+
fRmax*ci)*co;
   872          points[indx++] = (
fR+
fRmax*ci)*so;
   873          points[indx++] = 
fRmax*si;
   880       for (i=0; i<
n; i++) {
   884          for (j=0; j<n-1; j++) {
   888             points[indx++] = (
fR+
fRmin*ci)*co;
   889             points[indx++] = (
fR+
fRmin*ci)*so;
   890             points[indx++] = 
fRmin*si;
   914    Int_t numPoints = n*(n-1);
   916    else if (
fDphi<360.)              numPoints += 2;
   939    Double_t q = c-a*b*ott+2.*a*a*a*ott*ott*ott;
   945       t = (-3*q*sq3+delta)/(6*sq3);
   946       u = (3*q*sq3+delta)/(6*sq3);
   957    t = x[0]*x[0]+a*x[0]+
b;
   963       x[1] = 0.5*(-u-delta);
   964       x[2] = 0.5*(-u+delta);
   979    Double_t g = d-3.*a*a*a*a/256. + a*a*b/16. - a*c/4.;
   988       if (delta<0) 
return 0;
   993          x[ireal++] = -h-0.25*
a;
   994          x[ireal++] = h-0.25*
a;
   999          x[ireal++] = -h-0.25*
a;
  1000          x[ireal++] = h-0.25*
a;
  1004          for (i=0; i<ireal; i++) xx[i] = x[ind[i]];
  1005          memcpy(x,xx,ireal*
sizeof(
Double_t));
  1011       x[ireal++] = -0.25*
a;
  1013       for (i=0; i<ind[0]; i++) x[ireal++] = xx[i]-0.25*a;
  1016          for (i=0; i<ireal; i++) xx[i] = x[ind[i]];
  1017          memcpy(x,xx,ireal*
sizeof(
Double_t));
  1023    ireal = 
SolveCubic(2.*e, e*e-4.*g, -f*f, xx);
  1025       if (xx[0]<=0) 
return 0;
  1029       for (i=0; i<3; i++) {
  1041       x[ireal++] = 0.5*(-h-delta)-0.25*a;
  1042       x[ireal++] = 0.5*(-h+delta)-0.25*a;
  1047       x[ireal++] = 0.5*(h-delta)-0.25*a;
  1048       x[ireal++] = 0.5*(h+delta)-0.25*a;
  1052       for (i=0; i<ireal; i++) xx[i] = x[ind[i]];
  1053       memcpy(x,xx,ireal*
sizeof(
Double_t));
  1068    Double_t r0sq  = pt[0]*pt[0]+pt[1]*pt[1]+pt[2]*pt[2];
  1069    Double_t rdotn = pt[0]*dir[0]+pt[1]*dir[1]+pt[2]*dir[2];
  1072    Double_t b = 2.*(r0sq+2.*rdotn*rdotn-rsumsq+2.*
fR*
fR*dir[2]*dir[2]);
  1073    Double_t c = 4.*(r0sq*rdotn-rsumsq*rdotn+2.*
fR*
fR*pt[2]*dir[2]);
  1081       Double_t b0 = (pt[0]*dir[0]+pt[1]*dir[1])/(dir[0]*dir[0]+dir[1]*dir[1]);
  1082       Double_t c0 = (pt[0]*pt[0] + (pt[1]-r0)*(pt[1]+r0))/(dir[0]*dir[0]+dir[1]*dir[1]);
  1086          if (y[nsol]>-tol) nsol++;
  1088          if (y[nsol]>-tol) nsol++;
  1091       c0 = (pt[0]*pt[0] + (pt[1]-r0)*(pt[1]+r0))/(dir[0]*dir[0]+dir[1]*dir[1]);
  1095          if (y[nsol]>-tol) nsol++;
  1097          if (y[nsol]>-tol) nsol++;
  1103          for (
Int_t j=0; j<nsol; j++) x[j] = y[ind[j]];
  1113    for (
Int_t i=0; i<nsol; i++) {
  1114       if (x[i]<-10) 
continue;
  1115       phi = 
TMath::ATan2(pt[1]+x[i]*dir[1],pt[0]+x[i]*dir[0]);
  1119       for (
Int_t ipt=0; ipt<3; ipt++) norm[ipt] = pt[ipt]+x[i]*dir[ipt] - r0[ipt];
  1120       ndotd = norm[0]*dir[0]+norm[1]*dir[1]+norm[2]*dir[2];
  1122          if (ndotd<0) 
continue;
  1124          if (ndotd>0) 
continue;
  1128       Double_t delta = s*s*s*s + a*s*s*s + b*s*s + c*s + d;
  1129       Double_t eps0 = -delta/(4.*s*s*s + 3.*a*s*s + 2.*b*s + 
c);
  1134          delta = s*s*s*s + a*s*s*s + b*s*s + c*s + d;
  1135          eps = -delta/(4.*s*s*s + 3.*a*s*s + 2.*b*s + 
c);
  1154    if (hasrmin) nvert *= 2;
  1155    else if (hasphi) nvert += 2;
  1156    nsegs = (2*n-1)*(n-1);
  1157    npols = (n-1)*(n-1);
  1159       nsegs += (2*n-1)*(n-1);
  1160       npols += (n-1)*(n-1);
  1179       Int_t nbPnts = n*(n-1);
  1182       if (hasrmin) nbPnts *= 2;
  1183       else if (hasphi) nbPnts += 2;
  1185       Int_t nbSegs = (2*n-1)*(n-1);
  1186       Int_t nbPols = (n-1)*(n-1);
  1188          nbSegs += (2*n-1)*(n-1);
  1189          nbPols += (n-1)*(n-1);
  1196       if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
  1222    for (
Int_t i=0; i<vecsize; i++) inside[i] = 
Contains(&points[3*i]);
  1232    for (
Int_t i=0; i<vecsize; i++) 
ComputeNormal(&points[3*i], &dirs[3*i], &norms[3*i]);
  1240    for (
Int_t i=0; i<vecsize; i++) dists[i] = 
DistFromInside(&points[3*i], &dirs[3*i], 3, step[i]);
  1248    for (
Int_t i=0; i<vecsize; i++) dists[i] = 
DistFromOutside(&points[3*i], &dirs[3*i], 3, step[i]);
  1258    for (
Int_t i=0; i<vecsize; i++) safe[i] = 
Safety(&points[3*i], inside[i]);
 
#define snext(osub1, osub2)
 
Long64_t LocMax(Long64_t n, const T *a)
 
Geometrical transformation package. 
 
virtual const char * GetAxisName(Int_t iaxis) const
Returns name of axis IAXIS. 
 
Bool_t TestBit(UInt_t f) const
 
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes. 
 
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 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 torus. 
 
virtual TGeoShape * GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const
Create a shape fitting 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. 
 
Short_t Min(Short_t a, Short_t b)
 
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...
 
virtual void InspectShape() const
Prints shape parameters. 
 
static Bool_t IsSameWithinTolerance(Double_t a, Double_t b)
Check if two numbers differ with less than a tolerance. 
 
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
 
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f. 
 
static Double_t Tolerance()
 
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT. 
 
virtual void SetPoints(Double_t *points) const
Create torus mesh points. 
 
virtual const char * ClassName() const
Returns name of class to which the object belongs. 
 
Double_t DDDaxis(const Double_t *pt, const Double_t *dir, Double_t t) const
Second derivative of distance to torus axis w.r.t t. 
 
Double_t DDaxis(const Double_t *pt, const Double_t *dir, Double_t t) const
Computes derivative w.r.t. t of the distance to axis of the torus from point pt + t*dir;...
 
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out". 
 
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
 
void SetTorusDimensions(Double_t r, Double_t rmin, Double_t rmax, Double_t phi1, Double_t dphi)
Set torus dimensions. 
 
Double_t ATan2(Double_t, Double_t)
 
Double_t ToBoundary(const Double_t *pt, const Double_t *dir, Double_t r, Bool_t in) const
Returns distance to the surface or the torus (fR,r) from a point, along a direction. 
 
void SetSectionsValid(UInt_t mask)
 
const char * GetPointerName() const
Provide a pointer name containing uid. 
 
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const
Get range of shape for a given axis. 
 
Double_t Daxis(const Double_t *pt, const Double_t *dir, Double_t t) const
Computes distance to axis of the torus from point pt + t*dir;. 
 
virtual const char * GetName() const
Get the shape name. 
 
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 TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape. 
 
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. 
 
Int_t GetNsegments() const
Get number of segments approximating circles. 
 
Int_t ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
Returns distance to shape primitive mesh. 
 
Bool_t SectionsValid(UInt_t mask) const
 
virtual void InspectShape() const
print shape parameters 
 
Base abstract class for all shapes. 
 
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute closest distance from point px,py to each vertex. 
 
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...
 
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. 
 
virtual void GetBoundingCylinder(Double_t *param) const
Fill vector param[4] with the bounding cylinder parameters. 
 
void TransformPoints(Double_t *points, UInt_t NbPoints) const
Tranform a set of points (LocalToMaster) 
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message. 
 
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. 
 
Generic 3D primitive description class. 
 
Int_t SolveCubic(Double_t a, Double_t b, Double_t c, Double_t *x) const
Find real solutions of the cubic equation : x^3 + a*x^2 + b*x + c = 0 Input: a,b,c Output: x[3] real ...
 
virtual TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
Divide this torus shape belonging to volume "voldiv" into ndiv volumes called divname, from start position with the given step. 
 
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3]. 
 
virtual void SetSegsAndPols(TBuffer3D &buff) const
Fill TBuffer3D structure for segments and polygons. 
 
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...
 
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...
 
R__EXTERN TGeoManager * gGeoManager
 
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference. 
 
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 box. 
 
Int_t SolveQuartic(Double_t a, Double_t b, Double_t c, Double_t d, Double_t *x) const
Find real solutions of the quartic equation : x^4 + a*x^3 + b*x^2 + c*x + d = 0 Input: a...
 
Bool_t TestShapeBit(UInt_t f) const
 
virtual Bool_t Contains(const Double_t *point) const
Test if point is inside the torus. 
 
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
 
virtual void SetDimensions(Double_t *param)
Set torus dimensions starting from a list. 
 
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation. 
 
void SetShapeBit(UInt_t f, Bool_t set)
Equivalent of TObject::SetBit. 
 
virtual void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections, Bool_t localFrame) const
Fills the supplied buffer, with sections in desired frame See TBuffer3D.h for explanation of sections...
 
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 ComputeBBox()
Compute bounding box of the torus. 
 
Short_t Max(Short_t a, Short_t b)
 
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...
 
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
 
TGeoTorus()
Default constructor. 
 
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. 
 
virtual void Sizeof3D() const
fill size of this 3-D object 
 
Double_t Sqrt(Double_t x)
 
Long64_t LocMin(Long64_t n, const T *a)
 
double norm(double *x, double *p)
 
Int_t GetBasicColor() const
Get the basic color (0-7). 
 
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 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 torus.