CMS 3D CMS Logo

Public Types | Public Member Functions | Public Attributes

tracking::TempMeasurements Struct Reference

#include <TempMeasurements.h>

List of all members.

Public Types

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

Public Member Functions

void add (ConstRecHitPointer const &h, float d)
void add (ConstRecHitPointer &&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 11 of file TempMeasurements.h.


Member Typedef Documentation

Definition at line 13 of file TempMeasurements.h.

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

Definition at line 14 of file TempMeasurements.h.

Definition at line 12 of file TempMeasurements.h.


Member Function Documentation

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

Definition at line 29 of file TempMeasurements.h.

References distances, and hits.

Referenced by TkPixelMeasurementDet::measurements().

                                                     {
      hits.push_back(h); distances.push_back(d);
    }
void tracking::TempMeasurements::add ( ConstRecHitPointer &&  h,
float  d 
) [inline]

Definition at line 32 of file TempMeasurements.h.

References distances, h, and hits.

                                                {
      hits.push_back(std::move(h)); distances.push_back(d);
    }
void tracking::TempMeasurements::clear ( void  ) [inline]

Definition at line 16 of file TempMeasurements.h.

References distances, and hits.

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

{ hits.clear(); distances.clear();}
bool tracking::TempMeasurements::empty ( void  ) const [inline]

Definition at line 17 of file TempMeasurements.h.

References hits.

{return hits.empty();}
std::size_t tracking::TempMeasurements::size ( void  ) const [inline]
void tracking::TempMeasurements::sortIndex ( int *  index) const [inline]

Definition at line 20 of file TempMeasurements.h.

References distances, i, j, gen::k, and size().

Referenced by MeasurementDet::fastMeasurements().

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

Member Data Documentation