Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CMFlashClusterv1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CMFlashClusterv1.h
1 
7 #ifndef TRACKBASE_CMFLASHCLUSTERV1_H
8 #define TRACKBASE_CMFLASHCLUSTERV1_H
9 
10 #include "CMFlashCluster.h"
11 
12 #include <iostream>
13 
14 class PHObject;
15 
25 {
26  public:
28  CMFlashClusterv1() = default;
29 
30  // PHObject virtual overloads
31  void identify(std::ostream& os = std::cout) const override;
32  void Reset() override {}
33  int isValid() const override;
34  PHObject* CloneMe() const override { return new CMFlashClusterv1(*this); }
35 
37  void CopyFrom( const CMFlashCluster& ) override;
38 
40  void CopyFrom( CMFlashCluster* source ) override
41  { CopyFrom( *source ); }
42 
43  //
44  // cluster position
45  //
46  float getX() const override { return m_pos[0]; }
47  void setX(float x) override { m_pos[0] = x; }
48  float getY() const override { return m_pos[1]; }
49  void setY(float y) override { m_pos[1] = y; }
50  float getZ() const override { return m_pos[2]; }
51  void setZ(float z) override { m_pos[2] = z; }
52  unsigned int getNclusters() const override {return m_nclusters;}
53  void setNclusters(unsigned int n) override { m_nclusters = n;}
54 
55  //
56  // cluster info
57  //
58  unsigned int getAdc() const override { return m_adc; }
59  void setAdc(unsigned int adc) override { m_adc = adc; }
60 
61  protected:
62 
64  float m_pos[3] = {NAN, NAN, NAN};
65 
67  unsigned int m_adc = 0xFFFFFFFF;
68 
70  unsigned int m_nclusters = UINT_MAX;
71 
72  ClassDefOverride(CMFlashClusterv1, 1)
73 };
74 
75 #endif //TRACKBASE_CMFLASHCLUSTERV1_H