Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HardProcess.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HardProcess.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 #ifndef HARDPROCESS_H
17 #define HARDPROCESS_H
18 
19 #include "InitialState.h"
20 #include "JetScapeModuleBase.h"
21 #include "JetClass.h"
22 #include <vector>
23 
24 namespace Jetscape {
25 
31 
32 public:
35  HardProcess();
36 
39  virtual ~HardProcess();
40 
44  virtual void Init();
45 
48  virtual void Exec();
49 
52  virtual void Clear();
53 
57  virtual void WriteTask(weak_ptr<JetScapeWriter> w);
58 
62  virtual void CollectHeader(weak_ptr<JetScapeWriter> w);
63 
64  // connect the InitialState module with hard process
67  std::shared_ptr<InitialState> ini;
68 
72  int GetNHardPartons() { return hp_list.size(); }
73 
78 
81  vector<shared_ptr<Parton>> &GetPartonList() { return hp_list; }
82 
86  void AddParton(shared_ptr<Parton> p) { hp_list.push_back(p); }
87 
88  // Slots ...
92  void GetHardPartonList(vector<shared_ptr<Parton>> &plist) { plist = hp_list; }
93 
97  virtual double GetSigmaGen() { return 1; };
101  virtual double GetSigmaErr() { return 0; };
102 
106  virtual double GetPtHat() { return 0; };
107 
112  virtual double GetEventWeight() { return 1; };
113 
117  void AddHadron(shared_ptr<Hadron> h) { hd_list.push_back(h); }
118 
119  // Slots ...
123  void GetHadronList(vector<shared_ptr<Hadron>> &hlist) { hlist = hd_list; }
124 
127  vector<shared_ptr<Hadron>> &GetHadronList() { return hd_list; }
128 
132  int GetNHadrons() { return hd_list.size(); }
133 
135 
136 private:
137  // Think of always using unique_ptr for any vector in jetscape framework !???
138  // To be discussed ...
139  vector<shared_ptr<Parton>> hp_list;
140 
141  // A vector of Hadrons generated by Pythia
142  vector<shared_ptr<Hadron>> hd_list;
143 
144 
145 };
146 
147 } // end namespace Jetscape
148 
149 #endif