ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrkrClusterv1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrkrClusterv1.h
1 
7 #ifndef TRACKBASE_TRKRCLUSTERV1_H
8 #define TRACKBASE_TRKRCLUSTERV1_H
9 
10 #include "TrkrCluster.h"
11 #include "TrkrDefs.h"
12 
13 #include <iostream>
14 
15 class PHObject;
16 
25 class TrkrClusterv1 : public TrkrCluster
26 {
27  public:
29  TrkrClusterv1();
30 
32  ~TrkrClusterv1() override {}
33  // PHObject virtual overloads
34  void identify(std::ostream& os = std::cout) const override;
35  void Reset() override {}
36  int isValid() const override;
37  PHObject* CloneMe() const override { return new TrkrClusterv1(*this); }
38 
40  void CopyFrom( const TrkrCluster& ) override;
41 
43  void CopyFrom( TrkrCluster* source ) override
44  { CopyFrom( *source ); }
45 
46  void setClusKey(TrkrDefs::cluskey id) override { m_cluskey = id; }
47  TrkrDefs::cluskey getClusKey() const override { return m_cluskey; }
48  //
49  // cluster position
50  //
51  float getX() const override { return m_pos[0]; }
52  void setX(float x) override { m_pos[0] = x; }
53  float getY() const override { return m_pos[1]; }
54  void setY(float y) override { m_pos[1] = y; }
55  float getZ() const override { return m_pos[2]; }
56  void setZ(float z) override { m_pos[2] = z; }
57  float getPosition(int coor) const override { return m_pos[coor]; }
58  void setPosition(int coor, float xi) override { m_pos[coor] = xi; }
59  void setGlobal() override { m_isGlobal = true; }
60  void setLocal() override { m_isGlobal = false; }
61  bool isGlobal() const override { return m_isGlobal; }
62  //
63  // cluster info
64  //
65  unsigned int getAdc() const override { return m_adc; }
66  void setAdc(unsigned int adc) override { m_adc = adc; }
67  float getSize(unsigned int i, unsigned int j) const override; //< get cluster dimension covar
68  void setSize(unsigned int i, unsigned int j, float value) override; //< set cluster dimension covar
69 
70  float getError(unsigned int i, unsigned int j) const override; //< get cluster error covar
71  void setError(unsigned int i, unsigned int j, float value) override; //< set cluster error covar
72 
73  //
74  // convenience interface
75  //
76  float getPhiSize() const override;
77  float getZSize() const override;
78 
79  float getRPhiError() const override;
80  float getPhiError() const override;
81  float getZError() const override;
82 
83  protected:
84 
85  TrkrDefs::cluskey m_cluskey; //< unique identifier within container
86  float m_pos[3]; //< mean position x,y,z
87  bool m_isGlobal; //< flag for coord sys (true = global)
88  unsigned int m_adc; //< cluster sum adc (D. McGlinchey - Do we need this?)
89  float m_size[6]; //< size covariance matrix (packed storage) (+/- cm^2)
90  float m_err[6]; //< covariance matrix: rad, arc and z
91 
92  ClassDefOverride(TrkrClusterv1, 1)
93 };
94 
95 #endif //TRACKBASE_TRKRCLUSTERV1_H