MaCh3  2.5.1
Reference Guide
Todo List
Member __cudaSafeCall (cudaError err, const char *file, const int line)

KS: There is plenty of useful stuff here https://github.com/NVIDIA/cuda-samples/blob/master/Samples/1_Utilities/deviceQuery/deviceQuery.cpp

KS: We might want to port some of these utilities, for example having bool if there is unified memory etc.

Member BinnedSplineHandler::BinnedSplineHandler (ParameterHandlerGeneric *xsec_, MaCh3Modes *Modes_)
ETA - do all of these functions and members actually need to be public?
Member BinnedSplineHandler::CalcSplineWeights () final
KS: Once could use "ParamValues" but this will result in tiny bit different results due to floating point precision
Member BinnedSplineHandler::~BinnedSplineHandler ()
it need some love
Member CalculateEnu (double PLep, double cosTheta, double EB, bool neutrino)
WARNING this is hardcoded
Member CompareHistograms (const TH1 *h1, const TH1 *h2, const std::string &histName, const std::string &folderName)
add checks for stuff like bin content etc
Member FitterBase::SanitiseInputs ()
consider expanding into ParmaterHandler and add more sanitisers
Member get_default_log_level ()
make constexpr with c++17
File GetPenaltyTerm.cpp
KS: This should really be moved to MCMC Processor
Member GetSplineIndex (const std::vector< SplineIndex > &vec, const int sample, const int oscchan, const int syst, const int mode, const int var1bin, const int var2bin, const int var3bin)
KS: quoting Dan: I imagine all splines are loaded such that they are sequential in varbins etc. so we could optimise this finding function.
Member Graph_interpolate1D (TGraph *graph, double theta13)
double check implementation of TGraph interpolation for 1D
Member Graph_interpolateNO (TGraph2D *graph, double theta13, double dm32)
add a generic 2D reweight that is not dm32 and theta13 specific DWR
Member M3::Utils::GetMassFromPDG (const int PDG)
this could be constexpr in c++17
Member MaCh3CovarianceFactory (Manager *FitManager, const std::string &PreFix)
add adaptive stuff
Member MaCh3ManagerFactory (int argc, char **argv)
KS: May need some recursive magic to reduce amount of hardcoding
Class MCMCProcessor
KS: Implement Diagnostics/GetPenaltyTerm.cpp here.
Member MCMCProcessor::PowerSpectrumAnalysis ()
KS: Code is awfully slow... I know how to make it faster (GPU scream in a distant) but for now just make it for two params, bit hacky sry...
Member MinuitFit::MinuitFit (Manager *const fitMan)
KS: Make this in future configurable, for more see: https://root.cern.ch/doc/master/classROOT_1_1Math_1_1Minimizer.html
Member OscProcessor::LoadAdditionalInfo () final

remove this hardcoding (e.g., use a map or enum-to-name function)

we should actually calculate central value and prior error but leave it for now...

Member OscProcessor::OscProcessor (const std::string &InputFile)
Here where we should add all unitarity triangles, fancy Jarlskog studies and other hacky things that only make sense for oscitations
Member PCAHandler::ThrowParameters (const std::vector< std::unique_ptr< TRandom3 >> &random_number, double **throwMatrixCholDecomp, double *randParams, double *corr_throw, const std::vector< double > &fPreFitValue, const std::vector< double > &fLowBound, const std::vector< double > &fUpBound, int _fNumPar)
KS: We don't check if param is out of bounds. This is more problematic for PCA params.
File PlotMCMCDiag.cpp
this need serious refactor
File PlotSigmaVariation.cpp
add maybe ratio for PlotSigVar1D
Member PredictiveThrower::StudyByMode1DProjections (const std::vector< TDirectory * > &SampleDirectories) const
KS: Here we assume each sample has same modes, this is because ProduceSpectra function, expects vector [sample], [toy], [dim], so we make ProjectionToys with [mode], [sample], [toy], [dim] so we can reuse this functionality
Member ReweightMCMC (const std::string &inputFile, const std::string &configFile)

Get list only of unique parameters, this is repeating unnecessarily when adding more than 1 weight DWR

Finish Asimov shifting implementation, for now just warn that Asimovs are not being properly handled

add tracking for how many events are outside the graph ranges for diagnostics DWR

Member SampleBinningInfo::InitNonUniform (const std::vector< std::vector< std::vector< double >>> &InputBins)
KS: Now we create "Large Bins" automatically, in future we can expand to add more user control
Member SampleHandlerBase::funcParsVec
KS: Below functional variables are used only on setup, thus we should refactor them in such a way that they are removed as class members but this would be breaking change thus keep it for the time being.
Member SampleHandlerBase::ReturnKinematicParameterBinning (const int Sample, const std::string &KinematicParameter) const final
might be useful to allow overwriting this
Member SampleHandlerBase::SetupFunctionalParameters ()
KS: Instead of clearing it they should not be class members, so we must fix it in future
Member SampleHandlerBase::SetupSplines ()=0
abstract the spline initialisation completely to core
Member SystType
KS: Consider using enum class, it is generally recommended as safer. It will require many static_cast