CMS 3D CMS Logo

GroupedTrajCandLess Class Reference

Defines an ordering of Trajectories in terms of "goodness" The comparison is done in terms of total chi**2 / ndf plus a penalty for "lost" hits. More...

#include <RecoTracker/CkfPattern/interface/GroupedTrajCandLess.h>

List of all members.

Public Member Functions

 GroupedTrajCandLess (float p=5, float b=0)
bool operator() (const TempTrajectory &a, const TempTrajectory &b) const
bool operator() (const Trajectory &a, const Trajectory &b) const

Private Member Functions

float score (const TempTrajectory &t) const
float score (const Trajectory &t) const

Private Attributes

float bonus
float penalty


Detailed Description

Defines an ordering of Trajectories in terms of "goodness" The comparison is done in terms of total chi**2 / ndf plus a penalty for "lost" hits.

Definition at line 13 of file GroupedTrajCandLess.h.


Constructor & Destructor Documentation

GroupedTrajCandLess::GroupedTrajCandLess ( float  p = 5,
float  b = 0 
) [inline]

Definition at line 18 of file GroupedTrajCandLess.h.

00018 : penalty(p), bonus(b) {}


Member Function Documentation

bool GroupedTrajCandLess::operator() ( const TempTrajectory a,
const TempTrajectory b 
) const [inline]

Definition at line 24 of file GroupedTrajCandLess.h.

References score().

00024                                                                            {
00025     return score(a) < score(b);
00026   }

bool GroupedTrajCandLess::operator() ( const Trajectory a,
const Trajectory b 
) const [inline]

Definition at line 20 of file GroupedTrajCandLess.h.

References score().

00020                                                                    {
00021     return score(a) < score(b);
00022   }

float GroupedTrajCandLess::score ( const TempTrajectory t  )  const [inline, private]

Definition at line 55 of file GroupedTrajCandLess.h.

References bonus, TempTrajectory::chiSquared(), TempTrajectory::foundHits(), TempTrajectory::lostHits(), and penalty.

00056   {
00057     return t.chiSquared()-t.foundHits()*bonus+t.lostHits()*penalty;
00058   }

float GroupedTrajCandLess::score ( const Trajectory t  )  const [inline, private]

Definition at line 29 of file GroupedTrajCandLess.h.

References bonus, Trajectory::chiSquared(), Trajectory::foundHits(), Trajectory::lostHits(), and penalty.

Referenced by operator()().

00030   {
00031 //     int ndf(-5);
00032 //     float chi2(0.);
00033 //     vector<TrajectoryMeasurement> measurements(t.measurements());
00034 //     for ( vector<TrajectoryMeasurement>::const_iterator im=measurements.begin();
00035 //        im!=measurements.end(); im++ ) {
00036 //       if ( im->recHit().isValid() ) {
00037 //      ndf += im->recHit().dimension();
00038 //      chi2 += im->estimate();
00039 //       }
00040 //     }
00041 
00042 //     float normChi2(0.);
00043 //     if ( ndf>0 ) {
00044 //       // normalise chi2 to number of (2d) hits
00045 //       normChi2 = chi2/ndf*2;
00046 //     }
00047 //     else {
00048 // //       // include bonus for found hits
00049 // //       normChi2 = chi2 - ndf/2*penalty;
00050 //     }
00051 //     normChi2 -= t.foundHits()*2*b;
00052 //     return normChi2+t.lostHits()*penalty;
00053     return t.chiSquared()-t.foundHits()*bonus+t.lostHits()*penalty;
00054   }


Member Data Documentation

float GroupedTrajCandLess::bonus [private]

Definition at line 63 of file GroupedTrajCandLess.h.

Referenced by score().

float GroupedTrajCandLess::penalty [private]

Definition at line 62 of file GroupedTrajCandLess.h.

Referenced by score().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:23:16 2009 for CMSSW by  doxygen 1.5.4