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

Class MultiEventFile

source code

object --+    
         |    
 EventFile --+
             |
            MultiEventFile

a class to read simultaneously multiple file and read them in mixing them. Unweighting can be done at the same time. The number of events in each file need to be provide in advance (if not provide the file is first read to find that number

Instance Methods [hide private]
 
__init__(self, start_list=[], parse=True)
if trunc_error is define here then this allow to only read all the files twice and not three times.
source code
 
close(self, *args, **opts) source code
 
add(self, path, cross, error, across, nb_event=0, scale=1)
add a file to the pool, across allow to reweight the sum of weight in the file to the given cross-section
source code
 
__iter__(self) source code
 
next(self)
get next event
source code
 
define_init_banner(self, wgt, lha_strategy, proc_charac=None)
define the part of the init_banner
source code
 
initialize_unweighting(self, getwgt, trunc_error)
scan once the file to return
source code
 
configure(self) source code
 
__len__(self) source code
 
seek(self, pos) source code
 
unweight(self, outputpath, get_wgt, **opts)
unweight the current file according to wgt information wgt.
source code
 
write(self, path, random=False, banner=None, get_info=False) source code
 
remove(self) source code

Inherited from EventFile: apply_fct_on_event, create_syscalc_data, get_alphas, get_banner, split, update_HwU, write_events

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__(cls, start_list=[], parse=True) source code
Class Variables [hide private]

Inherited from EventFile: allow_empty_event

Properties [hide private]

Inherited from EventFile: cross

Inherited from object: __class__

Method Details [hide private]

__new__(cls, start_list=[], parse=True)
Static Method

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

__init__(self, start_list=[], parse=True)
(Constructor)

source code 

if trunc_error is define here then this allow to only read all the files twice and not three times.

Overrides: object.__init__

next(self)

source code 

get next event

Overrides: EventFile.next
(inherited documentation)

initialize_unweighting(self, getwgt, 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 files In top of that it initialise the information for the next routine to determine how to choose which file to read
Overrides: EventFile.initialize_unweighting

__len__(self)
(Length operator)

source code 
Overrides: EventFile.__len__

unweight(self, outputpath, get_wgt, **opts)

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)

Overrides: EventFile.unweight