53 std::string
GetSampleTitle([[maybe_unused]]
const int Sample)
const override {
return "NuDockSample"; };
56 std::string
GetName()
const override {
return "NuDockSample"; };
65 void PrintRates([[maybe_unused]]
const bool DataOnly =
false)
override {
MACH3LOG_INFO(
"No rates to print for NuDock sample handler"); };
70 int GetNOscChannels([[maybe_unused]]
const int iSample)
const override {
return 0; };
75 std::string
GetKinVarName([[maybe_unused]]
const int iSample, [[maybe_unused]]
const int Dimension)
const override {
return ""; };
78 const TH1*
GetDataHist([[maybe_unused]]
const int Sample)
override {
return nullptr; };
80 const TH1*
GetMCHist([[maybe_unused]]
const int Sample)
override {
return nullptr; };
82 const TH1*
GetW2Hist([[maybe_unused]]
const int Sample)
override {
return nullptr; };
85 int GetNDim([[maybe_unused]]
const int Sample)
const override {
return 0; };
87 std::string
GetFlavourName([[maybe_unused]]
const int iSample, [[maybe_unused]]
const int iChannel)
const override {
return ""; };
90 std::vector<double>
ReturnKinematicParameterBinning([[maybe_unused]]
const int Sample, [[maybe_unused]]
const std::string &KinematicParameter)
const override {
return {}; };
93 [[maybe_unused]]
int kModeToFill = -1, [[maybe_unused]]
int kChannelToFill = -1,
94 [[maybe_unused]]
int WeightStyle = 0)
override {
return nullptr; };
97 [[maybe_unused]]
const std::string& ProjectionVar_StrY, [[maybe_unused]]
int kModeToFill = -1,
98 [[maybe_unused]]
int kChannelToFill = -1, [[maybe_unused]]
int WeightStyle = 0)
override {
return nullptr;};
100 std::unique_ptr<TH1>
Get1DVarHist([[maybe_unused]]
const int iSample, [[maybe_unused]]
const std::string &ProjectionVar,
101 [[maybe_unused]]
const std::vector<KinematicCut> &EventSelectionVec = {}, [[maybe_unused]]
int WeightStyle = 0,
102 [[maybe_unused]]
const std::vector<KinematicCut> &SubEventSelectionVec = {})
override {
return nullptr;};
104 std::unique_ptr<TH2>
Get2DVarHist([[maybe_unused]]
const int iSample, [[maybe_unused]]
const std::string& ProjectionVarX,
105 [[maybe_unused]]
const std::string& ProjectionVarY, [[maybe_unused]]
const std::vector< KinematicCut >& EventSelectionVec = {},
106 [[maybe_unused]]
int WeightStyle = 0, [[maybe_unused]]
const std::vector< KinematicCut >& SubEventSelectionVec = {})
override {
return nullptr; };
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
#define _MaCh3_Safe_Include_End_
Factory utilities for creating and configuring NuDock communication objects.
Class responsible for handling of systematic error parameters with different types defined in the con...
Class responsible for handling implementation of samples used in analysis, reweighting and returning ...
A SampleHandlerInterface class that acts as a client to an external NuDock server.
virtual ~SampleHandlerNuDockBase()
Destructor.
void CleanMemoryBeforeFit() override
No-op – memory cleanup is handled by the NuDock server.
double GetSampleLikelihood([[maybe_unused]] const int isample) const override
Get the likelihood for a specific sub-sample.
void PrintRates([[maybe_unused]] const bool DataOnly=false) override
Print event rates (no-op for the NuDock client).
std::string GetFlavourName([[maybe_unused]] const int iSample, [[maybe_unused]] const int iChannel) const override
Get the flavour name for a given sample and oscillation channel.
std::vector< double > ReturnKinematicParameterBinning([[maybe_unused]] const int Sample, [[maybe_unused]] const std::string &KinematicParameter) const override
Return the binning used to draw a kinematic parameter.
double GetLikelihood() const override
Retrieve the log-likelihood from the NuDock server.
void Reweight() override
Send current parameter values to the NuDock server.
std::vector< int > nudockParamInds
Cached indices into the ParameterHandler for parameters sent to the server.
std::unique_ptr< Manager > SampleManager
Manager owning the NuDockClient configuration.
const TH1 * GetDataHist([[maybe_unused]] const int Sample) override
Get Data histogram.
int GetNDim([[maybe_unused]] const int Sample) const override
DB Get what dimensionality binning for given sample has.
const TH1 * GetW2Hist([[maybe_unused]] const int Sample) override
Get W2 histogram.
std::string GetSampleTitle([[maybe_unused]] const int Sample) const override
Get fancy title for specified samples.
bool verbose
Verbose logging flag, read from the NuDockClient config block.
ParameterHandlerGeneric * ParHandler
Non-owning pointer to the cross-section ParameterHandler.
std::string GetKinVarName([[maybe_unused]] const int iSample, [[maybe_unused]] const int Dimension) const override
Return Kinematic Variable name for specified sample and dimension for example "Reconstructed_Neutrino...
const TH1 * GetMCHist([[maybe_unused]] const int Sample) override
Get MC histogram.
int GetNOscChannels([[maybe_unused]] const int iSample) const override
Get the number of oscillation channels for a sample.
std::unique_ptr< TH1 > Get1DVarHist([[maybe_unused]] const int iSample, [[maybe_unused]] const std::string &ProjectionVar, [[maybe_unused]] const std::vector< KinematicCut > &EventSelectionVec={}, [[maybe_unused]] int WeightStyle=0, [[maybe_unused]] const std::vector< KinematicCut > &SubEventSelectionVec={}) override
Return 1D projection of MC into given 1D variable (doesn't have to be variable used in the fit)
std::unique_ptr< TH2 > Get2DVarHist([[maybe_unused]] const int iSample, [[maybe_unused]] const std::string &ProjectionVarX, [[maybe_unused]] const std::string &ProjectionVarY, [[maybe_unused]] const std::vector< KinematicCut > &EventSelectionVec={}, [[maybe_unused]] int WeightStyle=0, [[maybe_unused]] const std::vector< KinematicCut > &SubEventSelectionVec={}) override
Build a 2D projection of MC events into specified variables.
std::unique_ptr< TH1 > Get1DVarHistByModeAndChannel([[maybe_unused]] const int iSample, [[maybe_unused]] const std::string &ProjectionVar_Str, [[maybe_unused]] int kModeToFill=-1, [[maybe_unused]] int kChannelToFill=-1, [[maybe_unused]] int WeightStyle=0) override
Build a 1D histogram for a given variable, optionally filtered by mode and channel.
std::unique_ptr< NuDock > nudock_ptr
Pointer to the NuDock client communication object.
void Init()
Initialise the NuDock client connection and cache parameter indices.
SampleHandlerNuDockBase(std::string configFile, ParameterHandlerGeneric *xsec_cov)
Construct the NuDock client sample handler.
std::string GetName() const override
Get name for Sample Handler.
std::unique_ptr< TH2 > Get2DVarHistByModeAndChannel([[maybe_unused]] const int iSample, [[maybe_unused]] const std::string &ProjectionVar_StrX, [[maybe_unused]] const std::string &ProjectionVar_StrY, [[maybe_unused]] int kModeToFill=-1, [[maybe_unused]] int kChannelToFill=-1, [[maybe_unused]] int WeightStyle=0) override
Build a 2D histogram for given variables, optionally filtered by mode and channel.