The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
GaudiPartProp.Service.iParticlePropertySvc Class Reference
Inheritance diagram for GaudiPartProp.Service.iParticlePropertySvc:
Collaboration diagram for GaudiPartProp.Service.iParticlePropertySvc:

Public Member Functions

 __init__ (self, name, isvc)
 retrieveInterface (self)
 find (self, what)
 Find the Particle Property by particle name or particle ID.
 get (self, cut, asList=False)
 get the Particle Properties by particle name or particle ID
 begin (self)
 begin-iterator
 end (self)
 end-iterator
 all (self, asList=False)
 get all
 dump (self)
 dump the particle property table
 cc (self, decay)
 CC-conjugation.
 svc (self)
 get the C++ service itself
 service (self)
 get the C++ service itself
 validate (self, obj)
 validate the node/decay/tree
 __iter__ (self)
 make iteration over all known particle properties
 size (self)
 get the size (number of known particle proeprties)
 __len__ (self)
 get the size (number of known particle proeprties)

Public Attributes

bool Dump = True

Static Public Attributes

 ParticleIDs
 Decay
 Decays
 Item
 Items

Protected Attributes

 _name
 _isvc
 _ipps

Detailed Description

Class iParticlePropertySvc: 'python'-twin for C++ class

Gaudi::Interfaces::IParticlePropertySvc

Definition at line 47 of file Service.py.

Constructor & Destructor Documentation

◆ __init__()

GaudiPartProp.Service.iParticlePropertySvc.__init__ ( self,
name,
isvc )
Constructor from the name and the service

Definition at line 55 of file Service.py.

55 def __init__(self, name, isvc):
56 """
57 Constructor from the name and the service
58 """
59 iService.__init__(self, name, isvc)
60 self.__dict__["_ipps"] = InterfaceCast(Gaudi.Interfaces.IParticlePropertySvc)(
61 isvc
62 )
63
The abstract interface to Particle Property Service.

Member Function Documentation

◆ __iter__()

GaudiPartProp.Service.iParticlePropertySvc.__iter__ ( self)

make iteration over all known particle properties

Make an iteration over all known particle properties:

>>> svc = ...       # get the service
>>> for pp i svc :  # make an iteration
...     print pp

Definition at line 192 of file Service.py.

192 def __iter__(self):
193 """
194 Make an iteration over all known particle properties:
195
196 >>> svc = ... # get the service
197 >>> for pp i svc : # make an iteration
198 ... print pp
199
200 """
201 if not self._ipps:
202 self.retrieveInterface()
203 _list = self._ipps.all(False)
204 _size = len(_list)
205 _i = 0
206 while _i < _size:
207 yield _list[_i]
208 _i += 1
209

◆ __len__()

GaudiPartProp.Service.iParticlePropertySvc.__len__ ( self)

get the size (number of known particle proeprties)

Get the length(size) of known particle properties

Definition at line 220 of file Service.py.

220 def __len__(self):
221 """
222 Get the length(size) of known particle properties
223 """
224 return self.size()
225
226
227# useful types

◆ all()

GaudiPartProp.Service.iParticlePropertySvc.all ( self,
asList = False )

get all

Get all particle properties form the service

>>> svc = ... # get the service
>>> all = svc.all ()  # get all properties

Definition at line 124 of file Service.py.

124 def all(self, asList=False):
125 """
126 Get all particle properties form the service
127
128 >>> svc = ... # get the service
129 >>> all = svc.all () # get all properties
130
131 """
132 if not self._ipps:
133 self.retrieveInterface()
134 return self._ipps.all(asList) # return
135

◆ begin()

GaudiPartProp.Service.iParticlePropertySvc.begin ( self)

begin-iterator

Get the begin-iterator for the sequence of particle proeprties

>>> svc = ... # get the service
>>> begin = svc.begin()

Definition at line 98 of file Service.py.

98 def begin(self):
99 """
100 Get the begin-iterator for the sequence of particle proeprties
101
102 >>> svc = ... # get the service
103 >>> begin = svc.begin()
104
105 """
106 if not self._ipps:
107 self.retrieveInterface()
108 return self._ipps.begin() # return
109

◆ cc()

GaudiPartProp.Service.iParticlePropertySvc.cc ( self,
decay )

CC-conjugation.

Get CC-conjugationfor decay -descriptor

>>> svc = ...                       # get the service
>>> cc = svc.cc ( 'B0 -> K- pi+' )  # get CC-conjugation

Definition at line 144 of file Service.py.

144 def cc(self, decay):
145 """
146 Get CC-conjugationfor decay -descriptor
147
148 >>> svc = ... # get the service
149 >>> cc = svc.cc ( 'B0 -> K- pi+' ) # get CC-conjugation
150
151 """
152 if not self._ipps:
153 self.retrieveInterface()
154 return self._ipps.cc(decay) # return
155

◆ dump()

GaudiPartProp.Service.iParticlePropertySvc.dump ( self)

dump the particle property table

Dump the particle property table

Definition at line 137 of file Service.py.

137 def dump(self):
138 """
139 Dump the particle property table
140 """
141 self.Dump = True
142

◆ end()

GaudiPartProp.Service.iParticlePropertySvc.end ( self)

end-iterator

Get the end-iterator for the sequence of particle proeprties

>>> svc = ... # get the service
>>> end = svc.end()

Definition at line 111 of file Service.py.

111 def end(self):
112 """
113 Get the end-iterator for the sequence of particle proeprties
114
115 >>> svc = ... # get the service
116 >>> end = svc.end()
117
118 """
119 if not self._ipps:
120 self.retrieveInterface()
121 return self._ipps.end() # return
122

◆ find()

GaudiPartProp.Service.iParticlePropertySvc.find ( self,
what )

Find the Particle Property by particle name or particle ID.

Find the Particle Property by particle name or particle ID

>>> svc = ...                                 # get the service
>>> pp1 = svc.find ( 'pi0' )                  # find by name
>>> pp2 = svc.find ( Gaudi.ParticleID( 511 ) ) # find by Particle ID

Definition at line 69 of file Service.py.

69 def find(self, what):
70 """
71 Find the Particle Property by particle name or particle ID
72
73 >>> svc = ... # get the service
74 >>> pp1 = svc.find ( 'pi0' ) # find by name
75 >>> pp2 = svc.find ( Gaudi.ParticleID( 511 ) ) # find by Particle ID
76
77 """
78 if not self._ipps:
79 self.retrieveInterface()
80 return self._ipps.find(what) # return
81

◆ get()

GaudiPartProp.Service.iParticlePropertySvc.get ( self,
cut,
asList = False )

get the Particle Properties by particle name or particle ID

Simple 'get' method for Gaudi::Interfaces::IParticlePropertySvc
service to extract the properties which satisfy some criteria

>>> svc = ...  # get service (Gaudi::Interfaces::IParticlePropertySvc) or vector
>>> leptons   = svc.get ( lambda s : s.pid().isLepton() )  # get all leptons
>>> longlived = svc.get ( lambda s : s.ctau() > 0.001   )  # get longlived

Definition at line 83 of file Service.py.

83 def get(self, cut, asList=False):
84 """
85 Simple 'get' method for Gaudi::Interfaces::IParticlePropertySvc
86 service to extract the properties which satisfy some criteria
87
88 >>> svc = ... # get service (Gaudi::Interfaces::IParticlePropertySvc) or vector
89 >>> leptons = svc.get ( lambda s : s.pid().isLepton() ) # get all leptons
90 >>> longlived = svc.get ( lambda s : s.ctau() > 0.001 ) # get longlived
91
92 """
93 if not self._ipps:
94 self.retrieveInterface()
95 return self._ipps.get(cut, asList) # return
96

◆ retrieveInterface()

GaudiPartProp.Service.iParticlePropertySvc.retrieveInterface ( self)

Definition at line 64 of file Service.py.

64 def retrieveInterface(self):
65 iService.retrieveInterface(self)
66 iParticlePropertySvc.__init__(self, self._name, self._isvc)
67

◆ service()

GaudiPartProp.Service.iParticlePropertySvc.service ( self)

get the C++ service itself

Get C++ service

>>> svc = ...  #
>>> svccpp = svc.service ()

Definition at line 170 of file Service.py.

170 def service(self):
171 """
172 Get C++ service
173
174 >>> svc = ... #
175 >>> svccpp = svc.service ()
176
177 """
178 return self.svc()
179

◆ size()

GaudiPartProp.Service.iParticlePropertySvc.size ( self)

get the size (number of known particle proeprties)

Get the length(size) of known particle properties

Definition at line 211 of file Service.py.

211 def size(self):
212 """
213 Get the length(size) of known particle properties
214 """
215 if not self._ipps:
216 self.retrieveInterface()
217 return self._ipps.size()
218

◆ svc()

GaudiPartProp.Service.iParticlePropertySvc.svc ( self)

get the C++ service itself

Get C++ service

>>> svc = ...  #
>>> svccpp = svc.svc ()

Definition at line 157 of file Service.py.

157 def svc(self):
158 """
159 Get C++ service
160
161 >>> svc = ... #
162 >>> svccpp = svc.svc ()
163
164 """
165 if not self._ipps:
166 self.retrieveInterface()
167 return self._ipps # return
168

◆ validate()

GaudiPartProp.Service.iParticlePropertySvc.validate ( self,
obj )

validate the node/decay/tree

Validate the node/decay/tree

>>> svc  = ...  # get the service
>>> node = ...  # get the node
>>> sc = svc.validate ( node )

Definition at line 181 of file Service.py.

181 def validate(self, obj):
182 """
183 Validate the node/decay/tree
184
185 >>> svc = ... # get the service
186 >>> node = ... # get the node
187 >>> sc = svc.validate ( node )
188 """
189 return obj.validate(self.svc())
190

Member Data Documentation

◆ _ipps

GaudiPartProp.Service.iParticlePropertySvc._ipps
protected

Definition at line 78 of file Service.py.

◆ _isvc

GaudiPartProp.Service.iParticlePropertySvc._isvc
protected

Definition at line 66 of file Service.py.

◆ _name

GaudiPartProp.Service.iParticlePropertySvc._name
protected

Definition at line 66 of file Service.py.

◆ Decay

GaudiPartProp.Service.iParticlePropertySvc.Decay
static

Definition at line 229 of file Service.py.

◆ Decays

GaudiPartProp.Service.iParticlePropertySvc.Decays
static

Definition at line 230 of file Service.py.

◆ Dump

bool GaudiPartProp.Service.iParticlePropertySvc.Dump = True

Definition at line 141 of file Service.py.

◆ Item

GaudiPartProp.Service.iParticlePropertySvc.Item
static

Definition at line 231 of file Service.py.

◆ Items

GaudiPartProp.Service.iParticlePropertySvc.Items
static

Definition at line 232 of file Service.py.

◆ ParticleIDs

GaudiPartProp.Service.iParticlePropertySvc.ParticleIDs
static

Definition at line 228 of file Service.py.


The documentation for this class was generated from the following file: