Belle II Software light-2406-ragdoll
|
Dataset for Reweighting Wraps a dataset and provides each data-point with a new weight. More...
#include <DataDriven.h>
Public Member Functions | |
ReweightingDataset (const GeneralOptions &general_options, Dataset &dataset, const std::vector< float > &weights) | |
Constructs a new ReweightingDataset. | |
virtual unsigned int | getNumberOfFeatures () const override |
Returns the number of features in this dataset. | |
virtual unsigned int | getNumberOfSpectators () const override |
Returns the number of features in this dataset. | |
virtual unsigned int | getNumberOfEvents () const override |
Returns the number of events in this dataset. | |
virtual std::vector< float > | getFeature (unsigned int iFeature) override |
Returns all values of one feature in a std::vector<float> | |
virtual std::vector< float > | getSpectator (unsigned int iSpectator) override |
Returns all values of one spectator in a std::vector<float> | |
virtual std::vector< float > | getWeights () override |
Returns all weights. | |
virtual std::vector< float > | getTargets () override |
Returns all targets. | |
virtual std::vector< bool > | getSignals () override |
Returns all is Signals. | |
virtual void | loadEvent (unsigned int event) override |
Load the event number iEvent. | |
virtual float | getSignalFraction () |
Returns the signal fraction of the whole sample. | |
virtual unsigned int | getFeatureIndex (const std::string &feature) |
Return index of feature with the given name. | |
virtual unsigned int | getSpectatorIndex (const std::string &spectator) |
Return index of spectator with the given name. | |
Public Attributes | |
GeneralOptions | m_general_options |
GeneralOptions passed to this dataset. | |
std::vector< float > | m_input |
Contains all feature values of the currently loaded event. | |
std::vector< float > | m_spectators |
Contains all spectators values of the currently loaded event. | |
float | m_weight |
Contains the weight of the currently loaded event. | |
float | m_target |
Contains the target value of the currently loaded event. | |
bool | m_isSignal |
Defines if the currently loaded event is signal or background. | |
Private Attributes | |
Dataset & | m_dataset |
Wrapped dataset. | |
std::vector< float > | m_weights |
sPlot weights | |
Dataset for Reweighting Wraps a dataset and provides each data-point with a new weight.
Definition at line 29 of file DataDriven.h.
ReweightingDataset | ( | const GeneralOptions & | general_options, |
Dataset & | dataset, | ||
const std::vector< float > & | weights | ||
) |
Constructs a new ReweightingDataset.
general_options | shared options defining the dataset (variables, ...) |
dataset | containing the data-points |
weights | reweighting weights |
Definition at line 25 of file DataDriven.cc.
|
inlineoverridevirtual |
Returns all values of one feature in a std::vector<float>
iFeature | the position of the feature to return |
Reimplemented from Dataset.
Definition at line 59 of file DataDriven.h.
|
virtualinherited |
Return index of feature with the given name.
feature | name of the feature |
Definition at line 50 of file Dataset.cc.
|
inlineoverridevirtual |
Returns the number of events in this dataset.
Implements Dataset.
Definition at line 53 of file DataDriven.h.
|
inlineoverridevirtual |
Returns the number of features in this dataset.
Implements Dataset.
Definition at line 43 of file DataDriven.h.
|
inlineoverridevirtual |
Returns the number of features in this dataset.
Implements Dataset.
Definition at line 48 of file DataDriven.h.
|
virtualinherited |
Returns the signal fraction of the whole sample.
Reimplemented in SPlotDataset.
Definition at line 35 of file Dataset.cc.
|
inlineoverridevirtual |
Returns all is Signals.
Reimplemented from Dataset.
Definition at line 87 of file DataDriven.h.
|
inlineoverridevirtual |
Returns all values of one spectator in a std::vector<float>
iSpectator | the position of the feature to return |
Reimplemented from Dataset.
Definition at line 65 of file DataDriven.h.
|
virtualinherited |
Return index of spectator with the given name.
spectator | name of the spectator |
Definition at line 62 of file Dataset.cc.
|
inlineoverridevirtual |
Returns all targets.
Reimplemented from Dataset.
Definition at line 82 of file DataDriven.h.
|
inlineoverridevirtual |
Returns all weights.
Reimplemented from Dataset.
Definition at line 70 of file DataDriven.h.
|
overridevirtual |
Load the event number iEvent.
event | event number to load |
Implements Dataset.
Definition at line 28 of file DataDriven.cc.
|
private |
Wrapped dataset.
Definition at line 96 of file DataDriven.h.
|
inherited |
GeneralOptions passed to this dataset.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
private |
sPlot weights
Definition at line 97 of file DataDriven.h.