<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://ctd.inp.nsk.su/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://ctd.inp.nsk.su/wiki/index.php?action=history&amp;feed=atom&amp;title=SctparSim_%28PAPAS%29</id>
		<title>SctparSim (PAPAS) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://ctd.inp.nsk.su/wiki/index.php?action=history&amp;feed=atom&amp;title=SctparSim_%28PAPAS%29"/>
		<link rel="alternate" type="text/html" href="https://ctd.inp.nsk.su/wiki/index.php?title=SctparSim_(PAPAS)&amp;action=history"/>
		<updated>2026-04-25T15:59:11Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.24</generator>

	<entry>
		<id>https://ctd.inp.nsk.su/wiki/index.php?title=SctparSim_(PAPAS)&amp;diff=1301&amp;oldid=prev</id>
		<title>Razuvaev: Created page with &quot;== About papas, heppy et cetra ==  Particle propagation is done by geometry calculation. To valid the calculation several different cases were plotted.  [[File:Tof_test_9k.png...&quot;</title>
		<link rel="alternate" type="text/html" href="https://ctd.inp.nsk.su/wiki/index.php?title=SctparSim_(PAPAS)&amp;diff=1301&amp;oldid=prev"/>
				<updated>2021-11-23T14:51:12Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== About papas, heppy et cetra ==  Particle propagation is done by geometry calculation. To valid the calculation several different cases were plotted.  [[File:Tof_test_9k.png...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== About papas, heppy et cetra ==&lt;br /&gt;
&lt;br /&gt;
Particle propagation is done by geometry calculation.&lt;br /&gt;
To valid the calculation several different cases were plotted.&lt;br /&gt;
&lt;br /&gt;
[[File:Tof_test_9k.png|thumb|center|alt=Helix.|Helix.]]&lt;br /&gt;
&lt;br /&gt;
== Configure detector parameters ==&lt;br /&gt;
&lt;br /&gt;
The detector parameters can be changed via a configuration file ''CTauPapas.cfg'' placed in the main papas simulation folder.&lt;br /&gt;
The file has a simple structure --- one parameter and its value(s) per line.&lt;br /&gt;
A parameter's name and value(s) should be separated by spaces.&lt;br /&gt;
Empty lines and lines beginning with # are ignored.&lt;br /&gt;
&lt;br /&gt;
In the example below the parameter at the first line is one number,&lt;br /&gt;
while the parameter at the second line is an array.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ecal_emin_barrel 0.05&lt;br /&gt;
&lt;br /&gt;
ecal_eres 1.34e-2 0.066e-2 0 0.82e-2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The parameters can be given in any order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configure detector parameters ==&lt;br /&gt;
&lt;br /&gt;
The file ''ctau_input_sim.txt'' contains two lines.&lt;br /&gt;
The first line is the path to a primary simulation file (see [[MC_Data_Sets|MC Data Sets]] page).&lt;br /&gt;
The second line is an integer number of events to be processed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to run papas ==&lt;br /&gt;
&lt;br /&gt;
Copy a directory with papas on stark the machine and go to this directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cd&lt;br /&gt;
&lt;br /&gt;
cp -rf ~razuvaev/myheppy .&lt;br /&gt;
&lt;br /&gt;
cd myheppy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a directory ''output'' for output files,&lt;br /&gt;
detector configuration file ''CTauPapas.cfg'',&lt;br /&gt;
file ''ctau_input_sim.txt'' with a path to the file with primary generator events,&lt;br /&gt;
and the folder ''heppy'' with heppy code itself.&lt;br /&gt;
Let's go into it and tune environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cd heppy&lt;br /&gt;
&lt;br /&gt;
source init.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now it is time to run papas.&lt;br /&gt;
You may be asked a question because the output directory is not empty.&lt;br /&gt;
So just input &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; or clean the folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cd test&lt;br /&gt;
&lt;br /&gt;
./heppy_loop.py ../../output/ ctau_cfg1.py&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it don't want to run try &amp;lt;code&amp;gt;source ~razuvaev/.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;source ../init.sh&amp;lt;/code&amp;gt; because it can be caused by the problem with environment variables.&lt;br /&gt;
&lt;br /&gt;
When papas simulation has been done one need to present papas output to a suitable form and also add initial generator information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cd ../../&lt;br /&gt;
&lt;br /&gt;
./txt2tree.py&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output root tree is available in the file ''myheppy/output/txt2tree.root''.&lt;br /&gt;
&lt;br /&gt;
== Output tree ==&lt;br /&gt;
&lt;br /&gt;
The output tree contains branches which can be divided in several groups:&lt;br /&gt;
* reconstructed particle parameters;&lt;br /&gt;
* generated particle parameters;&lt;br /&gt;
* generated vertices;&lt;br /&gt;
* connection between reconstructed particles, generated particles and generated vertices.&lt;br /&gt;
&lt;br /&gt;
The table below presents branches and description of their content.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name&lt;br /&gt;
! Type&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;text-align: center;&amp;quot; | Reconstructed particles&lt;br /&gt;
|-&lt;br /&gt;
| n&lt;br /&gt;
| int&lt;br /&gt;
| 1&lt;br /&gt;
| The number of reconstructed particles.&lt;br /&gt;
|-&lt;br /&gt;
| px&lt;br /&gt;
| float []&lt;br /&gt;
| n&lt;br /&gt;
| The reconstructed particle momentum: x coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| py&lt;br /&gt;
| float []&lt;br /&gt;
| n&lt;br /&gt;
| The reconstructed particle momentum: y coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| pz&lt;br /&gt;
| float []&lt;br /&gt;
| n&lt;br /&gt;
| The reconstructed particle momentum: z coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;text-align: center;&amp;quot; | Generated particles&lt;br /&gt;
|-&lt;br /&gt;
| n0&lt;br /&gt;
| int&lt;br /&gt;
| 1&lt;br /&gt;
| The number of generated particles.&lt;br /&gt;
|-&lt;br /&gt;
| px0&lt;br /&gt;
| float []&lt;br /&gt;
| n0&lt;br /&gt;
| The generated particle momentum: x coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| py0&lt;br /&gt;
| float []&lt;br /&gt;
| n0&lt;br /&gt;
| The generated particle momentum: y coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| pz0&lt;br /&gt;
| float []&lt;br /&gt;
| n0&lt;br /&gt;
| The generated particle momentum: z coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;text-align: center;&amp;quot; | Generated vertices&lt;br /&gt;
|-&lt;br /&gt;
| nv0&lt;br /&gt;
| int&lt;br /&gt;
| 1&lt;br /&gt;
| The number of generated vertices.&lt;br /&gt;
|-&lt;br /&gt;
| vx0&lt;br /&gt;
| float []&lt;br /&gt;
| nv0&lt;br /&gt;
| The generated vertex: x coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| vy0&lt;br /&gt;
| float []&lt;br /&gt;
| nv0&lt;br /&gt;
| The generated vertex: y coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| vz0&lt;br /&gt;
| float []&lt;br /&gt;
| nv0&lt;br /&gt;
| The generated vertex: z coordinate.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;text-align: center;&amp;quot; | Links&lt;br /&gt;
|-&lt;br /&gt;
| recgen&lt;br /&gt;
| int []&lt;br /&gt;
| n&lt;br /&gt;
| Transform a reconstructed particle index to the generated particle index.&lt;br /&gt;
|-&lt;br /&gt;
| genver&lt;br /&gt;
| int []&lt;br /&gt;
| n0&lt;br /&gt;
| Transform a generated particle index to the generated vertex index.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Analysis example ==&lt;br /&gt;
&lt;br /&gt;
Here a short analysis example of&lt;br /&gt;
&amp;lt;math&amp;gt;D^0 \to K_S^0 \pi^+ \pi^-&amp;lt;/math&amp;gt;&lt;br /&gt;
is presented.&lt;br /&gt;
The things are performed with PyROOT.&lt;br /&gt;
&lt;br /&gt;
The data a taken from the available&lt;br /&gt;
[[MC_Data_Sets#Exclusive_samples|exclusive sample]].&lt;br /&gt;
&lt;br /&gt;
The code can be taken from github&lt;br /&gt;
[https://github.com/lbrl/sctau_py/blob/master/search_dkspipi.py]&lt;br /&gt;
or find at the stark cluster: &lt;br /&gt;
''/home/razuvaev/myheppy/search_dkspipi.py''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Dkspipi_mksmd0.png|alt=mksmd0.|&amp;lt;math&amp;gt;K_S^0&amp;lt;/math&amp;gt; mass vs &amp;lt;math&amp;gt;D^0&amp;lt;/math&amp;gt; mass.&lt;br /&gt;
File:Dkspipi_md0pd0.png|alt=md0pd0.|&amp;lt;math&amp;gt;D^0&amp;lt;/math&amp;gt; mass vs its momentum.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Razuvaev</name></author>	</entry>

	</feed>