ATLAS Offline Software
Loading...
Searching...
No Matches
LHETools.Particle Class Reference
Inheritance diagram for LHETools.Particle:
Collaboration diagram for LHETools.Particle:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 mothers (self)
 daughters (self)
 index (self)
 from_string (cls, string)
 to_string (self)

Public Attributes

 mother1
 event
 invalid = not (set(kwargs.keys()) == set(self.FIELD_NAMES))
 FIELD_NAMES

Static Public Attributes

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}"

Detailed Description

Definition at line 57 of file LHETools.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Member Function Documentation

◆ 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.

94 def index(self):
95 return self.event.particles.index(self)
96
97
Definition index.py:1

◆ 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.

35 def to_string(self):
36 return self.FMT.format(**{field: getattr(self, field) for field in self.FIELD_NAMES}) if not self.invalid else ""
37
38
static std::string to_string(const std::vector< T > &v)

Member Data Documentation

◆ event

LHETools.Particle.event

Definition at line 90 of file LHETools.py.

◆ FIELD_NAMES

LHETools.Record.FIELD_NAMES
inherited

Definition at line 24 of file LHETools.py.

◆ 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

Definition at line 82 of file LHETools.py.

◆ invalid

LHETools.Record.invalid = not (set(kwargs.keys()) == set(self.FIELD_NAMES))
inherited

Definition at line 18 of file LHETools.py.

◆ mother1

LHETools.Particle.mother1

Definition at line 86 of file LHETools.py.


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