/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
RecoTracker/CkfPattern/interface/TrajCandLess.h
26 строк
756 B
Cms Build
Clang-Format
03 июн 2019, 06:51
03 июн 2019, 06:51
c1b767c
Код
Авторство
О чём код?
#ifndef TrajCandLess_H #define TrajCandLess_H #include "TrackingTools/PatternTools/interface/Trajectory.h" /** Defines an ordering of Trajectories in terms of "goodness" * The comparison is done in terms of total chi**2 plus * a penalty for "lost" hits. * This is OK for tracks of almost same number of hits, as * in TrajectoryBuilder use, but is not applicable for * tracks of different number of thits: the shortest track * is likely to be considered "better". */ template <class TR> struct TrajCandLess { TrajCandLess(float p = 5) : penalty(p) {} bool operator()(const TR& a, const TR& b) const { return a.chiSquared() + a.lostHits() * penalty < b.chiSquared() + b.lostHits() * penalty; } private: float penalty; }; #endif