ATLAS Offline Software
Loading...
Searching...
No Matches
yj.py
Go to the documentation of this file.
1# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
3from ..powheg_V2 import PowhegV2
4from textwrap import dedent
5
6
7class yj(PowhegV2):
8 """
9 Powheg configuration for direct photon production, defined as having the leading-order processes
10 q q~ -> y g
11 q g -> y q
12 q~ g -> y q~
13
14 Publication (please cite if using this process): https://arxiv.org/abs/1610.02275
15
16 For a study using this process, see https://arxiv.org/abs/1709.04154
17
18 The enhancement of photon radiation is described on page 137ff of this PhD thesis:
19 https://www.uni-muenster.de/imperia/md/content/physik_tp/theses/klasen/koenig_phd.pdf
20
21 @author Stefan Richter <stefan.richter@cern.ch>
22 """
23
24 def __init__(self, base_directory, **kwargs):
25 """! Constructor: all process options are set here.
26
27 @param base_directory: path to PowhegBox code.
28 @param kwargs dictionary of arguments from Generate_tf.
29 """
30 super(yj, self).__init__(base_directory, "directphoton", **kwargs)
31
32 # Add the writing of an initial reweighting file needed to get the Sudakov reweighting factor
33 # into the nominal event weight.
34 self.validation_functions.append("write_enhancedradfac_reweighting_file")
35
36 # Add all keywords for this process, overriding defaults if required
37 self.add_keyword("alphaem_inv")
38 self.add_keyword("alphas_from_lhapdf")
39 self.add_keyword("bornktmin", 50.0)
40 self.add_keyword("bornonly")
41 # According to the authors' example located at (e.g.)
42 # POWHEG-BOX-V2/directphoton/testrun-lhc/powheg.input-save
43 # bornsuppfact=4000 is used "to get photons over a wide range of 100 GeV
44 # to over 1 TeV, not for low energy photons":
45 self.add_keyword("bornsuppfact", 4000)
46 self.add_keyword("bornzerodamp")
47 self.add_keyword("bottomthr")
48 self.add_keyword("bottomthrpdf")
49 self.add_keyword("btildeborn")
50 self.add_keyword("btildecoll")
51 self.add_keyword("btildereal")
52 self.add_keyword("btildevirt")
53 self.add_keyword("btlscalect")
54 self.add_keyword("btlscalereal")
55 self.add_keyword("charmthr")
56 self.add_keyword("charmthrpdf")
57 self.add_keyword("check_bad_st1")
58 self.add_keyword("check_bad_st2")
59 self.add_keyword("clobberlhe")
60 self.add_keyword("colltest")
61 self.add_keyword("compress_lhe")
62 self.add_keyword("compress_upb")
63 self.add_keyword("compute_rwgt")
64 self.add_keyword("doublefsr", 1)
65 self.add_keyword("emvirtual")
66 self.add_keyword("enhancedradfac", 50)
67 self.add_keyword("evenmaxrat")
68 self.add_keyword("facscfact", self.default_scales[0])
69 self.add_keyword("fastbtlbound")
70 self.add_keyword("fixedgrid")
71 self.add_keyword("fixedscale")
72 self.add_keyword("flg_debug")
73 self.add_keyword("foldcsi", 2)
74 self.add_keyword("foldphi", 1)
75 self.add_keyword("foldy", 5)
76 self.add_keyword("fullrwgt")
77 self.add_keyword("fullrwgtmode")
78 self.add_keyword("hdamp")
79 self.add_keyword("hfact")
80 self.add_keyword("icsimax", 1)
81 self.add_keyword("ih1")
82 self.add_keyword("ih2")
83 self.add_keyword("itmx1", 5)
84 self.add_keyword("itmx1rm")
85 self.add_keyword("itmx2", 5)
86 self.add_keyword("itmx2rm")
87 self.add_keyword("iupperfsr", 1)
88 self.add_keyword("iupperisr")
89 self.add_keyword("iymax", 5)
90 self.add_keyword("jacsing")
91 self.add_keyword("lhans1", self.default_PDFs)
92 self.add_keyword("lhans2", self.default_PDFs)
93 self.add_keyword("lhapdf6maxsets")
94 self.add_keyword("lhrwgt_descr")
95 self.add_keyword("lhrwgt_group_combine")
96 self.add_keyword("lhrwgt_group_name")
97 self.add_keyword("lhrwgt_id")
98 self.add_keyword("LOevents")
99 self.add_keyword("manyseeds")
100 self.add_keyword("max_io_bufsize")
101 self.add_keyword("maxseeds")
102 self.add_keyword("minlo")
103 self.add_keyword("mintupbratlim")
104 self.add_keyword("mintupbxless")
105 self.add_keyword("ncall1", 500000)
106 self.add_keyword("ncall1rm")
107 self.add_keyword("ncall2", 500000)
108 self.add_keyword("ncall2rm")
109 self.add_keyword("ncallfrominput")
110 self.add_keyword("noevents")
111 self.add_keyword("novirtual")
112 self.add_keyword("nubound", 500000)
113 self.add_keyword("olddij")
114 self.add_keyword("par_2gsupp", 4)
115 self.add_keyword("par_diexp", 4)
116 self.add_keyword("par_dijexp", 4)
117 self.add_keyword("parallelstage")
118 #self.add_keyword("pdfreweight")
119 self.add_keyword("ptsqmin")
120 self.add_keyword("ptsupp")
121 self.add_keyword("radregion")
122 self.add_keyword("rand1")
123 self.add_keyword("rand2")
124 self.add_keyword("renscfact", self.default_scales[1])
125 # Reweighting needs to already be run during the initial event
126 # generation for this process. The reason is that the additional event
127 # weight multiplied by a special Sudakov reweighting factor for enhanced
128 # photon radiation sampling (needed to get good signal statistics) needs
129 # to be written into the LHE file to be able to use it later as the
130 # nominal event weight. Any additional multiweights also use this weight
131 # as the reference weight. The "bare" weight not including the Sudakov
132 # reweighting factor is unphysical and should not be used. To enable the
133 # reweighting, a rwl_file provided (which is written
134 # automatically when this constructor is called).
135 # Note that rwl_add has to be set to 0! This parameter is for adding
136 # further weights to an LHE file from a previous run
137 self.add_keyword("rwl_add", 0)
138 self.add_keyword("rwl_file", 'reweighting_needed_for_enhancedradfac.xml')
139 self.add_keyword("rwl_format_rwgt")
140 self.add_keyword("rwl_group_events", 20000)
141 self.add_keyword("skipextratests")
142 self.add_keyword("smartsig")
143 self.add_keyword("softtest")
144 self.add_keyword("stage2init")
145 self.add_keyword("storeinfo_rwgt")
146 self.add_keyword("storemintupb")
147 self.add_keyword("testplots")
148 self.add_keyword("testsuda")
149 self.add_keyword("ubexcess_correct")
150 self.add_keyword("ubsigmadetails")
151 self.add_keyword("use-old-grid")
152 self.add_keyword("use-old-ubound")
153 self.add_keyword("withdamp")
154 self.add_keyword("withnegweights")
155 self.add_keyword("withsubtr")
156 self.add_keyword("xgriditeration")
157 self.add_keyword("xupbound", 2)
158
160 """Writes reweighting XML file needed for initial event generation.
161
162 Caution: it seems that the weight has to be called "default". Otherwise
163 Powheg will give an error.
164 """
165 with open('reweighting_needed_for_enhancedradfac.xml', 'w') as xmlfile:
166 contents = dedent('''\
167 <initrwgt>
168 <weightgroup name='nominal' combine='None'>
169 <weight id='0'>default</weight>
170 </weightgroup>
171 </initrwgt>
172 ''')
173 xmlfile.write(contents)
add_keyword(self, keyword, value=None, name=None, frozen=None, hidden=None, description=None, **kwargs)
Register configurable parameter that is exposed to the user.
write_enhancedradfac_reweighting_file(self)
Definition yj.py:159
__init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition yj.py:24
Base class for PowhegBox V2 processes.
Definition powheg_V2.py:6
list validation_functions
List of validation functions to run before preparing runcard.
default_scales(self)
Default scale variations for this process.