BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcHitGroup.h
Go to the documentation of this file.
1
2#ifndef MDC_HIT_GROUP_H
3#define MDC_HIT_GROUP_H
4
5#include <CLHEP/Geometry/Point3D.h>
6#include <iostream>
7#include <vector>
10
11using namespace std;
12using namespace CLHEP;
13
15
16 public:
17 // Constructor.
18 MdcHitGroup():fType1ID(-1),
19 fType2ID(-1),
20 useflag(1)
21 {
22 fType3ID.clear();
23 fType4ID.clear();
24 fAllNeiborID.clear();
25 fHitsOfWire.clear();
26 fWire=NULL;
27 };
28
29 // Destructor
31
32 public: // Extractors
33 const MdcGeoWire* GetWire(){return fWire;}
34 vector<MdcDigi*> GetHit() {return fHitsOfWire;}
35 bool HasHit(){
36 if(fHitsOfWire.size()==0) {return false;}
37 else {return true;}
38 }
39 bool Used(){
40 if(fHitsOfWire.size()==0||useflag==0) {return true;}
41 else {return false;}
42 }
43 int GetType1() {return fType1ID;}
44 int GetType2() {return fType2ID;}
45 vector<int> GetType3() {return fType3ID;}
46 vector<int> GetType4() {return fType4ID;}
47 vector<int> GetNeiborHits(){return fAllNeiborID;}
49 return fType3ID.size()+fType4ID.size()+(fType1ID<0?0:1)+(fType2ID<0?0:1);
50 }
51
52 public: // Modifiers
53 void SetWire(const MdcGeoWire* aWire){fWire=aWire;}
54 void AddHit(MdcDigi* aHit) {fHitsOfWire.push_back(aHit);}
55 void AddType1(int wireID) {
56 fType1ID=wireID;
57 fAllNeiborID.push_back(wireID);
58 }
59 void AddType2(int wireID) {
60 fType2ID=wireID;
61 fAllNeiborID.push_back(wireID);
62 }
63 void AddType3(int wireID) {
64 fType3ID.push_back(wireID);
65 fAllNeiborID.push_back(wireID);
66 }
67 void AddType4(int wireID) {
68 fType4ID.push_back(wireID);
69 fAllNeiborID.push_back(wireID);
70 }
71 void SetUsedFlag(){useflag=0;}
72
73 private:
74 const MdcGeoWire* fWire;
75 // vector<MdcGeoWire*> fNeiborHitWires;
76 int fType1ID;
77 int fType2ID;
78 int useflag;
79 vector<int> fType3ID;
80 vector<int> fType4ID;
81 vector<int> fAllNeiborID;
82 vector<MdcDigi*> fHitsOfWire;
83
84
85
86};
87
88
89#endif
90
#define NULL
bool HasHit()
Definition MdcHitGroup.h:35
void AddType4(int wireID)
Definition MdcHitGroup.h:67
bool Used()
Definition MdcHitGroup.h:39
vector< int > GetType3()
Definition MdcHitGroup.h:45
int GetNoNeiborHits()
Definition MdcHitGroup.h:48
vector< MdcDigi * > GetHit()
Definition MdcHitGroup.h:34
void AddType1(int wireID)
Definition MdcHitGroup.h:55
void AddType2(int wireID)
Definition MdcHitGroup.h:59
vector< int > GetType4()
Definition MdcHitGroup.h:46
void SetWire(const MdcGeoWire *aWire)
Definition MdcHitGroup.h:53
vector< int > GetNeiborHits()
Definition MdcHitGroup.h:47
int GetType2()
Definition MdcHitGroup.h:44
void AddHit(MdcDigi *aHit)
Definition MdcHitGroup.h:54
void SetUsedFlag()
Definition MdcHitGroup.h:71
const MdcGeoWire * GetWire()
Definition MdcHitGroup.h:33
int GetType1()
Definition MdcHitGroup.h:43
void AddType3(int wireID)
Definition MdcHitGroup.h:63