Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:25

0001 // JunctionSplitting.h is a part of the PYTHIA event generator.
0002 // Copyright (C) 2024 Torbjorn Sjostrand.
0003 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
0004 // Please respect the MCnet Guidelines, see GUIDELINES for details.
0005 
0006 // This file contains the class JunctionSplitting.
0007 // JunctionSplitting takes an event and seperate junction chains from
0008 // each other, such that no junctions are colour connected to each other.
0009 
0010 #ifndef Pythia8_JunctionSplitting_H
0011 #define Pythia8_JunctionSplitting_H
0012 
0013 #include "Pythia8/Basics.h"
0014 #include "Pythia8/ColourTracing.h"
0015 #include "Pythia8/Event.h"
0016 #include "Pythia8/FragmentationFlavZpT.h"
0017 #include "Pythia8/Info.h"
0018 #include "Pythia8/ParticleData.h"
0019 #include "Pythia8/PhysicsBase.h"
0020 #include "Pythia8/Settings.h"
0021 #include "Pythia8/StringLength.h"
0022 
0023 namespace Pythia8 {
0024 
0025 //==========================================================================
0026 
0027 // JunctionSplitting takes an event and seperate junction chains from
0028 // each other, such that no junctions are colour connected to each other.
0029 
0030 class JunctionSplitting : public PhysicsBase {
0031 
0032 public:
0033 
0034   // Constructor
0035   JunctionSplitting() : pNormJunction(), allowDoubleJunRem() {}
0036 
0037   // Initialization.
0038   void init();
0039 
0040   // Test whether an event has a physical colour configuration.
0041   // It also splits junction pairs into pieces that PYTHIA can hadronize.
0042   bool checkColours(Event& event);
0043 
0044 protected:
0045 
0046   virtual void onInitInfoPtr() override {
0047     registerSubObject(flavSel);
0048     registerSubObject(pTSel);
0049     registerSubObject(zSel);
0050     registerSubObject(stringFrag);
0051   }
0052 
0053 private:
0054 
0055   // Constants: could only be changed in the code itself.
0056   static const int    NTRYJNREST;
0057   static const double JJSTRINGM2MAX, JJSTRINGM2FRAC, CONVJNREST, MTHAD,
0058                       MINANGLE;
0059 
0060   double pNormJunction;
0061   bool allowDoubleJunRem;
0062 
0063   // Classes for flavour, pT and z generation.
0064   StringFlav flavSel;
0065   StringPT   pTSel;
0066   StringZ    zSel;
0067 
0068   // The generator class for normal string fragmentation.
0069   StringFragmentation stringFrag;
0070 
0071   // Colour tracing class used to find the colour chains.
0072   ColourTracing colTrace;
0073 
0074   // String Length class used to calculate the string length.
0075   StringLength stringLength;
0076 
0077   // Split connected junction chains into separated, mainly by splitting
0078   // gluons into q-qbar pairs.
0079   bool splitJunGluons(Event& event, vector<vector< int > >& iPartonJun,
0080     vector<vector< int > >& iPartonAntiJun);
0081 
0082   // Split multiple (> 2) directly connected junctions.
0083   bool splitJunChains(Event& event);
0084 
0085   // Split junction pairs.
0086   bool splitJunPairs(Event& event, vector<vector< int > >& iPartonJun,
0087     vector<vector< int > >& iPartonAntiJun);
0088 
0089   // Get the list of partons connected to the junctions.
0090   bool getPartonLists(Event& event, vector<vector< int > >& iPartonJun,
0091     vector<vector<int > >& iPartonAntiJun);
0092 
0093   // Change the anticolour of the particle that has acol to be col.
0094   bool setAcol(Event& event, int col, int acol);
0095 
0096 };
0097 
0098 //==========================================================================
0099 
0100 } // end namespace Pythia8
0101 
0102 #endif // Pythia8_JunctionSplitting_H