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 {
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  auto bb = (t.dPhiCacheForLoopersReconstruction()==0 && t.foundHits()>8) ? 2*bonus : bonus; //extra bonus for long tracks not loopers
35  if ( t.lastMeasurement().updatedState().globalMomentum().perp2() < 0.81f ) bb*=0.5f;
36  return t.chiSquared()-t.foundHits()*bb+t.lostHits()*penalty
37  + looperPenalty(t);
38  }
39 
40  private:
41 
42  float penalty;
43  float bonus;
44 
45 };
46 
47 #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