15 pair<DiskSectorBounds*, GlobalVector> computeBounds(
const vector<const GeomDet*>& dets) {
17 float rmin(dets.front()->surface().position().perp());
19 float zmin(dets.front()->surface().position().z());
21 float phimin(dets.front()->surface().position().phi());
24 for (
auto const& idet : dets) {
26 for (
auto const&
i : corners) {
42 edm::LogError(
"MTDDetLayers") <<
" MTDDiskSectorBuilderFromDet : "
43 <<
"Something went wrong with Phi Sorting !";
44 float zPos = (zmax + zmin) / 2.;
47 float rmed = (rmin + rmax) / 2.;
50 edm::LogError(
"MTDDetLayers") <<
" something strange going on, please check " << phimin <<
" " <<
phimax <<
" "
59 LogTrace(
"MTDDetLayers") <<
"MTDDiskSectorBuilderFromDet::computeBounds sector at: " << std::fixed << pos <<
"\n"
60 <<
"zmin : " << std::setw(14) << zmin <<
"\n"
61 <<
"zmax : " << std::setw(14) << zmax <<
"\n"
62 <<
"rmin : " << std::setw(14) << rmin <<
"\n"
63 <<
"rmax : " << std::setw(14) << rmax <<
"\n"
64 <<
"phi ref : " << std::setw(14) << phiPos <<
"\n"
65 <<
"phi win : " << std::setw(14) << phiWin;
67 return make_pair(
new DiskSectorBounds(rmin, rmax, zmin - zPos, zmax - zPos, phiWin), pos);
83 float zcheck = dets.front()->surface().
position().
z();
84 constexpr
double tol(0.5);
85 for (
auto const& idet : dets) {
86 float zdiff = zcheck - (*idet).surface().position().z();
89 <<
" MTDDiskSectorBuilderFromDet: Trying to build sector from Dets at different z positions !! Delta_z = "
94 auto bo = computeBounds(dets);
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Sin< T >::type sin(const T &t)
Log< level::Error, false > LogError
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
bool phiLess(float phi1, float phi2)
static std::vector< GlobalPoint > corners(const Plane &)
TkRotation< float > RotationType
BoundDiskSector * operator()(const std::vector< const GeomDet * > &dets) const
const PositionType & position() const
Global3DVector GlobalVector
Basic3DVector unit() const