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