Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // StringLength.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 StringLength.
0007 // It is used to calculate the lambda measure of strings and junctions.
0008 
0009 #ifndef Pythia8_StringLength_H
0010 #define Pythia8_StringLength_H
0011 
0012 #include "Pythia8/Event.h"
0013 #include "Pythia8/Info.h"
0014 #include "Pythia8/Settings.h"
0015 #include "Pythia8/StringFragmentation.h"
0016 
0017 namespace Pythia8 {
0018 
0019 //==========================================================================
0020 
0021 // StringLength class. It is used to calculate the lambda measure.
0022 
0023 class StringLength {
0024 
0025 public:
0026 
0027   // Constructor.
0028   StringLength() : loggerPtr(), m0(), sqrt2(), juncCorr(), lambdaForm(),
0029     infoPtr() {}
0030 
0031   // Initialize.
0032   void init(Info* infoPtrIn, Settings& settings);
0033 
0034   // Calculate string length of a single particle.
0035   // The first vector is the 4 vector of the particle.
0036   // The second vector represents (1,0,0,0) in dipole restframe.
0037   double getLength(const Vec4& p, const Vec4& v, bool isJunc = false) const;
0038 
0039   // Calculate string length for two indices in the event record.
0040   double getStringLength(Event& event, int i, int j);
0041 
0042   // Calculate string length for two particles given their four-momenta.
0043   double getStringLength(Vec4 p1, Vec4 p2) const;
0044 
0045   // Calculate the length of a single junction given the 3 entries in event.
0046   double getJuncLength(Event& event, int i, int j, int k);
0047 
0048   // Calculate the length of a single junction given the 3 four-momenta.
0049   double getJuncLength(const Vec4& p1, const Vec4& p2, const Vec4& p3) const;
0050 
0051   // Calculate the length of a double junction given the 4 entries in event.
0052   // The first two are expected to be quarks, the second two to be antiquarks.
0053   double getJuncLength(Event& event, int i, int j, int k, int l);
0054 
0055   // Calculate the length of a double junction given the 4 four-momenta.
0056   // The first two are expected to be quarks, the second two to be antiquarks.
0057   double getJuncLength(const Vec4& p1, const Vec4& p2, const Vec4& p3,
0058     const Vec4& p4) const;
0059 
0060 private:
0061 
0062   static const double TINY, MINANGLE;
0063 
0064   // Pointer to logger.
0065   Logger* loggerPtr;
0066 
0067   double m0, sqrt2, juncCorr;
0068   int lambdaForm;
0069 
0070   // Pointer to various information on the generation.
0071   Info* infoPtr;
0072 
0073   // This is only to access the function call junctionRestFrame.
0074   StringFragmentation stringFragmentation;
0075 
0076 };
0077 
0078 //==========================================================================
0079 
0080 } // end namespace Pythia8
0081 
0082 #endif // Pythia8_StringLength_H