10 vector<const Det*>::const_iterator
last)
const
16 for (vector<const Det*>::const_iterator
i=first;
i!=
last;
i++) {
17 posSum += (**i).surface().position().basicVector();
18 rSum += (**i).surface().position().
perp();
20 float div(1/
float(last-first));
22 float meanR( div*rSum);
27 float zmin = meanPos.
z();
28 float zmax = meanPos.
z();
29 for (vector<const Det*>::const_iterator
i=first;
i!=
last;
i++) {
30 vector<GlobalPoint> corners =
32 for (vector<GlobalPoint>::const_iterator ic = corners.begin();
33 ic != corners.end(); ic++) {
44 float rdet = (**i).surface().position().perp();
45 float halfThick = (**i).surface().bounds().thickness() / 2.F;
46 rmin =
min( rmin, rdet-halfThick);
47 rmax =
max( rmax, rdet+halfThick);
60 zmin-pos.
z(), zmax-pos.
z());
61 return new Cylinder(Cylinder::computeRadius(*scp), pos, rot, scp);
67 for (
int nc=0; nc<8; ++nc) {
68 float r = bb[nc].perp();
80 rmin =
std::min( rmin, rdet-halfThick);
81 rmax =
std::max( rmax, rdet+halfThick);
91 return new Cylinder(Cylinder::computeRadius(*scp), pos, rot, scp);
ROOT::Math::Plane3D::Vector Vector
BoundCylinder * operator()(std::vector< const Det * >::const_iterator first, std::vector< const Det * >::const_iterator last) const
const Bounds & bounds() const
const Plane & surface() const
The nominal surface of the GeomDet.
virtual float thickness() const =0
const T & max(const T &a, const T &b)
BoundCylinder * build() const
T perp() const
Magnitude of transverse component.
static std::vector< GlobalPoint > corners(const Plane &)
const PositionType & position() const