18 logging.log_level = LogLevel.WARNING
21 print(
'Use the script as: basf2 ARICHBkg.py arguments')
22 print(
'Arguments are in the following order: type (RBB,Touschek_HER,...), path to files , '
23 'job number , number of input files , background tag')
25 print(
'example: basf2 ARICHBkg.py RBB /gpfs/home/belle/nakayama/basf2_opt/release_201502_development/Work_MCgen/output/ 2 100 0')
26 print(
'will analyse files in output dir with index numbers from 200-299.')
27 print(
'Background tag is int appended to all hits (to identify contributions from different sources at later analysis')
28 print(
'use 0 for RBB, 1 for BHWide, 2 Touschek_HER, 3 Touschek_LER, 4 Coulomb_HER, 5 Coulomb_LER, 6 2-photon, 7 BHWideLargeAngle')
35 input = register_module(
'RootInput')
36 paramloader = register_module(
'Gearbox')
37 geobuilder = register_module(
'Geometry')
38 back = register_module(
'ARICHBackground')
47 nfiles = int(sys.argv[4])
48 tag = int(sys.argv[5])
54 patha = path + typee +
'_study-phase3-'
56 for i
in range(n * nfiles, (n + 1) * nfiles):
57 filenn = patha + str(i) +
'.root'
61 out =
'arich_' + typee +
'_' + sys.argv[3] +
'.root'
64 print(
'Output file: ' + out)
66 input.param(
'inputFileNames', fnames)
67 geobuilder.param(
'components', [
'ARICH'])
68 back.param(
'FileName', out)
69 back.param(
'BkgTag', tag)
74 main.add_module(input)
75 main.add_module(paramloader)
76 main.add_module(geobuilder)