Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4PileupGenerator.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4PileupGenerator.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4MAIN_PHG4PILEUPGENERATOR_H
4 #define G4MAIN_PHG4PILEUPGENERATOR_H
5 
7 
8 #include <string> // for string
9 
10 class PHCompositeNode;
11 
13 {
14  public:
15  PHG4PileupGenerator(const std::string &name = "PILEUPGENERATOR");
16  ~PHG4PileupGenerator() override;
17 
18  int Init(PHCompositeNode *topNode) override;
19  int InitRun(PHCompositeNode *topNode) override;
20  int process_event(PHCompositeNode *topNode) override;
21  int Reset(PHCompositeNode *topNode) override;
22  int ResetEvent(PHCompositeNode *topNode) override;
23  int EndRun(const int runnumber) override;
24  int End(PHCompositeNode *topNode) override;
25 
27 
29  void set_time_window(double past_nsec, double future_nsec)
30  {
31  _min_integration_time = past_nsec;
32  _max_integration_time = future_nsec;
33  }
34  void set_collision_rate(double kHz) { _collision_rate = kHz; }
36 
37  private:
39 
40  double _min_integration_time = -1000.;
41  double _max_integration_time = 1000.;
42  double _collision_rate = 100.; // kHz
43  double _time_between_crossings = 106.;
44 
45  double _ave_coll_per_crossing = 1.; // recalculated
46  int _min_crossing = 0; // recalculated
47  int _max_crossing = 0; // recalculated
48 };
49 
50 #endif