nuisance is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Changes between Version 25 and Version 26 of HowToNeut


Ignore:
Timestamp:
Feb 27, 2017, 10:20:25 AM (7 years ago)
Author:
Clarence Wret
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToNeut

    v25 v26  
    11= How to generate events with NEUT and feed them to NUISANCE =
    22
    3 This page aims to outline how to use NEUT to create a sample of interactions on your favourite target. We'll also outline how to feed this generated sample through the NUISANCE framework and get good results.
     3This page outlines how to use NEUT to create a sample of interactions on your favourite target. We also outline how to feed this generated sample through the NUISANCE framework and get good results.
    44
    55{{{
     
    1212}}}
    1313
     14
    1415[[PageOutline(1-3,Wiki content,inline,numbered)]]
     16
    1517
    1618[=#point_compile]
     
    2123The main neutrino-nucleus interaction generator lives in `$NEUT_ROOT/src/neutsmpl/neutroot2`, which is the compiled program with source `$NEUT_ROOT/src/neutsmpl/neutroot.F`.
    2224
    23 NEUT has two dependencies: ROOT and CERNLIB. You need to have `$ROOTSYS`, `$CERN` and `$CERN_LEVEL` environment variables set-up to compile NEUT. These should all be specified by the user in `$NEUT_ROOT/src/neutsmpl/EnvMakeneutsmpl.csh`.
    24 
    25 `$ROOTSYS` should be set to your ROOT installation (e.g. sourcing `YOUR_DIR/root/bin/thisroot.sh`). `$CERNLIB` is your CERNLIB installation folder. `$CERN_LEVEL` is the folder inside `$CERNLIB` which you've installed: in my case (2017) the folder is called `2005`, so I set `export CERN_LEVEL=2005`.
    26 
    27 Once the environment variables are set (or included in `EnvMakeneutsmpl.csh`, compilation is done by running `./Makeneutsmpl` in `$NEUT_ROOT/src/neutsmpl/`. This sources the above `EnvMakeneutsmpl.csh`, runs through a host of makefiles, sets up symlinks and builds the project.
    28 
    29 You can now run the main executable by:
    30 
    31 {{{
    32 ./neutroot2 NEUT_CARD_FILE.card OUTPUT_ROOT_FILE.root
     25=== Dependencies ===
     26NEUT has two dependencies: `ROOT` and `CERNLIB`.
     27
     28You need to have `$ROOTSYS`, `$CERN` and `$CERN_LEVEL` environment variables set-up to compile NEUT. These should all be specified by the user in `$NEUT_ROOT/src/neutsmpl/EnvMakeneutsmpl.csh`, or available to the system by
     29
     30{{{
     31export ROOTSYS=/LOCATION/OF/ROOT
     32export CERNLIB=/LOCATION/OF/CERNLIB
     33export CERN_LEVEL=/CERNLIB/VERSION
     34}}}
     35
     36
     37`$ROOTSYS` should be set to your ROOT installation directory(e.g. sourcing `YOUR_DIR/root/bin/thisroot.sh`).
     38
     39`$CERNLIB` is your CERNLIB installation folder.
     40
     41`$CERN_LEVEL` is the folder inside `$CERNLIB` which you've installed: in my case (2017) the folder is called `2005`, so I set `export CERN_LEVEL=2005`.
     42
     43=== Compiling ===
     44Once the environment variables are set, compilation is done by running
     45{{{
     46$ ./Makeneutsmpl
     47}}}
     48
     49in `$NEUT_ROOT/src/neutsmpl/`. This sources the above `EnvMakeneutsmpl.csh`, runs through a host of makefiles, sets up symlinks and builds the project.
     50
     51=== Running the executable ===
     52You can now run the main executable (`neutroot2`) by:
     53
     54{{{
     55$ ./neutroot2 NEUT_CARD_FILE.card OUTPUT_ROOT_FILE.root
    3356}}}
    3457 
    35 where `NEUT_CARD_FILE.card` is a card file compliant with your chosen NEUT version, and `OUTPUT_ROOT_FILE.root` is the ROOT output file where the events are to be saved. This output file contains all the event information and is the input for NUISANCE analyses.
    36 
    37 Examples of NEUT card files can be found in the `$NEUT_ROOT/src/neutsmpl/Cards` directory, or have a look at what team NUISANCE used for 2016 analyses at
     58where `NEUT_CARD_FILE.card` is a card file compliant with your chosen NEUT version, and `OUTPUT_ROOT_FILE.root` is the ROOT output file where the events are to be saved.
     59
     60This output file contains all the event information and is the input for NUISANCE analyses.
     61
     62=== Card-file examples ===
     63Examples of NEUT card files can be found in the `$NEUT_ROOT/src/neutsmpl/Cards` directory.
     64
     65Alternatively, have a look at what team NUISANCE used for 2016 analyses at
    3866[wiki:Winter2016] and at our [https://imperialcollegelondon.app.box.com/files/0/f/13226969736/neut_cards box].
    3967
     
    4169
    4270
    43 == Structure of card files: ==
    44 
    45 NEUT has a load of defaults set on run-time if the user does not supply them, which means you're running with "reference" NEUT.
     71== Structure of card files ==
     72
     73NEUT has a load of defaults set on run-time if the user does not supply them, which means you're running with default NEUT.
    4674
    4775Selecting different models is done in the cardfile, and all the inputs that a user can specify is found in `src/neutcore/necard.F`.
    4876
    49 We can specify how many events we want, the input flux in TH1D format, the incoming neutrino type, the flux file, number of bound protons and neutrons and free protons, what interaction modes, and so on.
    50 
    51 Here's a list for generating all modes on T2K H2O. The "C" at the start of each line is just a comment and will not be parsed by NEUT.
     77The user can specify how many events to generate, the input flux in a `TH1D`, the incoming neutrino type, the flux file, number of bound protons and neutrons and free protons, what interaction modes, and so on.
     78
     79Here's a list for generating all modes on T2K H,,2,,O. The "C" at the start of each line is just a comment and will not be parsed by NEUT.
    5280
    5381
     
    88116
    89117= Compiling NUISANCE against NEUT =
    90 Once you have a working NEUT installation and generated events, you can link NUISANCE against NEUT.
     118Once you have a working NEUT installation and generated events (see [#point_compile above], you can link NUISANCE against NEUT.
    91119
    92120To run NUISANCE with NEUT you'll need to specify the `$NEUT_ROOT`, `$CERNLIB` and `$CERN_LEVEL` variables.