Belle II Software  release-05-01-25
B_converted_train.py
1 #!/usr/bin/env python3
2 
3 # Example which can be used to train the FEI
4 
5 # William Sutcliffe 2019
6 
7 # To properly read the Belle database the user name is set to g0db
8 import fei
9 import b2biiConversion
10 import modularAnalysis as ma
11 import basf2 as b2
12 import os
13 os.environ['PGUSER'] = 'g0db'
14 
15 
16 # Get FEI default channels for Belle conversion
17 # Utilise the arguments to toggle on and off certain channels
18 particles = fei.get_default_channels()
19 
20 # Set up FEI configuration specifying the FEI prefix
21 configuration = fei.config.FeiConfiguration(prefix='FEI_TEST', training=True)
22 
23 # Get FEI path
24 feistate = fei.get_path(particles, configuration)
25 
26 # Create Path
27 path = b2.create_path()
28 
29 # Apply conversion initially
30 if feistate.stage <= 0:
32  b2.find_file(
33  'analysis/mdstBelle1_exp65_charged.root',
34  'validation',
35  False),
36  applySkim=True,
37  enableNisKsFinder=False,
38  enableLocalDB=False,
39  path=path)
40 else:
41  ma.inputMdstList('Belle', [], path)
42 
43 # Add FEI path to the path to be processed
44 path.add_path(feistate.path)
45 
46 # Add RootOutput to save particles reconstructing during the training stage
47 path.add_module('RootOutput')
48 
49 print(path)
50 b2.process(path)
b2biiConversion.convertBelleMdstToBelleIIMdst
def convertBelleMdstToBelleIIMdst(inputBelleMDSTFile, applySkim=True, 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)
Definition: b2biiConversion.py:78