CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TrajCandLess< TR > Class Template Reference

#include <TrajCandLess.h>

Inheritance diagram for TrajCandLess< TR >:

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.

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.

23  {
24  return a.chiSquared() + a.lostHits()*penalty <
25  b.chiSquared() + b.lostHits()*penalty;
26  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

Member Data Documentation

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

Definition at line 30 of file TrajCandLess.h.

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