Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:08

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 PARTONPRINTER_H
0017 #define PARTONPRINTER_H
0018 
0019 #include "JetScapeModuleBase.h"
0020 #include "PartonShower.h"
0021 #include <vector>
0022 #include <string>
0023 #include <fstream>
0024 
0025 namespace Jetscape {
0026 
0027 class PartonPrinter : public JetScapeModuleBase {
0028 
0029 public:
0030   PartonPrinter();
0031   virtual ~PartonPrinter();
0032 
0033   virtual void Init();
0034   virtual void Exec() final;
0035   virtual void Clear();
0036   std::ofstream
0037       dist_output; ///< the output stream where events are saved to file
0038 
0039   void GetFinalPartons(shared_ptr<PartonShower>
0040                            pShower /*, vector<shared_ptr<Parton>>& fPartons*/);
0041 
0042   void GetFinalPartons2(shared_ptr<PartonShower> pShower);
0043 
0044   void GetPartonsAtTime(shared_ptr<PartonShower> pShower,
0045                         vector<shared_ptr<Parton>> &fPartons, double time);
0046 
0047   void PrintFinalPartons(vector<vector<shared_ptr<Parton>>> &fPartons) {
0048     fPartons = pFinals;
0049   };
0050 
0051 private:
0052   vector<vector<shared_ptr<Parton>>> pFinals;
0053 
0054   // Allows the registration of the module so that it is available to be used by the Jetscape framework.
0055   static RegisterJetScapeModule<PartonPrinter> reg;
0056 };
0057 
0058 } // end namespace Jetscape
0059 
0060 #endif