CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
StripClusterParameterEstimator
cpe_
 
const MeasurementEstimatorest_
 
const GeomDetgeomDet_
 
bool hasNewHits_
 
const SiStripRecHitMatchermatcher_
 
const TrajectoryStateOnSurfacestateOnThisDet_
 
SimpleHitContainertarget_
 

Detailed Description

Definition at line 95 of file TkGluedMeasurementDet.h.

Member Typedef Documentation

Definition at line 97 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 423 of file TkGluedMeasurementDet.cc.

429  :
430  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),stateOnThisDet_(stateOnThisDet), est_(est), target_(target),
431  collector_(boost::bind(&HitCollectorForSimpleHits::add,boost::ref(*this),_1)),
432  hasNewHits_(false)
433 {
434 }
const StripClusterParameterEstimator * cpe_
void add(SiStripMatchedRecHit2D const &hit)

Member Function Documentation

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

Definition at line 448 of file TkGluedMeasurementDet.cc.

449 {
450  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
451  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, hit2d);
452  if (!diffEst.first) return;
453  target_.emplace_back(new SiStripMatchedRecHit2D(hit2d)); // fix to use move (really needed???)
454 }
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
void TkGluedMeasurementDet::HitCollectorForSimpleHits::addProjected ( const TrackingRecHit hit,
const GlobalVector gdir 
)

Definition at line 459 of file TkGluedMeasurementDet.cc.

461 {
462  // here we're ok with some extra casual new's and delete's
463  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
464  std::unique_ptr<ProjectedSiStripRecHit2D> phit(new ProjectedSiStripRecHit2D(vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit)));
465  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *phit);
466  if ( diffEst.first) {
467  target_.emplace_back(phit.release());
468  }
469 }
const StripClusterParameterEstimator * cpe_
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
void TkGluedMeasurementDet::HitCollectorForSimpleHits::clearNewMatchedHitsFlag ( )
inline
SiStripRecHitMatcher::Collector& TkGluedMeasurementDet::HitCollectorForSimpleHits::collector ( void  )
inline

Definition at line 107 of file TkGluedMeasurementDet.h.

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

Definition at line 112 of file TkGluedMeasurementDet.h.

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

Definition at line 110 of file TkGluedMeasurementDet.h.

110 { 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

Definition at line 111 of file TkGluedMeasurementDet.h.

111 { return target_.size();}

Member Data Documentation

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

Definition at line 120 of file TkGluedMeasurementDet.h.

const StripClusterParameterEstimator* TkGluedMeasurementDet::HitCollectorForSimpleHits::cpe_
private

Definition at line 116 of file TkGluedMeasurementDet.h.

const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForSimpleHits::est_
private

Definition at line 118 of file TkGluedMeasurementDet.h.

const GeomDet* TkGluedMeasurementDet::HitCollectorForSimpleHits::geomDet_
private

Definition at line 114 of file TkGluedMeasurementDet.h.

bool TkGluedMeasurementDet::HitCollectorForSimpleHits::hasNewHits_
private

Definition at line 121 of file TkGluedMeasurementDet.h.

const SiStripRecHitMatcher* TkGluedMeasurementDet::HitCollectorForSimpleHits::matcher_
private

Definition at line 115 of file TkGluedMeasurementDet.h.

const TrajectoryStateOnSurface& TkGluedMeasurementDet::HitCollectorForSimpleHits::stateOnThisDet_
private

Definition at line 117 of file TkGluedMeasurementDet.h.

SimpleHitContainer& TkGluedMeasurementDet::HitCollectorForSimpleHits::target_
private

Definition at line 119 of file TkGluedMeasurementDet.h.