CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcDigiGroup Class Reference

#include <MdcDigiGroup.h>

Public Member Functions

 MdcDigiGroup ()
 
void Reset ()
 
 ~MdcDigiGroup ()
 
const MdcGeoWireGetWire ()
 
vector< const MdcDigi * > GetHit ()
 
bool HasHit ()
 
bool Used ()
 
int getUseFlag ()
 
int GetPrev (int i=0)
 
int GetNext (int i=0)
 
vector< int > GetInner (int i=0)
 
vector< int > GetOuter (int i=0)
 
vector< int > GetOuterTot (int i=0)
 
vector< int > GetNextAndOuterTot (int i=0)
 
vector< int > GetNeiborHits ()
 
vector< int > GetNeiborHits (int i)
 
int GetNoNeiborHits ()
 
int GetNTypesNeighborHits ()
 
int GetNhitsNearby ()
 
int isOnNode ()
 
int isInBigSet ()
 
bool IsOuterEnd ()
 
bool isGoodSeed ()
 
bool isEnd ()
 
bool isRadialBridge ()
 
bool isCircuBridge ()
 
bool isCircuEnd ()
 
void SetWire (const MdcGeoWire *aWire)
 
void AddHit (const MdcDigi *aHit)
 
void AddPrev (int wireID, int gap=0)
 
void AddNext (int wireID, int gap=0)
 
void AddInner (int wireID, int gap=0)
 
void AddOuter (int wireID, int gap=0)
 
void SetUsedFlag (int flag=1)
 
void SetOnNode ()
 
void SetInBigSet ()
 
void AddTrkCandiIdx (int idx)
 
void RmTrkCandiIdx (int idx)
 

Static Public Attributes

static const int nGap =3
 

Detailed Description

Definition at line 22 of file MdcDigiGroup.h.

Constructor & Destructor Documentation

◆ MdcDigiGroup()

MdcDigiGroup::MdcDigiGroup ( )
inline

Definition at line 28 of file MdcDigiGroup.h.

29 {
30 useflag=0;
31 m_totalNearbyHits=0;
32 m_onNode=0;
33 m_inBigSet=0;
34 for(int i=0; i<nGap; i++) {
35 fPrevID[i]=-1;
36 fNextID[i]=-1;
37 fInnerID[i].clear();
38 fOuterID[i].clear();
39 }
40 fAllNeiborID.clear();
41 fHitsOfWire.clear();
42 m_idxTrkCandiVec.clear();
43 fired=false;
44 fWire=NULL;
45 };
static const int nGap

◆ ~MdcDigiGroup()

MdcDigiGroup::~MdcDigiGroup ( )
inline

Definition at line 67 of file MdcDigiGroup.h.

67{};

Member Function Documentation

◆ AddHit()

void MdcDigiGroup::AddHit ( const MdcDigi * aHit)
inline

Definition at line 177 of file MdcDigiGroup.h.

177{fHitsOfWire.push_back(aHit);}

◆ AddInner()

void MdcDigiGroup::AddInner ( int wireID,
int gap = 0 )
inline

Definition at line 192 of file MdcDigiGroup.h.

192 {
193 if(gap<nGap) {
194 m_totalNearbyHits++;
195 fInnerID[gap].push_back(wireID);
196 if(gap==0) fAllNeiborID.push_back(wireID);
197 }
198 }

◆ AddNext()

void MdcDigiGroup::AddNext ( int wireID,
int gap = 0 )
inline

Definition at line 185 of file MdcDigiGroup.h.

185 {
186 if(gap<nGap) {
187 m_totalNearbyHits++;
188 fNextID[gap]=wireID;
189 if(gap==0) fAllNeiborID.push_back(wireID);
190 }
191 }

◆ AddOuter()

void MdcDigiGroup::AddOuter ( int wireID,
int gap = 0 )
inline

Definition at line 199 of file MdcDigiGroup.h.

199 {
200 if(gap<nGap) {
201 m_totalNearbyHits++;
202 fOuterID[gap].push_back(wireID);
203 if(gap==0) fAllNeiborID.push_back(wireID);
204 }
205 }

◆ AddPrev()

void MdcDigiGroup::AddPrev ( int wireID,
int gap = 0 )
inline

Definition at line 178 of file MdcDigiGroup.h.

178 {
179 if(gap<nGap) {
180 m_totalNearbyHits++;
181 fPrevID[gap]=wireID;
182 if(gap==0) fAllNeiborID.push_back(wireID);
183 }
184 }

◆ AddTrkCandiIdx()

void MdcDigiGroup::AddTrkCandiIdx ( int idx)
inline

Definition at line 210 of file MdcDigiGroup.h.

210{m_idxTrkCandiVec.push_back(idx);};

◆ GetHit()

vector< const MdcDigi * > MdcDigiGroup::GetHit ( )
inline

Definition at line 71 of file MdcDigiGroup.h.

71{return fHitsOfWire;}

◆ GetInner()

vector< int > MdcDigiGroup::GetInner ( int i = 0)
inline

Definition at line 89 of file MdcDigiGroup.h.

89 {
90 if(i<nGap) return fInnerID[i];
91 else {
92 vector<int> a;
93 return a;
94 }
95 }

◆ GetNeiborHits() [1/2]

vector< int > MdcDigiGroup::GetNeiborHits ( )
inline

Definition at line 113 of file MdcDigiGroup.h.

113{return fAllNeiborID;}

Referenced by DotsConnection::makeDotCellEdge().

◆ GetNeiborHits() [2/2]

vector< int > MdcDigiGroup::GetNeiborHits ( int i)
inline

Definition at line 114 of file MdcDigiGroup.h.

114 {
115 vector<int> a = fAllNeiborID;
116 if(i>0&&i<nGap) {
117 for(int j=1; j<=i; j++) {
118 a.insert( a.end(), fOuterID[j].begin(), fOuterID[j].end() );
119 a.insert( a.end(), fInnerID[j].begin(), fInnerID[j].end() );
120 }
121 }
122 return a;
123 }

◆ GetNext()

int MdcDigiGroup::GetNext ( int i = 0)
inline

Definition at line 85 of file MdcDigiGroup.h.

85 {
86 if(i<nGap) return fNextID[i];
87 else return -99;
88 }

◆ GetNextAndOuterTot()

vector< int > MdcDigiGroup::GetNextAndOuterTot ( int i = 0)
inline

Definition at line 108 of file MdcDigiGroup.h.

108 {
109 vector<int> a=GetOuterTot(i);
110 if(i<nGap) for(int j=0; j<=i; j++) a.push_back( fNextID[j] );
111 return a;
112 }
vector< int > GetOuterTot(int i=0)

◆ GetNhitsNearby()

int MdcDigiGroup::GetNhitsNearby ( )
inline

Definition at line 132 of file MdcDigiGroup.h.

132{ return m_totalNearbyHits; }

◆ GetNoNeiborHits()

int MdcDigiGroup::GetNoNeiborHits ( )
inline

Definition at line 124 of file MdcDigiGroup.h.

124 {
125 return fInnerID[0].size()+fOuterID[0].size()+(fPrevID[0]<0?0:1)+(fNextID[0]<0?0:1);
126 }

◆ GetNTypesNeighborHits()

int MdcDigiGroup::GetNTypesNeighborHits ( )
inline

Definition at line 127 of file MdcDigiGroup.h.

128 {
129 return (fInnerID[0].size()>0?1:0)+(fOuterID[0].size()>0?1:0)+(fPrevID[0]<0?0:1)+(fNextID[0]<0?0:1);
130 }

Referenced by isCircuBridge(), isCircuEnd(), isEnd(), isGoodSeed(), and isRadialBridge().

◆ GetOuter()

vector< int > MdcDigiGroup::GetOuter ( int i = 0)
inline

Definition at line 96 of file MdcDigiGroup.h.

96 {
97 if(i<nGap) return fOuterID[i];
98 else {
99 vector<int> a;
100 return a;
101 }
102 }

◆ GetOuterTot()

vector< int > MdcDigiGroup::GetOuterTot ( int i = 0)
inline

Definition at line 103 of file MdcDigiGroup.h.

103 {
104 vector<int> a;
105 if(i<nGap) for(int j=0; j<=i; j++) a.insert( a.end(), fOuterID[j].begin(), fOuterID[j].end() );
106 return a;
107 }

Referenced by GetNextAndOuterTot().

◆ GetPrev()

int MdcDigiGroup::GetPrev ( int i = 0)
inline

Definition at line 81 of file MdcDigiGroup.h.

81 {
82 if(i<nGap) return fPrevID[i];
83 else return -99;
84 }

◆ getUseFlag()

int MdcDigiGroup::getUseFlag ( )
inline

Definition at line 80 of file MdcDigiGroup.h.

80{return useflag;}

◆ GetWire()

const MdcGeoWire * MdcDigiGroup::GetWire ( )
inline

Definition at line 70 of file MdcDigiGroup.h.

70{return fWire;}

◆ HasHit()

bool MdcDigiGroup::HasHit ( )
inline

Definition at line 72 of file MdcDigiGroup.h.

72 {
73 if(fHitsOfWire.size()==0) {return false;}
74 else {return true;}
75 }

◆ isCircuBridge()

bool MdcDigiGroup::isCircuBridge ( )
inline

Definition at line 161 of file MdcDigiGroup.h.

162 {
163 bool flag=false;
164 int nTypeNb = GetNTypesNeighborHits();
165 if(nTypeNb==2) if(fPrevID[0]>=0&&fNextID[0]>=0) flag=true;
166 return flag;
167 }
int GetNTypesNeighborHits()

◆ isCircuEnd()

bool MdcDigiGroup::isCircuEnd ( )
inline

Definition at line 168 of file MdcDigiGroup.h.

169 {
170 bool flag=false;
171 int nTypeNb = GetNTypesNeighborHits();
172 if(nTypeNb==1&&fInnerID[0].size()==0&&fOuterID[0].size()==0) flag=true;
173 return flag;
174 }

◆ isEnd()

bool MdcDigiGroup::isEnd ( )
inline

Definition at line 148 of file MdcDigiGroup.h.

149 {
150 int nTypeNb = GetNTypesNeighborHits();
151 if(nTypeNb==1) return true;
152 else return false;
153 }

◆ isGoodSeed()

bool MdcDigiGroup::isGoodSeed ( )
inline

Definition at line 141 of file MdcDigiGroup.h.

142 {
143 if(IsOuterEnd()) return true;
144 //if(GetNTypesNeighborHits()<3) return true;
145 if(GetNTypesNeighborHits()==0) return true;
146 return false;
147 }
bool IsOuterEnd()

◆ isInBigSet()

int MdcDigiGroup::isInBigSet ( )
inline

Definition at line 134 of file MdcDigiGroup.h.

134{return m_inBigSet;}

◆ isOnNode()

int MdcDigiGroup::isOnNode ( )
inline

Definition at line 133 of file MdcDigiGroup.h.

133{ return m_onNode;}

◆ IsOuterEnd()

bool MdcDigiGroup::IsOuterEnd ( )
inline

Definition at line 137 of file MdcDigiGroup.h.

138 {
139 return fOuterID[0].size()==0&&fInnerID[0].size()>0;
140 }

Referenced by isGoodSeed().

◆ isRadialBridge()

bool MdcDigiGroup::isRadialBridge ( )
inline

Definition at line 154 of file MdcDigiGroup.h.

155 {
156 bool flag=false;
157 int nTypeNb = GetNTypesNeighborHits();
158 if(nTypeNb==2) if(fInnerID[0].size()>0&&fOuterID[0].size()>0) flag=true;
159 return flag;
160 }

◆ Reset()

void MdcDigiGroup::Reset ( )
inline

Definition at line 48 of file MdcDigiGroup.h.

49 {
50 useflag=0;
51 m_totalNearbyHits=0;
52 m_onNode=0;
53 m_inBigSet=0;
54 for(int i=0; i<nGap; i++) {
55 fPrevID[i]=-1;
56 fNextID[i]=-1;
57 fInnerID[i].clear();
58 fOuterID[i].clear();
59 }
60 fAllNeiborID.clear();
61 fHitsOfWire.clear();
62 m_idxTrkCandiVec.clear();
63 fired=false;
64 }

◆ RmTrkCandiIdx()

void MdcDigiGroup::RmTrkCandiIdx ( int idx)
inline

Definition at line 211 of file MdcDigiGroup.h.

211 {
212 //int nCandi = m_idxTrkCandiVec.size();
213 //for(int i=0; i<nCandi; i++) {
214 // if(m_idxTrkCandiVec[i]==idx) {
215 // m_idxTrkCandiVec.erase(m_idxTrkCandiVec.begin()+i);
216 // break;
217 // }
218 //}
219
220 vector<int>::iterator iter = std::remove(m_idxTrkCandiVec.begin(), m_idxTrkCandiVec.end(), idx);
221 m_idxTrkCandiVec.erase(iter, m_idxTrkCandiVec.end());
222 }
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ SetInBigSet()

void MdcDigiGroup::SetInBigSet ( )
inline

Definition at line 208 of file MdcDigiGroup.h.

208{ m_inBigSet=1;}

◆ SetOnNode()

void MdcDigiGroup::SetOnNode ( )
inline

Definition at line 207 of file MdcDigiGroup.h.

207{ m_onNode=1;}

◆ SetUsedFlag()

void MdcDigiGroup::SetUsedFlag ( int flag = 1)
inline

Definition at line 206 of file MdcDigiGroup.h.

206{useflag=flag;}

◆ SetWire()

void MdcDigiGroup::SetWire ( const MdcGeoWire * aWire)
inline

Definition at line 176 of file MdcDigiGroup.h.

176{fWire=aWire;}

Referenced by DotsConnection::initialize().

◆ Used()

bool MdcDigiGroup::Used ( )
inline

Definition at line 76 of file MdcDigiGroup.h.

76 {
77 if(fHitsOfWire.size()==0||useflag==1) {return true;}
78 else {return false;}
79 }

Member Data Documentation

◆ nGap

const int MdcDigiGroup::nGap =3
static

The documentation for this class was generated from the following file: