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 136 of file TkGluedMeasurementDet.h.

Member Typedef Documentation

Definition at line 139 of file TkGluedMeasurementDet.h.

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

492  : geomDet_(geomDet),
493  matcher_(matcher),
494  cpe_(cpe),
495  stateOnThisDet_(stateOnThisDet),
496  est_(est),
497  target_(target),
498  collector_(boost::bind(&HitCollectorForFastMeasurements::add, boost::ref(*this), _1)),
499  hasNewHits_(false) {}

Member Function Documentation

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

Definition at line 501 of file TkGluedMeasurementDet.cc.

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

Referenced by counter.Counter::register().

501  {
502  //FIXME: see also what happens moving this within testAndPush // consistent with previous code...
503  hasNewHits_ = true;
505  ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster())))
506  return;
507  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
508 
509  std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, hit2d);
510  if (diffEst.first)
511  target_.add(hit2d.cloneSH(), diffEst.second);
512 }
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
void TkGluedMeasurementDet::HitCollectorForFastMeasurements::addProjected ( const TrackingRecHit hit,
const GlobalVector gdir 
)

Definition at line 514 of file TkGluedMeasurementDet.cc.

References tracking::TempMeasurements::add(), watchdog::const, cpe_, est_, MeasurementEstimator::estimate(), TrackingRecHit::geographicalId(), geomDet_, MeasurementEstimator::preFilter(), stateOnThisDet_, and target_.

515  {
516  auto const& thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
517  if (!est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster())))
518  return;
519 
520  // here we're ok with some extra casual new's and delete's
521  auto&& vl = projectedPos(hit, *geomDet_, gdir, cpe_);
522  auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
523  vl.first, vl.second, *geomDet_, static_cast<SiStripRecHit2D const&>(hit));
524 
525  std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, *phit);
526  if (diffEst.first) {
527  target_.add(phit, diffEst.second);
528  }
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
DetId geographicalId() const
void TkGluedMeasurementDet::HitCollectorForFastMeasurements::clearNewMatchedHitsFlag ( )
inline
SiStripRecHitMatcher::Collector& TkGluedMeasurementDet::HitCollectorForFastMeasurements::collector ( void  )
inline

Definition at line 150 of file TkGluedMeasurementDet.h.

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

Definition at line 157 of file TkGluedMeasurementDet.h.

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

Definition at line 153 of file TkGluedMeasurementDet.h.

153  {
154  return matcher_->preFilter();
155  } // 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 166 of file TkGluedMeasurementDet.h.

const StripClusterParameterEstimator* TkGluedMeasurementDet::HitCollectorForFastMeasurements::cpe_
private

Definition at line 162 of file TkGluedMeasurementDet.h.

Referenced by addProjected().

const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForFastMeasurements::est_
private

Definition at line 164 of file TkGluedMeasurementDet.h.

Referenced by add(), and addProjected().

const GeomDet* TkGluedMeasurementDet::HitCollectorForFastMeasurements::geomDet_
private

Definition at line 160 of file TkGluedMeasurementDet.h.

Referenced by addProjected().

bool TkGluedMeasurementDet::HitCollectorForFastMeasurements::hasNewHits_
private

Definition at line 167 of file TkGluedMeasurementDet.h.

Referenced by add().

const SiStripRecHitMatcher* TkGluedMeasurementDet::HitCollectorForFastMeasurements::matcher_
private

Definition at line 161 of file TkGluedMeasurementDet.h.

const TrajectoryStateOnSurface& TkGluedMeasurementDet::HitCollectorForFastMeasurements::stateOnThisDet_
private

Definition at line 163 of file TkGluedMeasurementDet.h.

Referenced by add(), and addProjected().

TempMeasurements& TkGluedMeasurementDet::HitCollectorForFastMeasurements::target_
private

Definition at line 165 of file TkGluedMeasurementDet.h.

Referenced by add(), and addProjected().