CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
TkGluedMeasurementDet::HitCollectorForSimpleHits Class Reference

Public Types

typedef SiStripRecHitMatcher::Collector Collector
 

Public Member Functions

void add (SiStripMatchedRecHit2D const &hit)
 
void addProjected (const TrackingRecHit &hit, const GlobalVector &gdir)
 
void clearNewMatchedHitsFlag ()
 
SiStripRecHitMatcher::Collectorcollector ()
 
const MeasurementEstimatorestimator ()
 
bool filter () const
 
bool hasNewMatchedHits () const
 
 HitCollectorForSimpleHits (const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, SimpleHitContainer &target)
 
size_t size () const
 

Private Attributes

SiStripRecHitMatcher::Collector collector_
 
const StripClusterParameterEstimatorcpe_
 
const MeasurementEstimatorest_
 
const GeomDetgeomDet_
 
bool hasNewHits_
 
const SiStripRecHitMatchermatcher_
 
const TrajectoryStateOnSurfacestateOnThisDet_
 
SimpleHitContainertarget_
 

Detailed Description

Definition at line 100 of file TkGluedMeasurementDet.h.

Member Typedef Documentation

Definition at line 102 of file TkGluedMeasurementDet.h.

Constructor & Destructor Documentation

TkGluedMeasurementDet::HitCollectorForSimpleHits::HitCollectorForSimpleHits ( const GeomDet geomDet,
const SiStripRecHitMatcher matcher,
const StripClusterParameterEstimator cpe,
const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est,
SimpleHitContainer target 
)

Definition at line 440 of file TkGluedMeasurementDet.cc.

446  :
447  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),stateOnThisDet_(stateOnThisDet), est_(est), target_(target),
448  collector_(boost::bind(&HitCollectorForSimpleHits::add,boost::ref(*this),_1)),
449  hasNewHits_(false)
450 {
451 }
const StripClusterParameterEstimator * cpe_
void add(SiStripMatchedRecHit2D const &hit)

Member Function Documentation

void TkGluedMeasurementDet::HitCollectorForSimpleHits::add ( SiStripMatchedRecHit2D const &  hit)

Definition at line 465 of file TkGluedMeasurementDet.cc.

References est_, MeasurementEstimator::estimate(), TrackingRecHit::geographicalId(), hasNewHits_, SiStripMatchedRecHit2D::monoCluster(), MeasurementEstimator::preFilter(), stateOnThisDet_, SiStripMatchedRecHit2D::stereoCluster(), and target_.

Referenced by counter.Counter::register().

466 {
467  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush // consistent with previous code
468  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster()) ) ) return;
469  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
470 
471  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, hit2d);
472  if (diffEst.first)
473  target_.emplace_back(new SiStripMatchedRecHit2D(hit2d)); // fix to use move (really needed???)
474 }
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
void TkGluedMeasurementDet::HitCollectorForSimpleHits::addProjected ( const TrackingRecHit hit,
const GlobalVector gdir 
)

Definition at line 479 of file TkGluedMeasurementDet.cc.

References cpe_, est_, MeasurementEstimator::estimate(), TrackingRecHit::geographicalId(), geomDet_, TkGluedMeasurementDet::HitCollectorForFastMeasurements::HitCollectorForFastMeasurements(), MeasurementEstimator::preFilter(), stateOnThisDet_, and target_.

481 {
482  auto const & thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
483  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster()) ) ) return;
484 
485  // here we're ok with some extra casual new's and delete's
486  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
487  std::unique_ptr<ProjectedSiStripRecHit2D> phit(new ProjectedSiStripRecHit2D(vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit)));
488  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *phit);
489  if ( diffEst.first) {
490  target_.emplace_back(phit.release());
491  }
492 }
const StripClusterParameterEstimator * cpe_
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
DetId geographicalId() const
void TkGluedMeasurementDet::HitCollectorForSimpleHits::clearNewMatchedHitsFlag ( )
inline
SiStripRecHitMatcher::Collector& TkGluedMeasurementDet::HitCollectorForSimpleHits::collector ( void  )
inline

Definition at line 112 of file TkGluedMeasurementDet.h.

112 { return collector_; }
const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForSimpleHits::estimator ( void  )
inline

Definition at line 117 of file TkGluedMeasurementDet.h.

117 { return est_;}
bool TkGluedMeasurementDet::HitCollectorForSimpleHits::filter ( ) const
inline

Definition at line 115 of file TkGluedMeasurementDet.h.

115 { return matcher_->preFilter();} // if true mono-colection will been filter using the estimator before matching
bool TkGluedMeasurementDet::HitCollectorForSimpleHits::hasNewMatchedHits ( ) const
inline
size_t TkGluedMeasurementDet::HitCollectorForSimpleHits::size ( void  ) const
inline

Member Data Documentation

SiStripRecHitMatcher::Collector TkGluedMeasurementDet::HitCollectorForSimpleHits::collector_
private

Definition at line 125 of file TkGluedMeasurementDet.h.

const StripClusterParameterEstimator* TkGluedMeasurementDet::HitCollectorForSimpleHits::cpe_
private
const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForSimpleHits::est_
private
const GeomDet* TkGluedMeasurementDet::HitCollectorForSimpleHits::geomDet_
private
bool TkGluedMeasurementDet::HitCollectorForSimpleHits::hasNewHits_
private
const SiStripRecHitMatcher* TkGluedMeasurementDet::HitCollectorForSimpleHits::matcher_
private

Definition at line 120 of file TkGluedMeasurementDet.h.

const TrajectoryStateOnSurface& TkGluedMeasurementDet::HitCollectorForSimpleHits::stateOnThisDet_
private
SimpleHitContainer& TkGluedMeasurementDet::HitCollectorForSimpleHits::target_
private