Skip to content
Snippets Groups Projects
Commit da5c9c59 authored by matta's avatar matta
Browse files

* Quick update of the documentation

parent a3b56d94
No related branches found
No related tags found
No related merge requests found
...@@ -106,7 +106,8 @@ It also help to understand what happen during analysis. ...@@ -106,7 +106,8 @@ It also help to understand what happen during analysis.
\item[InteractionCoordinates] Used in NPS to output the true physical point of interaction in the differents detector \item[InteractionCoordinates] Used in NPS to output the true physical point of interaction in the differents detector
\item[CalibrationManager] This class allowed to manage different file and token and associate them to detector \item[CalibrationManager] This class allowed to manage different file and token and associate them to detector
\item[IORoot] Hold the ROOTInput and ROOTOutput classes that allow an easier used of TTRee in NPS and NPA \item[IORoot] Hold the ROOTInput and ROOTOutput classes that allow an easier used of TTRee in NPS and NPA
\item[Tools] A few usefull classes such as Nuclear Reaction kinematics, Nucleus object and Energy Loss \item[Tools] A few usefull classes used mainly as interface for different part of the code (Option manager and so on)
\item[Physics] A few usefull classes such as Nuclear Reaction kinematics, Nucleus object and Energy Loss
\item[VDetector] Virtual Detector class from wich inherrited all Physics class \item[VDetector] Virtual Detector class from wich inherrited all Physics class
\item[include] All header are copy in this folder during compilation \item[include] All header are copy in this folder during compilation
\item[lib] All libraries are copy in this folder during compilation \item[lib] All libraries are copy in this folder during compilation
...@@ -119,7 +120,7 @@ It also help to understand what happen during analysis. ...@@ -119,7 +120,7 @@ It also help to understand what happen during analysis.
Copy the DummyDetector folder and rename it, let's say, WonderfullDetector. Copy the DummyDetector folder and rename it, let's say, WonderfullDetector.
Enter the directory and rename the TDummyDetectorData.h and .cxx with your detector name, you should have now only three files: Makefile, TWonderfullDetectorData.h and TWonderfullDetectorData.cxx Enter the directory and rename the TDummyDetectorData.h and .cxx with your detector name, you should have now only three files: Makefile, TWonderfullDetectorData.h and TWonderfullDetectorData.cxx
If any other file remain, just remove it. If any other file remain, just remove it.
No open the .h and .cxx file with your favorite editor (gedit or vim for instance). Replace the the DUMMYDetector by your detector name. Just have look in the .h file, the class is very basic, a couple of value are stored in stl vector (allowing smaller tree and increasing speed access). A few methods allowed to set or get those value and to know the size of the different vector. Simply rename, add or remove needed value for your detector and update Set and Get methods as well. Please keep minde that longer and explicit name are better for understanding by other users than short not explicit name. Also note that all the private member named start with letter f (following the ROOT naming convention), followed by a few letter (2 or 3) related to your detector (fMM for MUST2 for instance). This point is of importance for enabling and disabling branches during analysis. It also avoid confusion when using cint to plote histogramm from the tree. No open the .h and .cxx file with your favorite editor . Replace the the DUMMYDetector by your detector name. Just have look in the .h file, the class is very basic, a couple of value are stored in stl vector (allowing smaller tree and increasing speed access). A few methods allowed to set or get those value and to know the size of the different vector. Simply rename, add or remove needed value for your detector and update Set and Get methods as well. Please keep minde that longer and explicit name are better for understanding by other users than short not explicit name. Also note that all the private member named start with letter f (following the ROOT naming convention), followed by a few letter (2 or 3) related to your detector (fMM for MUST2 for instance). This point is of importance for enabling and disabling branches during analysis. It also avoid confusion when using cint to plote histogramm from the tree.
\subsection{step 2: changing detector makefile} \subsection{step 2: changing detector makefile}
Open the GNUMakefile in your detector directoy and edit it so it compile your file and produce a libWonderfullDetectorData.so library. Do not forget to edit the clean and distclean command as well. Open the GNUMakefile in your detector directoy and edit it so it compile your file and produce a libWonderfullDetectorData.so library. Do not forget to edit the clean and distclean command as well.
...@@ -145,12 +146,8 @@ NPS is a build as a modular basis that fit Nuclear Physicist needs: ...@@ -145,12 +146,8 @@ NPS is a build as a modular basis that fit Nuclear Physicist needs:
\item Mange Detectors geometry (Number of module, positionning...) \item Mange Detectors geometry (Number of module, positionning...)
\end{itemize} \end{itemize}
NPTool NPTool
NPS used two input files, one for the EventGenerator, and one for the Detectors Geometry. NPS used two input files, one for the Event Generator, and one for the Detectors Geometry.
Those file are regroup in the \$NPT/Input directory wher you can find the EventGenerator and the DetectorConfiguration folder. Those file are regroup in the \$NPT/Input directory wher you can find the EventGenerator and the DetectorConfiguration folder. If you want to add a new case you just have to create a new file in those directory. Note that files in the input directory are token readable file. It mean that they are not compile with the code, just read at each programm launch. This way you can change the position of your detector or the energy of your beam, for example, without recompile the code. You can also quickly exchange your file with collaborators. Both file are saved in the output tree for further use and information purpose.
If you want to add a new case you just have to create a new file in those directory.
Note that files in the input directory are token readable file. It mean that they are not compile with the code, just read at each programm lauch.
This way you can change the position of your detector or the energy of your beam for example without recompile the code.
You can also quickly exchange your file with collaborators.
\section{ Running a simulation with existing detectors and event generator } \section{ Running a simulation with existing detectors and event generator }
...@@ -160,29 +157,22 @@ If you have add the environment variable correctly you can use the \emph{NPS} sh ...@@ -160,29 +157,22 @@ If you have add the environment variable correctly you can use the \emph{NPS} sh
\begin{verbatim} \begin{verbatim}
[myName@myDomain ~]$ NPS [myName@myDomain ~]$ NPS
[myName@myDomain NPSimulation]$ Simulation myReaction myDetector [myName@myDomain NPSimulation]$ Simulation -E myReaction -D myDetector
\end{verbatim} \end{verbatim}
\emph{NB: order of arguments is essential. Both file need to be in the associated directory (see previous section).} \emph{NB: order of arguments is notessential. Both file can be in the "standard path" (in the corresponding folder inside the Input folder) or can be a path to a file.}
\emph{Simulation} is their a shortcut (or alias) added in the environment variable. You can see all the option using the following commande
In fact Geant4 generate the binari file in the path \$NPS/bin/YourSystem/ where "YourSystem" depend of you compilator and OS (for example \emph{Linux-g++}).
Thats why we use a convinient shortcut.
After typing that command you will have a typical shell output of Geant4 \begin{verbatim}
\begin{verbatim} [myName@myDomain NPSimulation]$ Simulation -h
************************************************************* \end{verbatim}
Geant4 version Name: geant4-09-01-patch-03 (12-September-2008)
Copyright : Geant4 Collaboration \emph{Simulation} is there a shortcut (or alias) added in the environment variable.
Reference : NIM A 506 (2003), 250-303 In fact Geant4 generate the binari file in the path \$NPS/bin/YourSystem/ where "YourSystem" depend on your compilator and OS (for example \emph{Linux-g++}). Thats why we use a convinient shortcut.
WWW : http://cern.ch/geant4
*************************************************************
\end{verbatim}
Followed by the echo of what are in your input file. After typing that command you will have a typical shell output of Geant4 followed by the NPS reading of the input file, check there that the token are well detected and everything correctly instantiate.. The programm should stop on the standard Geant4 prompt. From there, you can use the common geant4 command. You can try to send some particle...
Check their that the token are well detected and everything correctly instantiate.
Then you have some standard Geant4 output again and the idle consol where you can tape any of the common Geant4 command, such as launching a run of 100 event:
\begin{verbatim} \begin{verbatim}
Idle> run/beamOn 100 Idle> run/beamOn 100
\end{verbatim} \end{verbatim}
...@@ -196,8 +186,8 @@ Idle> tracking/verbose 1 ...@@ -196,8 +186,8 @@ Idle> tracking/verbose 1
The simulation will use the configured EventGenerator describe in your input file to generate events. The simulation will use the configured EventGenerator describe in your input file to generate events.
Geant4 will deal with the particle tracking, energy loss, decay,... Geant4 will deal with the particle tracking, energy loss, decay,...
and the NPS framework generate an output ROOT file in the \$NPT/Output/Simulation directory. Default name for this file is mySimul.root. and the NPS framework generate an output ROOT file in the \$NPT/Output/Simulation directory. Default name for this file is myResults.root.
Since the file is regenerated at each execution, one need to rename it in order to keep it. Since the file is regenerated at each execution, one need to rename it in order to keep it, or using the "-O" at the programm launch to change this name.
\section{ Adding a detector to NPS } \section{ Adding a detector to NPS }
...@@ -256,11 +246,11 @@ If not they will remain empty. ...@@ -256,11 +246,11 @@ If not they will remain empty.
bool cMUST2 = false; bool cMUST2 = false;
bool cAddThinSi = false; bool cAddThinSi = false;
bool cGeneralTarget = false; bool cGeneralTarget = false;
bool cGPDTracker = false; // Gaspard Tracker bool cGPDTracker = false;
bool cS1 = false; bool cS1 = false;
bool cPlastic = false; bool cPlastic = false;
bool cDummy = false; bool cDummy = false;
bool cWonderful = false; bool cWonderful = false;
\end{verbatim} \end{verbatim}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment