File indexing completed on 2023-10-25 09:56:54
0001 inline void volumeHandle::buildTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi) {
0002 LogTrace("MagGeoBuilder") << "Building tubs surfaces...: ";
0003 LogTrace("MagGeoBuilder") << "zhalf " << zhalf << newln << "rIn " << rIn << newln << "rOut " << rOut
0004 << newln << "startPhi " << startPhi << newln << "deltaPhi " << deltaPhi;
0005
0006
0007 double rCentr = (rIn + rOut) / 2.;
0008 Geom::Phi<double> phiCenter(startPhi + deltaPhi / 2.);
0009 center_ = refPlane->toGlobal(LocalPoint(rCentr * cos(phiCenter), rCentr * sin(phiCenter), 0.));
0010
0011 theRN = rCentr;
0012
0013
0014 surfaces[outer] = new Cylinder(rOut, Surface::PositionType(0, 0, center_.z()), Surface::RotationType());
0015
0016
0017
0018
0019 surfaces[inner] = new Cylinder(rIn, Surface::PositionType(0, 0, center_.z()), Surface::RotationType());
0020
0021
0022 buildPhiZSurf(startPhi, deltaPhi, zhalf, rCentr);
0023
0024
0025 if (debug) {
0026 if (dynamic_cast<const Cylinder*>(&(*surfaces[outer]))->radius() <
0027 dynamic_cast<const Cylinder*>(&(*surfaces[inner]))->radius()) {
0028 LogTrace("MagGeometry") << "*** WARNING: pos_outer < pos_inner ";
0029 }
0030 }
0031
0032 theRMin = rIn;
0033 theRMax = rOut;
0034 thePhiMin = surfaces[phiminus]->position().phi();
0035 }