30 vector<const GeomDet*>& outerDets):
32 theInnerDets(innerDets),theOuterDets(outerDets)
52 LogDebug(
"TkDetLayers") <<
"==== DEBUG TOBRod =====" ;
53 for (vector<const GeomDet*>::const_iterator
i=
theInnerDets.begin();
55 LogDebug(
"TkDetLayers") <<
"inner TOBRod's Det pos z,perp,eta,phi: " 56 << (**i).position().z() <<
" , " 57 << (**i).position().perp() <<
" , " 58 << (**i).position().eta() <<
" , " 59 << (**i).position().phi() ;
62 for (vector<const GeomDet*>::const_iterator
i=
theOuterDets.begin();
64 LogDebug(
"TkDetLayers") <<
"outer TOBRod's Det pos z,perp,eta,phi: " 65 << (**i).position().z() <<
" , " 66 << (**i).position().perp() <<
" , " 67 << (**i).position().eta() <<
" , " 68 << (**i).position().phi() ;
70 LogDebug(
"TkDetLayers") <<
"==== end DEBUG TOBRod =====" ;
81 const vector<const GeometricSearchDet*>&
86 pair<bool, TrajectoryStateOnSurface>
89 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of TOBRod::compatible()!!" ;
90 return pair<bool,TrajectoryStateOnSurface>();
101 std::vector<DetGroup> &
result)
const{
105 if(! crossings.
isValid())
return;
107 std::vector<DetGroup> closestResult;
109 if (closestResult.empty()){
110 std::vector<DetGroup> nextResult;
112 if(nextResult.empty())
return;
124 closestResult,
false);
126 std::vector<DetGroup> nextResult;
148 std::pair<bool,double> outerPath = crossing.pathLength( *
theOuterPlane);
150 GlobalPoint gOuterPoint( crossing.position(outerPath.second));
152 std::pair<bool,double> innerPath = crossing.pathLength( *
theInnerPlane);
154 GlobalPoint gInnerPoint( crossing.position(innerPath.second));
165 if (innerDist < outerDist) {
181 vector<DetGroup>&
result)
const 216 float localY = localCrossPoint.
y();
222 return (
std::abs(localY)-window) < relativeMargin*detHalfLength;
234 bool checkClosest)
const 241 int negStartIndex = closestIndex-1;
242 int posStartIndex = closestIndex+1;
245 if (gCrossingPos.
z() < sRod[closestIndex]->surface().position().z()) {
246 posStartIndex = closestIndex;
249 negStartIndex = closestIndex;
254 for (
int idet=negStartIndex; idet >= 0; idet--) {
255 if (!
overlap( gCrossingPos, *sRod[idet], window))
break;
256 if (!
Adder::add( *sRod[idet], tsos, prop, est, result))
break;
258 for (
int idet=posStartIndex; idet < static_cast<int>(sRod.size()); idet++) {
259 if (!
overlap( gCrossingPos, *sRod[idet], window))
break;
260 if (!
Adder::add( *sRod[idet], tsos, prop, est, result))
break;
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const __attribute__((hot))
virtual float length() const =0
BinFinderType theOuterBinFinder
static int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
returns 0 if barrel layer crossed from inside, 1 if from outside
std::vector< const GeomDet * > theInnerDets
int closestDetIndex() const
virtual const std::vector< const GeometricSearchDet * > & components() const __attribute__((cold))
Returns basic components, if any.
PeriodicBinFinderInZ< float > BinFinderType
std::vector< const GeomDet * > theDets
GlobalPoint globalPosition() const
const Bounds & bounds() const
std::vector< const GeomDet * > theOuterDets
virtual T binPosition(int ind) const
the middle of the bin
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const __attribute__((hot))
~TOBRod() __attribute__((cold))
const Plane & surface() const
The nominal surface of the GeomDet.
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const __attribute__((cold))
virtual int binIndex(T z) const
returns an index in the valid range for the bin that contains Z
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
const std::vector< const GeomDet * > & subRod(int ind) const
const Surface::PositionType & position() const
The position (origin of the R.F.)
virtual PropagationDirection propagationDirection() const final
LocalPoint toLocal(const GlobalPoint &gp) const
int subLayerIndex() const
GeometricSearchDet::DetWithState DetWithState
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
Abs< T >::type abs(const T &t)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
TOBRod(std::vector< const GeomDet * > &innerDets, std::vector< const GeomDet * > &outerDets) __attribute__((cold))
ReferenceCountingPointer< Plane > theOuterPlane
BinFinderType theInnerBinFinder
const SubLayerCrossing & other() const
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) __attribute__((hot))
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
ReferenceCountingPointer< Plane > theInnerPlane
void setPlane(Plane *plane)
Set the rod's plane.
const SubLayerCrossing & closest() const
GlobalVector globalMomentum() const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
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)
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const __attribute__((hot))
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
double transverseCurvature() const