26 basf2.set_log_level(basf2.LogLevel.DEBUG)
27 basf2.set_debug_level(20)
33 main = basf2.create_path()
36 dstfiles = [sys.argv[1]]
38 if ".sroot" in dstfiles[0]:
43 print(
'Files to be processed:')
48 os.makedirs(sys.argv[0].split(
'.py')[0] +
'/data', exist_ok=
True)
49 os.makedirs(sys.argv[0].split(
'.py')[0] +
'/hist', exist_ok=
True)
52 outputfile = sys.argv[0].split(
'.py')[0] +
'/hist/histo.' + sys.argv[1].split(
'/')[-1].split(ending)[0] +
'.root'
53 dstputfile = sys.argv[0].split(
'.py')[0] +
'/data/dst.' + sys.argv[1].split(
'/')[-1].split(ending)[0] +
'.root'
56 if ending ==
".sroot":
57 main.add_module(
"SeqRootInput", inputFileNames=dstfiles)
59 main.add_module(
"RootInput", inputFileNames=dstfiles)
62 main.add_module(
'Gearbox')
63 main.add_module(
'Geometry')
66 main.add_module(
'Progress', maxN=3)
69 if ending ==
".sroot":
86 if ending ==
".sroot":
90 main.add_module(
'CDCTriggerRecoMatcher', TrgTrackCollectionName=neurotrigger.hwneurotracks,
91 hitCollectionName=neurotrigger.hwneuroinputsegmenthits, axialOnly=
True)
92 main.add_module(
'CDCTriggerRecoMatcher', TrgTrackCollectionName=neurotrigger.hwsimneurotracks,
93 hitCollectionName=neurotrigger.hwneuroinputsegmenthits, axialOnly=
True)
94 main.add_module(
'CDCTriggerRecoMatcher', TrgTrackCollectionName=neurotrigger.hwneuroinput2dfindertracks,
95 hitCollectionName=neurotrigger.hwneuroinputsegmenthits, axialOnly=
True)
99 main.add_module(
'SetupGenfitExtrapolation')
102 main.add_module(
'HistoManager',
103 histoFileName=outputfile)
104 main.add_module(
'CDCTriggerNeuroDQM',
105 simNeuroTracksName=neurotrigger.hwsimneurotracks,
106 unpackedNeuroInput2dTracksName=neurotrigger.hwneuroinput2dfindertracks,
111 skipWithoutHWTS=
True,
118 main.add_module(
'RootOutput', outputFileName=dstputfile)
122 print(basf2.statistics)
def add_neurotrigger_hw(path, nntweightfile=None, debug_level=4, debugout=False, **kwargs)
def add_neuro_2d_unpackers(path, debug_level=4, debugout=False, **kwargs)
def add_unpackers(path, components=None, writeKLMDigitRaws=False, addTOPRelations=False)
def add_reconstruction(path, components=None, pruneTracks=True, add_trigger_calculation=True, skipGeometryAdding=False, trackFitHypotheses=None, addClusterExpertModules=True, use_second_cdc_hits=False, add_muid_hits=False, reconstruct_cdst=None, event_abort=default_event_abort, use_random_numbers_for_hlt_prescale=True, pxd_filtering_offline=False, append_full_grid_cdc_eventt0=False, legacy_ecl_charged_pid=False, emulate_HLT=False)