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

◆ Collector

Definition at line 139 of file TkGluedMeasurementDet.h.

◆ RecHitPointer

Definition at line 138 of file TkGluedMeasurementDet.h.

Constructor & Destructor Documentation

◆ HitCollectorForFastMeasurements()

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

Definition at line 484 of file TkGluedMeasurementDet.cc.

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

Member Function Documentation

◆ add()

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

Definition at line 500 of file TkGluedMeasurementDet.cc.

500  {
501  //FIXME: see also what happens moving this within testAndPush // consistent with previous code...
502  hasNewHits_ = true;
504  ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster())))
505  return;
506  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
507 
508  std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, hit2d);
509  if (diffEst.first)
510  target_.add(hit2d.cloneSH(), diffEst.second);
511 }

References SiStripMatchedRecHit2D::cloneSH(), TrackingRecHit::geographicalId(), SiStripMatchedRecHit2D::monoCluster(), and SiStripMatchedRecHit2D::stereoCluster().

Referenced by counter.Counter::register().

◆ addProjected()

void TkGluedMeasurementDet::HitCollectorForFastMeasurements::addProjected ( const TrackingRecHit hit,
const GlobalVector gdir 
)

Definition at line 513 of file TkGluedMeasurementDet.cc.

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

◆ clearNewMatchedHitsFlag()

void TkGluedMeasurementDet::HitCollectorForFastMeasurements::clearNewMatchedHitsFlag ( )
inline

Definition at line 152 of file TkGluedMeasurementDet.h.

152 { hasNewHits_ = false; }

◆ collector()

SiStripRecHitMatcher::Collector& TkGluedMeasurementDet::HitCollectorForFastMeasurements::collector ( void  )
inline

Definition at line 150 of file TkGluedMeasurementDet.h.

150 { return collector_; }

◆ estimator()

const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForFastMeasurements::estimator ( void  )
inline

Definition at line 157 of file TkGluedMeasurementDet.h.

157 { return est_; }

◆ filter()

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

◆ hasNewMatchedHits()

bool TkGluedMeasurementDet::HitCollectorForFastMeasurements::hasNewMatchedHits ( ) const
inline

Definition at line 151 of file TkGluedMeasurementDet.h.

151 { return hasNewHits_; }

◆ size()

size_t TkGluedMeasurementDet::HitCollectorForFastMeasurements::size ( void  ) const
inline

Member Data Documentation

◆ collector_

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

Definition at line 166 of file TkGluedMeasurementDet.h.

◆ cpe_

const StripClusterParameterEstimator* TkGluedMeasurementDet::HitCollectorForFastMeasurements::cpe_
private

Definition at line 162 of file TkGluedMeasurementDet.h.

◆ est_

const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForFastMeasurements::est_
private

Definition at line 164 of file TkGluedMeasurementDet.h.

◆ geomDet_

const GeomDet* TkGluedMeasurementDet::HitCollectorForFastMeasurements::geomDet_
private

Definition at line 160 of file TkGluedMeasurementDet.h.

◆ hasNewHits_

bool TkGluedMeasurementDet::HitCollectorForFastMeasurements::hasNewHits_
private

Definition at line 167 of file TkGluedMeasurementDet.h.

◆ matcher_

const SiStripRecHitMatcher* TkGluedMeasurementDet::HitCollectorForFastMeasurements::matcher_
private

Definition at line 161 of file TkGluedMeasurementDet.h.

◆ stateOnThisDet_

const TrajectoryStateOnSurface& TkGluedMeasurementDet::HitCollectorForFastMeasurements::stateOnThisDet_
private

Definition at line 163 of file TkGluedMeasurementDet.h.

◆ target_

TempMeasurements& TkGluedMeasurementDet::HitCollectorForFastMeasurements::target_
private

Definition at line 165 of file TkGluedMeasurementDet.h.

SiStripRecHitMatcher::preFilter
bool preFilter() const
Definition: SiStripRecHitMatcher.h:40
TkGluedMeasurementDet::HitCollectorForFastMeasurements::est_
const MeasurementEstimator & est_
Definition: TkGluedMeasurementDet.h:164
tracking::TempMeasurements::size
std::size_t size() const
Definition: TempMeasurements.h:20
TkGluedMeasurementDet::HitCollectorForFastMeasurements::geomDet_
const GeomDet * geomDet_
Definition: TkGluedMeasurementDet.h:160
MeasurementEstimator::estimate
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
MeasurementEstimator::preFilter
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
Definition: MeasurementEstimator.h:50
ClusterFilterPayload
Definition: ClusterFilterPayload.h:7
TkGluedMeasurementDet::HitCollectorForFastMeasurements::target_
TempMeasurements & target_
Definition: TkGluedMeasurementDet.h:165
TkGluedMeasurementDet::HitCollectorForFastMeasurements::cpe_
const StripClusterParameterEstimator * cpe_
Definition: TkGluedMeasurementDet.h:162
TkGluedMeasurementDet::HitCollectorForFastMeasurements::matcher_
const SiStripRecHitMatcher * matcher_
Definition: TkGluedMeasurementDet.h:161
TkGluedMeasurementDet::HitCollectorForFastMeasurements::add
void add(SiStripMatchedRecHit2D const &hit)
Definition: TkGluedMeasurementDet.cc:500
tracking::TempMeasurements::add
void add(ConstRecHitPointer const &h, float d)
Definition: TempMeasurements.h:31
TkGluedMeasurementDet::HitCollectorForFastMeasurements::stateOnThisDet_
const TrajectoryStateOnSurface & stateOnThisDet_
Definition: TkGluedMeasurementDet.h:163
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
TkGluedMeasurementDet::HitCollectorForFastMeasurements::collector_
SiStripRecHitMatcher::Collector collector_
Definition: TkGluedMeasurementDet.h:166
TkGluedMeasurementDet::HitCollectorForFastMeasurements::hasNewHits_
bool hasNewHits_
Definition: TkGluedMeasurementDet.h:167
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MeasurementDet::geomDet
virtual const GeomDet & geomDet() const
Definition: MeasurementDet.h:81