[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 | <script language=javascript type=text/javascript> |
---|
| 10 | function stopRKey(evt) { |
---|
| 11 | var evt = (evt) ? evt : ((event) ? event : null); |
---|
| 12 | var node = (evt.target) ? evt.target :((evt.srcElement) ? evt.srcElement : null); |
---|
| 13 | if ((evt.keyCode == 13) && (node.type=="text")) |
---|
| 14 | {return false;} |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | document.onkeypress = stopRKey; |
---|
| 18 | </script> |
---|
| 19 | <?php |
---|
| 20 | if($_POST['saved'] == 1) { |
---|
| 21 | if($_POST['filepath'] != "files/") { |
---|
| 22 | echo "<font color='red'>SETTINGS SAVED TO FILE</font><br/><br/>"; } |
---|
| 23 | else { |
---|
| 24 | echo "<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 | |
---|
| 32 | The <?php $filepath = $_GET["filepath"]; |
---|
| 33 | echo "<a href='BeamParameters.php?filepath=".$filepath."' target='page'>";?>Beam Parameters</a> |
---|
| 34 | page explains how you can set a momentum spread of the two incoming |
---|
| 35 | beams, and a spread and offset for the location of the interaction |
---|
| 36 | vertex. The spread is based on a simple parametrization in terms of |
---|
| 37 | independent Gaussians, however, which is likely to be too primitive |
---|
| 38 | for realistic applications. |
---|
| 39 | |
---|
| 40 | <p/> |
---|
| 41 | It 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"]; |
---|
| 44 | echo "<a href='ProgramFlow.php?filepath=".$filepath."' target='page'>";?> |
---|
| 45 | pythia.setBeamShapePtr( BeamShape*)</a></code> method. |
---|
| 46 | Below we describe what such a class has to do. An explicit toy example |
---|
| 47 | is shown in <code>main23.cc</code>. |
---|
| 48 | |
---|
| 49 | <p/> |
---|
| 50 | The <code>BeamShape</code> base class has a very simple structure. |
---|
| 51 | It only has two main virtual methods. The first, <code>init()</code>, is |
---|
| 52 | used for initialization. The second, <code>pick()</code>, selects |
---|
| 53 | beam momentum and production vertex in the current event. |
---|
| 54 | |
---|
| 55 | <a name="method1"></a> |
---|
| 56 | <p/><strong>BeamShape::BeamShape() </strong> <br/> |
---|
| 57 | |
---|
| 58 | <strong>virtual BeamShape::~BeamShape() </strong> <br/> |
---|
| 59 | the 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) </strong> <br/> |
---|
| 64 | the base-class method simply reads in the relevant values stored |
---|
| 65 | in the <code>Settings</code> data base, and saves a pointer to the |
---|
| 66 | random-number generator. You are free to write your own |
---|
| 67 | derived initialization routine, or use the existing one. In the |
---|
| 68 | latter case you can then give your own modified interpretation |
---|
| 69 | to 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, |
---|
| 72 | however. These are checked elsewhere to determine whether the beam |
---|
| 73 | shape should be set or not, whereas the other momentum-spread |
---|
| 74 | and vertex-spread parameters are local to this class. |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | <a name="method3"></a> |
---|
| 78 | <p/><strong>virtual void BeamShape::pick() </strong> <br/> |
---|
| 79 | this method is the key one to supply in the derived class. Here you |
---|
| 80 | are free to pick whatever parametrization you desire for beam momenta |
---|
| 81 | and vertex position, including correlations between the two. |
---|
| 82 | At 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 |
---|
| 85 | shift of the first incoming beam, relative to the nominal values; |
---|
| 86 | <br/><code>deltaPxB, deltaPyB, deltaPzB</code> for the three-momentum |
---|
| 87 | shift of the second incoming beam, relative to the nominal values; |
---|
| 88 | <br/><code>vertexX, vertexY, vertexZ, vertexT</code> for the |
---|
| 89 | production-vertex position and time. |
---|
| 90 | <br/>As usual, momentum is given in GeV, and space and time in mm, |
---|
| 91 | with <i>c = 1</i>. |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | <a name="method4"></a> |
---|
| 95 | <p/><strong>Vec4 BeamShape::deltaPA() </strong> <br/> |
---|
| 96 | |
---|
| 97 | <strong>Vec4 BeamShape::deltaPB() </strong> <br/> |
---|
| 98 | read 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, |
---|
| 100 | since they are most conveniently calculated after the original and the |
---|
| 101 | shift three-momenta have been added. |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | <a name="method5"></a> |
---|
| 105 | <p/><strong>Vec4 BeamShape::vertex() </strong> <br/> |
---|
| 106 | read 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 --> |
---|