-
Notifications
You must be signed in to change notification settings - Fork 4
Home
SourceSim is a program to simulate electrons and gammas from a radioactive source (e.g. SR-90, Am-241) interacting with pixel sensors. Shielding and triggering can be simulated and the setup (e.g. geometry, materials) can be easily changed. The current version does support only a very simple simple digitization!
The program is described in the following. GEANT4 related informations are given in brackets. To understand how a GEANT4 simulation works and howto install GEANT4 please use the sources given here.
A GEANT4 installation is needed and it is recommend to use a Linux/Unix system since multi-threading is not supported with Windows. If you do not know how to compile and start SourceSim you can check the GEANT4 examples.
The experimental setup (G4VUserDetectorConstruction) consist of the following objects:
-
Experimental world: The experimental world defines where the experiment takes place. The standard parameter describe a room filled with air (G4_AIR) with a size of x/y/z = 10/10/20 cm. One can interactively change the experimental world (DetectorMessenger::G4UImessenger). The commands are:
- /setup/world/material variable: Set the world material. Vaccum is called Galactic.
- /setup/world/xy variable unit: Set the xy dimension.
- /setup/world/z variable unit: Set the z dimension.
-
Particle source: The particle source creates the primary particles that interact with the sensor. The particle source is done by using the Geant4 General Particle Source.. Two scripts (beam.mac, Source.mac) setup the GPS, to create a 3.2 GeV/c electron beam or electrons from Sr-90. One can change these macros to change the particle source or interactively change the GPS (e.g. /gps/energy 500 keV).
-
Source Shield: The source shield is placed between the source and the sensor. The standard parameter describe plate of stainless steel (G4_STAINLESS-STEEL) with x/y/z = 30/30/1 mm. The interactive commands are:
- /setup/sourceshield/enable variable: Disables the source shield if variable = 0.
- /setup/sourceshield/material variable unit: Set the material.
- /setup/sourceshield/xy variable unit: Set the x, y dimension.
- /setup/sourceshield/thickness variable unit: Set the z dimension.
- /setup/sourceshield/pos variable unit: Set the position as a x y z vector (e.g. 2 3 4 cm).
-
Collimator: The source collimator is placed between the source and the sensor and consists of two cylinders. The standard parameters describe a collimator consisting of a brass cylinder (r = 1 .. 2.5 cm) filled with a plexiglass cylinder (r = 0.005 .. 1 cm). The interactive commands are:
- /setup/collimator/enable variable: Disables the collimator if variable = 0.
- /setup/sourceshield/materialinner variable unit: Set the material of the inner cylinder.
- /setup/sourceshield/materialouter variable unit: Set the material of the outer cylinder.
- /setup/sourceshield/radiusinner variable unit: Set the innermost radius.
- /setup/sourceshield/radiusmiddle variable unit: Set the radius in the middle. That is the outer radius of the inner cylinder and the inner radius of the outer cylinder.
- /setup/sourceshield/radiusouter variable unit: Set the radiusouter radius.
- /setup/sourceshield/thickness variable unit: Set the thickness.
- /setup/sourceshield/pos variable unit: Set the position as a x y z vector (e.g. 2 3 4 cm).
-
Sensor: The sensor is like the source shield but cannot be deactivated. The commands start with /setup/sensor/. Rotation is also possible with /setup/sensor/rot variable. Standard parameter create a 2x2 cm silicon sensore of 200 um thickness.
-
Trigger: See source shield. The commands start with /setup/trigger/.
-
Shield: See source shield. The commands start with /setup/shield/. The standard material is lead.
During a simulation different histograms are filled with data. These histograms are:
- Primary Energy Distribution (index 0)
- Primary x Distribution (index 1)
- Primary y Distribution
- Secondary electrons energy distribution (e.g. ion decay)
- Secondary photons energy distribution
- Shield particle energy distribution (before)
- Shield particle energy distribution (after)
- Sensor energy deposit
- Sensor track length
- Sensor track In angle
- Sensor track Out angle
- Sensor energy deposit (triggered)
- Sensor dE/dx
One can change the range and number of bins with commands like: /analysis/h1/set 0 500 0 5 GeV. This example changes the histogram with index 0 (energy distribution of primary particle) to have 500 bins from 0 to 5 GeV.
- Macro mode You can just run a macro defining your setup with
./SourceSim -m macro -t 8
Where macro is the macro name and the option -t 8 sets the number of parallel threads to safe time.
-
Interactive interface mode
- Start SourceSim
./SourceSim- Setup the interface by typing into the command line of SourceSim (Session prompt)
/control/execute vis.mac /control/execute gui.mac- Now you can change the physic used and change the setup according to your needs
- Press Run->Init
- Now you can start a run with: Run->1e4 events or start a script.