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)));