Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HepMCNodeReader.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HepMCNodeReader.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4MAIN_HEPMCNODEREADER_H
4 #define G4MAIN_HEPMCNODEREADER_H
5 
6 #include <fun4all/SubsysReco.h>
7 
8 // rootcint barfs with this header so we need to hide it
9 #include <gsl/gsl_rng.h>
10 
11 #include <string>
12 
13 class PHCompositeNode;
14 
18 {
19  public:
20  HepMCNodeReader(const std::string &name = "HEPMCREADER");
21  ~HepMCNodeReader() override;
22 
23  int Init(PHCompositeNode *topNode) override;
24  int process_event(PHCompositeNode *topNode) override;
25 
26  void pythia(const bool pythia)
27  { is_pythia = pythia; }
28 
31  void Embed(const int i = 1);
32 
36  void VertexPosition(const double v_x, const double v_y, const double v_z);
37 
42  void SmearVertex(const double s_x, const double s_y, const double s_z);
43 
46  void SetT0(const double t0) { vertex_t0 = t0; }
47  //
49  void SetSeed(const unsigned int i)
50  {
51  seed = i;
52  use_seed = 1;
53  }
54 
55  private:
56  double smeargauss(const double width);
57  double smearflat(const double width);
58 
59  gsl_rng *RandomGenerator;
60  bool is_pythia;
61  int use_seed;
62  unsigned int seed;
63  double vertex_pos_x;
64  double vertex_pos_y;
65  double vertex_pos_z;
66  double vertex_t0;
67  double width_vx;
68  double width_vy;
69  double width_vz;
70 };
71 
72 #endif