File indexing completed on 2025-08-05 08:17:02
0001
0002
0003
0004
0005
0006
0007 #ifndef TRACKBASE_TRKRCLUSTERV1_H
0008 #define TRACKBASE_TRKRCLUSTERV1_H
0009
0010 #include "TrkrCluster.h"
0011 #include "TrkrDefs.h"
0012
0013 #include <iostream>
0014
0015 class PHObject;
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 class TrkrClusterv1 : public TrkrCluster
0026 {
0027 public:
0028
0029 TrkrClusterv1();
0030
0031
0032 ~TrkrClusterv1() override = default;
0033
0034 void identify(std::ostream& os = std::cout) const override;
0035 void Reset() override {}
0036 int isValid() const override;
0037 PHObject* CloneMe() const override { return new TrkrClusterv1(*this); }
0038
0039
0040 void CopyFrom(const TrkrCluster&) override;
0041
0042
0043 void CopyFrom(TrkrCluster* source) override
0044 {
0045 CopyFrom(*source);
0046 }
0047
0048
0049
0050
0051 float getX() const override { return m_pos[0]; }
0052 void setX(float x) override { m_pos[0] = x; }
0053 float getY() const override { return m_pos[1]; }
0054 void setY(float y) override { m_pos[1] = y; }
0055 float getZ() const override { return m_pos[2]; }
0056 void setZ(float z) override { m_pos[2] = z; }
0057 float getPosition(int coor) const override { return m_pos[coor]; }
0058 void setPosition(int coor, float xi) override { m_pos[coor] = xi; }
0059 void setGlobal() override { m_isGlobal = true; }
0060 void setLocal() override { m_isGlobal = false; }
0061 bool isGlobal() const override { return m_isGlobal; }
0062
0063
0064
0065 unsigned int getAdc() const override { return m_adc; }
0066 void setAdc(unsigned int adc) override { m_adc = adc; }
0067 float getSize(unsigned int i, unsigned int j) const override;
0068 void setSize(unsigned int i, unsigned int j, float value) override;
0069
0070 float getError(unsigned int i, unsigned int j) const override;
0071 void setError(unsigned int i, unsigned int j, float value) override;
0072
0073
0074
0075
0076 float getPhiSize() const override;
0077 float getZSize() const override;
0078
0079 float getRPhiError() const override;
0080 float getPhiError() const override;
0081 float getZError() const override;
0082
0083 protected:
0084 TrkrDefs::cluskey m_cluskey;
0085 float m_pos[3]{};
0086 bool m_isGlobal;
0087 unsigned int m_adc;
0088 float m_size[6]{};
0089 float m_err[6]{};
0090
0091 ClassDefOverride(TrkrClusterv1, 1)
0092 };
0093
0094 #endif