File indexing completed on 2025-08-03 08:16:35
0001 #ifndef __SHEPGEN_H__
0002 #define __SHEPGEN_H__
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <phhepmc/PHHepMCGenHelper.h>
0006
0007 #if !defined(__CINT__) || defined(__CLING__)
0008 #include <gsl/gsl_rng.h>
0009 #endif
0010
0011 #include <iostream>
0012 #include <string>
0013
0014 class PHCompositeNode;
0015 class PHHepMCGenEvent;
0016
0017 class HGenManager;
0018 class HLorentzVector;
0019
0020 namespace HepMC
0021 {
0022 class GenEvent;
0023 };
0024
0025 class sHEPGen : public SubsysReco, public PHHepMCGenHelper
0026 {
0027 public:
0028 sHEPGen(const std::string &name = "sHEPGen");
0029 virtual ~sHEPGen();
0030
0031 int Init(PHCompositeNode *topNode);
0032 int process_event(PHCompositeNode *topNode);
0033 int End(PHCompositeNode *topNode);
0034
0035 void set_datacard_file(const char *cfg_file)
0036 {
0037 if (cfg_file) _datacardFile = cfg_file;
0038 }
0039
0040 void set_momentum_electron(double emom)
0041 {
0042 _p_electron_lab = emom;
0043 }
0044
0045 void set_momentum_hadron(double hmom)
0046 {
0047 _p_hadron_lab = hmom;
0048 }
0049
0050 void beam_vertex_parameters(double beamX,
0051 double beamY,
0052 double beamZ,
0053 double beamXsigma,
0054 double beamYsigma,
0055 double beamZsigma)
0056 {
0057 set_vertex_distribution_mean(beamX, beamY, beamZ, 0);
0058 set_vertex_distribution_width(beamXsigma, beamYsigma, beamZsigma, 0);
0059 }
0060
0061 private:
0062
0063
0064 void printlogo();
0065
0066
0067 int _eventcount;
0068
0069 double _p_electron_lab;
0070 double _p_hadron_lab;
0071
0072 HLorentzVector *_p4_electron_lab;
0073 HLorentzVector *_p4_hadron_lab;
0074 HLorentzVector *_p4_hadron_lab_invert;
0075 HLorentzVector *_p4_electron_prest;
0076 HLorentzVector *_p4_hadron_prest;
0077
0078
0079 HGenManager *_hgenManager;
0080
0081 std::string _datacardFile;
0082 };
0083
0084 #endif