220 {
221
224
225
226
236
237 int n_Ipix_hits = acc_n_Ipix_hits(*track);
238 int n_Ipix_expected = acc_n_Ipix_expected(*track);
239 int n_NIpix_hits = acc_n_NIpix_hits(*track);
240 int n_NIpix_expected = acc_n_NIpix_expected(*track);
241 int n_sct_hits = acc_n_sct_hits(*track);
242 int n_pix_hits = acc_n_pix_hits(*track);
243 int n_sct_holes = acc_n_sct_holes(*track);
244 int n_sct_dead = acc_n_sct_dead(*track);
245 int n_pix_dead = acc_n_pix_dead(*track);
246
247
250
252 float z0_wrtPV=
track->z0()+
track->vz()-z_vtx;
254
255
256
257
258 bool pass_min_bias=true;
259 {
260 if(fabs(
eta)>2.5) pass_min_bias=
false;
261 if(n_Ipix_expected>0){
262 if (n_Ipix_hits==0) pass_min_bias=false;
263 }
264 else{
265 if(n_NIpix_expected>0 && n_NIpix_hits==0) pass_min_bias=false;
266 }
267
268 int n_sct=n_sct_hits+n_sct_dead;
269 if (pt<=300) {if (n_sct <2) pass_min_bias=false;}
270 else if(pt<=400) {if (n_sct <4) pass_min_bias=false;}
271 else if(pt> 400) {if (n_sct <6) pass_min_bias=false;}
272
273 int n_pix=n_pix_hits+n_pix_dead;
274 if(n_pix<=0) pass_min_bias=false;
275
276 if(fabs(d0)>1.5) pass_min_bias=false;
277 if(fabs(z0_wrtPV*
sin(
theta))>1.5) pass_min_bias=
false;
278
279 if(pt>10000 && TMath::Prob(
chi2,ndof)<=0.01) pass_min_bias=
false;
280
281
282 }
283
284
285
286
287
288 bool pass_hi_loose=true;
289 {
290 if(fabs(
eta)>2.5) pass_hi_loose=
false;
291 if(n_Ipix_expected>0){
292 if (n_Ipix_hits==0) pass_hi_loose=false;
293 }
294 else{
295 if(n_NIpix_expected>0 && n_NIpix_hits==0) pass_hi_loose=false;
296 }
297
298 if(n_pix_hits==0) pass_hi_loose=false;
299 if(n_sct_hits< 6) pass_hi_loose=false;
300 if(pt>10000 && TMath::Prob(
chi2,ndof)<=0.01) pass_hi_loose=
false;
301 if(fabs(d0) >1.5) pass_hi_loose=false;
302 if(fabs(z0_wrtPV*
sin(
theta))>1.5) pass_hi_loose=
false;
303 }
304
305
306
307
308
309 bool pass_hi_loose_additional_SCT_hit=true;
310 if(!pass_hi_loose) pass_hi_loose_additional_SCT_hit=false;
311 else{
312 if(n_sct_hits<7) pass_hi_loose_additional_SCT_hit=false;
313 }
314
315
316
317
318
319 bool pass_hi_loose_tight_d0_z0=true;
320 if(!pass_hi_loose || fabs(d0)>1.0 || fabs(z0_wrtPV*
sin(
theta))>1.0) pass_hi_loose_tight_d0_z0=
false;
321
322
323
324
325
326 bool pass_hi_loose_tighter_d0_z0=true;
327 if(!pass_hi_loose || fabs(d0)>0.5 || fabs(z0_wrtPV*
sin(
theta))>0.5) pass_hi_loose_tighter_d0_z0=
false;
328
329
330
331
332
333 bool pass_hi_tight_loose_d0_z0=true;
334 if(!pass_hi_loose) pass_hi_tight_loose_d0_z0=false;
335 else{
336 if(n_pix_hits <2 ) pass_hi_tight_loose_d0_z0=false;
337 if(n_sct_hits <8 ) pass_hi_tight_loose_d0_z0=false;
338 if(n_sct_holes>1 ) pass_hi_tight_loose_d0_z0=false;
339 if(ndof==0) pass_hi_tight_loose_d0_z0=false;
340 else if(
chi2/ndof>6) pass_hi_tight_loose_d0_z0=
false;
341 }
342
343
344
345
346
347 bool pass_hi_tight=true;
348 if(!pass_hi_loose) pass_hi_tight=false;
349 else{
350 if(n_pix_hits <2 ) pass_hi_tight=false;
351 if(n_sct_hits <8 ) pass_hi_tight=false;
352 if(n_sct_holes>1 ) pass_hi_tight=false;
353 if(fabs(d0) >1.0) pass_hi_tight=false;
354 if(fabs(z0_wrtPV*
sin(
theta))>1.0) pass_hi_tight=
false;
355 if(ndof==0) pass_hi_tight=false;
356 else if(
chi2/ndof>6) pass_hi_tight=
false;
357 }
358
359
360
361
362
363 bool pass_hi_tight_tighter_d0_z0=true;
364 if(!pass_hi_tight) pass_hi_tight_tighter_d0_z0=false;
365 else{
366 if(fabs(d0)>0.5 || fabs(z0_wrtPV*
sin(
theta))>0.5) pass_hi_tight_tighter_d0_z0=
false;
367 }
368
369
370
371
372
373
374 unsigned short quality =0;
376 if(pass_hi_loose ) quality+=
HI_LOOSE;
381 if(pass_hi_tight ) quality+=
HI_TIGHT;
383 return quality;
384}
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
SG::ConstAccessor< T, ALLOC > ConstAccessor
double chi2(TH1 *h0, TH1 *h1)