20 return surface().bounds().inside(p);
25 setSurface( computeSurface());
32 vector< const GeomDet*> comps = basicComponents();
35 float theRmin = comps.front()->position().perp();
36 float theRmax = theRmin;
37 float theZmin = comps.front()->position().z();
38 float theZmax = theZmin;
39 for ( vector< const GeomDet*>::const_iterator deti = comps.begin();
40 deti != comps.end(); deti++) {
41 vector<GlobalPoint> corners =
43 for (vector<GlobalPoint>::const_iterator ic = corners.begin();
44 ic != corners.end(); ic++) {
47 theRmin =
min( theRmin, r);
48 theRmax =
max( theRmax, r);
49 theZmin =
min( theZmin, z);
50 theZmax =
max( theZmax, z);
55 float rdet = (**deti).position().perp();
56 float thick = (**deti).surface().bounds().thickness();
57 theRmin =
min( theRmin, rdet-thick/2.F);
58 theRmax =
max( theRmax, rdet+thick/2.F);
73 pair<bool, TrajectoryStateOnSurface>
79 <<
"ERROR: BarrelDetLayer::compatible() is used before the layer surface is initialized" ;
83 if ( !myState.
isValid())
return make_pair(
false, myState);
86 float deltaZ = surface().bounds().thickness()/2. /
90 const float nSigma = 3.;
97 deltaZ += surface().bounds().length()/2;
98 return make_pair(fabs(myState.
globalPosition().
z()-surface().position().z())<deltaZ,
virtual BoundCylinder * computeSurface()
virtual void initialize()
GlobalPoint globalPosition() const
static std::vector< GlobalPoint > corners(const BoundPlane &)
bool contains(const Local3DPoint &p) const
Geom::Theta< T > theta() const
const T & max(const T &a, const T &b)
const CartesianTrajectoryError & cartesianError() const
Tan< T >::type tan(const T &t)
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
GlobalError position() const
Position error submatrix.
void setSurface(BoundCylinder *cp)
virtual ~BarrelDetLayer()
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const
GlobalVector globalDirection() const