29 vector<const GeomDet*>& outerDets):
30 theInnerDets(innerDets),theOuterDets(outerDets)
50 LogDebug(
"TkDetLayers") <<
"==== DEBUG TOBRod =====" ;
51 for (vector<const GeomDet*>::const_iterator
i=
theInnerDets.begin();
53 LogDebug(
"TkDetLayers") <<
"inner TOBRod's Det pos z,perp,eta,phi: "
54 << (**i).position().z() <<
" , "
55 << (**i).position().perp() <<
" , "
56 << (**i).position().eta() <<
" , "
57 << (**i).position().phi() ;
60 for (vector<const GeomDet*>::const_iterator
i=
theOuterDets.begin();
62 LogDebug(
"TkDetLayers") <<
"outer TOBRod's Det pos z,perp,eta,phi: "
63 << (**i).position().z() <<
" , "
64 << (**i).position().perp() <<
" , "
65 << (**i).position().eta() <<
" , "
66 << (**i).position().phi() ;
68 LogDebug(
"TkDetLayers") <<
"==== end DEBUG TOBRod =====" ;
79 const vector<const GeometricSearchDet*>&
84 pair<bool, TrajectoryStateOnSurface>
87 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of TOBRod::compatible()!!" ;
88 return pair<bool,TrajectoryStateOnSurface>();
99 std::vector<DetGroup> &
result)
const{
103 if(! crossings.
isValid())
return;
105 vector<DetGroup> closestResult;
107 if (closestResult.empty()){
108 vector<DetGroup> nextResult;
110 if(nextResult.empty())
return;
122 closestResult,
false);
124 vector<DetGroup> nextResult;
145 pair<bool,double> innerPath = crossing.pathLength( *
theInnerPlane);
148 GlobalPoint gInnerPoint( crossing.position(innerPath.second));
153 pair<bool,double> outerPath = crossing.pathLength( *
theOuterPlane);
156 GlobalPoint gOuterPoint( crossing.position(outerPath.second));
161 if (innerDist < outerDist) {
177 vector<DetGroup>&
result)
const
203 bool checkClosest)
const
210 int negStartIndex = closestIndex-1;
211 int posStartIndex = closestIndex+1;
214 if (gCrossingPos.
z() < sRod[closestIndex]->surface().position().z()) {
215 posStartIndex = closestIndex;
218 negStartIndex = closestIndex;
223 for (
int idet=negStartIndex; idet >= 0; idet--) {
224 if (!
overlap( gCrossingPos, *sRod[idet], window))
break;
225 if (!
Adder::add( *sRod[idet], tsos, prop, est, result))
break;
227 for (
int idet=posStartIndex; idet < static_cast<int>(sRod.size()); idet++) {
228 if (!
overlap( gCrossingPos, *sRod[idet], window))
break;
229 if (!
Adder::add( *sRod[idet], tsos, prop, est, result))
break;
240 const float relativeMargin = 1.01;
248 float localY = localCrossPoint.
y();
254 if ( ( fabs(localY)-window) < relativeMargin*detHalfLength ) {
static void orderAndMergeTwoLevels(const std::vector< DetGroup > &one, const std::vector< DetGroup > &two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
BinFinderType theOuterBinFinder
virtual float length() const =0
std::vector< const GeomDet * > theInnerDets
virtual PropagationDirection propagationDirection() const
bool operator()(const GeomDet *a, const GeomDet *b)
int closestDetIndex() const
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const
PeriodicBinFinderInZ< float > BinFinderType
std::vector< const GeomDet * > theDets
GlobalPoint globalPosition() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
std::vector< const GeomDet * > theOuterDets
virtual T binPosition(int ind) const
the middle of the bin
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
virtual int binIndex(T z) const
returns an index in the valid range for the bin that contains Z
const GlobalPoint & position() const
const std::vector< const GeomDet * > & subRod(int ind) const
void setPlane(BoundPlane *plane)
Set the rod's plane.
const Surface::PositionType & position() const
The position (origin of the R.F.)
ReferenceCountingPointer< BoundPlane > theInnerPlane
LocalPoint toLocal(const GlobalPoint &gp) const
int subLayerIndex() const
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const
BinFinderType theInnerBinFinder
const SubLayerCrossing & other() const
const Bounds & bounds() const
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const
virtual const std::vector< const GeometricSearchDet * > & components() const
Returns basic components, if any.
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
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
ReferenceCountingPointer< BoundPlane > theOuterPlane
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const
TOBRod(std::vector< const GeomDet * > &innerDets, std::vector< const GeomDet * > &outerDets)
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
bool overlap(const GlobalPoint &gpos, const GeomDet &rod, float phiWin) const
double transverseCurvature() const