Belle II Software  release-08-01-10
cosmicRun.py
1 
8 
9 import basf2 as b2
10 from ROOT import Belle2
11 
12 import sys
13 
14 if len(sys.argv) != 3:
15  sys.exit("Expected two arguments (input filename + output filename). Exit.")
16 filenameIn = sys.argv[1]
17 filenameOut = sys.argv[2]
18 
19 b2.set_log_level(b2.LogLevel.WARNING)
20 
21 main = b2.create_path()
22 
23 main.add_module('RootInput', inputFileName=filenameIn)
24 main.add_module('Gearbox')
25 main.add_module('Geometry')
26 
27 # add CDC trigger (only TSF)
28 main.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
33 main.add_module('TRGECLFAM',
34  TCWaveform=0,
35  FAMFitMethod=1,
36  TCThreshold=100,
37  BeamBkgTag=0,
38  ShapingFunction=1)
39 main.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
47 not_triggered = b2.create_path()
48 
49 trigger = main.add_module('TRGGDLCosmicRun', BackToBack=True)
50 trigger.if_false(not_triggered)
51 
52 main.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:148