CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
TkGluedMeasurementDet::HitCollectorForRecHits 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 ()
 
bool hasNewMatchedHits () const
 
 HitCollectorForRecHits (const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, RecHitContainer &target)
 
size_t size () const
 always fast as no estimator available here! More...
 

Static Public Member Functions

static const MeasurementEstimatorestimator ()
 
static bool filter ()
 

Private Attributes

SiStripRecHitMatcher::Collector collector_
 
const StripClusterParameterEstimatorcpe_
 
const GeomDetgeomDet_
 
bool hasNewHits_
 
const SiStripRecHitMatchermatcher_
 
RecHitContainertarget_
 

Detailed Description

Definition at line 72 of file TkGluedMeasurementDet.h.

Member Typedef Documentation

◆ Collector

Definition at line 74 of file TkGluedMeasurementDet.h.

Constructor & Destructor Documentation

◆ HitCollectorForRecHits()

TkGluedMeasurementDet::HitCollectorForRecHits::HitCollectorForRecHits ( const GeomDet geomDet,
const SiStripRecHitMatcher matcher,
const StripClusterParameterEstimator cpe,
RecHitContainer target 
)

Definition at line 422 of file TkGluedMeasurementDet.cc.

426  : geomDet_(geomDet),
427  matcher_(matcher),
428  cpe_(cpe),
429  target_(target),
430  collector_(std::bind(&HitCollectorForRecHits::add, std::ref(*this), std::placeholders::_1)),
431  hasNewHits_(false) {}

Member Function Documentation

◆ add()

void TkGluedMeasurementDet::HitCollectorForRecHits::add ( SiStripMatchedRecHit2D const &  hit)
inline

Definition at line 79 of file TkGluedMeasurementDet.h.

79  {
80  target_.emplace_back(hit.cloneSH());
81  hasNewHits_ = true;
82  }

Referenced by counter.Counter::register().

◆ addProjected()

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

Definition at line 449 of file TkGluedMeasurementDet.cc.

449  {
450  auto&& vl = projectedPos(hit, *geomDet_, gdir, cpe_);
451  auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
452  vl.first, vl.second, *geomDet_, static_cast<SiStripRecHit2D const&>(hit));
453  target_.push_back(std::move(phit));
454 }

References eostools::move().

◆ clearNewMatchedHitsFlag()

void TkGluedMeasurementDet::HitCollectorForRecHits::clearNewMatchedHitsFlag ( )
inline

Definition at line 86 of file TkGluedMeasurementDet.h.

86 { hasNewHits_ = false; }

◆ collector()

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

Definition at line 84 of file TkGluedMeasurementDet.h.

84 { return collector_; }

◆ estimator()

static const MeasurementEstimator& TkGluedMeasurementDet::HitCollectorForRecHits::estimator ( void  )
inlinestatic

Definition at line 90 of file TkGluedMeasurementDet.h.

90  {
91  static const MeasurementEstimator* dummy = nullptr;
92  return *dummy;
93  }

◆ filter()

static bool TkGluedMeasurementDet::HitCollectorForRecHits::filter ( )
inlinestatic

Definition at line 87 of file TkGluedMeasurementDet.h.

87 { return false; }

◆ hasNewMatchedHits()

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

Definition at line 85 of file TkGluedMeasurementDet.h.

85 { return hasNewHits_; }

◆ size()

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

always fast as no estimator available here!

Definition at line 88 of file TkGluedMeasurementDet.h.

88 { return target_.size(); }

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

Member Data Documentation

◆ collector_

SiStripRecHitMatcher::Collector TkGluedMeasurementDet::HitCollectorForRecHits::collector_
private

Definition at line 100 of file TkGluedMeasurementDet.h.

◆ cpe_

const StripClusterParameterEstimator* TkGluedMeasurementDet::HitCollectorForRecHits::cpe_
private

Definition at line 98 of file TkGluedMeasurementDet.h.

◆ geomDet_

const GeomDet* TkGluedMeasurementDet::HitCollectorForRecHits::geomDet_
private

Definition at line 96 of file TkGluedMeasurementDet.h.

◆ hasNewHits_

bool TkGluedMeasurementDet::HitCollectorForRecHits::hasNewHits_
private

Definition at line 101 of file TkGluedMeasurementDet.h.

◆ matcher_

const SiStripRecHitMatcher* TkGluedMeasurementDet::HitCollectorForRecHits::matcher_
private

Definition at line 97 of file TkGluedMeasurementDet.h.

◆ target_

RecHitContainer& TkGluedMeasurementDet::HitCollectorForRecHits::target_
private

Definition at line 99 of file TkGluedMeasurementDet.h.

MeasurementEstimator
Definition: MeasurementEstimator.h:19
TkGluedMeasurementDet::HitCollectorForRecHits::hasNewHits_
bool hasNewHits_
Definition: TkGluedMeasurementDet.h:101
TkGluedMeasurementDet::HitCollectorForRecHits::target_
RecHitContainer & target_
Definition: TkGluedMeasurementDet.h:99
eostools.move
def move(src, dest)
Definition: eostools.py:511
TkGluedMeasurementDet::HitCollectorForRecHits::geomDet_
const GeomDet * geomDet_
Definition: TkGluedMeasurementDet.h:96
TkGluedMeasurementDet::HitCollectorForRecHits::cpe_
const StripClusterParameterEstimator * cpe_
Definition: TkGluedMeasurementDet.h:98
TkGluedMeasurementDet::HitCollectorForRecHits::matcher_
const SiStripRecHitMatcher * matcher_
Definition: TkGluedMeasurementDet.h:97
TkGluedMeasurementDet::HitCollectorForRecHits::add
void add(SiStripMatchedRecHit2D const &hit)
Definition: TkGluedMeasurementDet.h:79
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
TkGluedMeasurementDet::HitCollectorForRecHits::collector_
SiStripRecHitMatcher::Collector collector_
Definition: TkGluedMeasurementDet.h:100
dummy
Definition: DummySelector.h:38
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MeasurementDet::geomDet
virtual const GeomDet & geomDet() const
Definition: MeasurementDet.h:81