![]() |
MaCh3
2.4.2
Reference Guide
|
Classes responsible for handling samples and parameters. More...
Classes | |
| struct | EventInfo |
| Stores info about each MC event used during reweighting routine. More... | |
| class | SampleHandlerFD |
| Class responsible for handling implementation of samples used in analysis, reweighting and returning LLH. More... | |
| class | ParameterHandlerGeneric |
| Class responsible for handling of systematic error parameters with different types defined in the config. Like spline, normalisation parameters etc. More... | |
| struct | TypeParameterBase |
| Base class storing info for parameters types, helping unify codebase. More... | |
Classes responsible for handling samples and parameters.
The SampleHandler classes are the main interface for storing information about the samples used in analysis. Practically, this involves storing the number of events predicted in each analysis bin for each sample, as well as modifying this for a given set of systematic and oscillation parameter values (i.e., "reweighting" the nominal Monte-Carlo prediction). Therefore, the SampleHandler class also interacts with many other classes in MaCh3, especially the ParameterHandlerGeneric and SplineBase. In turn, the FitterBase class obtains likelihood values by comparing the MC prediction with data in the SampleHandler class.
Each experiment needs to create a SampleHandler experiment class that inherits from the SampleHandlerFD class in the core repository.
The main purpose of any SampleHandler class is to contain all information required to make MC predictions for a given set of systematic parameter values. To achieve this, the SampleHandler object reads information from different input files and keeps track of them in internal data structures. For flexibility in loading various experiment formats, the function SampleHandlerFD::SetupExperimentMC is declared pure virtual.
The SampleHandlerFD class stores MC information using the EventInfo struct. Some variables of EventInfo, such as EventInfo::KinVar, need to refer to experiment-specific structures. This is mostly handled via SampleHandlerFD::GetPointerToKinematicParameter.
Systematic parameters are handled via TypeParameterBase. Note that the actual parameters, including prior values and errors, are defined in ParameterHandlerGeneric. However, their impact on samples is largely implemented in SampleHandlerFD.
NormParameter are Simple parameters that work as normalizations for subsets of events. Events are selected based on kinematic cuts. For example, events with TrueQ2 in the range [0.5, 1.0] can be selected.
Example YAML configuration:
The actual bins are defined when calling SampleHandlerFD::SetupNormParameters, while the actual values of TrueQ2 are returned using SampleHandlerFD::ReturnKinematicParameter.
SplineParameter or response functions are parameters with more complex behavior, often requiring calculations of higher-order polynomials. Several types of interpolation are available via SplineInterpolation. Actual weights are calculated via the Spline class, either in a binned approach via BinnedSplineHandler or event-by-event via SMonolith. Initialization is handled via SampleHandlerFD::SetupSplines.
OscillationParameter are handled via OscillationHandler, which is a wrapper around NuOscillator. This library provides access to a variety of oscillation engines.
FunctionalParameter represent shifts to kinematical variables or other complex responses that are not handled by other parameter types. Shifts are applied via SampleHandlerFD::ApplyShifts (virtual), which can be overridden to implement custom responses. Functional parameters must be registered via SampleHandlerFD::RegisterIndividualFunctionalParameter. This informs MaCh3 which functional parameters are available; the configuration file determines which are actually used.
Most parameters are assumed to have Gaussian or flat priors. However, some require special treatment, mostly for oscillation parameters, though any parameter can be affected. Handled ParameterHandlerBase::SpecialStepProposal
Parameters like delta_CP are defined between -π and +π but can wrap around continuously. Hence are called ParameterHandlerBase::CircularParBounds
Example YAML configuration:
Parameters like delta_M2_32 can ParameterHandlerBase::FlipParameterValue between normal and inverted ordering.
Example YAML configuration: