29 vector<const GeomDet*>& outerDets):
30 theInnerDets(innerDets),theOuterDets(outerDets)
32 theDets.assign(theInnerDets.begin(),theInnerDets.end());
33 theDets.insert(theDets.end(),theOuterDets.begin(),theOuterDets.end());
37 setPlane( planeBuilder( theDets));
38 theInnerPlane = planeBuilder( theInnerDets);
39 theOuterPlane = planeBuilder( theOuterDets);
43 sort(theInnerDets.begin(),theInnerDets.end(),
DetZLess());
44 sort(theOuterDets.begin(),theOuterDets.end(),
DetZLess());
45 theInnerBinFinder = BinFinderType(theInnerDets.begin(), theInnerDets.end());
46 theOuterBinFinder = BinFinderType(theOuterDets.begin(), theOuterDets.end());
50 LogDebug(
"TkDetLayers") <<
"==== DEBUG TOBRod =====" ;
51 for (vector<const GeomDet*>::const_iterator
i=theInnerDets.begin();
52 i != theInnerDets.end();
i++){
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();
61 i != theOuterDets.end();
i++){
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;
106 addClosest( tsos, prop, est, crossings.
closest(), closestResult);
107 if (closestResult.empty()){
108 vector<DetGroup> nextResult;
109 addClosest( tsos, prop, est, crossings.
other(), nextResult);
110 if(nextResult.empty())
return;
121 searchNeighbors( tsos, prop, est, crossings.
closest(),
window,
122 closestResult,
false);
124 vector<DetGroup> nextResult;
125 searchNeighbors( tsos, prop, est, crossings.
other(),
window,
143 HelixBarrelPlaneCrossingByCircle crossing( startPos, startDir,
rho, propDir);
145 pair<bool,double> innerPath = crossing.pathLength( *theInnerPlane);
148 GlobalPoint gInnerPoint( crossing.position(innerPath.second));
149 int innerIndex = theInnerBinFinder.binIndex(gInnerPoint.z());
150 float innerDist = fabs( theInnerBinFinder.binPosition(innerIndex) - gInnerPoint.z());
153 pair<bool,double> outerPath = crossing.pathLength( *theOuterPlane);
156 GlobalPoint gOuterPoint( crossing.position(outerPath.second));
157 int outerIndex = theOuterBinFinder.binIndex(gOuterPoint.z());
158 float outerDist = fabs( theOuterBinFinder.binPosition(outerIndex) - gOuterPoint.z());
161 if (innerDist < outerDist) {
177 vector<DetGroup>& result)
const
180 const vector<const GeomDet*>& sRod( subRod( crossing.
subLayerIndex()));
202 vector<DetGroup>& result,
203 bool checkClosest)
const
207 const vector<const GeomDet*>& sRod( subRod( crossing.
subLayerIndex()));
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 ) {
virtual float length() const =0
bool operator()(const GeomDet *a, const GeomDet *b)
int closestDetIndex() const
GlobalPoint globalPosition() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const Bounds & bounds() const
const Plane & surface() const
The nominal surface of the GeomDet.
virtual PropagationDirection propagationDirection() const GCC11_FINAL
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
const GlobalPoint & position() const
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
const Surface::PositionType & position() const
The position (origin of the R.F.)
LocalPoint toLocal(const GlobalPoint &gp) const
int subLayerIndex() const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
const SubLayerCrossing & other() const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const
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
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
double transverseCurvature() const