SctParSim (python)

From Charm-Tau Detector
Jump to: navigation, search

Contents

SctParSim (Python)

This version of the parametric simulation had written in the Python language. The main difference is that this version has the ability to draw events

How to run

Login to stark or proxima machine.

ssh stark -X
setupSCTAU; asetup Aurora,0.2.3
mkdir workarea
cd workarea
mkdir run
cd run
cp /home/razuvaev/public/misc/pi_ms_f1_mppc2_px3_d200_mla4_graph2d.root .
cp /home/razuvaev/public/misc/gun1.cfg .
cp /home/razuvaev/public/misc/g4beamline_pi_plus_100k_parse.root .
cp /home/razuvaev/public/misc/g4beamline_mu_plus_100k_parse.root .
cp /home/whitem/public/misc/pi_p.root .
cp /home/whitem/public/misc/pi_m.root .
cp /home/whitem/public/misc/mu_p.root .
cp /home/whitem/public/misc/mu_m.root .
runparsim.py

Options

Option Run example Description
-b, --batch runparsim.py -b Turn on the batch mode. Suppress EventDisplay execution.
-c, --change runparsim.py -c my_cfg_file.dat Change some parameters of the detector.
-n, --neve runparsim.py -n 31415 The number of events to process.
-g, --gun runparsim.py -g Turn on the particle gun mode.
-ig, --input-gun runparsim.py -g -ig my_gun.dat Input particle gun configuration file.
-i, --input runparsim.py -i gen_dkpipi0.root Specify the input file.
-o, --output runparsim.py -o parsim_dkpipi0.root Specify the output file.
--profile runparsim.py --profile Turn on the cProfile to analyse the performance.

Event display

The event display has two projections: x-y and y-z. All detector subsystems are presented. Some of them overlay, especially PIDs, it is not important for parametric simulation, but let's study several options at once. All particles from AllGenParticles branch are presented at the plot by lines of different styles, colours and thicknesses. Somehow the line thickness corresponds to the particle mass, the wide line --- the more massive particle. Warm colours are devoted to positive charged particles and cold to negative ones. Also, particle lines are labeled.

The event display is switched on by default. To switch it off run simulation with -b option.


Detector configuration

The detector parameters can be changed via a configuration file my_cfg_file.dat placed in the main simulation folder. The file has a simple structure --- one parameter and its value(s) per line. A parameter's name and value should be separated by spaces. Arrays should be written in [] brackets. The values in arrays should be separated by commas. Empty lines and lines contained incorrectly parameter names are ignored.

In the example below the parameter at the first line and the second line is one number, while the parameter at the third line is an array.

trck.minPt 0.05
trck.corrMtx.pij -0.08
calo.resPar [0.167,0.0,0.011]

The parameters can be given in any order.

All detector parameters can be viewed in the configuration files:

Subsystem Congiguration file Name to change parameters
ASHIPH ashiphpars_std01.json ashiph1030
Calorimeter calopars_std01.json calo
FARICH farichpars_std01.json farich
FDIRC fdircpars_std01.json fdirc
Muon system muonpars_std01.json muon
ToF tofpars_std01.json tof
ToP toppars_std01.json top
Tracker trkpars_std01.json tracker

The detector subsystems sizes are stored in detlayout_std01.json. They can be changed in the same way.

Particle gun

Examples

Pictures

Personal tools