21 bool operator()(
const GeomDet*
a,
const GeomDet*
b)
const {
return (
a->position().z() <
b->position().z()); }
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--) {
208 for (
int idet = posStartIndex; idet < static_cast<int>(sRod.size()); idet++) {
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const __attribute__((hot))
const std::vector< const GeomDet * > & subRod(int ind) const
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
TOBRod(std::vector< const GeomDet *> &innerDets, std::vector< const GeomDet *> &outerDets) __attribute__((cold))
std::vector< const GeomDet * > theInnerDets
~TOBRod() override __attribute__((cold))
const std::vector< const GeometricSearchDet * > & components() const override __attribute__((cold))
Returns basic components, if any.
PeriodicBinFinderInZ< float > BinFinderType
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
std::vector< const GeomDet * > theDets
std::vector< const GeomDet * > theOuterDets
virtual PropagationDirection propagationDirection() const final
Log< level::Error, false > LogError
LocalPoint toLocal(const GlobalPoint &gp) const
GlobalPoint globalPosition() const
int binIndex(T z) const override
returns an index in the valid range for the bin that contains Z
const GlobalPoint & position() const
int closestDetIndex() const
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override __attribute__((cold))
GeometricSearchDet::DetWithState DetWithState
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)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
const SubLayerCrossing & closest() const
ReferenceCountingPointer< Plane > theOuterPlane
int subLayerIndex() const
BinFinderType theInnerBinFinder
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) __attribute__((hot))
T binPosition(int ind) const override
the middle of the bin
ReferenceCountingPointer< Plane > theInnerPlane
const SubLayerCrossing & other() const
const Plane & surface() const
The nominal surface of the GeomDet.
double transverseCurvature() const
GlobalVector globalMomentum() const
void setPlane(Plane *plane)
Set the rod's plane.
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
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))
const Bounds & bounds() const