StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StringLength.h
1 // StringLength.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, 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 class StringLength {
24 
25 public:
26 
27  // Constructor.
28  StringLength() : m0(), m0sqr(), sqrt2(), juncCorr(), lambdaForm(),
29  infoPtr() {}
30 
31  // Initialize.
32  void init(Info* infoPtrIn, Settings& settings);
33 
34  // Calculate string length of a single particle.
35  // The first vector is the 4 vector of the particle.
36  // The second vector represents (1,0,0,0) in dipole restframe.
37  double getLength(Vec4 p, Vec4 v, bool isJunc = false);
38 
39  // Calculate string length for two indices in the event record.
40  double getStringLength(Event& event, int i, int j);
41 
42  // Calculate string length for two particles given their four-momenta.
43  double getStringLength(Vec4 p1, Vec4 p2);
44 
45  // Calculate the length of a single junction given the 3 entries in event.
46  double getJuncLength(Event& event, int i, int j, int k);
47 
48  // Calculate the length of a single junction given the 3 four-momenta.
49  double getJuncLength(Vec4 p1, Vec4 p2, Vec4 p3);
50 
51  // Calculate the length of a double junction given the 4 entries in event.
52  // The first two are expected to be quarks, the second two to be antiquarks.
53  double getJuncLength(Event& event, int i, int j, int k, int l);
54 
55  // Calculate the length of a double junction given the 4 four-momenta.
56  // The first two are expected to be quarks, the second two to be antiquarks.
57  double getJuncLength(Vec4 p1, Vec4 p2, Vec4 p3, Vec4 p4);
58 
59 private:
60 
61  static const double TINY, MINANGLE;
62 
63  double m0, m0sqr, sqrt2, juncCorr;
64  int lambdaForm;
65 
66  // Pointer to various information on the generation.
67  Info* infoPtr;
68 
69  // This is only to access the function call junctionRestFrame.
70  StringFragmentation stringFragmentation;
71 
72 };
73 
74 //==========================================================================
75 
76 } // end namespace Pythia8
77 
78 #endif // Pythia8_StringLength_H
Definition: AgUStep.h:26