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