20 LogDebug(
"DetLayers") <<
"ForwaLayer::computeSurface callded";
21 vector<const GeomDet*> comps = basicComponents();
23 vector<const GeomDet*>::const_iterator ifirst = comps.begin();
24 vector<const GeomDet*>::const_iterator ilast = comps.end();
27 float theRmin =
components().front()->position().perp();
28 float theRmax = theRmin;
29 float theZmin =
components().back()->position().z();
30 float theZmax = theZmin;
31 for (vector<const GeomDet*>::const_iterator deti = ifirst; deti != ilast; deti++) {
32 vector<GlobalPoint> corners =
BoundingBox().
corners(dynamic_cast<const Plane&>((**deti).surface()));
33 for (vector<GlobalPoint>::const_iterator ic = corners.begin(); ic != corners.end(); ic++) {
35 LogDebug(
"DetLayers") <<
"corner.perp(): " <<
r;
37 theRmin =
min(theRmin,
r);
38 theRmax =
max(theRmax,
r);
39 theZmin =
min(theZmin, z);
40 theZmax =
max(theZmax, z);
47 float rdet = (**deti).position().perp();
48 float len = (**deti).surface().bounds().length();
49 float width = (**deti).surface().bounds().width();
55 double xAxisCos =
xAxis.unit().dot(perpDir.
unit());
56 double yAxisCos =
yAxis.unit().dot(perpDir.
unit());
58 LogDebug(
"DetLayers") <<
"in ForwardDetLayer::computeSurface(),xAxisCos,yAxisCos: " << xAxisCos <<
" , "
60 LogDebug(
"DetLayers") <<
"det pos.perp,length,width: " << rdet <<
" , " << len <<
" , " <<
width;
62 if (fabs(xAxisCos) > fabs(yAxisCos)) {
63 theRmin =
min(theRmin, rdet -
width / 2.
F);
64 theRmax =
max(theRmax, rdet +
width / 2.
F);
66 theRmin =
min(theRmin, rdet - len / 2.
F);
67 theRmax =
max(theRmax, rdet + len / 2.
F);
71 LogDebug(
"DetLayers") <<
"creating SimpleDiskBounds with r range" << theRmin <<
" " << theRmax <<
" and z range "
72 << theZmin <<
" " << theZmax;
77 float zPos = (theZmax + theZmin) / 2.;
89 edm::LogError(
"DetLayers") <<
"ERROR: BarrelDetLayer::compatible() is used before the layer surface is initialized";
102 if ((
r2 > rmin() * rmin()) & (
r2 < rmax() * rmax()))
103 return make_pair(
true, myState);
119 auto ro2 = rmax() +
deltaR;
121 return make_pair((
r2 > ri2) & (
r2 < ro2), myState);