CGEM BOSS
6.6.5.i
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Symbols
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
w
x
Files
File List
File Members
All
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
CGEM BOSS
Used Packages
Requirements
►
How to use the ERS package
Todo List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
6.6.5.i
►
Analysis
►
BesCxxPolicy
►
BesExamples
►
BesPolicy
►
Calibration
►
Cgem
►
Control
►
Database
►
DetectorDescription
►
DistBoss
►
DQA
►
Emc
►
Event
►
EventDisplay
►
EventFilter
►
EvtPreSelect
►
External
►
FileFilterAlg
►
Generator
►
InstallArea
►
LumTauAlg
►
MagneticField
►
Mdc
►
Mrpc
►
Muc
▼
Reconstruction
►
BeamParamsAlg
►
CgemClusterCreate
►
CgemLineFit
►
CgemMdcCombAlg
►
CgemMdcFitAlg
►
CgemSegmentFitAlg
►
CgemSegmentRecAlg
►
DotsConnection
►
DTagAlg
►
DTagSkim
►
EmcRec
►
EmcTimeRec
►
EsTimeAlg
►
EventAssembly
►
HoughTransAlg
►
KalFitAlg
►
MdcDedxAlg
►
MdcDummyAlg
►
MdcFastTrkAlg
▼
MdcPatRec
►
BField
►
MdcData
►
MdcGeom
►
MdcRecoUtil
▼
MdcTrkRecon
▼
MdcTrkRecon-00-03-49
►
MdcTrkRecon
▼
src
►
components
GmsList.cxx
GmsListLink.cxx
►
MdcFlagHold.cxx
MdcHitDict.cxx
MdcLine.cxx
►
MdcMakeHits.cxx
MdcMergeDups.cxx
MdcPlotHits.cxx
►
MdcSeg.cxx
MdcSegData.cxx
►
MdcSegFinder.cxx
►
MdcSegGrouper.cxx
►
MdcSegGrouperAx.cxx
MdcSegGrouperCsmc.cxx
►
MdcSegGrouperSt.cxx
MdcSegInfo.cxx
MdcSegInfoAxialO.cxx
MdcSegInfoCsmc.cxx
►
MdcSegInfoSterO.cxx
►
MdcSegList.cxx
MdcSegParams.cxx
MdcSegPatterns.cxx
MdcSegUsage.cxx
►
MdcTrack.cxx
►
MdcTrackList.cxx
►
MdcTrackListBase.cxx
MdcTrackListCsmc.cxx
MdcTrackParams.cxx
MdcTrkRecon.cxx
►
mdcTwoInv.cxx
►
test
►
MdcxReco
►
ProbTools
►
ProxyDict
►
TrkBase
►
TrkFitter
►
MrpcRec
►
MrpcRecDBS
►
MucRecAlg
►
Pi0EtaToGGRecAlg
►
Pi0RecAlg
►
PrimaryVertexAlg
►
SD0TagAlg
►
T0Dummy
►
TofEnergyRec
►
TofRec
►
TrackUtil
►
TrkExtAlg
►
TrkReco
►
VeeVertexAlg
►
ZddReconAlg
►
RootPolicy
►
Simulation
►
Tof
►
Trigger
►
Utilities
►
Validation
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
MdcSegPatterns.cxx
Go to the documentation of this file.
1
// MdcSegPatterns.cxx
2
//
3
4
// Interface Dependencies ----------------------------------------------
5
6
#include "
MdcTrkRecon/MdcSegPatterns.h
"
7
8
// Implementation Dependencies -----------------------------------------
9
10
#include <stdlib.h>
11
#include <iostream>
12
#include <assert.h>
13
#include "
MdcTrkRecon/countBits.h
"
14
15
// End Implementation Dependencies -------------------------------------
16
17
MdcSegPatterns::MdcSegPatterns
(
int
useAllAmbig) {
18
19
patt4
[0] = 0225;
20
patt4
[1] = 0125;
21
patt4
[2] = 0115;
22
patt4
[3] = 055;
23
patt4
[4] = 0226;
24
patt4
[5] = 0126;
25
patt4
[6] = 0116;
26
patt4
[7] = 056;
27
28
patt3
[0] = 0224;
29
patt3
[1] = 0221;
30
patt3
[2] = 0205;
31
patt3
[3] = 025;
32
patt3
[4] = 0124;
33
patt3
[5] = 0121;
34
patt3
[6] = 0105;
35
patt3
[7] = 0114;
36
patt3
[8] = 0111;
37
patt3
[9] = 015;
38
patt3
[10] = 054;
39
patt3
[11] = 051;
40
patt3
[12] = 045;
41
patt3
[13] = 0206;
42
patt3
[14] = 026;
43
patt3
[15] = 0106;
44
patt3
[16] = 0112;
45
patt3
[17] = 016;
46
patt3
[18] = 052;
47
patt3
[19] = 046;
48
ambigPatt4
=
new
int
*[8];
49
assert(
ambigPatt4
!= 0);
50
int
i;
51
for
(i = 0; i < 8; i++) {
52
ambigPatt4
[i] =
new
int
[16];
53
assert(
ambigPatt4
[i] != 0);
54
if
(useAllAmbig) {
55
for
(
int
j = 0; j < 16; j++)
ambigPatt4
[i][j] = 1;
56
}
else
{
57
for
(
int
j = 0; j < 16; j++)
ambigPatt4
[i][j] = 0;
58
}
59
}
60
ambigPatt3
=
new
int
*[20];
61
assert(
ambigPatt3
!= 0);
62
for
(i = 0; i < 20; i++) {
63
ambigPatt3
[i] =
new
int
[8];
64
assert(
ambigPatt3
[i] != 0);
65
if
(useAllAmbig) {
66
for
(
int
j = 0; j < 8; j++)
ambigPatt3
[i][j] = 1;
67
}
else
{
68
for
(
int
j = 0; j < 8; j++)
ambigPatt3
[i][j] = 0;
69
}
70
}
71
72
if
(!useAllAmbig) {
73
ambigPatt4
[0][0] =
ambigPatt4
[0][1] =
ambigPatt4
[0][3] =
74
ambigPatt4
[0][7] =
ambigPatt4
[0][8] =
ambigPatt4
[0][12] =
75
ambigPatt4
[0][14] =
ambigPatt4
[0][15] = 1;
76
ambigPatt4
[1][8] =
ambigPatt4
[1][9] =
ambigPatt4
[1][11] = 1;
77
ambigPatt4
[2][4] =
ambigPatt4
[2][5] =
ambigPatt4
[2][12] =
78
ambigPatt4
[2][13] = 1;
79
ambigPatt4
[3][1] =
ambigPatt4
[3][9] =
ambigPatt4
[3][13] = 1;
80
ambigPatt4
[4][2] =
ambigPatt4
[4][6] =
ambigPatt4
[4][14] = 1;
81
ambigPatt4
[5][2] =
ambigPatt4
[5][3] =
ambigPatt4
[5][10] =
82
ambigPatt4
[5][11] = 1;
83
ambigPatt4
[6][4] =
ambigPatt4
[6][6] =
ambigPatt4
[6][7] = 1;
84
ambigPatt4
[7][0] =
ambigPatt4
[7][1] =
ambigPatt4
[7][3] =
85
ambigPatt4
[7][7] =
ambigPatt4
[7][8] =
ambigPatt4
[7][12] =
86
ambigPatt4
[7][14] =
ambigPatt4
[7][15] = 1;
87
88
ambigPatt3
[0][0] =
ambigPatt3
[0][1] =
ambigPatt3
[0][3] =
89
ambigPatt3
[0][4] =
ambigPatt3
[0][6] =
ambigPatt3
[0][7] = 1;
90
ambigPatt3
[1][0] =
ambigPatt3
[1][1] =
ambigPatt3
[1][3] =
91
ambigPatt3
[1][4] =
ambigPatt3
[1][6] =
ambigPatt3
[1][7] = 1;
92
ambigPatt3
[2][0] =
ambigPatt3
[2][1] =
ambigPatt3
[2][3] =
93
ambigPatt3
[2][4] =
ambigPatt3
[2][6] =
ambigPatt3
[2][7] = 1;
94
ambigPatt3
[3][0] =
ambigPatt3
[3][1] =
ambigPatt3
[3][3] =
95
ambigPatt3
[3][4] =
ambigPatt3
[3][6] =
ambigPatt3
[3][7] = 1;
96
ambigPatt3
[4][1] =
ambigPatt3
[4][4] =
ambigPatt3
[4][5] = 1;
97
ambigPatt3
[5][4] =
ambigPatt3
[5][5] = 1;
98
ambigPatt3
[6][0] =
ambigPatt3
[6][1] =
ambigPatt3
[6][4] =
99
ambigPatt3
[6][5] =
ambigPatt3
[6][7] = 1;
100
ambigPatt3
[7][2] =
ambigPatt3
[7][3] =
ambigPatt3
[7][6] = 1;
101
ambigPatt3
[8][2] =
ambigPatt3
[8][3] =
ambigPatt3
[8][6] =
102
ambigPatt3
[8][7] =
ambigPatt3
[8][0] = 1;
103
ambigPatt3
[9][1] =
ambigPatt3
[9][4] =
ambigPatt3
[9][5] = 1;
104
ambigPatt3
[10][0] =
ambigPatt3
[10][1] =
ambigPatt3
[10][3] =
105
ambigPatt3
[10][4] =
ambigPatt3
[10][6] =
ambigPatt3
[10][7] = 1;
106
ambigPatt3
[11][1] =
ambigPatt3
[11][5] =
ambigPatt3
[11][7] =
107
ambigPatt3
[11][0] =
ambigPatt3
[11][4] = 1;
108
ambigPatt3
[12][4] =
ambigPatt3
[12][5] = 1;
109
ambigPatt3
[13][2] =
ambigPatt3
[13][6] = 1;
110
ambigPatt3
[14][2] =
ambigPatt3
[14][3] =
ambigPatt3
[14][6] = 1;
111
ambigPatt3
[15][0] =
ambigPatt3
[15][2] =
ambigPatt3
[15][3] =
112
ambigPatt3
[15][6] =
ambigPatt3
[15][7] = 1;
113
ambigPatt3
[16][2] =
ambigPatt3
[16][3] = 1;
114
ambigPatt3
[17][0] =
ambigPatt3
[17][1] =
ambigPatt3
[17][3] =
115
ambigPatt3
[17][4] =
ambigPatt3
[17][6] =
ambigPatt3
[17][7] = 1;
116
ambigPatt3
[18][0] =
ambigPatt3
[18][1] =
ambigPatt3
[18][3] =
117
ambigPatt3
[18][4] =
ambigPatt3
[18][6] =
ambigPatt3
[18][7] = 1;
118
ambigPatt3
[19][0] =
ambigPatt3
[19][1] =
ambigPatt3
[19][3] =
119
ambigPatt3
[19][4] =
ambigPatt3
[19][6] =
ambigPatt3
[19][7] = 1;
120
}
121
122
// For hit combos with allowed patterns; allocate space for list of
123
// patterns, fill list and record number in npattx[i]
124
int
j, nbit;
125
unsigned
match;
126
for
(i = 0; i < 256; i++) {
127
npatt4
[i] = 0;
128
npatt3
[i] = 0;
129
// loop through the 8 patterns, seeing how many match
130
for
(j = 0; j < 8; j++) {
131
match = i &
patt4
[j];
132
nbit =
countbits
(match);
133
if
(nbit == 4)
npatt4
[i]++;
134
}
135
allowedPatt4
[i] =
new
int
[
npatt4
[i]];
136
// Add the allowed patterns to the list for this hit combination
137
int
nstored = 0;
138
for
(j = 0; j < 8; j++) {
139
match = i &
patt4
[j];
140
nbit =
countbits
(match);
141
if
(nbit == 4) {
142
allowedPatt4
[i][nstored] = j;
143
nstored++;
144
}
145
}
146
147
// Repeat for 3-hit patterns
148
149
for
(j = 0; j < 20; j++) {
150
match = i &
patt3
[j];
151
nbit =
countbits
(match);
152
if
(nbit == 3)
npatt3
[i]++;
153
}
154
allowedPatt3
[i] =
new
int
[
npatt3
[i]];
155
// Add the allowed patterns to the list for this hit combination
156
nstored = 0;
157
for
(j = 0; j < 20; j++) {
158
match = i &
patt3
[j];
159
nbit =
countbits
(match);
160
if
(nbit == 3) {
161
allowedPatt3
[i][nstored] = j;
162
nstored++;
163
}
164
}
165
}
166
167
return
;
168
}
17
MdcSegPatterns::MdcSegPatterns
(
int
useAllAmbig) {
…
}
169
170
MdcSegPatterns::~MdcSegPatterns
() {
171
int
i;
172
for
(i = 0; i < 256; i++) {
173
delete
[]
allowedPatt4
[i];
174
delete
[]
allowedPatt3
[i];
175
}
176
for
(i = 0; i < 8; i++)
delete
[]
ambigPatt4
[i];
177
for
(i = 0; i < 20; i++)
delete
[]
ambigPatt3
[i];
178
delete
[]
ambigPatt4
;
179
delete
[]
ambigPatt3
;
180
}
170
MdcSegPatterns::~MdcSegPatterns
() {
…
}
181
182
183
184
185
186
MdcSegPatterns.h
MdcSegPatterns::ambigPatt3
int ** ambigPatt3
Definition
MdcSegPatterns.h:45
MdcSegPatterns::patt4
unsigned patt4[8]
Definition
MdcSegPatterns.h:38
MdcSegPatterns::npatt4
int npatt4[256]
Definition
MdcSegPatterns.h:40
MdcSegPatterns::allowedPatt3
int * allowedPatt3[256]
Definition
MdcSegPatterns.h:43
MdcSegPatterns::allowedPatt4
int * allowedPatt4[256]
Definition
MdcSegPatterns.h:42
MdcSegPatterns::MdcSegPatterns
MdcSegPatterns(int useAllAmbig)
Definition
MdcSegPatterns.cxx:17
MdcSegPatterns::ambigPatt4
int ** ambigPatt4
Definition
MdcSegPatterns.h:44
MdcSegPatterns::~MdcSegPatterns
~MdcSegPatterns()
Definition
MdcSegPatterns.cxx:170
MdcSegPatterns::npatt3
int npatt3[256]
Definition
MdcSegPatterns.h:41
MdcSegPatterns::patt3
unsigned patt3[20]
Definition
MdcSegPatterns.h:39
countBits.h
countbits
int countbits(unsigned word)
Definition
countBits.h:5
6.6.5.i
Reconstruction
MdcPatRec
MdcTrkRecon
MdcTrkRecon-00-03-49
src
MdcSegPatterns.cxx
Generated by
1.12.0