3 """Example showing the use of the RetentionCheck module
5 To run the example, simply do
7 basf2 exampleOfRetentionCheck.py -n 100
10 __authors__ =
"Cyrille Praz"
13 import modularAnalysis
as ma
14 from skimExpertFunctions
import get_test_file
15 from skimRetentionCheck
import RetentionCheck, pathWithRetentionCheck
16 from skim.fei import runFEIforB0SL, B0SL
19 path = b2.create_path()
22 ma.inputMdstList(
'default', get_test_file(
"MC12_mixedBGx1"), path=path)
27 ma.applyCuts(
'B0:semileptonic',
'sigProb>0.0001', path=path)
28 ma.applyCuts(
'B0:semileptonic',
'-4.0<cosThetaBY<3.0', path=path)
29 ma.applyCuts(
'B0:semileptonic',
'dmID<8', path=path)
30 ma.applyCuts(
'B0:semileptonic',
'[[dmID<4 and d1_p_CMSframe>1.0] or [dmID>=4 and d2_p_CMSframe>1.0]]', path=path)
33 path = pathWithRetentionCheck([
'B0:semileptonic'], path)
39 RetentionCheck.print_results()
40 RetentionCheck.plot_retention(
'B0:semileptonic', save_as=
'retention_rate.pdf')