CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/RecoTracker/CkfPattern/interface/TrajCandLess.h

Go to the documentation of this file.
00001 #ifndef TrajCandLess_H
00002 #define TrajCandLess_H
00003 
00004 #include <functional>
00005 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00006 
00015 template <class TR>
00016 class TrajCandLess : public std::binary_function< const TR&,
00017                      const TR&, bool>
00018 {
00019 public:
00020 
00021   TrajCandLess( float p=5) : penalty(p) {}
00022 
00023   bool operator()( const TR& a, const TR& b) const {
00024     return a.chiSquared() + a.lostHits()*penalty <
00025       b.chiSquared() + b.lostHits()*penalty;
00026   }
00027 
00028 private:
00029 
00030   float penalty;
00031 
00032 };
00033 
00034 #endif