CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Muc/MucRecEvent/MucRecEvent-00-02-51/MucRecEvent/MucRecHitID.h
Go to the documentation of this file.
1//$id$
2//
3//$log$
4
5/*
6 * 2003/12/12 Zhengyun You Peking University
7 *
8 * 2004/09/12 Zhengyun You Peking University
9 * transplanted to Gaudi framework
10 */
11
12#ifndef MUC_REC_HIT_ID_H
13#define MUC_REC_HIT_ID_H
14
15#include <stdlib.h>
16#include <math.h>
17#include <vector>
18#include <map>
19#include <iostream>
20
21
22/**
23 * Class BesMUCRecRawHit contains the four numbers necessary to identify a hit uniquely:
24 * part, seg, gap, strip, and hit within the gap.
25 *
26 * @author Zhengyun You \URL{mailto:[email protected]}
27 *
28 */
29
30class MucRecHitID
31{
32 public:
33 // PUBLIC CONSTANTS =================================================
34
35 // CONSTRUCTOR/DESTRUCTOR METHODS ===================================
36
37 /// Constructor.
38 MucRecHitID(const int part = -1,
39 const int seg = -1,
40 const int gap = -1,
41 const int hit = -1);
42
43 /// Copy constructor.
44 MucRecHitID(const MucRecHitID& source);
45
46 /// Assignment operator.
48
49 /// Comparison operators.
50 bool operator == (const MucRecHitID& other) const;
51 bool operator != (const MucRecHitID& other) const;
52 bool operator < (const MucRecHitID& other) const;
53 bool operator > (const MucRecHitID& other) const;
54
55 /// Destructor.
57
58 /// Set the identifier.
59 void SetID(const int part = -1,
60 const int seg = -1,
61 const int gap = -1,
62 const int hit = -1);
63
64 /// Get part number. (0-east cap, 1-barrel, 2-west cap)
65 int Part() const { return m_Part; }
66
67 /// Get seg number. (0-7)
68 int Seg() const { return m_Seg; }
69
70 /// Get gap number. (0-8)
71 int Gap() const { return m_Gap; }
72
73 /// Get hit number within this gap. (starts at 0)
74 int Hit() const { return m_Hit; }
75
76 private:
77 int m_Part;
78 int m_Seg;
79 int m_Gap;
80 int m_Hit;
81};
82
83/// Print a MucRecHitID hit identifier to a stream.
84//ostream& operator << (ostream& s, const MucRecHitID& n);
85
86#endif /* MUC_REC_HIT_ID_H */
bool operator!=(const MucRecHitID &other) const
Definition: MucRecHitID.cxx:63
bool operator>(const MucRecHitID &other) const
Definition: MucRecHitID.cxx:89
MucRecHitID(const MucRecHitID &source)
Copy constructor.
bool operator<(const MucRecHitID &other) const
Definition: MucRecHitID.cxx:75
MucRecHitID(const int part=-1, const int seg=-1, const int gap=-1, const int hit=-1)
Constructor.
int Hit() const
Get hit number within this gap. (starts at 0)
~MucRecHitID()
Destructor.
MucRecHitID & operator=(const MucRecHitID &orig)
Assignment operator.
bool operator==(const MucRecHitID &other) const
Comparison operators.
Definition: MucRecHitID.cxx:51
int Part() const
Get part number. (0-east cap, 1-barrel, 2-west cap)
void SetID(const int part=-1, const int seg=-1, const int gap=-1, const int hit=-1)
Set the identifier.