/usr/include/Pythia8/Pythia8/FragmentationSystems.h is in libpythia8-dev 8.1.86-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | // FragmentationSystems.h is a part of the PYTHIA event generator.
// Copyright (C) 2014 Torbjorn Sjostrand.
// PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
// Please respect the MCnet Guidelines, see GUIDELINES for details.
// This file contains auxiliary classes in the fragmentation process.
// ColSinglet contains info on an individual singlet.
// ColConfig describes the colour configuration of the whole event.
// StringRegion keeps track on string momenta and directions.
// StringSystem contains all the StringRegions of the colour singlet.
#ifndef Pythia8_FragmentationSystems_H
#define Pythia8_FragmentationSystems_H
#include "Pythia8/Basics.h"
#include "Pythia8/Event.h"
#include "Pythia8/FragmentationFlavZpT.h"
#include "Pythia8/Info.h"
#include "Pythia8/ParticleData.h"
#include "Pythia8/PythiaStdlib.h"
#include "Pythia8/Settings.h"
namespace Pythia8 {
//==========================================================================
// The ColSinglet class contains info on an individual singlet.
// Only to be used inside ColConfig, so no private members.
class ColSinglet {
public:
// Constructors.
ColSinglet() : pSum(0., 0., 0., 0.), mass(0.), massExcess(0.),
hasJunction(false), isClosed(false), isCollected(false) {}
ColSinglet(vector<int>& iPartonIn, Vec4 pSumIn, double massIn,
double massExcessIn, bool hasJunctionIn = false,
bool isClosedIn = false, bool isCollectedIn = false)
: iParton(iPartonIn), pSum(pSumIn), mass(massIn),
massExcess(massExcessIn), hasJunction(hasJunctionIn),
isClosed(isClosedIn), isCollected(isCollectedIn) {}
// Size of iParton array.
int size() const { return iParton.size();}
// Stored quantities.
vector<int> iParton;
Vec4 pSum;
double mass, massExcess;
bool hasJunction, isClosed, isCollected;
};
//==========================================================================
// The ColConfig class describes the colour configuration of the whole event.
class ColConfig {
public:
// Constructor.
ColConfig() {singlets.resize(0);}
// Initialize and save pointers.
void init(Info* infoPtrIn, Settings& settings, StringFlav* flavSelPtrIn);
// Number of colour singlets.
int size() const {return singlets.size();}
// Overload index operator to access separate colour singlets.
ColSinglet& operator[](int iSub) {return singlets[iSub];}
// Clear contents.
void clear() {singlets.resize(0);}
// Insert a new colour singlet system in ascending mass order.
// Calculate its properties. Join nearby partons.
bool insert( vector<int>& iPartonIn, Event& event);
// Erase a colour singlet system. (Rare operation.)
void erase(int iSub) {singlets.erase(singlets.begin() + iSub);}
// Collect all partons of singlet to be consecutively ordered.
void collect(int iSub, Event& event, bool skipTrivial = true);
// Find to which singlet system a particle belongs.
int findSinglet(int i);
// List all currently identified singlets.
void list(ostream& os = cout) const;
private:
// Constants: could only be changed in the code itself.
static const double CONSTITUENTMASS;
// Pointer to various information on the generation.
Info* infoPtr;
// Pointer to class for flavour generation.
StringFlav* flavSelPtr;
// Initialization data, to be read from Settings.
double mJoin, mJoinJunction, mStringMin;
// List of all separate colour singlets.
vector<ColSinglet> singlets;
// Join two legs of junction to a diquark for small invariant masses.
bool joinJunction( vector<int>& iPartonIn, Event& event,
double massExcessIn);
};
//==========================================================================
// The StringRegion class contains the information related to
// one string section in the evolution of a multiparton system.
// Only to be used inside StringFragmentation and MiniStringFragmentation,
// so no private members.
class StringRegion {
public:
// Constructor.
StringRegion() : isSetUp(false), isEmpty(true) {}
// Constants: could only be changed in the code itself.
static const double MJOIN, TINY;
// Data members.
bool isSetUp, isEmpty;
Vec4 pPos, pNeg, eX, eY;
double w2, xPosProj, xNegProj, pxProj, pyProj;
// Set up four-vectors for longitudinal and transverse directions.
void setUp(Vec4 p1, Vec4 p2, bool isMassless = false);
// Construct a four-momentum from (x+, x-, px, py).
Vec4 pHad( double xPosIn, double xNegIn, double pxIn, double pyIn)
{ return xPosIn * pPos + xNegIn * pNeg + pxIn * eX + pyIn * eY; }
// Project a four-momentum onto (x+, x-, px, py). Read out projection.
void project(Vec4 pIn);
void project( double pxIn, double pyIn, double pzIn, double eIn)
{ project( Vec4( pxIn, pyIn, pzIn, eIn) ); }
double xPos() const {return xPosProj;}
double xNeg() const {return xNegProj;}
double px() const {return pxProj;}
double py() const {return pyProj;}
};
//==========================================================================
// The StringSystem class contains the complete set of all string regions.
// Only to be used inside StringFragmentation, so no private members.
class StringSystem {
public:
// Constructor.
StringSystem() {}
// Set up system from parton list.
void setUp(vector<int>& iSys, Event& event);
// Calculate string region from (iPos, iNeg) pair.
int iReg( int iPos, int iNeg) const
{return (iPos * (indxReg - iPos)) / 2 + iNeg;}
// Reference to string region specified by (iPos, iNeg) pair.
StringRegion& region(int iPos, int iNeg) {return system[iReg(iPos, iNeg)];}
// Reference to low string region specified either by iPos or iNeg.
StringRegion& regionLowPos(int iPos) {
return system[iReg(iPos, iMax - iPos)]; }
StringRegion& regionLowNeg(int iNeg) {
return system[iReg(iMax - iNeg, iNeg)]; }
// Main content: a vector with all the string regions of the system.
vector<StringRegion> system;
// Other data members.
int sizePartons, sizeStrings, sizeRegions, indxReg, iMax;
double mJoin, m2Join;
};
//==========================================================================
} // end namespace Pythia8
#endif // Pythia8_FragmentationSystems_H
|