BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TofHitStatus.h
Go to the documentation of this file.
1#ifndef TOFHITSTATUS_H
2#define TOFHITSTATUS_H
3
5
7
8 public:
9
11 virtual ~TofHitStatus() {}
12
13 void init();
14 TofHitStatus& operator=(const DstTofTrack& source);
15 TofHitStatus& operator=(const TofHitStatus& source);
16 // TofHitStatus& operator+(const TofHitStatus& source1, const TofHitStatus& source2 )
17
18 public:
19
20 unsigned int value() const { return m_status; }
21 // void status( const bool raw, bool readout, bool counter, bool cluster,bool barrel, bool east, const unsigned int layer, unsigned int ncounter, unsigned int neast, unsigned int nwest ) const;
22 bool is_raw() const { return m_raw; }
23 bool is_readout() const { return m_readout; }
24 bool is_counter() const { return m_counter; }
25 bool is_cluster() const { return m_cluster; }
26 bool is_barrel() const { return m_barrel; }
27 bool is_east() const { return m_east; }
28 unsigned int layer() const { return m_layer; }
29 bool is_overflow() const { return m_overflow; }
30 bool is_multihit() const { return m_multihit; }
31 unsigned int ncounter() const { return m_ncounter; }
32 unsigned int neast() const { return m_neast; }
33 unsigned int nwest() const { return m_nwest; }
34
35 static bool is_raw( unsigned int status );
36 static bool is_readout( unsigned int status );
37 static bool is_counter( unsigned int status );
38 static bool is_cluster( unsigned int status );
39 static bool is_barrel( unsigned int status );
40 static bool is_east( unsigned int status );
41 static unsigned int layer( unsigned int status );
42 static bool is_overflow( unsigned int status );
43 static bool is_multihit( unsigned int status );
44 static unsigned int ncounter( unsigned int status );
45 static unsigned int neast( unsigned int status );
46 static unsigned int nwest( unsigned int status );
47 static unsigned int part( unsigned int status );
48
49 public:
50
51 void setStatus( unsigned int status );
52 void setRaw( bool raw );
53 void setReadout( bool readout );
54 void setCounter( bool counter );
55 void setCluster( bool cluster );
56 void setBarrel( bool barrel );
57 void setEast( bool east );
58 void setLayer( unsigned int layer );
59 void setOverflow( bool overflow );
60 void setMultihit( bool multihit );
61 void setNCounter( unsigned int ncounter );
62 void setNEast( unsigned int neast );
63 void setNWest( unsigned int nwest );
64
65 void setBarrelCluster( unsigned int layer );
66 void setBarrelCounter( unsigned int layer );
67 void setBarrelReadout( unsigned int layer, bool east );
68 void setBarrelRaw( unsigned int layer, bool east );
69 void setEndcapCluster( bool east );
70 void setEndcapRaw( bool east );
71 void setNoHit();
72
73 private:
74
75 unsigned int m_status;
76 bool m_raw;
77 bool m_readout;
78 bool m_counter;
79 bool m_cluster;
80 bool m_barrel;
81 bool m_east;
82 unsigned int m_layer;
83 bool m_overflow;
84 bool m_multihit;
85 unsigned int m_ncounter;
86 unsigned int m_neast;
87 unsigned int m_nwest;
88
89 static const unsigned int Raw_Index = 0;
90 static const unsigned int Raw_Mask = 0x00000001;
91 static const unsigned int Readout_Index = 1;
92 static const unsigned int Readout_Mask = 0x00000002;
93 static const unsigned int Counter_Index = 2;
94 static const unsigned int Counter_Mask = 0x00000004;
95 static const unsigned int Cluster_Index = 3;
96 static const unsigned int Cluster_Mask = 0x00000008;
97 static const unsigned int Barrel_Index = 4;
98 static const unsigned int Barrel_Mask = 0x00000010;
99 static const unsigned int East_Index = 5;
100 static const unsigned int East_Mask = 0x00000020;
101 static const unsigned int Layer_Index = 6;
102 static const unsigned int Layer_Mask = 0x000000C0;
103 static const unsigned int Overflow_Index = 8;
104 static const unsigned int Overflow_Mask = 0x00000100;
105 static const unsigned int Multihit_Index = 9;
106 static const unsigned int Multihit_Mask = 0x00000200;
107 static const unsigned int Ncounter_Index = 12;
108 static const unsigned int Ncounter_Mask = 0x0000F000;
109 static const unsigned int Neast_Index = 16;
110 static const unsigned int Neast_Mask = 0x000F0000;
111 static const unsigned int Nwest_Index = 20;
112 static const unsigned int Nwest_Mask = 0x00F00000;
113 static const unsigned int N_Mask = 0x0000000F;
114
115};
116#endif //TOFHITSTATUS_H
bool is_barrel() const
Definition: TofHitStatus.h:26
unsigned int ncounter() const
Definition: TofHitStatus.h:31
unsigned int layer() const
Definition: TofHitStatus.h:28
unsigned int value() const
Definition: TofHitStatus.h:20
static unsigned int part(unsigned int status)
bool is_cluster() const
Definition: TofHitStatus.h:25
void setBarrelReadout(unsigned int layer, bool east)
void setStatus(unsigned int status)
void setNWest(unsigned int nwest)
bool is_multihit() const
Definition: TofHitStatus.h:30
virtual ~TofHitStatus()
Definition: TofHitStatus.h:11
bool is_overflow() const
Definition: TofHitStatus.h:29
void setLayer(unsigned int layer)
void setCounter(bool counter)
void setMultihit(bool multihit)
void setBarrel(bool barrel)
unsigned int nwest() const
Definition: TofHitStatus.h:33
void setBarrelRaw(unsigned int layer, bool east)
bool is_counter() const
Definition: TofHitStatus.h:24
void setCluster(bool cluster)
void setEast(bool east)
void setOverflow(bool overflow)
bool is_east() const
Definition: TofHitStatus.h:27
bool is_readout() const
Definition: TofHitStatus.h:23
unsigned int neast() const
Definition: TofHitStatus.h:32
void setNCounter(unsigned int ncounter)
void setEndcapRaw(bool east)
void setEndcapCluster(bool east)
bool is_raw() const
Definition: TofHitStatus.h:22
void setNEast(unsigned int neast)
void setBarrelCounter(unsigned int layer)
TofHitStatus & operator=(const DstTofTrack &source)
void setBarrelCluster(unsigned int layer)
void setReadout(bool readout)
void setRaw(bool raw)