22 vector<const GeomDet*>& backDets):
24 theFrontDets(frontDets),
25 theBackDets(backDets),
26 front_radius_range_(std::make_pair(0,0)),
27 back_radius_range_(std::make_pair(0,0))
37 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for Phase1PixelBlade" ;
38 LogDebug(
"TkDetLayers") <<
"Blade z, perp, innerRadius, outerR[disk, front, back]: "
48 for(vector<const GeomDet*>::const_iterator it=
theFrontDets.begin();
50 LogDebug(
"TkDetLayers") <<
"frontDet phi,z,r: "
51 << (*it)->position().phi() <<
" , "
52 << (*it)->position().z() <<
" , "
53 << (*it)->position().perp() <<
" , "
54 <<
" rmin: " << (*it)->surface().rSpan().first
55 <<
" rmax: " << (*it)->surface().rSpan().second
59 for(vector<const GeomDet*>::const_iterator it=
theBackDets.begin();
61 LogDebug(
"TkDetLayers") <<
"backDet phi,z,r: "
62 << (*it)->position().phi() <<
" , "
63 << (*it)->position().z() <<
" , "
64 << (*it)->position().perp() <<
" , "
65 <<
" rmin: " << (*it)->surface().rSpan().first
66 <<
" rmax: " << (*it)->surface().rSpan().second
73 const vector<const GeometricSearchDet*>&
78 pair<bool, TrajectoryStateOnSurface>
81 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of Phase1PixelBlade::compatible()!!" ;
82 return pair<bool,TrajectoryStateOnSurface>();
91 std::vector<DetGroup> &
result)
const{
97 if(! crossings.
isValid())
return;
99 vector<DetGroup> closestResult;
102 if (closestResult.empty()) {
103 vector<DetGroup> nextResult;
105 if(nextResult.empty())
return;
119 closestResult,
false);
121 vector<DetGroup> nextResult;
144 GlobalPoint gInnerPoint( crossing.position(innerPath.second));
150 int innerIndex =
findBin2(gInnerPoint,0);
160 GlobalPoint gOuterPoint( crossing.position(outerPath.second));
165 int outerIndex =
findBin2(gOuterPoint,1);
172 if (innerDist < outerDist) {
187 vector<DetGroup>&
result)
const
214 bool checkClosest)
const
220 int negStartIndex = closestIndex-1;
221 int posStartIndex = closestIndex+1;
224 if (gCrossingPos.
perp() < sBlade[closestIndex]->surface().position().perp()) {
225 posStartIndex = closestIndex;
228 negStartIndex = closestIndex;
233 for (
int idet=negStartIndex; idet >= 0; idet--) {
234 if (!
overlap( gCrossingPos, *sBlade[idet], window))
break;
235 if (!
Adder::add( *sBlade[idet], tsos, prop, est, result))
break;
237 for (
int idet=posStartIndex; idet < static_cast<int>(sBlade.size()); idet++) {
238 if (!
overlap( gCrossingPos, *sBlade[idet], window))
break;
239 if (!
Adder::add( *sBlade[idet], tsos, prop, est, result))
break;
250 const float relativeMargin = 1.01;
258 float localX = localCrossPoint.
x();
264 if ( (
std::abs(localX)-window) < relativeMargin*detHalfLength ) {
278 float rDiff =
std::abs( R - localDets.front()->surface().position().perp());
279 for (vector<const GeomDet*>::const_iterator
i=localDets.begin();
i !=localDets.end();
i++){
280 float testDiff =
std::abs( R - (**i).surface().position().perp());
281 if ( testDiff < rDiff) {
283 theBin =
i - localDets.begin();
297 float sDiff = (thispoint - localDets.front()->surface().position()).
mag();
299 for (vector<const GeomDet*>::const_iterator
i=localDets.begin();
i !=localDets.end();
i++){
300 float testDiff = ( thispoint - (**i).surface().position()).
mag();
301 if ( testDiff < sDiff) {
303 theBin =
i - localDets.begin();
315 return (diskSector[index])->surface().position();
318 std::pair<float, float>
322 Vector posSum(0,0,0);
323 for (
auto i : current_dets)
324 posSum += (*i).surface().position().basicVector();
329 const Plane& tmpplane = current_dets.front()->surface();
338 if (planePosition.
x() * planeXAxis.
x()
339 + planePosition.
y() * planeXAxis.
y() > 0.){
346 if (planeZAxis.
z() * planePosition.
z() > 0.) {
352 xAxis = yAxis.
cross(zAxis);
355 Plane plane(meanPos, rotation);
362 for (
auto it : current_dets) {
364 for (
auto i : corners) {
371 return std::make_pair(rmin, rmax);
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Local3DVector LocalVector
std::vector< const GeomDet * > theBackDets
std::pair< float, float > computeRadiusRanges(const std::vector< const GeomDet * > &)
virtual float length() const =0
Phase1PixelBlade(std::vector< const GeomDet * > &frontDets, std::vector< const GeomDet * > &backDets) __attribute__((cold))
int closestDetIndex() const
ROOT::Math::Plane3D::Vector Vector
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
GlobalPoint globalPosition() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const Bounds & bounds() const
virtual PropagationDirection propagationDirection() const final
virtual const std::vector< const GeometricSearchDet * > & components() const __attribute__((cold))
Returns basic components, if any.
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const __attribute__((cold))
const Plane & surface() const
The nominal surface of the GeomDet.
const GlobalPoint & position() const
const std::vector< const GeomDet * > & subBlade(int ind) const
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
LocalPoint toLocal(const GlobalPoint &gp) const
int subLayerIndex() const
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
int findBin2(GlobalPoint thispoint, int layer) const
Abs< T >::type abs(const T &t)
std::vector< const GeomDet * > theDets
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
bool overlap(const GlobalPoint &gpos, const GeomDet &det, float phiWin) const
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))
~Phase1PixelBlade() __attribute__((cold))
static BoundDiskSector * build(const std::vector< const GeomDet * > &dets) __attribute__((cold))
virtual const Surface::PositionType & position() const
Returns position of the surface.
ReferenceCountingPointer< BoundDiskSector > theDiskSector
GlobalPoint findPosition(int index, int diskSectorIndex) const
static std::vector< GlobalPoint > corners(const Plane &)
ReferenceCountingPointer< BoundDiskSector > theFrontDiskSector
const SubLayerCrossing & closest() const
GlobalVector globalMomentum() const
int findBin(float R, int layer) const
virtual void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const __attribute__((hot))
TkRotation< float > RotationType
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))
const PositionType & position() const
std::vector< const GeomDet * > theFrontDets
ReferenceCountingPointer< BoundDiskSector > theBackDiskSector
double transverseCurvature() const