Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IPGlasmaWrapper.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file IPGlasmaWrapper.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 IPGLASMAWRAPPER_H
17 #define IPGLASMAWRAPPER_H
18 
19 #include <memory>
20 
21 #include "JetScapeModuleBase.h"
22 #include "InitialState.h"
23 #include "JetScapeLogger.h"
24 #include "IPGlasma.h"
25 
26 using namespace Jetscape;
27 
29  // this is wrapper class to read external files that
30  // stores initial number of binary collisions and corresponding
31  // configurations
32 public:
34  ~IPGlasmaWrapper();
35 
39  //void Init();
40 
43  void Exec();
44 
47  void Clear();
48 
49  void InitTask();
50 
54  virtual void Write(weak_ptr<JetScapeWriter> w);
55 
58  double GetNcoll() { return(static_cast<double>(ncoll_)); };
59 
61  void ReadNbcList(std::string filename);
62 
63  void SampleABinaryCollisionPoint(double &x, double &y);
64 
65 private:
66  std::unique_ptr<IPGlasma> IPGlasma_ptr_;
67  int dim_x_, dim_y_;
68 
69  std::vector<double> binary_collision_x_;
70  std::vector<double> binary_collision_y_;
71  std::shared_ptr<std::uniform_int_distribution<int>> rand_int_ptr_;
72 
73  int ncoll_ = -1;
74 
75  // Allows the registration of the module so that it is available to be used by the Jetscape framework.
77 };
78 
79 #endif // IPGLASMAWRAPPER_H