Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 09:03:48

0001 // Pythia.h is a part of the PYTHIA event generator.
0002 // Copyright (C) 2025 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 main class for event generation.
0007 // Pythia: provide the main user interface to everything else.
0008 
0009 #ifndef Pythia8_Pythia_H
0010 #define Pythia8_Pythia_H
0011 
0012 // Version number defined for use in macros and for consistency checks.
0013 #define PYTHIA_VERSION 8.315
0014 #define PYTHIA_VERSION_INTEGER 8315
0015 
0016 // Header files for the Pythia class and for what else the user may need.
0017 #include "Pythia8/Analysis.h"
0018 #include "Pythia8/Basics.h"
0019 #include "Pythia8/BeamParticle.h"
0020 #include "Pythia8/BeamSetup.h"
0021 #include "Pythia8/Event.h"
0022 #include "Pythia8/FragmentationFlavZpT.h"
0023 #include "Pythia8/HadronLevel.h"
0024 #include "Pythia8/HadronWidths.h"
0025 #include "Pythia8/Info.h"
0026 #include "Pythia8/JunctionSplitting.h"
0027 #include "Pythia8/LesHouches.h"
0028 #include "Pythia8/Logger.h"
0029 #include "Pythia8/SigmaLowEnergy.h"
0030 #include "Pythia8/Merging.h"
0031 #include "Pythia8/MergingHooks.h"
0032 #include "Pythia8/PartonLevel.h"
0033 #include "Pythia8/ParticleData.h"
0034 #include "Pythia8/PartonDistributions.h"
0035 #include "Pythia8/PartonSystems.h"
0036 #include "Pythia8/PartonVertex.h"
0037 #include "Pythia8/PhysicsBase.h"
0038 #include "Pythia8/ProcessLevel.h"
0039 #include "Pythia8/PythiaStdlib.h"
0040 #include "Pythia8/ResonanceWidths.h"
0041 #include "Pythia8/RHadrons.h"
0042 #include "Pythia8/Ropewalk.h"
0043 #include "Pythia8/Settings.h"
0044 #include "Pythia8/ShowerModel.h"
0045 #include "Pythia8/SigmaTotal.h"
0046 #include "Pythia8/SimpleSpaceShower.h"
0047 #include "Pythia8/SimpleTimeShower.h"
0048 #include "Pythia8/SpaceShower.h"
0049 #include "Pythia8/StandardModel.h"
0050 #include "Pythia8/StringInteractions.h"
0051 #include "Pythia8/SusyCouplings.h"
0052 #include "Pythia8/SLHAinterface.h"
0053 #include "Pythia8/TimeShower.h"
0054 #include "Pythia8/UserHooks.h"
0055 #include "Pythia8/VinciaCommon.h"
0056 #include "Pythia8/Weights.h"
0057 
0058 namespace Pythia8 {
0059 
0060 //==========================================================================
0061 
0062 // Forward declaration of the HeavyIons and HIUserHooks classes.
0063 class HeavyIons;
0064 class HIUserHooks;
0065 
0066 // Forward declaration of PythiaParallel class, to be friended.
0067 class PythiaParallel;
0068 
0069 // The Pythia class contains the top-level routines to generate an event.
0070 
0071 class Pythia {
0072 
0073 public:
0074 
0075   // Constructor. (See Pythia.cc file.)
0076   Pythia(string xmlDir = "../share/Pythia8/xmldoc", bool printBanner = true);
0077 
0078   // Constructor to copy settings and particle database from another Pythia
0079   // object instead of XML files (to speed up multiple initialisations).
0080   Pythia(Settings& settingsIn, ParticleData& particleDataIn,
0081     bool printBanner = true);
0082 
0083   // Constructor taking input from streams instead of files.
0084   Pythia( istream& settingsStrings, istream& particleDataStrings,
0085     bool printBanner = true);
0086 
0087   // Destructor.
0088   ~Pythia() {}
0089 
0090   // Copy and = constructors cannot be used.
0091   Pythia(const Pythia&) = delete;
0092   Pythia& operator=(const Pythia&) = delete;
0093 
0094   // Check consistency of version numbers (called by constructors).
0095   bool checkVersion();
0096 
0097   // Read in one update for a setting or particle data from a single line.
0098   inline bool readString(string line, bool warn = true,
0099     int subrun = SUBRUNDEFAULT) {
0100     return isConstructed ? settings.readString(line, warn, subrun) : false;}
0101 
0102   // Read in updates for settings or particle data from user-defined file.
0103   inline bool readFile(string fileName, bool warn = true,
0104     int subrun = SUBRUNDEFAULT) {
0105     return isConstructed ? settings.readFile(fileName, warn, subrun) : false;}
0106   inline bool readFile(string fileName, int subrun) {
0107     return readFile(fileName, true, subrun);}
0108   inline bool readFile(istream& is = cin, bool warn = true,
0109     int subrun = SUBRUNDEFAULT) {
0110     return isConstructed ? settings.readFile(is, warn, subrun) : false;}
0111   inline bool readFile(istream& is, int subrun) {
0112     return readFile(is, true, subrun);}
0113 
0114   // Possibility to pass in pointers to PDF's.
0115   inline bool setPDFPtr(PDFPtr pdfAPtrIn, PDFPtr pdfBPtrIn,
0116     PDFPtr pdfHardAPtrIn = nullptr, PDFPtr pdfHardBPtrIn = nullptr,
0117     PDFPtr pdfPomAPtrIn = nullptr, PDFPtr pdfPomBPtrIn = nullptr,
0118     PDFPtr pdfGamAPtrIn = nullptr, PDFPtr pdfGamBPtrIn = nullptr,
0119     PDFPtr pdfHardGamAPtrIn = nullptr, PDFPtr pdfHardGamBPtrIn = nullptr,
0120     PDFPtr pdfUnresAPtrIn = nullptr, PDFPtr pdfUnresBPtrIn = nullptr,
0121     PDFPtr pdfUnresGamAPtrIn = nullptr, PDFPtr pdfUnresGamBPtrIn = nullptr,
0122     PDFPtr pdfVMDAPtrIn = nullptr, PDFPtr pdfVMDBPtrIn = nullptr) {
0123       return beamSetup.setPDFPtr( pdfAPtrIn, pdfBPtrIn, pdfHardAPtrIn,
0124       pdfHardBPtrIn, pdfPomAPtrIn, pdfPomBPtrIn, pdfGamAPtrIn, pdfGamBPtrIn,
0125       pdfHardGamAPtrIn, pdfHardGamBPtrIn, pdfUnresAPtrIn, pdfUnresBPtrIn,
0126       pdfUnresGamAPtrIn, pdfUnresGamBPtrIn, pdfVMDAPtrIn, pdfVMDBPtrIn); }
0127   inline bool setPDFAPtr( PDFPtr pdfAPtrIn ) {
0128     return beamSetup.setPDFAPtr( pdfAPtrIn); }
0129   inline bool setPDFBPtr( PDFPtr pdfBPtrIn ) {
0130     return beamSetup.setPDFBPtr( pdfBPtrIn); }
0131 
0132   // Set photon fluxes externally. Used with option "PDF:lepton2gammaSet = 2".
0133   inline bool setPhotonFluxPtr(PDFPtr photonFluxAIn, PDFPtr photonFluxBIn) {
0134     return beamSetup.setPhotonFluxPtr( photonFluxAIn, photonFluxBIn); }
0135 
0136   // Possibility to pass in pointer to external LHA-interfaced generator.
0137   inline bool setLHAupPtr(LHAupPtr lhaUpPtrIn) {
0138     lhaUpPtr = lhaUpPtrIn;
0139     useNewLHA = false;
0140     return beamSetup.setLHAupPtr(lhaUpPtrIn);}
0141 
0142   // Possibility to pass in pointer for external handling of some decays.
0143   inline bool setDecayPtr(DecayHandlerPtr decayHandlePtrIn,
0144     vector<int> handledParticlesIn = {}) {
0145     decayHandlePtr = decayHandlePtrIn;
0146     handledParticles = handledParticlesIn.size() == 0 ?
0147       decayHandlePtrIn->handledParticles() : handledParticlesIn; return true;}
0148 
0149   // Possibility to pass in pointer for external random number generation.
0150   inline bool setRndmEnginePtr(RndmEnginePtr rndmEnginePtrIn) {
0151     return rndm.rndmEnginePtr(rndmEnginePtrIn);}
0152 
0153   // Possibility to pass in pointer for user hooks.
0154   inline bool setUserHooksPtr(UserHooksPtr userHooksPtrIn) {
0155     userHooksPtr = userHooksPtrIn; return true;}
0156 
0157   // Possibility to add further pointers to allow multiple user hooks.
0158   inline bool addUserHooksPtr(UserHooksPtr userHooksPtrIn) {
0159     if ( !userHooksPtrIn ) return false;
0160     if ( !userHooksPtr ) return setUserHooksPtr(userHooksPtrIn);
0161     shared_ptr<UserHooksVector> uhv =
0162       dynamic_pointer_cast<UserHooksVector>(userHooksPtr);
0163     if ( !uhv ) { uhv = make_shared<UserHooksVector>();
0164       uhv->hooks.push_back(userHooksPtr); userHooksPtr = uhv; }
0165     uhv->hooks.push_back(userHooksPtrIn); return true;}
0166 
0167   // Possibility to insert a user hook.
0168   inline bool insertUserHooksPtr(int idx, UserHooksPtr userHooksPtrIn) {
0169     if ( !userHooksPtrIn || !userHooksPtr ) return false;
0170     shared_ptr<UserHooksVector> uhv =
0171       dynamic_pointer_cast<UserHooksVector>(userHooksPtr);
0172     if ( !uhv || idx < 0 || idx > (int)uhv->hooks.size() ) return false;
0173     uhv->hooks.insert(uhv->hooks.begin() + idx, userHooksPtrIn); return true;}
0174 
0175   // Possibility to pass in pointer for full merging class.
0176   inline bool setMergingPtr(MergingPtr mergingPtrIn) {
0177     mergingPtr = mergingPtrIn; return true;}
0178 
0179   // Possibility to pass in pointer for merging hooks.
0180   inline bool setMergingHooksPtr(MergingHooksPtr mergingHooksPtrIn) {
0181     mergingHooksPtr = mergingHooksPtrIn; return true;}
0182 
0183   // Possibility to pass in pointer for beam shape.
0184   inline bool setBeamShapePtr(BeamShapePtr beamShapePtrIn) {
0185     return beamSetup.setBeamShapePtr(beamShapePtrIn);}
0186 
0187   // Possibility to pass in pointer for external cross section,
0188   // with option to include external phase-space generator.
0189   inline bool setSigmaPtr(SigmaProcessPtr sigmaPtrIn,
0190     PhaseSpacePtr phaseSpacePtrIn = nullptr) {
0191     sigmaPtrs.resize(0), phaseSpacePtrs.resize(0);
0192     sigmaPtrs.push_back(sigmaPtrIn);
0193     phaseSpacePtrs.push_back(phaseSpacePtrIn); return true;}
0194 
0195   // Possibility to add further pointers to allow for multiple cross sections.
0196   inline bool addSigmaPtr(SigmaProcessPtr sigmaPtrIn,
0197     PhaseSpacePtr phaseSpacePtrIn = nullptr) {
0198     sigmaPtrs.push_back(sigmaPtrIn);
0199     phaseSpacePtrs.push_back(phaseSpacePtrIn); return true;}
0200 
0201   // Possibility to insert further pointers to allow for multiple
0202   // cross sections.
0203   inline bool insertSigmaPtr(int idx, SigmaProcessPtr sigmaPtrIn,
0204     PhaseSpacePtr phaseSpacePtrIn = nullptr) {
0205     if (idx < 0 || idx > (int)sigmaPtrs.size()) return false;
0206     sigmaPtrs.insert(sigmaPtrs.begin() + idx, sigmaPtrIn);
0207     phaseSpacePtrs.insert(phaseSpacePtrs.begin() + idx, phaseSpacePtrIn);
0208     return true;}
0209 
0210   // Possibility to pass in pointer for external resonance.
0211   inline bool setResonancePtr(ResonanceWidthsPtr resonancePtrIn) {
0212     resonancePtrs.resize(0);
0213     resonancePtrs.push_back( resonancePtrIn); return true;}
0214 
0215   // Possibility to add further pointers to allow for multiple resonances.
0216   inline bool addResonancePtr(ResonanceWidthsPtr resonancePtrIn) {
0217     resonancePtrs.push_back( resonancePtrIn); return true;}
0218 
0219   // Possibility to insert further pointers to allow for multiple resonances.
0220   inline bool insertResonancePtr(int idx, ResonanceWidthsPtr resonancePtrIn) {
0221     if (idx < 0 || idx > (int)resonancePtrs.size()) return false;
0222     resonancePtrs.insert( resonancePtrs.begin() + idx, resonancePtrIn);
0223     return true;}
0224 
0225   // Possibility to pass in pointer for external showers.
0226   inline bool setShowerModelPtr(ShowerModelPtr showerModelPtrIn) {
0227     showerModelPtr = showerModelPtrIn; return true;}
0228 
0229   // Possibility to pass in pointer for external fragmentation model.
0230   inline bool setFragmentationPtr(FragmentationModelPtr fragmentationPtrIn) {
0231     fragPtrs.resize(0);
0232     fragPtrs.push_back(fragmentationPtrIn); return true;}
0233 
0234   // Possibility to allow for multiple external fragmentation models.
0235   inline bool addFragmentationPtr(FragmentationModelPtr fragmentationPtrIn) {
0236     fragPtrs.push_back(fragmentationPtrIn); return true;}
0237 
0238   // Possibility to insert external fragmentation model, in specific position.
0239   inline bool insertFragmentationPtr(int idx,
0240     FragmentationModelPtr fragmentationPtrIn) {
0241     if (idx < 0 || idx > (int)fragPtrs.size()) return false;
0242     fragPtrs.insert( fragPtrs.begin() + idx, fragmentationPtrIn);
0243     return true;}
0244 
0245   // Possibility to pass in pointer for modelling of heavy ion collisions.
0246   inline bool setHeavyIonsPtr(HeavyIonsPtr heavyIonsPtrIn) {
0247     heavyIonsPtr = heavyIonsPtrIn; return true;}
0248 
0249   // Possibility to pass a HIUserHooks pointer for modifying the
0250   // behavior of the heavy ion modelling.
0251   inline bool setHIHooks(HIUserHooksPtr hiHooksPtrIn) {
0252     hiHooksPtr = hiHooksPtrIn; return true; }
0253 
0254   // Possibility to get the pointer to a object modelling heavy ion
0255   // collisions.
0256   inline HeavyIonsPtr getHeavyIonsPtr() { return heavyIonsPtr;}
0257 
0258   // Possibility to access the pointer to the BeamShape object.
0259   inline BeamShapePtr getBeamShapePtr() { return beamSetup.getBeamShapePtr();}
0260 
0261   // Possibility to get the pointer to the parton-shower model.
0262   inline ShowerModelPtr getShowerModelPtr() { return showerModelPtr;}
0263 
0264   // Possibility to get the pointer to the LHA accessor.
0265   inline LHAupPtr getLHAupPtr() { return lhaUpPtr;}
0266 
0267   // Possibility to pass in pointer for setting of parton space-time vertices.
0268   inline bool setPartonVertexPtr( PartonVertexPtr partonVertexPtrIn) {
0269     partonVertexPtr = partonVertexPtrIn; return true;}
0270 
0271   // Initialize.
0272   bool init();
0273 
0274   // Generate the next event.
0275   inline bool next() { return next(0); }
0276   bool next(int procTypeIn);
0277 
0278   // Switch to new beam particle identities; for similar hadrons only.
0279   bool setBeamIDs( int idAin, int idBin = 0);
0280 
0281   // Switch beam kinematics.
0282   bool setKinematics(double eCMIn);
0283   bool setKinematics(double eAIn, double eBIn);
0284   bool setKinematics(double pxAIn, double pyAIn, double pzAIn,
0285                      double pxBIn, double pyBIn, double pzBIn);
0286   bool setKinematics(Vec4 pAIn, Vec4 pBIn);
0287 
0288   // Generate only a single timelike shower as in a decay.
0289   inline int forceTimeShower( int iBeg, int iEnd, double pTmax,
0290     int nBranchMax = 0) {
0291     if (!isInit) {
0292       logger.ERROR_MSG("Pythia is not properly initialized");
0293       return 0;
0294     }
0295     partonSystems.clear();
0296     infoPrivate.setScalup( 0, pTmax);
0297     return timesDecPtr->shower(iBeg, iEnd, event, pTmax, nBranchMax);}
0298 
0299   // Generate only the hadronization/decay stage.
0300   bool forceHadronLevel( bool findJunctions = true);
0301 
0302   // Special routine to allow more decays if on/off switches changed.
0303   bool moreDecays() {return hadronLevel.moreDecays(event);}
0304   bool moreDecays(int index) {return hadronLevel.decay(index, event);}
0305 
0306   // Special routine to force R-hadron decay when not done before.
0307   bool forceRHadronDecays() {return doRHadronDecays();}
0308 
0309   // Do a low-energy collision between two hadrons in the event record.
0310   inline bool doLowEnergyProcess(int i1, int i2, int procTypeIn) {
0311     if (!isInit) {
0312       logger.ERROR_MSG("Pythia is not properly initialized"); return false; }
0313     return hadronLevel.doLowEnergyProcess( i1, i2, procTypeIn, event); }
0314 
0315   // Get total cross section for two hadrons in the event record or standalone.
0316   inline double getSigmaTotal() {
0317     return getSigmaTotal(beamSetup.idA, beamSetup.idB, beamSetup.eCM, 0);}
0318   inline double getSigmaTotal(double eCM12, int mixLoHi = 0) {
0319     return getSigmaTotal(beamSetup.idA, beamSetup.idB, eCM12, mixLoHi);}
0320   inline double getSigmaTotal(int id1, int id2, double eCM12,
0321     int mixLoHi = 0) {
0322     return getSigmaTotal(id1, id2, eCM12, particleData.m0(id1),
0323       particleData.m0(id2), mixLoHi); }
0324   inline double getSigmaTotal(int id1, int id2, double eCM12, double m1,
0325     double m2, int mixLoHi = 0) {
0326     if (!isInit) {
0327       logger.ERROR_MSG("Pythia is not properly initialized"); return 0.; }
0328     return sigmaCmb.sigmaTotal(id1, id2, eCM12, m1, m2, mixLoHi); }
0329 
0330   // Get partial (elastic, diffractive, non-diffractive, ...) cross sections
0331   // for two hadrons in the event record or standalone.
0332   inline double getSigmaPartial(int procTypeIn) {
0333     return getSigmaPartial(beamSetup.idA, beamSetup.idB, beamSetup.eCM,
0334       procTypeIn, 0); }
0335   inline double getSigmaPartial(double eCM12, int procTypeIn,
0336     int mixLoHi = 0) {return getSigmaPartial(
0337       beamSetup.idA, beamSetup.idB, eCM12, procTypeIn, mixLoHi); }
0338   inline double getSigmaPartial(int id1, int id2, double eCM12, int procTypeIn,
0339     int mixLoHi = 0) {return getSigmaPartial(id1, id2, eCM12,
0340       particleData.m0(id1), particleData.m0(id2), procTypeIn, mixLoHi); }
0341   inline double getSigmaPartial(int id1, int id2, double eCM12, double m1,
0342     double m2, int procTypeIn, int mixLoHi = 0) {
0343     if (!isInit) {
0344       logger.ERROR_MSG("Pythia is not properly initialized"); return 0.;}
0345     return sigmaCmb.sigmaPartial(
0346       id1, id2, eCM12, m1, m2, procTypeIn, mixLoHi);}
0347 
0348   // Return a parton density set among list of possibilities.
0349   inline PDFPtr getPDFPtr(int idIn, int sequence = 1, string beam = "A",
0350     bool resolved = true) {
0351     return beamSetup.getPDFPtr( idIn, sequence, beam, resolved); }
0352 
0353   // List the current Les Houches event.
0354   inline void LHAeventList() { if (lhaUpPtr != 0) lhaUpPtr->listEvent();}
0355 
0356   // Skip a number of Les Houches events at input.
0357   inline bool LHAeventSkip(int nSkip) {
0358     if (lhaUpPtr != 0) return lhaUpPtr->skipEvent(nSkip);
0359     return false;}
0360 
0361   // Main routine to provide final statistics on generation.
0362   void stat();
0363 
0364   // Read in settings values: shorthand, not new functionality.
0365   bool   flag(string key) {return settings.flag(key);}
0366   int    mode(string key) {return settings.mode(key);}
0367   double parm(string key) {return settings.parm(key);}
0368   string word(string key) {return settings.word(key);}
0369 
0370   // The event record for the parton-level central process.
0371   Event           process = {};
0372 
0373   // The event record for the complete event history.
0374   Event           event = {};
0375 
0376   // Public information and statistic on the generation.
0377   const Info&     info = infoPrivate;
0378 
0379   // Logger: for diagnostic messages, errors, statistics, etc.
0380   Logger          logger = {};
0381 
0382   // Settings: databases of flags/modes/parms/words to control run.
0383   Settings        settings = {};
0384 
0385   // ParticleData: the particle data table/database.
0386   ParticleData    particleData = {};
0387 
0388   // Random number generator.
0389   Rndm            rndm = {};
0390 
0391   // Standard Model couplings, including alphaS and alphaEM.
0392   CoupSM          coupSM = {};
0393 
0394   // SUSY couplings.
0395   CoupSUSY        coupSUSY = {};
0396 
0397   // SLHA Interface
0398   SLHAinterface   slhaInterface = {};
0399 
0400   // The partonic content of each subcollision system (auxiliary to event).
0401   PartonSystems   partonSystems = {};
0402 
0403   // Merging object as wrapper for matrix element merging routines.
0404   MergingPtr      mergingPtr = {};
0405 
0406   // Pointer to MergingHooks object for user interaction with the merging.
0407   // MergingHooks also more generally steers the matrix element merging.
0408   MergingHooksPtr  mergingHooksPtr;
0409 
0410   // Pointer to a HeavyIons object for generating heavy ion collisions
0411   HeavyIonsPtr   heavyIonsPtr = {};
0412 
0413   // Pointer to a HIUserHooks object to modify heavy ion modelling.
0414   HIUserHooksPtr hiHooksPtr = {};
0415 
0416   // HadronWidths: the hadron widths data table/database.
0417   HadronWidths    hadronWidths = {};
0418 
0419   // The two incoming beams.
0420   const BeamParticle& beamA = beamSetup.beamA;
0421   const BeamParticle& beamB = beamSetup.beamB;
0422 
0423 private:
0424 
0425   // Friend PythiaParallel to give full access to underlying info.
0426   friend class PythiaParallel;
0427 
0428   // The collector of all event generation weights that should eventually
0429   // be transferred to the final output.
0430   WeightContainer weightContainer = {};
0431 
0432   // The main keeper/collector of information, accessible from all
0433   // PhysicsBase objects. The information is available from the
0434   // outside through the public info object.
0435   Info infoPrivate = {};
0436 
0437   // Initialise new Pythia object (called by constructors).
0438   void initPtrs();
0439 
0440   // Initialise user provided plugins.
0441   void initPlugins();
0442 
0443   // Functions to be called at the beginning and end of a next() call.
0444   void beginEvent();
0445   void endEvent(PhysicsBase::Status status);
0446 
0447   // Register a PhysicsBase object and give it a pointer to the info object.
0448   inline void registerPhysicsBase(PhysicsBase &pb) {
0449     if (find(physicsPtrs.begin(), physicsPtrs.end(), &pb) != physicsPtrs.end())
0450       return;
0451     pb.initInfoPtr(infoPrivate);
0452     physicsPtrs.push_back(&pb);
0453   }
0454 
0455   // If new pointers are set in Info propagate this to all
0456   // PhysicsBase objects.
0457   void pushInfo();
0458 
0459   // Constants: could only be changed in the code itself.
0460   static const double VERSIONNUMBERHEAD, VERSIONNUMBERCODE;
0461   // Maximum number of tries to produce parton level from given input.
0462   // Negative integer to denote that no subrun has been set.
0463   static const int    NTRY = 10;
0464 
0465   // Initialization data, extracted from database.
0466   string xmlPath = {};
0467   bool   doProcessLevel = {}, doPartonLevel = {}, doHadronLevel = {},
0468          doLowEnergy = {}, doSoftQCDall = {}, doSoftQCDinel = {},
0469          doCentralDiff = {}, doDiffraction = {}, doSoftQCD = {},
0470          doHardDiff = {}, doResDec = {}, doFSRinRes = {}, decayRHadrons = {},
0471          doPartonVertex = {}, abortIfVeto = {}, checkEvent = {},
0472          checkHistory = {}, doNonPert = {};
0473   int    nErrList = {};
0474   double epTolErr = {}, epTolWarn = {}, mTolErr = {}, mTolWarn = {};
0475 
0476   // Initialization data, from init(...) call, plus some event-specific.
0477   bool   isConstructed = {}, isInit = {}, showSaV = {}, showMaD = {},
0478          doReconnect = {}, forceHadronLevelCR = {};
0479   int    nCount = {}, nShowLHA = {}, nShowInfo = {}, nShowProc = {},
0480          nShowEvt = {}, reconnectMode = {};
0481 
0482   // information for error checkout.
0483   int    nErrEvent = {};
0484   vector<int> iErrId = {}, iErrCol = {}, iErrEpm = {}, iErrNan = {},
0485          iErrNanVtx = {};
0486 
0487   // Setup of beams: flavours, kinematics and PDFs.
0488   BeamSetup beamSetup = {};
0489 
0490   // LHAup object for generating external events.
0491   bool     doLHA = false;
0492   bool     useNewLHA = false;
0493   LHAupPtr lhaUpPtr = {};
0494 
0495   // Pointer to external decay handler and list of particles it handles.
0496   DecayHandlerPtr decayHandlePtr = {};
0497   vector<int>     handledParticles = {};
0498 
0499   // Pointer to UserHooks object for user interaction with program.
0500   UserHooksPtr userHooksPtr = {};
0501   bool doVetoProcess = {}, doVetoPartons = {},
0502        retryPartonLevel = {}, canVetoHadronization = {};
0503 
0504   // Pointer to BeamShape object for beam momentum and interaction vertex.
0505   BeamShapePtr beamShapePtr = {};
0506   bool         doVertexSpread = {};
0507   double       eMinPert = {}, eWidthPert = {};
0508 
0509   // Pointers to external processes derived from the Pythia base classes.
0510   vector<SigmaProcessPtr> sigmaPtrs = {};
0511 
0512   // Pointers to external phase-space generators derived from Pythia
0513   // base classes.
0514   vector<PhaseSpacePtr> phaseSpacePtrs = {};
0515 
0516   // Pointers to external calculation of resonance widths.
0517   vector<ResonanceWidthsPtr> resonancePtrs = {};
0518 
0519   // Pointers to timelike and spacelike showers, including Vincia and
0520   // Dire. Note, the showerModelPtr must be declared before the
0521   // individual shower pointers, partonLevel, and hadronLevel. This
0522   // ensures shared pointers that belong to showerModelPtr are
0523   // unloaded correctly.
0524   ShowerModelPtr showerModelPtr = {};
0525   TimeShowerPtr  timesDecPtr = {};
0526   TimeShowerPtr  timesPtr = {};
0527   SpaceShowerPtr spacePtr = {};
0528 
0529   // Pointers to fragmentation models.
0530   vector<FragmentationModelPtr> fragPtrs = {};
0531 
0532   // Pointer to assign space-time vertices during parton evolution.
0533   PartonVertexPtr partonVertexPtr;
0534 
0535   // The main generator class to define the core process of the event.
0536   ProcessLevel processLevel = {};
0537 
0538   // The main generator class to produce the parton level of the event.
0539   PartonLevel partonLevel = {};
0540 
0541   // The main generator class to perform trial showers of the event.
0542   PartonLevel trialPartonLevel = {};
0543 
0544   // Flags for defining the merging scheme.
0545   bool        doMerging = {};
0546 
0547   // The StringInteractions class.
0548   StringIntPtr stringInteractionsPtr;
0549 
0550   // The Colour reconnection class.
0551   ColRecPtr colourReconnectionPtr = {};
0552 
0553   // The junction splitting class.
0554   JunctionSplitting junctionSplitting = {};
0555 
0556   // The main generator class to produce the hadron level of the event.
0557   HadronLevel hadronLevel = {};
0558 
0559   // The total cross section classes are used both on process and parton level.
0560   SigmaTotal         sigmaTot = {};
0561   SigmaLowEnergy     sigmaLowEnergy;
0562   NucleonExcitations nucleonExcitations = {};
0563   SigmaCombined      sigmaCmb = {};
0564 
0565   // The fragmentation pointer is used in low energy processes and HadronLevel.
0566   LundFragmentationPtr fragPtr{};
0567 
0568   // The RHadrons class is used both at PartonLevel and HadronLevel.
0569   RHadronsPtr rHadronsPtr{};
0570 
0571   // Flags for handling generation of heavy ion collisons.
0572   bool        hasHeavyIons = {}, doHeavyIons = {};
0573 
0574   // Write the Pythia banner, with symbol and version information.
0575   void banner();
0576 
0577   // Check that combinations of settings are allowed; change if not.
0578   void checkSettings();
0579 
0580   // Simplified treatment for low-energy nonperturbative collisions.
0581   bool nextNonPert(int procTypeIn = 0);
0582 
0583   // Perform R-hadron decays.
0584   bool doRHadronDecays();
0585 
0586   // Check that the final event makes sense.
0587   bool check();
0588 
0589   // Initialization of SLHA data.
0590   bool initSLHA();
0591   stringstream particleDataBuffer;
0592 
0593   // Keep track of and initialize all pointers to PhysicsBase-derived objects.
0594   vector<PhysicsBase*> physicsPtrs = {};
0595 
0596 };
0597 
0598 //==========================================================================
0599 
0600 } // end namespace Pythia8
0601 
0602 #endif // Pythia8_Pythia_H