Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JetEnergyLoss.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JetEnergyLoss.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 JETENERGYLOSS_H
17 #define JETENERGYLOSS_H
18 
19 #include "JetScapeModuleBase.h"
20 #include "FluidDynamics.h"
21 #include "FluidCellInfo.h"
22 #include "JetClass.h"
23 #include "JetScapeWriter.h"
24 #include "PartonShower.h"
25 #include "PartonPrinter.h"
26 #include "MakeUniqueHelper.h"
27 #include "LiquefierBase.h"
28 #include <vector>
29 #include <random>
30 
31 namespace Jetscape {
32 
34  public std::enable_shared_from_this<JetEnergyLoss> {
35 
36 public:
39  JetEnergyLoss();
40 
45 
48  virtual ~JetEnergyLoss();
49 
53  virtual shared_ptr<JetEnergyLoss> Clone() const { return nullptr; }
54 
59  virtual void Init();
60 
65  virtual void
66  Exec() final; // prevents eloss modules from overwrting and missusing
67 
71  virtual void WriteTask(weak_ptr<JetScapeWriter> w);
72 
75  virtual void Clear();
76 
84  virtual void DoEnergyLoss(double deltaT, double time, double Q2,
85  vector<Parton> &pIn, vector<Parton> &pOut){};
86 
89  std::unique_ptr<FluidCellInfo> &, multi_threaded_local>
91 
93 
97 
101 
110 
114  void SetQhat(double m_qhat) { qhat = m_qhat; }
115 
118  const double GetQhat() const { return qhat; }
119 
124 
128 
130 
133  double GetDeltaT() { return deltaT; }
134 
137  double GetMaxT() { return maxT; }
138 
142 
143  // old test signals ======================
145 
148  void SetJetSignalConnected(bool m_jetSignalConnected) {
149  jetSignalConnected = m_jetSignalConnected;
150  }
151 
154  const bool GetJetSignalConnected() const { return jetSignalConnected; }
155 
159  void SetEdensitySignalConnected(bool m_edensitySignalConnected) {
160  edensitySignalConnected = m_edensitySignalConnected;
161  }
162 
166  const bool GetEdensitySignalConnected() const {
168  }
169 
173  void SetGetHydroCellSignalConnected(bool m_GetHydroCellSignalConnected) {
174  GetHydroCellSignalConnected = m_GetHydroCellSignalConnected;
175  }
176 
182  }
183 
184  void SetGetHydroTau0SignalConnected(bool m_GetHydroTau0SignalConnected) {
185  GetHydroTau0SignalConnected = m_GetHydroTau0SignalConnected;
186  }
187 
190  }
191 
195  void SetSentInPartonsConnected(bool m_SentInPartonsConnected) {
196  SentInPartonsConnected = m_SentInPartonsConnected;
197  }
198 
203 
204  void add_a_liquefier(std::shared_ptr<LiquefierBase> new_liquefier) {
205  liquefier_ptr = new_liquefier;
206  }
207 
208  std::weak_ptr<LiquefierBase> get_liquefier() { return (liquefier_ptr); }
209 
210  // The Slot method to send the vector of Hadronization module
211  void SendFinalStatePartons(vector<vector<shared_ptr<Parton>>> &fPartons) {
212  fPartons = final_Partons;
213  }
214 
216 
217 protected:
218  std::weak_ptr<LiquefierBase> liquefier_ptr;
219 
220 private:
221  double deltaT;
222  double maxT;
223 
224  double qhat;
227 
231 
234  void DoShower();
235 
238 
239  //old test signals
242 
243  // Vector of final state partons for each shower as a vector
244 
245  vector<vector<shared_ptr<Parton>>> final_Partons;
246 };
247 
248 } // end namespace Jetscape
249 
250 #endif