Skip to content

Commit b74cca3

Browse files
committed
add option to weight pT hard bin cross section to allow spectra flattening
1 parent e541cc4 commit b74cca3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

MC/config/common/pythia8/utils/mkpy8cfg.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
parser.add_argument('--ptHatMax', type=float,
3030
help='The maximum invariant pT')
3131

32+
parser.add_argument('--weightPower', type=float,
33+
help='Weight power to pT hard spectrum')
34+
3235
parser.add_argument('--output', default='pythia8.cfg',
3336
help='Where to write the configuration')
3437

@@ -103,6 +106,10 @@
103106
fout.write('PhaseSpace:pTHatMin = %f \n' % (args.ptHatMin))
104107
if args.ptHatMax is not None :
105108
fout.write('PhaseSpace:pTHatMax = %f \n' % (args.ptHatMax))
109+
if args.weightPower is not None :
110+
fout.write('PhaseSpace:bias2Selection = on \n')
111+
fout.write('PhaseSpace:bias2SelectionPow = %f" \n' % (args.weightPower))
112+
106113
fout.write('\n')
107114

108115
fout.write('### <-- generated by mkpy8cfg.py \n')

0 commit comments

Comments
 (0)