PYTHIA  8.311
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(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  // Pointer to logger.
64  Logger* loggerPtr;
65 
66  double m0, sqrt2, juncCorr;
67  int lambdaForm;
68 
69  // Pointer to various information on the generation.
70  Info* infoPtr;
71 
72  // This is only to access the function call junctionRestFrame.
73  StringFragmentation stringFragmentation;
74 
75 };
76 
77 //==========================================================================
78 
79 } // end namespace Pythia8
80 
81 #endif // Pythia8_StringLength_H
StringLength()
Constructor.
Definition: StringLength.h:28
double getLength(Vec4 p, Vec4 v, bool isJunc=false)
Definition: StringLength.cc:78
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:100
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
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