13 pair<DiskSectorBounds*, GlobalVector> computeBounds(
const vector<const GeomDet*>& dets,
const Plane& plane) {
18 float zmin(plane.
toLocal(tmpPos).
z());
19 float zmax(plane.
toLocal(tmpPos).
z());
23 for (vector<const GeomDet*>::const_iterator it = dets.begin(); it != dets.end(); it++) {
26 for (vector<GlobalPoint>::const_iterator
i = corners.begin();
i != corners.end();
i++) {
43 float rdet = (*it)->position().perp();
44 float height = (*it)->surface().bounds().width();
45 rmin =
min(rmin, rdet - height / 2.
F);
46 rmax =
max(rmax, rdet + height / 2.
F);
50 edm::LogError(
"TkDetLayers") <<
" BladeShapeBuilderFromDet : "
51 <<
"Something went wrong with Phi Sorting !";
52 float zPos = (zmax + zmin) / 2.;
55 float rmed = (rmin + rmax) / 2.;
58 edm::LogError(
"TkDetLayers") <<
" something strange going on, please check " << phimin <<
" " <<
phimax <<
" "
69 LogDebug(
"TkDetLayers") <<
"localPos in computeBounds: " << localPos <<
"\n"
70 <<
"rmin: " << rmin <<
"\n"
71 <<
"rmax: " << rmax <<
"\n"
72 <<
"zmin: " << zmin <<
"\n"
73 <<
"zmax: " << zmax <<
"\n"
74 <<
"phiWin: " << phiWin;
80 const Plane& plane = dets.front()->surface();
89 if (planePosition.
x() * planeXAxis.
x() + planePosition.
y() * planeXAxis.
y() > 0.) {
96 if (planeZAxis.
z() * planePosition.
z() > 0.) {
102 xAxis = yAxis.
cross(zAxis);
112 Vector posSum(0, 0, 0);
113 for (vector<const GeomDet*>::const_iterator
i = dets.begin();
i != dets.end();
i++) {
114 posSum += (**i).surface().position().basicVector();
120 Plane tmpPlane(meanPos, rotation);
122 auto bo = computeBounds(dets, tmpPlane);
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Local3DVector LocalVector
ROOT::Math::Plane3D::Vector Vector
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
Log< level::Error, false > LogError
LocalPoint toLocal(const GlobalPoint &gp) const
Cos< T >::type cos(const T &t)
bool phiLess(float phi1, float phi2)
static BoundDiskSector * build(const std::vector< const GeomDet * > &dets) __attribute__((cold))
static std::vector< GlobalPoint > corners(const Plane &)
TkRotation< float > RotationType
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
const PositionType & position() const