16 from subprocess
import call
17 from reconstruction
import add_ecl_modules
20 print(
'This steering file is an example of how to use the ECLBackgroundModule.')
22 print(
'There are generally 8 different data sets for each background campaign:')
27 print(
' Touschek HER')
28 print(
' Touschek LER')
32 print(
'Each sample usually consists of 1000 files, each representing 1us of time, for a total sample time of 1000us or 1ms.')
33 print(
"In this example, we will use a subset of 100 files (representing 100us) from the 12th Campaign's RBB HER sample.")
34 print(
'Samples are generated by Hiro Nakayama-san. Information on them can be found here:')
35 print(
'https://confluence.desy.de/display/BI/Background+WebHome')
39 inputs =
'~nakayama/basf2_opt/release_201506_12th/Work_MCgen/output/output_RBB_HER_study_1??.root'
48 sampletime = timePerFile * int(subprocess.check_output(
'ls ' + inputs +
' | wc -l',
50 print(
'The sampletime is ' + str(sampletime) +
'us')
53 outfile =
'EclBackgroundExample.root'
55 print(
'The output will written to ' + outfile)
65 simpleinput = register_module(
'RootInput')
66 simpleinput.param(
'inputFileNames', inputs)
67 main.add_module(simpleinput)
69 gearbox = register_module(
'Gearbox')
70 main.add_module(gearbox)
74 geometry = register_module(
'Geometry')
75 geometry.logging.log_level = LogLevel.WARNING
76 main.add_module(geometry)
79 histo = register_module(
'HistoManager')
80 histo.param(
'histoFileName', outfile)
81 main.add_module(histo)
84 eclBg = register_module(
'ECLBackground')
85 eclBg.param(
'sampleTime', sampletime)
86 eclBg.param(
'doARICH', ARICH)
87 eclBg.param(
'crystalsOfInterest', [318, 625, 107])
90 eclDigi = register_module(
'ECLDigitizer')
91 main.add_module(eclDigi)
97 main.add_module(eclBg)