The Gaudi Framework  master (ff829712)
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()

GaudiPartProp.PartPropSvc.test ( )

simple test-function

Simple function for the test

Definition at line 56 of file PartPropSvc.py.

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

◆ test2()

GaudiPartProp.PartPropSvc.test2 ( )

Definition at line 110 of file PartPropSvc.py.

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

Variable Documentation

◆ __author__

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

Definition at line 23 of file PartPropSvc.py.

◆ gaudi

GaudiPartProp.PartPropSvc.gaudi = AppMgr()

Definition at line 51 of file PartPropSvc.py.