15 Vector posSum( 0, 0, 0 );
16 for( std::vector<const GeomDetUnit*>::const_iterator
i = dets.begin(),
end = dets.end();
i !=
end; ++
i )
18 posSum += (**i).surface().position().basicVector();
31 std::pair<RectangularPlaneBounds, GlobalVector> bo =
computeRectBounds( dets, *tmpPlane);
32 return new BoundPlane( meanPos+bo.second, rotation, bo.first, &newmp);
36 std::pair<RectangularPlaneBounds, GlobalVector>
40 std::vector<GlobalPoint> corners;
41 for( std::vector<const GeomDetUnit*>::const_iterator idet = dets.begin(), dend = dets.end();
42 idet != dend; ++idet )
46 corners.insert( corners.end(), dc.begin(), dc.end());
49 float xmin(0), xmax(0), ymin(0), ymax(0), zmin(0), zmax(0);
50 for( std::vector<GlobalPoint>::const_iterator
i = corners.begin(), cend = corners.end();
54 if( p.
x() < xmin ) xmin = p.
x();
55 if( p.
x() > xmax ) xmax = p.
x();
56 if( p.
y() < ymin ) ymin = p.
y();
57 if( p.
y() > ymax ) ymax = p.
y();
58 if( p.
z() < zmin ) zmin = p.
z();
59 if( p.
z() > zmax ) zmax = p.
z();
62 LocalVector localOffset(( xmin + xmax ) / 2., ( ymin + ymax ) / 2., ( zmin + zmax ) / 2. );
83 if( planeYAxis.
z() < 0 )
91 if( n.
x() * meanPos.
x() + n.
y() * meanPos.
y() > 0 )
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Local3DVector LocalVector
std::pair< RectangularPlaneBounds, GlobalVector > computeRectBounds(const std::vector< const GeomDetUnit * > &dets, const BoundPlane &plane) const
ROOT::Math::Plane3D::Vector Vector
static BoundPlanePointer build(const PositionType &pos, const RotationType &rot, const Bounds *bounds, MediumProperties *mp=0)
ResultType plane(const std::vector< const GeomDetUnit * > &dets) const
static std::vector< GlobalPoint > corners(const BoundPlane &)
LocalPoint toLocal(const GlobalPoint &gp) const
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
unsigned int offset(bool)
Unlimited (trivial) bounds.
TkRotation< float > RotationType
Surface::RotationType computeRotation(const std::vector< GeomDetUnit * > &dets, const Surface::PositionType &meanPos) const