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
GroupedTrajCandLess
Definition: GroupedTrajCandLess.h:13
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GroupedTrajCandLess::score
float score(const T &t) const
Definition: GroupedTrajCandLess.h:31
GroupedTrajCandLess::looperPenalty
float looperPenalty(const T &t) const
Definition: GroupedTrajCandLess.h:24
GroupedTrajCandLess::bonus
float bonus
Definition: GroupedTrajCandLess.h:42
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
GroupedTrajCandLess::penalty
float penalty
Definition: GroupedTrajCandLess.h:41
GroupedTrajCandLess::GroupedTrajCandLess
GroupedTrajCandLess(float p=5, float b=0)
Definition: GroupedTrajCandLess.h:15
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
dso_internal
#define dso_internal
Definition: Visibility.h:13
Trajectory.h
T
long double T
Definition: Basic3DVectorLD.h:48
offlineSlimmedPrimaryVertices_cfi.score
score
Definition: offlineSlimmedPrimaryVertices_cfi.py:6
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
GroupedTrajCandLess::operator()
bool operator()(const T &a, const T &b) const
Definition: GroupedTrajCandLess.h:18
TempTrajectory.h