Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CMFlashClusterv2.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CMFlashClusterv2.h
1 
7 #ifndef TRACKBASE_CMFLASHCLUSTERV2_H
8 #define TRACKBASE_CMFLASHCLUSTERV2_H
9 
10 #include "CMFlashCluster.h"
11 
12 #include <iostream>
13 
14 class PHObject;
15 
26 {
27  public:
29  CMFlashClusterv2() = default;
30 
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 CMFlashClusterv2(*this); }
36 
38  void CopyFrom( const CMFlashCluster& ) override;
39 
41  void CopyFrom( CMFlashCluster* source ) override
42  { CopyFrom( *source ); }
43 
44  //
45  // cluster position
46  //
47  float getX() const override { return m_pos[0]; }
48  void setX(float x) override { m_pos[0] = x; }
49  float getY() const override { return m_pos[1]; }
50  void setY(float y) override { m_pos[1] = y; }
51  float getZ() const override { return m_pos[2]; }
52  void setZ(float z) override { m_pos[2] = z; }
53  unsigned int getNclusters() const override {return m_nclusters;}
54  void setNclusters(unsigned int n) override { m_nclusters = n;}
55  bool getIsRGap() const override { return m_isRGap; }
56  void setIsRGap(bool isRGap) override { m_isRGap = isRGap;}
57  bool getIsPhiGap() const override { return m_isPhiGap; }
58  void setIsPhiGap(bool isPhiGap) override { m_isPhiGap = isPhiGap;}
59 
60  //
61  // cluster info
62  //
63  unsigned int getAdc() const override { return m_adc; }
64  void setAdc(unsigned int adc) override { m_adc = adc; }
65 
66  protected:
67 
69  float m_pos[3] = {NAN, NAN, NAN};
70 
72  unsigned int m_adc = 0xFFFFFFFF;
73 
75  unsigned int m_nclusters = UINT_MAX;
76 
78  bool m_isRGap = false;
79  bool m_isPhiGap = false;
80 
81  ClassDefOverride(CMFlashClusterv2, 1)
82 };
83 
84 #endif //TRACKBASE_CMFLASHCLUSTERV2_H