wiki:SplitEvents
Last modified 6 years ago Last modified on 04/12/12 14:55:26

Splitting LHEF Event files easily

It is sometimes easier to work with large event files (e.g. to use Decay), but its also sometimes easier to work with smaller samples (e.g. for control samples, to reduce the size of PYTHIA files, ...).

If you need to split LHEF files, please use this PERL script. Download the attachment and then type

mv split.pl.txt split.pl
chmod u+x split.pl

The syntax is

=./split.pl perc out1.lhe.gz out2.lhe.gz in.lhe.gz=

where

perc

is the percentage (between 0 and 100) of events from

in.lhe.gz

to be saved as

out1.lhe.gz

. The rest is saved in

out2.lhe.gz

. All the information (number of events, unit weight, ...) is updated correctly in the banners and in the event XML blocks.

-- Main.MichelHerquet - 23 Nov 2007

Attachments