BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
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
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.
47 MucRecHitID& operator=(const MucRecHitID& orig);
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
int Gap() const
Get gap number. (0-8)
Definition MucRecHitID.h:71
bool operator>(const MucRecHitID &other) const
int Seg() const
Get seg number. (0-7)
Definition MucRecHitID.h:68
bool operator<(const MucRecHitID &other) const
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)
Definition MucRecHitID.h:74
~MucRecHitID()
Destructor.
MucRecHitID & operator=(const MucRecHitID &orig)
Assignment operator.
bool operator==(const MucRecHitID &other) const
Comparison operators.
int Part() const
Get part number. (0-east cap, 1-barrel, 2-west cap)
Definition MucRecHitID.h:65
void SetID(const int part=-1, const int seg=-1, const int gap=-1, const int hit=-1)
Set the identifier.