37 from decayHash
import DecayHashMap
41 data = uproot.open(b2.find_file(
'Jpsi_from_B2A502.root',
'examples',
False))[
"variables"].arrays(library=
"pd")
42 hashmap = DecayHashMap(b2.find_file(
'hashmap_Jpsi_from_B2A502.root',
'examples',
False), removeRadiativeGammaFlag=
False)
43 hashmap2 = DecayHashMap(b2.find_file(
'hashmap_Jpsi_from_B2A502.root',
'examples',
False), removeRadiativeGammaFlag=
True)
46 candidate42 = data.iloc[42][[
"extraInfo__boDecayHash__bc",
"extraInfo__boDecayHashExtended__bc"]].values
49 print(
"Reconstructed Decay: ")
50 rec = hashmap.get_reconstructed_decay(*candidate42)
51 print(rec.to_string())
54 print(
"Monte Carlo Decay: ")
55 org = hashmap.get_original_decay(*candidate42)
56 print(org.to_string())
59 print(
"Monte Carlo Decay with removed Bremsstrahlung gammas: ")
60 org2 = hashmap2.get_original_decay(*candidate42)
61 print(org2.to_string())
65 print(
"Search for decay:")
66 search_decay = ROOT.Belle2.DecayTree(
'511 (-> 130 (-> -11 11 22) 443)')
67 print(search_decay.to_string())
68 found = hashmap.get_original_decay(data.iloc[42][
"extraInfo__boDecayHash__bc"],
69 data.iloc[42][
"extraInfo__boDecayHashExtended__bc"]).find_decay(search_decay)
70 print(
"Found: ", found)