This will run the <sup>11</sup>Li(d,<sup>3</sup>He)<sup>10</sup>He-><sup>8H</sup>e+n+n simulation and produce a root file located in $NPTOOL/Outputs/Simulation/Example1.root. One can have a look at the Example1.detector, located in $NPTOOL/Inputs/DetectorConfiguration, and Example1.reaction, located in $NPTOOL/Inputs/EventGenerator, to see how the input file are formated. They usually are self explenatory using easy to understand token.
This will simulate the <sup>11</sup>Li(d,<sup>3</sup>He)<sup>10</sup>He-><sup>8H</sup>e+n+n
reaction and produce an output ROOT file located in $NPTOOL/Outputs/Simulation/Example1.root.
The `Example1.detector` file located in $NPTOOL/Inputs/DetectorConfiguration
and the `Example1.reaction` file located in $NPTOOL/Inputs/EventGenerator are
self explanatory thanks to the use of understandable tokens.
You can now try to analyse this simulated tree using the associated NPAnalysis project:
The simulated file can be analysed using the following commands:
````
$ npp Example1
$ cmake ./
$ make -jn
$ npanalysis -R RunToTreat.txt -O Example1
````
Because the input file are written in the simulation file along the SimulatedTree, npanalysis will automatically use those file as inputs. This will produce the analysed tree located in $NPTOOL/Outputs/Analysis/Example1.root. You can then display the result of the simulation using root:
This will produce an analysed tree located in the $NPTOOL/Outputs/Analysis/Example1.root file.
Note that since the input files needed by _npsimulation_ are stored in the
ROOT file, _npanalysis_ use these automatically as inputs.
The results can be displayed using the command:
````
$ root ShowResult.cxx
$ root -l ShowResult.cxx
````
You should be able to see the light particle identification, the light particle kinematical line and the associated excitation energy spectrum fitted by a gaussian.
The Example1 input files and NPAnalysis project are simple basis that can be used to start doing your own simulations.
A few Basics:
npsimulation and npanalysis can be run from any directory. npanalysis look in the current directory for an analysis library to load and use, if none available, it limit hte analysis to building the PhysicsTree.
One can perform quick analysis of the last simulated tree using:
## Tricks
- _npsimulation_ and _npanalysis_ facilities can be run from any directory.
- _npanalysis_ looks in the current directory for an analysis library
(_libNPAnalysis_) to load and use. If not present, the analysis is limited
to build the PhysicsTree.
- To perform a quick analysis of the last MOnte Carlo simulation, do:
````
npanalysis --last-sim
````
Any additional flag can be used
One can run npsimulation in batch mode (with no UI) and provide instead a geant4 macro file to run
- _npsimulation_ can be used in batch mode (with no UI) if the user provides