14 pair<DiskSectorBounds *, GlobalVector>
15 computeBounds(
const vector<const GeomDet*>& dets,
23 float zmin(plane.
toLocal(tmpPos).
z());
24 float zmax(plane.
toLocal(tmpPos).
z());
28 for(vector<const GeomDet*>::const_iterator it=dets.begin(); it!=dets.end(); it++){
31 for(vector<GlobalPoint>::const_iterator
i=corners.begin();
32 i!=corners.end();
i++) {
48 float rdet = (*it)->position().perp();
49 float height = (*it)->surface().bounds().width();
50 rmin =
min( rmin, rdet-height/2.
F);
51 rmax =
max( rmax, rdet+height/2.
F);
57 edm::LogError(
"TkDetLayers") <<
" BladeShapeBuilderFromDet : " 58 <<
"Something went wrong with Phi Sorting !" ;
59 float zPos = (zmax+zmin)/2.;
62 float rmed = (rmin+rmax)/2.;
65 edm::LogError(
"TkDetLayers") <<
" something strange going on, please check " << phimin <<
" " <<
phimax <<
" " << phiWin ;
75 LogDebug(
"TkDetLayers") <<
"localPos in computeBounds: " << localPos <<
"\n" 76 <<
"rmin: " << rmin <<
"\n" 77 <<
"rmax: " << rmax <<
"\n" 78 <<
"zmin: " << zmin <<
"\n" 79 <<
"zmax: " << zmax <<
"\n" 80 <<
"phiWin: " << phiWin ;
89 computeRotation(
const vector<const GeomDet*>& dets,
92 const Plane& plane = dets.front()->surface();
101 if(planePosition.
x()*planeXAxis.
x()+planePosition.
y()*planeXAxis.
y() > 0.){
108 if(planeZAxis.
z()*planePosition.
z() > 0.){
114 xAxis = yAxis.
cross( zAxis);
126 Vector posSum(0,0,0);
127 for (vector<const GeomDet*>::const_iterator
i=dets.begin();
i!=dets.end();
i++) {
128 posSum += (**i).surface().position().basicVector();
134 Plane tmpPlane( meanPos, rotation);
138 computeBounds( dets,tmpPlane );
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Local3DVector LocalVector
ROOT::Math::Plane3D::Vector Vector
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
LocalPoint toLocal(const GlobalPoint &gp) const
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) 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