|
| dict | FIELD_TYPES |
| str | FMT = "{pdg_id:8d} {status:5d} {mother0:5d} {mother1:5d} {colour0:5d} {colour1:5d} {px: .9E} {py: .9E} {pz: .9E} {e: .9E} {m: .9E} {lifetime: .5E} {spin: .3E}" |
Definition at line 57 of file LHETools.py.
◆ result
◆ daughters()
| LHETools.Particle.daughters |
( |
| self | ) |
|
Definition at line 88 of file LHETools.py.
88 def daughters(self):
89 self_id = self.index() + 1
90 for p in self.event:
91 if p.mother0 <= self_id <= p.mother1:
92 yield p
93
◆ from_string()
| LHETools.Record.from_string |
( |
| cls, |
|
|
| string ) |
|
inherited |
Definition at line 23 of file LHETools.py.
23 def from_string(cls, string):
24 if len(cls.FIELD_NAMES) != len(string.split()):
25 LHEToolsLog.warning("Inconsistent number of fields in lhe file line:")
26 LHEToolsLog.warning(string)
27 return cls()
28 try:
29 return cls(**dict(zip(cls.FIELD_NAMES, string.split())))
30 except:
31 LHEToolsLog.warning("Impossible to interpret lhe file line:")
32 LHEToolsLog.warning(string)
33 return cls()
34
◆ index()
| LHETools.Particle.index |
( |
| self | ) |
|
Definition at line 94 of file LHETools.py.
95 return self.event.particles.index(self)
96
97
◆ mothers()
| LHETools.Particle.mothers |
( |
| self | ) |
|
Definition at line 84 of file LHETools.py.
84 def mothers(self):
85 return (self.event.particles[mo]
86 for mo
in xrange(self.mother0 - 1, self.mother1))
87
void xrange(TH1 *h, bool symmetric)
◆ to_string()
| LHETools.Record.to_string |
( |
| self | ) |
|
|
inherited |
Definition at line 35 of file LHETools.py.
36 return self.FMT.format(**{field: getattr(self, field) for field in self.FIELD_NAMES}) if not self.invalid else ""
37
38
◆ event
◆ FIELD_NAMES
| LHETools.Record.FIELD_NAMES |
|
inherited |
◆ FIELD_TYPES
| dict LHETools.Particle.FIELD_TYPES |
|
static |
Initial value:= {
'pdg_id': int,
'status': int,
'mother0': int,
'mother1': int,
'colour0': int,
'colour1': int,
'px': float,
'py': float,
'pz': float,
'e': float,
'm': float,
'lifetime': float,
'spin': float
}
Definition at line 65 of file LHETools.py.
◆ FMT
| str LHETools.Particle.FMT = "{pdg_id:8d} {status:5d} {mother0:5d} {mother1:5d} {colour0:5d} {colour1:5d} {px: .9E} {py: .9E} {pz: .9E} {e: .9E} {m: .9E} {lifetime: .5E} {spin: .3E}" |
|
static |
◆ invalid
| LHETools.Record.invalid = not (set(kwargs.keys()) == set(self.FIELD_NAMES)) |
|
inherited |
◆ mother1
| LHETools.Particle.mother1 |
The documentation for this class was generated from the following file: