Belle II Software development
|
Class that allows to split runs into the intervals of intended properties given by the lossFunction. More...
#include <Splitter.h>
Public Member Functions | |
template<typename Evt > | |
std::vector< std::vector< std::map< ExpRun, std::pair< double, double > > > > | getIntervals (const std::map< ExpRun, std::pair< double, double > > &runs, std::vector< Evt > evts, TString lossFunctionOuter, TString lossFunctionInner, double atomSize=3./60) |
Function to merge/divide runs into the calibration intervals of given characteristic length. | |
Static Public Member Functions | |
static std::pair< double, double > | getStartEnd (std::vector< std::map< ExpRun, std::pair< double, double > > > res) |
Get the start/end time of the calibration interval (vector of the calib. | |
static std::vector< double > | getBreaks (std::vector< std::map< ExpRun, std::pair< double, double > > > res) |
Get vector with breaks of the calib. | |
static std::map< ExpRun, std::pair< double, double > > | mergeIntervals (std::map< ExpRun, std::pair< double, double > > I1, std::map< ExpRun, std::pair< double, double > > I2) |
Merge two subintervals into one subinterval. | |
Private Member Functions | |
std::vector< int > | dynamicBreaks (const std::vector< Atom > &runs) |
Get optimal break points using algorithm based on dynamic programming. | |
double | getMinLoss (const std::vector< Atom > &vec, int e, std::vector< int > &breaks) |
Recursive function to evaluate minimal sum of the lossFuctions for the optimal clustering. | |
double | lossFunction (const std::vector< Atom > &vec, int s, int e) const |
lossFunction of the calibration interval consisting of several "atoms" stored in vector vec The atoms included in calibration interval have indices between s and e | |
template<typename Evt > | |
std::vector< Atom > | createAtoms (const std::vector< std::pair< double, double > > &atomsTimes, const std::vector< Evt > &evts) |
Get the vector with parameters of the calibration Atoms. | |
TF1 * | toTF1 (TString LossString) |
Convert lossFunction from string to TF1. | |
Static Private Member Functions | |
static std::vector< std::pair< double, double > > | splitToSmall (std::map< ExpRun, std::pair< double, double > > runs, double intSize=1./60) |
Split the runs into small calibration intervals (atoms) of a specified size. | |
Private Attributes | |
TF1 * | lossFun |
loss function used for clustering of Atoms | |
std::vector< std::pair< double, std::vector< int > > > | cache |
cache used by the clustering algorithm (has to be reset every time) | |
Class that allows to split runs into the intervals of intended properties given by the lossFunction.
It typically avoids of having large time gaps within calibration intervals. The algorithm is based on minimizing the total loss function Notice, that the calibration interval is defined as a map, where for each run the included period is defined by the start and end time
Definition at line 108 of file Splitter.h.
|
inline |
Definition at line 111 of file Splitter.h.
|
inlineprivate |
Get the vector with parameters of the calibration Atoms.
atomsTimes | vector with start/end times of the atoms |
evts | vector with events |
Definition at line 260 of file Splitter.h.
|
inlinestatic |
Get vector with breaks of the calib.
interval
res | A single calibration interval |
Definition at line 131 of file Splitter.h.
|
inline |
Function to merge/divide runs into the calibration intervals of given characteristic length.
runs | A map with key containing expNum+runNum and value start+end time in hours of the run |
evts | A vector with all events |
lossFunctionOuter | A formula of the outer loss function (for calib. intervals) |
lossFunctionInner | A formula of the inner loss function (for calib. subintervals) |
atomSize | length of the small calibration interval - atom (in hours) |
Definition at line 163 of file Splitter.h.
|
inlinestatic |
Get the start/end time of the calibration interval (vector of the calib.
subintervals).
res | A single calibration interval (for example from getIntervals function) |
Definition at line 120 of file Splitter.h.
|
inlineprivate |
Convert lossFunction from string to TF1.
Definition at line 286 of file Splitter.h.
|
private |
cache used by the clustering algorithm (has to be reset every time)
Definition at line 301 of file Splitter.h.
|
private |
loss function used for clustering of Atoms
Definition at line 297 of file Splitter.h.