20 return surface().bounds().inside(p);
25 setSurface( computeSurface());
30 LogDebug(
"DetLayers") <<
"ForwaLayer::computeSurface callded" ;
31 vector<const GeomDet*> comps= basicComponents();
33 vector<const GeomDet*>::const_iterator ifirst = comps.begin();
34 vector<const GeomDet*>::const_iterator ilast = comps.end();
37 float theRmin =
components().front()->position().perp();
38 float theRmax = theRmin;
39 float theZmin =
components().back()->position().z();
40 float theZmax = theZmin;
41 for ( vector<const GeomDet*>::const_iterator deti = ifirst;
42 deti != ilast; deti++) {
43 vector<GlobalPoint> corners =
45 for (vector<GlobalPoint>::const_iterator ic = corners.begin();
46 ic != corners.end(); ic++) {
48 LogDebug(
"DetLayers") <<
"corner.perp(): " <<
r ;
50 theRmin =
min( theRmin, r);
51 theRmax =
max( theRmax, r);
52 theZmin =
min( theZmin, z);
53 theZmax =
max( theZmax, z);
60 float rdet = (**deti).position().perp();
61 float len = (**deti).surface().bounds().length();
62 float width = (**deti).surface().bounds().width();
71 LogDebug(
"DetLayers") <<
"in ForwardDetLayer::computeSurface(),xAxisCos,yAxisCos: " << xAxisCos <<
" , " << yAxisCos ;
72 LogDebug(
"DetLayers") <<
"det pos.perp,length,width: " 77 if( fabs(xAxisCos) > fabs(yAxisCos) ) {
78 theRmin =
min( theRmin, rdet-width/2.
F);
79 theRmax =
max( theRmax, rdet+width/2.
F);
81 theRmin =
min( theRmin, rdet-len/2.
F);
82 theRmax =
max( theRmax, rdet+len/2.
F);
87 LogDebug(
"DetLayers") <<
"creating SimpleDiskBounds with r range" << theRmin <<
" " 88 << theRmax <<
" and z range " << theZmin <<
" " << theZmax ;
93 float zPos = (theZmax+theZmin)/2.;
99 theZmin-zPos, theZmax-zPos));
103 pair<bool, TrajectoryStateOnSurface>
109 <<
"ERROR: BarrelDetLayer::compatible() is used before the layer surface is initialized" ;
122 if ( (
r2 > rmin()*rmin()) & (
r2< rmax()*rmax()) )
return make_pair(
true, myState);
126 float deltaR = 0.5f*bounds().thickness() *
134 deltaR += nSigma *
sqrt(err.
xx() + err.
yy());
138 auto ri2 =
std::max(rmin()-deltaR,0.
f); ri2*=ri2;
139 auto ro2 = rmax()+
deltaR; ro2*=ro2;
140 return make_pair( (
r2>ri2) & (
r2<ro2), myState);
~ForwardDetLayer() override
virtual BoundDisk * computeSurface()
Local3DVector LocalVector
LocalVector localDirection() const
LocalPoint localPosition() const
void setSurface(BoundDisk *cp)
Global3DPoint GlobalPoint
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
LocalError positionError() const
virtual void initialize()
bool contains(const Local3DPoint &p) const
Abs< T >::type abs(const T &t)
const LocalTrajectoryError & localError() const
double deltaR(double eta1, double eta2, double phi1, double phi2)
Vector3DBase unit() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
static std::vector< GlobalPoint > corners(const Plane &)
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const override
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Global3DVector GlobalVector