25 TOBRod::TOBRod(vector<const GeomDet*>& innerDets, vector<const GeomDet*>& outerDets)
26 :
DetRod(
true), theInnerDets(innerDets), theOuterDets(outerDets) {
41 LogDebug(
"TkDetLayers") <<
"==== DEBUG TOBRod =====";
43 LogDebug(
"TkDetLayers") <<
"inner TOBRod's Det pos z,perp,eta,phi: " << (**i).position().z() <<
" , "
44 << (**i).position().perp() <<
" , " << (**i).position().eta() <<
" , "
45 << (**i).position().phi();
49 LogDebug(
"TkDetLayers") <<
"outer TOBRod's Det pos z,perp,eta,phi: " << (**i).position().z() <<
" , "
50 << (**i).position().perp() <<
" , " << (**i).position().eta() <<
" , "
51 << (**i).position().phi();
53 LogDebug(
"TkDetLayers") <<
"==== end DEBUG TOBRod =====";
65 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of TOBRod::compatible()!!";
66 return pair<bool, TrajectoryStateOnSurface>();
72 std::vector<DetGroup>&
result)
const {
78 std::vector<DetGroup> closestResult;
80 if (closestResult.empty()) {
81 std::vector<DetGroup> nextResult;
83 if (nextResult.empty())
96 std::vector<DetGroup> nextResult;
113 std::pair<bool, double> outerPath = crossing.pathLength(*
theOuterPlane);
114 if (!outerPath.first)
116 GlobalPoint gOuterPoint(crossing.position(outerPath.second));
118 std::pair<bool, double> innerPath = crossing.pathLength(*
theInnerPlane);
119 if (!innerPath.first)
121 GlobalPoint gInnerPoint(crossing.position(innerPath.second));
131 if (innerDist < outerDist) {
142 vector<DetGroup>&
result)
const {
159 constexpr
float relativeMargin = 1.01;
167 float localY = localCrossPoint.y();
173 return (
std::abs(localY) - window) < relativeMargin * detHalfLength;
184 bool checkClosest)
const {
190 int negStartIndex = closestIndex - 1;
191 int posStartIndex = closestIndex + 1;
194 if (gCrossingPos.
z() < sRod[closestIndex]->surface().position().z()) {
195 posStartIndex = closestIndex;
197 negStartIndex = closestIndex;
202 for (
int idet = negStartIndex; idet >= 0; idet--) {
203 if (!
overlap(gCrossingPos, *sRod[idet], window))
205 if (!
Adder::add(*sRod[idet], tsos, prop, est, result))
208 for (
int idet = posStartIndex; idet < static_cast<int>(sRod.size()); idet++) {
209 if (!
overlap(gCrossingPos, *sRod[idet], window))
211 if (!
Adder::add(*sRod[idet], tsos, prop, est, result))
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const __attribute__((hot))
BinFinderType theOuterBinFinder
static int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
returns 0 if barrel layer crossed from inside, 1 if from outside
virtual float length() const =0
std::vector< const GeomDet * > theInnerDets
~TOBRod() override __attribute__((cold))
const std::vector< const GeometricSearchDet * > & components() const override __attribute__((cold))
Returns basic components, if any.
int closestDetIndex() const
PeriodicBinFinderInZ< float > BinFinderType
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
std::vector< const GeomDet * > theDets
constexpr uint16_t localY(uint16_t py)
GlobalPoint globalPosition() const
const Bounds & bounds() const
std::vector< const GeomDet * > theOuterDets
virtual PropagationDirection propagationDirection() const final
Log< level::Error, false > LogError
const Plane & surface() const
The nominal surface of the GeomDet.
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.)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
int binIndex(T z) const override
returns an index in the valid range for the bin that contains Z
LocalPoint toLocal(const GlobalPoint &gp) const
int subLayerIndex() const
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override __attribute__((cold))
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
Abs< T >::type abs(const T &t)
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)
T binPosition(int ind) const override
the middle of the bin
ReferenceCountingPointer< Plane > theInnerPlane
void setPlane(Plane *plane)
Set the rod's plane.
const SubLayerCrossing & closest() const
GlobalVector globalMomentum() const
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))
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
double transverseCurvature() const