21 vector<const TIBRing*>& outerRings) :
22 theInnerComps(innerRings.
begin(),innerRings.
end()),
23 theOuterComps(outerRings.
begin(),outerRings.
end())
32 for(vector<const GeometricSearchDet*>::const_iterator it=
theComps.begin();
35 (**it).basicComponents().begin(),
36 (**it).basicComponents().end());
44 LogDebug(
"TkDetLayers") <<
"==== DEBUG TIBLayer =====" ;
45 LogDebug(
"TkDetLayers") <<
"innerCyl radius, thickness, lenght: "
50 LogDebug(
"TkDetLayers") <<
"outerCyl radius, thickness, lenght: "
55 LogDebug(
"TkDetLayers") <<
"Cyl radius, thickness, lenght: "
60 for (vector<const GeometricSearchDet*>::const_iterator
i=
theInnerComps.begin();
62 LogDebug(
"TkDetLayers") <<
"inner TIBRing pos z,radius,eta,phi: "
63 << (**i).position().z() <<
" , "
64 << (**i).position().perp() <<
" , "
65 << (**i).position().eta() <<
" , "
66 << (**i).position().phi() ;
69 for (vector<const GeometricSearchDet*>::const_iterator
i=
theOuterComps.begin();
71 LogDebug(
"TkDetLayers") <<
"outer TIBRing pos z,radius,eta,phi: "
72 << (**i).position().z() <<
" , "
73 << (**i).position().perp() <<
" , "
74 << (**i).position().eta() <<
" , "
75 << (**i).position().phi() ;
92 vector<const GeometricSearchDet*>::const_iterator
i;
104 float leftPos = rings.front()->surface().
position().
z();
105 float rightPos = rings.back()->surface().position().z();
117 float thick = leftBounds.
thickness() / 2;
118 float zmin = leftPos - leftBounds.
length() / 2;
119 float zmax = rightPos + rightBounds.
length() / 2;
120 float rmin = r-thick;
121 float rmax = r+thick;
122 float zpos = 0.5*(leftPos+rightPos);
125 rings.front()->surface().rotation(),
127 zmin-zpos, zmax-zpos));
136 std::vector<DetGroup> &
result)
const {
139 if(! crossings.
isValid())
return;
141 vector<DetGroup> closestResult;
144 if (closestResult.empty())
return;
151 closestResult,
false);
153 vector<DetGroup> nextResult;
173 GlobalPoint gInnerPoint( innerCrossing.position());
176 float innerDist = fabs( innerRing->
surface().
position().
z() - gInnerPoint.z());
186 float outerDist = fabs( outerRing->
surface().
position().
z() - gOuterPoint.z());
189 if (innerDist < outerDist) {
201 vector<DetGroup>&
result)
const
216 bool checkClosest)
const
223 int negStartIndex = closestIndex-1;
224 int posStartIndex = closestIndex+1;
227 if (gCrossingPos.
z() < sLayer[closestIndex]->surface().position().z()) {
228 posStartIndex = closestIndex;
231 negStartIndex = closestIndex;
236 for (
int idet=negStartIndex; idet >= 0; idet--) {
238 if (!
overlap( gCrossingPos, *neighborRing, window))
break;
239 if (!
Adder::add( *neighborRing, tsos, prop, est, result))
break;
241 for (
int idet=posStartIndex; idet < static_cast<int>(sLayer.size()); idet++) {
243 if (!
overlap( gCrossingPos, *neighborRing, window))
break;
244 if (!
Adder::add( *neighborRing, tsos, prop, est, result))
break;
256 if ( fabs( crossPoint.
z()-det.
position().
z()) < (halfLength + window)) {
275 float yError = localError.
y();
282 return yError + thickCorrection;
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
static void orderAndMergeTwoLevels(const std::vector< DetGroup > &one, const std::vector< DetGroup > &two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
BoundCylinder * cylinder(const std::vector< const GeometricSearchDet * > &rings)
virtual float length() const =0
virtual PropagationDirection propagationDirection() const
virtual void initialize()
int closestDetIndex() const
PositionType position() const
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const
bool overlap(const GlobalPoint &gpos, const GeometricSearchDet &ring, float window) const
GlobalPoint globalPosition() const
std::vector< const GeometricSearchDet * > theOuterComps
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const
GeneralBinFinderInZforGeometricSearchDet< float > theOuterBinFinder
std::vector< const GeometricSearchDet * > theComps
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const
const GlobalPoint & position() const
Geom::Theta< T > theta() const
virtual float thickness() const =0
ReferenceCountingPointer< BoundCylinder > theInnerCylinder
Scalar radius() const
Radius of the cylinder.
int subLayerIndex() const
Tan< T >::type tan(const T &t)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
const SubLayerCrossing & other() const
const Bounds & bounds() const
const std::vector< const GeometricSearchDet * > & subLayer(int ind) const
std::vector< const GeomDet * > theBasicComps
std::vector< const GeometricSearchDet * > theInnerComps
GeneralBinFinderInZforGeometricSearchDet< float > theInnerBinFinder
TIBLayer(std::vector< const TIBRing * > &innerRings, std::vector< const TIBRing * > &outerRings)
virtual const Surface::PositionType & position() const
Returns position of the surface.
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result)
int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop) const
returns 0 if barrel layer crossed from inside, 1 if from outside
const SubLayerCrossing & closest() const
GlobalVector globalMomentum() const
const BoundPlane & surface() const
The nominal surface of the GeomDet.
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
ReferenceCountingPointer< BoundCylinder > theOuterCylinder
const PositionType & position() const
virtual int binIndex(T z) const
returns an index in the valid range for the bin closest to Z
double transverseCurvature() const