Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHPythia6.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHPythia6.h
1 #ifndef __PHPYTHIA6_H__
2 #define __PHPYTHIA6_H__
3 
4 #include <fun4all/SubsysReco.h>
6 
7 #include <string>
8 #include <vector>
9 
10 class PHCompositeNode;
11 class PHHepMCGenEvent;
12 class PHPy6GenTrigger;
13 
14 namespace HepMC {
15  class GenEvent;
16 };
17 
18 class PHPythia6: public SubsysReco {
19 
20 public:
21 
22  PHPythia6(const std::string &name = "PHPythia6");
23  virtual ~PHPythia6();
24 
25  int Init(PHCompositeNode *topNode);
26 
27  int process_event(PHCompositeNode *topNode);
28 
29  int ResetEvent(PHCompositeNode *topNode);
30 
31  int End(PHCompositeNode *topNode);
32 
33  void set_config_file( const std::string cfg_file ) { _configFile = cfg_file; }
34 
35  void print_config() const;
36 
37  void beam_vertex_parameters(double beamX,
38  double beamY,
39  double beamZ,
40  double beamXsigma,
41  double beamYsigma,
42  double beamZsigma) {
43 
44  set_vertex_distribution_mean(beamX, beamY, beamZ, 0);
45  set_vertex_distribution_width(beamXsigma, beamYsigma, beamZsigma, 0);
46  }
47 
48  void save_ascii( std::string fname = "pythia_hepmc.dat" )
49  {
50  _save_ascii = true;
52  }
53 
55  void register_trigger(PHPy6GenTrigger *theTrigger);
56  void set_trigger_OR() { _triggersOR = true; } // default true
57  void set_trigger_AND() { _triggersAND = true; }
58 
61  {
63  }
64 
66  void set_vertex_distribution_mean(const double x, const double y, const double z, const double t)
67  {
69  }
70 
72  void set_vertex_distribution_width(const double x, const double y, const double z, const double t)
73  {
75  }
76  //
78  void set_reuse_vertex(int src_embedding_id)
79  {
80  hepmc_helper.set_reuse_vertex(src_embedding_id);
81  }
82 
88  //
94 private:
95 
96  int ReadConfig(const std::string cfg_file = "");
97  int CreateNodeTree(PHCompositeNode *topNode);
98 
103  void IntegerTest(double number );
104 
107 
108  // Pythia6 configuration file
110 
115 
120 
121  // event selection
122  std::vector<PHPy6GenTrigger*> _registeredTriggers;
125 
129  void initPythia();
132 
133 };
134 
135 #endif /* __PHPYTHIA6_H__ */
136