Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 09:03:43

0001 // FragmentationModel.h is a part of the PYTHIA event generator.
0002 // Copyright (C) 2025 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 of
0007 // fragmentation. A FragmentationModel has one main methd, fragment,
0008 // which takes the color subsystem, color configuration, and
0009 // event. Optional flags can be passed if the event is diffractive and
0010 // if system recoil should be used in some cases. The class hold
0011 // pointers to flavor, pT, and z generators, although these do not
0012 // need to be used by the model. The LundFragmentation model is
0013 // defined in StringFragmentation, and provides the standard Pythia
0014 // fragmentation.
0015 
0016 #ifndef Pythia8_FragmentationModel_H
0017 #define Pythia8_FragmentationModel_H
0018 
0019 #include "Pythia8/PhysicsBase.h"
0020 #include "Pythia8/FragmentationSystems.h"
0021 
0022 namespace Pythia8 {
0023 
0024 //==========================================================================
0025 
0026 // FragmentationModel is the base class for handling fragmentation algorithms.
0027 
0028 class FragmentationModel : public PhysicsBase {
0029 
0030 public:
0031 
0032   // Empty constructor.
0033   FragmentationModel() = default;
0034 
0035   // Empty virtual destructor.
0036   virtual ~FragmentationModel() {}
0037 
0038   // Initialize and save pointers.
0039   virtual bool init(StringFlav* flavSelPtrIn = nullptr,
0040     StringPT* pTSelPtrIn = nullptr, StringZ* zSelPtrIn = nullptr,
0041     FragModPtr fragModPtrIn = nullptr) = 0;
0042 
0043   // Do the fragmentation: driver routine.
0044   virtual bool fragment(int iSub, ColConfig& colConfig, Event& event,
0045     bool isDiff = false, bool systemRecoil = true) = 0;
0046 
0047 protected:
0048 
0049   // Pointers to classes for flavour, pT and z generation.
0050   StringFlav*   flavSelPtr{};
0051   StringPT*     pTSelPtr{};
0052   StringZ*      zSelPtr{};
0053 
0054 };
0055 
0056 //==========================================================================
0057 
0058 // Forward reference to StringFragmentation and
0059 // MiniStringFragmentation classes; needed in LundFragmentation class.
0060 class StringFragmentation;
0061 class MiniStringFragmentation;
0062 
0063 //--------------------------------------------------------------------------
0064 
0065 // The LundFragmentation class handles the default Pythia fragmentation,
0066 // using both the StringFragmentation and MiniStringFragmentation classes.
0067 
0068 class LundFragmentation : public FragmentationModel {
0069 
0070 public:
0071 
0072   // Constructor (creates string and mini-string pointers, needed for
0073   // forward declaration and factorization).
0074   LundFragmentation();
0075 
0076   // Destructor (deletes string and mini-string pointers).
0077   ~LundFragmentation() override;
0078 
0079   // Initialize and save pointers.
0080   bool init(StringFlav* flavSelPtrIn = nullptr,
0081     StringPT* pTSelPtrIn = nullptr, StringZ* zSelPtrIn = nullptr,
0082     FragModPtr fragModPtrIn = nullptr) override;
0083 
0084   // Do the fragmentation: driver routine.
0085   bool fragment(int iSub, ColConfig& colConfig, Event& event,
0086     bool isDiff = false, bool systemRecoil = true) override;
0087 
0088   // Internal StringFragmentation and MiniStringFragmentation objects.
0089   StringFragmentation* stringFragPtr{};
0090   MiniStringFragmentation* ministringFragPtr{};
0091 
0092 private:
0093 
0094   // Parameters controlling the fragmentation.
0095   double mStringMin{};
0096   bool tryMiniAfterFailedFrag{};
0097 
0098 };
0099 
0100 //==========================================================================
0101 
0102 } // end namespace Pythia8
0103 
0104 #endif // Pythia8_FragmentationModel_H