File indexing completed on 2025-12-16 09:22:02
0001
0002
0003 #ifndef G4MAIN_PHG4VTXPOINTV1_H
0004 #define G4MAIN_PHG4VTXPOINTV1_H
0005
0006 #include "PHG4VtxPoint.h"
0007
0008 #include <iostream> // for cout, ostream
0009
0010 class PHG4VtxPointv1 : public PHG4VtxPoint
0011 {
0012 public:
0013 PHG4VtxPointv1() = default;
0014
0015 PHG4VtxPointv1(const PHG4VtxPoint* vtx)
0016 : vx(vtx->get_x())
0017 , vy(vtx->get_y())
0018 , vz(vtx->get_z())
0019 , t0(vtx->get_t())
0020 , id(vtx->get_id())
0021 {
0022 }
0023
0024 PHG4VtxPointv1(const double x, const double y, const double z, const double t, const int id_value = std::numeric_limits<int>::min())
0025 : vx(x)
0026 , vy(y)
0027 , vz(z)
0028 , t0(t)
0029 , id(id_value)
0030 {
0031 }
0032
0033 ~PHG4VtxPointv1() override = default;
0034
0035
0036 void identify(std::ostream& os = std::cout) const override;
0037
0038 void set_x(const double r) override { vx = r; }
0039 void set_y(const double r) override { vy = r; }
0040 void set_z(const double r) override { vz = r; }
0041 void set_t(const double r) override { t0 = r; }
0042 void set_id(const int i) override { id = i; }
0043
0044 double get_x() const override { return vx; }
0045 double get_y() const override { return vy; }
0046 double get_z() const override { return vz; }
0047 double get_t() const override { return t0; }
0048 int get_id() const override { return id; }
0049
0050 protected:
0051 double vx{std::numeric_limits<double>::quiet_NaN()};
0052 double vy{std::numeric_limits<double>::quiet_NaN()};
0053 double vz{std::numeric_limits<double>::quiet_NaN()};
0054 double t0{std::numeric_limits<double>::quiet_NaN()};
0055
0056
0057 int id{std::numeric_limits<int>::min()};
0058
0059 ClassDefOverride(PHG4VtxPointv1, 2)
0060 };
0061
0062 #endif