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.;
88 edm::LogError(
"DetLayers") <<
"ERROR: BarrelDetLayer::compatible() is used before the layer surface is initialized";
93 return make_pair(
false, myState);
101 if ((
r2 > rmin() * rmin()) & (
r2 < rmax() * rmax()))
102 return make_pair(
true, myState);
118 auto ro2 = rmax() +
deltaR;
120 return make_pair((
r2 > ri2) & (
r2 < ro2), myState);
~ForwardDetLayer() override
virtual BoundDisk * computeSurface()
Local3DVector LocalVector
const LocalTrajectoryError & localError() const
LocalPoint localPosition() const
void setSurface(BoundDisk *cp)
Global3DPoint GlobalPoint
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const override
Log< level::Error, false > LogError
LocalError positionError() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
virtual void initialize()
LocalVector localDirection() const
Abs< T >::type abs(const T &t)
bool contains(const Local3DPoint &p) const
static std::vector< GlobalPoint > corners(const Plane &)
Vector3DBase unit() const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Global3DVector GlobalVector
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)