BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Muc/MucRecEvent/include/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 <iostream>
16#include <map>
17#include <math.h>
18#include <stdlib.h>
19#include <vector>
20
21/**
22 * Class BesMUCRecRawHit contains the four numbers necessary to identify a hit uniquely:
23 * part, seg, gap, strip, and hit within the gap.
24 *
25 * @author Zhengyun You \URL{mailto:youzy@hep.pku.cn}
26 *
27 */
28
29class MucRecHitID {
30public:
31 // PUBLIC CONSTANTS =================================================
32
33 // CONSTRUCTOR/DESTRUCTOR METHODS ===================================
34
35 /// Constructor.
36 MucRecHitID( const int part = -1, const int seg = -1, const int gap = -1,
37 const int hit = -1 );
38
39 /// Copy constructor.
40 MucRecHitID( const MucRecHitID& source );
41
42 /// Assignment operator.
44
45 /// Comparison operators.
46 bool operator==( const MucRecHitID& other ) const;
47 bool operator!=( const MucRecHitID& other ) const;
48 bool operator<( const MucRecHitID& other ) const;
49 bool operator>( const MucRecHitID& other ) const;
50
51 /// Destructor.
53
54 /// Set the identifier.
55 void SetID( const int part = -1, const int seg = -1, const int gap = -1,
56 const int hit = -1 );
57
58 /// Get part number. (0-east cap, 1-barrel, 2-west cap)
59 int Part() const { return m_Part; }
60
61 /// Get seg number. (0-7)
62 int Seg() const { return m_Seg; }
63
64 /// Get gap number. (0-8)
65 int Gap() const { return m_Gap; }
66
67 /// Get hit number within this gap. (starts at 0)
68 int Hit() const { return m_Hit; }
69
70private:
71 int m_Part;
72 int m_Seg;
73 int m_Gap;
74 int m_Hit;
75};
76
77/// Print a MucRecHitID hit identifier to a stream.
78// ostream& operator << (ostream& s, const MucRecHitID& n);
79
80#endif /* MUC_REC_HIT_ID_H */
bool operator!=(const MucRecHitID &other) const
int Gap() const
Get gap number. (0-8).
bool operator>(const MucRecHitID &other) const
int Seg() const
Get seg number. (0-7).
MucRecHitID(const MucRecHitID &source)
Copy constructor.
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).
~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).
void SetID(const int part=-1, const int seg=-1, const int gap=-1, const int hit=-1)
Set the identifier.