CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
tracking::TempMeasurements Struct Reference

#include <TempMeasurements.h>

Public Types

typedef TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
 
typedef std::vector< float > Distances
 
typedef TrackingRecHit::ConstRecHitContainer RecHitContainer
 

Public Member Functions

void add (ConstRecHitPointer &&h, float d)
 
void add (ConstRecHitPointer const &h, float d)
 
void clear ()
 
bool empty () const
 
std::size_t size () const
 
void sortIndex (int *index) const
 

Public Attributes

Distances distances
 
RecHitContainer hits
 

Detailed Description

Definition at line 10 of file TempMeasurements.h.

Member Typedef Documentation

◆ ConstRecHitPointer

Definition at line 12 of file TempMeasurements.h.

◆ Distances

typedef std::vector<float> tracking::TempMeasurements::Distances

Definition at line 13 of file TempMeasurements.h.

◆ RecHitContainer

Definition at line 11 of file TempMeasurements.h.

Member Function Documentation

◆ add() [1/2]

void tracking::TempMeasurements::add ( ConstRecHitPointer &&  h,
float  d 
)
inline

Definition at line 35 of file TempMeasurements.h.

35  {
36  hits.push_back(std::move(h));
37  distances.push_back(d);
38  }

References ztail::d, distances, hits, and eostools::move().

Referenced by counter.Counter::register().

◆ add() [2/2]

void tracking::TempMeasurements::add ( ConstRecHitPointer const &  h,
float  d 
)
inline

Definition at line 31 of file TempMeasurements.h.

31  {
32  hits.push_back(h);
33  distances.push_back(d);
34  }

References ztail::d, distances, and hits.

Referenced by counter.Counter::register().

◆ clear()

void tracking::TempMeasurements::clear ( void  )
inline

Definition at line 15 of file TempMeasurements.h.

15  {
16  hits.clear();
17  distances.clear();
18  }

References distances, and hits.

Referenced by LayerMeasurements::groupedMeasurements(), and TrajectorySegmentBuilder::redoMeasurements().

◆ empty()

bool tracking::TempMeasurements::empty ( void  ) const
inline

Definition at line 19 of file TempMeasurements.h.

19 { return hits.empty(); }

References hits.

◆ size()

std::size_t tracking::TempMeasurements::size ( void  ) const
inline

◆ sortIndex()

void tracking::TempMeasurements::sortIndex ( int *  index) const
inline

Definition at line 22 of file TempMeasurements.h.

22  {
23  float const* d = &distances.front(); // do not trust capture
24  for (std::size_t i = 0; i != size(); ++i) {
25  index[i] = i;
26  std::push_heap(index, index + i + 1, [d](int j, int k) { return d[j] < d[k]; });
27  }
28  std::make_heap(index, index + size(), [d](int j, int k) { return d[j] < d[k]; });
29  }

References ztail::d, distances, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, and size().

Referenced by MeasurementDet::fastMeasurements().

Member Data Documentation

◆ distances

Distances tracking::TempMeasurements::distances

◆ hits

RecHitContainer tracking::TempMeasurements::hits
mps_fire.i
i
Definition: mps_fire.py:355
tracking::TempMeasurements::size
std::size_t size() const
Definition: TempMeasurements.h:20
h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
eostools.move
def move(src, dest)
Definition: eostools.py:511
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ztail.d
d
Definition: ztail.py:151
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
tracking::TempMeasurements::distances
Distances distances
Definition: TempMeasurements.h:41
tracking::TempMeasurements::hits
RecHitContainer hits
Definition: TempMeasurements.h:40