Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:09

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MAIN_PHG4PARTICLEV3_H
0004 #define G4MAIN_PHG4PARTICLEV3_H
0005 
0006 #include "PHG4Particlev2.h"
0007 
0008 #include <iostream>
0009 #include <limits>
0010 
0011 class PHG4Particle;
0012 
0013 class PHG4Particlev3 : public PHG4Particlev2
0014 {
0015  public:
0016   PHG4Particlev3() = default;
0017   //  PHG4Particlev3(const std::string &name, const int pid, const double px, const double py, const double pz);
0018   PHG4Particlev3(const PHG4Particle* in);
0019 
0020   ~PHG4Particlev3() override = default;
0021 
0022   PHObject* CloneMe() const override { return new PHG4Particlev3(*this); }
0023 
0024   void identify(std::ostream& os = std::cout) const override;
0025 
0026   bool isIon() const override { return true; }
0027   void set_A(const int a) override { A = a; }
0028   int get_A() const override { return A; }
0029   void set_Z(const int z) override { Z = z; }
0030   int get_Z() const override { return Z; }
0031   void set_NumCharge(const int c) override;  // number of charges - gets converted to charge
0032   void set_IonCharge(const double ch) override { ioncharge = ch; }
0033   double get_IonCharge() const override { return ioncharge; }
0034   void set_ExcitEnergy(const double e) override { excitEnergy = e; }
0035   double get_ExcitEnergy() const override { return excitEnergy; }
0036 
0037  protected:
0038   int A{0};
0039   int Z{0};
0040   double ioncharge{std::numeric_limits<double>::quiet_NaN()};
0041   double excitEnergy{std::numeric_limits<double>::quiet_NaN()};
0042 
0043   ClassDefOverride(PHG4Particlev3, 1)
0044 };
0045 
0046 #endif