23 theFrontDets(frontDets),
24 theBackDets(backDets),
25 front_radius_range_(
std::make_pair(0, 0)),
26 back_radius_range_(
std::make_pair(0, 0)) {
35 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for Phase1PixelBlade";
36 LogDebug(
"TkDetLayers") <<
"Blade z, perp, innerRadius, outerR[disk, front, back]: " << this->
position().
z() <<
" , " 43 LogDebug(
"TkDetLayers") <<
"frontDet phi,z,r: " << (*it)->position().phi() <<
" , " << (*it)->position().z()
44 <<
" , " << (*it)->position().perp() <<
" , " 45 <<
" rmin: " << (*it)->surface().rSpan().first
46 <<
" rmax: " << (*it)->surface().rSpan().second << std::endl;
50 LogDebug(
"TkDetLayers") <<
"backDet phi,z,r: " << (*it)->position().phi() <<
" , " << (*it)->position().z() <<
" , " 51 << (*it)->position().perp() <<
" , " 52 <<
" rmin: " << (*it)->surface().rSpan().first
53 <<
" rmax: " << (*it)->surface().rSpan().second << std::endl;
64 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of Phase1PixelBlade::compatible()!!";
65 return pair<bool, TrajectoryStateOnSurface>();
71 std::vector<DetGroup>&
result)
const {
78 vector<DetGroup> closestResult;
81 if (closestResult.empty()) {
82 vector<DetGroup> nextResult;
84 if (nextResult.empty())
102 vector<DetGroup> nextResult;
123 if (!innerPath.first)
126 GlobalPoint gInnerPoint(crossing.position(innerPath.second));
132 int innerIndex =
findBin2(gInnerPoint, 0);
140 if (!outerPath.first)
143 GlobalPoint gOuterPoint(crossing.position(outerPath.second));
148 int outerIndex =
findBin2(gOuterPoint, 1);
155 if (innerDist < outerDist) {
166 vector<DetGroup>&
result)
const {
184 bool checkClosest)
const {
189 int negStartIndex = closestIndex - 1;
190 int posStartIndex = closestIndex + 1;
193 if (gCrossingPos.
perp() < sBlade[closestIndex]->surface().position().perp()) {
194 posStartIndex = closestIndex;
196 negStartIndex = closestIndex;
201 for (
int idet = negStartIndex; idet >= 0; idet--) {
207 for (
int idet = posStartIndex; idet < static_cast<int>(sBlade.size()); idet++) {
219 const float relativeMargin = 1.01;
227 float localX = localCrossPoint.
x();
233 if ((
std::abs(localX) -
window) < relativeMargin * detHalfLength) {
244 float rDiff =
std::abs(
R - localDets.front()->surface().position().perp());
245 for (vector<const GeomDet*>::const_iterator
i = localDets.begin();
i != localDets.end();
i++) {
246 float testDiff =
std::abs(
R - (**i).surface().position().perp());
247 if (testDiff < rDiff) {
249 theBin =
i - localDets.begin();
259 float sDiff = (thispoint - localDets.front()->surface().position()).
mag();
261 for (vector<const GeomDet*>::const_iterator
i = localDets.begin();
i != localDets.end();
i++) {
262 float testDiff = (thispoint - (**i).surface().position()).
mag();
263 if (testDiff < sDiff) {
265 theBin =
i - localDets.begin();
273 return (diskSector[
index])->surface().position();
279 for (
auto i : current_dets)
280 posSum += (*i).surface().position().basicVector();
285 const Plane& tmpplane = current_dets.front()->surface();
294 if (planePosition.
x() * planeXAxis.
x() + planePosition.
y() * planeXAxis.
y() > 0.) {
301 if (planeZAxis.
z() * planePosition.
z() > 0.) {
317 for (
auto it : current_dets) {
319 for (
const auto&
i : corners) {
326 return std::make_pair(rmin, rmax);
static BoundDiskSector * build(const std::vector< const GeomDet *> &dets) __attribute__((cold))
virtual const Surface::PositionType & position() const
Returns position of the surface.
Local3DVector LocalVector
std::vector< const GeomDet * > theBackDets
virtual float length() const =0
std::pair< float, float > computeRadiusRanges(const std::vector< const GeomDet *> &)
ROOT::Math::Plane3D::Vector Vector
const std::vector< const GeomDet * > & subBlade(int ind) const
int findBin(float R, int layer) const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override __attribute__((cold))
bool overlap(const GlobalPoint &gpos, const GeomDet &det, float phiWin) const
virtual PropagationDirection propagationDirection() const final
Log< level::Error, false > LogError
LocalPoint toLocal(const GlobalPoint &gp) const
GlobalPoint globalPosition() const
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
const GlobalPoint & position() const
int closestDetIndex() const
GeometricSearchDet::DetWithState DetWithState
Abs< T >::type abs(const T &t)
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
std::vector< const GeomDet * > theDets
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
const SubLayerCrossing & closest() const
int subLayerIndex() const
const std::vector< const GeometricSearchDet * > & components() const override __attribute__((cold))
Returns basic components, if any.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) __attribute__((hot))
GlobalPoint findPosition(int index, int diskSectorIndex) const
const SubLayerCrossing & other() const
const Plane & surface() const
The nominal surface of the GeomDet.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const PositionType & position() const
~Phase1PixelBlade() override __attribute__((cold))
double transverseCurvature() const
ReferenceCountingPointer< BoundDiskSector > theDiskSector
GlobalVector globalMomentum() const
static std::vector< GlobalPoint > corners(const Plane &)
ReferenceCountingPointer< BoundDiskSector > theFrontDiskSector
int findBin2(GlobalPoint thispoint, int layer) const
Phase1PixelBlade(std::vector< const GeomDet *> &frontDets, std::vector< const GeomDet *> &backDets) __attribute__((cold))
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
TkRotation< float > RotationType
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))
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
std::vector< const GeomDet * > theFrontDets
ReferenceCountingPointer< BoundDiskSector > theBackDiskSector
const Bounds & bounds() const