|
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.
- Timestamp:
-
Feb 27, 2017, 10:20:25 AM (8 years ago)
- Author:
-
Clarence Wret
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v25
|
v26
|
|
1 | 1 | = How to generate events with NEUT and feed them to NUISANCE = |
2 | 2 | |
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. |
| 3 | This 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. |
4 | 4 | |
5 | 5 | {{{ |
… |
… |
|
12 | 12 | }}} |
13 | 13 | |
| 14 | |
14 | 15 | [[PageOutline(1-3,Wiki content,inline,numbered)]] |
| 16 | |
15 | 17 | |
16 | 18 | [=#point_compile] |
… |
… |
|
21 | 23 | The 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`. |
22 | 24 | |
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 === |
| 26 | NEUT has two dependencies: `ROOT` and `CERNLIB`. |
| 27 | |
| 28 | 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`, or available to the system by |
| 29 | |
| 30 | {{{ |
| 31 | export ROOTSYS=/LOCATION/OF/ROOT |
| 32 | export CERNLIB=/LOCATION/OF/CERNLIB |
| 33 | export 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 === |
| 44 | Once the environment variables are set, compilation is done by running |
| 45 | {{{ |
| 46 | $ ./Makeneutsmpl |
| 47 | }}} |
| 48 | |
| 49 | in `$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 === |
| 52 | You can now run the main executable (`neutroot2`) by: |
| 53 | |
| 54 | {{{ |
| 55 | $ ./neutroot2 NEUT_CARD_FILE.card OUTPUT_ROOT_FILE.root |
33 | 56 | }}} |
34 | 57 | |
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 |
| 58 | 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. |
| 59 | |
| 60 | This output file contains all the event information and is the input for NUISANCE analyses. |
| 61 | |
| 62 | === Card-file examples === |
| 63 | Examples of NEUT card files can be found in the `$NEUT_ROOT/src/neutsmpl/Cards` directory. |
| 64 | |
| 65 | Alternatively, have a look at what team NUISANCE used for 2016 analyses at |
38 | 66 | [wiki:Winter2016] and at our [https://imperialcollegelondon.app.box.com/files/0/f/13226969736/neut_cards box]. |
39 | 67 | |
… |
… |
|
41 | 69 | |
42 | 70 | |
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 | |
| 73 | NEUT has a load of defaults set on run-time if the user does not supply them, which means you're running with default NEUT. |
46 | 74 | |
47 | 75 | Selecting different models is done in the cardfile, and all the inputs that a user can specify is found in `src/neutcore/necard.F`. |
48 | 76 | |
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. |
| 77 | The 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 | |
| 79 | Here'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. |
52 | 80 | |
53 | 81 | |
… |
… |
|
88 | 116 | |
89 | 117 | = Compiling NUISANCE against NEUT = |
90 | | Once you have a working NEUT installation and generated events, you can link NUISANCE against NEUT. |
| 118 | Once you have a working NEUT installation and generated events (see [#point_compile above], you can link NUISANCE against NEUT. |
91 | 119 | |
92 | 120 | To run NUISANCE with NEUT you'll need to specify the `$NEUT_ROOT`, `$CERNLIB` and `$CERN_LEVEL` variables. |
|