@@ -17,7 +17,7 @@ Alternatively you can browse the following page https://github.com/adrien-matta/
#Setup
###Requirements
In order to compile the core libraries NPLib, you will need ROOT 6 or 5 (tested with 5.34) to be installed with the libMathMore.so library. This is sufficient to compile NPLib and any analysis project. In order to compile NPSimulation, you will need a recent installation of Geant4 (tesetd with version 9.6 and 10.1).
In order to compile the core libraries NPLib, you will need cmake, ROOT 6 or 5 (tested with 5.34) to be installed with the libMathMore.so library. This is sufficient to compile NPLib and any analysis project. In order to compile NPSimulation, you will need a recent installation of Geant4 (tested with version 9.6 and 10.1). If you want GDML support you need to install Geant4 with GDML support.
###Building NPLib
NPLib is the core of the NPTool package, holding most of the actual code. It is made of a collection of stand alone C++ classes that can be used in programs and macro. The first step is to define the variable of environment that the system needs. For this open your .profile / .bashrc / .tcshrc file in your home directory and add the following line:
...
...
@@ -29,12 +29,13 @@ Restart your terminal. You should now have all aliases and environment variable
$ npl
````
and you should be in the NPLib directory.
Before the compilation of the libraries you need to specify the detector you plan to use by calling the configure script. If you give no argument to configure, all detector will be compile. If you wish to limit the number of detector to be compiled, simply specify the detector folder name (respecting the case). You can specify more than one detector:
Before the compilation of the libraries you need to run cmake to generate the Makefile. If you give no argument to cmake, all detector will be compile. If you wish to limit the number of detector to be compiled, simply specify the detector folder name (respecting the case). You can specify more than one detector:
All detector compiled:
````
$ cmake ./
````
OR:
OR Some detector compiled:
````
$ cmake ./ -DETLIST="DetFolder1 DetFolder2"
````
...
...
@@ -48,7 +49,7 @@ $ make -jn install
If you wish to recompile with more detector:
````
$ rm CMakeCache.txt
$ nptool-cleaner
$ cmake ./ -DETLIST="DetFolder1 DetFolder2 ..."
$ make -jn install
````
...
...
@@ -59,7 +60,7 @@ $ cmake -GNinja ./
$ ninja install
````
Compilation using Ninja is usually twice faster than using make
Compilation using Ninja is faster than using make.
###Building NPSimulation
This part of the package rely on Geant4 to perform Monte Carlo simulation. You need to first compile and configure correctly NPLib in order for NPSimulation to compile and run. The compilation is done as follow:
...
...
@@ -94,7 +95,6 @@ $ 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:
````
$ root ShowResult.C
...
...
@@ -104,3 +104,16 @@ You should be able to see the light particle identification, the light particle
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:
````
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