CMS 3D CMS Logo

Public Member Functions | Private Attributes

TrajCandLess< TR > Class Template Reference

#include <TrajCandLess.h>

Inheritance diagram for TrajCandLess< TR >:
binary_function

List of all members.

Public Member Functions

bool operator() (const TR &a, const TR &b) const
 TrajCandLess (float p=5)

Private Attributes

float penalty

Detailed Description

template<class TR>
class TrajCandLess< TR >

Defines an ordering of Trajectories in terms of "goodness" The comparison is done in terms of total chi**2 plus a penalty for "lost" hits. This is OK for tracks of almost same number of hits, as in TrajectoryBuilder use, but is not applicable for tracks of different number of thits: the shortest track is likely to be considered "better".

Definition at line 16 of file TrajCandLess.h.


Constructor & Destructor Documentation

template<class TR >
TrajCandLess< TR >::TrajCandLess ( float  p = 5) [inline]

Definition at line 21 of file TrajCandLess.h.

: penalty(p) {}

Member Function Documentation

template<class TR >
bool TrajCandLess< TR >::operator() ( const TR &  a,
const TR &  b 
) const [inline]

Definition at line 23 of file TrajCandLess.h.

References TrajCandLess< TR >::penalty.

                                                   {
    return a.chiSquared() + a.lostHits()*penalty <
      b.chiSquared() + b.lostHits()*penalty;
  }

Member Data Documentation

template<class TR >
float TrajCandLess< TR >::penalty [private]

Definition at line 30 of file TrajCandLess.h.

Referenced by TrajCandLess< TR >::operator()().