28 inline int GetOscChannel(
const std::vector<OscChannelInfo>& OscChannel,
const int InitFlav,
const int FinalFlav) {
29 for (
size_t i = 0; i < OscChannel.size(); ++i) {
30 if (InitFlav == OscChannel[i].InitPDG && FinalFlav == OscChannel[i].FinalPDG) {
31 return static_cast<int>(OscChannel[i].ChannelIndex);
35 MACH3LOG_ERROR(
"Didn't find Osc channel for InitFlav = {}, FinalFlav = {}", InitFlav, FinalFlav);
75 TString histname1d = (
XVarStr).c_str();
int GetOscChannel(const std::vector< OscChannelInfo > &OscChannel, const int InitFlav, const int FinalFlav)
KS: Get Osc Channel Index based on initial and final PDG codes.
Custom exception class for MaCh3 errors.
constexpr static const double _BAD_DOUBLE_
Default value used for double initialisation.
constexpr static const float_t Unity
constexpr static const int _BAD_INT_
Default value used for int initialisation.
constexpr static const double Unity_D
Some commonly used variables to which we set pointers to.
constructors are same for all three so put in here
const M3::float_t * osc_w_pointer
pointer to oscillation weight which is being calculated by Oscillation Handler
FarDetectorCoreInfo & operator=(FarDetectorCoreInfo &&other)=delete
FarDetectorCoreInfo(FarDetectorCoreInfo &&other)=default
std::vector< const M3::float_t * > total_weight_pointers
Pointers to xsec_w, osc_w_pointer and remaining experiment specific weights.
FarDetectorCoreInfo & operator=(FarDetectorCoreInfo const &other)=delete
std::vector< const double * > xsec_norm_pointers
Pointers to normalisation weights which are being taken from Parameter Handler.
M3::float_t xsec_w
Total weight of norm and spline parameters.
std::vector< const M3::float_t * > xsec_spline_pointers
Pointers to spline weights which are being calculated by Splines Handler.
const int * Target
target the interaction was on
FarDetectorCoreInfo(FarDetectorCoreInfo const &other)=delete
KS: Store info about used osc channels.
int InitPDG
PDG of initial flavour.
double ChannelIndex
In case experiment specific would like to have pointer to channel after using GetOscChannel,...
int FinalPDG
PDG of oscillated/final flavour.
std::string flavourName
Name of osc channel.
std::string flavourName_Latex
Fancy channel name (e.g., LaTeX formatted)
KS: Store info about MC sample.
TH1D * _hPDF1D
histogram used for plotting storing 1D MC distribution
void InitialiseHistograms()
Initialise histograms used for plotting.
TH2D * _hPDF2D
histogram used for plotting storing 2D MC distribution
int nDimensions
Keep track of the dimensions of the sample binning.
SampleInfo()=default
Default constructor.
std::string XVarStr
the strings associated with the variables used for the X binning e.g. "RecoNeutrinoEnergy"
std::string SampleTitle
the name of this sample e.g."muon-like"
TH2D * dathist2d
histogram used for plotting storing 2D data distribution
TH1D * dathist
histogram used for plotting storing 1D data distribution
std::string YVarStr
the strings associated with the variables used for the Y binning e.g. "RecoNeutrinoEnergy"