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

◆ TrajCandLess()

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

Definition at line 16 of file TrajCandLess.h.

16 : penalty(p) {}

Member Function Documentation

◆ operator()()

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

Definition at line 18 of file TrajCandLess.h.

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

References a, b, and TrajCandLess< TR >::penalty.

Member Data Documentation

◆ penalty

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

Definition at line 23 of file TrajCandLess.h.

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

AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
TrajCandLess::penalty
float penalty
Definition: TrajCandLess.h:23