15 pair<DiskSectorBounds *, GlobalVector>
16 computeBounds(
const vector<const GeomDet*>& dets,
29 for(vector<const GeomDet*>::const_iterator it=dets.begin(); it!=dets.end(); it++){
32 for(vector<GlobalPoint>::const_iterator
i=corners.begin();
33 i!=corners.end();
i++) {
42 if (
PhiLess()( phi, phimin)) phimin = phi;
43 if (
PhiLess()( phimax, phi)) phimax = phi;
49 float rdet = (*it)->position().perp();
50 float height = (*it)->surface().bounds().width();
51 rmin =
min( rmin, rdet-height/2.
F);
52 rmax =
max( rmax, rdet+height/2.
F);
58 edm::LogError(
"TkDetLayers") <<
" BladeShapeBuilderFromDet : "
59 <<
"Something went wrong with Phi Sorting !" ;
61 float phiWin = phimax - phimin;
62 float phiPos = (phimax+phimin)/2.;
63 float rmed = (rmin+rmax)/2.;
66 edm::LogError(
"TkDetLayers") <<
" something strange going on, please check " << phimin <<
" " << phimax <<
" " << phiWin ;
76 LogDebug(
"TkDetLayers") <<
"localPos in computeBounds: " << localPos <<
"\n"
77 <<
"rmin: " << rmin <<
"\n"
78 <<
"rmax: " << rmax <<
"\n"
79 <<
"zmin: " <<
zmin <<
"\n"
80 <<
"zmax: " <<
zmax <<
"\n"
81 <<
"phiWin: " << phiWin ;
90 computeRotation(
const vector<const GeomDet*>& dets,
93 const Plane& plane = dets.front()->surface();
102 if(planePosition.
x()*planeXAxis.
x()+planePosition.
y()*planeXAxis.
y() > 0.){
109 if(planeZAxis.
z()*planePosition.
z() > 0.){
115 xAxis = yAxis.
cross( zAxis);
127 Vector posSum(0,0,0);
128 for (vector<const GeomDet*>::const_iterator
i=dets.begin();
i!=dets.end();
i++) {
129 posSum += (**i).surface().position().basicVector();
135 Plane tmpPlane( meanPos, rotation);
139 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)
static BoundDiskSector * build(const std::vector< const GeomDet * > &dets) __attribute__((cold))
static std::vector< GlobalPoint > corners(const Plane &)
Geom::Phi< T > phi() const
TkRotation< float > RotationType
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
const PositionType & position() const