Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PythiaGun.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PythiaGun.h
1 /*******************************************************************************
2  * Copyright (c) The JETSCAPE Collaboration, 2018
3  *
4  * Modular, task-based framework for simulating all aspects of heavy-ion collisions
5  *
6  * For the list of contributors see AUTHORS.
7  *
8  * Report issues at https://github.com/JETSCAPE/JETSCAPE/issues
9  *
10  * or via email to bugs.jetscape@gmail.com
11  *
12  * Distributed under the GNU General Public License 3.0 (GPLv3 or later).
13  * See COPYING for details.
14  ******************************************************************************/
15 
16 // Create a pythia collision at a specified point and return the two inital hard partons
17 
18 #ifndef PYTHIAGUN_H
19 #define PYTHIAGUN_H
20 
21 #include "HardProcess.h"
22 #include "JetScapeLogger.h"
23 #include "Pythia8/Pythia.h"
24 
25 using namespace Jetscape;
26 
27 class PythiaGun : public HardProcess, public Pythia8::Pythia {
28 
29 private:
30  double pTHatMin;
31  double pTHatMax;
32  double eCM;
33  double vir_factor;
35  bool FSR_on;
36  bool softQCD;
37 
38  // Allows the registration of the module so that it is available to be used by the Jetscape framework.
40 
41 public:
46  PythiaGun(string xmlDir = "DONTUSETHIS", bool printBanner = false)
47  : Pythia8::Pythia(xmlDir, printBanner), HardProcess() {
48  SetId("UninitializedPythiaGun");
49  }
50 
51  ~PythiaGun();
52 
53  void InitTask();
54  void Exec();
55 
56  // Getters
57  double GetpTHatMin() const { return pTHatMin; }
58  double GetpTHatMax() const { return pTHatMax; }
59 
60  // Cross-section information in mb and event weight.
61  double GetSigmaGen() { return info.sigmaGen(); };
62  double GetSigmaErr() { return info.sigmaErr(); };
63  double GetPtHat() { return info.pTHat(); };
64  double GetEventWeight() { return info.weight(); };
65 };
66 
67 #endif // PYTHIAGUN_H