10#ifndef INCLUDE_GUARD_BELLE2_MVA_SPLOT_HEADER
11#define INCLUDE_GUARD_BELLE2_MVA_SPLOT_HEADER
13#include <mva/interface/Dataset.h>
14#include <mva/utility/Binning.h>
15#include <mva/interface/Expert.h>
59 virtual std::vector<float>
getFeature(
unsigned int iFeature)
override {
return m_dataset.getFeature(iFeature); }
65 virtual std::vector<float>
getSpectator(
unsigned int iSpectator)
override {
return m_dataset.getSpectator(iSpectator); }
73 for (
unsigned int iEvent = 0; iEvent < weights.size(); ++iEvent) {
93 virtual void loadEvent(
unsigned int event)
override;
135 virtual std::vector<float>
getFeature(
unsigned int iFeature)
override {
return m_dataset.getFeature(iFeature); }
141 virtual std::vector<float>
getSpectator(
unsigned int iSpectator)
override {
return m_dataset.getSpectator(iSpectator); }
147 virtual void loadEvent(
unsigned int event)
override;
192 virtual void loadEvent(
unsigned int event)
override;
210 std::vector<float> getSPlotWeights(
Dataset& dataset,
const Binning& binning);
217 std::vector<float> getBoostWeights(
Dataset& dataset,
const Binning& binning);
225 std::vector<float> getAPlotWeights(
Dataset& dataset,
const Binning& binning,
const std::vector<float>& boost_prediction);
Binning of a data distribution Provides PDF and CDF values of the distribution per bin.
Abstract base class of all Datasets given to the MVA interface The current event can always be access...
Dataset(const GeneralOptions &general_options)
Constructs a new dataset given the general options.
General options which are shared by all MVA trainings.
ReweightingDataset(const GeneralOptions &general_options, Dataset &dataset, const std::vector< float > &weights)
Constructs a new ReweightingDataset.
std::vector< float > m_weights
sPlot weights
Dataset & m_dataset
Wrapped dataset.
virtual std::vector< float > getFeature(unsigned int iFeature) override
Returns all values of one feature in a std::vector<float>
virtual unsigned int getNumberOfEvents() const override
Returns the number of events in this dataset.
virtual void loadEvent(unsigned int event) override
Load the event number iEvent.
virtual std::vector< bool > getSignals() override
Returns all is Signals.
virtual unsigned int getNumberOfSpectators() const override
Returns the number of features in this dataset.
virtual std::vector< float > getWeights() override
Returns all weights.
virtual std::vector< float > getTargets() override
Returns all targets.
virtual unsigned int getNumberOfFeatures() const override
Returns the number of features in this dataset.
virtual std::vector< float > getSpectator(unsigned int iSpectator) override
Returns all values of one spectator in a std::vector<float>
std::vector< float > m_weights
sPlot weights
Dataset & m_dataset
Wrapped dataset.
virtual unsigned int getNumberOfEvents() const override
Returns the number of events in this dataset.
virtual void loadEvent(unsigned int event) override
Load the event number iEvent.
SPlotDataset(const GeneralOptions &general_options, Dataset &dataset, const std::vector< float > &weights, float signalFraction)
Constructs a new SPlotDataset.
virtual unsigned int getNumberOfSpectators() const override
Returns the number of features in this dataset.
virtual unsigned int getNumberOfFeatures() const override
Returns the number of features in this dataset.
virtual float getSignalFraction() override
Returns the signal fraction of the whole sample.
float m_signalFraction
Signal fraction.
Dataset & m_dataset
Wrapped dataset.
virtual std::vector< float > getFeature(unsigned int iFeature) override
Returns all values of one feature in a std::vector<float>
double m_negative_signal_weight
the weight for negative signal events
double m_signal_weight
the weight for signal events
virtual unsigned int getNumberOfEvents() const override
Returns the number of events in this dataset.
virtual void loadEvent(unsigned int event) override
Load the event number iEvent.
double m_background_weight
the weight for background events
SidebandDataset(const GeneralOptions &general_options, Dataset &dataset, Dataset &mc_dataset, const std::string &sideband_variable)
Constructs a new SidebandDataset.
int m_spectator_index
spectator containing the sideband variable
virtual unsigned int getNumberOfSpectators() const override
Returns the number of features in this dataset.
virtual unsigned int getNumberOfFeatures() const override
Returns the number of features in this dataset.
virtual std::vector< float > getSpectator(unsigned int iSpectator) override
Returns all values of one spectator in a std::vector<float>
Abstract base class for different kinds of events.