File indexing completed on 2025-08-05 08:18:09
0001
0002
0003 #ifndef G4MAIN_PHG4PARTICLEV1_H
0004 #define G4MAIN_PHG4PARTICLEV1_H
0005
0006 #include "PHG4Particle.h"
0007
0008 #include <iostream>
0009 #include <limits>
0010 #include <string>
0011
0012 class PHG4Particlev1 : public PHG4Particle
0013 {
0014 public:
0015 PHG4Particlev1() = default;
0016 PHG4Particlev1(const std::string &name, const int pid, const double px, const double py, const double pz);
0017 PHG4Particlev1(const PHG4Particle *in);
0018
0019 ~PHG4Particlev1() override {}
0020
0021 PHObject *CloneMe() const override { return new PHG4Particlev1(*this); }
0022 void identify(std::ostream &os = std::cout) const override;
0023
0024 int get_pid() const override { return fpid; }
0025 std::string get_name() const override { return fname; }
0026 double get_px() const override { return fpx; }
0027 double get_py() const override { return fpy; }
0028 double get_pz() const override { return fpz; }
0029
0030 int get_barcode() const override { return barcode; }
0031
0032 void set_name(const std::string &name) override { fname = name; }
0033 void set_pid(const int i) override { fpid = i; }
0034 void set_px(const double x) override { fpx = x; }
0035 void set_py(const double x) override { fpy = x; }
0036 void set_pz(const double x) override { fpz = x; }
0037
0038 void set_barcode(const int bcd) override { barcode = bcd; }
0039
0040 protected:
0041 std::string fname;
0042 int fpid{0};
0043 double fpx{std::numeric_limits<double>::quiet_NaN()};
0044 double fpy{std::numeric_limits<double>::quiet_NaN()};
0045 double fpz{std::numeric_limits<double>::quiet_NaN()};
0046 int barcode{std::numeric_limits<int>::min()};
0047
0048 ClassDefOverride(PHG4Particlev1, 1)
0049 };
0050
0051 #endif