HPS-MC
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
Loading...
Searching...
No Matches
wab_gen_sample_job.py
Go to the documentation of this file.
1
"""!
2
@file wab_gen_sample_job.py
3
Python script for generating sampled WAB events in StdHep format from an input LHE file.
4
The output events can be used as input to 'merge_job.py' with a beam StdHep file to for creating a
5
wab-beam sample file.
6
"""
7
8
from
hpsmc.generators
import
MG5
9
from
hpsmc.tools
import
BeamCoords, MergePoisson
10
from
hpsmc.generators
import
StdHepConverter
11
12
job.description =
'WAB gen and sampling'
13
14
15
mg = MG5(name=
"WAB"
)
16
17
# check that at least 80% of the requested events were generated or fail the job
18
# check = LHECount(minevents=params.nevents*0.8, inputs=["wab_unweighted_events.lhe.gz"])
19
20
cnv = StdHepConverter(inputs=mg.output_files(), outputs=[
'wab_events.stdhep'
])
21
22
23
rot = BeamCoords()
24
25
26
sample = MergePoisson(input_filter=
'wab'
,
27
input_files=[
'wab_unweighted_events_rot.stdhep'
],
28
output_files=[
'wab_unweighted_events_rot_sampled.stdhep'
],
29
xsec=7.55e10)
30
31
32
job.add([mg, cnv])
hpsmc.generators
Definition
generators.py:1
hpsmc.tools
Tools that can be used in HPSMC jobs.
Definition
tools.py:1
examples
wab_gen_sample
wab_gen_sample_job.py
Generated by
1.9.8