BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TrigMdc Class Reference

#include <TrigMdc.h>

Public Member Functions

 TrigMdc (const char *name)
 
virtual ~TrigMdc ()
 
void setMdcTrigData (uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)
 
void initialize ()
 
const std::string & getName () const
 
int getMdcHitOne (int layer, int wire) const
 
int getMdcHitSOne (int layer, int wire) const
 
int getMdcHitPre (int layer, int wire) const
 
int getMdcHitAft (int layer, int wire) const
 
uint32_t getMdcHitWin (int layer, int wire) const
 
int getMdcTSFOne (int layer, int wire) const
 
int getMdcTSFSOne (int layer, int wire) const
 
int getMdcTSFPre (int layer, int wire) const
 
int getMdcTSFAft (int layer, int wire) const
 
uint32_t getMdcTSFWin (int layer, int wire) const
 
int getMdcLtrkOne (int id) const
 
int getMdcLtrkSOne (int id) const
 
int getMdcLtrkPre (int id) const
 
int getMdcLtrkAft (int id) const
 
uint32_t getMdcLtrkWin (int id) const
 
int getMdcStrkOne (int id) const
 
int getMdcStrkSOne (int id) const
 
int getMdcStrkPre (int id) const
 
int getMdcStrkAft (int id) const
 
uint32_t getMdcStrkWin (int id) const
 
int getMdcLtrkCoutOne (int id) const
 
int getMdcLtrkCoutSOne (int id) const
 
int getMdcStrkCoutOne (int id) const
 
int getMdcStrkCoutSOne (int id) const
 
int getMdcTrigCondi (int id) const
 
void print ()
 

Detailed Description

Definition at line 9 of file TrigMdc.h.

Constructor & Destructor Documentation

◆ TrigMdc()

TrigMdc::TrigMdc ( const char *  name)

Definition at line 7 of file TrigMdc.cxx.

7 : m_name(name){
8 // hit
9 m_mdchit_one = new int*[24];
10 for (int i = 0; i < 24; i++) m_mdchit_one[i] = new int[256];
11 m_mdchit_sone = new int*[24];
12 for (int i = 0; i < 24; i++) m_mdchit_sone[i] = new int[256];
13 m_mdchit_pre = new int*[24];
14 for(int i=0; i<24; i++) m_mdchit_pre[i] = new int[256];
15 m_mdchit_aft = new int*[24];
16 for(int i=0; i<24; i++) m_mdchit_aft[i] = new int[256];
17 m_mdchit_win = new uint32_t*[24];
18 for(int i=0; i<24; i++) m_mdchit_win[i] = new uint32_t[256];
19 // tsf
20 m_mdctsf_one = new int*[6];
21 for (int i=0; i<6; i++) m_mdctsf_one[i] = new int[256];
22 m_mdctsf_sone = new int*[6];
23 for (int i=0; i<6; i++) m_mdctsf_sone[i] = new int[256];
24 m_mdctsf_pre = new int*[6];
25 for(int i=0; i<6; i++) m_mdctsf_pre[i] = new int[256];
26 m_mdctsf_aft = new int*[6];
27 for(int i=0; i<6; i++) m_mdctsf_aft[i] = new int[256];
28 m_mdctsf_win = new uint32_t*[6];
29 for(int i=0; i<6; i++) m_mdctsf_win[i] = new uint32_t[256];
30 // ltrk
31 m_mdcltrk_one = new int[128];
32 m_mdcltrk_sone = new int[128];
33 m_mdcltrk_pre = new int[128];
34 m_mdcltrk_aft = new int[128];
35 m_mdcltrk_win = new uint32_t[128];
36 // strk
37 m_mdcstrk_one = new int[128];
38 m_mdcstrk_sone = new int[128];
39 m_mdcstrk_pre = new int[128];
40 m_mdcstrk_aft = new int[128];
41 m_mdcstrk_win = new uint32_t[128];
42 // ltrk in ltrk counter
43 m_mdcltrkc_one = new int[132];
44 m_mdcltrkc_sone= new int[132];
45 // strk in strk counter
46 m_mdcstrkc_one = new int[132];
47 m_mdcstrkc_sone = new int[132];
48 // trigger condition
49 m_mdcTrigCondi = new int[10];
50
51 filename = getenv("TRIGEVENTROOT");
52 filename += "/dat/trig_mdc.txt";
53 ifstream inputfile;
54 inputfile.open(filename.c_str());
55 string data[6];
56 std::vector<uint32_t> vtmp;
57 uint32_t mark = 226;
58 for(uint32_t i = 0; i < 6; i++) inputfile >> data[i];
59 for(uint32_t j = 0; j < 4680; j++) {
60 for(uint32_t k = 0; k < 6; k++) inputfile >> data[k];
61 if((uint32_t (atoi(data[0].c_str())) != mark) || j == 4679) {
62 if(j == 4679) {
63 for(int m = 1; m < 6; m++) vtmp.push_back(atoi(data[m].c_str()));
64 }
65 typedef pair<uint32_t, vector<uint32_t> > vpair;
66 m_datamap.insert(vpair(mark,vtmp));
67 mark = atoi(data[0].c_str());
68 vtmp.clear();
69 }
70 if((uint32_t (atoi(data[0].c_str())) == mark) && j != 4679) {
71 for(int l = 1; l < 6; l++) vtmp.push_back(atoi(data[l].c_str()));
72 }
73 }
74}
TTree * data
char * c_str(Index i)
Definition: EvtCyclic3.cc:252
std::ifstream ifstream
Definition: bpkt_streams.h:44

◆ ~TrigMdc()

TrigMdc::~TrigMdc ( )
virtual

Definition at line 76 of file TrigMdc.cxx.

76 {
77 delete m_mdchit_one;
78 delete m_mdctsf_one;
79 delete m_mdchit_sone;
80 delete m_mdctsf_sone;
81
82 delete m_mdchit_pre;
83 // delete m_mdchit_aft;
84
85 delete m_mdcltrk_one;
86 delete m_mdcstrk_one;
87 delete m_mdcltrkc_one;
88 delete m_mdcstrkc_one;
89
90 delete m_mdcltrk_sone;
91 delete m_mdcstrk_sone;
92 delete m_mdcltrkc_sone;
93 delete m_mdcstrkc_sone;
94
95 delete m_mdcTrigCondi;
96}

Member Function Documentation

◆ getMdcHitAft()

int TrigMdc::getMdcHitAft ( int  layer,
int  wire 
) const
inline

Definition at line 28 of file TrigMdc.h.

28{ return m_mdchit_aft[layer][wire]; } // first down in windows after first up

◆ getMdcHitOne()

int TrigMdc::getMdcHitOne ( int  layer,
int  wire 
) const
inline

Definition at line 20 of file TrigMdc.h.

20{ return m_mdchit_one[layer][wire]; }

◆ getMdcHitPre()

int TrigMdc::getMdcHitPre ( int  layer,
int  wire 
) const
inline

Definition at line 27 of file TrigMdc.h.

27{ return m_mdchit_pre[layer][wire]; } // first up in windows

◆ getMdcHitSOne()

int TrigMdc::getMdcHitSOne ( int  layer,
int  wire 
) const
inline

Definition at line 21 of file TrigMdc.h.

21 {
22 if(m_mdchit_sone[layer][wire] != 0) {
23 return (m_mdchit_sone[layer][wire] + 1);
24 }
25 else return 0;
26 }

◆ getMdcHitWin()

uint32_t TrigMdc::getMdcHitWin ( int  layer,
int  wire 
) const
inline

Definition at line 29 of file TrigMdc.h.

29{ return m_mdchit_win[layer][wire]; } // hit distributions in windows

◆ getMdcLtrkAft()

int TrigMdc::getMdcLtrkAft ( int  id) const
inline

Definition at line 52 of file TrigMdc.h.

52{ return m_mdcltrk_aft[id]; } // first down in windows after first up

◆ getMdcLtrkCoutOne()

int TrigMdc::getMdcLtrkCoutOne ( int  id) const
inline

Definition at line 68 of file TrigMdc.h.

68{ return m_mdcltrkc_one[id]; }

◆ getMdcLtrkCoutSOne()

int TrigMdc::getMdcLtrkCoutSOne ( int  id) const
inline

Definition at line 69 of file TrigMdc.h.

69 {
70 if(m_mdcltrkc_sone[id] != 0) {
71 return (m_mdcltrkc_sone[id] + 1);
72 }
73 else return 0;
74 }

◆ getMdcLtrkOne()

int TrigMdc::getMdcLtrkOne ( int  id) const
inline

Definition at line 44 of file TrigMdc.h.

44{ return m_mdcltrk_one[id]; }

◆ getMdcLtrkPre()

int TrigMdc::getMdcLtrkPre ( int  id) const
inline

Definition at line 51 of file TrigMdc.h.

51{ return m_mdcltrk_pre[id]; } // first up in windows

◆ getMdcLtrkSOne()

int TrigMdc::getMdcLtrkSOne ( int  id) const
inline

Definition at line 45 of file TrigMdc.h.

45 {
46 if(m_mdcltrk_sone[id] != 0) {
47 return (m_mdcltrk_sone[id] + 1);
48 }
49 else return 0;
50 }

◆ getMdcLtrkWin()

uint32_t TrigMdc::getMdcLtrkWin ( int  id) const
inline

Definition at line 53 of file TrigMdc.h.

53{ return m_mdcltrk_win[id]; } // hit distributions in windows

◆ getMdcStrkAft()

int TrigMdc::getMdcStrkAft ( int  id) const
inline

Definition at line 64 of file TrigMdc.h.

64{ return m_mdcstrk_aft[id]; } // first down in windows after first up

◆ getMdcStrkCoutOne()

int TrigMdc::getMdcStrkCoutOne ( int  id) const
inline

Definition at line 77 of file TrigMdc.h.

77{ return m_mdcstrkc_one[id]; }

◆ getMdcStrkCoutSOne()

int TrigMdc::getMdcStrkCoutSOne ( int  id) const
inline

Definition at line 78 of file TrigMdc.h.

78 {
79 if(m_mdcstrkc_sone[id] != 0) {
80 return (m_mdcstrkc_sone[id] + 1);
81 }
82 else return 0;
83 }

◆ getMdcStrkOne()

int TrigMdc::getMdcStrkOne ( int  id) const
inline

Definition at line 56 of file TrigMdc.h.

56{ return m_mdcstrk_one[id]; }

◆ getMdcStrkPre()

int TrigMdc::getMdcStrkPre ( int  id) const
inline

Definition at line 63 of file TrigMdc.h.

63{ return m_mdcstrk_pre[id]; } // first up in windows

◆ getMdcStrkSOne()

int TrigMdc::getMdcStrkSOne ( int  id) const
inline

Definition at line 57 of file TrigMdc.h.

57 {
58 if(m_mdcstrk_sone[id] != 0) {
59 return (m_mdcstrk_sone[id] + 1);
60 }
61 else return 0;
62 }

◆ getMdcStrkWin()

uint32_t TrigMdc::getMdcStrkWin ( int  id) const
inline

Definition at line 65 of file TrigMdc.h.

65{ return m_mdcstrk_win[id]; } // hit distributions in windows

◆ getMdcTrigCondi()

int TrigMdc::getMdcTrigCondi ( int  id) const
inline

Definition at line 85 of file TrigMdc.h.

85{ return m_mdcTrigCondi[id]; }

◆ getMdcTSFAft()

int TrigMdc::getMdcTSFAft ( int  layer,
int  wire 
) const
inline

Definition at line 40 of file TrigMdc.h.

40{ return m_mdctsf_aft[layer][wire]; } // first down in windows after first up

◆ getMdcTSFOne()

int TrigMdc::getMdcTSFOne ( int  layer,
int  wire 
) const
inline

Definition at line 32 of file TrigMdc.h.

32{ return m_mdctsf_one[layer][wire]; }

◆ getMdcTSFPre()

int TrigMdc::getMdcTSFPre ( int  layer,
int  wire 
) const
inline

Definition at line 39 of file TrigMdc.h.

39{ return m_mdctsf_pre[layer][wire]; } // first up in windows

◆ getMdcTSFSOne()

int TrigMdc::getMdcTSFSOne ( int  layer,
int  wire 
) const
inline

Definition at line 33 of file TrigMdc.h.

33 {
34 if(m_mdctsf_sone[layer][wire] != 0) {
35 return (m_mdctsf_sone[layer][wire] + 1);
36 }
37 else return 0;
38 }

◆ getMdcTSFWin()

uint32_t TrigMdc::getMdcTSFWin ( int  layer,
int  wire 
) const
inline

Definition at line 41 of file TrigMdc.h.

41{ return m_mdctsf_win[layer][wire]; } // hit distributions in windows

◆ getName()

const std::string & TrigMdc::getName ( ) const
inline

Definition at line 18 of file TrigMdc.h.

18{ return m_name; }

◆ initialize()

void TrigMdc::initialize ( )

Definition at line 98 of file TrigMdc.cxx.

98 {
99 //initialize
100 for(int i = 0; i < 24; i++)
101 for(int j = 0; j < 256; j++)
102 {
103 m_mdchit_one[i][j] = 0;
104 m_mdchit_sone[i][j] = 0;
105 m_mdchit_pre[i][j] = 0;
106 m_mdchit_aft[i][j] = 0;
107 m_mdchit_win[i][j] = 0;
108 if(i < 6) {
109 m_mdctsf_one[i][j] = 0;
110 m_mdctsf_sone[i][j] = 0;
111 m_mdctsf_pre[i][j] = 0;
112 m_mdctsf_aft[i][j] = 0;
113 m_mdctsf_win[i][j] = 0;
114 }
115 }
116 for(int k = 0; k < 132; k++)
117 {
118 if(k < 10) m_mdcTrigCondi[k] = 0;
119 m_mdcltrkc_one[k] = 0;
120 m_mdcstrkc_one[k] = 0;
121 m_mdcltrkc_sone[k] = 0;
122 m_mdcstrkc_sone[k] = 0;
123 if(k < 128) {
124 m_mdcltrk_one[k] = 0;
125 m_mdcltrk_sone[k] = 0;
126 m_mdcltrk_pre[k] = 0;
127 m_mdcltrk_aft[k] = 0;
128 m_mdcltrk_win[k] = 0;
129
130 m_mdcstrk_one[k] = 0;
131 m_mdcstrk_sone[k] = 0;
132 m_mdcstrk_pre[k] = 0;
133 m_mdcstrk_aft[k] = 0;
134 m_mdcstrk_win[k] = 0;
135
136 }
137 }
138}

◆ print()

void TrigMdc::print ( )

Definition at line 318 of file TrigMdc.cxx.

318 {
319 cout<<"The number of board is "<<m_datamap.size()<<endl;
320 std::map<uint32_t, std::vector<uint32_t> >::iterator iter = m_datamap.begin();
321 if(iter->first == 0xe2)
322 cout<<"The data size of E2 board is "<<iter->second.size()<<endl;
323
324 for(int i = 0; i < 24; i++)
325 for(int j = 0; j < 256; j++)
326 {
327 m_mdchit_one[i][j] = 0;
328 m_mdchit_sone[i][j] = 0;
329 cout<<"MDC hits: "<<i<<" "<<j<<" "<<m_mdchit_one[i][j]<<endl;
330 cout<<"MDC hits: "<<i<<" "<<j<<" "<<m_mdchit_sone[i][j]<<endl;
331 if(i < 6) {
332 m_mdctsf_one[i][j] = 0;
333 m_mdctsf_sone[i][j] = 0;
334 cout<<"MDC tsf: "<<i<<" "<<j<<" "<<m_mdctsf_one[i][j]<<endl;
335 cout<<"MDC tsf: "<<i<<" "<<j<<" "<<m_mdctsf_sone[i][j]<<endl;
336 }
337 }
338 for(int k = 0; k < 132; k++)
339 {
340 m_mdcltrkc_one[k] = 0;
341 m_mdcstrkc_one[k] = 0;
342 m_mdcltrkc_sone[k] = 0;
343 m_mdcstrkc_sone[k] = 0;
344 cout<<"MDC ltrkc: "<<k<<" "<<m_mdcltrkc_one[k]<<endl;
345 cout<<"MDC strkc: "<<k<<" "<<m_mdcstrkc_one[k]<<endl;
346 cout<<"MDC ltrkc: "<<k<<" "<<m_mdcltrkc_sone[k]<<endl;
347 cout<<"MDC strkc: "<<k<<" "<<m_mdcstrkc_sone[k]<<endl;
348 if(k < 128) {
349 m_mdcltrk_one[k] = 0;
350 m_mdcstrk_one[k] = 0;
351 m_mdcltrk_sone[k] = 0;
352 m_mdcstrk_sone[k] = 0;
353 cout<<"MDC ltrk: "<<k<<" "<<m_mdcltrk_one[k]<<endl;
354 cout<<"MDC strk: "<<k<<" "<<m_mdcstrk_one[k]<<endl;
355 cout<<"MDC ltrk: "<<k<<" "<<m_mdcltrk_sone[k]<<endl;
356 cout<<"MDC strk: "<<k<<" "<<m_mdcstrk_sone[k]<<endl;
357 }
358 }
359}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ setMdcTrigData()

void TrigMdc::setMdcTrigData ( uint32_t  boardId,
uint32_t  window,
uint32_t  datasize,
const uint32_t *  data 
)

Definition at line 140 of file TrigMdc.cxx.

140 {
141 if(datasize%window != 0) cerr<<"ERROR: The data size is not completed in time windows"<<endl;
142 uint32_t periods = datasize/window;
143 std::map<uint32_t, std::vector<uint32_t> >::iterator iter=m_datamap.begin();
144 for(; iter != m_datamap.end(); iter++){
145 if(iter->first != boardId) continue;
146 std::vector<uint32_t>::iterator iter1 = iter->second.begin();
147 for(; iter1 != iter->second.end(); iter1+=5){
148 uint32_t byteId = *(iter1+0) -1;
149 uint32_t bitId = *(iter1+1);
150 int layerId = *(iter1+2) -1;
151 int wireId = *(iter1+3) -1;
152 uint32_t data_type = *(iter1+4);
153 int seriesOne = -100;
154 bool firstSOne = true; // this is a flag of first continue "1" signals
155 bool flag_firstone(true), flag_lastone(true); // whether to book up or down
156 for(uint32_t i=0; i<window; i++){
157 if(layerId < 0 || wireId < 0) continue;
158 if((iter->first) >= 226 && (iter->first) <= 233){ // TKF1-8 information
159 if(data_type == 1){ // hit
160 if((data[byteId + i*periods] >> bitId) & 1){
161 if(layerId >= 36 && layerId <= 39 ){
162 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdchit_pre[layerId-16][wireId] = i+1; flag_firstone = false;}
163 if( ((i-seriesOne)!=1) && (m_mdchit_aft[layerId-16][wireId]!=0) ) flag_lastone = false;
164 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdchit_aft[layerId-16][wireId]=i+1;
165 if(((i-seriesOne)==1) && firstSOne) m_mdchit_sone[layerId-16][wireId] += 1;
166 if(m_mdchit_sone[layerId-16][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false;
167 seriesOne = i;
168 m_mdchit_one[layerId-16][wireId] += 1;
169 m_mdchit_win[layerId-16][wireId] += 1<<i;
170 }
171 else {
172 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdchit_pre[layerId][wireId] = i+1; flag_firstone = false;}
173 if( ((i-seriesOne)!=1) && (m_mdchit_aft[layerId][wireId]!=0) ) flag_lastone = false;
174 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdchit_aft[layerId][wireId]=i+1;
175 if(((i-seriesOne) == 1) && firstSOne) m_mdchit_sone[layerId][wireId] += 1;
176 if(m_mdchit_sone[layerId][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false;
177 seriesOne = i;
178 m_mdchit_one[layerId][wireId] += 1;
179 m_mdchit_win[layerId][wireId] += 1<<i;
180 }
181 }
182 }
183 if(data_type == 0) { // TSF
184 if((data[byteId + i*periods] >> bitId) & 1) {
185 if(layerId == 10) {
186 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdctsf_pre[2][wireId] = i+1; flag_firstone = false;}
187 if( ((i-seriesOne)!=1) && (m_mdctsf_aft[2][wireId]!=0) ) flag_lastone = false;
188 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdctsf_aft[2][wireId]=i+1;
189
190 if((i-seriesOne) == 1 && firstSOne) m_mdctsf_sone[2][wireId] += 1;
191 if(m_mdctsf_sone[2][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false;
192 seriesOne = i;
193 m_mdctsf_one[2][wireId] += 1;
194 m_mdctsf_win[2][wireId] += 1<<i;
195 }
196 if(layerId == 14) {
197 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdctsf_pre[3][wireId] = i+1; flag_firstone = false;}
198 if( ((i-seriesOne)!=1) && (m_mdctsf_aft[3][wireId]!=0) ) flag_lastone = false;
199 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdctsf_aft[3][wireId]=i+1;
200
201 if((i-seriesOne) == 1 && firstSOne) m_mdctsf_sone[3][wireId] += 1;
202 if(m_mdctsf_sone[3][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false;
203 seriesOne = i;
204 m_mdctsf_one[3][wireId] += 1;
205 m_mdctsf_win[3][wireId] += 1<<i;
206 }
207 if(layerId == 17) {
208 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdctsf_pre[4][wireId] = i+1; flag_firstone = false;}
209 if( ((i-seriesOne)!=1) && (m_mdctsf_aft[4][wireId]!=0) ) flag_lastone = false;
210 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdctsf_aft[4][wireId]=i+1;
211
212 if((i-seriesOne) == 1 && firstSOne) m_mdctsf_sone[4][wireId] += 1;
213 if(m_mdctsf_sone[4][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false;
214 seriesOne = i;
215 m_mdctsf_one[4][wireId] += 1;
216 m_mdctsf_win[4][wireId] += 1<<i;
217 }
218 if(layerId == 37) {
219 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdctsf_pre[5][wireId] = i+1; flag_firstone = false;}
220 if( ((i-seriesOne)!=1) && (m_mdctsf_aft[5][wireId]!=0) ) flag_lastone = false;
221 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdctsf_aft[5][wireId]=i+1;
222
223 if((i-seriesOne) == 1 && firstSOne) m_mdctsf_sone[5][wireId] += 1;
224 if(m_mdctsf_sone[5][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false;
225 seriesOne = i;
226 m_mdctsf_one[5][wireId] += 1;
227 m_mdctsf_win[5][wireId] += 1<<i;
228 }
229 }
230 }
231 if(data_type == 2) { // LTK
232 if((data[byteId + i*periods] >> bitId) & 1) {
233 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdcltrk_pre[wireId] = i+1; flag_firstone = false;}
234 if( ((i-seriesOne)!=1) && (m_mdcltrk_aft[wireId]!=0) ) flag_lastone = false;
235 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdcltrk_aft[wireId]=i+1;
236
237 if((i-seriesOne) == 1 && firstSOne) m_mdcltrk_sone[wireId] += 1;
238 if(m_mdcltrk_sone[wireId] != 0 && (i-seriesOne) != 1) firstSOne = false;
239 seriesOne = i;
240 m_mdcltrk_one[wireId] += 1;
241 m_mdcltrk_win[wireId] += 1<<i;
242 }
243 }
244 if(data_type == 3) { // STK
245 if((data[byteId + i*periods] >> bitId) & 1) {
246 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdcstrk_pre[wireId] = i+1; flag_firstone = false;}
247 if( ((i-seriesOne)!=1) && (m_mdcstrk_aft[wireId]!=0) ) flag_lastone = false;
248 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdcstrk_aft[wireId]=i+1;
249
250 if((i-seriesOne) == 1 && firstSOne) m_mdcstrk_sone[wireId] += 1;
251 if(m_mdcstrk_sone[wireId] != 0 && (i-seriesOne) != 1) firstSOne = false;
252 seriesOne = i;
253 m_mdcstrk_one[wireId] += 1;
254 m_mdcstrk_win[wireId] += 1<<i;
255 }
256 }
257 } // end of TKF1-8
258
259 if((iter->first) == 234) { // ITKF information
260 if(data_type == 0) {
261 if((data[byteId + i*periods] >> bitId) & 1) {
262 if(layerId == 2) {
263 if((i - seriesOne) == 1 && firstSOne) m_mdctsf_sone[0][wireId] += 1;
264 if(m_mdctsf_sone[0][wireId] != 0 && (i - seriesOne) != 1) firstSOne = false;
265 seriesOne = i;
266 m_mdctsf_one[0][wireId] += 1;
267 }
268 if(layerId == 6) {
269 if((i - seriesOne) == 1 && firstSOne) m_mdctsf_sone[1][wireId] += 1;
270 if(m_mdctsf_sone[1][wireId] != 0 && (i - seriesOne) != 1) firstSOne = false;
271 seriesOne = i;
272 m_mdctsf_one[1][wireId] += 1;
273 }
274 }
275 }
276 if(data_type == 1) {
277 if((data[byteId + i*periods] >> bitId) & 1) {
278 if((i - seriesOne) == 1 && firstSOne) m_mdchit_sone[layerId][wireId] += 1;
279 if(m_mdchit_sone[layerId][wireId] != 0 && (i - seriesOne) != 1) firstSOne = false;
280 seriesOne = i;
281 m_mdchit_one[layerId][wireId] += 1;
282 }
283 }
284 if(data_type == 4) {
285 if((data[byteId + i*periods] >> bitId) & 1) {
286 m_mdcTrigCondi[wireId] = 1;
287 }
288 }
289 } // end of ITKF
290
291 if((iter->first) == 235 || (iter->first) == 236) { // LTKC or STKC information
292 if(data_type == 2) {
293 if((data[byteId + i*periods] >> bitId) & 1) {
294 if((i - seriesOne) == 1 && firstSOne) m_mdcltrkc_sone[wireId] += 1;
295 if(m_mdcltrkc_sone[wireId] != 0 && (i - seriesOne) != 1) firstSOne = false;
296 seriesOne = i;
297 m_mdcltrkc_one[wireId] += 1;
298 if(wireId >= 128) m_mdcTrigCondi[wireId - 126] = 1;
299 }
300 }
301 if(data_type == 3) {
302 if((data[byteId + i*periods] >> bitId) & 1) {
303 if((i - seriesOne) == 1 && firstSOne) m_mdcstrkc_sone[wireId] += 1;
304 if(m_mdcstrkc_sone[wireId] != 0 && (i - seriesOne) != 1) firstSOne = false;
305 seriesOne = i;
306 m_mdcstrkc_one[wireId] += 1;
307 if(wireId >= 128) m_mdcTrigCondi[wireId - 122] = 1;
308 }
309 }
310 } //end of LTKC or STKC
311
312 } // loop in windows
313
314 }
315 }
316}

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