source: HiSusy/trunk/Pythia8/pythia8170/htmldoc/BeamShape.html @ 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: 3.6 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<h2>Beam Shape</h2>
10
11The <a href="BeamParameters.html" target="page">Beam Parameters</a>
12page explains how you can set a momentum spread of the two incoming
13beams, and a spread and offset for the location of the interaction
14vertex. The spread is based on a simple parametrization in terms of
15independent Gaussians, however, which is likely to be too primitive
16for realistic applications.
17
18<p/>
19It is therefore possible to define your own class, derived from the
20<code>BeamShape</code> base class, and hand it in to Pythia with the
21<code><a href="ProgramFlow.html" target="page">
22pythia.setBeamShapePtr( BeamShape*)</a></code> method.
23Below we describe what such a class has to do. An explicit toy example
24is shown in <code>main23.cc</code>.
25
26<p/>
27The <code>BeamShape</code> base class has a very simple structure.
28It only has two main virtual methods. The first, <code>init()</code>, is
29used for initialization. The second, <code>pick()</code>, selects
30beam momentum and production vertex in the current event.
31
32<a name="method1"></a>
33<p/><strong>BeamShape::BeamShape() &nbsp;</strong> <br/>
34 
35<strong>virtual BeamShape::~BeamShape() &nbsp;</strong> <br/>
36the constructor and destructor do not need to do anything.
37 
38
39<a name="method2"></a>
40<p/><strong>virtual void BeamShape::init( Settings& settings, Rndm* rndmPtrIn) &nbsp;</strong> <br/>
41the base-class method simply reads in the relevant values stored
42in the <code>Settings</code> data base, and saves a pointer to the
43random-number generator. You are free to write your own
44derived initialization routine, or use the existing one. In the
45latter case you can then give your own modified interpretation
46to the beam spread parameters defined there.
47<br/>The two flags <code>Beams:allowMomentumSpread</code> and
48<code>Beams:allowVertexSpread</code> should not be tampered with,
49however. These are checked elsewhere to determine whether the beam
50shape should be set or not, whereas the other momentum-spread
51and vertex-spread parameters are local to this class.
52 
53
54<a name="method3"></a>
55<p/><strong>virtual void BeamShape::pick() &nbsp;</strong> <br/>
56this method is the key one to supply in the derived class. Here you
57are free to pick whatever parametrization you desire for beam momenta
58and vertex position, including correlations between the two.
59At the end of the day, you should set a few protected
60<code>double</code> numbers:
61<br/><code>deltaPxA, deltaPyA, deltaPzA</code> for the three-momentum
62shift of the first incoming beam, relative to the nominal values;
63<br/><code>deltaPxB, deltaPyB, deltaPzB</code> for the three-momentum
64shift of the second incoming beam, relative to the nominal values;
65<br/><code>vertexX, vertexY, vertexZ, vertexT</code> for the
66production-vertex position and time.
67<br/>As usual, momentum is given in GeV, and space and time in mm,
68with <i>c = 1</i>.
69 
70
71<a name="method4"></a>
72<p/><strong>Vec4 BeamShape::deltaPA() &nbsp;</strong> <br/>
73 
74<strong>Vec4 BeamShape::deltaPB() &nbsp;</strong> <br/>
75read out the three-momentum shifts for beams A and B that were set by
76<code>pick()</code>. The energy components are put to zero at this stage,
77since they are most conveniently calculated after the original and the
78shift three-momenta have been added.
79 
80
81<a name="method5"></a>
82<p/><strong>Vec4 BeamShape::vertex() &nbsp;</strong> <br/>
83read out the production-vertex position and time that were set by
84<code>pick()</code>.
85 
86
87</body>
88</html>
89
90<!-- Copyright (C) 2012 Torbjorn Sjostrand -->
Note: See TracBrowser for help on using the repository browser.