A closely related class that provides helper functions.
More...
#include <TauDecayModeNNClassifier.h>
|
static float | Log10Robust (const float val, const float min_val=0.) |
|
template<typename T > |
static void | sortAndKeep (std::vector< T > &vec, const std::size_t n_obj) |
| sort the objects and only keep the leading N objects in the vector More...
|
|
template<typename T > |
static void | initMapKeys (std::map< std::string, T > &empty_map, const std::set< std::string > &keys) |
| initialise the map with a set of defined keys More...
|
|
A closely related class that provides helper functions.
Definition at line 104 of file TauDecayModeNNClassifier.h.
◆ TauDecayModeNNHelper()
tauRecTools::TauDecayModeNNHelper::TauDecayModeNNHelper |
( |
| ) |
|
|
delete |
◆ initMapKeys()
template<typename T >
void tauRecTools::TauDecayModeNNHelper::initMapKeys |
( |
std::map< std::string, T > & |
empty_map, |
|
|
const std::set< std::string > & |
keys |
|
) |
| |
|
static |
initialise the map with a set of defined keys
- Parameters
-
empty_map | the map to be initialised |
keys | a set that contains the keys for the map |
the template type can be any type the map does not necessary need to be empty
Definition at line 418 of file TauDecayModeNNClassifier.cxx.
◆ Log10Robust()
float tauRecTools::TauDecayModeNNHelper::Log10Robust |
( |
const float |
val, |
|
|
const float |
min_val = 0. |
|
) |
| |
|
static |
◆ sortAndKeep()
template<typename T >
void tauRecTools::TauDecayModeNNHelper::sortAndKeep |
( |
std::vector< T > & |
vec, |
|
|
const std::size_t |
n_obj |
|
) |
| |
|
static |
sort the objects and only keep the leading N objects in the vector
- Parameters
-
vec | a vector of physics object pointers |
n_obj | number of leading pT objects to keep |
the template type must have pt() method (e.g. PFO*, TauTrack*) objects are sorted by pT in descending order the redundant objects will not be used
Definition at line 407 of file TauDecayModeNNClassifier.cxx.
409 auto cmp_pt = [](
const T lhs,
const T rhs) {
return lhs->pt() > rhs->pt(); };
411 if (
vec.size() > n_obj)
413 vec.erase(
vec.begin() + n_obj,
vec.end());
The documentation for this class was generated from the following files:
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.