12 """Example showing the use of the RetentionCheck module
14 To run the example, simply do
16 basf2 exampleOfRetentionCheck.py -n 100
20 import modularAnalysis
as ma
21 from skimExpertFunctions
import get_test_file
22 from skimRetentionCheck
import RetentionCheck, pathWithRetentionCheck
23 from skim.fei
import runFEIforB0SL
26 path = b2.create_path()
29 ma.inputMdstList(
'default', get_test_file(
"MC12_mixedBGx1"), path=path)
34 ma.applyCuts(
'B0:semileptonic',
'sigProb>0.0001', path=path)
35 ma.applyCuts(
'B0:semileptonic',
'-4.0<cosThetaBY<3.0', path=path)
36 ma.applyCuts(
'B0:semileptonic',
'dmID<8', path=path)
37 ma.applyCuts(
'B0:semileptonic',
'[[dmID<4 and d1_p_CMSframe>1.0] or [dmID>=4 and d2_p_CMSframe>1.0]]', path=path)
40 path = pathWithRetentionCheck([
'B0:semileptonic'], path)
46 RetentionCheck.print_results()
47 RetentionCheck.plot_retention(
'B0:semileptonic', save_as=
'retention_rate.pdf')