PYTHIA  8.312
StringLength.h
1 // StringLength.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2024 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() : loggerPtr(), m0(), 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(const Vec4& p, const Vec4& v, bool isJunc = false) const;
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) const;
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(const Vec4& p1, const Vec4& p2, const Vec4& p3) const;
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(const Vec4& p1, const Vec4& p2, const Vec4& p3,
58  const Vec4& p4) const;
59 
60 private:
61 
62  static const double TINY, MINANGLE;
63 
64  // Pointer to logger.
65  Logger* loggerPtr;
66 
67  double m0, sqrt2, juncCorr;
68  int lambdaForm;
69 
70  // Pointer to various information on the generation.
71  Info* infoPtr;
72 
73  // This is only to access the function call junctionRestFrame.
74  StringFragmentation stringFragmentation;
75 
76 };
77 
78 //==========================================================================
79 
80 } // end namespace Pythia8
81 
82 #endif // Pythia8_StringLength_H
StringLength()
Constructor.
Definition: StringLength.h:28
double getJuncLength(Event &event, int i, int j, int k)
Calculate the length of a single junction given the 3 entries in event.
Definition: StringLength.cc:101
Definition: Info.h:45
The Event class holds all info on the generated event.
Definition: Event.h:453
Definition: StringFragmentation.h:119
Definition: Logger.h:23
double getLength(const Vec4 &p, const Vec4 &v, bool isJunc=false) const
Definition: StringLength.cc:78
StringLength class. It is used to calculate the lambda measure.
Definition: StringLength.h:23
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
double getStringLength(Event &event, int i, int j)
Calculate string length for two indices in the event record.
Definition: StringLength.cc:48
void init(Info *infoPtrIn, Settings &settings)
Initialize.
Definition: StringLength.cc:31
Definition: Basics.h:32
Definition: Settings.h:195