ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
EvgenJobTransforms
share
EvgenTest
421007
mc.MGPy8EG_ttbar_p83_art.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3
from
EvgenJobTransforms.EvgenCAConfig
import
EvgenConfig
4
5
class
Sample(EvgenConfig):
6
7
def
setupFlags
(self, flags):
8
self.
description
=
"MadGraph LO ttbar OTF with Pythia8 showering"
9
self.
keywords
= [
"ttbar"
,
"jets"
]
10
self.
contact
= [
"spyros.argyropoulos@cern.ch"
]
11
self.
nEventsPerJob
= 10000
12
13
def
setupProcess
(self, flags):
14
# MadGraph process to generate
15
process_def =
"""
16
import model sm
17
define p = g u c d s u~ c~ d~ s~
18
define j = g u c d s u~ c~ d~ s~
19
generate p p > t t~
20
output -f
21
"""
22
23
# Custom settings to pass to MadGraphControl.
24
# These are native MadGraph settings, not MadGraphControl settings.
25
settings = {
26
'lhe_version'
:
'3.0'
,
27
'cut_decays'
:
'F'
,
28
'pdlabel'
:
'lhapdf'
,
29
'lhaid'
:
'247000'
,
30
'use_syst'
:
'False'
31
}
32
33
# Run MG to prepare the LHE file for showering
34
from
MadGraphControl.MadGraphConfig
import
MadGraphCfg
35
sampleConfig = MadGraphCfg(
36
flags,
37
process_definition=process_def,
38
settings=settings,
39
prepare_lhe_for_shower=
True
40
)
41
42
# Merge Pythia8 specifying the shower configuration
43
# with the A14 tune and NNPDF23LO PDF set,
44
# adding EvtGen for hadron decays on top.
45
from
Pythia8_i.Pythia8Config
import
(
46
Pythia8_MadGraph_Cfg,
47
Pythia8_A14_NNPDF23LO_EvtGen_Common_Cfg
48
)
49
50
# Pythia8_MadGraph_Cfg tells the CA to run Pythia8 reading LHE
51
# generated by MadGraph.
52
# ShowerCfg specifies which configuration
53
# (tune,PDF) to use in the shower and whether EvtGen should be
54
# added on top.
55
sampleConfig.merge(Pythia8_MadGraph_Cfg(
56
flags,
57
ShowerCfg=Pythia8_A14_NNPDF23LO_EvtGen_Common_Cfg
58
))
59
60
return
sampleConfig
mc.Sample.keywords
list keywords
Definition
mc.Sh30_Zj_valid.py:9
mc.Sample.setupProcess
setupProcess(self, flags)
Definition
mc.Sh30_Zj_valid.py:13
mc.Sample.nEventsPerJob
int nEventsPerJob
Definition
mc.Sh30_Zj_valid.py:11
mc.Sample.description
str description
Definition
mc.Sh30_Zj_valid.py:8
mc.Sample.setupFlags
setupFlags(self, flags)
Definition
mc.Sh30_Zj_valid.py:7
mc.Sample.contact
list contact
Definition
mc.Sh30_Zj_valid.py:10
Generated on
for ATLAS Offline Software by
1.17.0