File indexing completed on 2025-08-06 08:17:41
0001 #ifndef INTT_INTTVERTEXV1_H
0002 #define INTT_INTTVERTEXV1_H
0003
0004 #include "InttVertex.h"
0005
0006 #include <iostream>
0007
0008 class PHObject;
0009
0010 class InttVertexv1 : public InttVertex
0011 {
0012 public:
0013 InttVertexv1();
0014 ~InttVertexv1() override = default;
0015
0016
0017
0018 void identify(std::ostream& os = std::cout) const override;
0019 void Reset() override { *this = InttVertexv1(); }
0020 int isValid() const override;
0021 PHObject* CloneMe() const override { return new InttVertexv1(*this); }
0022
0023
0024
0025 unsigned int get_id() const override { return _id; }
0026 void set_id(unsigned int id) override { _id = id; }
0027
0028 float get_x() const override { return _pos[0]; }
0029 void set_x(float x) override { _pos[0] = x; }
0030
0031 float get_y() const override { return _pos[1]; }
0032 void set_y(float y) override { _pos[1] = y; }
0033
0034 float get_z() const override { return _pos[2]; }
0035 void set_z(float z) override { _pos[2] = z; }
0036
0037 float get_position(unsigned int coor) const override { return _pos[coor]; }
0038 void set_position(unsigned int coor, float xi) override { _pos[coor] = xi; }
0039
0040 float get_error(unsigned int i, unsigned int j) const override;
0041 void set_error(unsigned int i, unsigned int j, float value) override;
0042
0043 double get_chi2ndf() const override { return chi2ndf; }
0044 void set_chi2ndf(double val) override { chi2ndf = val; }
0045
0046 double get_width() const override { return width; }
0047 void set_width(double val) override { width = val; }
0048
0049 bool get_good() const override { return good; }
0050 void set_good(bool val) override { good = val; }
0051
0052 unsigned int get_nclus() const override { return nclus; }
0053 void set_nclus(unsigned int val) override { nclus = val; }
0054
0055 unsigned int get_ntracklet() const override { return ntracklet; }
0056 void set_ntracklet(unsigned int val) override { ntracklet = val; }
0057
0058 unsigned int get_ngroup() const override { return ngroup; }
0059 void set_ngroup(unsigned int val) override { ngroup = val; }
0060
0061 double get_peakratio() const override { return peakratio; }
0062 void set_peakratio(double val) override { peakratio = val; }
0063
0064 double get_peakwidth() const override { return peakwidth; }
0065 void set_peakwidth(double val) override { peakwidth = val; }
0066
0067 private:
0068 unsigned int covar_index(unsigned int i, unsigned int j) const;
0069
0070 private:
0071 unsigned int _id = std::numeric_limits<unsigned int>::max();
0072 float _pos[3] = {};
0073 float _err[6] = {};
0074
0075 double chi2ndf{-1};
0076 double width{-1};
0077 bool good{false};
0078 unsigned int nclus{0};
0079 unsigned int ntracklet{0};
0080 unsigned int ngroup{0};
0081 double peakratio{0};
0082 double peakwidth{0};
0083
0084 ClassDefOverride(InttVertexv1, 1);
0085 };
0086
0087 #endif