31parser = argparse.ArgumentParser(
32 description=
"Create SimHits for a run with user specified ExpRun")
35 default=
'Calibration_Offline_Development',
37 help=
'Set name of GT')
42 help=
'Set experiment number')
43parser.add_argument(
'--runNo', default=3360, type=int, help=
'Set run number')
48 help=
'setnumber for bg simulation')
51 default=
'/group/belle2/BGFile/OfficialBKG/15thCampaign/phase2',
53 help=
'Path to mixer sets')
58 help=
'Scale factor for mixer')
59args = parser.parse_args()
61bg = glob.glob(args.bg +
'/set' + str(args.setNo) +
'/*.root')
65b2.use_central_database(args.tag)
67main = b2.create_path()
69 "EventInfoSetter", expList=[
70 args.expNo], runList=[
71 args.runNo], evtNumList=[1000])
72main.add_module(
"Gearbox", fileName=
'geometry/Beast2_phase2.xml')
73main.add_module(
"Geometry", useDB=
False)
74bkgmixer = b2.register_module(
'BeamBkgMixer')
75bkgmixer.param(
'backgroundFiles', bg)
76bkgmixer.param(
'overallScaleFactor', args.scaleFactor)
77main.add_module(bkgmixer)
78output = main.add_module(
'RootOutput')
81 f
'beam.{args.expNo:0>4}.{args.runNo:0>5}.HLT2.f{args.setNo:0>5}.root')
82output.param(
'branchNames', [
'PXDSimHits',
'EventMetaData'])
83main.add_module(
"Progress")