PYTHIA  8.312
ColourTracing.h
1 // ColourTracing.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 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  // Constructor.
27  ColourTracing() : loggerPtr() {}
28 
29  void init(Logger* loggerPtrIn) {loggerPtr = loggerPtrIn;}
30 
31  // Setup the colour lists.
32  bool setupColList(Event& event);
33 
34  // Trace a colour line, from a colour, from an anticolour, or in loop.
35  bool traceFromAcol(int indxCol, Event& event, int iJun, int iCol,
36  vector<int>& iParton);
37  bool traceFromCol(int indxCol, Event& event, int iJun, int iCol,
38  vector<int>& iParton);
39  bool traceInLoop(Event& event, vector<int>& iParton);
40 
41  bool finished() { return (int(iColAndAcol.size()) == 0);}
42  bool colFinished() { return (int(iColEnd.size()) == 0);}
43 
44  // Get junction chains where the junctions are directly connected.
45  vector<vector<int > > getJunChains(Event& event);
46 
47 private:
48 
49  vector<int> iColEnd, iAcolEnd, iColAndAcol;
50 
51  // Pointer to logger.
52  Logger* loggerPtr;
53 
54 };
55 
56 //==========================================================================
57 
58 } // end namespace Pythia8
59 
60 #endif // Pythia8_ColourTracing_H
The Event class holds all info on the generated event.
Definition: Event.h:453
bool setupColList(Event &event)
Setup the colour lists.
Definition: ColourTracing.cc:23
Definition: Logger.h:23
vector< vector< int > > getJunChains(Event &event)
Get junction chains where the junctions are directly connected.
Definition: ColourTracing.cc:279
bool traceFromCol(int indxCol, Event &event, int iJun, int iCol, vector< int > &iParton)
Trace a colour line, from a colour to an anticolour.
Definition: ColourTracing.cc:136
ColourTracing class. It is used to trace colours within the event record.
Definition: ColourTracing.h:22
bool traceFromAcol(int indxCol, Event &event, int iJun, int iCol, vector< int > &iParton)
Trace a colour line, from a colour, from an anticolour, or in loop.
Definition: ColourTracing.cc:49
bool traceInLoop(Event &event, vector< int > &iParton)
Trace a colour loop, from a colour back to the anticolour of the same.
Definition: ColourTracing.cc:234
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
ColourTracing()
Constructor.
Definition: ColourTracing.h:27