Customising the MC Validation

The analysers used by the PostProcessing are defined in

$NA62Analysis/StdConfigs/config_PostProcessing

where $NA62Analysis should be replaced with the actual path to the NA62Analysis subdirectory on your system.
The default set of analysers is:

analyzers = Kmu2Selection K3piSelection DetectorOnOffMonitor NumberOfHitsMonitor MUV3Efficiency RICHElectronRadius RICHMonitor NewCHODEfficiency L0TriggerResponse LevelOnePerformance CedarEfficiency CHANTIMuonEfficiency Ke3Selection LKrEopMonitor SAVEfficiency CHODAlignment CHODEfficiency L0CaloCalibration CHANTIRandomVeto CHANTIRate GigaTrackerDataQualityMonitor GigaTrackerTimeResolution HACDataQualityMonitor MUV12DataQuality SpectrometerDataQualityMonitor K2piSelectionNoSpectrometer Ke3SelectionNoSpectrometer Kmu3SelectionNoSpectrometer SpectrometerEfficiency LKrFineCalibrationAsymm
preanalyzers = SpectrometerTrackCorrections UpstreamPileupGenerator GigaTrackerFineCorrections

The analyzers to be included in the PostProcessing are required to be 2-pass:
  - Step 1: read reconstructed files and produce ROOT files containing a set of histograms (typically over 10 input files)
  - Step 2: read the output from Step 1 and combine the results (over a full run) to produce ROOT and/or PDF files with histograms/plots

There should be no a priori assumptions on the number of input files processed. Statistics should be dynamically accumulated until the required threshold is reached.

Modifying an analyser

Let's say we want to modify the bottom left plot from the first page in K2piSelection.pdf so that the x-axis range is (0, 70) instead of (0, 80). Let us find where this is implemented:

cd $NA62Analysis
grep -r "pion hypothesis vs momentum" Analyzers/*
Analyzers/PhysicsTools/src/K2piSelection.cc:    BookHisto("hPMMiss2Pi", new TH2F("PMMiss2Pi", "Squared missing mass in pion hypothesis vs momentum; Track momentum [GeV/c];M_{miss}^{2}(#pi) [GeV^{2}/c^{4}]", 160, 0, 80, 100, -0.15, 0.15));

So we have to edit the file $NA62Analysis/Analyzers/PhysicsTools/src/K2piSelection.cc.

Recompiling the code

If the analysers list and/or the analysers' implementations are changed, (in a clean shell) the code must be recompiled with

cd $NA62Analysis
source scripts/env.sh
make clean
make -j4 BUILD_STD=1

Now try to repeat the validation Steps 1 and 2 from here but with your own freshly recompiled code. Make sure you run this in a new clean directory.

General Notes

The list of analysers, the plots, and the quality of the analysers have to be improved and extended to be as independent as possible of people's feedback concerning first order checks. MC generated specific checks are currently missing and data specific should be removed or adapted. As second order checks are more specific, more complex checks related to each analysis should be performed by the analysis subgroups.