Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Hadronization.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Hadronization.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 HADRONIZATION_H
17 #define HADRONIZATION_H
18 
19 #include "JetScapeModuleBase.h"
20 #include "JetClass.h"
21 #include "JetScapeWriter.h"
22 #include "PartonShower.h"
23 #include "SurfaceFinder.h"
24 //#include "MakeUniqueHelper.h"
25 #include <vector>
26 #include <random>
27 
28 namespace Jetscape {
29 
31  public std::enable_shared_from_this<Hadronization> {
32 public:
33  Hadronization();
34  virtual ~Hadronization();
35  virtual shared_ptr<Hadronization> Clone() const { return nullptr; }
36  virtual void Init();
37  virtual void Exec();
38  virtual void DoHadronization(vector<vector<shared_ptr<Parton>>> &pIn,
39  vector<shared_ptr<Hadron>> &hOut,
40  vector<shared_ptr<Parton>> &pOut){};
41  virtual void WriteTask(weak_ptr<JetScapeWriter> w);
42  virtual void Clear();
43 
46  vector<shared_ptr<Hadron>> &, vector<shared_ptr<Parton>> &,
49 
52 
54  std::unique_ptr<FluidCellInfo> &, multi_threaded_local>
56 
57 
58  vector<shared_ptr<Hadron>> GetHadrons() { return outHadrons; }
59  vector<shared_ptr<Parton>> GetOutPartons() { return outPartons; }
60 
61  void AddInPartons(vector<vector<shared_ptr<Parton>>> ip) { inPartons = ip; }
62 
63  void SetTransformPartonsConnected(bool m_TransformPartonsConnected) {
64  TransformPartonsConnected = m_TransformPartonsConnected;
65  }
68  }
69 
70  void SetGetHydroHyperSurfaceConnected(bool m_GetHydroHyperSurfaceConnected) {
71  HydroHyperSurfaceConnected_ = m_GetHydroHyperSurfaceConnected;
72  }
75  }
76 
77  void SetGetHydroCellSignalConnected(bool m_GetHydroCellSignalConnected) {
78  GetHydroCellSignalConnected_ = m_GetHydroCellSignalConnected;
79  }
82  }
83 
84  void AddInHadrons(vector<shared_ptr<Hadron>> ih) { outHadrons = ih; }
85 
86  // empties the outHadrons vector, explanation why this is necessary is given
87  // in HadronizationManager.h
88  void DeleteHadrons();
89 
90  // erases the outHadrons with positive status flag
91  void DeleteRealHadrons();
92 
93 private:
94  vector<vector<shared_ptr<Parton>>> inPartons;
95  vector<shared_ptr<Hadron>> outHadrons;
96  vector<shared_ptr<Parton>> outPartons;
97  void DoHadronize();
98 
102 };
103 
104 } // namespace Jetscape
105 
106 #endif