File indexing completed on 2025-12-16 09:21:57
0001
0002
0003 #ifndef G4MAIN_HEPMCNODEREADER_H
0004 #define G4MAIN_HEPMCNODEREADER_H
0005
0006 #include <TF1.h>
0007
0008 #include <fun4all/SubsysReco.h>
0009
0010
0011 #include <gsl/gsl_rng.h>
0012
0013 #include <string>
0014 #include <vector>
0015
0016 class PHCompositeNode;
0017
0018
0019
0020 class HepMCNodeReader : public SubsysReco
0021 {
0022 public:
0023 HepMCNodeReader(const std::string &name = "HepMCNodeReader");
0024 ~HepMCNodeReader() override;
0025
0026 int Init(PHCompositeNode *topNode) override;
0027 int process_event(PHCompositeNode *topNode) override;
0028
0029 void pythia(const bool pythia) { is_pythia = pythia; }
0030
0031
0032
0033
0034 void VertexPosition(const double v_x, const double v_y, const double v_z);
0035
0036
0037
0038
0039
0040 void SmearVertex(const double s_x, const double s_y, const double s_z);
0041
0042
0043
0044 void SetT0(const double t0) { vertex_t0 = t0; }
0045
0046
0047 void SetSeed(const unsigned int i)
0048 {
0049 seed = i;
0050 use_seed = 1;
0051 }
0052
0053
0054 void AddStrangeness(const float f) { addfraction = f; }
0055
0056 private:
0057 double smeargauss(const double width);
0058 double smearflat(const double width);
0059
0060
0061 static double EMGFunction(double *x, double *par);
0062
0063 static double DBGFunction(double *x, double *par);
0064
0065 gsl_rng *RandomGenerator{nullptr};
0066 bool is_pythia{false};
0067 int use_seed{0};
0068 unsigned int seed{0};
0069 double vertex_pos_x{0.0};
0070 double vertex_pos_y{0.0};
0071 double vertex_pos_z{0.0};
0072 double vertex_t0{0.0};
0073 double width_vx{0.0};
0074 double width_vy{0.0};
0075 double width_vz{0.0};
0076
0077
0078 std::vector<int> list_strangePID = {310, 3122, -3122};
0079 std::vector<double> list_strangePIDprob = {1 - 0.333, 0.333 / 2., 0.333 / 2.};
0080 std::vector<std::pair<int, std::pair<double, double>>> list_strangePID_probrange{};
0081 float addfraction{0.0};
0082 int Nstrange_add{0};
0083 float sel_eta{1.0};
0084 float sel_ptmin{0.0};
0085 float sel_ptmax{std::numeric_limits<float>::max()};
0086 TF1 *fpt{nullptr};
0087 TF1 *feta{nullptr};
0088 };
0089
0090 #endif