Belle II Software  release-08-01-10
03_ApplyWeight.py
1 #!/usr/bin/env python3
2 
3 
10 
11 
15 
16 import basf2 as b2
17 import modularAnalysis as ma
18 
19 localDB = 'localdb/database.txt'
20 b2.conditions.append_testing_payloads(localDB)
21 
22 # create path
23 my_path = b2.create_path()
24 
25 # load input ROOT file
26 ma.inputMdst(filename=b2.find_file('B2pi0D_D2hh_D2hhh_B2munu.root', 'examples', False),
27  path=my_path)
28 
29 ma.fillParticleList('pi+:all', cut='', path=my_path)
30 
31 matrixName = "PIDCalibrationWeight_Example"
32 ma.variablesToNtuple('pi+:all',
33  ['pionID', 'kaonID', 'weightedPionID('+matrixName+')', 'weightedKaonID('+matrixName+')'],
34  path=my_path)
35 
36 b2.process(my_path)