ATLAS Offline Software
Loading...
Searching...
No Matches
mc.MG_ttbar_LHE_valid.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3from EvgenJobTransforms.EvgenCAConfig import EvgenConfig
4
5
6class Sample(EvgenConfig):
7
8 def setupFlags(self, flags):
9 self.description = "MadGraph LO ttbar"
10 self.keywords = ["ttbar"]
11 self.contact = ["spyros.argyropoulos@cern.ch"]
12 self.nEventsPerJob = 10000
13
14 def setupProcess(self, flags):
15 # MadGraph process to generate
16 process_def = """
17 import model sm
18 define p = g u c d s u~ c~ d~ s~
19 define j = g u c d s u~ c~ d~ s~
20 generate p p > t t~
21 output -f
22 """
23
24 # Custom settings to pass to MadGraphControl.
25 # These are native MadGraph settings, not MadGraphControl settings.
26 settings = {
27 "cut_decays": "F",
28 }
29
30 # Use 4F NNPDF set
31 from MadGraphControl.MadGraphPDFSettings import MadGraphPDFSets
32 pdf_set = MadGraphPDFSets.NNPDF30NLOnf4
33
34 # This sample is LHE-only by construction: no showering stage.
35 from MadGraphControl.MadGraphConfig import MadGraph_LHE_Cfg
36 return MadGraph_LHE_Cfg(
37 flags,
38 process_definition=process_def,
39 settings=settings,
40 pdf_setting=pdf_set
41 )
42
43 # Non-default settings can be passed via the kwargs, for example:
44 # return MadGraph_LHE_Cfg(
45 # flags,
46 # process_definition=process_def,
47 # settings=settings,
48 # lhe_version=2,
49 # saveProcDir=True,
50 # safety=1.2, # increase the safety factor for number of events to be generated
51 # )