CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajCandLess.h
Go to the documentation of this file.
1 #ifndef TrajCandLess_H
2 #define TrajCandLess_H
3 
4 #include <functional>
6 
15 template <class TR>
16 class TrajCandLess : public std::binary_function< const TR&,
17  const TR&, bool>
18 {
19 public:
20 
21  TrajCandLess( float p=5) : penalty(p) {}
22 
23  bool operator()( const TR& a, const TR& b) const {
24  return a.chiSquared() + a.lostHits()*penalty <
25  b.chiSquared() + b.lostHits()*penalty;
26  }
27 
28 private:
29 
30  float penalty;
31 
32 };
33 
34 #endif
TrajCandLess(float p=5)
Definition: TrajCandLess.h:21
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
bool operator()(const TR &a, const TR &b) const
Definition: TrajCandLess.h:23