StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
JunctionSplitting.h
1 // JunctionSplitting.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2018 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/Settings.h"
20 #include "Pythia8/StringLength.h"
21 
22 namespace Pythia8 {
23 
24 //==========================================================================
25 
26 // JunctionSplitting takes an event and seperate junction chains from
27 // each other, such that no junctions are colour connected to each other.
28 
30 
31 public:
32 
33  // Initialization.
34  void init(Info* infoPtrIn, Settings& settings, Rndm* rndmPtrIn,
35  ParticleData* particleDataPtrIn);
36 
37  // Test whether an event has a physical colour configuration.
38  // It also splits junction pairs into pieces that PYTHIA can hadronize.
39  bool checkColours(Event& event);
40 
41 private:
42 
43  // Constants: could only be changed in the code itself.
44  static const int NTRYJNREST;
45  static const double JJSTRINGM2MAX, JJSTRINGM2FRAC, CONVJNREST, MTHAD,
46  MINANGLE;
47 
48  double eNormJunction;
49  bool allowDoubleJunRem;
50  // Pointer to various information on the generation.
51  Info* infoPtr;
52 
53  // Pointer to the random number generator.
54  Rndm* rndmPtr;
55 
56  // Classes for flavour, pT and z generation.
57  StringFlav flavSel;
58  StringPT pTSel;
59  StringZ zSel;
60 
61  // The generator class for normal string fragmentation.
62  StringFragmentation stringFrag;
63 
64  // Colour tracing class used to find the colour chains.
65  ColourTracing colTrace;
66 
67  // String Length class used to calculate the string length.
68  StringLength stringLength;
69 
70  // Split connected junction chains into separated, mainly by splitting
71  // gluons into q-qbar pairs.
72  bool splitJunGluons(Event& event, vector<vector< int > >& iPartonJun,
73  vector<vector< int > >& iPartonAntiJun);
74 
75  // Split multiple (> 2) directly connected junctions.
76  bool splitJunChains(Event& event);
77 
78  // Split junction pairs.
79  bool splitJunPairs(Event& event, vector<vector< int > >& iPartonJun,
80  vector<vector< int > >& iPartonAntiJun);
81 
82  // Get the list of partons connected to the junctions.
83  bool getPartonLists(Event& event, vector<vector< int > >& iPartonJun,
84  vector<vector<int > >& iPartonAntiJun);
85 
86  // Change the anticolour of the particle that has acol to be col.
87  bool setAcol(Event& event, int col, int acol);
88 
89 };
90 
91 //==========================================================================
92 
93 } // end namespace Pythia8
94 
95 #endif // Pythia8_JunctionSplitting_H