Public Types | |
typedef SiStripRecHitMatcher::Collector | Collector |
typedef TransientTrackingRecHit::RecHitPointer | RecHitPointer |
Public Member Functions | |
void | add (SiStripMatchedRecHit2D const &hit) |
void | addProjected (const TransientTrackingRecHit &hit, const GlobalVector &gdir) |
void | clearNewMatchedHitsFlag () |
SiStripRecHitMatcher::Collector & | collector () |
bool | hasNewMatchedHits () const |
HitCollectorForFastMeasurements (const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, std::vector< TrajectoryMeasurement > &target) | |
Private Attributes | |
SiStripRecHitMatcher::Collector | collector_ |
const StripClusterParameterEstimator * | cpe_ |
const MeasurementEstimator & | est_ |
const GeomDet * | geomDet_ |
bool | hasNewHits_ |
const SiStripRecHitMatcher * | matcher_ |
const TrajectoryStateOnSurface & | stateOnThisDet_ |
std::vector < TrajectoryMeasurement > & | target_ |
Definition at line 88 of file TkGluedMeasurementDet.h.
typedef SiStripRecHitMatcher::Collector TkGluedMeasurementDet::HitCollectorForFastMeasurements::Collector |
Definition at line 91 of file TkGluedMeasurementDet.h.
typedef TransientTrackingRecHit::RecHitPointer TkGluedMeasurementDet::HitCollectorForFastMeasurements::RecHitPointer |
Definition at line 90 of file TkGluedMeasurementDet.h.
TkGluedMeasurementDet::HitCollectorForFastMeasurements::HitCollectorForFastMeasurements | ( | const GeomDet * | geomDet, |
const SiStripRecHitMatcher * | matcher, | ||
const StripClusterParameterEstimator * | cpe, | ||
const TrajectoryStateOnSurface & | stateOnThisDet, | ||
const MeasurementEstimator & | est, | ||
std::vector< TrajectoryMeasurement > & | target | ||
) |
Definition at line 299 of file TkGluedMeasurementDet.cc.
: geomDet_(geomDet), matcher_(matcher), cpe_(cpe),stateOnThisDet_(stateOnThisDet), est_(est), target_(target), collector_(boost::bind(&HitCollectorForFastMeasurements::add,boost::ref(*this),_1)), hasNewHits_(false) { }
void TkGluedMeasurementDet::HitCollectorForFastMeasurements::add | ( | SiStripMatchedRecHit2D const & | hit | ) |
Definition at line 311 of file TkGluedMeasurementDet.cc.
References tests::test_CacheProxy::cache, and LocalCache< T >::ptr.
{ static LocalCache<TSiStripMatchedRecHit> lcache; // in case of pool allocator it will be cleared centrally std::auto_ptr<TSiStripMatchedRecHit> & cache = lcache.ptr; TSiStripMatchedRecHit::buildInPlace( cache, geomDet_, &hit2d, matcher_, cpe_ ); std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *cache); if ( diffEst.first) { cache->clonePersistentHit(); // clone and take ownership of the persistent 2D hit target_.push_back( TrajectoryMeasurement( stateOnThisDet_, RecHitPointer(cache.release()), diffEst.second) ); } else { cache->clearPersistentHit(); // drop ownership } hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush }
void TkGluedMeasurementDet::HitCollectorForFastMeasurements::addProjected | ( | const TransientTrackingRecHit & | hit, |
const GlobalVector & | gdir | ||
) |
Definition at line 331 of file TkGluedMeasurementDet.cc.
References trackerHitRTTI::proj, and TrackingRecHitProjector< ResultingHit >::project().
{ // here we're ok with some extra casual new's and delete's TrackingRecHitProjector<ProjectedRecHit2D> proj; RecHitPointer phit = proj.project( hit, *geomDet_, gdir ); std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *phit); if ( diffEst.first) { target_.push_back( TrajectoryMeasurement( stateOnThisDet_, phit, diffEst.second) ); } }
void TkGluedMeasurementDet::HitCollectorForFastMeasurements::clearNewMatchedHitsFlag | ( | ) | [inline] |
Definition at line 105 of file TkGluedMeasurementDet.h.
{ hasNewHits_ = false; }
SiStripRecHitMatcher::Collector& TkGluedMeasurementDet::HitCollectorForFastMeasurements::collector | ( | void | ) | [inline] |
Definition at line 103 of file TkGluedMeasurementDet.h.
{ return collector_; }
bool TkGluedMeasurementDet::HitCollectorForFastMeasurements::hasNewMatchedHits | ( | ) | const [inline] |
Definition at line 104 of file TkGluedMeasurementDet.h.
{ return hasNewHits_; }
SiStripRecHitMatcher::Collector TkGluedMeasurementDet::HitCollectorForFastMeasurements::collector_ [private] |
Definition at line 113 of file TkGluedMeasurementDet.h.
const StripClusterParameterEstimator* TkGluedMeasurementDet::HitCollectorForFastMeasurements::cpe_ [private] |
Definition at line 109 of file TkGluedMeasurementDet.h.
Definition at line 111 of file TkGluedMeasurementDet.h.
const GeomDet* TkGluedMeasurementDet::HitCollectorForFastMeasurements::geomDet_ [private] |
Definition at line 107 of file TkGluedMeasurementDet.h.
Definition at line 114 of file TkGluedMeasurementDet.h.
const SiStripRecHitMatcher* TkGluedMeasurementDet::HitCollectorForFastMeasurements::matcher_ [private] |
Definition at line 108 of file TkGluedMeasurementDet.h.
const TrajectoryStateOnSurface& TkGluedMeasurementDet::HitCollectorForFastMeasurements::stateOnThisDet_ [private] |
Definition at line 110 of file TkGluedMeasurementDet.h.
std::vector<TrajectoryMeasurement>& TkGluedMeasurementDet::HitCollectorForFastMeasurements::target_ [private] |
Definition at line 112 of file TkGluedMeasurementDet.h.