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 26, 2017, 7:17:41 PM (8 years ago)
- Author:
-
Clarence Wret
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v24
|
v25
|
|
15 | 15 | |
16 | 16 | [=#point_compile] |
17 | | == Compiling NEUT and running neutroot2 == |
| 17 | == Compiling NEUT and generating events == |
18 | 18 | |
19 | 19 | This guide assumes you've got your hand on a copy of NEUT and CERNLIB. To request a copy, please kindly inquire to Hayato-san at `hayato@icrr.u-tokyo.ac.jp`. |
… |
… |
|
23 | 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 | 24 | |
25 | | 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. |
| 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 | 26 | |
27 | | Running the main executable is done by |
| 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: |
28 | 30 | |
29 | 31 | {{{ |
… |
… |
|
83 | 85 | |
84 | 86 | The `EVCT-MPV 3` says the flux is coming from a file, `EVCT-FILENM` specifies the file location of the flux, `EVCT-HISTNM` is the name of the TH1D inside `EVCT-FILENM`, and `EVCT-INMEV` specifies if the input histogram is in MeV or not. |
| 87 | |
| 88 | |
| 89 | = Compiling NUISANCE against NEUT = |
| 90 | Once you have a working NEUT installation and generated events, you can link NUISANCE against NEUT. |
| 91 | |
| 92 | To run NUISANCE with NEUT you'll need to specify the `$NEUT_ROOT`, `$CERNLIB` and `$CERN_LEVEL` variables. |
| 93 | |
| 94 | When building, set the environment variables and specify `-DUSE_NEUT=1` when generating the makefiles with `cmake`. Do: |
| 95 | |
| 96 | {{{ |
| 97 | cd YOUR_NUISANCE_PATH |
| 98 | mkdir -pv build |
| 99 | cd build |
| 100 | cmake ../ -DUSE_NEUT=1 |
| 101 | source $uname/setup.sh |
| 102 | make |
| 103 | make install |
| 104 | make docs |
| 105 | }}} |
| 106 | |
| 107 | For multiple generator support (e.g. NEUT and GENIE enabled), simply set the environment variables for the generators, and compile with |
| 108 | |
| 109 | {{{ |
| 110 | cmake ../ -DUSE_NEUT=1 -DUSE_GENIE=1 |
| 111 | }}} |
| 112 | |
| 113 | instead. |
85 | 114 | |
86 | 115 | |