The Gaspard project is developed within the NPTool framework which is a modular package allowing to perform Geant4 simulations and to analyse the results of the simulations. It is strongly encouraged to read the general NPTool documentation that you can find in this directory.

Concerning the status for Gaspard simulations, the charged particles tracker is now finished and the coupling with the PARIS gamma-ray calorimeter is done. Both the tracker and the calorimeter have different available geomtries.


Specificity of Gaspard

The Gaspard tracker detector, even if it is made of several detectors of different shapes (square, trapezoid, annular, …), is considered as one detector from the NPSimulation point of view. The Gaspard tracker detector is described in the GaspardTracker class defined in the GaspardTracker.{hh,cc} files. Since the Gaspard tracker detector is registered in the file it is available for NPSimulation.

In order to manage the different detector shapes (square, trapezoid, annular, …) of the Gaspard tracker, the GaspardTracker class holds a vector of GaspardTrackerModule objects from which are, and should be, deriving all the different shapes (GaspardTrackerSquare, GaspardTrackerAnnular, GaspardTrackerTrapezoid and GaspardTrackerDummyShape classes).

Running the simulation

To run NPSimulation the following command line should be executed:

   Simulation -E xxx.reaction -D yyy.detector

where xxx.reaction is an input file describing the event generator and yyy.detector is an input file describing the detector geometry. All these input files are based on keywords and can be found in the $NPTool/Inputs subdirectories.

Event Generators

All the different kind of event generator files as well as their respective keywords are described in the general NPTool documentation.

Detector Configurations

The keywords associated to the detector geometry file are different for each detector. In case of the Gaspard tracker detector an example with all the detector shapes available at the moment is given in the following:

Z= -156.5
RMIN= 16
RMAX= 52
VIS= all
X1_Y1= 45.64 34.43 -146.50
X128_Y1= 91.09 79.82 -91.36
X1_Y128= 120.84 8.00 -91.36
X128_Y128= 56.59 8.00 -146.50
VIS= all
X1_Y1= 49.1 66.08 -135.41
X128_Y1= -48.9 66.22 -135.41
X1_Y128= -48.8 135.51 -66.1
X128_Y128= 49.2 135.36 -66.1
VIS= all
PHI= 90
R= 100
BETA= 0 0 0
VIS= all

In order to declare a Gaspard tracker detector in NPSimulation, the key word GaspardTracker should be specified in the geometry file. It should then be followed by other keywords concerning the different detectors present in the tracker. Such keywords available at the moment are:

  • GPDAnnular

  • GPDTrapezoid

  • GPDSquare

  • GPDDummyShape

Each keyword corresponds to a detector shape which have its own set of keywords which is used to position the detector in the world volume and to define the structure of the detector (basically the number of layers of the detector).

To position the detectors two possibilities exist. Either the cartesian coordinates (x,y,z) of each detector’s corner are specified with the keywords X1_Y1, X1_Y128, X128_Y1 and X128_Y128 (case of GPDTrapezoid), either the spherical coordinates of the detector’s center are specified with the keywords R, THETA and PHI (case of GPDDummyShape). While the first solution is very helpful when working with the mechanical engineers, the second solution is useful when investigating new geometries.

In case of GPDAnnular only the position on the z-axis is given through the keyword Z. Other keywords such as RMIN and RMAX are defined but have no effect. This should be changed in the future.

Concerning the structure of the detector, all the detectors have the possibility to have up to three layers of silicon. Each layer can be activated independently using the keywords FIRSTSTAGE, SECONDSTAGE and THIRDSTAGE.

Results of the simulation

The results of the simulation are in the ROOT format and the output file is stored in the $NPTool/Output/Simulation directory. The output ROOT file contains three classes:

  • TInitialConditions: This class records all the information concerning the event generator such as the vertex of interaction, the angles of emitted particles in the center of mass and laboratory frames…

  • TInteractionCoordinates: This class mainly records the cartesian and spherical coordinates of interaction between a particle and a detector.

  • TGaspardTrackerData: This class stores the results of the simulation for the tracker part of the Gaspard detector. Independently of the number and shape of the detectors involved in the geometry, only one class is created for the whole Gaspard tracker detector. For each event the strips number are recorded as well as the energy and time for the layers which are involved in the telescope.

Adding a new detector shape to Gaspard

A special class (GaspardTrackerDummyShape) has been created to show how to define a new module for the Gaspard Tracker. This class describes a simple 5x5 cm$^2$ square telescope made of three layers of silicon which has been used for some preliminary studies of the tracker. So, when considering adding a new module to the Gaspard Tracker, please do not use this class but create your own instead. However, for the explanations the GaspardTrackerDummyShape case will be considered.

When adding a new detector you need to follow several steps:

Definition of an index for the detector

Since the results of the simulation are stored in an unique data class (GaspardTrackerData) dealing with different module types, it is necessary to give an absolute number to each module. This is managed in the GaspardTrackerModule class where there is a map (m_index) which associates a name (the module type identifier) with an integer (the value of the index).

To add a new detector it is just needed to add in the InitializeIndex() method a line such as:

   m_index["DummyShape"] = 1000;

Definition of the geometry and its readout

This is done in the GaspardTrackerDummyShape.{h,cxx} files. Concerning the geometry it is defined in the VolumeMaker() method and the the positioning of the module is done in the ConstructDetector() method.

Concerning the readout of the geometry it is done in the ReadSensitive() method and it is based on the method of the scorers available in G4. The scorers associated to the Gaspard tracker are declared in the InitializeScorers() method.

Definition of the scorers

If the scorers are declared in the InitializeScorers() method they should be defined in the GaspardScorers.{hh,cc} files. All basic scorers to record energy, time of flight and detector number are already implemented so when a new detector is added to Gaspard tracker there is nothing to add from this point of vue. However scorers determining the strip number for the front and back side of the silicon detector’s first stage (if double-sided) should be implemented. In case of the GaspardTrackerDummyShape class this corresponds to the two classes GPDScorerFirstStageFrontStripDummyShape and GPDScorerFirstStageBackStripDummyShape.

Integration in GaspardTracker

In order to make the GaspardTracker detector aware of the GaspardTrackerDummyShape module it has to be registered in the ReadConfiguration() method of the GaspardTracker class. Don’t forget to include the GaspardTrackerDummyShape.hh header in the file. Then, in the GaspardTrackerDummyShape class the keywords used when the geometry file is read should be defined in the ReadConfiguration() method.



A set of general ROOT macros are available in the $NPTool/NPAnalysis/macros directory. You can for example obtain some control plots about the shooting conditions of the random variables. You can also calculate the geometrical efficiency of your setup.

The macros in this directory should be independant of the setup which is simulated. Specific macros to Gaspard tracker should be placed in the $NPTool/NPAnalysis/Gaspard/macros directory.


The main analysis tool for the Gaspard tracker is in the $NPTool/NPAnalysis/Gaspard directory. For the moment the main feature is the reconstruction of the excitation energy.

Running the analysis

To run NPAnalysis the following command line should be executed:

   ./Analysis -E xxx.reaction -D yyy.detector -R RunToTreat.txt

where xxx.reaction is the input file describing the event generator used in NPSimulation and yyy.detector is the input file describing the detector geometry used in NPSimulation. All these input files are based on keywords and can be found in the $NPTool/Inputs subdirectories. The RunToTreat.txt file contains the name of the files (either from NPSimulation or from real experiment) which should be analysed. The name of the tree should also be specified. An example of such a file is given here:

   %       ../../Outputs/Simulation/mySimul.root
   %       ../../Outputs/Simulation/134Snpt_1h9_10MeVA_T1_B1_E0_S05mm.root

Results of the analysis

The results of the anaysis are stored in a ROOT file in the $NPTool/Output/Analysis directory. For the moment the main feature available is the reconstruction of the excitation energy.

Structure of the analysis

The analysis package now deals with Gaspard trackers including different shapes. The main analysis program is the $NPTool/NPAnalysis/Gaspard/src/ file where the user is in charge to code the specific functionalities he is interested in. This includes to treat cases with multiplicity greater than one, calculate the excitation energy, check the effect of beam tracker detector positioning resolution, …

However, all the basic treatments of the analysis are done in $NPTool/NPLib/GASPARD. These basic treatments calculate the total energy deposited in the telescope and associate for each pixel number the cartesian coordinates of the pixel middle.

The structure in $NPLib/GASPARD is very similar to the NPSimulation structure for Gaspard. The GaspardTracker.{h,cxx} class derives from the VDetector class and holds ($i$) the GaspardTrackerData object to be analysed, ($ii$) the GaspardTrackerPhysics object with the results of the basic treatement and ($iii$) a map which associates the detector number read in the geometry file with a pointer to the GaspardTrackerModule class. In this way a Gaspard tracker geometry with any kind of shapes is analyzed correctly. Each available shape (square, trapezoid, annular, dummyshape, …) has its own class GaspardTracker*Shape*.{h,cxx} deriving from the GaspardTrackerModule class. Each class basically applies the same stripping scheme as defined in the simulation in order to obtain the cartesian coordinates of the center of each pixel. Each class have its own treatement method to calculate the total energy deposited in each module.

IMPORTANT NOTE: for the moment, only multiplicity one are considered.