|
||||
File indexing completed on 2025-01-18 10:06:32
0001 // StringInteraction.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 // Header file for the classes involved in the modelling interactions 0007 // between strings. This includes standard colour reconnections, 0008 // perturbative swing, string shoving and rope hadronisation. The 0009 // StringInterations base class is an interface to all of these, and 0010 // can be used both during and after PartonLevel, as well as before, 0011 // during and after string fragmentation. 0012 0013 #ifndef Pythia8_StringInteractions_H 0014 #define Pythia8_StringInteractions_H 0015 0016 #include "Pythia8/SharedPointers.h" 0017 #include "Pythia8/PhysicsBase.h" 0018 #include "Pythia8/FragmentationSystems.h" 0019 0020 namespace Pythia8 { 0021 0022 //========================================================================== 0023 0024 // StringInteractions is the base class for handling colour 0025 // reconnection, swing, shoving, and rope-type models for modifying 0026 // string fragmentation. 0027 0028 class StringInteractions : public PhysicsBase { 0029 0030 public: 0031 0032 // Empty constructor. 0033 StringInteractions() = default; 0034 0035 // Empty virtual destructor 0036 virtual ~StringInteractions() {} 0037 0038 // Function called from Pythia after the basic pointers. The base 0039 // class will setup the standard behaviour of Pythia 8.2 according 0040 // to the given Settings. Derived classes should create objects of 0041 // the specific model objects to be used. 0042 virtual bool init(); 0043 0044 // Access the pointers to the different models. 0045 ColRecPtr getColourReconnections() const { return colrecPtr; } 0046 DipSwingPtr getDipoleSwing() const { return dipswingPtr; } 0047 StringRepPtr getStringRepulsion() const { return stringrepPtr; } 0048 FragModPtr getFragmentationModifier() const { return fragmodPtr; } 0049 0050 protected: 0051 0052 // The object responsible for colour reconections in the end of 0053 // PartonLevel or in the beginning of HadronLevel. 0054 ColRecPtr colrecPtr{}; 0055 0056 // The object responsible for the perturbative swing which is always 0057 // active together with the TimeShower. 0058 DipSwingPtr dipswingPtr{}; 0059 0060 // The object responsible for repulsion between strings before 0061 // hadronisation (or calculating the repulsion before but actually 0062 // pushing the hadrons after fragmentation). 0063 StringRepPtr stringrepPtr{}; 0064 0065 // The object responsible for modifying fragmentation parameters due 0066 // to string interactions in each break-up (eg. in rope 0067 // hadronisation). 0068 FragModPtr fragmodPtr{}; 0069 0070 }; 0071 0072 //========================================================================== 0073 0074 // ColourReconnectionBase is responsible for doing standard colour 0075 // reconnection in the end of the PartonLevel or in the beginning of 0076 // HadronLevel. 0077 0078 class ColourReconnectionBase : public PhysicsBase { 0079 0080 public: 0081 0082 // Empty default constructor. 0083 ColourReconnectionBase() = default; 0084 0085 // Empty virtual destructor. 0086 virtual ~ColourReconnectionBase() {} 0087 0088 // Called after PhysicsBase initHbPtrs has been called. 0089 virtual bool init() { return true; } 0090 0091 // New beams possible for handling of hard diffraction. 0092 virtual void reassignBeamPtrs( BeamParticle* beamAPtrIn, 0093 BeamParticle* beamBPtrIn) {beamAPtr = beamAPtrIn; 0094 beamBPtr = beamBPtrIn;} 0095 0096 // Do colour reconnection for current event. 0097 virtual bool next( Event & event, int oldSize) = 0; 0098 0099 }; 0100 0101 //========================================================================== 0102 0103 // DipoleSwingBase is responsible for the perturbative swing and is active 0104 // anytime the TimeShower is active. 0105 0106 class DipoleSwingBase : public PhysicsBase { 0107 0108 public: 0109 0110 // Empty default constructor. 0111 DipoleSwingBase() = default; 0112 0113 // Empty virtual destructor. 0114 virtual ~DipoleSwingBase() {} 0115 0116 // Called after PhysicsBase initInfoPtr has been called. 0117 virtual bool init() { return true; } 0118 0119 // New beams possible for handling of hard diffraction. 0120 virtual void reassignBeamPtrs( BeamParticle* beamAPtrIn, 0121 BeamParticle* beamBPtrIn, int beamOffsetIn = 0) {beamAPtr = beamAPtrIn; 0122 beamBPtr = beamBPtrIn; beamOffset = beamOffsetIn;} 0123 0124 // Prepare system for evolution after each new interaction; identify ME. 0125 // Usage: prepare( iSys, event, limitPTmax). 0126 virtual void prepare( int , Event& , bool = true) = 0; 0127 0128 // Update dipole list after a multiparton interactions rescattering. 0129 // Usage: rescatterUpdate( iSys, event). 0130 virtual void rescatterUpdate( int , Event& ) = 0; 0131 0132 // Update dipole list after each ISR emission. 0133 // Usage: update( iSys, event, hasWeakRad). 0134 virtual void update( int , Event& , bool = false) = 0; 0135 0136 // Select next pT in downwards evolution. 0137 // Usage: pTnext( event, pTbegAll, pTendAll, isFirstTrial, doTrialIn). 0138 virtual double pTnext( Event& , double , double , 0139 bool = false, bool = false) = 0; 0140 0141 // Perform the swing previousl generated in pTnext. 0142 virtual bool swing( Event& event) = 0; 0143 0144 protected: 0145 0146 // Offset the location of the beam pointers in an event. 0147 int beamOffset{}; 0148 0149 }; 0150 0151 //========================================================================== 0152 0153 // StringRepulsionBase is responsible for calculating and performing 0154 // the repulsion between strings before the hadronisation. 0155 0156 class StringRepulsionBase : public PhysicsBase { 0157 0158 public: 0159 0160 // Empty default constructor. 0161 StringRepulsionBase() = default; 0162 0163 // Empty virtual destructor. 0164 virtual ~StringRepulsionBase() {} 0165 0166 // Called after PhysicsBase initInfoPtr has been called. 0167 virtual bool init() { return true; } 0168 0169 // Main virtual function, called before the hadronisation. 0170 virtual bool stringRepulsion(Event & event, ColConfig & colConfig) = 0; 0171 0172 // Additional functionality for implementing repulsion post-factum 0173 // after the actual hadronisation has been done. 0174 virtual bool hadronRepulsion(Event &) { return true; } 0175 }; 0176 0177 //========================================================================== 0178 0179 // FragmentationModifierBase can change the parameters of the string 0180 // fragmentation in each break-up. 0181 0182 class FragmentationModifierBase : public PhysicsBase { 0183 0184 public: 0185 0186 // Empty default constructor. 0187 FragmentationModifierBase() = default; 0188 0189 // Empty virtual destructor. 0190 virtual ~FragmentationModifierBase() {}; 0191 0192 // Called after PhysicsBase initInfoPtr has been called. 0193 virtual bool init() { return true; } 0194 0195 // Called just before hadronisation starts. 0196 virtual bool initEvent(Event& event, ColConfig& colConfig) = 0; 0197 0198 // The main virtual function for chaning the fragmentation 0199 // parameters. 0200 virtual bool doChangeFragPar(StringFlav* flavPtr, StringZ* zPtr, 0201 StringPT * pTPtr, double m2Had, vector<int> iParton, int endId) = 0; 0202 0203 }; 0204 0205 //========================================================================== 0206 0207 } // end namespace Pythia8 0208 0209 #endif // Pythia8_StringInteractions_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |