[1] | 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 | |
---|
| 11 | The <a href="BeamParameters.html" target="page">Beam Parameters</a> |
---|
| 12 | page explains how you can set a momentum spread of the two incoming |
---|
| 13 | beams, and a spread and offset for the location of the interaction |
---|
| 14 | vertex. The spread is based on a simple parametrization in terms of |
---|
| 15 | independent Gaussians, however, which is likely to be too primitive |
---|
| 16 | for realistic applications. |
---|
| 17 | |
---|
| 18 | <p/> |
---|
| 19 | It 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"> |
---|
| 22 | pythia.setBeamShapePtr( BeamShape*)</a></code> method. |
---|
| 23 | Below we describe what such a class has to do. An explicit toy example |
---|
| 24 | is shown in <code>main23.cc</code>. |
---|
| 25 | |
---|
| 26 | <p/> |
---|
| 27 | The <code>BeamShape</code> base class has a very simple structure. |
---|
| 28 | It only has two main virtual methods. The first, <code>init()</code>, is |
---|
| 29 | used for initialization. The second, <code>pick()</code>, selects |
---|
| 30 | beam momentum and production vertex in the current event. |
---|
| 31 | |
---|
| 32 | <a name="method1"></a> |
---|
| 33 | <p/><strong>BeamShape::BeamShape() </strong> <br/> |
---|
| 34 | |
---|
| 35 | <strong>virtual BeamShape::~BeamShape() </strong> <br/> |
---|
| 36 | the 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) </strong> <br/> |
---|
| 41 | the base-class method simply reads in the relevant values stored |
---|
| 42 | in the <code>Settings</code> data base, and saves a pointer to the |
---|
| 43 | random-number generator. You are free to write your own |
---|
| 44 | derived initialization routine, or use the existing one. In the |
---|
| 45 | latter case you can then give your own modified interpretation |
---|
| 46 | to 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, |
---|
| 49 | however. These are checked elsewhere to determine whether the beam |
---|
| 50 | shape should be set or not, whereas the other momentum-spread |
---|
| 51 | and vertex-spread parameters are local to this class. |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | <a name="method3"></a> |
---|
| 55 | <p/><strong>virtual void BeamShape::pick() </strong> <br/> |
---|
| 56 | this method is the key one to supply in the derived class. Here you |
---|
| 57 | are free to pick whatever parametrization you desire for beam momenta |
---|
| 58 | and vertex position, including correlations between the two. |
---|
| 59 | At 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 |
---|
| 62 | shift of the first incoming beam, relative to the nominal values; |
---|
| 63 | <br/><code>deltaPxB, deltaPyB, deltaPzB</code> for the three-momentum |
---|
| 64 | shift of the second incoming beam, relative to the nominal values; |
---|
| 65 | <br/><code>vertexX, vertexY, vertexZ, vertexT</code> for the |
---|
| 66 | production-vertex position and time. |
---|
| 67 | <br/>As usual, momentum is given in GeV, and space and time in mm, |
---|
| 68 | with <i>c = 1</i>. |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | <a name="method4"></a> |
---|
| 72 | <p/><strong>Vec4 BeamShape::deltaPA() </strong> <br/> |
---|
| 73 | |
---|
| 74 | <strong>Vec4 BeamShape::deltaPB() </strong> <br/> |
---|
| 75 | read 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, |
---|
| 77 | since they are most conveniently calculated after the original and the |
---|
| 78 | shift three-momenta have been added. |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | <a name="method5"></a> |
---|
| 82 | <p/><strong>Vec4 BeamShape::vertex() </strong> <br/> |
---|
| 83 | read 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 --> |
---|