Reproducing the 2020 joint analysis » History » Version 16
« Previous -
Version 16/17
(diff) -
Next » -
Current version
Alexander Himmel, 11/20/2020 10:13 AM
- Table of contents
- Reproducing the 2020 joint analysis
Reproducing the 2020 joint analysis¶
Introduction¶
Setup¶
Setup the release and check out CAFAna
setup_nova -b maxopt -r R20-04-24-2020ana.a newrel -t R20-04-24-2020ana.a rel_2020ana cd rel_2020ana/ srt_setup -a addpkg_svn -b CAFAna R20-04-24-2020ana-br
More about releases and release branches.
Files¶
The concat files are posted here: https://cdcvs.fnal.gov/redmine/projects/novaart/wiki/Concats_for_2020_3_Flavor_analysis
Making predictions¶
Extrapolated predictions with transverse momentum bins¶
New in the 2020 analysis is the binning of the near-to-far extrapolation in transverse momentum of the final state lepton, Pt (see docdb-44401 for details). The utilities for making the extrapolated predictions with Pt binning are located in CAFAna/3flavor/Ana2020/Systs/syst/. The first step is to use submit_make_predictions_systs_pt_bins.py to submit grid jobs to generate the numu and nue predictions for all systematics groups:
$ python submit_make_predictions_systs_pt_bins.py -h Usage: submit_make_predictions_systs_pt_bins.py [options] Options: -h, --help show this help message and exit --test Test submit_cafana.py command --beam=BEAM Beam: fhc or rhc --numu Make numu extrap predictions --ibin=IBIN Numu pt bin number --nue_signal Make nue extrap signal predictions --nue_bkgd_combo Make nue extrap bkgd combo predictions --nue_bkgd_prop Make nue extrap bkgd prop predictions --nue_nxp Make nue no extrap predictions --drain Submit drain jobs --fake Use fake ND dataThis script uses make_predictions_systs.C with specific options for the Pt binning.
The extrapolated nue signal and background predictions are generated in separate jobs. The reason is that separate prediction generators are used for the nue signal and background extrapolations in order to apply the Pt binning to the signal extrapolation only. For example, to submit jobs to generate the RHC extrapolated nue signal and background predictions run
$ python submit_make_predictions_systs_pt_bins.py --beam rhc --nue_signaland
$ python submit_make_predictions_systs_pt_bins.py --beam rhc --nue_bkgd_propIn the above options, "--nue_bkgd_combo" specifies Michel+BEN background decomposition (FHC) and "--nue_bkgd_prop" specifies proportional background decomposition (RHC).
The no extrapolation far detector predictions are also required for nue. To submit jobs to generate these predictions use the "--nue_nxp" option.
The extrapolated numu predictions in the Pt bins are generated in separate jobs. For example, to submit jobs to generate FHC numu predictions in bin 1 of the 3 total Pt bins run
$ python submit_make_predictions_systs_pt_bins.py --beam fhc --numu --ibin 1and likewise for bins 2 and 3.
Note: The reason the extrapolated numu predictions in the Pt bins are generated in separate jobs is that, at the time the predictions for the 2020 analysis were generated, it wasn't known whether the large number of numu predictions with Pt binning could be merged into a single file via hadd_cafana. It turned out that for up to 3 Pt bins all numu predictions can be merged into a single file. Therefore, in future analyses the extrapolated numu predictions for all Pt bins can be generated in the same jobs for the current number of hadronic energy fraction quantiles (4) and Pt bins (3).
Grid files from jobs submitted with submit_make_predictions_systs_pt_bins.py will be written to
/pnfs/nova/persistent/users/$USER/pt_extrap_2020/predictions/grid_output/
To check for missing grid files from job failures add the "--drain" and "--test" options. For example:
$ python submit_make_predictions_systs_pt_bins.py --beam fhc --nue_bkgd_combo --drain --testTo submit grid jobs to generate missing grid files add the "--drain" option only.
After running grid jobs to make the predictions the grid files must be merged. There are separate scripts for merging the nue and numu files located in CAFAna/3flavor/Ana2020/Systs/syst/. The nue merging script is merge_predictions_systs_pt_bins_nue.py:
$ python merge_predictions_systs_pt_bins_nue.py Usage: merge_predictions_systs_pt_bins_nue.py [options] Options: -h, --help show this help message and exit --test Look for input files but do not merge --merge_grid Merge grid files --merge_syst Merge syst files --beam=BEAM Beam: fhc or rhc --signal Merge nue signal predictions --bkgd_combo Merge nue bkgd combo predictions --bkgd_prop Merge nue bkgd prop predictions --nxp Merge nue bkgd prop predictions --fake Use fake ND dataThe file merging is done in two steps, where the first step merges the grid files for each systematics group. This is done separately for the nue signal, background, and no extrapolation predictions. For example, to merge the grid files for the FHC nue signal predictions run
$ python merge_predictions_systs_pt_bins_nue.py --merge_grid --beam fhc --signalThe second step is to merge the files for all systematics groups for the nue signal, background, and no extrapolation predictions into a single file. This is done by running
$ python merge_predictions_systs_pt_bins_nue.py --merge_syst --beam fhc
The numu merging script is merge_predictions_systs_pt_bins_numu.py:
$ python merge_predictions_systs_pt_bins_numu.py Usage: merge_predictions_systs_pt_bins_numu.py [options] Options: -h, --help show this help message and exit --test Test submit_cafana.py command --beam=BEAM Beam: fhc or rhc --merge_grid Merge grid files --merge_syst Merge syst files --ibin=IBIN Bin number for added extrap var --fake Use fake ND dataThe first step of the numu file merging is to merge the grid files for each systematics group, which is done separately for each Pt bin. To merge the grid files for the FHC numu predictions in Pt bin 1 run
$ python merge_predictions_systs_pt_bins_numu.py --beam fhc --merge_grid --ibin 1The second step is to merge the files for all systematics groups and all Pt bins into a single file. This is done by running
$ python merge_predictions_systs_pt_bins_numu.py --beam fhc --merge_syst
Both the nue and numu merging scripts will write the merged files to
/pnfs/nova/persistent/users/$USER/pt_extrap_2020/predictions/merged_files/Note that merging of the both the nue and numu prediction files will take several hours.
Performing joint fit numu+nue¶
Histograms for fit: nue fhc + nue rhc + 4 numu fhc + 4 numu rhc
Loading rules are codded in CAFAna/3flavor/Ana2020/joint_fit_2020_loader_tools.h
Input location: /cvmfs/nova.osgstorage.org/analysis/3flavor/Predictions and /nova/ana/3flavor/Ana2020/Predictions/ (duplicate folder)
The general procedure is described in the fit and sensitivity TN
- 3FlavorAna/Ana2020/FitandFC/run_joint_fit_2020_bestfit.C
- 3FlavorAna/Ana2020/FitandFC/run_joint_fit_2020_contours.C
- 3FlavorAna/Ana2020/FitandFC/run_joint_fit_2020_slices.C
- 3FlavorAna/Ana2020/FitandFC/plot_joint_fit_2020_contours.C
- 3FlavorAna/Ana2020/FitandFC/plot_joint_fit_2020_slices.C