55 std::string
GetSampleTitle(
const int Sample)
const override { (void)Sample;
return "NuDockSample"; };
59 std::string
GetName()
const override {
return "NuDockSample"; };
68 void PrintRates(
const bool DataOnly =
false)
override { (void)DataOnly;
MACH3LOG_INFO(
"No rates to print for NuDock sample handler"); };
73 int GetNOscChannels(
const int iSample)
const override { (void)iSample;
return 0; };
79 std::string
GetKinVarName(
const int iSample,
const int Dimension)
const override { (void)iSample; (void)Dimension;
return ""; };
82 const TH1*
GetDataHist(
const int Sample)
override { (void)Sample;
return nullptr; };
84 const TH1*
GetMCHist(
const int Sample)
override { (void)Sample;
return nullptr; };
86 const TH1*
GetW2Hist(
const int Sample)
override { (void)Sample;
return nullptr; };
89 int GetNDim(
const int Sample)
const override { (void)Sample;
return 0; };
90 std::string
GetFlavourName(
const int iSample,
const int iChannel)
const override { (void)iSample; (void)iChannel;
return ""; };
93 std::vector<double>
ReturnKinematicParameterBinning(
const int Sample,
const std::string &KinematicParameter)
const override { (void)Sample; (void)KinematicParameter;
return {}; };
96 int kModeToFill = -1,
int kChannelToFill = -1,
int WeightStyle = 0)
override {
97 (void)iSample; (void)ProjectionVar_Str; (void)kModeToFill; (void)kChannelToFill; (void)WeightStyle;
102 const std::string& ProjectionVar_StrY,
int kModeToFill = -1,
103 int kChannelToFill = -1,
int WeightStyle = 0)
override {
104 (void)iSample; (void)ProjectionVar_StrX; (void)ProjectionVar_StrY; (void)kModeToFill; (void)kChannelToFill; (void)WeightStyle;
108 std::unique_ptr<TH1>
Get1DVarHist(
const int iSample,
const std::string &ProjectionVar,
109 const std::vector<KinematicCut> &EventSelectionVec = {},
int WeightStyle = 0,
110 const std::vector<KinematicCut> &SubEventSelectionVec = {})
override {
111 (void)iSample; (void)ProjectionVar; (void)EventSelectionVec; (void)WeightStyle; (void)SubEventSelectionVec;
115 std::unique_ptr<TH2>
Get2DVarHist(
const int iSample,
const std::string& ProjectionVarX,
const std::string& ProjectionVarY,
116 const std::vector< KinematicCut >& EventSelectionVec = {},
117 int WeightStyle = 0,
const std::vector< KinematicCut >& SubEventSelectionVec = {})
override {
118 (void)iSample; (void)ProjectionVarX; (void)ProjectionVarY; (void)EventSelectionVec; (void)WeightStyle; (void)SubEventSelectionVec;
#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.
std::unique_ptr< TH2 > Get2DVarHist(const int iSample, const std::string &ProjectionVarX, const std::string &ProjectionVarY, const std::vector< KinematicCut > &EventSelectionVec={}, int WeightStyle=0, const std::vector< KinematicCut > &SubEventSelectionVec={}) override
Build a 2D projection of MC events into specified variables.
virtual ~SampleHandlerNuDockBase()
Destructor.
double GetSampleLikelihood(const int isample) const override
Get the likelihood for a specific sub-sample.
std::unique_ptr< TH1 > Get1DVarHist(const int iSample, const std::string &ProjectionVar, const std::vector< KinematicCut > &EventSelectionVec={}, int WeightStyle=0, 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)
void CleanMemoryBeforeFit() override
No-op – memory cleanup is handled by the NuDock server.
const TH1 * GetMCHist(const int Sample) override
Get MC histogram.
int GetNDim(const int Sample) const override
DB Function to differentiate 1D or 2D binning.
std::vector< double > ReturnKinematicParameterBinning(const int Sample, const std::string &KinematicParameter) const override
Return the binning used to draw a kinematic parameter.
const TH1 * GetDataHist(const int Sample) override
Get Data histogram.
double GetLikelihood() const override
Retrieve the log-likelihood from the NuDock server.
std::string GetFlavourName(const int iSample, const int iChannel) const override
Get the flavour name for a given sample and oscillation channel.
const TH1 * GetW2Hist(const int Sample) override
Get W2 histogram.
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.
std::string GetKinVarName(const int iSample, const int Dimension) const override
Return Kinematic Variable name for specified sample and dimension for example "Reconstructed_Neutrino...
bool verbose
Verbose logging flag, read from the NuDockClient config block.
ParameterHandlerGeneric * ParHandler
Non-owning pointer to the cross-section ParameterHandler.
std::unique_ptr< TH2 > Get2DVarHistByModeAndChannel(const int iSample, const std::string &ProjectionVar_StrX, const std::string &ProjectionVar_StrY, int kModeToFill=-1, int kChannelToFill=-1, int WeightStyle=0) override
Build a 2D histogram for given variables, optionally filtered by mode and channel.
int GetNOscChannels(const int iSample) const override
Get the number of oscillation channels for a sample.
std::string GetSampleTitle(const int Sample) const override
Get the title string for a given sample index.
std::unique_ptr< TH1 > Get1DVarHistByModeAndChannel(const int iSample, const std::string &ProjectionVar_Str, int kModeToFill=-1, int kChannelToFill=-1, 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 the name of this sample handler.
void PrintRates(const bool DataOnly=false) override
Print event rates (no-op for the NuDock client).