CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
GroupedTrajCandLess Class Reference

#include <GroupedTrajCandLess.h>

Public Member Functions

 GroupedTrajCandLess (float p=5, float b=0)
 
template<typename T >
bool operator() (const T &a, const T &b) const
 

Private Member Functions

template<typename T >
float looperPenalty (const T &t) const
 
template<typename T >
float score (const T &t) const
 

Private Attributes

float bonus
 
float penalty
 

Detailed Description

Defines an ordering of Trajectories in terms of "goodness" The comparison is done in terms of total chi**2 / ndf plus a penalty for "lost" hits.

Definition at line 13 of file GroupedTrajCandLess.h.

Constructor & Destructor Documentation

◆ GroupedTrajCandLess()

GroupedTrajCandLess::GroupedTrajCandLess ( float  p = 5,
float  b = 0 
)
inline

Definition at line 15 of file GroupedTrajCandLess.h.

15 : penalty(p), bonus(b) {}

Member Function Documentation

◆ looperPenalty()

template<typename T >
float GroupedTrajCandLess::looperPenalty ( const T t) const
inlineprivate

Definition at line 24 of file GroupedTrajCandLess.h.

24  {
25  return (t.dPhiCacheForLoopersReconstruction() == 0)
26  ? 0.f
27  : 0.5f * (1.f - std::cos(t.dPhiCacheForLoopersReconstruction())) * penalty;
28  }

References funct::cos(), f, and OrderedSet::t.

◆ operator()()

template<typename T >
bool GroupedTrajCandLess::operator() ( const T a,
const T b 
) const
inline

Definition at line 18 of file GroupedTrajCandLess.h.

18  {
19  return score(a) < score(b);
20  }

References a, b, and offlineSlimmedPrimaryVertices_cfi::score.

◆ score()

template<typename T >
float GroupedTrajCandLess::score ( const T t) const
inlineprivate

Definition at line 31 of file GroupedTrajCandLess.h.

31  {
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  }

References f, and OrderedSet::t.

Member Data Documentation

◆ bonus

float GroupedTrajCandLess::bonus
private

Definition at line 42 of file GroupedTrajCandLess.h.

◆ penalty

float GroupedTrajCandLess::penalty
private

Definition at line 41 of file GroupedTrajCandLess.h.

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
OrderedSet.t
t
Definition: OrderedSet.py:90
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119