CMS 3D CMS Logo

GroupedTrajCandLess.h
Go to the documentation of this file.
1 #ifndef GroupedTrajCandLess_H
2 #define GroupedTrajCandLess_H
3 
4 #include <functional>
7 
14 public:
15  GroupedTrajCandLess(float p = 5, float b = 0) : penalty(p), bonus(b) {}
16 
17  template <typename T>
18  bool operator()(const T& a, const T& b) const {
19  return score(a) < score(b);
20  }
21 
22 private:
23  template <typename T>
24  float looperPenalty(const T& t) const {
25  return (t.dPhiCacheForLoopersReconstruction() == 0)
26  ? 0.f
27  : 0.5f * (1.f - std::cos(t.dPhiCacheForLoopersReconstruction())) * penalty;
28  }
29 
30  template <typename T>
31  float score(const T& t) const {
32  auto bb = (t.dPhiCacheForLoopersReconstruction() == 0 && t.foundHits() > 8)
33  ? 2 * bonus
34  : bonus; //extra bonus for long tracks not loopers
35  if (t.lastMeasurement().updatedState().globalMomentum().perp2() < 0.81f)
36  bb *= 0.5f;
37  return t.chiSquared() - t.foundHits() * bb + t.lostHits() * penalty + looperPenalty(t);
38  }
39 
40 private:
41  float penalty;
42  float bonus;
43 };
44 
45 #endif
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
#define dso_internal
Definition: Visibility.h:13
double f[11][100]
float score(const T &t) const
double b
Definition: hdecay.h:118
bool operator()(const T &a, const T &b) const
double a
Definition: hdecay.h:119
GroupedTrajCandLess(float p=5, float b=0)
long double T
float looperPenalty(const T &t) const