EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4IonGun.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4IonGun.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4MAIN_PHG4IONGUN_H
4 #define G4MAIN_PHG4IONGUN_H
5 
7 
8 #include <cmath>
9 #include <string>
10 
11 class PHG4Particle;
12 class PHCompositeNode;
13 
15 {
16  public:
17  PHG4IonGun(const std::string &name = "PHG4IONGUN");
18  ~PHG4IonGun() override {}
19  int process_event(PHCompositeNode *topNode) override;
20  void SetA(const int a) { A = a; }
21  void SetZ(const int z) { Z = z; }
22  void SetCharge(const int c);
23  void ExcitEnergy(const double e) { excitEnergy = e; }
24  void SetMom(const double px, const double py, const double pz);
25  void Print(const std::string &what = "ALL") const override;
26 
27  private:
28  void UpdateParticle();
29  PHG4Particle *ion = nullptr;
30  int A = 0;
31  int Z = 0;
32  double mom[3] = {NAN, NAN, NAN};
33  int ioncharge = 0;
34  double excitEnergy = 0.;
35 };
36 
37 #endif