Project

General

Profile

PPFX » History » Version 35

« Previous - Version 35/37 (diff) - Next » - Current version
Leonidas Aliaga Soplin, 04/29/2019 11:13 PM


Getting and building the code

  • The code can be checked out using:
    git clone ssh://p-ppfx@cdcvs.fnal.gov/cvs/projects/ppfx
    
  • Setting. This sets by default root v5_30_00, boost v1_55_0 and some environmental variables.
    source setup.sh
    
  • Compiling. This process creates the PPFX library (lib/libppfx.so), executables programs (stored in the bin directory) and a doxygen page.
    make
    
  • Note: PPFX core uses the environmental variable PPFX_DIR to locate the top directory of two subdirectories (called "data" and "uncertainties") and load them at run time. If you move these subdirectories, be sure to define PPFX_DIR correctly.

Quick example of running the code.

As an example, you can run "doReweight_dk2nu_original". It runs in 3 types:
Using a precalculated detector positions:

bin/doReweight_dk2nu_original [input_file] [output file] [options file] [idet]

Using a user input position:
bin/doReweight_dk2nu_original [input_file] [output file] [options file] [xpos] [ypos] [zpos]

By default, this calculates the flux at MINERvA. The inputs are:
  • [input file] : Some ntuples can be found at /pnfs/numix/flux/g4numi/v6/me000z200i/minervame (The same ntuples are also at /pnfs/nova/data/flux/g4numi/v6).
  • [output file] : will contains histograms of the central value and multi-universes.
  • [option file] : use "scripts/inputs_default.xml" for thin target based correction or "scripts/inputs_mipp_numi.xml" for primary thick target correction.
  • [idet] : index of the precalculated detector (look at the location.name in the dkmeta tree of the g4numi ntuple)
  • [xpos], [ypos], [zpos] : position (cm) respect to the MC NuMI coordinate systema to calculate the flux

You can also calculate the ppfx weight and add it to a friend tree to the input tree. Use the executable "doReweight_dk2nu" (it needs some user modifications).

Looking inside doReweight_dk2nu_original.

Inside the macro "doReweight_dk2nu_original.C" there is a singleton called MakeReweight that handles all classes needed to do the job.

  • Create the instance:
    MakeReweight* makerew = MakeReweight::getInstance();
    
  • Set the option file (scripts/inputs_X.xml, where X = default or mipp_numi):
    makerew->SetOptions(optionsFile);
    
  • Feed them with dk2nu/dkmeta entries:
    makerew->calculateWeights(dk2nu,dkmeta);
    
  • Get the vector of universes per reweighter:
    vwgt_mipp_pi = makerew->GetWeights(ReweighterName);
    The ReweitherNames are:
     -  MIPPNumiPionYields
     -  MIPPNumiKaonYields
     -  TotalAbsorption
     -  TargetAttenuation
     -  ThinTargetpCPion
     -  ThinTargetpCKaon
     -  ThinTargetnCPion 
     -  ThinTargetpCNucleon 
     -  ThinTargetMesonIncident
     -  ThinTargetnucleonA 
     -  Other
    
  • Do not forget release the memory used in the job after PPFX calculates the weights for all flux tuple entries:
    makerew->resetInstance();
    

About GIT

Notes on moving from CVS to Redmine GIT

GIT basics for PPFX

Some Results and Plots

These are some supporting plots for the results we published in Phys. Rev. D 94, 092005 (2016), i.e., NuMI LE beam prediction at MINERvA. These can be used as validation for anyone using PPFX for the first time.

Average number of hadronic Interactions per neutrino energy at MINERvA

Average number of hadronic Interactions per NuMI target material at MINERvA

Average amount of material traversed by the beam particles at NuMI per neutrino at MINERvA

NuMI flux prediction at MINERvA

Hadron production fractional uncertainties at MINERvA

Energy bin to bin correlation for all neutrino types at MINERvA

Muon neutrino and muon antineutrino integrated flux correlation at MINERvA

Resources

  • Neutrino Flux Prediction for the NuMI Beamline (thesis):
    Chapter 4: "Correcting the simulation using hadron production data" describes common definitions, explains in detail the procedure we followed to correct the hadron production, presents a survey of all existing relevant data for NuMI and describes their implementation. Particularly, Section 4.8 is dedicated to introduced PPFX as a computational framework that implements the procedure described in the chapter.
    http://inspirehep.net/record/1465393
    
  • Calculating the NuMI Flux (JETP-Dec2015)
    Another useful source of information is the "Joint Experimental -Theoretical Physics Seminar" talk about "Calculating the NuMI Flux". From slide 42 to the end, the MINERvA strategy and results for calculating the flux based on PPFX are presented.
    http://vms.fnal.gov/asset/detail?recid=1939282
    

Alternative building using cmake

If you do not want to use "make", you can use cmake to build PPFX ( I checked these instructions with the NOvA framework, more general in the future):

  • Setup NOvA framework
  • Get PPFX from the git Redmine repository (see previous section)
  • In order to use cetbuildtools v7_00_03, we need to add the next product area:
    export PRODUCTS=/cvmfs/fermilab.opensciencegrid.org/products/larsoft:$PRODUCTS
    
  • Unsetup all UPS products:
    unsetup_all
    
  • Make a directory for building the code and move there.
  • Source setup:
    source [directory to the source code]/ups/setup_for_development -d
    
  • Run:
    buildtool
    

*You can access the legacy code (CVS):
Legacy code