Belle II Software light-2406-ragdoll
B_converted_train.py
1#!/usr/bin/env python3
2
3
10
11# Example which can be used to train the FEI
12
13import os
14
15import basf2 as b2
16import modularAnalysis as ma
17
18import b2biiConversion
19
20import fei
21
22# To properly read the Belle database the user name is set to g0db
23os.environ['PGUSER'] = 'g0db'
24# Get FEI default channels for Belle conversion
25# Utilise the arguments to toggle on and off certain channels
26particles = fei.get_default_channels()
27
28# Set up FEI configuration specifying the FEI prefix
29configuration = fei.config.FeiConfiguration(prefix='FEI_TEST', training=True)
30
31# Get FEI path
32feistate = fei.get_path(particles, configuration)
33
34# Create Path
35path = b2.create_path()
36
37# Apply conversion initially
38if feistate.stage <= 0:
40 b2.find_file(
41 'analysis/mdstBelle1_exp65_charged.root',
42 'validation',
43 False),
44 applySkim=True,
45 # Actually, the KS finder should be set to True.
46 # However, here it's set to False because the necessary library is only present on kekcc and not on the build server.
47 enableNisKsFinder=False,
48 # Set this argument to True (default value) so that the local database on KEKCC is used.
49 # It's only set to False here so that this example can be run in the GitLab pipeline.
50 enableLocalDB=False,
51 path=path)
52else:
53 ma.inputMdstList('Belle', [], path)
54
55# Add FEI path to the path to be processed
56path.add_path(feistate.path)
57
58# Add RootOutput to save particles reconstructing during the training stage
59path.add_module('RootOutput')
60
61print(path)
62b2.process(path)
def convertBelleMdstToBelleIIMdst(inputBelleMDSTFile, applySkim=True, saveResultExtraInfo=False, useBelleDBServer=None, convertBeamParameters=True, generatorLevelReconstruction=False, generatorLevelMCMatching=False, path=None, entrySequences=None, matchType2E9oE25Threshold=-1.1, enableNisKsFinder=True, HadronA=True, HadronB=True, enableRecTrg=False, enableEvtcls=True, SmearTrack=2, enableLocalDB=True, convertNbar=False)