Belle II Software development
cosmicRun.py
1
8
9import basf2 as b2
10from ROOT import Belle2
11
12import sys
13
14if len(sys.argv) != 3:
15 sys.exit("Expected two arguments (input filename + output filename). Exit.")
16filenameIn = sys.argv[1]
17filenameOut = sys.argv[2]
18
19b2.set_log_level(b2.LogLevel.WARNING)
20
21main = b2.create_path()
22
23main.add_module('RootInput', inputFileName=filenameIn)
24main.add_module('Gearbox')
25main.add_module('Geometry')
26
27# add CDC trigger (only TSF)
28main.add_module('CDCTriggerTSF',
29 InnerTSLUTFile=Belle2.FileSystem.findFile("data/trg/cdc/innerLUT_v2.2.coe"),
30 OuterTSLUTFile=Belle2.FileSystem.findFile("data/trg/cdc/outerLUT_v2.2.coe"))
31
32# add ECL trigger
33main.add_module('TRGECLFAM',
34 TCWaveform=0,
35 FAMFitMethod=1,
36 TCThreshold=100,
37 BeamBkgTag=0,
38 ShapingFunction=1)
39main.add_module('TRGECL',
40 Clustering=0,
41 EventTiming=1,
42 Bhabha=0,
43 EventSelect=0,
44 TimeWindow=375)
45
46# add decision module and skip events that are not triggered
47not_triggered = b2.create_path()
48
49trigger = main.add_module('TRGGDLCosmicRun', BackToBack=True)
50trigger.if_false(not_triggered)
51
52main.add_module('RootOutput', outputFileName=filenameOut)
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
Definition: FileSystem.cc:151