File indexing completed on 2025-08-06 08:18:15
0001 #ifndef TRACKBASEHISTORIC_SVTXTRACKINFOV1_H
0002 #define TRACKBASEHISTORIC_SVTXTRACKINFOV1_H
0003
0004 #include "SvtxTrackInfo.h"
0005 #include "TrackStateInfo_v1.h"
0006
0007 #include <trackbase/TrkrDefs.h>
0008
0009 #include <cmath>
0010 #include <cstddef> // for size_t
0011 #include <cstdint>
0012 #include <iostream>
0013 #include <map>
0014 #include <utility> // for pair
0015
0016 class PHObject;
0017
0018 class SvtxTrackInfo_v1 : public SvtxTrackInfo
0019 {
0020 public:
0021 SvtxTrackInfo_v1() {}
0022
0023
0024 SvtxTrackInfo_v1(const SvtxTrackInfo&) {}
0025
0026
0027 SvtxTrackInfo_v1(const SvtxTrackInfo_v1& source)
0028 {
0029 _track_id = source.get_track_id();
0030 m_chisq = source.get_chisq();
0031 m_ndf = source.get_ndf();
0032 m_crossing = source.get_crossing();
0033 m_hitbitmap = source.get_hitbitmap();
0034
0035 SvtxTrackInfo_v1::set_x(source.get_x());
0036 SvtxTrackInfo_v1::set_y(source.get_y());
0037 SvtxTrackInfo_v1::set_z(source.get_z());
0038 SvtxTrackInfo_v1::set_phi(source.get_phi());
0039 SvtxTrackInfo_v1::set_theta(source.get_theta());
0040 SvtxTrackInfo_v1::set_qOp(source.get_qOp());
0041
0042 for (int i = 0; i < 5; i++)
0043 {
0044 for (int j = i; j < 5; j++)
0045 {
0046 SvtxTrackInfo_v1::set_covariance(i, j, source.get_covariance(i, j));
0047 }
0048 }
0049 }
0050
0051
0052 SvtxTrackInfo_v1& operator=(const SvtxTrackInfo_v1& track);
0053
0054
0055 ~SvtxTrackInfo_v1() override {}
0056
0057
0058 void identify(std::ostream& os = std::cout) const override
0059 {
0060 os << "SvtxTrackInfo_v1 class" << std::endl;
0061 }
0062 void Reset() override { *this = SvtxTrackInfo_v1(); }
0063
0064 PHObject* CloneMe() const override { return new SvtxTrackInfo_v1(*this); }
0065
0066
0067 using PHObject::CopyFrom;
0068
0069 void CopyFrom(const SvtxTrackInfo&) override;
0070 void CopyFrom(SvtxTrackInfo* source) override
0071 {
0072 CopyFrom(*source);
0073 }
0074
0075
0076
0077
0078
0079 unsigned int get_track_id() const override { return _track_id; }
0080 void set_track_id(unsigned int id) override { _track_id = id; }
0081
0082 float get_chisq() const override { return m_chisq; }
0083 void set_chisq(float chisq) override { m_chisq = chisq; }
0084
0085 uint8_t get_ndf() const override { return m_ndf; }
0086 void set_ndf(uint8_t ndf) override { m_ndf = ndf; }
0087
0088 uint64_t get_hitbitmap() const override { return m_hitbitmap; }
0089 void set_hitbitmap(uint64_t hitbitmap) override { m_hitbitmap = hitbitmap; }
0090
0091 short int get_crossing() const override { return m_crossing; }
0092 void set_crossing(short int crossing) override { m_crossing = crossing; }
0093
0094 float get_x() const override { return m_state.get_x(); }
0095 void set_x(float x) override { m_state.set_x(x); }
0096
0097 float get_y() const override { return m_state.get_y(); }
0098 void set_y(float y) override { m_state.set_y(y); }
0099
0100 float get_z() const override { return m_state.get_z(); }
0101 void set_z(float z) override { m_state.set_z(z); }
0102
0103 void set_phi(const float phi) override { m_state.set_phi(phi); }
0104 void set_theta(const float theta) override { m_state.set_theta(theta); }
0105 void set_qOp(const float qop) override { m_state.set_qOp(qop); }
0106
0107 float get_pos(unsigned int i) const override { return m_state.get_pos(i); }
0108
0109 float get_px() const override { return m_state.get_px(); }
0110 float get_py() const override { return m_state.get_py(); }
0111 float get_pz() const override { return m_state.get_pz(); }
0112 float get_mom(unsigned int i) const override { return m_state.get_mom(i); }
0113
0114 float get_p() const override { return m_state.get_p(); }
0115 float get_pt() const override { return m_state.get_pt(); }
0116 float get_eta() const override { return m_state.get_eta(); }
0117 float get_phi() const override { return m_state.get_phi(); }
0118 float get_theta() const override { return m_state.get_theta(); }
0119 float get_qOp() const override { return m_state.get_qOp(); }
0120 int get_charge() const override { return m_state.get_charge(); }
0121
0122 float get_covariance(int i, int j) const override { return m_state.get_covariance(i, j); }
0123 void set_covariance(int i, int j, float value) override { m_state.set_covariance(i, j, value); }
0124
0125 private:
0126
0127 unsigned int _track_id = std::numeric_limits<unsigned int>::quiet_NaN();
0128 float m_chisq = std::numeric_limits<float>::quiet_NaN();
0129 uint8_t m_ndf = std::numeric_limits<uint8_t>::quiet_NaN();
0130 uint64_t m_hitbitmap = std::numeric_limits<uint64_t>::quiet_NaN();
0131 short int m_crossing = std::numeric_limits<short int>::quiet_NaN();
0132
0133
0134 TrackStateInfo_v1 m_state;
0135
0136 ClassDefOverride(SvtxTrackInfo_v1, 1)
0137 };
0138
0139 #endif