Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:03

0001 /*******************************************************************************
0002  * Copyright (c) The JETSCAPE Collaboration, 2018
0003  *
0004  * Modular, task-based framework for simulating all aspects of heavy-ion collisions
0005  *
0006  * For the list of contributors see AUTHORS.
0007  *
0008  * Report issues at https://github.com/JETSCAPE/JETSCAPE/issues
0009  *
0010  * or via email to bugs.jetscape@gmail.com
0011  *
0012  * Distributed under the GNU General Public License 3.0 (GPLv3 or later).
0013  * See COPYING for details.
0014  ******************************************************************************/
0015 
0016 // Create a pythia collision at a specified point and return the two inital hard partons
0017 
0018 #ifndef PYTHIAGUN_H
0019 #define PYTHIAGUN_H
0020 
0021 #include "HardProcess.h"
0022 #include "JetScapeLogger.h"
0023 #include "Pythia8/Pythia.h"
0024 
0025 using namespace Jetscape;
0026 
0027 class PythiaGun : public HardProcess, public Pythia8::Pythia {
0028 
0029 private:
0030   double pTHatMin;
0031   double pTHatMax;
0032   double eCM;
0033   double vir_factor;
0034   double softMomentumCutoff;
0035   bool FSR_on;
0036   bool softQCD;
0037 
0038   // Allows the registration of the module so that it is available to be used by the Jetscape framework.
0039   static RegisterJetScapeModule<PythiaGun> reg;
0040 
0041 public:
0042   /** standard ctor
0043       @param xmlDir: Note that the environment variable PYTHIA8DATA takes precedence! So don't use it.
0044       @param printBanner: Suppress starting blurb. Should be set to true in production, credit where it's due
0045   */
0046   PythiaGun(string xmlDir = "DONTUSETHIS", bool printBanner = false)
0047       : Pythia8::Pythia(xmlDir, printBanner), HardProcess() {
0048     SetId("UninitializedPythiaGun");
0049   }
0050 
0051   ~PythiaGun();
0052 
0053   void InitTask();
0054   void Exec();
0055 
0056   // Getters
0057   double GetpTHatMin() const { return pTHatMin; }
0058   double GetpTHatMax() const { return pTHatMax; }
0059 
0060   // Cross-section information in mb and event weight.
0061   double GetSigmaGen() { return info.sigmaGen(); };
0062   double GetSigmaErr() { return info.sigmaErr(); };
0063   double GetPtHat() { return info.pTHat(); };
0064   double GetEventWeight() { return info.weight(); };
0065 };
0066 
0067 #endif // PYTHIAGUN_H