Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:28

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