File indexing completed on 2025-01-18 10:06:28
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef Pythia8_PartonLevel_H
0010 #define Pythia8_PartonLevel_H
0011
0012 #include "Pythia8/Basics.h"
0013 #include "Pythia8/BeamParticle.h"
0014 #include "Pythia8/BeamRemnants.h"
0015 #include "Pythia8/Event.h"
0016 #include "Pythia8/HardDiffraction.h"
0017 #include "Pythia8/Info.h"
0018 #include "Pythia8/JunctionSplitting.h"
0019 #include "Pythia8/MergingHooks.h"
0020 #include "Pythia8/MultipartonInteractions.h"
0021 #include "Pythia8/ParticleData.h"
0022 #include "Pythia8/PartonSystems.h"
0023 #include "Pythia8/PartonVertex.h"
0024 #include "Pythia8/PhysicsBase.h"
0025 #include "Pythia8/PythiaStdlib.h"
0026 #include "Pythia8/ResonanceDecays.h"
0027 #include "Pythia8/RHadrons.h"
0028 #include "Pythia8/Settings.h"
0029 #include "Pythia8/Settings.h"
0030 #include "Pythia8/SharedPointers.h"
0031 #include "Pythia8/SigmaTotal.h"
0032 #include "Pythia8/SpaceShower.h"
0033 #include "Pythia8/StandardModel.h"
0034 #include "Pythia8/StringLength.h"
0035 #include "Pythia8/TimeShower.h"
0036 #include "Pythia8/UserHooks.h"
0037
0038 namespace Pythia8 {
0039
0040
0041
0042
0043
0044
0045 class PartonLevel : public PhysicsBase {
0046
0047 public:
0048
0049
0050 PartonLevel() = default;
0051
0052
0053 bool init( TimeShowerPtr timesDecPtrIn, TimeShowerPtr timesPtrIn,
0054 SpaceShowerPtr spacePtrIn, RHadrons* rHadronsPtrIn,
0055 MergingHooksPtr mergingHooksPtr, PartonVertexPtr partonVertexPtrIn,
0056 StringIntPtr stringInteractionPtrIn,
0057 bool useAsTrial);
0058
0059
0060
0061 void initSwitchID( const vector<int>& idAList) {
0062 multiMB.initSwitchID( idAList);
0063 multiSDA.initSwitchID( idAList);}
0064
0065
0066 void setBeamID(int iPDFA = 0) {multiMB.setBeamID(iPDFA);
0067 multiSDA.setBeamID(iPDFA);}
0068
0069
0070 bool next( Event& process, Event& event);
0071
0072
0073 void setupShowerSys( Event& process, Event& event);
0074 bool resonanceShowers( Event& process, Event& event, bool skipForR);
0075
0076
0077 bool wzDecayShowers( Event& event);
0078
0079
0080 bool hasVetoed() const {return doVeto;}
0081 bool hasVetoedDiff() const {return doDiffVeto;}
0082 bool hasVetoedMerging() const {return doMergingVeto;}
0083
0084
0085 void accumulate() {if (isResolved && !isDiff) multiPtr->accumulate();}
0086 void statistics(bool reset = false) {
0087 if (doMPI) multiMB.statistics(reset);}
0088 void resetStatistics() { if (doMPI) multiMB.resetStatistics(); }
0089
0090
0091 void resetTrial();
0092
0093 double pTLastInShower() { return pTLastBranch; }
0094
0095 int typeLastInShower() { return typeLastBranch; }
0096
0097
0098 bool canEnhanceTrial() { return doEnhanceTrial; }
0099
0100 double getEnhancedTrialPT() {
0101 if (canEnhanceTrial()) return infoPtr->weightContainerPtr->
0102 weightsSimpleShower.getEnhancedTrialPT();
0103 return 0.;
0104 }
0105
0106 double getEnhancedTrialWeight() {
0107 if (canEnhanceTrial()) return infoPtr->weightContainerPtr->
0108 weightsSimpleShower.getEnhancedTrialWeight();
0109 return 1.;
0110 }
0111
0112
0113 BeamParticle* beamHadAPtr{};
0114 BeamParticle* beamHadBPtr{};
0115
0116
0117 TimeShowerPtr timesDecPtr{};
0118 TimeShowerPtr timesPtr{};
0119
0120
0121 SpaceShowerPtr spacePtr{};
0122
0123 protected:
0124
0125 virtual void onInitInfoPtr() override {
0126 registerSubObject(multiMB);
0127 registerSubObject(multiSDA);
0128 registerSubObject(multiSDB);
0129 registerSubObject(multiCD);
0130 registerSubObject(multiGmGm);
0131 registerSubObject(remnants);
0132 registerSubObject(resonanceDecays);
0133 registerSubObject(junctionSplitting);
0134 registerSubObject(hardDiffraction);
0135 }
0136
0137 private:
0138
0139
0140 static const int NTRY;
0141
0142
0143 bool doNonDiff{}, doDiffraction{}, doMPI{}, doMPIMB{}, doMPISDA{},
0144 doMPISDB{}, doMPICD{}, doMPIinit{}, doISR{}, doFSRduringProcess{},
0145 doFSRafterProcess{}, doFSRinResonances{}, doInterleaveResDec{},
0146 doRemnants{}, doSecondHard{}, hasOneLeptonBeam{}, hasTwoLeptonBeams{},
0147 hasPointLeptons{}, canVetoPT{}, canVetoStep{}, canVetoMPIStep{},
0148 canVetoEarly{}, canSetScale{}, allowRH{}, earlyResDec{},
0149 vetoWeakJets{}, canReconResSys{}, doReconnect{}, doHardDiff{},
0150 forceResonanceCR{}, doNDgamma{}, doMPIgmgm{}, showUnresGamma{};
0151 int pTmaxMatchMPI;
0152 double mMinDiff{}, mWidthDiff{}, pMaxDiff{}, vetoWeakDeltaR2{};
0153
0154
0155 bool doVeto{};
0156 int nMPI{}, nISR{}, nFSRinProc{}, nFSRinRes{}, nISRhard{}, nFSRhard{},
0157 typeLatest{}, nVetoStep{}, typeVetoStep{}, nVetoMPIStep{}, iSysNow{},
0158 reconnectMode{}, hardDiffSide{}, sampleTypeDiff{};
0159 double pTsaveMPI{}, pTsaveISR{}, pTsaveFSR{}, pTvetoPT{};
0160
0161
0162 bool isNonDiff{}, isDiffA{}, isDiffB{}, isDiffC{}, isDiff{},
0163 isSingleDiff{}, isDoubleDiff{}, isCentralDiff{},
0164 isResolved{}, isResolvedA{}, isResolvedB{}, isResolvedC{},
0165 isHardDiffA{}, isHardDiffB{}, isHardDiff{}, doDiffVeto{},
0166 hardDiffSet{}, isElastic{}, twoHard{};
0167 int sizeProcess{}, sizeEvent{}, nHardDone{}, nHardDoneRHad{}, iDS{};
0168 double eCMsave;
0169 vector<bool> inRHadDecay;
0170 vector<int> iPosBefShow;
0171
0172
0173 bool hasGammaA{}, hasGammaB{}, beamHasGamma{}, beamAisGamma{},
0174 beamBisGamma{}, beamAhasGamma{}, beamBhasGamma{}, beamAhasResGamma{},
0175 beamBhasResGamma{}, beamHasResGamma{}, isGammaHadronDir{},
0176 sampleQ2gamma{};
0177 int gammaMode{}, gammaModeEvent{}, gammaOffset{};
0178 double eCMsaveGamma{};
0179
0180
0181 PartonVertexPtr partonVertexPtr{};
0182
0183
0184 MultipartonInteractions multiMB;
0185 MultipartonInteractions multiSDA;
0186 MultipartonInteractions multiSDB;
0187 MultipartonInteractions multiCD;
0188 MultipartonInteractions* multiPtr{};
0189 MultipartonInteractions multiGmGm;
0190
0191
0192 BeamRemnants remnants;
0193
0194
0195 RHadrons* rHadronsPtr{};
0196
0197
0198 ResonanceDecays resonanceDecays;
0199
0200
0201 ColRecPtr colourReconnectionPtr{};
0202
0203
0204 JunctionSplitting junctionSplitting;
0205
0206
0207 HardDiffraction hardDiffraction;
0208
0209
0210 int decideResolvedDiff( Event& process);
0211
0212
0213 bool setupUnresolvedSys( Event& process, Event& event);
0214
0215
0216 void setupHardSys( Event& process, Event& event);
0217
0218
0219 void setupResolvedDiff( Event& process);
0220
0221
0222 void leaveResolvedDiff( int iHardLoop, Event& process, Event& event);
0223
0224
0225 void setupHardDiff( Event& process);
0226
0227
0228 void leaveHardDiff( Event& process, Event& event, bool physical = true);
0229
0230
0231 bool setupResolvedLeptonGamma( Event& process);
0232
0233
0234
0235 void leaveResolvedLeptonGamma( Event& process, Event& event,
0236 bool physical = true);
0237
0238
0239 void saveGammaModeEvent( int gammaModeA, int gammaModeB);
0240
0241
0242 void cleanEventFromGamma( Event& event);
0243
0244
0245 MergingHooksPtr mergingHooksPtr{};
0246
0247 bool doTrial{};
0248 bool doEnhanceTrial{};
0249 int nTrialEmissions{};
0250
0251 double pTLastBranch{};
0252 int typeLastBranch{};
0253
0254 bool canRemoveEvent{}, canRemoveEmission{}, doMergingVeto{};
0255
0256 };
0257
0258
0259
0260 }
0261
0262 #endif