source: HiSusy/trunk/Pythia8/pythia8170/phpdoc/BeamShape.php @ 1

Last change on this file since 1 was 1, checked in by zerwas, 11 years ago

first import of structure, PYTHIA8 and DELPHES

File size: 4.3 KB
Line 
1<html>
2<head>
3<title>Beam Shape</title>
4<link rel="stylesheet" type="text/css" href="pythia.css"/>
5<link rel="shortcut icon" href="pythia32.gif"/>
6</head>
7<body>
8
9<script language=javascript type=text/javascript>
10function stopRKey(evt) {
11var evt = (evt) ? evt : ((event) ? event : null);
12var node = (evt.target) ? evt.target :((evt.srcElement) ? evt.srcElement : null);
13if ((evt.keyCode == 13) && (node.type=="text"))
14{return false;}
15}
16
17document.onkeypress = stopRKey;
18</script>
19<?php
20if($_POST['saved'] == 1) {
21if($_POST['filepath'] != "files/") {
22echo "<font color='red'>SETTINGS SAVED TO FILE</font><br/><br/>"; }
23else {
24echo "<font color='red'>NO FILE SELECTED YET.. PLEASE DO SO </font><a href='SaveSettings.php'>HERE</a><br/><br/>"; }
25}
26?>
27
28<form method='post' action='BeamShape.php'>
29
30<h2>Beam Shape</h2>
31
32The <?php $filepath = $_GET["filepath"];
33echo "<a href='BeamParameters.php?filepath=".$filepath."' target='page'>";?>Beam Parameters</a>
34page explains how you can set a momentum spread of the two incoming
35beams, and a spread and offset for the location of the interaction
36vertex. The spread is based on a simple parametrization in terms of
37independent Gaussians, however, which is likely to be too primitive
38for realistic applications.
39
40<p/>
41It is therefore possible to define your own class, derived from the
42<code>BeamShape</code> base class, and hand it in to Pythia with the
43<code><?php $filepath = $_GET["filepath"];
44echo "<a href='ProgramFlow.php?filepath=".$filepath."' target='page'>";?>
45pythia.setBeamShapePtr( BeamShape*)</a></code> method.
46Below we describe what such a class has to do. An explicit toy example
47is shown in <code>main23.cc</code>.
48
49<p/>
50The <code>BeamShape</code> base class has a very simple structure.
51It only has two main virtual methods. The first, <code>init()</code>, is
52used for initialization. The second, <code>pick()</code>, selects
53beam momentum and production vertex in the current event.
54
55<a name="method1"></a>
56<p/><strong>BeamShape::BeamShape() &nbsp;</strong> <br/>
57 
58<strong>virtual BeamShape::~BeamShape() &nbsp;</strong> <br/>
59the constructor and destructor do not need to do anything.
60 
61
62<a name="method2"></a>
63<p/><strong>virtual void BeamShape::init( Settings& settings, Rndm* rndmPtrIn) &nbsp;</strong> <br/>
64the base-class method simply reads in the relevant values stored
65in the <code>Settings</code> data base, and saves a pointer to the
66random-number generator. You are free to write your own
67derived initialization routine, or use the existing one. In the
68latter case you can then give your own modified interpretation
69to the beam spread parameters defined there.
70<br/>The two flags <code>Beams:allowMomentumSpread</code> and
71<code>Beams:allowVertexSpread</code> should not be tampered with,
72however. These are checked elsewhere to determine whether the beam
73shape should be set or not, whereas the other momentum-spread
74and vertex-spread parameters are local to this class.
75 
76
77<a name="method3"></a>
78<p/><strong>virtual void BeamShape::pick() &nbsp;</strong> <br/>
79this method is the key one to supply in the derived class. Here you
80are free to pick whatever parametrization you desire for beam momenta
81and vertex position, including correlations between the two.
82At the end of the day, you should set a few protected
83<code>double</code> numbers:
84<br/><code>deltaPxA, deltaPyA, deltaPzA</code> for the three-momentum
85shift of the first incoming beam, relative to the nominal values;
86<br/><code>deltaPxB, deltaPyB, deltaPzB</code> for the three-momentum
87shift of the second incoming beam, relative to the nominal values;
88<br/><code>vertexX, vertexY, vertexZ, vertexT</code> for the
89production-vertex position and time.
90<br/>As usual, momentum is given in GeV, and space and time in mm,
91with <i>c = 1</i>.
92 
93
94<a name="method4"></a>
95<p/><strong>Vec4 BeamShape::deltaPA() &nbsp;</strong> <br/>
96 
97<strong>Vec4 BeamShape::deltaPB() &nbsp;</strong> <br/>
98read out the three-momentum shifts for beams A and B that were set by
99<code>pick()</code>. The energy components are put to zero at this stage,
100since they are most conveniently calculated after the original and the
101shift three-momenta have been added.
102 
103
104<a name="method5"></a>
105<p/><strong>Vec4 BeamShape::vertex() &nbsp;</strong> <br/>
106read out the production-vertex position and time that were set by
107<code>pick()</code>.
108 
109
110</body>
111</html>
112
113<!-- Copyright (C) 2012 Torbjorn Sjostrand -->
Note: See TracBrowser for help on using the repository browser.