BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
cut.cxx
Go to the documentation of this file.
1#include "tofcalgsec/TofDataSet.h"
2#include <cmath>
4 if( m_run>0 ) {
5 if( m_texp<2.7 || m_texp>4.9 ) return false;
6 if( fabs(m_zrhit)>115.0 ) return false;
7
8 // 090308-090413 psip
9 if( m_run>=8107 && m_run<9671 ) {
10 if( ( m_tofid != 141 ) && ( m_qleft<200.|| m_qleft>20000. ) ) return false;
11 if( m_qright<200.|| m_qright>20000. ) return false;
12 if( ( m_tofid != 141 ) && ( m_tleft<17.5 || m_tleft>39.0 ) ) return false;
13 if( m_tright<17.5 || m_tright>39.0 ) return false;
14 if( ( m_tofid != 141 ) && ( fabs(m_tleft-27.4+0.07*m_zrhit ) > 4.0 ) ) return false;
15 if( fabs(m_tright-27.6-0.07*m_zrhit) > 4.0 ) return false;
16 }
17
18 // 090528-090603 continue
19 else if( m_run>=9671 && m_run<9947 ) {
20 if( ( m_tofid != 141 ) && ( m_qleft<200.|| m_qleft>20000. ) ) return false;
21 if( m_qright<200.|| m_qright>20000. ) return false;
22 if( ( m_tofid != 141 ) && ( m_tleft<13.5 || m_tleft>35.0 ) ) return false;
23 if( m_tright<13.5 || m_tright>35.0 ) return false;
24 if( ( m_tofid != 141 ) && ( fabs(m_tleft-23.7+0.07*m_zrhit ) > 4.0 ) ) return false;
25 if( fabs(m_tright-23.7-0.07*m_zrhit) > 4.0 ) return false;
26 }
27
28 // 090612-090727 jpsi
29 else if( m_run>=9947 && m_run<=10878 ) {
30 if( ( m_tofid != 141 ) && ( m_qleft<200.|| m_qleft>20000. ) ) return false;
31 if( m_qright<200.|| m_qright>20000. ) return false;
32 if( ( m_tofid != 141 ) && ( m_tleft<14.0 || m_tleft>35.0 ) ) return false;
33 if( m_tright<14.0 || m_tright>35.0 ) return false;
34 if( ( m_tofid != 141 ) && ( fabs(m_tleft-23.6+0.07*m_zrhit ) > 4.0 ) ) return false;
35 if( fabs(m_tright-23.6-0.07*m_zrhit) > 4.0 ) return false;
36 }
37
38 // 100116-100713 psipp
39 else if( m_run>=11397 && m_run<12002 ) {
40 if( m_qleft<200.|| m_qleft>20000. ) return false;
41 if( m_qright<200.|| m_qright>20000. ) return false;
42 if( m_tleft<13.5 || m_tleft>34.5 ) return false;
43 if( m_tright<13.5 || m_tright>34.5 ) return false;
44 if( fabs(m_tleft-23.5+0.07*m_zrhit ) > 4.0 ) return false;
45 if( fabs(m_tright-23.5-0.07*m_zrhit) > 4.0 ) return false;
46 }
47
48 // 110504-1106 psi(4040)
49 else if( m_run>=23463 && m_run<=24896 ) {
50 if( m_qleft<200.|| m_qleft>20000. ) return false;
51 if( m_qright<200.|| m_qright>20000. ) return false;
52 if( m_tleft<14.0 || m_tleft>35.0 ) return false;
53 if( m_tright<14.0 || m_tright>35.0 ) return false;
54 if( fabs(m_tleft-23.75+0.07*m_zrhit ) > 4.0 ) return false;
55 if( fabs(m_tright-23.75-0.07*m_zrhit) > 4.0 ) return false;
56 }
57
58 // 111221-120331 psip
59 else if( m_run>=24897 && m_run<=27101 ) {
60 if( m_qleft<200.|| m_qleft>20000. ) return false;
61 if((m_tofid != 137 ) && ( m_qright<200.|| m_qright>20000.) ) return false;
62 if( m_tleft<14.5 || m_tleft>35.5 ) return false;
63 if((m_tofid != 137 ) && ( m_tright<14.5 || m_tright>35.5 )) return false;
64 if( fabs(m_tleft-24.35+0.07*m_zrhit ) > 4.0 ) return false;
65 if(( m_tofid != 137 ) && (fabs(m_tright-24.35-0.07*m_zrhit) > 4.0 )) return false;
66 }
67
68 // 120407-120617 jpsi
69 else if( m_run>=27102 && m_run<=29675 ) {
70 if( m_qleft<200.|| m_qleft>20000. ) return false;
71 if((m_tofid != 137 ) && ( m_qright<200.|| m_qright>20000.) ) return false;
72 if( m_tleft<14.5 || m_tleft>35.5 ) return false;
73 if((m_tofid != 137 ) && ( m_tright<14.5 || m_tright>35.5 )) return false;
74 if( fabs(m_tleft-25.40+0.07*m_zrhit ) > 4.0 ) return false;
75 if(( m_tofid != 137 ) && (fabs(m_tright-25.40-0.07*m_zrhit) > 4.0 )) return false;
76 }
77
78 // 121215 - 130606 Y4260/4360
79 else if( m_run>=29676 && m_run<33996 ) {
80 if( m_qleft<200.|| m_qleft>20000. ) return false;
81 if((m_tofid != 137 ) && ( m_qright<200.|| m_qright>20000.) ) return false;
82 if( m_tleft<11 || m_tleft>32.5 ) return false;
83 if((m_tofid != 137 ) && ( m_tright<11 || m_tright>32.5 )) return false;
84 if( fabs(m_tleft-21.00+0.07*m_zrhit ) > 4.0 ) return false;
85 if(( m_tofid != 137 ) && (fabs(m_tright-21.01-0.07*m_zrhit) > 4.0 )) return false;
86 }
87
88 // 131209 - 130529 R value scan
89 else if( m_run>=33997 && m_run<39355 ) {
90 if( m_qleft<200.|| m_qleft>20000. ) return false;
91 if((m_tofid != 8 && m_tofid != 137 ) && ( m_qright<200.|| m_qright>20000.) ) return false;
92 if( m_tleft<11 || m_tleft>32.5 ) return false;
93 if((m_tofid !=8 && m_tofid != 137 ) && ( m_tright<11 || m_tright>32.5 )) return false;
94 if( fabs(m_tleft-21.00+0.07*m_zrhit ) > 4.0 ) return false;
95 if((m_tofid !=8 && m_tofid != 137 ) && (fabs(m_tright-21.00-0.07*m_zrhit) > 4.0 )) return false;
96 }
97
98 // 141231 - 150202 R value scan
99 else if( m_run>=39355 && m_run<40208 ) {
100 if( m_qleft<200.|| m_qleft>20000. ) return false;
101 if( m_qright<200.|| m_qright>20000.) return false;
102 if( m_tleft<11 || m_tleft>32.5 ) return false;
103 if( m_tright<11 || m_tright>32.5 ) return false;
104 if( fabs(m_tleft-21.00+0.07*m_zrhit ) > 3.0 ) return false;
105 if( fabs(m_tright-21.00-0.07*m_zrhit) > 3.0 ) return false;
106 }
107
108 // 150202 - R value scan
109 else if( m_run>=40208 && m_run<43646 ) {
110 if( m_qleft<200.|| m_qleft>20000. ) return false;
111 if( m_qright<200.|| m_qright>20000.) return false;
112 if( m_tleft<11.5 || m_tleft>33.0 ) return false;
113 if( m_tright<11.5 || m_tright>33.0 ) return false;
114 if( fabs(m_tleft-21.50+0.07*m_zrhit ) > 3.0 ) return false;
115 if( fabs(m_tright-21.50-0.07*m_zrhit) > 3.0 ) return false;
116 }
117
118 // 160106 - 4170
119 else if( m_run>=43646 && m_run<47432 ) {
120 if( m_qleft<200.|| m_qleft>20000. ) return false;
121 if( m_qright<200.|| m_qright>20000.) return false;
122 if( m_tleft<9.0 || m_tleft>30.0 ) return false;
123 if( m_tright<9.0 || m_tright>30.0 ) return false;
124 if( fabs(m_tleft-18.90+0.07*m_zrhit ) > 3.5 ) return false;
125 if( fabs(m_tright-18.90-0.07*m_zrhit) > 3.5 ) return false;
126 }
127
128 // 161211 - XYZ
129 else if( m_run>=47432 && m_run<52940 ) {
130 if( m_qleft<200.|| m_qleft>20000. ) return false;
131 if( m_qright<200.|| m_qright>20000.) return false;
132 if( m_tleft<8.5 || m_tleft>29.5 ) return false;
133 if( m_tright<8.5 || m_tright>29.5 ) return false;
134 if( fabs(m_tleft-18.50+0.07*m_zrhit ) > 3.5 ) return false;
135 if( fabs(m_tright-18.50-0.07*m_zrhit) > 3.5 ) return false;
136 }
137 // 171208 - Jpsi
138 else if( m_run>=52940 && m_run<53500 ) {
139 if( m_qleft<200.|| m_qleft>20000. ) return false;
140 if( m_qright<200.|| m_qright>20000.) return false;
141 if( m_tleft<8.5 || m_tleft>29.5 ) return false;
142 if( m_tright<8.5 || m_tright>29.5 ) return false;
143 if( fabs(m_tleft-18.50+0.07*m_zrhit ) > 3.5 ) return false;
144 if( fabs(m_tright-18.50-0.07*m_zrhit) > 3.5 ) return false;
145 }
146 // 180202 - Jpsi
147 else if( m_run>=53500 && m_run<53586 ) {
148 if( m_qleft<200.|| m_qleft>20000. ) return false;
149 if( m_qright<200.|| m_qright>20000.) return false;
150 if( ( m_tofid>=9 && m_tofid<=12 ) || ( m_tofid>=97 && m_tofid<=100 ) ) {
151 if( m_tleft<-12.0 || m_tleft>9.0 ) return false;
152 if( m_tright<-12.0 || m_tright>9.0 ) return false;
153 if( fabs(m_tleft+2.7+0.07*m_zrhit ) > 3.5 ) return false;
154 if( fabs(m_tright+2.7-0.07*m_zrhit) > 3.5 ) return false;
155 }
156 else {
157 if( m_tleft<9.5 || m_tleft>31.0 ) return false;
158 if( m_tright<9.5 || m_tright>31.0 ) return false;
159 if( fabs(m_tleft-18.50+0.07*m_zrhit ) > 3.5 ) return false;
160 if( fabs(m_tright-18.50-0.07*m_zrhit) > 3.5 ) return false;
161 }
162 }
163 // 180207 - 180405 Jpsi
164 else if( m_run>=53586 && m_run<54780 ) {
165 if( m_qleft<200.|| m_qleft>20000. ) return false;
166 if( m_qright<200.|| m_qright>20000.) return false;
167 if( m_tleft<8.5 || m_tleft>31.0 ) return false;
168 if( m_tright<8.5 || m_tright>31.0 ) return false;
169 if( (m_tleft+0.07*m_zrhit)<15.0 || (m_tleft+0.07*m_zrhit)>24.0 ) return false;
170 if( (m_tright-0.07*m_zrhit)<15.0 || (m_tright-0.07*m_zrhit)>24.0 ) return false;
171 }
172 // 180405 Jpsi MDC t0 changed
173 else if( m_run>=54780 && m_run<55115 ) {
174 if( m_qleft<200.|| m_qleft>20000. ) return false;
175 if( m_qright<200.|| m_qright>20000.) return false;
176 if( m_tleft<9.4 || m_tleft>32.0 ) return false;
177 if( m_tright<9.4 || m_tright>32.0 ) return false;
178 if( (m_tleft+0.07*m_zrhit)<16.0 || (m_tleft+0.07*m_zrhit)>25.0 ) return false;
179 if( (m_tright-0.07*m_zrhit)<16.0 || (m_tright-0.07*m_zrhit)>25.0 ) return false;
180 }
181 // 180420 - Tau and psip scan
182 else if( m_run>=55115 && m_run<55861 ) {
183 if( m_qleft<200.|| m_qleft>20000. ) return false;
184 if( m_qright<200.|| m_qright>20000. ) return false;
185 if( m_tleft<9.0 || m_tleft>30.5 ) return false;
186 if( m_tright<9.0 || m_tright>30.5 ) return false;
187 if( fabs(m_tleft+0.07*m_zrhit-19.0 ) > 3.5 ) return false;
188 if( fabs(m_tright-0.07*m_zrhit-19.0) > 3.5 ) return false;
189 }
190 // 180526 - Jpsi
191 else if( m_run>=55861 && m_run<80000 ) {
192 if( m_qleft<200.|| m_qleft>20000. ) return false;
193 if( m_qright<200.|| m_qright>20000. ) return false;
194 if( m_tleft<10.0 || m_tleft>31.0 ) return false;
195 if( m_tright<10.0 || m_tright>31.0 ) return false;
196 if( fabs(m_tleft+0.07*m_zrhit-20.0 ) > 3.5 ) return false;
197 if( fabs(m_tright-0.07*m_zrhit-20.0) > 3.5 ) return false;
198 }
199
200 }
201 else {
202 if( m_texp<2.7 || m_texp>4.9 ) return false;
203 if( m_tleft<15. || m_tleft>33.5 ) return false;
204 if( m_tright<15. || m_tright>33.5 ) return false;
205 if( m_qleft<200. || m_qleft>20000. ) return false;
206 if( m_qright<200.|| m_qright>20000.) return false;
207 if( fabs(m_zrhit)>115.0 ) return false;
208 }
209
210 return true;
211}
212
213
215 if( m_run>0 ) {
216 if( m_texp<4.6 || m_texp>5.4 ) return false;
217 if( m_qleft<50.|| m_qleft>20000.) return false;
218 // if( m_path<130. || m_path>170.) return false;
219 if( m_zrhit<50. || m_zrhit>83.) return false;
220
221 // 090308-090413 psip
222 if( m_run>=8107 && m_run<9671 ) {
223 if( m_tleft<24.0 || m_tleft>32.0 ) return false;
224 if( fabs(m_tleft-21.4-0.1*m_zrhit)>4.0 ) return false;
225 }
226
227 // 090528-090603 continue
228 else if( m_run>=9671 && m_run<9947 ) {
229 if( m_tleft<20.0 || m_tleft>28.0 ) return false;
230 if( fabs(m_tleft-17.3-0.1*m_zrhit)>4.0 ) return false;
231 }
232
233 // 090612-090727 jpsi
234 else if( m_run>=9947 && m_run<=10878 ) {
235 if( m_tleft<20.5 || m_tleft>28.5 ) return false;
236 if( fabs(m_tleft-17.6-0.1*m_zrhit)>4.0 ) return false;
237 }
238
239 // 100116-10713 psipp
240 else if( m_run>=11397 && m_run<12002 ) {
241 if( m_tleft<20.5 || m_tleft>28.5 ) return false;
242 if( fabs(m_tleft-17.8-0.1*m_zrhit)>4.0 ) return false;
243 }
244
245 // 110504-11060 psi(4040)
246 else if( m_run>=23463 && m_run<=24896 ) {
247 if( m_tleft<20.5 || m_tleft>28.5 ) return false;
248 if( fabs(m_tleft-18.0-0.1*m_zrhit)>4.0 ) return false;
249 }
250
251 // 111221-120331 psip
252 else if( m_run>=24897 && m_run<=27101 ) {
253 if( m_tleft<21.0 || m_tleft>30.0 ) return false;
254 if( fabs(m_tleft-18.60-0.1*m_zrhit)>4.0 ) return false;
255 }
256
257 // 120407-120617 jpsi
258 else if( m_run>=27102 && m_run<=29675 ) {
259 if( m_tleft<22.0 || m_tleft>30.0 ) return false;
260 if( fabs(m_tleft-20.17-0.1*m_zrhit)>4.0 ) return false;
261 }
262
263 // 121215 - 130606 pisp4260
264 else if( m_run>=29676 && m_run<33996 ) {
265 if( m_tleft<18.0 || m_tleft>27.0 ) return false;
266 if( fabs(m_tleft-15.63-0.1*m_zrhit)>4.0 ) return false;
267 }
268
269 // 131209-130529 R value scan
270 else if( m_run>=33997 && m_run<39355 ) {
271 if( m_tleft<17.5 || m_tleft>26.5 ) return false;
272 if( fabs(m_tleft-15.44-0.1*m_zrhit)>4.0 ) return false;
273 }
274
275 // 141231-150203 R value scan
276 else if( m_run>=39355 && m_run<40208 ) {
277 if( m_tleft<18.0 || m_tleft>27.0 ) return false;
278 if( fabs(m_tleft-15.8-0.1*m_zrhit)>3.0 ) return false;
279 }
280
281 // 150202- R value scan
282 else if( m_run>=40208 && m_run<80000 ) {
283 if( m_tleft<18.5 || m_tleft>27.5 ) return false;
284 if( fabs(m_tleft-16.5-0.1*m_zrhit)>3.0 ) return false;
285 }
286
287 }
288 else {
289 if( m_tleft<16.|| m_tleft>22. ) return false;
290 if( m_texp<4.5 || m_texp>5.4 ) return false;
291 if( m_qleft<200.|| m_qleft>20000.) return false;
292 if( m_path<120. || m_path>180.) return false;
293 if( m_zrhit<50. || m_zrhit>83.) return false;
294 }
295 return true;
296}
297
298
300 if( m_run>0 ) {
301 if( m_texp<4.5 || m_texp>5.6 ) return false;
302 if( fabs(m_zrhit)>7.8 ) return false;
303 // dead channels
304 bool rightDead = ( ( m_tofid==3 && ( m_strip==1 || m_strip==3 || ( m_strip>=5 && m_strip<=11 ) ) ) || ( m_tofid==13 && m_strip==7 ) );
305 bool leftDead = ( m_tofid==34 && ( m_strip>=0 && m_strip<=5 ) );
306 bool leftSpecial = ( m_tofid==13 && m_strip==5 );
307
308 // 150202 - R value scan
309 if( m_run>=40208 && m_run<43646 ) {
310 if( m_qleft<5.|| m_qleft>60. ) return false;
311 if( m_qright<5.|| m_qright>60.) return false;
312 if( m_tleft<21.5 || m_tleft>27.5 ) return false;
313 if( m_tright<21.5 || m_tright>27.5 ) return false;
314 }
315 // 160106 - 160108 4170
316 else if( m_run>=43646 && m_run<43682 ) {
317 if( m_qleft<5.|| m_qleft>60. ) return false;
318 if( m_qright<5.|| m_qright>60.) return false;
319 if( m_tleft<9.5 || m_tleft>15.5 ) return false;
320 if( m_tright<9.5 || m_tright>15.5 ) return false;
321 }
322 // 160108 4170
323 else if( m_run>=43682 && m_run<43809 ) {
324 if( m_qleft<5.|| m_qleft>60. ) return false;
325 if( m_qright<5.|| m_qright>60.) return false;
326 if( m_tleft<-254.5 || m_tleft>-248.5 ) return false;
327 if( m_tright<-254.5 || m_tright>-248.5 ) return false;
328 }
329 // 160114 4170
330 else if( m_run>=43809 && m_run<43810 ) {
331 if( m_qleft<5.|| m_qleft>60. ) return false;
332 if( m_qright<5.|| m_qright>60.) return false;
333 if( m_tleft<-14.5 || m_tleft>-8.5 ) return false;
334 if( m_tright<-14.5 || m_tright>-8.5 ) return false;
335 }
336 // 160114 4170
337 else if( m_run>=43810 && m_run<43879 ) {
338 if( m_qleft<5.|| m_qleft>60. ) return false;
339 if( m_qright<5.|| m_qright>60.) return false;
340 if( m_tleft<33.5 || m_tleft>39.5 ) return false;
341 if( m_tright<33.5 || m_tright>39.5 ) return false;
342 }
343 // 160116 4170
344 else if( m_run>=43879 && m_run<47432 ) {
345 if( m_qleft<5.|| m_qleft>60. ) return false;
346 if( m_qright<5.|| m_qright>60.) return false;
347 if( m_tleft<9.5 || m_tleft>15.5 ) return false;
348 if( m_tright<9.5 || m_tright>15.5 ) return false;
349 }
350 // 161211 XYZ
351 else if( m_run>=47432 && m_run<52940 ) {
352 if( m_qleft<5.|| m_qleft>60. ) return false;
353 if( m_qright<5.|| m_qright>60.) return false;
354 if( m_tleft<9.5 || m_tleft>15.5 ) return false;
355 if( m_tright<9.5 || m_tright>15.5 ) return false;
356 }
357 // 171208 - 180405 Jpsi also add dead channel
358 else if( m_run>=52940 && m_run<54780 ) {
359 if( !leftDead && ( m_qleft<5.|| m_qleft>60. ) ) return false;
360 if( !rightDead && ( m_qright<5.|| m_qright>60.) ) return false;
361 if( !leftDead && ( m_tleft<9.5 || m_tleft>15.5 ) ) return false;
362 if( !rightDead && ( m_tright<9.5 || m_tright>15.5 ) ) return false;
363 }
364 // 180405 Jpsi MDC t0 changed
365 else if( m_run>=54780 && m_run<55115 ) {
366 if( !leftDead && ( m_qleft<5.|| m_qleft>60. ) ) return false;
367 if( !rightDead && ( m_qright<5.|| m_qright>60.) ) return false;
368 if( !leftDead && ( m_tleft<9.5 || m_tleft>15.5 ) ) return false;
369 if( !rightDead && ( m_tright<9.5 || m_tright>15.5 ) ) return false;
370 }
371 // 180420 - Tau and psip scan
372 else if( m_run>=55115 && m_run<55861 ) {
373 if( !leftDead && ( m_qleft<5.|| m_qleft>60. ) ) return false;
374 if( !rightDead && ( m_qright<5.|| m_qright>60.) ) return false;
375 if( !leftDead && ( m_tleft<10.0 || m_tleft>16.0 ) ) return false;
376 if( !rightDead && ( m_tright<10.0 || m_tright>16.0 ) ) return false;
377 }
378 // 180526 - Tau and psip scan
379 else if( m_run>=55861 && m_run<80000 ) {
380 if( !leftDead && ( m_qleft<5.|| m_qleft>60. ) ) return false;
381 if( !rightDead && ( m_qright<5.|| m_qright>60.) ) return false;
382 if( !leftDead && ( m_tleft<11.0 || m_tleft>17.0 ) ) return false;
383 if( !rightDead && ( m_tright<11.0 || m_tright>17.0 ) ) return false;
384 }
385
386 }
387 else {
388 if( m_texp<4.5 || m_texp>5.6 ) return false;
389 if( fabs(m_zrhit)>7.8 ) return false;
390 if( m_qleft<5.|| m_qleft>20. ) return false;
391 if( m_qright<5.|| m_qright>20.) return false;
392 if( m_tleft<4.5 || m_tleft>7.5 ) return false;
393 if( m_tright<4.5 || m_tright>7.5 ) return false;
394 }
395
396 return true;
397}
bool cutEtf()
Definition: cut.cxx:299
bool cutBarrel()
Definition: cut.cxx:3
bool cutEndcap()
Definition: cut.cxx:214