Line data Source code
1 : // StringLength.h is a part of the PYTHIA event generator.
2 : // Copyright (C) 2015 Torbjorn Sjostrand.
3 : // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4 : // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 :
6 : // This file contains the class StringLength.
7 : // It is used to calculate the lambda measure of strings and junctions.
8 :
9 : #ifndef Pythia8_StringLength_H
10 : #define Pythia8_StringLength_H
11 :
12 : #include "Pythia8/Event.h"
13 : #include "Pythia8/Info.h"
14 : #include "Pythia8/Settings.h"
15 : #include "Pythia8/StringFragmentation.h"
16 :
17 : namespace Pythia8 {
18 :
19 : //==========================================================================
20 :
21 : // StringLength class. It is used to calculate the lambda measure.
22 :
23 0 : class StringLength {
24 :
25 : public:
26 :
27 : // Initialize.
28 : void init(Info* infoPtrIn, Settings& settings);
29 :
30 : // Calculate string length of a single particle.
31 : // The first vector is the 4 vector of the particle.
32 : // The second vector represents (1,0,0,0) in dipole restframe.
33 : double getLength(Vec4 p, Vec4 v, bool isJunc = false);
34 :
35 : // Calculate string length for two indices in the event record.
36 : double getStringLength(Event& event, int i, int j);
37 :
38 : // Calculate string length for two particles given their four-momenta.
39 : double getStringLength(Vec4 p1, Vec4 p2);
40 :
41 : // Calculate the length of a single junction given the 3 entries in event.
42 : double getJuncLength(Event& event, int i, int j, int k);
43 :
44 : // Calculate the length of a single junction given the 3 four-momenta.
45 : double getJuncLength(Vec4 p1, Vec4 p2, Vec4 p3);
46 :
47 : // Calculate the length of a double junction given the 4 entries in event.
48 : // The first two are expected to be quarks, the second two to be antiquarks.
49 : double getJuncLength(Event& event, int i, int j, int k, int l);
50 :
51 : // Calculate the length of a double junction given the 4 four-momenta.
52 : // The first two are expected to be quarks, the second two to be antiquarks.
53 : double getJuncLength(Vec4 p1, Vec4 p2, Vec4 p3, Vec4 p4);
54 :
55 : private:
56 :
57 : static const double MINDELTAR, TINY;
58 :
59 : double m0, m0sqr, sqrt2, juncCorr;
60 : int lambdaForm;
61 :
62 : // Pointer to various information on the generation.
63 : Info* infoPtr;
64 :
65 : // This is only to access the function call junctionRestFrame.
66 : StringFragmentation stringFragmentation;
67 :
68 : };
69 :
70 : //==========================================================================
71 :
72 : } // end namespace Pythia8
73 :
74 : #endif // Pythia8_StringLength_H
|