Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4AllHepMCPileupInputManager.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4AllHepMCPileupInputManager.h
1 #ifndef PHHEPMC_FUN4ALLHEPMCPILEUPINPUTMANAGER_H
2 #define PHHEPMC_FUN4ALLHEPMCPILEUPINPUTMANAGER_H
3 
5 
6 #include <gsl/gsl_rng.h>
7 
8 #include <map>
9 #include <string>
10 
15 {
16  public:
18  const std::string &nodename = "DST",
19  const std::string &topnodename = "TOP");
21 
22  int run(const int nevents = 0) override { return run(nevents, false); }
23 
24  int run(const int nevents, const bool skip);
25  int ResetEvent() override;
27  void set_time_window(double past_nsec, double future_nsec)
28  {
29  _min_integration_time = past_nsec;
30  _max_integration_time = future_nsec;
31  }
32 
34  void set_collision_rate(double Hz) { _collision_rate = Hz; }
37 
38  int SkipForThisManager(const int nevents) override;
40  int PushBackEvents(const int i) override;
41 
42  private:
43  int InsertEvent(HepMC::GenEvent *evt, const double crossing_time);
44 
46  gsl_rng *RandomGenerator = nullptr;
47 
50  double _min_integration_time = -17500.0;
51  double _max_integration_time = 17500.0;
53  double _collision_rate = 100.0e3;
55  double _time_between_crossings = 106.0;
56 
57  //derived parameters
59  int _min_crossing = 0;
60  int _max_crossing = 0;
61 
62  bool _first_run = true;
63 
64  std::map<int, double> m_EventNumberMap;
65 };
66 
67 #endif /* PHHEPMC_FUN4ALLHEPMCINPUTMANAGER_H */