Jpp
Public Member Functions | List of all members
JAANET::quality_sorter< reconstruction_type > Struct Template Reference

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

#include <JAAnetToolkit.hh>

Public Member Functions

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

Detailed Description

template<int reconstruction_type>
struct JAANET::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 670 of file JAAnetToolkit.hh.

Member Function Documentation

◆ operator()()

template<int reconstruction_type>
bool JAANET::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 680 of file JAAnetToolkit.hh.

681  {
682  if (first.rec_stages.size() == second.rec_stages.size())
683  return first.lik > second.lik;
684  else
685  return first.rec_stages.size() > second.rec_stages.size();
686  }

The documentation for this struct was generated from the following file:
Trk::rec_stages
std::vector< int > rec_stages
list of identifyers of succesfull fitting stages resulting in this track
Definition: Trk.hh:24
Trk::lik
double lik
likelihood or lambda value (for aafit, lambda)
Definition: Trk.hh:21