Skip to content

Releases: mach3-software/MaCh3

v2.6.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 12:01
a74989c

Instruction

C++17

To allow use of new features and make move to more modern versions of ROOT package in the future MaCh3 now requires minimum C++17, while in the past it was C++14.

Renaming

GetParInit->GetParPreFit
cleanMemory-> CleanMemory
setSplinePointers -> SetSplinePointers
ThrowSinlgeParams-> ThrowSingleParams

New way of handling functional parameters

We introduced improved way of defying functional parameters. There are several advantages, but the main one is ability to have shift as result of multiple parameters.
This require changes on experiment specific, for example

RegisterIndividualFunctionalParameter("EResLep",
                            kEResLep, 
                            [this](const M3::float_t* par, std::size_t iEvent) { this->EResLep(par, iEvent); });

Now will look like:

  RegisterIndividualFunctionalParameter(
      TutorialSamples, "EResLep", [](double const &pval, TutorialMCInfo &ev) {
        ev.RecoEnu_shifted += pval * ev.ELep;
      });

main difference it need to pass experiment specific event info here called TutorialSamples.

GetFromManager Syntax

Orignally GetFromManger had syntax

GetFromManager(const YAML::Node& node, const Type defval, const std::string& File, const int Line)

however this didn’t allow to have helpful errors so it was changed to

GetFromManager(const YAML::Node& node, const Type defval, const std::string& File = “”, const int Line = 1)

Default argument were left for backward compatibility, nevertheless in this release we break backward compatibility and default (not helpful) arguments are no longer used.

Wildcards

MaCh3 analysis are becoming increasingly more complex.
Wildcards helps to remove desired parameters from plotting etc more easily.
This add wildcard support to
• LLH Skip vector
• Adaptive Skip
• Process MCMC skip
This means one may need to adjust configs to ensure same results are obtained.

Unified MaCh3 CLI

We plan to move all executables to cli, this means that instead of calling ProcessMCMC one would use mach3 process. For the time being we issued deprecation warning.

What's Changed

Full Changelog: v2.5.1...v2.6.0

v2.5.1

Choose a tag to compare

@github-actions github-actions released this 14 May 19:29
023866c

What's Changed

Full Changelog: v2.5.0...v2.5.1

v2.5.0

Choose a tag to compare

@github-actions github-actions released this 13 Apr 13:17
43c803a

Instruction

Name Changes

We continue changing names of classes, variables etc to better represent what they are emant. Name are often results of legacy choices which often no longer describe tru meaning.

Classes

SampleHandlerBase->SampleHandlerInterface
SampleHandlerFD> SampleHandlerBase
SMonolith->UnbinnedSplineHandler

Variables

MCSamples->MCEvents

Methods

retPointer->RetPointer
GetNsamples->GetNSamples
PrintNominal->PrintPreFitValues
PrintNominalCurrProp->PrintPrefitCurrPropValues

Namespace

M3Utils->M3::Utils

Other

#ifdef DEBUG -> #ifdef MACH3_DEBUG

GPU Spline Hardcoding

In the past in GPU code number of splines was hardcoded on compile time. This is no longer case. Therefore, cmake variable N_Splines is no longer needed

MCEvents struct

Variables like target and mode are used only during setup thus were removed. They are accessed via ReturnKinematicParameter and needed to be added as TargetNucleus.

Fewer Virtual Functions

We reduced number of virtual functions. Now have removed the following:

double ReturnKinematicParameter(std::string KinematicParamter, int iEvent) 
std::vector<double> ReturnKinematicVector(const std::string& KinematicParameter, int iEvent)
const double* GetPointerToKinematicParameter(const std::string& KinematicParameter, int iEvent)

default is now const int for both KinematicParameter and iEvent

Ability to pass multiple files

To allow to pass multiple files it requeiren changing sample config

      mtuplefile: numu_x_numu"

becomes

      mtuplefile: ["numu_x_numu"]

In addition SubSamples has been changed to OscChannels

Const correctness

Several function which are virtual were changed to not take std::vectorstd::string but rather const std::vectorstd::string&. Updating should be easy but this allow to reach safer and faster argument passing.

Initialsie data

We introduced void InitialsieData pure virtual function. In the past only way to add data histogram was via method of AddData, this require to prepare histograms in external tools. Therefore goal of new function is first of all allow loading data from flat root trees (since pure virtual any format will work). Another advantage this enforces data is initialised after SampleHandlerBase constructor.

SampleName

MaCh3 had the ability to apply cuts based on sample name. However, in past, sample name was same as SampleHandler Name. Once we allowed to have multiple samples in one object, cut was being done based on SampleHandlerName.
This isn't sufficient for some more complex analyses.
Now cuts apply based on SamleName (individual). Thus, a new field is required
SampleHandlerName-> Name of object
SampleTitle-> Simply fancy name
SampleName-> Tag used to define by which syst to be affected
By default, if SampleName is not defined code will use SampleHandlerName which should reduce number of changes for people not needing this feature.

What's Changed

Full Changelog: v2.4.2...v2.5.0

v2.4.2

Choose a tag to compare

@github-actions github-actions released this 19 Mar 15:41
63097df

What's Changed

New Contributors

Full Changelog: v2.4.1...v2.4.2

v2.4.1

Choose a tag to compare

@github-actions github-actions released this 13 Feb 04:21
4fc2234

What's Changed

Full Changelog: v2.4.0...v2.4.1

v2.4.0

Choose a tag to compare

@github-actions github-actions released this 04 Feb 11:41
6999047

Instruction

Flexible Binning

This release introduces the ability to use both N-Dimensional binning, previously only worked with 2D, and ability to use non-uniform but rectangular bins.

This requires to modify config used for sample definitions.
Before

  Binning:
    XVarStr : "RecoNeutrinoEnergy"
    XVarBins: [0.,  0.5,  1.,  1.25, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.25, 3.5, 3.75, 4., 5., 6., 10.]
    YVarStr : "TrueQ2"
    YVarBins: [0.,  0.5,  1.,  1.25, 1.5, 1.75, 2., 5]

now

  Binning:
    VarStr : ["RecoNeutrinoEnergy", "TrueQ2"]
    VarBins: [ [0.,  0.5,  1.,  1.25, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.25, 3.5, 3.75, 4., 5., 6., 10.],
               [0.,  0.5,  1.,  1.25, 1.5, 1.75, 2., 5] ]
    Uniform: true

New form has same information (other than whether uniform or not) but allow scaling easily to more dimensions

Chain Format Change

Due to historical reasons, SampleHanlderGeneric parameter in MCMC chain were called xsec_. Due to being increasingly confusing as xsec_ was also naming flux, detector parameters, it was changed to param_. This will sadly break backward compatibility of the reading chain. Therefore, we recommend to either compare processed Chians or use different software versions for plotting chains produce before this change.

Renaming/Capital class naming unification

To have consistent class naming convention, there was minor renaming

manager->Manager
FarDetectorCoreInfoStruct->EventInfo

as well as some minor function rename

SigmaVarFD -> SigmaVar
SigmaVar -> SigmaVarLegacy

GetHist Format

Previously, GetMCHist(sample, dimension) was returning projection for given sample to given dimension. Now it is simply GetHist(sample). The problem was this was impossible to maintain with more than 1diemsnion and even more impossible with non-uniform binning. For getting 1D projection from 2D we already had functionality in Get1DVarHist. Therefore, GetMCHist will return histogram representing currently used MC, while for projection we recommend using Get1DVarHist or Get2DVarHist.

What's Changed

New Contributors

Full Changelog: v2.3.2...v2.4.0

v2.3.2

Choose a tag to compare

@github-actions github-actions released this 16 Jan 17:13
6c10b53

What's Changed

New Contributors

Full Changelog: v2.3.1...v2.3.2

v2.3.1

Choose a tag to compare

@github-actions github-actions released this 12 Dec 16:55
94a0d8c

What's Changed

New Contributors

Full Changelog: v2.3.0...v2.3.1

v2.3.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 04:26
3614967

Instruction

Multiple Samples in one object

The SampleHandlerFD class could store only a single sample. Conceptually, one can think of SampleHandler as a class describing samples for a single detector. Because if we even use the same simulation and have the same inputs, they could be stored in a single object.
This change was motivated by two reasons. First, performance-wise, it is faster to use multiple samples in one object. This allows for obtaining better cache locality, as for example, spline operations are happening at the same time, rather than code jumping between splines for 1 sample, then performing shifts for sample 1 and then spline operation for sample 2 and so on.
Another argument is that having all events in one object means that in the future, MaCh3 could support between-sample migration (right now, only event migration within a single sample).

Config Modification

Now, within SampleHandler config, we have separated settings describing the whole object/detector, like likelihood type, and there are settings for individual samples, like binning or osc channels, etc.
Example can be seen here

High-level interface

This change also requires modification at the executable level.
Previously, one was able to get a histogram using.

Auto Hist1D = SampleHandler->GetMCHist(NDim);

While the new code would look like this

for(int iSample = 0; iSample < SampleHandler->GetNsamples(); iSample ++) {
Auto Hist1D = SampleHandler->GetMCHist(iSample , NDim);
}

Weight Pointers now are set inside the core

MaCh3 uses so-called weight pointers to set pointers to spline weight, oscillation weight, etc. This is done on the setup, which allows during run time to achieve much better performance.
Previously, the SetupWeightPointers function was pure virtual, and it was required from the experiment to implement this. This was because the experiment may want to apply POT scaling or some other correction.
What is new is that now multiple weights, like the aforementioned spline, are set within MaCh3. Hence, SetupWeightPointers is no longer pure virtual. Since we still need to apply special experiment-specific weights, we now have AddAdditionalWeightPointers functions where you can implement your custom weights.

What's Changed

Full Changelog: v2.2.3...v2.3.0

v2.2.3

Choose a tag to compare

@github-actions github-actions released this 14 Oct 13:10
ab59214

What's Changed

New Contributors

Full Changelog: v2.2.2...v2.2.3