BOSS 8.0.0
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 "MdcGeomSvc.h"
6#include "MdcRawEvent/MdcDigi.h"
7#include <CLHEP/Geometry/Point3D.h>
8#include <iostream>
9#include <vector>
10
11using namespace std;
12using namespace CLHEP;
13
15
16public:
17 // Constructor.
18 MdcHitGroup() : fType1ID( -1 ), fType2ID( -1 ), useflag( 1 ) {
19 fType3ID.clear();
20 fType4ID.clear();
21 fAllNeiborID.clear();
22 fHitsOfWire.clear();
23 fWire = NULL;
24 };
25
26 // Destructor
28
29public: // Extractors
30 const MdcGeoWire* GetWire() { return fWire; }
31 vector<MdcDigi*> GetHit() { return fHitsOfWire; }
32 bool HasHit() {
33 if ( fHitsOfWire.size() == 0 ) { return false; }
34 else { return true; }
35 }
36 bool Used() {
37 if ( fHitsOfWire.size() == 0 || useflag == 0 ) { return true; }
38 else { return false; }
39 }
40 int GetType1() { return fType1ID; }
41 int GetType2() { return fType2ID; }
42 vector<int> GetType3() { return fType3ID; }
43 vector<int> GetType4() { return fType4ID; }
44 vector<int> GetNeiborHits() { return fAllNeiborID; }
46 return fType3ID.size() + fType4ID.size() + ( fType1ID < 0 ? 0 : 1 ) +
47 ( fType2ID < 0 ? 0 : 1 );
48 }
49
50public: // Modifiers
51 void SetWire( const MdcGeoWire* aWire ) { fWire = aWire; }
52 void AddHit( MdcDigi* aHit ) { fHitsOfWire.push_back( aHit ); }
53 void AddType1( int wireID ) {
54 fType1ID = wireID;
55 fAllNeiborID.push_back( wireID );
56 }
57 void AddType2( int wireID ) {
58 fType2ID = wireID;
59 fAllNeiborID.push_back( wireID );
60 }
61 void AddType3( int wireID ) {
62 fType3ID.push_back( wireID );
63 fAllNeiborID.push_back( wireID );
64 }
65 void AddType4( int wireID ) {
66 fType4ID.push_back( wireID );
67 fAllNeiborID.push_back( wireID );
68 }
69 void SetUsedFlag() { useflag = 0; }
70
71private:
72 const MdcGeoWire* fWire;
73 // vector<MdcGeoWire*> fNeiborHitWires;
74 int fType1ID;
75 int fType2ID;
76 int useflag;
77 vector<int> fType3ID;
78 vector<int> fType4ID;
79 vector<int> fAllNeiborID;
80 vector<MdcDigi*> fHitsOfWire;
81};
82
83#endif
bool HasHit()
Definition MdcHitGroup.h:32
void AddType4(int wireID)
Definition MdcHitGroup.h:65
bool Used()
Definition MdcHitGroup.h:36
vector< int > GetType3()
Definition MdcHitGroup.h:42
int GetNoNeiborHits()
Definition MdcHitGroup.h:45
vector< MdcDigi * > GetHit()
Definition MdcHitGroup.h:31
void AddType1(int wireID)
Definition MdcHitGroup.h:53
void AddType2(int wireID)
Definition MdcHitGroup.h:57
vector< int > GetType4()
Definition MdcHitGroup.h:43
void SetWire(const MdcGeoWire *aWire)
Definition MdcHitGroup.h:51
vector< int > GetNeiborHits()
Definition MdcHitGroup.h:44
int GetType2()
Definition MdcHitGroup.h:41
void AddHit(MdcDigi *aHit)
Definition MdcHitGroup.h:52
void SetUsedFlag()
Definition MdcHitGroup.h:69
const MdcGeoWire * GetWire()
Definition MdcHitGroup.h:30
int GetType1()
Definition MdcHitGroup.h:40
void AddType3(int wireID)
Definition MdcHitGroup.h:61