How to Run LOAF¶
- Check out the Fast MC as described on https://cdcvs.fnal.gov/redmine/projects/lbne-beamsim/wiki
- Go to the LOAF subdirectory directory
$ cd trunk/LOAF
- Build LOAF:
- Make inputs (see below), or copy them from Dan's direcotry:
cp /dune/data/users/lblpwg_tools/FastMC_Data/globes_files/cherdack/Globes_Inputs/* /dune/data/users/lblpwg_tools/FastMC_Data/globes_files/<username>/Globes_Inputs/
- Make your output directory (if not running in batch mode, in which case this is done automatically):
mkdir -p /dune/data/users/lblpwg_tools/FastMC_Data/globes_files/ljf26/Globes_Output/<configuration_name>/
- Run LOAF.
./Analysis_tools --config <configuration_name> --deltaCP <delta_CP> --mh <IH or NH> --outfile <outputfile>
The first argument is a configuration name, for example CDR_BASE_FullFD. Look in FastMC_GlobesParams.xml to see the available configurations, or add new ones. The configuration names appear between quotation marks on lines such as: <param_set name="Default">. The second argument is the true value of delta_CP in radians. The third argunment is the true mass hierarchy. The final argument is the name of a text output file that will be created. There is also an optional parameter --matrix </full/path/to/covariance/matrix/file.root> where you can provide a covariance matrix. If you do this, the matrix specified in the configuration file will be ignored. The file you point to must be in the correct format, but once you figure out how to make files in the right format you can make lots of them and not have to make lots of configuration files.
- The output text file is a series of numbers. The identity of the numbers is given in:
That directory also has an image file comparing far detector energy spectra Markov data and Monte Carlo assuming delta_CP = 0 (this means the data and Monte Carlo will not match unless you have specified the true value of delta_CP to be zero.
- Run on the grid using:
It will look for a file called dcp_list.dat. Each line of this file should contain a value of deltaCP. The script will submit a job for NH and IH, so the total number of jobs will be twice the number of lines. It will run an exclusion of deltaCP = 0 and deltaCP = pi for each one. The script that is called on the grid node is RunNumFitter.sh.
Plotting results¶After you've run a bunch of fits for different values of delta_CP on the grid, you can plot the sensitivity versus delta_CP as follows:
- Extract relevant information from the different output text files, from the LOAF FastMC subdirectory:
This creates a new file (/dune/data/users/lblpwg_tools/FastMC_Data/globes_files/<username>/Globes_Output/<configuration_name>/NumFit_Chisq_trueDCP_<configuration_name>.dat. Make plots using:
root -q -b MakeMcDPlot_NumFit.C\(\"<configuration_name>\"\)
- A bunch of other plots can be made with MakeCDRplots.C, which you should use RunMakeCDRplots.C to run.
This is how you make the inputs to LOAF. It can take some time, mostly for the systematic response function, but you don't need to do it every time. You can change the flux without remaking the inputs by reweighting. Whatever flux was used to make the inputs needs to match the version in the configuration file config/FastMC_GlobesParams.xml.
Go to the FullMCProcessing/ dir and run the MakeLOAFInputs.C script with option "nue" and "numu".
$ cd FullMCProcessing $ root -l -q -b MakeLOAFInputs.C\(\"nue\"\) $ root -l -q -b MakeLOAFInputs.C\(\"numu\"\)
NOTE: The forward slashes are escape characters required if you want to do it from the command line, otherwise you can open root and use .L. Then run the scripts run_dis.sh and run_app.sh:
You can edit the script to alter a few things:
1) The input file paths. This script uses MVAselection trees, and there is a new version for each FD sim/reco run. You will want to point to the latest version. If you change inputs make sure that the fiducial mass and POT/year are unchanged.
2) The output file path. As of right now this is LOAF_Inputs2, a sub dir in FullMCProcessing, but can be changed to the final destination in $GLB_INPUTS, or wherever you like.
3) The list of systematics that you use. The systematics weights need to either be variables in the inputs MVASelection trees, or weights that you code up in the script. See the GetWeight function for examples.
This will take a long time. It will the created files LOAF_Inputs2. LOAF_Inputs2 needs to be copied to the Globes inputs area to run, which is /dune/data/users/lblpwg_tools/FastMC_Data/globes_files/$USER/Globes_Inputs