6 #include <unordered_map>
16 #include "TObjString.h"
34 template<
typename T,
size_t N >
37 return std::vector<T>(data, data+N);
88 for (
auto& element : container)
92 container.shrink_to_fit();
109 std::vector< std::vector< std::vector<double> > >
Selection;
176 std::string Func =
"";
179 Func =
"([1]+[0]*x)";
187 MACH3LOG_ERROR(
"Interpolation type {} not supported for TF1!",
static_cast<int>(i));
215 MACH3LOG_ERROR(
"kSplineInterpolations is not a valid interpolation type!");
229 std::string name =
"";
246 name =
"KochanekBartels";
252 MACH3LOG_ERROR(
"kSplineInterpolations is not a valid interpolation type!");
295 std::string name =
"";
307 name =
"Oscillation";
KS: Core MaCh3 definitions and compile-time configuration utilities.
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
#define _MaCh3_Safe_Include_End_
KS: Restore warning checking after including external headers.
Defines the custom exception class used throughout MaCh3.
MaCh3 Logging utilities built on top of SPDLOG.
std::string SplineInterpolation_ToString(const SplineInterpolation i)
Convert a LLH type to a string.
void CleanContainer(T &)
Base case: do nothing for non-pointer types.
SplineInterpolation
Make an enum of the spline interpolation type.
@ kTSpline3
Default TSpline3 interpolation.
@ kMonotonic
EM: DOES NOT make the entire spline monotonic, only the segments.
@ kSplineInterpolations
This only enumerates.
@ kKochanekBartels
KS: Kochanek-Bartels spline: allows local control of tension, continuity, and bias.
@ kLinear
Linear interpolation between knots.
@ kLinearFunc
Liner interpolation using TF1 not spline.
@ kAkima
EM: Akima spline iis allowed to be discontinuous in 2nd derivative and coefficients in any segment.
RespFuncType
Make an enum of the spline interpolation type.
@ kTF1_red
Uses TF1_red for interpolation.
@ kTSpline3_red
Uses TSpline3_red for interpolation.
@ kRespFuncTypes
This only enumerates.
std::string GetTF1(const SplineInterpolation i)
Get function for TF1_red.
std::vector< T > MakeVector(const T(&data)[N])
Template to make vector out of an array of any length.
void CleanVector(T &)
Base case: do nothing for non-vector types.
std::string SystType_ToString(const SystType i)
Convert a Syst type type to a string.
std::function< void(const M3::float_t *, std::size_t)> FuncParFuncType
HH - a shorthand type for funcpar functions.
RespFuncType SplineInterpolation_ToRespFuncType(const SplineInterpolation i)
Convert a RespFuncType type to a SplineInterpolation.
@ kNorm
For normalisation parameters.
@ kSpline
For splined parameters (1D)
@ kSystTypes
This only enumerates.
@ kOsc
For oscillation parameters.
@ kFunc
For functional parameters.
Custom exception class used throughout MaCh3.
constexpr static const int _BAD_INT_
Default value used for int initialisation.
HH - Functional parameters Carrier for whether you want to apply a systematic to an event or not.
std::vector< int > modes
Mode which parameter applies to.
const M3::float_t * valuePtr
Parameter value pointer.
FuncParFuncType * funcPtr
Function pointer.
ETA - Normalisations for cross-section parameters Carrier for whether you want to apply a systematic ...
std::vector< int > preoscpdgs
Preosc PDG which parameter applies to.
std::vector< int > modes
Mode which parameter applies to.
std::vector< int > pdgs
PDG which parameter applies to.
std::vector< int > targets
Targets which parameter applies to.
KS: Struct holding info about oscillation Systematics.
KS: Struct holding info about Spline Systematics.
SplineInterpolation _SplineInterpolationType
Spline interpolation vector.
double _SplineKnotUpBound
EM: Cap spline knot higher value.
double _SplineKnotLowBound
EM: Cap spline knot lower value.
std::vector< int > _fSplineModes
Modes to which spline applies (valid only for binned splines)
std::string _fSplineNames
Name of spline in TTree (TBranch),.
Base class storing info for parameters types, helping unify codebase.
int index
Parameter number of this normalisation in current systematic model.
bool hasKinBounds
Does this parameter have kinematic bounds.
std::string name
Name of parameters.
std::vector< std::string > KinematicVarStr
std::vector< std::vector< std::vector< double > > > Selection