Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
quality_sorter< reconstruction_type > Struct Template Reference

Reconstruction type dependent comparison of track quality. More...

#include <reconstruction.hh>

Public Member Functions

bool operator() (const Trk &first, const Trk &second) const
 The default comparison is based on:
 

Detailed Description

template<int reconstruction_type>
struct quality_sorter< reconstruction_type >

Reconstruction type dependent comparison of track quality.

The specialisation of this class should implement the function object operator

   inline bool operator()(const Trk& first, const Trk& second) const

and return true if the first track is better then the second track.

Definition at line 85 of file tools/reconstruction.hh.

Member Function Documentation

◆ operator()()

template<int reconstruction_type>
bool quality_sorter< reconstruction_type >::operator() ( const Trk & first,
const Trk & second ) const
inline

The default comparison is based on:

  1. number of reconstruction stages, i.e. Trk::rec_stages.size() (the larger the better);
    1. likelihood of the final track, i.e. Trk::lik (the larger the better).
Parameters
firstfirst track
secondsecond track
Returns
true if first track has better quality than second; else false

Definition at line 95 of file tools/reconstruction.hh.

96 {
97 if (first.rec_stages.size() == second.rec_stages.size())
98 return first.lik > second.lik;
99 else
100 return first.rec_stages.size() > second.rec_stages.size();
101 }
std::vector< int > rec_stages
list of identifyers of succesfull fitting stages resulting in this track
Definition Trk.hh:26
double lik
likelihood or lambda value (for aafit, lambda)
Definition Trk.hh:23

The documentation for this struct was generated from the following file: