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

Member Function Documentation

◆ looperPenalty()

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

Definition at line 24 of file GroupedTrajCandLess.h.

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

24  {
25  return (t.dPhiCacheForLoopersReconstruction() == 0)
26  ? 0.f
27  : 0.5f * (1.f - std::cos(t.dPhiCacheForLoopersReconstruction())) * penalty;
28  }
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double f[11][100]

◆ operator()()

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

Definition at line 18 of file GroupedTrajCandLess.h.

References a, b, and offlineSlimmedPrimaryVertices_cfi::score.

18  {
19  return score(a) < score(b);
20  }
float score(const T &t) const
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ score()

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

Definition at line 31 of file GroupedTrajCandLess.h.

References f, and submitPVValidationJobs::t.

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  }
double f[11][100]
float looperPenalty(const T &t) const

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.