13 float rcheck = dets.front()->surface().
position().
perp();
14 float zcheck = dets.front()->surface().position().z();
15 for (vector<const GeomDet*>::const_iterator
i = dets.begin();
i != dets.end();
i++) {
16 float rdiff = (**i).surface().position().perp() - rcheck;
18 edm::LogError(
"TkDetLayers") <<
" ForwardDiskSectorBuilderFromDet: Trying to build Petal Wedge from " 19 <<
"Dets at different radii !! Delta_r = " << rdiff;
20 float zdiff = zcheck - (**i).surface().position().z();
22 edm::LogError(
"TkDetLayers") <<
" ForwardDiskSectorBuilderFromDet: Trying to build Petal Wedge from " 23 <<
"Dets at different z positions !! Delta_z = " << zdiff;
26 auto bo = computeBounds(dets);
34 const vector<const GeomDet*>& dets)
const {
36 float rmin = (**(dets.begin())).surface().position().perp();
38 float zmin((**(dets.begin())).surface().position().z());
40 float phimin((**(dets.begin())).surface().position().phi());
43 for (vector<const GeomDet*>::const_iterator idet = dets.begin(); idet != dets.end(); idet++) {
44 vector<const GeomDet*> detUnits = (**idet).components();
45 if (!detUnits.empty()) {
46 for (vector<const GeomDet*>::const_iterator detu = detUnits.begin(); detu != detUnits.end(); detu++) {
48 vector<GlobalPoint> corners = computeTrapezoidalCorners(*detu);
49 for (vector<GlobalPoint>::const_iterator
i = corners.begin();
i != corners.end();
i++) {
65 float rdet = (**detu).position().perp();
66 float len = (**detu).surface().bounds().length();
67 float width = (**detu).surface().bounds().width();
73 double xAxisCos =
xAxis.unit().dot(perpDir.
unit());
74 double yAxisCos =
yAxis.unit().dot(perpDir.
unit());
80 rmin =
min(rmin, rdet - len / 2.
F);
81 rmax =
max(rmax, rdet + len / 2.
F);
85 vector<GlobalPoint> corners = computeTrapezoidalCorners(*idet);
86 for (vector<GlobalPoint>::const_iterator
i = corners.begin();
i != corners.end();
i++) {
103 float rdet = (**idet).position().perp();
104 float len = (**idet).surface().bounds().length();
105 float width = (**idet).surface().bounds().width();
111 double xAxisCos =
xAxis.unit().dot(perpDir.
unit());
112 double yAxisCos =
yAxis.unit().dot(perpDir.
unit());
118 rmin =
min(rmin, rdet - len / 2.
F);
119 rmax =
max(rmax, rdet + len / 2.
F);
125 edm::LogError(
"TkDetLayers") <<
" ForwardDiskSectorBuilderFromDet : " 126 <<
"Something went wrong with Phi Sorting !";
130 float rmed = (rmin + rmax) / 2.;
133 edm::LogError(
"TkDetLayers") <<
" Debug: something strange going on, please check ";
168 auto const&
parameters = (*myBounds).parameters();
171 edm::LogError(
"TkDetLayers") <<
"ForwardDiskSectorBuilder: something weird going on !";
172 edm::LogError(
"TkDetLayers") <<
" Trapezoidal parameters of GeomDet (L2/L1/T/H): ";
173 for (
int i = 0;
i < 4;
i++)
182 vector<GlobalPoint> corners;
184 corners.push_back(plane.toGlobal(
LocalPoint(-htopedge, hapothem, hthick)));
185 corners.push_back(plane.toGlobal(
LocalPoint(-htopedge, hapothem, -hthick)));
186 corners.push_back(plane.toGlobal(
LocalPoint(htopedge, hapothem, hthick)));
187 corners.push_back(plane.toGlobal(
LocalPoint(htopedge, hapothem, -hthick)));
188 corners.push_back(plane.toGlobal(
LocalPoint(hbotedge, -hapothem, hthick)));
189 corners.push_back(plane.toGlobal(
LocalPoint(hbotedge, -hapothem, -hthick)));
190 corners.push_back(plane.toGlobal(
LocalPoint(-hbotedge, -hapothem, hthick)));
191 corners.push_back(plane.toGlobal(
LocalPoint(-hbotedge, -hapothem, -hthick)));
Local3DVector LocalVector
BoundDiskSector * operator()(const std::vector< const GeomDet *> &dets) const
Sin< T >::type sin(const T &t)
Global3DPoint GlobalPoint
Log< level::Error, false > LogError
std::vector< GlobalPoint > computeTrapezoidalCorners(const GeomDet *detu) const
std::pair< DiskSectorBounds *, GlobalVector > computeBounds(const std::vector< const GeomDet *> &dets) const
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
Basic3DVector unit() const
bool phiLess(float phi1, float phi2)
const PositionType & position() const
TkRotation< float > RotationType
Vector3DBase unit() const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Global3DVector GlobalVector
Surface::RotationType computeRotation(const std::vector< const GeomDet *> &dets, Surface::PositionType pos) const