![]() |
![]() |
#include <PixelRod.h>
Public Types | |
typedef PeriodicBinFinderInZ < float > | BinFinderType |
Public Member Functions | |
virtual std::pair< bool, TrajectoryStateOnSurface > | compatible (const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const |
virtual void | compatibleDetsV (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const |
virtual const std::vector < const GeometricSearchDet * > & | components () const |
Returns basic components, if any. | |
virtual void | groupedCompatibleDetsV (const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &, std::vector< DetGroup > &) const |
virtual bool | hasGroups () const |
PixelRod (std::vector< const GeomDet * > &theDets) | |
~PixelRod () | |
Private Attributes | |
BinFinderType | theBinFinder |
A concrete implementation for PixelRod
Definition at line 11 of file PixelRod.h.
typedef PeriodicBinFinderInZ<float> PixelRod::BinFinderType |
Definition at line 13 of file PixelRod.h.
PixelRod::PixelRod | ( | std::vector< const GeomDet * > & | theDets | ) |
Definition at line 13 of file PixelRod.cc.
References i, LogDebug, theBinFinder, and DetRodOneR::theDets.
: DetRodOneR(theInputDets.begin(),theInputDets.end()) { theBinFinder = BinFinderType(theDets.begin(),theDets.end()); //--------- DEBUG INFO -------------- LogDebug("TkDetLayers") << "==== DEBUG PixelRod ====="; for (vector<const GeomDet*>::const_iterator i=theDets.begin(); i != theDets.end(); i++){ LogDebug("TkDetLayers") << "PixelRod's Det pos z,perp,eta,phi: " << (**i).position().z() << " , " << (**i).position().perp() << " , " << (**i).position().eta() << " , " << (**i).position().phi() ; } LogDebug("TkDetLayers") << "==== end DEBUG PixelRod ====="; //-------------------------------------- }
PixelRod::~PixelRod | ( | ) |
Definition at line 34 of file PixelRod.cc.
{ }
pair< bool, TrajectoryStateOnSurface > PixelRod::compatible | ( | const TrajectoryStateOnSurface & | ts, |
const Propagator & | , | ||
const MeasurementEstimator & | |||
) | const [virtual] |
tests the geometrical compatibility of the Det with the predicted state. The FreeTrajectoryState argument is propagated to the Det surface using the Propagator argument. The resulting TrajectoryStateOnSurface is tested for compatibility with the surface bounds. If compatible, a std::pair< true, propagatedState> is returned. If the propagation fails, or if the state is not compatible, a std::pair< false, propagatedState> is returned.
Implements GeometricSearchDet.
Definition at line 45 of file PixelRod.cc.
{ edm::LogError("TkDetLayers") << "temporary dummy implementation of PixelRod::compatible()!!" ; return pair<bool,TrajectoryStateOnSurface>(); }
void PixelRod::compatibleDetsV | ( | const TrajectoryStateOnSurface & | startingState, |
const Propagator & | prop, | ||
const MeasurementEstimator & | est, | ||
std::vector< DetWithState > & | result | ||
) | const [virtual] |
Reimplemented from GeometricSearchDet.
Definition at line 52 of file PixelRod.cc.
References DetRodOneR::add(), PeriodicBinFinderInZ< T >::binIndex(), TrajectoryStateOnSurface::globalPosition(), GeomDetCompatibilityChecker::isCompatible(), TrajectoryStateOnSurface::isValid(), MeasurementEstimator::maximalLocalDisplacement(), Propagator::propagate(), DetRod::specificSurface(), DetRod::surface(), theBinFinder, GeometricSearchDet::theCompatibilityChecker, DetRodOneR::theDets, toLocal(), PV3DBase< T, PVType, FrameType >::y(), PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
{ typedef MeasurementEstimator::Local2DVector Local2DVector; TrajectoryStateOnSurface ts = prop.propagate( startingState, specificSurface()); if (!ts.isValid()) return; GlobalPoint startPos = ts.globalPosition(); int closest = theBinFinder.binIndex(startPos.z()); pair<bool,TrajectoryStateOnSurface> closestCompat = theCompatibilityChecker.isCompatible(theDets[closest],startingState, prop, est); if ( closestCompat.first) { result.push_back( DetWithState( theDets[closest], closestCompat.second)); }else{ if(!closestCompat.second.isValid()) return; // to investigate why this happens } const BoundPlane& closestPlane( theDets[closest]->specificSurface() ); Local2DVector maxDistance = est.maximalLocalDisplacement( closestCompat.second, closestPlane); float detHalfLen = theDets[closest]->surface().bounds().length()/2.; // explore neighbours for (size_t idet=closest+1; idet < theDets.size(); idet++) { LocalPoint nextPos( theDets[idet]->surface().toLocal( closestCompat.second.globalPosition())); if (fabs(nextPos.y()) < detHalfLen + maxDistance.y()) { if ( !add(idet, result, startingState, prop, est)) break; } else { break; } } for (int idet=closest-1; idet >= 0; idet--) { LocalPoint nextPos( theDets[idet]->surface().toLocal( closestCompat.second.globalPosition())); if (fabs(nextPos.y()) < detHalfLen + maxDistance.y()) { if ( !add(idet, result, startingState, prop, est)) break; } else { break; } } }
const vector< const GeometricSearchDet * > & PixelRod::components | ( | ) | const [virtual] |
Returns basic components, if any.
Returns direct components, if any
Implements GeometricSearchDet.
Definition at line 39 of file PixelRod.cc.
{ throw DetLayerException("PixelRod doesn't have GeometricSearchDet components"); }
void PixelRod::groupedCompatibleDetsV | ( | const TrajectoryStateOnSurface & | , |
const Propagator & | , | ||
const MeasurementEstimator & | , | ||
std::vector< DetGroup > & | |||
) | const [virtual] |
Reimplemented from GeometricSearchDet.
Definition at line 102 of file PixelRod.cc.
References LogDebug.
{ LogDebug("TkDetLayers") << "dummy implementation of PixelRod::groupedCompatibleDets()" ; }
virtual bool PixelRod::hasGroups | ( | ) | const [inline, virtual] |
BinFinderType PixelRod::theBinFinder [private] |
Definition at line 42 of file PixelRod.h.
Referenced by compatibleDetsV(), and PixelRod().