The Gaudi Framework  master (37c0b60a)
GaudiPartProp.PartPropSvc Namespace Reference

Functions

def test ()
 simple test-function More...
 
def test2 ()
 

Variables

 __author__
 
 gaudi
 

Function Documentation

◆ test()

def GaudiPartProp.PartPropSvc.test ( )

simple test-function

Simple function for the test

Definition at line 56 of file PartPropSvc.py.

56 def 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()

def GaudiPartProp.PartPropSvc.test2 ( )

Definition at line 110 of file PartPropSvc.py.

110 def 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__

GaudiPartProp.PartPropSvc.__author__
private

Definition at line 23 of file PartPropSvc.py.

◆ gaudi

GaudiPartProp.PartPropSvc.gaudi

Definition at line 51 of file PartPropSvc.py.

GaudiPartProp.PartPropSvc.test2
def test2()
Definition: PartPropSvc.py:110
GaudiPartProp.decorators.Items
Items
Definition: decorators.py:304
GaudiPartProp.PartPropSvc.test
def test()
simple test-function
Definition: PartPropSvc.py:56
Gaudi::Decays
Definition: CC.h:17
GaudiPartProp.decorators.Item
Item
Definition: decorators.py:306
GaudiPartProp.Nodes.CC
CC
Definition: Nodes.py:251
GaudiPartProp.decorators.Decay
Decay
Definition: decorators.py:305
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
Definition: details.h:97