28inline 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);
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.
static constexpr const double _BAD_DOUBLE_
Default value used for double initialisation.
static constexpr const float_t Unity
static constexpr 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(FarDetectorCoreInfo &&other)=default
std::vector< const M3::float_t * > total_weight_pointers
Pointers to @xsec_w, @osc_w_pointer and remaining experiment specific weights.
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.
FarDetectorCoreInfo & operator=(FarDetectorCoreInfo &&other)=delete
std::vector< const M3::float_t * > xsec_spline_pointers
Pointers to spline weights which are being calculated by Splines Handler.
FarDetectorCoreInfo & operator=(FarDetectorCoreInfo const &other)=delete
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)