65 SetShapeBit(TGeoShape::kGeoHype);
78 TGeoHype::TGeoHype(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
79 :TGeoTube(rin, rout, dz)
81 SetShapeBit(TGeoShape::kGeoHype);
82 SetHypeDimensions(rin, stin, rout, stout, dz);
84 if (fDz<0) SetShapeBit(kGeoRunTimeShape);
90 TGeoHype::TGeoHype(
const char *name,Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
91 :TGeoTube(name, rin, rout, dz)
93 SetShapeBit(TGeoShape::kGeoHype);
94 SetHypeDimensions(rin, stin, rout, stout, dz);
96 if (fDz<0) SetShapeBit(kGeoRunTimeShape);
108 TGeoHype::TGeoHype(Double_t *param)
109 :TGeoTube(param[1],param[3],param[0])
111 SetShapeBit(TGeoShape::kGeoHype);
112 SetDimensions(param);
114 if (fDz<0) SetShapeBit(kGeoRunTimeShape);
121 TGeoHype::~TGeoHype()
128 Double_t TGeoHype::Capacity()
const
130 Double_t capacity = 2.*TMath::Pi()*fDz*(fRmax*fRmax-fRmin*fRmin) +
131 (2.*TMath::Pi()/3.)*fDz*fDz*fDz*(fToutsq-fTinsq);
138 void TGeoHype::ComputeBBox()
141 Warning(
"ComputeBBox",
"Shape %s has invalid rmin=%g ! SET TO 0.", GetName(),fRmin);
144 if ((fRmin>fRmax) || (fRmin*fRmin+fTinsq*fDz*fDz > fRmax*fRmax+fToutsq*fDz*fDz)) {
145 SetShapeBit(kGeoInvalidShape);
146 Error(
"ComputeBBox",
"Shape %s hyperbolic surfaces are malformed: rin=%g, stin=%g, rout=%g, stout=%g",
147 GetName(), fRmin, fStIn, fRmax, fStOut);
151 fDX = fDY = TMath::Sqrt(RadiusHypeSq(fDz, kFALSE));
158 void TGeoHype::ComputeNormal(
const Double_t *point,
const Double_t *dir, Double_t *norm)
161 Double_t rsq = point[0]*point[0]+point[1]*point[1];
162 Double_t r = TMath::Sqrt(rsq);
163 Double_t rin = (HasInner())?(TMath::Sqrt(RadiusHypeSq(point[2],kTRUE))):0.;
164 Double_t rout = TMath::Sqrt(RadiusHypeSq(point[2],kFALSE));
165 saf[0] = TMath::Abs(fDz-TMath::Abs(point[2]));
166 saf[1] = (HasInner())?TMath::Abs(rin-r):TGeoShape::Big();
167 saf[2] = TMath::Abs(rout-r);
168 Int_t i = TMath::LocMin(3,saf);
169 if (i==0 || r<1.E-10) {
170 norm[0] = norm[1] = 0.;
171 norm[2] = TMath::Sign(1.,dir[2]);
174 Double_t t = (i==1)?fTinsq:fToutsq;;
176 Double_t ct = TMath::Sqrt(1./(1.+t*t));
177 Double_t st = t * ct;
178 Double_t phi = TMath::ATan2(point[1], point[0]);
179 Double_t cphi = TMath::Cos(phi);
180 Double_t sphi = TMath::Sin(phi);
185 if (norm[0]*dir[0]+norm[1]*dir[1]+norm[2]*dir[2]<0) {
195 Bool_t TGeoHype::Contains(
const Double_t *point)
const
197 if (TMath::Abs(point[2]) > fDz)
return kFALSE;
198 Double_t r2 = point[0]*point[0]+point[1]*point[1];
199 Double_t routsq = RadiusHypeSq(point[2], kFALSE);
200 if (r2>routsq)
return kFALSE;
201 if (!HasInner())
return kTRUE;
202 Double_t rinsq = RadiusHypeSq(point[2], kTRUE);
203 if (r2<rinsq)
return kFALSE;
210 Int_t TGeoHype::DistancetoPrimitive(Int_t px, Int_t py)
212 Int_t numPoints = GetNmeshVertices();
213 return ShapeDistancetoPrimitive(numPoints, px, py);
219 Double_t TGeoHype::DistFromInside(
const Double_t *point,
const Double_t *dir, Int_t iact, Double_t step, Double_t *safe)
const
221 if (iact<3 && safe) {
222 *safe = Safety(point, kTRUE);
223 if (iact==0)
return TGeoShape::Big();
224 if ((iact==1) && (*safe>step))
return TGeoShape::Big();
228 Double_t sz = TGeoShape::Big();
230 sz = (fDz-point[2])/dir[2];
231 if (sz<=0.)
return 0.;
234 sz = -(fDz+point[2])/dir[2];
235 if (sz<=0.)
return 0.;
241 Double_t srin = TGeoShape::Big();
242 Double_t srout = TGeoShape::Big();
247 npos = DistToHype(point, dir, s, kTRUE, kTRUE);
248 if (npos) srin = s[0];
249 npos = DistToHype(point, dir, s, kFALSE, kTRUE);
250 if (npos) srout = s[0];
251 sr = TMath::Min(srin, srout);
252 return TMath::Min(sz,sr);
259 Double_t TGeoHype::DistFromOutside(
const Double_t *point,
const Double_t *dir, Int_t iact, Double_t step, Double_t *safe)
const
261 if (iact<3 && safe) {
262 *safe = Safety(point, kFALSE);
263 if (iact==0)
return TGeoShape::Big();
264 if ((iact==1) && (step<=*safe))
return TGeoShape::Big();
267 Double_t sdist = TGeoBBox::DistFromOutside(point,dir, fDX, fDY, fDZ, fOrigin, step);
268 if (sdist>=step)
return TGeoShape::Big();
272 Double_t sz = TGeoShape::Big();
273 if (TMath::Abs(point[2])>=fDz) {
275 if ((point[2]*dir[2]) < 0) {
277 sz = (TMath::Abs(point[2])-fDz)/TMath::Abs(dir[2]);
279 xi = point[0]+sz*dir[0];
280 yi = point[1]+sz*dir[1];
281 Double_t r2 = xi*xi + yi*yi;
282 Double_t rmin2 = RadiusHypeSq(fDz, kTRUE);
284 Double_t rmax2 = RadiusHypeSq(fDz, kFALSE);
285 if (r2 <= rmax2)
return sz;
290 Double_t sin = TGeoShape::Big();
291 Double_t sout = TGeoShape::Big();
294 npos = DistToHype(point, dir, s, kTRUE, kFALSE);
296 zi = point[2] + s[0]*dir[2];
297 if (TMath::Abs(zi) <= fDz) sin = s[0];
299 zi = point[2] + s[1]*dir[2];
300 if (TMath::Abs(zi) <= fDz) sin = s[1];
303 npos = DistToHype(point, dir, s, kFALSE, kFALSE);
305 zi = point[2] + s[0]*dir[2];
306 if (TMath::Abs(zi) <= fDz) sout = s[0];
308 zi = point[2] + s[1]*dir[2];
309 if (TMath::Abs(zi) <= fDz) sout = s[1];
312 return TMath::Min(sin, sout);
319 Int_t TGeoHype::DistToHype(
const Double_t *point,
const Double_t *dir, Double_t *s, Bool_t inner, Bool_t in)
const
321 Double_t r0, t0, snext;
323 if (!HasInner())
return 0;
330 Double_t a = dir[0]*dir[0] + dir[1]*dir[1] - t0*dir[2]*dir[2];
331 Double_t b = t0*point[2]*dir[2] - point[0]*dir[0] - point[1]*dir[1];
332 Double_t c = point[0]*point[0] + point[1]*point[1] - t0*point[2]*point[2] - r0*r0;
334 if (TMath::Abs(a) < TGeoShape::Tolerance()) {
335 if (TMath::Abs(b) < TGeoShape::Tolerance())
return 0;
337 if (snext < 0.)
return 0;
342 Double_t delta = b*b - a*c;
343 Double_t ainv = 1./a;
345 if (delta < 0.)
return 0;
346 delta = TMath::Sqrt(delta);
347 Double_t sone = TMath::Sign(1.,ainv);
350 snext = (b + i*sone*delta)*ainv;
352 if (snext<0)
continue;
354 Double_t r = TMath::Sqrt(point[0]*point[0]+point[1]*point[1]);
355 Double_t t = (inner)?fTinsq:fToutsq;
357 Double_t phi = TMath::ATan2(point[1], point[0]);
358 Double_t ndotd = TMath::Cos(phi)*dir[0]+TMath::Sin(phi)*dir[1]+t*dir[2];
359 if (inner) ndotd *= -1;
361 if (ndotd<0) s[npos++] = snext;
362 }
else s[npos++] = snext;
370 TGeoVolume *TGeoHype::Divide(TGeoVolume * ,
const char *divname, Int_t , Int_t ,
371 Double_t , Double_t )
373 Error(
"Divide",
"Hyperboloids cannot be divided. Division volume %s not created", divname);
380 Double_t TGeoHype::GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi)
const
388 xhi = TMath::Sqrt(RadiusHypeSq(fDz, kFALSE));
409 void TGeoHype::GetBoundingCylinder(Double_t *param)
const
412 param[0] *= param[0];
413 param[1] = TMath::Sqrt(RadiusHypeSq(fDz, kFALSE));
414 param[1] *= param[1];
423 TGeoShape *TGeoHype::GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix * )
const
425 if (!TestShapeBit(kGeoRunTimeShape))
return 0;
430 mother->GetAxisRange(3,zmin,zmax);
431 if (zmax<0)
return 0;
434 Error(
"GetMakeRuntimeShape",
"Shape %s does not have negative Z range", GetName());
437 TGeoShape *hype =
new TGeoHype(GetName(), dz, fRmax, fStOut, fRmin, fStIn);
444 void TGeoHype::InspectShape()
const
446 printf(
"*** Shape %s: TGeoHype ***\n", GetName());
447 printf(
" Rin = %11.5f\n", fRmin);
448 printf(
" sin = %11.5f\n", fStIn);
449 printf(
" Rout = %11.5f\n", fRmax);
450 printf(
" sout = %11.5f\n", fStOut);
451 printf(
" dz = %11.5f\n", fDz);
453 printf(
" Bounding box:\n");
454 TGeoBBox::InspectShape();
461 TBuffer3D *TGeoHype::MakeBuffer3D()
const
463 Int_t n = gGeoManager->GetNsegments();
464 Bool_t hasRmin = HasInner();
465 Int_t nbPnts = (hasRmin)?(2*n*n):(n*n+2);
466 Int_t nbSegs = (hasRmin)?(4*n*n):(n*(2*n+1));
467 Int_t nbPols = (hasRmin)?(2*n*n):(n*(n+1));
469 TBuffer3D* buff =
new TBuffer3D(TBuffer3DTypes::kGeneric,
470 nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols);
473 SetPoints(buff->fPnts);
474 SetSegsAndPols(*buff);
483 void TGeoHype::SetSegsAndPols(TBuffer3D &buff)
const
485 Int_t c = GetBasicColor();
487 n = gGeoManager->GetNsegments();
488 Bool_t hasRmin = HasInner();
490 Int_t irout = (hasRmin)?(n*n):2;
523 Int_t isgenin = (hasRmin)?(isin+n*n):0;
524 Int_t isout = (hasRmin)?(isgenin+n*(n-1)):0;
525 Int_t isgenout = isout+n*n;
526 Int_t islo = isgenout+n*(n-1);
527 Int_t ishi = islo + n;
532 for (i=0; i<n; i++) {
533 for (j=0; j<n; j++) {
534 npt = 3*(isin+n*i+j);
536 buff.fSegs[npt+1] = irin+n*i+j;
537 buff.fSegs[npt+2] = irin+n*i+((j+1)%n);
541 for (i=0; i<n-1; i++) {
542 for (j=0; j<n; j++) {
543 npt = 3*(isgenin+n*i+j);
545 buff.fSegs[npt+1] = irin+n*i+j;
546 buff.fSegs[npt+2] = irin+n*(i+1)+j;
551 for (i=0; i<n; i++) {
552 for (j=0; j<n; j++) {
553 npt = 3*(isout + n*i+j);
555 buff.fSegs[npt+1] = irout+n*i+j;
556 buff.fSegs[npt+2] = irout+n*i+((j+1)%n);
560 for (i=0; i<n-1; i++) {
561 for (j=0; j<n; j++) {
562 npt = 3*(isgenout+n*i+j);
564 buff.fSegs[npt+1] = irout+n*i+j;
565 buff.fSegs[npt+2] = irout+n*(i+1)+j;
569 for (j=0; j<n; j++) {
572 buff.fSegs[npt+1] = irin;
573 if (hasRmin) buff.fSegs[npt+1] += j;
574 buff.fSegs[npt+2] = irout + j;
577 for (j=0; j<n; j++) {
580 buff.fSegs[npt+1] = irin+1;
581 if (hasRmin) buff.fSegs[npt+1] += n*(n-1)+j-1;
582 buff.fSegs[npt+2] = irout + n*(n-1)+j;
608 Int_t ipout = (hasRmin)?(ipin+n*(n-1)):0;
609 Int_t iplo = ipout+n*(n-1);
613 for (i=0; i<n-1; i++) {
614 for (j=0; j<n; j++) {
615 npt = 6*(ipin+n*i+j);
617 buff.fPols[npt+1] = 4;
618 buff.fPols[npt+2] = isin+n*i+j;
619 buff.fPols[npt+3] = isgenin+i*n+((j+1)%n);
620 buff.fPols[npt+4] = isin+n*(i+1)+j;
621 buff.fPols[npt+5] = isgenin+i*n+j;
626 for (i=0; i<n-1; i++) {
627 for (j=0; j<n; j++) {
628 npt = 6*(ipout+n*i+j);
630 buff.fPols[npt+1] = 4;
631 buff.fPols[npt+2] = isout+n*i+j;
632 buff.fPols[npt+3] = isgenout+i*n+j;
633 buff.fPols[npt+4] = isout+n*(i+1)+j;
634 buff.fPols[npt+5] = isgenout+i*n+((j+1)%n);
639 for (j=0; j<n; j++) {
641 buff.fPols[npt] = c+1;
642 buff.fPols[npt+1] = 4;
643 buff.fPols[npt+2] = isin+j;
644 buff.fPols[npt+3] = islo+j;
645 buff.fPols[npt+4] = isout+j;
646 buff.fPols[npt+5] = islo+((j+1)%n);
648 for (j=0; j<n; j++) {
650 buff.fPols[npt] = c+2;
651 buff.fPols[npt+1] = 4;
652 buff.fPols[npt+2] = isin+n*(n-1)+j;
653 buff.fPols[npt+3] = ishi+((j+1)%n);
654 buff.fPols[npt+4] = isout+n*(n-1)+j;
655 buff.fPols[npt+5] = ishi+j;
658 for (j=0; j<n; j++) {
660 buff.fPols[npt] = c+1;
661 buff.fPols[npt+1] = 3;
662 buff.fPols[npt+2] = isout+j;
663 buff.fPols[npt+3] = islo+((j+1)%n);
664 buff.fPols[npt+4] = islo+j;
666 for (j=0; j<n; j++) {
667 npt = 6*iplo+5*(n+j);
668 buff.fPols[npt] = c+2;
669 buff.fPols[npt+1] = 3;
670 buff.fPols[npt+2] = isout+n*(n-1)+j;
671 buff.fPols[npt+3] = ishi+j;
672 buff.fPols[npt+4] = ishi+((j+1)%n);
680 Double_t TGeoHype::RadiusHypeSq(Double_t z, Bool_t inner)
const
690 return (r0*r0+tsq*z*z);
696 Double_t TGeoHype::ZHypeSq(Double_t r, Bool_t inner)
const
706 if (TMath::Abs(tsq) < TGeoShape::Tolerance())
return TGeoShape::Big();
707 return ((r*r-r0*r0)/tsq);
714 Double_t TGeoHype::Safety(
const Double_t *point, Bool_t in)
const
716 Double_t safe, safrmin, safrmax;
718 safe = fDz-TMath::Abs(point[2]);
719 safrmin = SafetyToHype(point, kTRUE, in);
720 if (safrmin < safe) safe = safrmin;
721 safrmax = SafetyToHype(point, kFALSE,in);
722 if (safrmax < safe) safe = safrmax;
724 safe = -fDz+TMath::Abs(point[2]);
725 safrmin = SafetyToHype(point, kTRUE, in);
726 if (safrmin > safe) safe = safrmin;
727 safrmax = SafetyToHype(point, kFALSE,in);
728 if (safrmax > safe) safe = safrmax;
737 Double_t TGeoHype::SafetyToHype(
const Double_t *point, Bool_t inner, Bool_t in)
const
739 Double_t r, rsq, rhsq, rh, dr, tsq, saf;
740 if (inner && !HasInner())
return (in)?TGeoShape::Big():-TGeoShape::Big();
741 rsq = point[0]*point[0]+point[1]*point[1];
742 r = TMath::Sqrt(rsq);
743 rhsq = RadiusHypeSq(point[2], inner);
744 rh = TMath::Sqrt(rhsq);
747 if (!in && dr>0)
return -TGeoShape::Big();
748 if (TMath::Abs(fStIn) < TGeoShape::Tolerance())
return TMath::Abs(dr);
749 if (fRmin<TGeoShape::Tolerance())
return TMath::Abs(dr/TMath::Sqrt(1.+ fTinsq));
752 if (!in && dr<0)
return -TGeoShape::Big();
753 if (TMath::Abs(fStOut) < TGeoShape::Tolerance())
return TMath::Abs(dr);
756 if (TMath::Abs(dr)<TGeoShape::Tolerance())
return 0.;
760 m = rh/(tsq*TMath::Abs(point[2]));
761 saf = -m*dr/TMath::Sqrt(1.+m*m);
765 m = (TMath::Sqrt(ZHypeSq(r,inner)) - TMath::Abs(point[2]))/dr;
766 saf = m*dr/TMath::Sqrt(1.+m*m);
773 void TGeoHype::SavePrimitive(std::ostream &out, Option_t * )
775 if (TObject::TestBit(kGeoSavePrimitive))
return;
776 out <<
" // Shape: " << GetName() <<
" type: " << ClassName() << std::endl;
777 out <<
" rin = " << fRmin <<
";" << std::endl;
778 out <<
" stin = " << fStIn <<
";" << std::endl;
779 out <<
" rout = " << fRmax <<
";" << std::endl;
780 out <<
" stout = " << fStOut <<
";" << std::endl;
781 out <<
" dz = " << fDz <<
";" << std::endl;
782 out <<
" TGeoShape *" << GetPointerName() <<
" = new TGeoHype(\"" << GetName() <<
"\",rin,stin,rout,stout,dz);" << std::endl;
783 TObject::SetBit(TGeoShape::kGeoSavePrimitive);
789 void TGeoHype::SetHypeDimensions(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
796 fTin = TMath::Tan(fStIn*TMath::DegToRad());
798 fTout = TMath::Tan(fStOut*TMath::DegToRad());
799 fToutsq = fTout*fTout;
800 if ((fRmin==0) && (fStIn==0)) SetShapeBit(kGeoRSeg, kTRUE);
801 else SetShapeBit(kGeoRSeg, kFALSE);
812 void TGeoHype::SetDimensions(Double_t *param)
814 Double_t dz = param[0];
815 Double_t rin = param[1];
816 Double_t stin = param[2];
817 Double_t rout = param[3];
818 Double_t stout = param[4];
819 SetHypeDimensions(rin, stin, rout, stout, dz);
825 void TGeoHype::SetPoints(Double_t *points)
const
830 n = gGeoManager->GetNsegments();
831 Double_t dphi = 360./n;
839 for (i=0; i<n; i++) {
841 r = TMath::Sqrt(RadiusHypeSq(z, kTRUE));
842 for (j=0; j<n; j++) {
843 phi = j*dphi*TMath::DegToRad();
844 points[indx++] = r * TMath::Cos(phi);
845 points[indx++] = r * TMath::Sin(phi);
852 points[indx++] = -fDz;
855 points[indx++] = fDz;
858 for (i=0; i<n; i++) {
860 r = TMath::Sqrt(RadiusHypeSq(z, kFALSE));
861 for (j=0; j<n; j++) {
862 phi = j*dphi*TMath::DegToRad();
863 points[indx++] = r * TMath::Cos(phi);
864 points[indx++] = r * TMath::Sin(phi);
873 void TGeoHype::SetPoints(Float_t *points)
const
878 n = gGeoManager->GetNsegments();
879 Double_t dphi = 360./n;
887 for (i=0; i<n; i++) {
889 r = TMath::Sqrt(RadiusHypeSq(z, kTRUE));
890 for (j=0; j<n; j++) {
891 phi = j*dphi*TMath::DegToRad();
892 points[indx++] = r * TMath::Cos(phi);
893 points[indx++] = r * TMath::Sin(phi);
900 points[indx++] = -fDz;
903 points[indx++] = fDz;
906 for (i=0; i<n; i++) {
908 r = TMath::Sqrt(RadiusHypeSq(z, kFALSE));
909 for (j=0; j<n; j++) {
910 phi = j*dphi*TMath::DegToRad();
911 points[indx++] = r * TMath::Cos(phi);
912 points[indx++] = r * TMath::Sin(phi);
921 void TGeoHype::GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols)
const
923 Int_t n = gGeoManager->GetNsegments();
924 Bool_t hasRmin = HasInner();
925 nvert = (hasRmin)?(2*n*n):(n*n+2);
926 nsegs = (hasRmin)?(4*n*n):(n*(2*n+1));
927 npols = (hasRmin)?(2*n*n):(n*(n+1));
933 Int_t TGeoHype::GetNmeshVertices()
const
935 Int_t n = gGeoManager->GetNsegments();
936 Int_t numPoints = (HasRmin())?(2*n*n):(n*n+2);
943 void TGeoHype::Sizeof3D()
const
950 const TBuffer3D & TGeoHype::GetBuffer3D(Int_t reqSections, Bool_t localFrame)
const
952 static TBuffer3D buffer(TBuffer3DTypes::kGeneric);
954 TGeoBBox::FillBuffer3D(buffer, reqSections, localFrame);
956 if (reqSections & TBuffer3D::kRawSizes) {
957 Int_t n = gGeoManager->GetNsegments();
958 Bool_t hasRmin = HasInner();
959 Int_t nbPnts = (hasRmin)?(2*n*n):(n*n+2);
960 Int_t nbSegs = (hasRmin)?(4*n*n):(n*(2*n+1));
961 Int_t nbPols = (hasRmin)?(2*n*n):(n*(n+1));
962 if (buffer.SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
963 buffer.SetSectionsValid(TBuffer3D::kRawSizes);
966 if ((reqSections & TBuffer3D::kRaw) && buffer.SectionsValid(TBuffer3D::kRawSizes)) {
967 SetPoints(buffer.fPnts);
968 if (!buffer.fLocalFrame) {
969 TransformPoints(buffer.fPnts, buffer.NbPnts());
972 SetSegsAndPols(buffer);
973 buffer.SetSectionsValid(TBuffer3D::kRaw);
984 void TGeoHype::Contains_v(
const Double_t *points, Bool_t *inside, Int_t vecsize)
const
986 for (Int_t i=0; i<vecsize; i++) inside[i] = Contains(&points[3*i]);
994 void TGeoHype::ComputeNormal_v(
const Double_t *points,
const Double_t *dirs, Double_t *norms, Int_t vecsize)
996 for (Int_t i=0; i<vecsize; i++) ComputeNormal(&points[3*i], &dirs[3*i], &norms[3*i]);
1002 void TGeoHype::DistFromInside_v(
const Double_t *points,
const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t* step)
const
1004 for (Int_t i=0; i<vecsize; i++) dists[i] = DistFromInside(&points[3*i], &dirs[3*i], 3, step[i]);
1010 void TGeoHype::DistFromOutside_v(
const Double_t *points,
const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t* step)
const
1012 for (Int_t i=0; i<vecsize; i++) dists[i] = DistFromOutside(&points[3*i], &dirs[3*i], 3, step[i]);
1020 void TGeoHype::Safety_v(
const Double_t *points,
const Bool_t *inside, Double_t *safe, Int_t vecsize)
const
1022 for (Int_t i=0; i<vecsize; i++) safe[i] = Safety(&points[3*i], inside[i]);