Package madgraph :: Package various :: Module lhe_parser :: Class EventFile
[hide private]
[frames] | no frames]

Class EventFile

source code

object --+
         |
        EventFile
Known Subclasses:

A class to allow to read both gzip and not gzip file

Instance Methods [hide private]
 
__init__(self, path, mode='r', *args, **opt)
open file and read the banner [if in read mode]
source code
 
get_banner(self)
return a banner object
source code
 
__len__(self) source code
 
next(self)
get next event
source code
 
initialize_unweighting(self, get_wgt, trunc_error)
scan once the file to return
source code
 
write_events(self, event)
write a single events or a list of event if self.eventgroup is ON, then add <eventgroup> around the lists of events
source code
 
unweight(self, outputpath, get_wgt=None, max_wgt=0, trunc_error=0, event_target=0, log_level=20, normalization='average')
unweight the current file according to wgt information wgt.
source code
 
apply_fct_on_event(self, *fcts, **opts)
apply one or more fct on all event.
source code
 
split(self, nb_event=0, partition=None, cwd='.', zip=False)
split the file in multiple file.
source code
 
update_HwU(self, hwu, fct, name='lhe', keep_wgt=False, maxevents=9223372036854775807)
take a HwU and add this event file for the function fct
source code
 
create_syscalc_data(self, out_path, pythia_input=None)
take the lhe file and add the matchscale from the pythia_input file
source code
 
get_alphas(self, scale, lhapdf_config='lhapdf-config')
return the alphas value associated to a given scale
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(self, path, mode='r', *args, **opt) source code
Class Variables [hide private]
  allow_empty_event = False
Properties [hide private]
  cross
return the cross-section of the file #from the banner

Inherited from object: __class__

Method Details [hide private]

__new__(self, path, mode='r', *args, **opt)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, path, mode='r', *args, **opt)
(Constructor)

source code 

open file and read the banner [if in read mode]

Overrides: object.__init__

initialize_unweighting(self, get_wgt, trunc_error)

source code 

scan once the file to return

  • the list of the hightest weight (of size trunc_error*NB_EVENT
  • the cross-section by type of process
  • the total number of events in the file

unweight(self, outputpath, get_wgt=None, max_wgt=0, trunc_error=0, event_target=0, log_level=20, normalization='average')

source code 

unweight the current file according to wgt information wgt. which can either be a fct of the event or a tag in the rwgt list. max_wgt allow to do partial unweighting. trunc_error allow for dynamical partial unweighting event_target reweight for that many event with maximal trunc_error. (stop to write event when target is reached)

split(self, nb_event=0, partition=None, cwd='.', zip=False)

source code 

split the file in multiple file. Do not change the weight!


Property Details [hide private]

cross

return the cross-section of the file #from the banner

Get Method:
unreachable.cross(self) - return the cross-section of the file #from the banner