StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ColourTracing.h
1 // ColourTracing.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 ColurTracing.
7 // ColourTracing traces colour lines in the event record.
8 
9 
10 #ifndef Pythia8_ColourTracing_H
11 #define Pythia8_ColourTracing_H
12 
13 #include "Pythia8/Event.h"
14 #include "Pythia8/Info.h"
15 
16 namespace Pythia8 {
17 
18 //==========================================================================
19 
20 // ColourTracing class. It is used to trace colours within the event record.
21 
23 
24 public:
25 
26  void init( Info* infoPtrIn) {infoPtr = infoPtrIn;}
27 
28  // Setup the colour lists.
29  bool setupColList(Event& event);
30 
31  // Trace a colour line, from a colour, from an anticolour, or in loop.
32  bool traceFromAcol(int indxCol, Event& event, int iJun, int iCol,
33  vector<int>& iParton);
34  bool traceFromCol(int indxCol, Event& event, int iJun, int iCol,
35  vector<int>& iParton);
36  bool traceInLoop(Event& event, vector<int>& iParton);
37 
38  bool finished() { return (int(iColAndAcol.size()) == 0);}
39  bool colFinished() { return (int(iColEnd.size()) == 0);}
40 
41  // Get junction chains where the junctions are directly connected.
42  vector<vector<int > > getJunChains(Event& event);
43 
44 private:
45 
46  vector<int> iColEnd, iAcolEnd, iColAndAcol;
47 
48  // Pointer to various information on the generation.
49  Info* infoPtr;
50 
51 };
52 
53 //==========================================================================
54 
55 } // end namespace Pythia8
56 
57 #endif // Pythia8_ColourTracing_H