MaCh3 2.2.1
Reference Guide
Loading...
Searching...
No Matches
FarDetectorCoreInfoStruct.h
Go to the documentation of this file.
1#pragma once
2#include <vector>
3#include <string>
4
6
10 std::string flavourName;
12 std::string flavourName_Latex;
13
18
21};
22
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);
32 }
33 }
34
35 MACH3LOG_ERROR("Didn't find Osc channel for InitFlav = {}, FinalFlav = {}", InitFlav, FinalFlav);
36 throw MaCh3Exception(__FILE__, __LINE__);
37}
38
46
48
49 const int* Target = 0;
50 const int* nupdg = 0;
51 const int* nupdgUnosc = 0;
52
53 //THe x_var and y_vars that you're binning in
54 const double* x_var = &M3::Unity_D;
55 const double* y_var = &M3::Unity_D;
56 const double* rw_etru = &M3::_BAD_DOUBLE_;
57 const double* rw_truecz = &M3::_BAD_DOUBLE_;
58
60 std::vector<const double*> xsec_norm_pointers;
62 std::vector<const M3::float_t*> xsec_spline_pointers;
68 std::vector<const M3::float_t*> total_weight_pointers;
69
70 //M3::float_t total_w = M3::_BAD_INT_;
71
72 int NomXBin = -1;
73 int NomYBin = -1;
74
75 bool isNC = false;
76
77 const double* mode = &M3::Unity_D;
78};
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.
#define MACH3LOG_ERROR
Definition: MaCh3Logger.h:25
Custom exception class for MaCh3 errors.
double float_t
Definition: Core.h:28
static constexpr const double _BAD_DOUBLE_
Default value used for double initialisation.
Definition: Core.h:43
static constexpr const float_t Unity
Definition: Core.h:54
static constexpr const double Unity_D
Some commonly used variables to which we set pointers to.
Definition: Core.h:49
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)