Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HepMCNodeReader.h
Go to the documentation of this file.
1 #ifndef HEPMCNODEREADER_H__
2 #define HEPMCNODEREADER_H__
3 
4 #include <fun4all/SubsysReco.h>
5 
6 // rootcint barfs with this header so we need to hide it
7 #ifndef __CINT__
8 #include <gsl/gsl_rng.h>
9 #endif
10 
11 #include <string>
12 #include <vector>
13 
14 class PHHepMCGenEvent;
15 class PHCompositeNode;
16 namespace HepMC {
17  class GenParticle;
18 }
19 
23 {
24  public:
25  HepMCNodeReader(const std::string &name = "HEPMCREADER");
26  virtual ~HepMCNodeReader();
27 
28  int Init(PHCompositeNode *topNode);
29  int process_event(PHCompositeNode *topNode);
30 
33  void Embed(const int i = 1);
34 
38  void VertexPosition(const double v_x, const double v_y, const double v_z);
39 
44  void SmearVertex(const double s_x, const double s_y, const double s_z);
45 
48  void SetT0(const double t0) { vertex_t0 = t0; }
49  //
51  void SetSeed(const unsigned int i)
52  {
53  seed = i;
54  use_seed = 1;
55  }
56 
57  void set_particle_filter_on(const bool a) {_particle_filter_on = a;}
58  void insert_particle_filter_pid(const int a) {_particle_filter_pid.push_back(a);}
59 
60  bool PassParticleFilter(HepMC::GenParticle * p);
61 
62  private:
63  double smeargauss(const double width);
64  double smearflat(const double width);
65  int use_seed;
66  unsigned int seed;
67  double vertex_pos_x;
68  double vertex_pos_y;
69  double vertex_pos_z;
70  double vertex_t0;
71  double width_vx;
72  double width_vy;
73  double width_vz;
74 
75  bool _particle_filter_on;
76  std::vector<int> _particle_filter_pid;
77 
78 
79 #ifndef __CINT__
80  gsl_rng *RandomGenerator;
81 #endif
82 };
83 
84 #endif
int Init(PHCompositeNode *topNode)
void insert_particle_filter_pid(const int a)
HepMCNodeReader(const std::string &name="HEPMCREADER")
virtual ~HepMCNodeReader()
void set_particle_filter_on(const bool a)
void VertexPosition(const double v_x, const double v_y, const double v_z)
void SmearVertex(const double s_x, const double s_y, const double s_z)
void SetSeed(const unsigned int i)
Override seed.
bool PassParticleFilter(HepMC::GenParticle *p)
void SetT0(const double t0)
void Embed(const int i=1)
int process_event(PHCompositeNode *topNode)