Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:19:55

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 #ifndef HADRONIZATIONMANAGER_H
0017 #define HADRONIZATIONMANAGER_H
0018 
0019 #include "JetScapeTask.h"
0020 #include "JetClass.h"
0021 #include "sigslot.h"
0022 
0023 #include "Hadronization.h"
0024 
0025 #include <vector>
0026 
0027 namespace Jetscape {
0028 
0029 //    : public JetScapeTask,
0030 class HadronizationManager
0031     : public JetScapeModuleBase,
0032       public std::enable_shared_from_this<HadronizationManager> {
0033 
0034 public:
0035   HadronizationManager();
0036   virtual ~HadronizationManager();
0037 
0038   virtual void Init();
0039   virtual void Exec();
0040   virtual void Clear();
0041   virtual void WriteTask(weak_ptr<JetScapeWriter> w);
0042 
0043   int GetNumSignals();
0044 
0045   void CreateSignalSlots();
0046 
0047         //get Hadrons from Hadronization submodules
0048   void GetHadrons(vector<shared_ptr<Hadron>>& signal);
0049 
0050   // deletes the hadrons from the different hadronization modules
0051   // this is used in the case of hadronization hadrons in the afterburner
0052   // otherwise these hadrons are printed to file and the same hadrons will be
0053   // modified in the transport and printed again
0054   void DeleteHadrons();
0055   // this function removes all positive hadrons, the negative ones are not deleted
0056   // needed, when positive hadrons are given to the afterburner
0057   void DeleteRealHadrons();
0058 
0059   sigslot::signal1<vector<shared_ptr<Hadron>> &> GetHadronList; //get Hadrons from HardProcess NOT Hadronization submodules
0060 
0061   sigslot::signal1<vector<vector<shared_ptr<Parton>>> &> GetFinalPartonList;
0062 
0063   void SetGetFinalPartonListConnected(bool m_GetFinalPartonListConnected) {
0064     GetFinalPartonListConnected = m_GetFinalPartonListConnected;
0065   }
0066   const bool GetGetFinalPartonListConnected() {
0067     return GetFinalPartonListConnected;
0068   }
0069 
0070   void SetGetHadronListConnected(bool m_GetHadronListConnected) {
0071     GetHadronListConnected = m_GetHadronListConnected;
0072   }
0073   const bool GetGetHadronListConnected() { return GetHadronListConnected; }
0074 
0075 private:
0076   bool GetFinalPartonListConnected;
0077   bool GetHadronListConnected;
0078   vector<vector<shared_ptr<Parton>>> hd;
0079   vector<shared_ptr<Hadron>> hadrons;
0080 };
0081 
0082 } // end namespace Jetscape
0083 
0084 #endif