Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NcollListFromFile.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file NcollListFromFile.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 NCOLLLISTFROMFILE_H
17 #define NCOLLLISTFROMFILE_H
18 
19 #include <iostream>
20 #include <vector>
21 #include <string>
22 #include <sstream>
23 #include <cmath>
24 #include "JetScapeModuleBase.h"
25 #include "InitialState.h"
26 #include "JetScapeLogger.h"
27 
28 using namespace Jetscape;
29 
31  // this is wrapper class to read external files that
32  // stores initial number of binary collisions and corresponding
33  // configurations
34 public:
37 
38  //void Init();
39 
42  void Exec();
43 
46  void Clear();
47 
49  double GetNcoll() { return(ncoll_); };
50 
52  void ReadNbcList(std::string filename);
53 
54  void SampleABinaryCollisionPoint(double &x, double &y);
55 
56 private:
57  std::vector<double> binary_collision_x_;
58  std::vector<double> binary_collision_y_;
59  std::shared_ptr<std::uniform_int_distribution<int>> rand_int_ptr_;
60 
61  double ncoll_ = -1;
62 
63  // Allows the registration of the module so that it is available to be used
64  // by the Jetscape framework.
66 };
67 
68 #endif // NCOLLLISTFROMFILE_H