CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TrajCandLess< TR > Struct Template Reference

#include <TrajCandLess.h>

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>
struct 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 15 of file TrajCandLess.h.

Constructor & Destructor Documentation

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

Definition at line 17 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 19 of file TrajCandLess.h.

References TrajCandLess< TR >::penalty.

19  {
20  return a.chiSquared() + a.lostHits()*penalty <
21  b.chiSquared() + b.lostHits()*penalty;
22  }
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 26 of file TrajCandLess.h.

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