File indexing completed on 2025-01-18 10:06:19
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef Pythia8_BeamSetup_H
0010 #define Pythia8_BeamSetup_H
0011
0012 #include "Pythia8/Basics.h"
0013 #include "Pythia8/BeamParticle.h"
0014 #include "Pythia8/BeamShape.h"
0015 #include "Pythia8/HadronLevel.h"
0016 #include "Pythia8/Info.h"
0017 #include "Pythia8/LesHouches.h"
0018 #include "Pythia8/ParticleData.h"
0019 #include "Pythia8/PartonDistributions.h"
0020 #include "Pythia8/PartonLevel.h"
0021 #include "Pythia8/PhysicsBase.h"
0022 #include "Pythia8/ProcessLevel.h"
0023 #include "Pythia8/PythiaStdlib.h"
0024 #include "Pythia8/Settings.h"
0025
0026 namespace Pythia8 {
0027
0028
0029
0030
0031
0032
0033 class BeamSetup : public PhysicsBase {
0034
0035 public:
0036
0037
0038 BeamSetup() = default;
0039
0040
0041 bool setPDFPtr( PDFPtr pdfAPtrIn, PDFPtr pdfBPtrIn,
0042 PDFPtr pdfHardAPtrIn = nullptr, PDFPtr pdfHardBPtrIn = nullptr,
0043 PDFPtr pdfPomAPtrIn = nullptr, PDFPtr pdfPomBPtrIn = nullptr,
0044 PDFPtr pdfGamAPtrIn = nullptr, PDFPtr pdfGamBPtrIn = nullptr,
0045 PDFPtr pdfHardGamAPtrIn = nullptr, PDFPtr pdfHardGamBPtrIn = nullptr,
0046 PDFPtr pdfUnresAPtrIn = nullptr, PDFPtr pdfUnresBPtrIn = nullptr,
0047 PDFPtr pdfUnresGamAPtrIn = nullptr, PDFPtr pdfUnresGamBPtrIn = nullptr,
0048 PDFPtr pdfVMDAPtrIn = nullptr, PDFPtr pdfVMDBPtrIn = nullptr);
0049 bool setPDFAPtr( PDFPtr pdfAPtrIn );
0050 bool setPDFBPtr( PDFPtr pdfBPtrIn );
0051
0052
0053 bool setPhotonFluxPtr( PDFPtr photonFluxAIn, PDFPtr photonFluxBIn) {
0054 if ( photonFluxAIn ) pdfGamFluxAPtr = photonFluxAIn;
0055 if ( photonFluxBIn ) pdfGamFluxBPtr = photonFluxBIn;
0056 return true;}
0057
0058
0059 bool setLHAupPtr( LHAupPtr lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn;
0060 useNewLHA = false; return true;}
0061
0062
0063
0064 int represent(int idIn) const;
0065
0066
0067 bool setBeamIDs( int idAin, int idBin = 0);
0068
0069
0070 bool setKinematics(double eCMIn);
0071 bool setKinematics(double eAIn, double eBIn);
0072 bool setKinematics(double pxAIn, double pyAIn, double pzAIn,
0073 double pxBIn, double pyBIn, double pzBIn);
0074 bool setKinematics(Vec4 pAIn, Vec4 pBIn);
0075
0076
0077 bool setBeamShapePtr( BeamShapePtr beamShapePtrIn) {
0078 beamShapePtr = beamShapePtrIn; return true;}
0079
0080
0081 BeamShapePtr getBeamShapePtr() { return beamShapePtr; }
0082
0083
0084 PDFPtr getPDFPtr(int idIn, int sequence = 1, string beam = "A",
0085 bool resolved = true);
0086
0087
0088 map<string, PDFPtr> getPDFPtr();
0089
0090
0091 bool initFrame();
0092
0093
0094 bool initBeams(bool doNonPertIn, StringFlav* flavSelPtr);
0095
0096
0097 bool getVMDsideA() { return doVMDsideA; }
0098 bool getVMDsideB() { return doVMDsideB; }
0099
0100
0101 void clear();
0102
0103
0104 void newValenceContent();
0105
0106
0107 void nextKinematics();
0108
0109
0110 void boostAndVertex( Event& process, Event& event, bool toLab,
0111 bool setVertex);
0112
0113
0114 void list() const { beamA.list(); beamB.list(); }
0115
0116
0117 bool doLHA = false, useNewLHA = false, skipInit = false,
0118 doMomentumSpread = {}, doVertexSpread = {}, doVarEcm = {},
0119 allowIDAswitch = {}, hasSwitchedIDs = {}, beamA2gamma = {},
0120 beamB2gamma = {};
0121 int idA = {}, idB = {}, frameType = {}, boostType = {}, iPDFAsave = {},
0122 gammaMode = {};
0123 double mA = {}, mB = {}, pxA = {}, pxB = {}, pyA = {}, pyB = {}, pzA = {},
0124 pzB = {}, eA = {}, eB = {}, pzAcm = {}, pzBcm = {}, eCM = {},
0125 betaZ = {}, gammaZ = {};
0126 Vec4 pAinit = {}, pBinit = {}, pAnow = {}, pBnow = {};
0127 RotBstMatrix MfromCM = {}, MtoCM = {};
0128 LHAupPtr lhaUpPtr = {};
0129
0130
0131 BeamParticle beamA = {};
0132 BeamParticle beamB = {};
0133
0134
0135 BeamParticle beamPomA = {};
0136 BeamParticle beamPomB = {};
0137
0138
0139 BeamParticle beamGamA = {};
0140 BeamParticle beamGamB = {};
0141
0142
0143 BeamParticle beamVMDA = {};
0144 BeamParticle beamVMDB = {};
0145
0146
0147 vector<int> idAList = { 2212, 211, 311, 221,
0148 331, 333, 411, 431, 443, 511, 531, 541, 553, 3212, 3312, 3334,
0149 4112, 4312, 4332, 5112, 5312, 5332};
0150
0151 protected:
0152
0153 void onInitInfoPtr() override {
0154 registerSubObject(beamA);
0155 registerSubObject(beamB);
0156 registerSubObject(beamPomA);
0157 registerSubObject(beamPomB);
0158 registerSubObject(beamGamA);
0159 registerSubObject(beamGamB);
0160 registerSubObject(beamVMDA);
0161 registerSubObject(beamVMDB);
0162 }
0163
0164 private:
0165
0166
0167 bool doNonPert = {}, doDiffraction = {}, doSoftQCD = {},
0168 doHardDiff = {}, doProcessLevel = {}, doPartonVertex = {},
0169 doVertexPlane = {}, isUnresolvedA = {}, isUnresolvedB = {},
0170 doVMDsideA = {}, doVMDsideB = {}, beamAResGamma = {},
0171 beamBResGamma = {}, beamAUnresGamma = {}, beamBUnresGamma = {};
0172
0173
0174 PDFPtr pdfAPtr = {}, pdfBPtr = {}, pdfHardAPtr = {}, pdfHardBPtr = {},
0175 pdfPomAPtr = {}, pdfPomBPtr = {}, pdfGamAPtr = {}, pdfGamBPtr = {},
0176 pdfHardGamAPtr = {}, pdfHardGamBPtr = {}, pdfUnresAPtr = {},
0177 pdfUnresBPtr = {}, pdfUnresGamAPtr = {}, pdfUnresGamBPtr = {},
0178 pdfGamFluxAPtr = {}, pdfGamFluxBPtr = {}, pdfVMDAPtr = {},
0179 pdfVMDBPtr = {};
0180
0181
0182 vector<PDFPtr> pdfASavePtrs = {};
0183
0184
0185 BeamShapePtr beamShapePtr = {};
0186
0187
0188 bool checkBeams();
0189
0190
0191 bool initKinematics();
0192
0193
0194 bool initPDFs();
0195
0196
0197 PDFPtr initLHAPDF(int idIn, string cfg);
0198
0199 };
0200
0201
0202
0203 }
0204
0205 #endif