21 vector<const GeomDet*>& backDets):
23 theFrontDets(frontDets), theBackDets(backDets)
34 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for PixelBlade" ;
35 LogDebug(
"TkDetLayers") <<
"Blade z, perp, innerRadius, outerR: " 41 for(vector<const GeomDet*>::const_iterator it=
theFrontDets.begin();
43 LogDebug(
"TkDetLayers") <<
"frontDet phi,z,r: " 44 << (*it)->position().phi() <<
" , " 45 << (*it)->position().z() <<
" , " 46 << (*it)->position().perp() ;;
49 for(vector<const GeomDet*>::const_iterator it=
theBackDets.begin();
51 LogDebug(
"TkDetLayers") <<
"backDet phi,z,r: " 52 << (*it)->position().phi() <<
" , " 53 << (*it)->position().z() <<
" , " 54 << (*it)->position().perp() ;
61 const vector<const GeometricSearchDet*>&
66 pair<bool, TrajectoryStateOnSurface>
69 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of PixelBlade::compatible()!!" ;
70 return pair<bool,TrajectoryStateOnSurface>();
79 std::vector<DetGroup> &
result)
const{
82 if(! crossings.
isValid())
return;
84 vector<DetGroup> closestResult;
87 if (closestResult.empty()){
88 vector<DetGroup> nextResult;
90 if(nextResult.empty())
return;
103 closestResult,
false);
105 vector<DetGroup> nextResult;
128 GlobalPoint gInnerPoint( crossing.position(innerPath.second));
132 int innerIndex =
findBin(gInnerPoint.perp(),0);
139 GlobalPoint gOuterPoint( crossing.position(outerPath.second));
143 int outerIndex =
findBin(gOuterPoint.perp(),1);
147 if (innerDist < outerDist) {
163 vector<DetGroup>&
result)
const 189 bool checkClosest)
const 196 int negStartIndex = closestIndex-1;
197 int posStartIndex = closestIndex+1;
200 if (gCrossingPos.
perp() < sBlade[closestIndex]->surface().position().perp()) {
201 posStartIndex = closestIndex;
204 negStartIndex = closestIndex;
209 for (
int idet=negStartIndex; idet >= 0; idet--) {
210 if (!
overlap( gCrossingPos, *sBlade[idet], window))
break;
211 if (!
Adder::add( *sBlade[idet], tsos, prop, est, result))
break;
213 for (
int idet=posStartIndex; idet < static_cast<int>(sBlade.size()); idet++) {
214 if (!
overlap( gCrossingPos, *sBlade[idet], window))
break;
215 if (!
Adder::add( *sBlade[idet], tsos, prop, est, result))
break;
226 const float relativeMargin = 1.01;
234 float localX = localCrossPoint.x();
240 if ( (
std::abs(localX)-window) < relativeMargin*detHalfLength ) {
253 float rDiff =
std::abs( R - localDets.front()->surface().position().perp());;
254 for (vector<const GeomDet*>::const_iterator
i=localDets.begin();
i !=localDets.end();
i++){
255 float testDiff =
std::abs( R - (**i).surface().position().perp());
256 if ( testDiff < rDiff) {
258 theBin =
i - localDets.begin();
270 return (diskSector[index])->surface().position();
virtual float length() const =0
ReferenceCountingPointer< BoundDiskSector > theFrontDiskSector
ReferenceCountingPointer< BoundDiskSector > theBackDiskSector
int closestDetIndex() const
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
GlobalPoint globalPosition() const
const Bounds & bounds() const
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const
std::vector< const GeomDet * > theFrontDets
const Plane & surface() const
The nominal surface of the GeomDet.
GlobalPoint findPosition(int index, int diskSectorIndex) const
std::vector< const GeomDet * > theBackDets
const std::vector< const GeomDet * > & subBlade(int ind) const
const GlobalPoint & position() const
bool overlap(const GlobalPoint &gpos, const GeomDet &det, float phiWin) const
int findBin(float R, int layer) const
virtual PropagationDirection propagationDirection() const final
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override __attribute__((cold))
LocalPoint toLocal(const GlobalPoint &gp) const
int subLayerIndex() const
~PixelBlade() override __attribute__((cold))
Abs< T >::type abs(const T &t)
static int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
PixelBlade(std::vector< const GeomDet * > &frontDets, std::vector< const GeomDet * > &backDets) __attribute__((cold))
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)
static BoundDiskSector * build(const std::vector< const GeomDet * > &dets) __attribute__((cold))
virtual const Surface::PositionType & position() const
Returns position of the surface.
constexpr uint16_t localX(uint16_t px)
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
std::vector< const GeomDet * > theDets
const SubLayerCrossing & closest() const
T perp() const
Magnitude of transverse component.
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)
const std::vector< const GeometricSearchDet * > & components() const override __attribute__((cold))
Returns basic components, if any.
ReferenceCountingPointer< BoundDiskSector > theDiskSector
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
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))
GeometricSearchDet::DetWithState DetWithState
double transverseCurvature() const