BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Muc/MucRecEvent/MucRecEvent-00-02-52/MucRecEvent/MucRecHitContainer.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_CONTAINER_H
13#define MUC_REC_HIT_CONTAINER_H
14
15#include <map>
16#include "Identifier/Identifier.h"
17
18#include "MucRecEvent/MucRecHitID.h"
19#include "MucRecEvent/MucRecHit.h"
20
21/**
22 * MucRecHitContainer has a MucRecHitCol which contains all MucRecHit objects for a single event.
23 * Access is optimized for referencing by BesMUCRecHitID indices.
24 *
25 * @author Zhengyun You \URL{mailto:[email protected]}
26 * @see MucRecHit
27 */
28
30{
31 public:
32 typedef std::map<MucRecHitID, int> GapHitCountMap;
33 typedef std::map<MucRecHitID, MucRecHit*> pHitMap;
34
35 // Constructor.
37
38 // Copy constructor.
40
41 // Assignment operator.
43
44 // Destructor.
46
47 public:
48
49 /// Points to the *single* instance of MucRecHitContainer.
50 //static MucRecHitContainer *Instance();
51
52 /// Initializes the MucRecHitContainer with MucRecHitCol.
53 void Init();
54
55 /// Destroys the *single* instance of MucRecHitContainer.
56 void Destroy();
57
58 void SetMucRecHitCol(MucRecHitCol* p);// { m_pMucRecHitCol = p; }
59
60 /// Get MucRecHitCol pointer.
61 MucRecHitCol* GetMucRecHitCol() { return m_pMucRecHitCol; }
62
63 /// How many hits are there in this event?
65
66 /// How many hits are there in this gap?
67 int GetGapHitCount(const MucRecHitID gapID);
68
69 /// How many hits are there in this gap?
70 int GetGapHitCount(const int part,
71 const int seg,
72 const int gap);
73
74 /// Get a MucRecHit object by hit identifier.
76
77 /// Get a MucRecHit by part, seg, gap, and hit within the gap.
78 MucRecHit *GetHit(const int part,
79 const int seg,
80 const int gap,
81 const int hit);
82
83 /// Get a MucRecHit by Identifier.
84 /// If doesnt exist, return null.
86
87 /// Get a MucRecHit by part, seg, gap, and strip.
88 /// If doesnt exist, return null.
90 const int seg,
91 const int gap,
92 const int strip);
93
94 void AddHit(const Identifier id);
95
96 /// Place a new hit object in the container.
97 void AddHit(const int part,
98 const int seg,
99 const int gap,
100 const int strip);
101
102 /// Remove all hit objects from the container, and destroy them.
103 void Clear();
104
105 private:
106 MucRecHitCol *m_pMucRecHitCol;
107
110
111};
112
113#endif /* MUC_REC_HIT_CONTAINER_H */
ObjectVector< MucRecHit > MucRecHitCol
MucRecHit * GetHitByIdentifier(const int part, const int seg, const int gap, const int strip)
void Clear()
Remove all hit objects from the container, and destroy them.
void AddHit(const int part, const int seg, const int gap, const int strip)
Place a new hit object in the container.
int GetGapHitCount(const int part, const int seg, const int gap)
How many hits are there in this gap?
int GetHitCount()
How many hits are there in this event?
MucRecHit * GetHit(const MucRecHitID hitID)
Get a MucRecHit object by hit identifier.
void AddHit(const Identifier id)
MucRecHitContainer(const MucRecHitContainer &source)
MucRecHitContainer & operator=(const MucRecHitContainer &orig)
void Destroy()
Destroys the single instance of MucRecHitContainer.
MucRecHit * GetHit(const int part, const int seg, const int gap, const int hit)
Get a MucRecHit by part, seg, gap, and hit within the gap.
void Init()
Points to the single instance of MucRecHitContainer.
MucRecHit * GetHitByIdentifier(const Identifier id)
void SetMucRecHitCol(MucRecHitCol *p)
int GetGapHitCount(const MucRecHitID gapID)
How many hits are there in this gap?