EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrkrClusterv2.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrkrClusterv2.h
1 
7 #ifndef TRACKBASE_TRKRCLUSTERV2_H
8 #define TRACKBASE_TRKRCLUSTERV2_H
9 
10 #include "TrkrCluster.h"
11 #include "TrkrDefs.h"
12 #include <iostream>
13 
14 class PHObject;
15 
22 class TrkrClusterv2 : public TrkrCluster
23 {
24  public:
25 
27  TrkrClusterv2();
28 
30  ~TrkrClusterv2() override {}
31  // PHObject virtual overloads
32  void identify(std::ostream& os = std::cout) const override;
33  void Reset() override {}
34  int isValid() const override;
35  PHObject* CloneMe() const override { return new TrkrClusterv2(*this); }
36 
38  void CopyFrom( const TrkrCluster& ) override;
39 
41  void CopyFrom( TrkrCluster* source ) override
42  { CopyFrom( *source ); }
43 
44  void setClusKey(TrkrDefs::cluskey id) override { m_cluskey = id; }
45  TrkrDefs::cluskey getClusKey() const override { return m_cluskey; }
46 
47 
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  float getLocalX() const override { return m_local[0]; }
64  void setLocalX(float loc0) override { m_local[0] = loc0; }
65  float getLocalY() const override { return m_local[1]; }
66  void setLocalY(float loc1) override { m_local[1] = loc1; }
67 
69  void setActsLocalError(unsigned int i, unsigned int j, float value) override;
70  float getActsLocalError(unsigned int i, unsigned int j) const override { return m_actsLocalErr[i][j]; }
71  TrkrDefs::subsurfkey getSubSurfKey() const override { return m_subsurfkey; }
72  void setSubSurfKey(TrkrDefs::subsurfkey id) override { m_subsurfkey = id; }
73 
74  //
75  // cluster info
76  //
77  unsigned int getAdc() const override { return m_adc; }
78  void setAdc(unsigned int adc) override { m_adc = adc; }
79  float getSize(unsigned int i, unsigned int j) const override; //< get cluster dimension covar
80  void setSize(unsigned int i, unsigned int j, float value) override; //< set cluster dimension covar
81 
82  float getError(unsigned int i, unsigned int j) const override; //< get cluster error covar
83  void setError(unsigned int i, unsigned int j, float value) override; //< set cluster error covar
84 
85  //
86  // convenience interface
87  //
88  float getPhiSize() const override;
89  float getZSize() const override;
90 
91  float getRPhiError() const override;
92  float getPhiError() const override;
93  float getZError() const override;
94 
95  protected:
96 
97  TrkrDefs::cluskey m_cluskey; //< unique identifier within container
98  TrkrDefs::subsurfkey m_subsurfkey; //< unique identifier for hitsetkey-surface maps
99  float m_pos[3]; //< mean position x,y,z
100  bool m_isGlobal; //< flag for coord sys (true = global)
101  unsigned int m_adc; //< cluster sum adc (D. McGlinchey - Do we need this?)
102  float m_size[6]; //< size covariance matrix (packed storage) (+/- cm^2)
103  float m_err[6]; //< covariance matrix: rad, arc and z
104 
105  float m_local[2]; //< 2D local position [cm]
106  float m_actsLocalErr[2][2]; //< 2D local error for Acts [cm]
107 
108  ClassDefOverride(TrkrClusterv2, 2)
109 };
110 
111 #endif //TRACKBASE_TRKRCLUSTERV2_H