Parametric simulation

From Charm-Tau Detector
(Difference between revisions)
Jump to: navigation, search
(Event display)
(Talks)
 
(46 intermediate revisions by one user not shown)
Line 1: Line 1:
The new parametric simulation package is described [[SctParSim Package|here]].
 
 
==Talks==
 
==Talks==
  
* Software meeting 2018-06-29, Friday, [[File:sctau_papas_v2_20180629.pdf]]
+
* Software meeting 2018-06-29, Friday, [[File:sctau_papas_v2_20180629.pdf]] by '''Georgiy Razuvaev'''
 +
* Software meeting 2019-02-01 [[:Media:Sctau_papas_v3_20190201.pdf | Status of PAPAS]] by '''Georgiy Razuvaev'''
 +
* Software meeting 2019-08-09 [[:Media:Sctparsim_20190809.pdf | Super c-τ parametric simulation: Status]] by '''Georgiy Razuvaev'''
 +
* Software meeting 2019-12-27 [[:Media:SctParSim_status_20191127_Belozyorova.pdf | SctParSim: status and recent progress]] by '''Maria Belozyorova'''
 +
* Workshop on future Super c-tau factories 2021-11-16 [https://indico.inp.nsk.su/event/62/contributions/2315/ Parametric simulation of the SCT detector] by '''Maria Belozyorova'''
  
 +
= SctParSim (Aurora) =
 +
A parametric simulation is a tool to receive a detector response without detailed description of interaction of particles with matter. The simulation is the part of the Aurora project, which is a software suit for SCTF.
  
==SctParSim (Current)==
+
Implemented detector subsystems:
 +
* drift chamber
 +
* FARICH PID system
 +
* calorimeter
 +
* muon system
  
===How to run===
+
The parametric simulation yields the detector response in the SCT EDM format thus allowing to analyze its result in the same manner as the result of the full simulation. The tracker and the calorimeter smear particle parameters according
 +
to a Gaussian distribution, while the FARICH PID and the muon subsystem use for that purpose the results of a pre-conducted standalone full Geant4 simulations.
  
Login to stark or proxima machine.
+
'''More information about parameterization''' is presented [[SctParSim (Aurora)|here]].
<pre>
+
ssh stark -X
+
setupSCTAU; asetup SCTauSim,master,latest
+
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/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
+
</pre>
+
  
==Event display==
+
'''How-to use the parametric simulation''' is demonstrated [https://ctd.inp.nsk.su/wiki/index.php/SCT_parametric_simulation here]
  
The event display has two projections: x-y and y-z.
+
= SctParSim (Python) =
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 style, colour and thickness.
+
Somehow the line thickness is 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 <code>-b</code> option.
+
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.  
  
==PAPAS (Old)==
+
'''How to run and parameter description''' is [[SctParSim (python)|here]]
  
===About papas, heppy et cetra===
+
= PAPAS (Old) =
  
Particle propagation is done by geometry calculation.
+
More details are [[SctparSim (PAPAS)|here]]
To valid the calculation several different cases were plotted.
+
 
+
[[File:Tof_test_9k.png|thumb|center|alt=Helix.|Helix.]]
+
 
+
 
+
===Configure detector parameters===
+
 
+
The detector parameters can be changed via the a configuration file ''CTauPapas.cfg'' placed in the main papas simulation folder.
+
The file has a simple structure --- one parameter and its value(s) per line.
+
A parameter's name and value(s) should be separated by spaces.
+
Empty lines and lines beginning with # are ignored.
+
 
+
In the example below the parameter at the first line is one number,
+
while the parameter at the second line is an array.
+
 
+
<code>
+
ecal_emin_barrel 0.05
+
 
+
ecal_eres 1.34e-2 0.066e-2 0 0.82e-2
+
</code>
+
 
+
The parameters can be given in any order.
+
 
+
 
+
===Configure detector parameters===
+
 
+
The file ''ctau_input_sim.txt'' contains two lines.
+
The first line is the path to a primary simulation file (see [[MC_Data_Sets|MC Data Sets]] page).
+
The second line is an integer number of events to be processed.
+
 
+
 
+
===How to run papas===
+
 
+
Copy a directory with papas on stark the machine and go to this directory.
+
 
+
<code>
+
cd
+
 
+
cp -rf ~razuvaev/myheppy .
+
 
+
cd myheppy
+
</code>
+
 
+
There are a directory ''output'' for output files,
+
detector configuration file ''CTauPapas.cfg'',
+
file ''ctau_input_sim.txt'' with a path to the file with primary generator events,
+
and the folder ''heppy'' with heppy code itself.
+
Let's go into it and tune environment.
+
 
+
<code>
+
cd heppy
+
 
+
source init.sh
+
</code>
+
 
+
Now it is time to run papas.
+
You may be asked a question because the output directory is not empty.
+
So just input <code>y</code> or clean the folder.
+
 
+
<code>
+
cd test
+
 
+
./heppy_loop.py ../../output/ ctau_cfg1.py
+
</code>
+
 
+
If it don't want to run try <code>source ~razuvaev/.bashrc</code> and <code>source ../init.sh</code> because it can be caused by the problem with environment variables.
+
 
+
When papas simulation has been done one need to present papas output to a suitable form and also add initial generator information.
+
 
+
<code>
+
cd ../../
+
 
+
./txt2tree.py
+
</code>
+
 
+
The output root tree is available in the file ''myheppy/output/txt2tree.root''.
+
 
+
===Output tree===
+
 
+
The output tree contains branches which can be divided in several groups:
+
* reconstructed particle parameters;
+
* generated particle parameters;
+
* generated vertices;
+
* connection between reconstructed particles, generated particles and generated vertices.
+
 
+
The table below presents branches and description of their content.
+
{| class="wikitable"
+
|-
+
! Name
+
! Type
+
! Length
+
! Description
+
|-
+
| colspan="4" style="text-align: center;" | Reconstructed particles
+
|-
+
| n
+
| int
+
| 1
+
| The number of reconstructed particles.
+
|-
+
| px
+
| float []
+
| n
+
| The reconstructed particle momentum: x coordinate.
+
|-
+
| py
+
| float []
+
| n
+
| The reconstructed particle momentum: y coordinate.
+
|-
+
| pz
+
| float []
+
| n
+
| The reconstructed particle momentum: z coordinate.
+
|-
+
| colspan="4" style="text-align: center;" | Generated particles
+
|-
+
| n0
+
| int
+
| 1
+
| The number of generated particles.
+
|-
+
| px0
+
| float []
+
| n0
+
| The generated particle momentum: x coordinate.
+
|-
+
| py0
+
| float []
+
| n0
+
| The generated particle momentum: y coordinate.
+
|-
+
| pz0
+
| float []
+
| n0
+
| The generated particle momentum: z coordinate.
+
|-
+
| colspan="4" style="text-align: center;" | Generated vertices
+
|-
+
| nv0
+
| int
+
| 1
+
| The number of generated vertices.
+
|-
+
| vx0
+
| float []
+
| nv0
+
| The generated vertex: x coordinate.
+
|-
+
| vy0
+
| float []
+
| nv0
+
| The generated vertex: y coordinate.
+
|-
+
| vz0
+
| float []
+
| nv0
+
| The generated vertex: z coordinate.
+
|-
+
| colspan="4" style="text-align: center;" | Links
+
|-
+
| recgen
+
| int []
+
| n
+
| Transform a reconstructed particle index to the generated particle index.
+
|-
+
| genver
+
| int []
+
| n0
+
| Transform a generated particle index to the generated vertex index.
+
|}
+
 
+
===Analysis example===
+
 
+
Here a short analysis example of
+
<math>D^0 \to K_S^0 \pi^+ \pi^-</math>
+
is presented.
+
The things are performed with PyROOT.
+
 
+
The data a taken from the available
+
[[MC_Data_Sets#Exclusive_samples|exclusive sample]].
+
 
+
The code can be taken from github
+
[https://github.com/lbrl/sctau_py/blob/master/search_dkspipi.py]
+
or find at the stark cluster:
+
''/home/razuvaev/myheppy/search_dkspipi.py''.
+
 
+
<gallery>
+
File:Dkspipi_mksmd0.png|alt=mksmd0.|<math>K_S^0</math> mass vs <math>D^0</math> mass.
+
File:Dkspipi_md0pd0.png|alt=md0pd0.|<math>D^0</math> mass vs its momentum.
+
</gallery>
+

Latest revision as of 15:03, 24 November 2021

Contents

[edit] Talks

[edit] SctParSim (Aurora)

A parametric simulation is a tool to receive a detector response without detailed description of interaction of particles with matter. The simulation is the part of the Aurora project, which is a software suit for SCTF.

Implemented detector subsystems:

  • drift chamber
  • FARICH PID system
  • calorimeter
  • muon system

The parametric simulation yields the detector response in the SCT EDM format thus allowing to analyze its result in the same manner as the result of the full simulation. The tracker and the calorimeter smear particle parameters according to a Gaussian distribution, while the FARICH PID and the muon subsystem use for that purpose the results of a pre-conducted standalone full Geant4 simulations.

More information about parameterization is presented here.

How-to use the parametric simulation is demonstrated here

[edit] 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 and parameter description is here

[edit] PAPAS (Old)

More details are here

Personal tools