Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrkrCluster.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrkrCluster.h
1 
7 #ifndef TRACKBASE_TRKRCLUSTER_H
8 #define TRACKBASE_TRKRCLUSTER_H
9 
10 #include "TrkrDefs.h"
11 
12 #include <phool/PHObject.h>
13 
14 #include <climits>
15 #include <cmath>
16 #include <iostream>
17 #include <memory>
18 
19 
25 class TrkrCluster : public PHObject
26 {
27  public:
28 
30  ~TrkrCluster() override = default;
31 
32  // PHObject virtual overloads
33  void identify(std::ostream& os = std::cout) const override
34  {
35  os << "TrkrCluster base class" << std::endl;
36  }
37  void Reset() override {}
38  int isValid() const override { return 0; }
39 
40 
42  using PHObject::CopyFrom;
43 
45  virtual void CopyFrom( const TrkrCluster& )
46  {}
47 
49  virtual void CopyFrom( TrkrCluster* )
50  {}
51 
52  //
53  // cluster position
54  //
55  virtual float getLocalX() const { return NAN; }
56  virtual void setLocalX(float) {}
57  virtual float getLocalY() const { return NAN; }
58  virtual void setLocalY(float) {}
59 
60  //
61  // cluster info
62  //
63  virtual void setAdc(unsigned int) {}
64  virtual unsigned int getAdc() const { return UINT_MAX; }
65  virtual void setMaxAdc(uint16_t) {}
66  virtual unsigned int getMaxAdc() const {return UINT_MAX; }
67  virtual char getOverlap() const { return std::numeric_limits<char>::max(); }
68  virtual void setOverlap(char) {}
69  virtual char getEdge() const { return std::numeric_limits<char>::max(); }
70  virtual void setEdge(char) {}
71  virtual void setTime(const float) {}
72  virtual float getTime() const { return NAN;}
73  virtual char getSize() const {return std::numeric_limits<char>::max(); }
74 
75 
76  //
77  // convenience interface
78  //
79  virtual float getPhiSize() const { return NAN; }
80  virtual float getZSize() const { return NAN; }
81  virtual float getPhiError() const { return NAN; }
82  virtual float getRPhiError() const { return NAN; }
83  virtual float getZError() const { return NAN; }
84 
86  virtual void setActsLocalError(unsigned int /*i*/, unsigned int /*j*/, float /*value*/){}
87  virtual float getActsLocalError(unsigned int /*i*/, unsigned int /*j*/) const { return NAN; }
88  virtual TrkrDefs::subsurfkey getSubSurfKey() const { return TrkrDefs::SUBSURFKEYMAX; }
89  virtual void setSubSurfKey(TrkrDefs::subsurfkey /*id*/) {}
90 
91  // Global coordinate functions are deprecated, use local
92  // coordinate functions only
93  virtual float getX() const { return NAN; }
94  virtual void setX(float) {}
95  virtual float getY() const { return NAN; }
96  virtual void setY(float) {}
97  virtual float getZ() const { return NAN; }
98  virtual void setZ(float) {}
99  virtual float getPosition(int /*coor*/) const { return NAN; }
100  virtual void setPosition(int /*coor*/, float /*xi*/) {}
101  virtual void setGlobal() {}
102  virtual void setLocal() {}
103  virtual bool isGlobal() const { return true; }
104  virtual float getError(unsigned int /*i*/, unsigned int /*j*/) const { return NAN; }
105  virtual void setError(unsigned int /*i*/, unsigned int /*j*/, float /*value*/) {}
106  virtual float getSize(unsigned int /*i*/, unsigned int /*j*/) const { return NAN; }
107  virtual void setSize(unsigned int /*i*/, unsigned int /*j*/, float /*value*/) {}
108 
109 
110  protected:
111  TrkrCluster() = default;
112  ClassDefOverride(TrkrCluster, 1)
113 };
114 
115 #endif //TRACKBASE_TRKRCLUSTER_H