The Gaudi Framework  master (bdbe7744)
Loading...
Searching...
No Matches
GaudiPartProp.PartPropSvc Namespace Reference

Functions

 test ()
 simple test-function
 test2 ()

Variables

str __author__ = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
 gaudi = AppMgr()

Function Documentation

◆ test()

test ( )

simple test-function

Simple function for the test

Definition at line 53 of file PartPropSvc.py.

53def test():
54 """Simple function for the test"""
55 pps = gaudi.gaudiPartProp()
56
57 for l in range(1, 6):
58 # get
59 lst1 = pps.get(lambda x: l == x.pid().lSpin())
60 print(f" {l} == 2*lSpin+1 ")
61 print(lst1)
62
63 for s in range(0, 2):
64 # get
65 lst1 = pps.get(lambda x: s == x.pid().sSpin())
66 print(f" {s} == 2*sSpin+1 ")
67 print(lst1)
68
69 for j in range(0, 7):
70 # get
71 lst1 = pps.get(lambda x: j == x.pid().jSpin())
72 print(f" {j} == 2*jSpi+1 ")
73 print(lst1)
74
75 decays = [
76 "B0 -> K- pi+",
77 "B+ -> J/psi(1S) ( K*0 -> K+ pi- ) ",
78 "D_s+ -> pi+ pi+ pi- ",
79 "B_s0 -> ( J/psi(1S) -> mu+ mu- ) ( phi(1020) -> K+ K- ) ",
80 ]
81
82 for decay in decays:
83 print(f"Decay&CC: {decay} : {pps.cc(decay)} ")
84
85 Item = pps.Item
86 Items = pps.Items
87 Decay = pps.Decay
88 Decays = pps.Decays
89
90 items = Items()
91 items.push_back(Item("K+"))
92 items.push_back(Item("K-"))
93
94 decay = Decay(Item("B0"), items)
95
96 print(decay.validate(pps.svc()))
97
98 decays = Decays()
99 decays.push_back(decay)
100 decays.push_back(decay)
101 decays.push_back(decay)
102
103 print(decay)
104 print(decays)
105
106

◆ test2()

test2 ( )

Definition at line 107 of file PartPropSvc.py.

107def test2():
108 pps = gaudi.gaudiPartProp()
109
110 nodes = [
111 Lepton & ~Meson,
112 EllPlus | Nu,
113 Lepton & ~Nu,
114 EllMinus | CC("B0"),
115 Hadron & Tensor,
116 Hadron & ThreeHalf,
117 Hadron & FiveHalf,
118 EllPlus | (Bottom & Baryon),
119 ]
120
121 for node in nodes:
122 node.validate(pps.svc())
123
124 lst1 = pps.get(node)
125 print(f' selected by node: "{node}" ')
126 print(lst1)
127
128

Variable Documentation

◆ __author__

str GaudiPartProp.PartPropSvc.__author__ = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
private

Definition at line 20 of file PartPropSvc.py.

◆ gaudi

GaudiPartProp.PartPropSvc.gaudi = AppMgr()

Definition at line 48 of file PartPropSvc.py.