Belle II Software  release-05-01-25
cosmicRun.py
1 from basf2 import *
2 from ROOT import Belle2
3 
4 import sys
5 
6 if len(sys.argv) != 3:
7  sys.exit("Expected two arguments (input filename + output filename). Exit.")
8 filenameIn = sys.argv[1]
9 filenameOut = sys.argv[2]
10 
11 set_log_level(LogLevel.WARNING)
12 
13 main = create_path()
14 
15 main.add_module('RootInput', inputFileName=filenameIn)
16 main.add_module('Gearbox')
17 main.add_module('Geometry')
18 
19 # add CDC trigger (only TSF)
20 main.add_module('CDCTriggerTSF',
21  InnerTSLUTFile=Belle2.FileSystem.findFile("data/trg/cdc/innerLUT_v2.2.coe"),
22  OuterTSLUTFile=Belle2.FileSystem.findFile("data/trg/cdc/outerLUT_v2.2.coe"))
23 
24 # add ECL trigger
25 main.add_module('TRGECLFAM',
26  TCWaveform=0,
27  FAMFitMethod=1,
28  TCThreshold=100,
29  BeamBkgTag=0,
30  ShapingFunction=1)
31 main.add_module('TRGECL',
32  Clustering=0,
33  EventTiming=1,
34  Bhabha=0,
35  EventSelect=0,
36  TimeWindow=375)
37 
38 # add decision module and skip events that are not triggered
39 not_triggered = create_path()
40 
41 trigger = main.add_module('TRGGDLCosmicRun', BackToBack=True)
42 trigger.if_false(not_triggered)
43 
44 main.add_module('RootOutput', outputFileName=filenameOut)
Belle2::FileSystem::findFile
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:147