CMS 3D CMS Logo

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

Public Types

typedef SiStripRecHitMatcher::Collector Collector
 
typedef TransientTrackingRecHit::RecHitPointer RecHitPointer
 

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
 
 HitCollectorForFastMeasurements (const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &target)
 
size_t size () const
 

Private Attributes

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

Detailed Description

Definition at line 131 of file TkGluedMeasurementDet.h.

Member Typedef Documentation

Definition at line 134 of file TkGluedMeasurementDet.h.

Definition at line 133 of file TkGluedMeasurementDet.h.

Constructor & Destructor Documentation

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

Definition at line 507 of file TkGluedMeasurementDet.cc.

Referenced by TkGluedMeasurementDet::HitCollectorForSimpleHits::addProjected().

511  :
512  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),stateOnThisDet_(stateOnThisDet), est_(est), target_(target),
513  collector_(boost::bind(&HitCollectorForFastMeasurements::add,boost::ref(*this),_1)),
514  hasNewHits_(false)
515 {
516 }

Member Function Documentation

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

Definition at line 520 of file TkGluedMeasurementDet.cc.

References SiStripMatchedRecHit2D::cloneSH(), TkGluedMeasurementDet::HitCollectorForSimpleHits::est_, MeasurementEstimator::estimate(), TrackingRecHit::geographicalId(), TkGluedMeasurementDet::HitCollectorForSimpleHits::hasNewHits_, SiStripMatchedRecHit2D::monoCluster(), eostools::move(), MeasurementEstimator::preFilter(), TkGluedMeasurementDet::HitCollectorForSimpleHits::stateOnThisDet_, SiStripMatchedRecHit2D::stereoCluster(), and TkGluedMeasurementDet::HitCollectorForSimpleHits::target_.

Referenced by counter.Counter::register().

521 {
522  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush // consistent with previous code...
523  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster()) ) ) return;
524  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
525 
526  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, hit2d);
527  if (diffEst.first)
528  target_.add(std::move(hit2d.cloneSH()),diffEst.second);
529 }
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
void add(ConstRecHitPointer const &h, float d)
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
def move(src, dest)
Definition: eostools.py:510
void TkGluedMeasurementDet::HitCollectorForFastMeasurements::addProjected ( const TrackingRecHit hit,
const GlobalVector gdir 
)

Definition at line 533 of file TkGluedMeasurementDet.cc.

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

535 {
536  auto const & thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
537  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster()) ) ) return;
538 
539 
540  // here we're ok with some extra casual new's and delete's
541  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
542  auto && phit = std::make_shared<ProjectedSiStripRecHit2D> (vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit));
543 
544  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *phit);
545  if ( diffEst.first) {
546  target_.add(phit, diffEst.second);
547  }
548 }
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
void add(ConstRecHitPointer const &h, float d)
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
DetId geographicalId() const
void TkGluedMeasurementDet::HitCollectorForFastMeasurements::clearNewMatchedHitsFlag ( )
inline
SiStripRecHitMatcher::Collector& TkGluedMeasurementDet::HitCollectorForFastMeasurements::collector ( void  )
inline

Definition at line 146 of file TkGluedMeasurementDet.h.

146 { return collector_; }
const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForFastMeasurements::estimator ( void  )
inline

Definition at line 151 of file TkGluedMeasurementDet.h.

151 { return est_;}
bool TkGluedMeasurementDet::HitCollectorForFastMeasurements::filter ( ) const
inline

Definition at line 149 of file TkGluedMeasurementDet.h.

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

Member Data Documentation

SiStripRecHitMatcher::Collector TkGluedMeasurementDet::HitCollectorForFastMeasurements::collector_
private

Definition at line 159 of file TkGluedMeasurementDet.h.

const StripClusterParameterEstimator* TkGluedMeasurementDet::HitCollectorForFastMeasurements::cpe_
private

Definition at line 155 of file TkGluedMeasurementDet.h.

const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForFastMeasurements::est_
private

Definition at line 157 of file TkGluedMeasurementDet.h.

const GeomDet* TkGluedMeasurementDet::HitCollectorForFastMeasurements::geomDet_
private

Definition at line 153 of file TkGluedMeasurementDet.h.

bool TkGluedMeasurementDet::HitCollectorForFastMeasurements::hasNewHits_
private

Definition at line 160 of file TkGluedMeasurementDet.h.

const SiStripRecHitMatcher* TkGluedMeasurementDet::HitCollectorForFastMeasurements::matcher_
private

Definition at line 154 of file TkGluedMeasurementDet.h.

const TrajectoryStateOnSurface& TkGluedMeasurementDet::HitCollectorForFastMeasurements::stateOnThisDet_
private

Definition at line 156 of file TkGluedMeasurementDet.h.

TempMeasurements& TkGluedMeasurementDet::HitCollectorForFastMeasurements::target_
private

Definition at line 158 of file TkGluedMeasurementDet.h.