CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GroupedTrajCandLess.h
Go to the documentation of this file.
1 #ifndef GroupedTrajCandLess_H
2 #define GroupedTrajCandLess_H
3 
4 #include <functional>
7 
14 {
15 public:
16 
17  GroupedTrajCandLess( float p=5, float b=0) : penalty(p), bonus(b) {}
18 
19  template<typename T>
20  bool operator()( const T& a, const T& b) const {
21  return score(a) < score(b);
22  }
23 
24 private:
25  template<typename T>
26  float looperPenalty(const T&t) const {
27  return (t.dPhiCacheForLoopersReconstruction()==0) ? 0.f :
28  0.5f*(1.f-std::cos(t.dPhiCacheForLoopersReconstruction()))*penalty;
29  }
30 
31  template<typename T>
32  float score (const T & t) const
33  {
34 
35  return t.chiSquared()-t.foundHits()*bonus+t.lostHits()*penalty
36  + looperPenalty(t);
37  }
38 
39  private:
40 
41  float penalty;
42  float bonus;
43 
44 };
45 
46 #endif
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double f[11][100]
float score(const T &t) const
double b
Definition: hdecay.h:120
bool operator()(const T &a, const T &b) const
#define dso_internal
double a
Definition: hdecay.h:121
GroupedTrajCandLess(float p=5, float b=0)
long double T
float looperPenalty(const T &t) const