Belle II Software light-2406-ragdoll
B_generic_train.py
1#!/usr/bin/env python3
2
3
10
11import fei
12import basf2 as b2
13import modularAnalysis as ma
14
15# create path
16path = b2.create_path()
17
18# Load input ROOT file
19ma.inputMdst(filename=b2.find_file('mdst14.root', 'validation', False),
20 path=path)
21
22# Get FEI default channels.
23# Utilise the arguments to toggle on and off certain channels
24particles = fei.get_default_channels()
25
26# Set up FEI configuration specifying the FEI prefix
27configuration = fei.config.FeiConfiguration(prefix='FEI_TEST', training=True, cache=-1)
28
29# Get FEI path
30feistate = fei.get_path(particles, configuration)
31
32# Add FEI path to the path to be processed
33path.add_path(feistate.path)
34
35# Add RootOutput to save particles reconstructing during the training stage
36path.add_module('RootOutput')
37
38# Process 100 events
39b2.process(path, max_event=100)