PYTHIA  8.311
JunctionSplitting.h
1 // JunctionSplitting.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 JunctionSplitting.
7 // JunctionSplitting takes an event and seperate junction chains from
8 // each other, such that no junctions are colour connected to each other.
9 
10 #ifndef Pythia8_JunctionSplitting_H
11 #define Pythia8_JunctionSplitting_H
12 
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/ColourTracing.h"
15 #include "Pythia8/Event.h"
16 #include "Pythia8/FragmentationFlavZpT.h"
17 #include "Pythia8/Info.h"
18 #include "Pythia8/ParticleData.h"
19 #include "Pythia8/PhysicsBase.h"
20 #include "Pythia8/Settings.h"
21 #include "Pythia8/StringLength.h"
22 
23 namespace Pythia8 {
24 
25 //==========================================================================
26 
27 // JunctionSplitting takes an event and seperate junction chains from
28 // each other, such that no junctions are colour connected to each other.
29 
31 
32 public:
33 
34  // Constructor
35  JunctionSplitting() : pNormJunction(), allowDoubleJunRem() {}
36 
37  // Initialization.
38  void init();
39 
40  // Test whether an event has a physical colour configuration.
41  // It also splits junction pairs into pieces that PYTHIA can hadronize.
42  bool checkColours(Event& event);
43 
44 protected:
45 
46  virtual void onInitInfoPtr() override {
47  registerSubObject(flavSel);
48  registerSubObject(pTSel);
49  registerSubObject(zSel);
50  registerSubObject(stringFrag);
51  }
52 
53 private:
54 
55  // Constants: could only be changed in the code itself.
56  static const int NTRYJNREST;
57  static const double JJSTRINGM2MAX, JJSTRINGM2FRAC, CONVJNREST, MTHAD,
58  MINANGLE;
59 
60  double pNormJunction;
61  bool allowDoubleJunRem;
62 
63  // Classes for flavour, pT and z generation.
64  StringFlav flavSel;
65  StringPT pTSel;
66  StringZ zSel;
67 
68  // The generator class for normal string fragmentation.
69  StringFragmentation stringFrag;
70 
71  // Colour tracing class used to find the colour chains.
72  ColourTracing colTrace;
73 
74  // String Length class used to calculate the string length.
75  StringLength stringLength;
76 
77  // Split connected junction chains into separated, mainly by splitting
78  // gluons into q-qbar pairs.
79  bool splitJunGluons(Event& event, vector<vector< int > >& iPartonJun,
80  vector<vector< int > >& iPartonAntiJun);
81 
82  // Split multiple (> 2) directly connected junctions.
83  bool splitJunChains(Event& event);
84 
85  // Split junction pairs.
86  bool splitJunPairs(Event& event, vector<vector< int > >& iPartonJun,
87  vector<vector< int > >& iPartonAntiJun);
88 
89  // Get the list of partons connected to the junctions.
90  bool getPartonLists(Event& event, vector<vector< int > >& iPartonJun,
91  vector<vector<int > >& iPartonAntiJun);
92 
93  // Change the anticolour of the particle that has acol to be col.
94  bool setAcol(Event& event, int col, int acol);
95 
96 };
97 
98 //==========================================================================
99 
100 } // end namespace Pythia8
101 
102 #endif // Pythia8_JunctionSplitting_H
Definition: PhysicsBase.h:27
void registerSubObject(PhysicsBase &pb)
Register a sub object that should have its information in sync with this.
Definition: PhysicsBase.cc:56
The Event class holds all info on the generated event.
Definition: Event.h:453
Definition: JunctionSplitting.h:30
The StringPT class is used to select select transverse momenta.
Definition: FragmentationFlavZpT.h:322
JunctionSplitting()
Constructor.
Definition: JunctionSplitting.h:35
Definition: StringFragmentation.h:119
The StringZ class is used to sample the fragmentation function f(z).
Definition: FragmentationFlavZpT.h:264
bool checkColours(Event &event)
Definition: JunctionSplitting.cc:66
StringLength class. It is used to calculate the lambda measure.
Definition: StringLength.h:23
ColourTracing class. It is used to trace colours within the event record.
Definition: ColourTracing.h:22
void init()
Initialization.
Definition: JunctionSplitting.cc:42
virtual void onInitInfoPtr() override
Definition: JunctionSplitting.h:46
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
The StringFlav class is used to select quark and hadron flavours.
Definition: FragmentationFlavZpT.h:84