! This file demonstrates the usage of NL3 merging in Pythia.
! The merging scale is defined in terms of the shower evolution
! variable pTlund.

! Number of generated events.
Main:numberOfEvents       = 1000

! Use LHEF input for events.
Beams:frameType           = 4

! Event-generation options.
PartonLevel:MPI           = on
HadronLevel:all           = on

! Switch enforced rapidity ordering off.
SpaceShower:rapidityOrder = off

! Merging scale value.
Merging:TMS               = 15

! Core process for merging.
Merging:Process           = pp>LEPTONS,NEUTRINOS

! Maximal number of additional LO jets.
Merging:nJetMax           = 2
! Maximal number of additional NLO jets.
Merging:nJetMaxNLO        = 1

! Values of (fixed) scales in the matrix element calculation.
Merging:muFacInME         = 80.4
Merging:muRenInME         = 91.188
! Values of (fixed) scales for the PS lowest multiplicity process.
Merging:muFac             = 80.4
Merging:muRen             = 91.188

! Include PDFs into the choice of histories.
Merging:includeRedundant  = on

! Switch off enforced rapidity ordering
SpaceShower:rapidityOrder = off

! Since UNLOPS is a next-to-leading order merging method, next-to-leading
! order PDFs are necessary in the matrix element calculation. However, the
! parton shower and multiparton interactions favour leading-order PDFs,
! since multiparton interactions probe the incoming hadron at small momentum
! scales. Until a NLO-merged tune becomes available, LO PDFs should be used
! throughout the shower.
! Example PDF files generated with CTEQ6 PDFs.
!PDF:pSet                  = LHAPDF6:cteq6l1
SpaceShower:alphaSvalue   = 0.118
TimeShower:alphaSvalue    = 0.118

! Subruns are used to select which merging contribution is run when.
! Subrun info should always go at the end of the input file.
! Here Main:subrun = iMerge of pythia.readFile(...) in main162.cc.
! Note that in the case of NL3 we have
! numberOfSubruns = 2*nJetMax+1 + nJetMaxNLO+1.
Main:numberOfSubruns      = 7
!-----------------------------------------------------------------------
! LO 2j events.
Main:subrun               = 1
Merging:doNL3Tree         = on
Merging:doNL3Loop         = off
Merging:doNL3Subt         = off
Merging:nRecluster        = 0
Merging:nRequested        = 2
Beams:LHEF                = w_production_tree_2.lhe
!-----------------------------------------------------------------------
! LO 1j events.
Main:subrun               = 2
Merging:doNL3Tree         = on
Merging:doNL3Loop         = off
Merging:doNL3Subt         = off
Merging:nRecluster        = 0
Merging:nRequested        = 1
Beams:LHEF                = w_production_tree_1.lhe
!-----------------------------------------------------------------------
! LO 0j events.
Main:subrun               = 3
Merging:doNL3Tree         = on
Merging:doNL3Loop         = off
Merging:doNL3Subt         = off
Merging:nRecluster        = 0
Merging:nRequested        = 0
Beams:LHEF                = w_production_tree_0.lhe
!-----------------------------------------------------------------------
! NLO 1j events.
Main:subrun               = 4
Merging:doNL3Tree         = off
Merging:doNL3Loop         = on
Merging:doNL3Subt         = off
Merging:nRecluster        = 0
Merging:nRequested        = 1
Beams:LHEF                = w_production_powheg_1.lhe
!-----------------------------------------------------------------------
! NLO 0j events.
Main:subrun               = 5
Merging:doNL3Tree         = off
Merging:doNL3Loop         = on
Merging:doNL3Subt         = off
Merging:nRecluster        = 0
Merging:nRequested        = 0
Beams:LHEF                = w_production_powheg_0.lhe
!-----------------------------------------------------------------------
! LO 2j counter events.
Main:subrun               = 6
Merging:doNL3Tree         = off
Merging:doNL3Loop         = off
Merging:doNL3Subt         = on
Merging:nRecluster        = 1
Merging:nRequested        = 2
Beams:LHEF                = w_production_tree_2.lhe
!-----------------------------------------------------------------------
! LO 1j counter events.
Main:subrun               = 7
Merging:doNL3Tree         = off
Merging:doNL3Loop         = off
Merging:doNL3Subt         = on
Merging:nRecluster        = 1
Merging:nRequested        = 1
Beams:LHEF                = w_production_tree_1.lhe
!-----------------------------------------------------------------------
