Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrkrClusterv3.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrkrClusterv3.h
1 
7 #ifndef TRACKBASE_TRKRCLUSTERV3_H
8 #define TRACKBASE_TRKRCLUSTERV3_H
9 
10 #include "TrkrCluster.h"
11 #include "TrkrDefs.h"
12 #include <iostream>
13 
14 class PHObject;
15 
22 class TrkrClusterv3 : public TrkrCluster
23 {
24  public:
25 
27  TrkrClusterv3();
28 
30  ~TrkrClusterv3() override = default;
31 
32  // PHObject virtual overloads
33  void identify(std::ostream& os = std::cout) const override;
34  void Reset() override {}
35  int isValid() const override;
36  PHObject* CloneMe() const override { return new TrkrClusterv3(*this); }
37 
39  void CopyFrom( const TrkrCluster& ) override;
40 
42  void CopyFrom( TrkrCluster* source ) override
43  { CopyFrom( *source ); }
44 
45  //
46  // cluster position
47  //
48  float getPosition(int coor) const override { return m_local[coor]; }
49  void setPosition(int coor, float xi) override { m_local[coor] = xi; }
50  float getLocalX() const override { return m_local[0]; }
51  void setLocalX(float loc0) override { m_local[0] = loc0; }
52  float getLocalY() const override { return m_local[1]; }
53  void setLocalY(float loc1) override { m_local[1] = loc1; }
54 
56  void setActsLocalError(unsigned int i, unsigned int j, float value) override;
57  float getActsLocalError(unsigned int i, unsigned int j) const override { return m_actsLocalErr[i][j]; }
58  TrkrDefs::subsurfkey getSubSurfKey() const override { return m_subsurfkey; }
60 
61  //
62  // cluster info
63  //
64  unsigned int getAdc() const override { return m_adc; }
65  void setAdc(unsigned int adc) override { m_adc = adc; }
66 
67  //
68  // convenience interface
69  //
70  float getRPhiError() const override;
71  float getZError() const override;
72 
74  float getX() const override
75  { std::cout << "Deprecated getx trkrcluster function!"<<std::endl; return NAN;}
76  float getY() const override
77  { std::cout << "Deprecated gety trkrcluster function!"<<std::endl; return NAN;}
78  float getZ() const override
79  { std::cout << "Deprecated getz trkrcluster function!"<<std::endl; return NAN;}
80  void setX(float) override
81  { std::cout << "Deprecated setx trkrcluster function!"<<std::endl;}
82  void setY(float) override
83  { std::cout << "Deprecated sety trkrcluster function!"<<std::endl;}
84  void setZ(float) override
85  { std::cout << "Deprecated setz trkrcluster function!"<<std::endl;}
86  float getSize(unsigned int, unsigned int) const override
87  {std::cout << "Deprecated getsize trkrcluster function!" << std::endl; return NAN;}
88  void setSize(unsigned int, unsigned int, float) override
89  {std::cout << "Deprecated setsize trkrcluster function!" << std::endl;}
90  float getError(unsigned int, unsigned int) const override
91  {std::cout << "Deprecated geterr trkrcluster function!" << std::endl; return NAN;}
92  void setError(unsigned int, unsigned int, float) override
93  { std::cout << "Deprecated seterr trkrcluster function!" << std::endl; }
94  float getPhiSize() const override
95  { std::cout << "Deprecated size function"<< std::endl; return NAN;}
96  float getZSize() const override
97  {std::cout << "Deprecated size function" << std::endl; return NAN;}
98  float getPhiError() const override
99  { std::cout << "Deprecated getPhiError function"<< std::endl; return NAN;}
100 
101  protected:
102 
103  TrkrDefs::cluskey m_cluskey; //< unique identifier within container
104  TrkrDefs::subsurfkey m_subsurfkey; //< unique identifier for hitsetkey-surface maps
105 
106  unsigned int m_adc; //< cluster sum adc (D. McGlinchey - Do we need this?)
107 
108  float m_local[2]; //< 2D local position [cm]
109  float m_actsLocalErr[2][2]; //< 2D local error for Acts [cm]
110 
111  ClassDefOverride(TrkrClusterv3, 2)
112 };
113 
114 #endif //TRACKBASE_TRKRCLUSTERV3_H