40{
43
44 NClus1 = false;
45 NClus2 = false;
46 NBClus1 = false;
47 NEClus1 = false;
48
49 BClus_Phi = false;
50 EClus_Phi = false;
51 EClusBB = false;
52 BClusBB = false;
53 Clus_Z = false;
54 BL_BBLK = false;
55
56 Etot_L = false;
57 Etot_M = false;
58 BEtot_H = false;
59 EEtot_H = false;
60
61 BL_Z = false;
62 Diff_E = false;
63 Diff_B = false;
64
65 BL_EBLK = false;
66
67 ISvcLocator* svcLocator = Gaudi::svcLocator();
68 StatusCode sc = svcLocator->service("BesGlobalTrigSvc", m_tmpSvc);
70
71
72 int nbcluster = 0, necluster = 0;
75 if((nbcluster + necluster)>=1) NClus1 = true;
76 if((nbcluster + necluster)>=2) NClus2 = true;
77 if(nbcluster >= 1) NBClus1 = true;
78 if(necluster >= 1) NEClus1 = true;
79
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100 if((m_EmcESum->
getTotE() > L1ETOT_M) ) Etot_M =
true;
101
102 if((m_EmcESum->
getTotE() > L1ETOT_L) ) Etot_L =
true;
103
105 Diff_B = true;
106
108 Diff_E = true;
109
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126 if((m_EmcESum->
getBTotE()>L1ETOT_BR)) BEtot_H =
true;
127
128 if((m_EmcESum->
getETotE()>L1ETOT_EC)) EEtot_H =
true;
129
130
131
132
133
136 BL_EBLK = true;
137
138
139 double energy0 = m_EmcESum->
getBBLKE(0);
140 double energy1 = m_EmcESum->
getBBLKE(1);
141 double energy2 = m_EmcESum->
getBBLKE(2);
142 double energy3 = m_EmcESum->
getBBLKE(3);
143 double energy4 = m_EmcESum->
getBBLKE(4);
144 double energy5 = m_EmcESum->
getBBLKE(5);
145 double energy9 = m_EmcESum->
getBBLKE(9);
146 double energy10 = m_EmcESum->
getBBLKE(10);
147 double energy6 = m_EmcESum->
getBBLKE(6);
148 double energy11 = m_EmcESum->
getBBLKE(11);
149 double energy7 = m_EmcESum->
getBBLKE(7);
150 double energy8 = m_EmcESum->
getBBLKE(8);
152 if((energy0+energy1)>L1BLK_GATE && (energy9+energy10)>L1BLK_GATE)
153 BL_BBLK = true;
154 if((energy1+energy2)>L1BLK_GATE && (energy10+energy11)>L1BLK_GATE)
155 BL_BBLK = true;
156 if((energy2+energy3)>L1BLK_GATE && (energy11+energy6)>L1BLK_GATE)
157 BL_BBLK = true;
158 if((energy3+energy4)>L1BLK_GATE && (energy6+energy7)>L1BLK_GATE)
159 BL_BBLK = true;
160 if((energy4+energy5)>L1BLK_GATE && (energy7+energy8)>L1BLK_GATE)
161 BL_BBLK = true;
162 if((energy5+energy0)>L1BLK_GATE && (energy8+energy9)>L1BLK_GATE)
163 BL_BBLK = true;
164
165
166
167
168
169
170
171 for(int j =0;j<TrigConf::TCPHINO_B;j++)
172 {
174 if(bphi==0) continue;
175 if(bphi==1)
176 {
177 int NCluster = 0;
178 for(int k =0;k<15;k++)
179 {
180 if((8+k+j)<TrigConf::TCPHINO_B)
182 else
184 if(NCluster>=1)
185 {
186 BClus_Phi = true;
187 break;
188 }
189 }
190 if(BClus_Phi == true)
191 break;
192 }
193 }
194
195
196 for(int j = 0;j<TrigConf::TCPHINO_E/2;j++)
197 {
199 if(wephi == 0) continue;
200 if(wephi == 1)
201 {
202 int NCluster = 0;
203 for(int k=0;k<7;k++)
204 {
205 if((j+5+k)<TrigConf::TCPHINO_E/2)
207 else
209 if(NCluster>=1)
210 {
211 EClus_Phi = true;
212 break;
213 }
214 }
215 if(EClus_Phi == true)
216 break;
217 }
218 }
219
220
221 for(int i=0;i<TrigConf::TCTHETANO_B;i++)
222 for(int j=0;j<TrigConf::TCPHINO_B;j++)
223 {
225 int NCluster = 0;
226 if(BClusId==0) continue;
227 else
228 {
229 if(i>0&&i<(TrigConf::TCTHETANO_B-1))
230 {
231 for(int k=0;k<5;k++)
232 {
233 if(j+13+k<TrigConf::TCPHINO_B)
234 {
235 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-1)-i,j+13+k);
236 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-1)-i+1,j+13+k);
237 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-1)-i-1,j+13+k);
238 }
239 else
240 {
241 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-1)-i,j+13+k-TrigConf::TCPHINO_B);
242 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-1)-i+1,j+13+k-TrigConf::TCPHINO_B);
243 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-1)-i-1,j+13+k-TrigConf::TCPHINO_B);
244 }
245 }
246 if(NCluster>0) { BClusBB = true; break; }
247 }
248 if(i==0)
249 {
250 for(int k=0;k<5;k++)
251 {
252 if(j+13+k<TrigConf::TCPHINO_B)
253 {
254 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-1),j+13+k);
255 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-2),j+13+k);
256 }
257 else
258 {
259 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-2),j+13+k-TrigConf::TCPHINO_B);
260 NCluster+= m_EmcCCount->
getBClusterId((TrigConf::TCTHETANO_B-1),j+13+k-TrigConf::TCPHINO_B);
261 }
262 }
263 if(NCluster>0) { BClusBB = true; break; }
264 }
265 if(i==(TrigConf::TCTHETANO_B-1))
266 {
267 for(int k=0;k<5;k++)
268 {
269 if(j+13+k<TrigConf::TCPHINO_B)
270 {
273 }
274 else
275 {
276 NCluster+= m_EmcCCount->
getBClusterId(0,j+13+k-TrigConf::TCPHINO_B);
277 NCluster+= m_EmcCCount->
getBClusterId(1,j+13+k-TrigConf::TCPHINO_B);
278 }
279 }
280 if(NCluster>0) { BClusBB = true; break; }
281 }
282 }
283 }
284
285 for(int j = 0;j<TrigConf::TCPHINO_E/2;j++)
286 {
287 int NCluster = 0;
289
290 if(EClusId == 0) continue;
291 else
292 {
293
294 for(int k=0;k<3;k++)
295 {
296 if((j+7+k)<TrigConf::TCPHINO_E/2)
298 else
300 if(NCluster>=1)
301 {
302 EClusBB = true;
303 break;
304 }
305 }
306 if(EClusBB == true)
307 break;
308 }
309 }
310
311 double L1EBL_Z = double (m_pIBGT->
getL1EBL_Z());
312
313
314
315
316
317
318
320 BL_Z = true;
321
322
323
325 Clus_Z = true;
326
327
328
333
348}
void setEClus_PHI(bool i)
void setBClus_PHI(bool i)
int getBClusterId(int i, int j)
int getBClusterPhi(int i)
int getEEClusterPhi(int i)
int getWEClusterPhi(int i)