File indexing completed on 2025-01-18 10:06:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef Pythia8_PartonSystems_H
0011 #define Pythia8_PartonSystems_H
0012
0013 #include "Pythia8/PythiaStdlib.h"
0014
0015 namespace Pythia8 {
0016
0017
0018
0019
0020
0021
0022 class PartonSystem {
0023
0024 public:
0025
0026
0027 PartonSystem() : hard(false), iInA(0), iInB(0), iInRes(0), sHat(0.),
0028 pTHat(0.) {iOut.reserve(10);}
0029
0030
0031 bool hard;
0032 int iInA, iInB, iInRes;
0033 vector<int> iOut;
0034 double sHat, pTHat;
0035
0036 };
0037
0038
0039
0040
0041
0042 class PartonSystems {
0043
0044 public:
0045
0046
0047 PartonSystems() {systems.resize(0);}
0048
0049
0050 void clear() {systems.resize(0);}
0051
0052
0053 int addSys() {systems.push_back(PartonSystem());
0054 return systems.size() - 1;}
0055 int sizeSys() const {return systems.size();}
0056
0057
0058 void setHard(int iSys, bool hard) {systems[iSys].hard = hard;}
0059 void setInA(int iSys, int iPos) {systems[iSys].iInA = iPos;}
0060 void setInB(int iSys, int iPos) {systems[iSys].iInB = iPos;}
0061 void setInRes(int iSys, int iPos) {systems[iSys].iInRes = iPos;}
0062 void addOut(int iSys, int iPos) {systems[iSys].iOut.push_back(iPos);}
0063 void popBackOut(int iSys) {systems[iSys].iOut.pop_back();}
0064 void setOut(int iSys, int iMem, int iPos) {systems[iSys].iOut[iMem] = iPos;}
0065 void replace(int iSys, int iPosOld, int iPosNew);
0066 void setSHat(int iSys, double sHatIn) {systems[iSys].sHat = sHatIn;}
0067 void setPTHat(int iSys, double pTHatIn) {systems[iSys].pTHat = pTHatIn;}
0068 void setSizeSys(int iSize) {systems.resize(iSize);}
0069
0070
0071 bool hasInAB(int iSys) const {return ( (systems[iSys].iInA > 0)
0072 && (systems[iSys].iInB > 0) ) ;}
0073 bool hasInRes(int iSys) const {return (systems[iSys].iInRes > 0);}
0074 bool getHard(int iSys) const {return systems[iSys].hard;}
0075 int getInA(int iSys) const {return systems[iSys].iInA;}
0076 int getInB(int iSys) const {return systems[iSys].iInB;}
0077 int getInRes(int iSys) const {return systems[iSys].iInRes;}
0078 int sizeOut(int iSys) const {return systems[iSys].iOut.size();}
0079 int getOut(int iSys, int iMem) const {return systems[iSys].iOut[iMem];}
0080 int sizeAll(int iSys) const {return (systems[iSys].iOut.size()
0081 + (hasInAB(iSys) ? 2 : 0) + (hasInRes(iSys) ? 1 : 0));}
0082 int getAll(int iSys, int iMem) const;
0083 double getSHat(int iSys) const {return systems[iSys].sHat;}
0084 double getPTHat(int iSys) const {return systems[iSys].pTHat;}
0085
0086
0087 int getSystemOf(int iPos, bool alsoIn = false) const;
0088
0089
0090 int getIndexOfOut(int iSys, int iPos) const;
0091
0092
0093 void list() const;
0094
0095
0096 void popBack() { systems.pop_back(); }
0097
0098 private:
0099
0100
0101 vector<PartonSystem> systems;
0102
0103 };
0104
0105
0106
0107 }
0108
0109 #endif