Page MenuHomeHEPForge

No OneTemporary

This file is larger than 256 KB, so syntax highlighting was skipped.
diff --git a/Shower/Dipole/Merging/Makefile.am b/Shower/Dipole/Merging/Makefile.am
--- a/Shower/Dipole/Merging/Makefile.am
+++ b/Shower/Dipole/Merging/Makefile.am
@@ -1,16 +1,16 @@
noinst_LTLIBRARIES = libHwDipoleShowerMerging.la
libHwDipoleShowerMerging_la_SOURCES = \
Node.cc \
Node.fh \
Node.h \
MScale.cc \
MScale.h \
- MFactory.cc \
- MFactory.fh \
- MFactory.h \
+ MergingFactory.cc \
+ MergingFactory.fh \
+ MergingFactory.h \
Merger.fh\
Merger.h\
Merger.cc \
MergingReweight.h \
MergingReweight.cc
diff --git a/Shower/Dipole/Merging/Merger.cc b/Shower/Dipole/Merging/Merger.cc
--- a/Shower/Dipole/Merging/Merger.cc
+++ b/Shower/Dipole/Merging/Merger.cc
@@ -1,1558 +1,1558 @@
// -*- C++ -*-
//
// Merger.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2007 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the Merger class.
//
#include "Merger.h"
#include "Node.h"
-#include "MFactory.h"
+#include "MergingFactory.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "Herwig/Shower/Dipole/DipoleShowerHandler.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/RefVector.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Config/Constants.h"
#include "Herwig/Shower/ShowerHandler.h"
#include "Herwig/PDF/HwRemDecayer.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/RandomHelpers.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
#include "fastjet/ClusterSequence.hh"
using namespace Herwig;
Merger::Merger()
: MergerBase(),
Unlopsweights(true),
theCMWScheme(true),
isUnitarized(true),
isNLOUnitarized(true),
defMERegionByJetAlg(false),
theOpenInitialStateZ(false),
theChooseHistory(0),
theN0(0),
theOnlyN(-1),
theCurrentMaxLegs(-1),
xiRenME(1.),
xiFacME(1.),
xiRenSh(1.),
xiFacSh(1.),
xiQSh(1.),
theGamma(1.),
ee_ycut(-1),
pp_dcut(-1),
theSmearing(0.),
therenormscale(-1.*GeV),
theIRSafePT(1.*GeV),
theMergePt(4.*GeV),
theCentralMergePt(4.*GeV),
theMergingJetFinder(),
theLargeNBasis(),
theDipoleShowerHandler(),
theTreeFactory()
{
FFLTK=new_ptr(FFLightTildeKinematics());
FILTK=new_ptr(FILightTildeKinematics());
IFLTK=new_ptr(IFLightTildeKinematics());
IILTK=new_ptr(IILightTildeKinematics());
FFMTK=new_ptr(FFMassiveTildeKinematics());
FIMTK=new_ptr(FIMassiveTildeKinematics());
IFMTK=new_ptr(IFMassiveTildeKinematics());
}
Merger::~Merger() {}
IBPtr Merger::clone() const {
return new_ptr(*this);
}
IBPtr Merger::fullclone() const {
return new_ptr(*this);
}
pair<PVector,PVector> getInOut(NPtr Node){
PVector incoming;
for(auto const & i : {0,1})
incoming.push_back(Node->nodeME()->mePartonData()[i]->produceParticle(Node->nodeME()->lastMEMomenta()[i]));
PVector outgoing;
for (size_t i=2;i<Node->nodeME()->mePartonData().size();i++){
Ptr<ThePEG::Particle>::ptr p =Node->nodeME()->mePartonData()[i]->produceParticle(Node->nodeME()->lastMEMomenta()[i]);
outgoing.push_back(p);
}
return make_pair(incoming,outgoing);
}
CrossSection Merger::MergingDSigDRBornGamma(NPtr Node){
double weightCL=0.;
weight=1.;
if (!Node->children().empty()) {
auto const inoutpair=getInOut(Node);
NPtr rndCh= Node->randomChild(); // Here we make sure that clustering and splitting are invertible
if(!matrixElementRegion(inoutpair.first,inoutpair.second, rndCh->pT(), theMergePt))weight*= 0.;
}
NPtr Born= Node-> getHistory(true,xiQSh);
NPtr CLNode;
NPtr BornCL;
if( !Node->children().empty()){
if (UseRandom::rnd()<.5){
CLNode= Node->randomChild();
bool inhist=CLNode->isInHistoryOf(Born);
weight*=inhist?(-2.*int(Node->children().size())):0.;
projected=true;Node->nodeME()->projectorStage(1);
weightCL=2.*int(Node->children().size());
BornCL=CLNode-> getHistory(false,xiQSh);
}else{
weight=2.;projected=false;Node->nodeME()->projectorStage(0);
}
}else{
weight=1.;projected=false;Node->nodeME()->projectorStage(0);
}
if (treefactory()->onlymulti()!=-1&&
treefactory()->onlymulti()!=int(Node->legsize()-Node->nodeME()->projectorStage()))
return ZERO;
if(!Node->allAbove(mergePt()-0.1*GeV))weight=0.;
if(CLNode&&!CLNode->allAbove(mergePt()-0.1*GeV))weightCL=0.;
if (!Born->xcomb()->willPassCuts()){
if (Born->parent()) {
//cout<<"\n parent not pass";
}
return ZERO;
}
CrossSection res=ZERO;
bool maxMulti=Node->legsize() == int(maxLegsLO());
if(weight!=0.){
Energy startscale=CKKW_StartScale(Born);
fillHistory( startscale, Born, Node);
Node->runningPt(fillProjector());
weight*=history.back().weight*alphaReweight()*pdfReweight();
if(weight==0.&&weightCL==0.)return ZERO;
res+=weight*TreedSigDR(startscale,Node,(!maxMulti&&!projected)?theGamma:1.);
}
if(CLNode&&theGamma!=1.){
Energy startscale=CKKW_StartScale(BornCL);
fillHistory( startscale, BornCL, CLNode);
Node->runningPt(fillProjector());
weightCL*=history.back().weight*alphaReweight()*pdfReweight();
CrossSection diff=ZERO;
Node->nodeME()->factory()->setAlphaParameter(1.);
diff-=weightCL*CLNode->dipole()->dSigHatDR(sqr(startscale*xiFacME));
Node->nodeME()->factory()->setAlphaParameter(theGamma);
string alp=(CLNode->dipole()->aboveAlpha()?"Above":"Below");
diff+=weightCL*CLNode->dipole()->dSigHatDR(sqr(startscale*xiFacME));
Node->nodeME()->factory()->setAlphaParameter(1.);
res+=diff;
}
return res;
}
CrossSection Merger::MergingDSigDRBornStandard(NPtr Node){
// Check if phase space poing is in ME region
if (!Node->children().empty()) {
auto const & inoutpair=getInOut(Node);
NPtr rndCh= Node->randomChild(); // Here we make sure that clustering and splitting are invertible
if(!matrixElementRegion(inoutpair.first,inoutpair.second, rndCh->pT(), theMergePt))return ZERO;
}
// get the history for the process
NPtr Born= Node-> getHistory(true,xiQSh);
if( Born!= Node){
// at least one history step -> unitarisation
if (UseRandom::rnd()<.5){
weight=-2.;projected=true;Node->nodeME()->projectorStage(1);
}else{
weight=2.;projected=false;Node->nodeME()->projectorStage(0);
}
}else{
// no ordered history -> no projection
weight=1.;projected=false;Node->nodeME()->projectorStage(0);
}
if (treefactory()->onlymulti()!=-1&&
treefactory()->onlymulti()!=int(Node->legsize()-(projected?1:0)))
return ZERO;
assert(Node->allAbove(mergePt()-0.1*GeV));
if (!Born->xcomb()->willPassCuts())return ZERO;
// calculate the staring scale
Energy startscale=CKKW_StartScale(Born);
// fill history with caluclation of sudakov supression
fillHistory( startscale, Born, Node);
// fill the projector, the argument gets set to current scale
Node->runningPt(fillProjector());
// the weight has three components to get shower history weight
weight*=history.back().weight*alphaReweight()*pdfReweight();
if(weight==0.)return ZERO;
//calculate the cross section
return weight*TreedSigDR(startscale,Node,1.);
}
CrossSection Merger::MergingDSigDRVirtualStandard(NPtr Node ){
// Check if phase space poing is in ME region
if (!Node->children().empty()) {
auto inoutpair=getInOut(Node);
NPtr rndCh= Node->randomChild(); // Here we make sure that clustering and splitting are invertible
if(!matrixElementRegion(inoutpair.first,inoutpair.second, rndCh->pT(), theMergePt))return ZERO;
}
NPtr Born= Node-> getHistory(true,xiQSh);
if( Born!= Node){
if (UseRandom::rnd()<.5){
weight=-2.;projected=true;Node->nodeME()->projectorStage(1);
}else{
weight=2.;projected=false;Node->nodeME()->projectorStage(0);
}
}else{
weight=1.;projected=false;Node->nodeME()->projectorStage(0);
}
if (!Born->xcomb()->willPassCuts())return ZERO;
Energy startscale=CKKW_StartScale(Born);
fillHistory( startscale, Born, Node);
Node->runningPt(fillProjector());
double ww1=history.back().weight;
double ww2=alphaReweight();
double ww3=pdfReweight();
weight*=ww1*ww2*ww3;
if(weight==0.)return ZERO;
CrossSection matrixElement=LoopdSigDR(startscale,Node);
CrossSection Bornweight=Node->nodeME()->dSigHatDRB();
double w1=-sumpdfReweightUnlops();
double w2=-sumalphaReweightUnlops();
double w3=-sumfillHistoryUnlops();
CrossSection unlopsweight =(w1+w2+w3)
*Bornweight
*SM().alphaS()/(2.*ThePEG::Constants::pi);
if (Node->legsize()==5&&Debug::level > 2) {
Energy minPT=1000*GeV;
for(auto const & no :Node->children() )minPT=min(no->pT(),minPT);
cout<<"\nVIRT "<<minPT/GeV<<" "<<weight<<" "<<w1;
cout<<" "<<w2;
cout<<" "<<w3;
cout<<" "<<(matrixElement/nanobarn)<<" "<<ww1<<" "<<ww2<<" "<<ww3<<" "<<Born->pT()/GeV<<" "<<Born->nodeME()->mePartonData()[3]->mass()/GeV<<" "<<(Bornweight*SM().alphaS()/(2.*ThePEG::Constants::pi)/nanobarn);
}
return weight*
as(startscale*xiRenSh)/SM().alphaS()*
(matrixElement+unlopsweight);
}
CrossSection Merger::MergingDSigDRRealStandard(NPtr Node){
bool allAbove=Node->allAbove(mergePt());
//TODO: VW Abgas Skandal
if(!Node->allAbove((Debug::level > 2?0.01:1.)*theIRSafePT))return ZERO;
if (allAbove)return MergingDSigDRRealAllAbove(Node);
if (UseRandom::rnd()<.5)
return 2.*MergingDSigDRRealBelowSubReal( Node );
return 2.*MergingDSigDRRealBelowSubInt( Node);
}
CrossSection Merger::MergingDSigDRRealAllAbove(NPtr Node){
if (Node->children().empty()) {
throw Exception()
<< "Real emission contribution without underlying born."
<< "These are finite contibutions already handled in LO merging."
<< Exception::abortnow;
}
//If all dipoles pts are above, we cluster to this dipole.
NPtr CLNode= Node->randomChild();
// Check if phase space poing is in ME region--> else rm PSP
if (!CLNode->children().empty()) {
auto inoutpair=getInOut(CLNode);
NPtr rndCh= CLNode->randomChild(); // Here we make sure that clustering and splitting are invertible
if(!matrixElementRegion(inoutpair.first,inoutpair.second, rndCh->pT(), theMergePt))return ZERO;
}
// first find the history for the acctual Node
NPtr Born= Node-> getHistory(true,xiQSh);
// check if the randomly choosen CLNode is part of the history.
// If CLNode is not part of the history, dont calculate the Real contribution
// else multiply the real contribution with N (number of children).
// this returns the sudakov suppression according to the clustering of the born parts.
bool inhist=CLNode->isInHistoryOf(Born);
// get the history for the clustered Node.
Born=CLNode-> getHistory(false,xiQSh);
if( Born!= CLNode){
if (UseRandom::rnd()<.5){
weight=-2.; projected=true; Node->nodeME()->projectorStage(2);}
else{
weight= 2.; projected=false; Node->nodeME()->projectorStage(1);}
}else{
weight=1.; projected=false; Node->nodeME()->projectorStage(1);
}
if (!CLNode->allAbove(mergePt()))return ZERO;
if (!Born->xcomb()->willPassCuts())return ZERO;
Energy startscale=CKKW_StartScale(Born);
fillHistory( startscale, Born, CLNode);
Node->runningPt(fillProjector());
weight*=history.back().weight*alphaReweight()*pdfReweight();
if(weight==0.)return ZERO;
CrossSection me=(inhist?TreedSigDR(startscale,Node):ZERO);
CrossSection dip=CLNode->calcDip(startscale*xiFacME);
CrossSection res= weight*as(startscale*xiRenSh)/SM().alphaS()*
(double)Node->children().size()*(me -dip);
if (Node->legsize()==6&&Debug::level > 2) {
Energy minPT=1000*GeV;
for(auto const & no :Node->children() )minPT=min(no->pT(),minPT);
cout<<"\nRAA "<<minPT/GeV<<" "<<weight<<" "<<(me-dip)/nanobarn<< " "<<me/nanobarn<<" "<<dip/nanobarn;
}
// cout<<"\nCLNode->dipole()->dSigHatDR(sqr(startscale*xiFacME))/nanobarn "<<CLNode->dipole()->dSigHatDR(sqr(startscale*xiFacME))/nanobarn;
return res;
}
CrossSection Merger::MergingDSigDRRealBelowSubReal(NPtr Node){
NPtr HistNode=Node->randomChild();
if (!HistNode->children().empty()) {
auto inoutpair=getInOut(HistNode);
NPtr rndCh= HistNode->randomChild(); // Here we make sure that clustering and splitting are invertible
if(!matrixElementRegion(inoutpair.first,inoutpair.second, rndCh->pT(), theMergePt))return ZERO;
}
NPtr Born=HistNode-> getHistory(false,xiQSh);
if( Born!= HistNode){
if (UseRandom::rnd()<.5){
weight=-2.; projected=true; Node->nodeME()->projectorStage(1);}
else{
weight= 2.; projected=false; Node->nodeME()->projectorStage(0);}
}else{
weight=1.; projected=false; Node->nodeME()->projectorStage(0);
}
if (!Born->xcomb()->willPassCuts())return ZERO;
Energy startscale=CKKW_StartScale(Born);
fillHistory( startscale, Born, HistNode);
Node->runningPt(fillProjector());
weight*=history.back().weight*alphaReweight()*pdfReweight();
//cout<<"\n"<<history.back().weight<<" "<<alphaReweight()<<" "<<pdfReweight();
if(weight==0.)return ZERO;
CrossSection sumPS=ZERO;
for(auto const & child : Node->children()){
if (child->allAbove(mergePt())){
if((child)->pT()>mergePt()/3.)//TODO: this is a dynamical cutoff(see below)
sumPS+=child->calcPs(startscale*xiFacME);
else
sumPS+=child->calcDip(startscale*xiFacME);
}else{
assert(child->pT()>mergePt());
}
}
CrossSection me=TreedSigDR(startscale,Node);
if (Node->legsize()==6&&Debug::level > 2) {
Energy minPT=1000*GeV;
for(auto const & no :Node->children() )minPT=min(no->pT(),minPT);
cout<<"\nRBSR "<<minPT/GeV<< " " <<weight<<" "<<(me-sumPS)/nanobarn<<" "<<me/nanobarn<<" "<<sumPS/nanobarn;
}
//Here we subtract the PS (and below the dynamical cutoff the Dip)
return weight*as(startscale*xiRenSh)/SM().alphaS()*
(me-sumPS);
}
CrossSection Merger::MergingDSigDRRealBelowSubInt(NPtr Node){
if(Node->children().empty())return ZERO;
NPtr CLNode= Node->randomChild();
if(CLNode->pT()<mergePt()/3.)return ZERO;//TODO: this is a dynamical cutoff(see above)
if (!CLNode->children().empty()) {
auto inoutpair=getInOut(CLNode);
NPtr rndCh= CLNode->randomChild(); // Here we make sure that clustering and splitting are invertible
if(!matrixElementRegion(inoutpair.first,inoutpair.second, rndCh->pT(), theMergePt))return ZERO;
}
NPtr Born=CLNode-> getHistory(false,xiQSh);
if( Born!= CLNode){
if (UseRandom::rnd()<.5){
weight=-2.; projected=true; Node->nodeME()->projectorStage(2);}
else{
weight= 2.; projected=false; Node->nodeME()->projectorStage(1);}
}else{
weight=1.; projected=false; Node->nodeME()->projectorStage(1);
}
if (!CLNode->allAbove(mergePt()))return ZERO;
if (!Born->xcomb()->willPassCuts())return ZERO;
Energy startscale=CKKW_StartScale(Born);
fillHistory( startscale, Born, CLNode);
Node->runningPt(fillProjector());
weight*=history.back().weight*alphaReweight()*pdfReweight();
if(weight==0.)return ZERO;
pair<CrossSection,CrossSection> DipAndPs=
CLNode->calcDipandPS(startscale*xiFacME);
if (Node->legsize()==6&&Debug::level > 2) {
Energy minPT=1000*GeV;
for(auto const & no :Node->children() )minPT=min(no->pT(),minPT);
cout<<"\nRBSI "<<CLNode->pT()/GeV<<" "<<weight<<" "<<(DipAndPs.second-DipAndPs.first)/nanobarn<<" "<<DipAndPs.second/nanobarn<<" "<<DipAndPs.first/nanobarn;
}
//Here we add the PS and subtrac the Dip (only above the dynamical cutoff)
return weight*as(startscale*xiRenSh)/SM().alphaS()*
(double)Node->children().size()*(DipAndPs.second-DipAndPs.first);
}
CrossSection Merger::TreedSigDR(Energy startscale,NPtr Node,double diffAlpha){
NPtr DeepHead=Node;//->deepHead();
renormscale(startscale);
DeepHead->nodeME()->factory()->scaleChoice()->setXComb(DeepHead->xcomb());
DeepHead->nodeME()->setScale(sqr(startscale),sqr(startscale));
CrossSection res=DeepHead->nodeME()->dSigHatDRB();
if (diffAlpha!=1.) {
res+=DeepHead->nodeME()->dSigHatDRAlphaDiff(diffAlpha);
}
renormscale(0.0*GeV);
if(std::isnan(double(res/nanobarn))){cout<<"\nTreedSigDR is nan";res=ZERO;};
return res;
}
CrossSection Merger::LoopdSigDR(Energy startscale,NPtr Node){
// The deephead should be calculated here.
NPtr DeepHead=Node;//->deepHead();
renormscale(startscale);
DeepHead->nodeME()->setXComb(DeepHead->xcomb());
DeepHead->nodeME()->factory()->scaleChoice()->setXComb(DeepHead->xcomb());
DeepHead->nodeME()->setScale(sqr(startscale),sqr(startscale));
DeepHead->nodeME()->doOneLoopNoBorn();
CrossSection res=DeepHead->nodeME()->dSigHatDRV()+DeepHead->nodeME()->dSigHatDRI();
DeepHead->nodeME()->noOneLoopNoBorn();
renormscale(0.0*GeV);
return res;
}
Energy Merger::fillProjector(){
// in the shower handler the scale is multiplied by xiQSh
// so here we need to devide this
double xiQShfactor=history.begin()->node->legsize()==N0()?xiQSh:1.;
if(history.begin()->node->deepHead()->nodeME()->projectorStage() == 0){
return (history.size()==1?1.:(1./xiQShfactor))*history.back().scale;
}
for(auto const & hs : history)
if (projectorStage(hs.node)&&history.begin()->node->deepHead()->nodeME()->projectorStage() != 0){
history.begin()->node->deepHead()->xcomb()->lastProjector(hs.node->xcomb());
return (hs.node==history[0].node?1.:(1./xiQShfactor))*hs.scale;
}
throw Exception() << "Could not fill projector."<< Exception::abortnow;
return ZERO;
}
double Merger::pdfReweight(){
double res=1.;
double facfactor=(history[0].node->legsize()==N0()?xiFacME:xiFacSh);
for(int side : {0,1}){
if(history[0].node->xcomb()->mePartonData()[side]->coloured()){
for (auto const & hs : history){
//pdf-ratio only to the last step
if(!hs.node->parent())continue;
if (hs.node==history.back().node)continue;
if(!hs.node->dipole()){
cout<<"\nthis should not happen";
return 0.;
}
res *= pdfratio(hs.node, facfactor*hs.scale,xiFacSh*(hs.node->pT()), side);
facfactor=xiFacSh;
}
res*=pdfratio(history.back().node,facfactor*history.back().scale ,history[0].scale*xiFacME, side);
}
}
if (std::isnan(res))cout<<"\nWarning:pdfReweight is nan.";
return res;
}
double Merger::alphaReweight(){
double res=1.;
Energy Q_R=(history[0].node->legsize()==N0()?xiRenME:xiRenSh)*history[0].scale;
res *= pow(as(Q_R) / SM().alphaS(), history[0].node->nodeME()->orderInAlphaS());
res *= pow(SM().alphaEMME(history[0].node->nodeME()->factory()->scaleChoice()->renormalizationScaleQED())/ SM().alphaEMMZ(), history[0].node->nodeME()->orderInAlphaEW());
if (!(history[0].node->children().empty())){
res *=pow((theCMWScheme?(1.+((3.*(67./18.-1./6.*Constants::pi*Constants::pi)-5./9.*Nf(Q_R))*as(Q_R))/2./Constants::pi):1.),int(history[0].node->legsize()-N0()));
}
for (auto const & hs : history)
if (hs.node!=history.back().node){
Energy q_i=xiRenSh* hs.node->pT();
res *= as(q_i)/ SM().alphaS()
*(theCMWScheme?(1.+((3.*(67./18.-1./6.*Constants::pi*Constants::pi)-5./9.*Nf(q_i))*as(q_i))/2./Constants::pi):1.);
if (std::isnan(res))cout<<"\nWarning:alphaReweight is nan:q_i "<<q_i/GeV<<" "<<Nf(q_i);
}
if (std::isnan(res))cout<<"\nWarning:alphaReweight is nan.";
return res;
}
void Merger::fillHistory(Energy scale, NPtr Begin, NPtr EndNode){
history.clear();
double sudakov0_n=1.;
history.push_back(HistoryStep(Begin,sudakov0_n,scale));
double xiQShfactor=history.begin()->node->legsize()==N0()?xiQSh:1.;
scale*=xiQShfactor;
if (Begin->parent()||!isUnitarized) {
while (Begin->parent() && (Begin != EndNode)) {
if (!dosudakov(Begin,scale, Begin->pT(),sudakov0_n)){
history.push_back(HistoryStep(Begin->parent(),0.,scale));
}
scale=Begin->pT();
if (std::isnan(sudakov0_n))cout<<"\nWarning:sudakov0_n is nan.";
history.push_back(HistoryStep(Begin->parent(),sudakov0_n,Begin->pT()));
Begin = Begin->parent();
}
Energy notunirunning=scale;
if (!isUnitarized&&N()+N0() > int(Begin->deepHead()->legsize())) {
if (!dosudakov(Begin,notunirunning,mergePt(),sudakov0_n)){
history.back().weight=0.;
}else{
history.back().weight=sudakov0_n;
}
}
}
if( history.size()==1)scale/=xiQSh;
}
double Merger::sumpdfReweightUnlops(){
double res=0.;
Energy beam1Scale=history[0].scale*(history[0].node->legsize()==N0()?xiFacME:xiFacSh);
Energy beam2Scale=history[0].scale*(history[0].node->legsize()==N0()?xiFacME:xiFacSh);
for (auto const & hs : history){
//pdf expansion only to the last step
if(!hs.node->parent())continue;
if(hs.node->xcomb()->mePartonData()[0]->coloured()&&hs.node->nodeME()->lastX1()>0.99)return 0.;
if(hs.node->xcomb()->mePartonData()[1]->coloured()&&hs.node->nodeME()->lastX2()>0.99)return 0.;
if(hs.node->nodeME()->lastX1()<0.00001)return 0.;
if(hs.node->nodeME()->lastX2()<0.00001)return 0.;
if (hs.node->dipole()->bornEmitter() == 0 ){
res +=pdfUnlops(hs.node,0,
beam1Scale,
(hs.node->pT()),
hs.node->nodeME()->lastX1(),
Nf(history[0].scale),
history[0].scale);
beam1Scale=(hs.node->pT())*xiFacSh;
}
if (hs.node->dipole()->bornEmitter() == 1 ){
res +=pdfUnlops(hs.node,1,
beam2Scale,
(hs.node->pT()),
hs.node->nodeME()->lastX2(),
Nf(history[0].scale),
history[0].scale);
beam2Scale=(hs.node->pT())*xiFacSh;
}
if (hs.node->dipole()->bornSpectator() == 0 &&hs.node->dipole()->bornEmitter() >1){//
res +=pdfUnlops(hs.node,0,
beam1Scale,
(hs.node->pT()),
hs.node->nodeME()->lastX1(),
Nf(history[0].scale),
history[0].scale);
//pdfratio(hs.node, beam1Scale, sqrt(hs.node->pT()), 1);
beam1Scale=(hs.node->pT())*xiFacSh;
}
if (hs.node->dipole()->bornSpectator() == 1 &&hs.node->dipole()->bornEmitter() >1){//
res +=pdfUnlops(hs.node,1,
beam2Scale,
(hs.node->pT()),
hs.node->nodeME()->lastX2(),
Nf(history[0].scale),
history[0].scale);
//pdfratio(hs.node, beam2Scale , sqrt(hs.node->pT()), 2);
beam2Scale=(hs.node->pT())*xiFacSh;
}
}
if (history[0].node->deepHead()->xcomb()->mePartonData()[0]->coloured()){
res +=pdfUnlops(history.back().node,0,
beam1Scale,
history[0].scale*xiFacME,
(history.back()).node->nodeME()->lastX1(),
Nf(history[0].scale),
history[0].scale);
}
if (history[0].node->deepHead()->xcomb()->mePartonData()[1]->coloured()) {
res +=pdfUnlops(history.back().node,1,
beam2Scale,
history[0].scale*xiFacME,
(history.back()).node->nodeME()->lastX2(),
Nf(history[0].scale),
history[0].scale);
}
return res;
}
double Merger::pdfUnlops(NPtr node ,int side,Energy running, Energy next,double x,int nlp,Energy fixedScale) {
tcPDPtr particle,parton;
tcPDFPtr pdf;
if (side==0) {
particle = node->nodeME()->lastParticles().first->dataPtr();
parton=node->nodeME()->lastPartons().first->dataPtr();
pdf =node->xcomb()->partonBins().first->pdf();
}else{
assert(side==1);
particle = node->nodeME()->lastParticles().second->dataPtr();
parton=node->nodeME()->lastPartons().second->dataPtr();
pdf =node->xcomb()->partonBins().second->pdf();
}
//copied from PKOperator
double res=0.;
int number=10;//*int((max(running/next,next/running)));
for (int nr=0;nr<number;nr++){
double restmp=0;
using namespace RandomHelpers;
double r = UseRandom::rnd();
double eps = 1e-3;
pair<double,double> zw =
generate((piecewise(),
flat(0.0,x),
match(inverse(0.0,x,1.0) + inverse(1.0+eps,x,1.0))),r);
double z = zw.first;
double mapz = zw.second;
double PDFxparton=pdf->xfx(particle,parton,sqr(fixedScale),x)/x;
double CA = SM().Nc();
double CF = (SM().Nc()*SM().Nc()-1.0)/(2.*SM().Nc());
if (abs(parton->id()) < 7) {
double PDFxByzgluon=pdf->xfx(particle,getParticleData(ParticleID::g),sqr(fixedScale),x/z)*z/x;
double PDFxByzparton=pdf->xfx(particle,parton,sqr(fixedScale),x/z)*z/x;
assert(abs(parton->id()) < 7);
restmp += CF*(3./2.+2.*log(1.-x)) * PDFxparton;
if ( z > x ) {
restmp+= 0.5 * ( sqr(z) + sqr(1.-z) ) * PDFxByzgluon / z;
restmp += CF*2.*(PDFxByzparton - z*PDFxparton)/(z*(1.-z));
restmp -= CF*PDFxByzparton * (1.+z)/z;
}
}else{
assert(parton->id() == ParticleID::g);
double PDFxByzgluon=pdf->xfx(particle,getParticleData(ParticleID::g),sqr(fixedScale),x/z)*z/x;
if ( z > x ){
double factor = CF * ( 1. + sqr(1.-z) ) / sqr(z);
for ( int f = -nlp; f <= nlp; ++f ) {
if ( f == 0 )
continue;
restmp += pdf->xfx(particle,getParticleData(f),sqr(fixedScale),x/z)*z/x*factor;
}
}
restmp += ( (11./6.) * CA - (1./3.)*Nf(history[0].scale) + 2.*CA*log(1.-x) ) *PDFxparton;
if ( z > x ) {
restmp += 2. * CA * ( PDFxByzgluon - z*PDFxparton ) / (z*(1.-z));
restmp += 2.* CA *( (1.-z)/z - 1. + z*(1.-z) ) * PDFxByzgluon / z;
}
}
if (PDFxparton<1e-8)restmp= 0.;
res+=1*restmp*log(sqr(running/next))/PDFxparton*mapz;
}
return res/number;
}
double Merger::sumalphaReweightUnlops(){
double res=0.;
if (!(history[0].node->children().empty())){
res +=alphasUnlops(history[0].scale*xiRenSh,
history[0].scale*xiRenME)*int(history[0].node->legsize()-N0());
}
// dsig is calculated with fixed alpha_s
for (auto const & hs : history){
//expansion only to the last step
if(!hs.node->parent())continue;
res +=alphasUnlops(hs.node->pT()*xiRenSh ,history[0].scale);
}
return res;
}
double Merger::sumfillHistoryUnlops(){
double res=0.;
double xiQShfactor=history[0].node->legsize()==N0()?xiQSh:1.;
for (auto const & hs : history){
if(!hs.node->parent())continue;
doUNLOPS(hs.node,(hs.node == history[0].node?xiQShfactor:1.)*hs.scale , hs.node->pT() , history[0].scale, res);
}
return res;
}
-Ptr<MFactory>::ptr Merger::treefactory(){return theTreeFactory;}
+Ptr<MergingFactory>::ptr Merger::treefactory(){return theTreeFactory;}
void Merger::doinit(){
if (!DSH()->hardScaleIsMuF()) {
throw Exception()
<< "Merger: Merging is currently only sensible if we are using the hardScale as MuF."
<< Exception::abortnow;
}
}
CrossSection Merger::MergingDSigDR() {
history.clear();
if (theFirstNodeMap.find(theCurrentME)==theFirstNodeMap.end()) {
throw Exception()
<< "Merger: The current matrix element could not be found."
<< Exception::abortnow;
}
NPtr Node = theFirstNodeMap[theCurrentME];
xiRenME=theCurrentME->renormalizationScaleFactor();
xiFacME=theCurrentME->factorizationScaleFactor();
xiRenSh=DSH()->renormalizationScaleFactor();
xiFacSh=DSH()->factorizationScaleFactor();
xiQSh=DSH()->hardScaleFactor();
DSH()->setCurrentHandler();
DSH()->eventHandler(generator()->eventHandler());
CrossSection res=ZERO;
if(Node->deepHead()->subtractedReal()){
res=MergingDSigDRRealStandard(Node);
theCurrentMaxLegs=maxLegsNLO();
}else if(Node->deepHead()->virtualContribution()){
res=MergingDSigDRVirtualStandard(Node);
theCurrentMaxLegs=maxLegsNLO();
}else if(theGamma!=1.){
res=MergingDSigDRBornGamma(Node);
theCurrentMaxLegs=maxLegsLO();
}else{
res=MergingDSigDRBornStandard(Node);
theCurrentMaxLegs=maxLegsLO();
}
theCurrentME->lastXCombPtr()->lastCentralScale(sqr(Node->runningPt()));
theCurrentME->lastXCombPtr()->lastShowerScale(sqr(Node->runningPt()));
if(theCurrentME->lastXCombPtr()->lastProjector()){
theCurrentME->lastXCombPtr()->lastProjector()->lastCentralScale(sqr(Node->runningPt()));
theCurrentME->lastXCombPtr()->lastProjector()->lastShowerScale(sqr(Node->runningPt()));
}
renormscale(0.0*GeV);
if (res == ZERO){
history.clear();
return res;
}
cleanup(Node);
DSH()->eventRecord().clear();
theCurrentME->lastXCombPtr()->subProcess(SubProPtr());
history.clear();
if(std::isnan(double(res/nanobarn))|| !std::isfinite(double(res/nanobarn))){
cout<<"Warning merger weight is "<<res/nanobarn<<" -> setting to 0";
return ZERO;
}
return res;
}
void Merger::CKKW_PrepareSudakov(NPtr Born,Energy running){
//cleanup(Born);
tSubProPtr sub = Born->xcomb()->construct();
DSH()->resetPDFs(make_pair(Born->xcomb()->partonBins().first->pdf(),
Born->xcomb()->partonBins().second->pdf()),
Born->xcomb()->partonBins());
DSH()->setCurrentHandler();
DSH()->currentHandler()->generator()->currentEventHandler(Born->deepHead()->xcomb()->eventHandlerPtr());
DSH()->currentHandler()->remnantDecayer()->setHadronContent(Born->deepHead()->xcomb()->lastParticles());
DSH()->eventRecord().clear();
DSH()->eventRecord().slimprepare(sub, dynamic_ptr_cast<tStdXCombPtr>(Born->xcomb()), DSH()->pdfs(), Born->deepHead()->xcomb()->lastParticles());
DSH()->hardScales(sqr(running));
}
Energy Merger::CKKW_StartScale(NPtr Born){
Energy res=generator()->maximumCMEnergy();;
if(!Born->children().empty()){
for (int i=0;i<Born->legsize();i++){
if (!Born->nodeME()->mePartonData()[i]->coloured())continue;
for (int j=i+1;j<Born->legsize();j++){
if (i==j||!Born->nodeME()->mePartonData()[j]->coloured())continue;
res= min(res,sqrt(2.*Born->nodeME()->lastMEMomenta()[i]*Born->nodeME()->lastMEMomenta()[j]));
}
}
}else{
Born->nodeME()->factory()->scaleChoice()->setXComb(Born->xcomb());
res= sqrt(Born->nodeME()->factory()->scaleChoice()->renormalizationScale());
}
Born->nodeME()->factory()->scaleChoice()->setXComb(Born->xcomb());
res=max(res, sqrt(Born->nodeME()->factory()->scaleChoice()->renormalizationScale()));
return res;
}
double Merger::alphasUnlops( Energy next,Energy fixedScale) {
double betaZero = (11./6.)*SM().Nc() - (1./3.)*Nf(history[0].scale);
return (betaZero*log(sqr(fixedScale/next)))+
(theCMWScheme?(((3.*(67./18.-1./6.*Constants::pi*Constants::pi)-5./9.*Nf(history[0].scale)))):0.);
}
double Merger::pdfratio(NPtr Born,Energy nominator_scale, Energy denominator_scale,int side){
StdXCombPtr bXc = Born->xcomb();
if(!bXc->mePartonData()[side]->coloured())
throw Exception()
<< "Merger: pdf-ratio required for non-coloured particle."
<< Exception::abortnow;
double from,to;
if (side==0){
if (denominator_scale==nominator_scale) {
return 1.;
}
from=Born->nodeME()->pdf1(sqr(denominator_scale));
to =Born->nodeME()->pdf1(sqr( nominator_scale ));
if ( (to < 1e-8||from < 1e-8)&&(to/from>10000000.)){cout<<"\npdfratio to="<<to<<" from="<<from;return 0.;}
}
else{
if (denominator_scale==nominator_scale) {
return 1.;
}
from=Born->nodeME()->pdf2(sqr(denominator_scale));
to=Born->nodeME()->pdf2( sqr( nominator_scale ));
if ( (to < 1e-8||from < 1e-8)&&(to/from>10000000.)){cout<<"\npdfratio to="<<to<<" from="<<from;return 0.;}
}
return to/from;
}
bool Merger::dosudakov(NPtr Born,Energy running, Energy next, double& sudakov0_n) {
CKKW_PrepareSudakov(Born, running);
for(DipoleChain const & chain : DSH()->eventRecord().chains()){
for(Dipole const & dip : chain.dipoles()){
sudakov0_n*=singlesudakov( dip, next,running,make_pair(true,false) );
sudakov0_n*=singlesudakov( dip, next,running,make_pair(false,true) );
if (sudakov0_n==0.0){
cleanup(Born);
return false;
}
}
}
cleanup(Born);
return true;
}
bool Merger::doUNLOPS(NPtr Born,Energy running, Energy next,Energy fixedScale, double& UNLOPS) {
CKKW_PrepareSudakov(Born, running);
for(DipoleChain const & chain : DSH()->eventRecord().chains()){
for(Dipole const & dip : chain.dipoles()){
UNLOPS+=singleUNLOPS( dip, next,running,fixedScale,make_pair(true,false) );;
UNLOPS+=singleUNLOPS( dip, next,running,fixedScale,make_pair(false,true) );
}
}
cleanup(Born);
return true;
}
bool Merger::projectorStage(NPtr Born){
return (Born->deepHead()->nodeME()->projectorStage() ==
int((Born->deepHead()->legsize()
- Born->legsize())));
}
void Merger::cleanup(NPtr Born) {
DSH()->eventRecord().clear();
if(!Born->xcomb()->subProcess())return;
ParticleVector vecfirst = Born->xcomb()->subProcess()->incoming().first->children();
for(auto const & particle : vecfirst)
Born->xcomb()->subProcess()->incoming().first->abandonChild(particle);
ParticleVector vecsecond = Born->xcomb()->subProcess()->incoming().second->children();
for(auto const & particle : vecsecond)
Born->xcomb()->subProcess()->incoming().second->abandonChild(particle);
Born->xcomb()->subProcess(SubProPtr());
}
double Merger::singlesudakov(Dipole dip ,Energy next,Energy running,pair<bool,bool> conf ){
double res=1.;
tPPtr emitter = dip.emitter(conf);
tPPtr spectator = dip.spectator(conf);
DipoleSplittingInfo candidate(dip.index(conf),conf,
dip.emitterX(conf),
dip.spectatorX(conf),
emitter,spectator);
if ( DSH()->generators().find(candidate.index()) == DSH()->generators().end() ) DSH()->getGenerators(candidate.index());
auto const & gens = DSH()->generators().equal_range(candidate.index());
for ( auto gen = gens.first; gen != gens.second; ++gen ) {
if ( !(gen->first == candidate.index()) )
continue;
Energy dScale = gen->second->splittingKinematics()->dipoleScale(emitter->momentum(),spectator->momentum());
candidate.scale(dScale);
candidate.continuesEvolving();
Energy ptMax=gen->second->splittingKinematics()->ptMax(candidate.scale(),candidate.emitterX(), candidate.spectatorX(),
candidate.index(),*gen->second->splittingKernel());
candidate.hardPt(min(running,ptMax));
if (candidate.hardPt()>next){
res*=gen->second->sudakov(candidate,next);
}
}
return res;
}
double Merger::singleUNLOPS(Dipole dip ,Energy next,Energy running,Energy fixedScale,pair<bool,bool> conf ){
double res=0.;
tPPtr emitter = dip.emitter(conf);
tPPtr spectator = dip.spectator(conf);
DipoleSplittingInfo candidate(dip.index(conf),conf,dip.emitterX(conf),dip.spectatorX(conf),emitter,spectator);
if ( DSH()->generators().find(candidate.index()) == DSH()->generators().end() ) DSH()->getGenerators(candidate.index());
auto const & gens = DSH()->generators().equal_range(candidate.index());
for ( auto gen = gens.first; gen != gens.second; ++gen ) {
if ( !(gen->first == candidate.index()) )
continue;
Energy dScale = gen->second->splittingKinematics()->dipoleScale(emitter->momentum(),spectator->momentum());
candidate.scale(dScale);
candidate.continuesEvolving();
Energy ptMax=gen->second->splittingKinematics()->ptMax(candidate.scale(),candidate.emitterX(), candidate.spectatorX(),
candidate.index(),*gen->second->splittingKernel());
candidate.hardPt(min(running,ptMax));
if (candidate.hardPt()>next){
res+=gen->second->unlops(candidate,next,fixedScale);
}
}
return res;
}
void Merger::firstNodeMap(Ptr<MatchboxMEBase>::ptr a,NPtr b){theFirstNodeMap.insert(make_pair(a,b));}
map<Ptr<MatchboxMEBase>::ptr,NPtr> Merger::firstNodeMap(){return theFirstNodeMap;}
void Merger::setXComb(Ptr<MatchboxMEBase>::ptr me,tStdXCombPtr xc,int st){
theFirstNodeMap[me]->setXComb(xc, st);
}
void Merger::setKinematics(Ptr<MatchboxMEBase>::ptr me){
theFirstNodeMap[me]->setKinematics();
}
void Merger::clearKinematics(Ptr<MatchboxMEBase>::ptr me){
theFirstNodeMap[me]->clearKinematics();
}
bool Merger::generateKinematics(Ptr<MatchboxMEBase>::ptr me,const double * r){
theFirstNodeMap[me]->firstgenerateKinematics(r, 0);
if (theFirstNodeMap[me]->cutStage()==0 ){
bool inAlphaPS=false;
NPtrVec children=theFirstNodeMap[me]->children();
for (Ptr<Node>::ptr const & child: children) {
treefactory()->setAlphaParameter(theGamma);
inAlphaPS|=theGamma!=1.?child->dipole()->aboveAlpha():false;
treefactory()->setAlphaParameter(1.);
}
SafeClusterMap temp=theFirstNodeMap[me]->clusterSafe();
for (auto const & cs: temp) {
if (!cs.second.first&&!inAlphaPS)return false;
}
}
if (theFirstNodeMap[me]->cutStage()==1 ){
SafeClusterMap temp=theFirstNodeMap[me]->clusterSafe();
for (auto const & sc: temp) {
if (!sc.second.first && !sc.second.second)return false;
}
}
return true;
}
void Merger::fillProjectors(Ptr<MatchboxMEBase>::ptr me){
for (auto const & propair: theFirstNodeMap[me]->Projector()) {
me->lastXCombPtr()->projectors().insert(propair.first,
propair.second->xcomb());
}
}
pair<bool,bool> Merger::clusterSafe(Ptr<MatchboxMEBase>::ptr me,int emit,int emis,int spec){
return theFirstNodeMap[me]->clusterSafe().find(make_pair(make_pair(emit,emis),spec))->second;
}
bool Merger::matrixElementRegion(PVector incoming,PVector outgoing,Energy winnerScale,Energy cutscale){
//cout<<"\nparticles s"<<particles.size()<<" "<<particles[0]<<" "<<particles[1]<<flush;
/*
if (defMERegionByJetAlg && !particles[0]->coloured()&& !particles[1]->coloured()) {
assert(false);
vector<fastjet::PseudoJet> input_particles;
for(size_t em=2; em < particles.size();em++){
input_particles.push_back(fastjet::PseudoJet(em->momentum().x()/GeV,
em->momentum().y()/GeV,
em->momentum().z()/GeV,
em->momentum().e()/GeV));
}
fastjet::JetDefinition jet_def(fastjet::ee_kt_algorithm);
fastjet::ClusterSequence clust_seq(input_particles, jet_def);
size_t n = particles.size()-2;
vector<fastjet::PseudoJet> exclusive_jets = clust_seq.exclusive_jets_ycut(ee_ycut);
return n==exclusive_jets.size();
}
if (defMERegionByJetAlg ) {
assert(false);
size_t noncol=0;
vector<fastjet::PseudoJet> input_particles;
for(size_t em=2; em < particles.size();em++){
if (em->coloured())
input_particles.push_back(fastjet::PseudoJet(em->momentum().x()/GeV,
em->momentum().y()/GeV,
em->momentum().z()/GeV,
em->momentum().e()/GeV));
else
noncol++;
}
double Rparam = 1.0;
fastjet::Strategy strategy = fastjet::Best;
fastjet::RecombinationScheme recomb_scheme = fastjet::E_scheme;
fastjet::JetDefinition jet_def(fastjet::kt_algorithm, Rparam, recomb_scheme, strategy);
fastjet::ClusterSequence clust_seq(input_particles, jet_def);
size_t n = particles.size()-2-noncol;
vector<fastjet::PseudoJet> exclusive_jets = clust_seq.exclusive_jets(pp_dcut);
// cout<<"\nn= "<<n<<" jets= "<<exclusive_jets.size();
//for (size_t i=0; i<exclusive_jets.size(); i++) {
//cout<<"\nn= "<<n<<" jetspt= "<<exclusive_jets[i].perp();
//}
return n==exclusive_jets.size();
}
*/
Energy ptx=1000000.*GeV;
bool foundwinnerpt=false;
using namespace boost;
//FF
for(auto const & em : outgoing){ if (! em->coloured()) continue;
for(auto const & emm : outgoing){ if (!emm->coloured()) continue; if (em==emm) continue;
for(auto const & spe : outgoing){ if (!spe->coloured()) continue; if (em==spe||emm==spe) continue;
if (!(em->id()==-emm->id()||emm->id()>6))continue;
Lorentz5Momentum emittermom = em->momentum();
Lorentz5Momentum emissionmom = emm->momentum();
Lorentz5Momentum spectatormom = spe->momentum();
Energy pt=0*GeV;
if (emittermom.m()<=0.001*GeV&&emissionmom.m()<=0.001*GeV&&spectatormom.m()<=0.001*GeV) {
pt=FFLTK->lastPt(emittermom,emissionmom,spectatormom);
}else{
pt=FFMTK->lastPt(emittermom,emissionmom,spectatormom);
}
if (abs(pt-winnerScale)<0.001*GeV) {
foundwinnerpt=true;
}
ptx =min(ptx,pt);
}
}
}
//FI
for(auto const & spe : incoming){ if (! spe->coloured()) continue;
for(auto const & emm : outgoing){ if (! emm->coloured()) continue;
for(auto const & em : outgoing){ if (! em->coloured()) continue; if (em==emm) continue;
if (!(em->id()==-emm->id()||emm->id()>6))continue;
Lorentz5Momentum emittermom = em->momentum();
Lorentz5Momentum emissionmom = emm->momentum();
Lorentz5Momentum spectatormom = spe->momentum();
Energy pt=0*GeV;
if (emittermom.m()<=0.001*GeV&&emissionmom.m()<=0.001*GeV&&spectatormom.m()<=0.001*GeV) {
pt=FILTK->lastPt(emittermom,emissionmom,spectatormom);
}else{
pt=FIMTK->lastPt(emittermom,emissionmom,spectatormom);
}
if (abs(pt-winnerScale)<0.001*GeV) {
foundwinnerpt=true;
}
if(pt>0.*GeV)
ptx =min(ptx,pt);
}
}
}
//IF
for(auto const & em : incoming){ if (! em->coloured()) continue;
for(auto const & emm : outgoing){ if (! emm->coloured()) continue;
for(auto const & spe : outgoing){ if (! spe->coloured()) continue; if (emm==spe) continue;
if (!(em->id()>6|| em->id()==emm->id() ||emm->id()>6))continue;
Lorentz5Momentum emittermom = em->momentum();
Lorentz5Momentum emissionmom = emm->momentum();
Lorentz5Momentum spectatormom = spe->momentum();
Energy pt=0*GeV;
if (emittermom.m()<=0.001*GeV&&emissionmom.m()<=0.001*GeV&&spectatormom.m()<=0.001*GeV) {
pt=IFLTK->lastPt(emittermom,emissionmom,spectatormom);
}else{
pt=IFMTK->lastPt(emittermom,emissionmom,spectatormom);
}
if (abs(pt-winnerScale)<0.01*GeV) {
foundwinnerpt=true;
}
ptx =min(ptx,pt);
}
}
}
//II
for(auto const & em : incoming){ if (! em->coloured()) continue;
for(auto const & spe : incoming){ if (! spe->coloured()) continue; if (em==spe) continue;
for(auto const & emm : outgoing){ if (! emm->coloured()) continue;
if (!(em->id()>6||em->id()==emm->id() ||emm->id()>6))continue;
Lorentz5Momentum emittermom = em->momentum();
Lorentz5Momentum emissionmom = emm->momentum();
Lorentz5Momentum spectatormom = spe->momentum();
Energy pt=IILTK->lastPt(emittermom,emissionmom,spectatormom);
if (abs(pt-winnerScale)<0.01*GeV) {
foundwinnerpt=true;
}
ptx =min(ptx, pt);
}
}
}
if(!foundwinnerpt){
cout<<"\nWarning: could not find winner with pt: "<<winnerScale/GeV;
for(auto const & emm : incoming){
cout<<"\n"<<emm->id()<<" "<<emm->momentum()/GeV<<" "<<emm->momentum().m()/GeV<<flush;
}
for(auto const & emm : outgoing){
cout<<"\n"<<emm->id()<<" "<<emm->momentum()/GeV<<" "<<emm->momentum().m()/GeV<<flush;
}
}
return (ptx>cutscale) ;
}
int Merger::M()const{return theTreeFactory->M();}
int Merger::N()const{return theTreeFactory->N();}
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void Merger::persistentOutput(PersistentOStream & os) const {
os << Unlopsweights<<
theCMWScheme<< projected<<
isUnitarized<< isNLOUnitarized<<
defMERegionByJetAlg<<theOpenInitialStateZ<<
theChooseHistory<<
theN0<< theOnlyN<<
xiRenME<< xiFacME<<
xiRenSh<< xiFacSh<<
xiQSh<< weight<<weightCB<<theGamma<<ee_ycut<<pp_dcut<<theSmearing<<ounit(therenormscale, GeV)<<ounit(theIRSafePT, GeV)<<ounit(theMergePt, GeV)<<ounit(theCentralMergePt, GeV)<<theMergingJetFinder
<<theLargeNBasis
<< FFLTK
<< FILTK
<< IFLTK
<< IILTK
<< FFMTK
<< FIMTK
<< IFMTK
<<theDipoleShowerHandler<< theTreeFactory<<theFirstNodeMap ;
}
void Merger::persistentInput(PersistentIStream & is, int) {
is >> Unlopsweights>>
theCMWScheme>> projected>>
isUnitarized>> isNLOUnitarized>>
defMERegionByJetAlg>>theOpenInitialStateZ>>
theChooseHistory>>
theN0>> theOnlyN>>
xiRenME>> xiFacME>>
xiRenSh>> xiFacSh>>
xiQSh>>
weight>>weightCB>>theGamma>>ee_ycut>>pp_dcut>>theSmearing>>iunit(therenormscale, GeV)>>iunit(theIRSafePT, GeV)>>iunit(theMergePt, GeV)>>iunit(theCentralMergePt, GeV)>>theMergingJetFinder>>theLargeNBasis>>
FFLTK
>> FILTK
>> IFLTK
>> IILTK
>> FFMTK
>> FIMTK
>> IFMTK>>
theDipoleShowerHandler>> theTreeFactory>>theFirstNodeMap ;
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<Merger, Herwig::MergerBase>
describeHerwigMerger("Herwig::Merger", "HwDipoleShower.so");
//ClassDescription<Merger> Merger::initMerger;
// Definition of the static class description member.
void Merger::Init() {
static ClassDocumentation<Merger> documentation
("Merger.");
static Reference<Merger,DipoleShowerHandler> interfaceShowerHandler
("DipoleShowerHandler",
"",
&Merger::theDipoleShowerHandler, false, false, true, true, false);
static Switch<Merger,bool>
interfaceUnlopsweights ("Unlopsweights","",&Merger::Unlopsweights, false, false, false);
static SwitchOption interfaceUnlopsweightsYes
(interfaceUnlopsweights,"Yes","",true);
static SwitchOption interfaceUnlopsweightsNo
(interfaceUnlopsweights,"No","",false);
static Switch<Merger,bool>
interfacetheCMWScheme ("CMWScheme","",&Merger::theCMWScheme, false, false, false);
static SwitchOption interfacetheCMWSchemeYes
(interfacetheCMWScheme,"Yes","",true);
static SwitchOption interfacetheCMWSchemeNo
(interfacetheCMWScheme,"No","",false);
static Parameter<Merger,Energy> interfaceMergerScale
("MergingScale",
"The MergingScale.",
&Merger::theCentralMergePt, GeV, 20.0*GeV, 0.0*GeV, 0*GeV,
false, false, Interface::lowerlim);
- static Reference<Merger,MFactory> interfaceMergerHelper
- ("MFactory",
+ static Reference<Merger,MergingFactory> interfaceMergerHelper
+ ("MergingFactory",
"",
&Merger::theTreeFactory, false, false, true, true, false);
static Parameter<Merger,double> interfacedcut
("pp_dcut",
"The MergingScale.",
&Merger::pp_dcut, 5.0, 0.0, 0,
false, false, Interface::lowerlim);
static Parameter<Merger,double> interfaceycut
("ee_ycut",
"The MergingScale.",
&Merger::ee_ycut, 0.2, 0.0, 0,
false, false, Interface::lowerlim);
static Parameter<Merger,double> interfacegamma
("gamma",
"gamma parameter.",
&Merger::theGamma, 1.0, 0.0, 0,
false, false, Interface::lowerlim);
static Reference<Merger,JetFinder> interfaceMergingJetFinder
("MergingJetFinder",
"A reference to the jet finder used in Merging.",
&Merger::theMergingJetFinder, false, false, true, false, false);
static Reference<Merger,ColourBasis> interfaceLargeNBasis
("LargeNBasis",
"Set the large-N colour basis implementation.",
&Merger::theLargeNBasis, false, false, true, true, false);
static Switch<Merger,bool>
interfacedefMERegionByJetAlg
("MERegionByJetAlg","",&Merger::defMERegionByJetAlg, false, false, false);
static SwitchOption interfacedefMERegionByJetAlgYes
(interfacedefMERegionByJetAlg,"Yes","",true);
static SwitchOption interfacedefMERegionByJetAlgNo
(interfacedefMERegionByJetAlg,"No","",false);
static Switch<Merger,bool>
interfaceOpenInitialSateZ
("OpenInitialStateZ","",&Merger::theOpenInitialStateZ, false, false, false);
static SwitchOption interfaceOpenInitialSateZYes
(interfaceOpenInitialSateZ,"Yes","",true);
static SwitchOption interfaceOpenInitialSateZNo
(interfaceOpenInitialSateZ,"No","",false);
static Parameter<Merger, Energy>
interfaceIRSafePT
("IRSafePT", "Set the pt for which a matrixelement should be treated as IR-safe.",
&Merger::theIRSafePT,
GeV, 0.0 * GeV, ZERO, Constants::MaxEnergy, true, false, Interface::limited);
interfaceIRSafePT.setHasDefault(false);
static Parameter<Merger, double> interfacemergePtsmearing("MergingScaleSmearing", "Set the percentage the merging pt should be smeared.",
&Merger::theSmearing, 0., 0.,
0.0, 0.5, true, false, Interface::limited);
static Parameter<Merger, int> interfacechooseHistory("chooseHistory", "different ways of choosing the history", &Merger::theChooseHistory, 3, -1, 0,
false, false, Interface::lowerlim);
}
diff --git a/Shower/Dipole/Merging/Merger.h b/Shower/Dipole/Merging/Merger.h
--- a/Shower/Dipole/Merging/Merger.h
+++ b/Shower/Dipole/Merging/Merger.h
@@ -1,407 +1,407 @@
// -*- C++ -*-
//
// Merger.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2007 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_Merger_H
#define HERWIG_Merger_H
//
// This is the declaration of the Merger class.
//
-#include "MFactory.fh"
+#include "MergingFactory.fh"
#include "Node.fh"
#include "ThePEG/Handlers/HandlerBase.h"
#include "Herwig/Shower/Dipole/DipoleShowerHandler.h"
//#include "Herwig/Shower/Dipole/Base/DipoleSplittingGenerator.h"
#include "Herwig/MatrixElement/Matchbox/Base/MergerBase.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/FFLightTildeKinematics.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/IFLightTildeKinematics.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/FFMassiveTildeKinematics.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/IFMassiveTildeKinematics.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/FILightTildeKinematics.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/IILightTildeKinematics.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/FIMassiveTildeKinematics.h"
#include "ThePEG/Cuts/JetFinder.h"
#include "ThePEG/Cuts/Cuts.h"
namespace Herwig {
using namespace ThePEG;
typedef Ptr<Node>::ptr NPtr;
typedef vector<Ptr<Node>::ptr> NPtrVec;
//definition of a history step
struct HistoryStep {
HistoryStep(){}
HistoryStep(NPtr cn,double w ,Energy sc){
node=cn;
weight=w;
scale=sc;
}
// the cluster node defining this step
// containing the full information
NPtr node;
// current sudakov weight of the history
double weight;
// current scale of the history
Energy scale;
};
typedef vector< HistoryStep > History;
typedef multimap<DipoleIndex,Ptr<DipoleSplittingGenerator>::ptr> GeneratorMap2;
/**
* \ingroup DipoleShower
* \author Johannes Bellm
*
* \brief Merger handles the Merger ....... //TODO .
*
* @see \ref MergerInterfaces "The interfaces"
* defined for Merger.
*/
class Merger: public MergerBase {
- friend class MFactory;
+ friend class MergingFactory;
friend class Node;
friend class MScale;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
Merger();
/**
* The destructor.
*/
virtual ~Merger();
//@}
public:
//define the ME region for a particle vector.
bool matrixElementRegion(PVector incoming,PVector outgoing,
Energy winnerScale=ZERO,
Energy cutscale=ZERO);
// return the current merging scale,
// gets smeared around the central merging scale in generate kinematics.
Energy mergingScale()const{return theMergePt;}
// return the current merging pt (should be unified with mergingScale)
Energy mergePt()const {return theMergePt;}
// legsize of highest process with NLO corrections
int M()const;
// legsize of the highest LO merged process
int N()const;
// legsize of the production process
int N0()const{return theN0;}
// cross section of as given by the merging
CrossSection MergingDSigDR() ;
// ***** virtual functions of the base class ****///
// set the current xcomb, called from ME
void setXComb(Ptr<MatchboxMEBase>::ptr,tStdXCombPtr,int);
// set kinematics, called from ME
void setKinematics(Ptr<MatchboxMEBase>::ptr);
// clear kinematics, called from ME
void clearKinematics(Ptr<MatchboxMEBase>::ptr);
// generate kinematics, called from ME
bool generateKinematics(Ptr<MatchboxMEBase>::ptr,const double *);
// fill the projector the subprocess is build from
void fillProjectors(Ptr<MatchboxMEBase>::ptr);
// return true true if a given ME phase space point is TODO
pair<bool,bool> clusterSafe(Ptr<MatchboxMEBase>::ptr,int,int,int);
// return the current maximum legs, the shower should veto
size_t maxLegs() const {return theCurrentMaxLegs;}
// set the current ME
void setME(Ptr<MatchboxMEBase>::ptr me){theCurrentME=me;}
protected:
// the merging factory needs to set the legsize of the production process
void N0(int n){ theN0=n;}
// return the large-N basis (TODO: implement check if born ME works with the choice)
Ptr<ColourBasis>::ptr largeNBasis(){return theLargeNBasis;}
// smeare the merging pt
void smeareMergePt(){theMergePt=centralMergePt()*(1.+0.*(-1.+2.*UseRandom::rnd())*smear());}
// true if the phase space for initial emissions should not be restricted in z.
bool openInitialStateZ(){return theOpenInitialStateZ;}
// set the current renormalisation scale
Energy renormscale() { return therenormscale;}
private:
// calculate a single sudakov step for a given dipole
double singlesudakov(Dipole,Energy,Energy,pair<bool,bool>);
// calculate the sudakov supression for a clusternode between
// the current running scale and next scale
bool dosudakov(NPtr Born,Energy running, Energy next, double& sudakov0_n);
// cleanup
void cleanup(NPtr);
// return true if the cluster node has the matching number of
// legs to the current projector stage
bool projectorStage(NPtr);
// calculate the staring scale:
// if Node is part of the production process, calculate according to the
// scale choice object in the merging scale objekt, else
// return max(scale as scalechoice , min(Mass(i,j)))
Energy CKKW_StartScale(NPtr);
// prepare the sudakov calculation
void CKKW_PrepareSudakov(NPtr,Energy);
// number of active flavours as given by the shower
double Nf(Energy scale)const{return DSH()->Nf(scale);}
// pointer to the factory
- Ptr<MFactory>::ptr treefactory();
+ Ptr<MergingFactory>::ptr treefactory();
// map from ME to first clusternode
map<Ptr<MatchboxMEBase>::ptr,NPtr> firstNodeMap();
// set the current merging pt, smeared in generate kinematics
void mergePt(Energy x) {theMergePt = x;}
// return the central merging pt
Energy centralMergePt() {return theCentralMergePt;}
private:
// calculate the history weighted born cross section
CrossSection MergingDSigDRBornStandard(NPtr Node);
// calculate the history weighted born cross section
// add the difference of IPK with and without alpha parameter
// subtract the dipoles above the alpha parameter
CrossSection MergingDSigDRBornGamma(NPtr Node);
// calculate the history weighted virtual contribution
CrossSection MergingDSigDRVirtualStandard(NPtr Node);
// calculate the history weighted real contribution
// splitted into 3 differnt contibutions
CrossSection MergingDSigDRRealStandard(NPtr Node);
// calculate the history weighted real contribution
// all dipoles above:
// N*(R rnd(i)-Dip_i) history_i U(\phi^n_i)
CrossSection MergingDSigDRRealAllAbove(NPtr Node);
// calculate the history weighted real contribution
// not all dipoles above:
// (R - sum PS_i) history_rnd U(\phi^n+1)
CrossSection MergingDSigDRRealBelowSubReal(NPtr Node);
// calculate the history weighted real contribution
// not all dipoles above:
// rnd(i)-> N*(PS_i - Dip_i) history_i U(\phi^n_i)
CrossSection MergingDSigDRRealBelowSubInt(NPtr Node);
// max legssize the shower should veto for LO
size_t maxLegsLO() const {return N0()+N();}
// Calculate the LO partonic cross section.
// if diffalpha != 1, add the difference of IPK(1)-IPK(diffalpha)
CrossSection TreedSigDR(Energy startscale,NPtr,double diffalpha=1.);
// fill the projecting xcomb
Energy fillProjector();
// fill the history, including calculation of sudakov supression
void fillHistory(Energy, NPtr, NPtr );
// calculate the pdf ratio for the given clusternode
double pdfratio(NPtr,Energy,Energy,int);
// return the pdf-ratio reweight for the history
double pdfReweight();
// return the alpha_s reweight for the history
double alphaReweight();
// max legssize the shower should veto for NLO
size_t maxLegsNLO()const {return N0()+M();}
// calculate the virtual contribution.
CrossSection LoopdSigDR(Energy startscale,NPtr);
// calculate alpha_s expansion of the pdf-ratios
double sumpdfReweightUnlops();
// calculate alpha_s expansion of the alpha_s-ratios, including K_g
double sumalphaReweightUnlops();
// calculate alpha_s expansion of the sudakov exponents
double sumfillHistoryUnlops();
// calculate alpha_s expansion of the single step alpha_s-ratio, including K_g
double alphasUnlops( Energy next,Energy fixedScale);
// calculate alpha_s expansion of the single step pdf-ratio
double pdfUnlops(NPtr,int,Energy,Energy,double,int,Energy);
// calculate alpha_s expansion of the single step sudakov exponent
bool doUNLOPS(NPtr Born,Energy running, Energy next,Energy fixedScale, double& UNLOPS);
// calculate alpha_s expansion of the single dipole sudakov exponent
double singleUNLOPS(Dipole,Energy,Energy,Energy,pair<bool,bool>);
//alpha_s as given in the shower
double as(Energy q){return DSH()->as(q);}
//return the dipole shower handler
Ptr<DipoleShowerHandler>::ptr DSH(){return theDipoleShowerHandler;}
//return the const dipole shower handler
Ptr<DipoleShowerHandler>::ptr DSH()const{return theDipoleShowerHandler;}
// set the current renormalisation scale
void renormscale(Energy x) { therenormscale = x;}
// insert map from ME to first clusternode
void firstNodeMap(Ptr<MatchboxMEBase>::ptr,NPtr);
// the gamma parameter to subtract dipoles above a alpha parameter
// and subtract the corresponding IPK operator
double gamma()const{return theGamma;}
// history choice: weighted history choice
int chooseHistory()const {return theChooseHistory;}
// the smearing factor for the merging scale
double smear()const{return theSmearing;}
// flag to tell if ME region shoulcd be defined by jet algorithm
// currently not implemented
bool MERegionByJetAlg(){return defMERegionByJetAlg;}
// return the large-N colour basis
void largeNBasis(Ptr<ColourBasis>::ptr x){theLargeNBasis=x;}
private:
// calculate the history expansion
bool Unlopsweights;
// use CMW scheme
bool theCMWScheme;
// true if current point should be projected
bool projected;
// true if LO cross sections should be unitarised
bool isUnitarized;
// true if NLO contributions should be unitarised
bool isNLOUnitarized;
// define ME region by jet algorithm
bool defMERegionByJetAlg;
// no z-restricions on initial state emissions in clustering
bool theOpenInitialStateZ;
// history weight choice
int theChooseHistory;
// legsize of production process
int theN0;
// calculate only the N particle contribution
int theOnlyN;
// the current maxlegs (either LO or NLO maxlegs)
size_t theCurrentMaxLegs;
// renormalisation scale factor of the ME
double xiRenME;
// factorisation scale factor of the ME
double xiFacME;
// renormalisation scale factor of the PS
double xiRenSh;
// factorisation scale factor of the PS
double xiFacSh;
// starting scale factor of the PS
double xiQSh;
// current weight and weight of clustered born
double weight,weightCB;
// subtract the dipole contribution above a given gamma
double theGamma;
// if ME region defined by jet algorithm, this is the y cut for ee
double ee_ycut;
// if ME region defined by jet algorithm, this is the d cut for pp
double pp_dcut;
// smearing factor for merging scale
double theSmearing;
// current renomalistion scale
Energy therenormscale;
// cutoff for real emission contribution
Energy theIRSafePT;
// current merging scale
Energy theMergePt;
// central merging scale
Energy theCentralMergePt;
// current cluster histoy including sudakov weights
History history;
// if ME region defined by jet algorithm, this is the jetfinder
Ptr<JetFinder>::ptr theMergingJetFinder;
// pointer to the large-N basis
Ptr<ColourBasis>::ptr theLargeNBasis;
// current ME
Ptr<MatchboxMEBase>::ptr theCurrentME;
// Tilde kinematics pointers, only to use lastPt(emitter,emission,spectator)
Ptr<FFLightTildeKinematics>::ptr FFLTK;
Ptr<FILightTildeKinematics>::ptr FILTK;
Ptr<IFLightTildeKinematics>::ptr IFLTK;
Ptr<IILightTildeKinematics>::ptr IILTK;
Ptr<FFMassiveTildeKinematics>::ptr FFMTK;
Ptr<FIMassiveTildeKinematics>::ptr FIMTK;
Ptr<IFMassiveTildeKinematics>::ptr IFMTK;
//pointer to the shower handler
Ptr<DipoleShowerHandler>::ptr theDipoleShowerHandler;
- // pointer to the MFactory
- Ptr<MFactory>::ptr theTreeFactory;
+ // pointer to the MergingFactory
+ Ptr<MergingFactory>::ptr theTreeFactory;
// map from ME to first Node
map<Ptr<MatchboxMEBase>::ptr,NPtr> theFirstNodeMap;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
Merger & operator=(const Merger &);
};
}
#endif /* HERWIG_Merger_H */
diff --git a/Shower/Dipole/Merging/MFactory.cc b/Shower/Dipole/Merging/MergingFactory.cc
rename from Shower/Dipole/Merging/MFactory.cc
rename to Shower/Dipole/Merging/MergingFactory.cc
--- a/Shower/Dipole/Merging/MFactory.cc
+++ b/Shower/Dipole/Merging/MergingFactory.cc
@@ -1,671 +1,671 @@
// -*- C++ -*-
//
// MergeboxFactory.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2012 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the MergeboxFactory class.
//
-#include "MFactory.h"
+#include "MergingFactory.h"
#include "Node.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/RefVector.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Command.h"
#include "ThePEG/Utilities/StringUtils.h"
#include "ThePEG/Repository/Repository.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/MatrixElement/Matchbox/Utility/DiagramDrawer.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "ThePEG/MatrixElement/MEBase.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/MatrixElement/Matchbox/Base/DipoleRepository.h"
#include "Herwig/MatrixElement/Matchbox/Utility/SU2Helper.h"
#include "ThePEG/Cuts/JetFinder.h"
#include "fastjet/ClusterSequence.hh"
#include <boost/progress.hpp>
#include <iterator>
using std::ostream_iterator;
using namespace Herwig;
using std::ostream_iterator;
-MFactory::MFactory() :MatchboxFactory(),
+MergingFactory::MergingFactory() :MatchboxFactory(),
theonlyNLOParts(false),
theonlyvirtualNLOParts(false),
theonlyrealNLOParts(false),
theonlyUnlopsweights(false),
theunitarizeNLOParts(true),
calc_born(true),
calc_virtual(true),
calc_real(true),
unitarized(true),
NLOunitarized(true),
ransetup(false),
theonlymulti(-1),
theonlysub(-1),
divideSub(-1),
divideSubNumber(-1)
{}
-MFactory::~MFactory(){}
+MergingFactory::~MergingFactory(){}
-IBPtr MFactory::clone() const {
+IBPtr MergingFactory::clone() const {
return new_ptr(*this);
}
-IBPtr MFactory::fullclone() const {
+IBPtr MergingFactory::fullclone() const {
return new_ptr(*this);
}
-void MFactory::fill_amplitudes() {
+void MergingFactory::fill_amplitudes() {
olpProcesses().clear();
processMap[0] = getProcesses()[0];
if(MH()->M()>=0) setHighestVirt(processMap[0].size()+MH()->M());
MH()->N0(processMap[0].size());
for ( int i = 1 ; i <= MH()->N() ; ++i ) {
processMap[i] = processMap[i - 1];
processMap[i].push_back("j");
}
for ( int i = 0 ; i <= MH()->N() ; ++i ) {
vector<Ptr<MatchboxMEBase>::ptr> ames = makeMEs(processMap[i], orderInAlphaS() + i,i<MH()->M()+1);
copy(ames.begin(), ames.end(), back_inserter(pureMEsMap()[i]));
cout<<"\n"<<processMap[i].size()<<" "<<pureMEsMap()[i].size()<<" "<<orderInAlphaS()<<" "<<orderInAlphaEW()<<" "<<MH()->M()<<" "<< MH()->N0()<<" "<< MH()->N();
}
}
-void MFactory::prepare_BV(int i) {
+void MergingFactory::prepare_BV(int i) {
// check if we have virtual contributions
bool haveVirtuals = true;
for ( auto born : pureMEsMap()[i]) {
prepareME(born);
if ( born->isOLPTree() ) {
int id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::treeME2);
born->olpProcess(ProcessType::treeME2,id);
id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::colourCorrelatedME2);
born->olpProcess(ProcessType::colourCorrelatedME2,id);
bool haveGluon = false;
for ( const auto p : born->subProcess().legs )
if ( p->id() == 21 ) {
haveGluon = true;
break;
}
if ( haveGluon ) {
id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::spinColourCorrelatedME2);
born->olpProcess(ProcessType::spinColourCorrelatedME2,id);
}
}
if ( born->isOLPLoop() && i <= MH()->M()) {
int id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::oneLoopInterference);
born->olpProcess(ProcessType::oneLoopInterference,id);
if ( !born->onlyOneLoop() && born->needsOLPCorrelators() ) {
id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::colourCorrelatedME2);
born->olpProcess(ProcessType::colourCorrelatedME2,id);
}
}
haveVirtuals &= born->haveOneLoop();
}
// check the additional insertion operators
if ( !theVirtualsMap[i].empty() ) haveVirtuals = true;
for ( auto & virt : theVirtualsMap[i] ) virt->factory(this);
// check for consistent conventions on virtuals, if we are to include MH()->M()
assert(i > MH()->M()||haveVirtuals);
for ( auto & virt : DipoleRepository::insertionIOperators(dipoleSet()) )
virt->factory(this);
for ( auto & virt : DipoleRepository::insertionPKOperators(dipoleSet()) )
virt->factory(this);
}
-void MFactory::prepare_R(int i) {
+void MergingFactory::prepare_R(int i) {
for ( auto real : pureMEsMap()[i])
prepareME(real);
}
-void MFactory::pushB(Ptr<MatchboxMEBase>::ptr born, int i) {
+void MergingFactory::pushB(Ptr<MatchboxMEBase>::ptr born, int i) {
Ptr<MatchboxMEBase>::ptr bornme = born->cloneMe();
bornme->maxMultCKKW(1);
bornme->minMultCKKW(0);
string pname = fullName() + "/" + bornme->name() + ".Born";
if ( !(generator()->preinitRegister(bornme, pname)) ) throw InitException() << "Born ME " << pname << " already existing.";
bornme->virtuals().clear();
for ( auto virt : theVirtualsMap[i] )
if ( virt->apply(born->diagrams().front()->partons()) )
bornme->virtuals().push_back(virt);
for ( auto I : DipoleRepository::insertionIOperators(dipoleSet()) )
if ( I->apply(born->diagrams().front()->partons()) )
bornme->virtuals().push_back(I);
for ( auto PK : DipoleRepository::insertionPKOperators(dipoleSet()) )
if ( PK->apply(born->diagrams().front()->partons()) )
bornme->virtuals().push_back(PK);
Ptr<Node>::ptr clusternode = new_ptr(Node(bornme, 0,MH()));
MH()->firstNodeMap(bornme,clusternode);
bornme->factory(this);
bornme->merger(MH());
vector<Ptr<Node>::ptr> temp;
vector<Ptr<Node>::ptr> temp1;
temp.push_back(clusternode);
unsigned int k = 1;
while (thePureMEsMap[i - k].size() != 0) {
for ( auto tmp : temp){//j
tmp->birth(thePureMEsMap[i - k]);
for ( auto tmpchild : tmp->children()){//m
if ( i <= MH()->M() ) {
for ( auto I : DipoleRepository::insertionIOperators(dipoleSet()) )
if ( I->apply(tmpchild->nodeME()->diagrams().front()->partons()) ){
Ptr<MatchboxInsertionOperator>::ptr myI = I->cloneMe();
tmpchild->nodeME()->virtuals().push_back(myI);
}
for ( auto I : DipoleRepository::insertionPKOperators(dipoleSet()) )
if ( I->apply(tmpchild->nodeME()->diagrams().front()->partons()) ){
Ptr<MatchboxInsertionOperator>::ptr myI = I->cloneMe();
tmpchild->nodeME()->virtuals().push_back(myI);
}
tmpchild->nodeME()->noOneLoop();
}
temp1.push_back(tmpchild);
}
}
temp = temp1;
temp1.clear();
k++;
}
if(MH()->N()>i)
bornme->needsCorrelations();
else bornme->needsNoCorrelations();
bornme->cloneDependencies();
MEs().push_back(bornme);
}
-void MFactory::pushV(Ptr<MatchboxMEBase>::ptr born, int i) {
+void MergingFactory::pushV(Ptr<MatchboxMEBase>::ptr born, int i) {
Ptr<MatchboxMEBase>::ptr nlo = born->cloneMe();
string pname = fullName() + "/" + nlo->name() + ".Virtual";
if ( !(generator()->preinitRegister(nlo, pname)) ) throw InitException() << "Virtual ME " << pname << " already existing.";
////////////////////////////////////NLO///////////////////////////
nlo->virtuals().clear();
if ( !nlo->onlyOneLoop() ) {
for ( auto OV : theVirtualsMap[i] )
if ( OV->apply(nlo->diagrams().front()->partons()) ){
nlo->virtuals().push_back(OV);
}
for ( auto I : DipoleRepository::insertionIOperators(dipoleSet()) )
if ( I->apply(nlo->diagrams().front()->partons()) ){
nlo->virtuals().push_back(I);
}
for ( auto PK : DipoleRepository::insertionPKOperators(dipoleSet()) )
if ( PK->apply(nlo->diagrams().front()->partons()) ){
nlo->virtuals().push_back(PK);
}
if ( nlo->virtuals().empty() ) throw InitException() << "No insertion operators have been found for " << born->name() << "\n";
}
nlo->doOneLoopNoBorn();
////////////////////////////////////NLO///////////////////////////
Ptr<Node>::ptr clusternode = new_ptr(Node(nlo, 0,MH()));
clusternode->virtualContribution(true);
MH()->firstNodeMap(nlo,clusternode);
nlo->merger(MH());
vector<Ptr<Node>::ptr> temp;
vector<Ptr<Node>::ptr> temp1;
temp.push_back(clusternode);
unsigned int k = 1;
while (thePureMEsMap[i - k].size() != 0) {
for ( auto tmp : temp ){
tmp->birth(thePureMEsMap[i - k]);
for ( auto tmpchild : tmp->children())
temp1.push_back(tmpchild);
}
temp = temp1;
k++;
}
if ( nlo->isOLPLoop() ) {
int id = orderOLPProcess(nlo->subProcess(),
born->matchboxAmplitude(),
ProcessType::oneLoopInterference);
nlo->olpProcess(ProcessType::oneLoopInterference,id);
if ( !nlo->onlyOneLoop() && nlo->needsOLPCorrelators() ) {
id = orderOLPProcess(nlo->subProcess(),
born->matchboxAmplitude(),
ProcessType::colourCorrelatedME2);
nlo->olpProcess(ProcessType::colourCorrelatedME2,id);
}
}
nlo->needsCorrelations();
nlo->cloneDependencies();
MEs().push_back(nlo);
}
-void MFactory::pushProR(Ptr<MatchboxMEBase>::ptr born, int i) {
+void MergingFactory::pushProR(Ptr<MatchboxMEBase>::ptr born, int i) {
Ptr<MatchboxMEBase>::ptr bornme = born->cloneMe();
string pname = fullName() + "/" + bornme->name() + ".Real";
if ( !(generator()->preinitRegister(bornme, pname)) ) throw InitException() << "Subtracted ME " << pname << " already existing.";
Ptr<Node>::ptr clusternode = new_ptr(Node(bornme, 1,MH()));
clusternode->subtractedReal(true);
MH()->firstNodeMap(bornme,clusternode);
bornme->merger(MH());
vector<Ptr<Node>::ptr> temp;
vector<Ptr<Node>::ptr> temp1;
temp.push_back(clusternode);
unsigned int k = 1;
while (thePureMEsMap[i - k].size() != 0) {
for ( auto tmp : temp ){
tmp->birth(thePureMEsMap[i - k]);
for ( auto tmpchild : tmp->children()) temp1.push_back(tmpchild);
}
temp = temp1;
k++;
}
if(MH()->N()>i)
bornme->needsCorrelations();
else bornme->needsNoCorrelations();
bornme->cloneDependencies(pname);
MEs().push_back(bornme);
}
-void MFactory::orderOLPs() {
+void MergingFactory::orderOLPs() {
}
-vector<string> MFactory::parseProcess(string in) {
+vector<string> MergingFactory::parseProcess(string in) {
vector<string> process = StringUtils::split(in);
if ( process.size() < 3 )
throw Exception() << "MatchboxFactory: Invalid process."
<< Exception::runerror;
for ( string & p : process) {
p = StringUtils::stripws(p);
}
theN=0;
bool prodprocess=true;
vector<string> pprocess;
for (string const p : process) {
if ( p == "->" )
continue;
if (p=="[") {
prodprocess=false;
}else if (p=="]") {
prodprocess=false;
break;
}else if (p=="[j") {
prodprocess=false;
theN++;
}else if (p=="j"&&!prodprocess) {
theN++;
prodprocess=false;
}else if (p=="j]") {
theN++;
prodprocess=false;
break;
}else if(prodprocess){
pprocess.push_back(p);
}else{
cout<<"\nWarning: "<<p<<" in the brackets of the process definition is not recognized.\n Only j as jets are recognized.";
}
}
return pprocess;
}
-void MFactory::setup() {
+void MergingFactory::setup() {
useMe();
if(!ransetup){
olpProcesses().clear();
externalAmplitudes().clear();
setFixedCouplings(true);
setFixedQEDCouplings(true);
const PDVector& partons = particleGroups()["j"];
unsigned int nl = 0;
// rebind the particle data objects
for ( auto & g : particleGroups()) {
for ( auto & p : g.second) {
p = getParticleData(p->id());
}
}
for ( const auto p : partons ) {
if ( abs(p->id()) < 7 && p->hardProcessMass() == ZERO )
++nl;
if ( p->id() > 0 && p->id() < 7 && p->hardProcessMass() == ZERO )
nLightJetVec( p->id() );
if ( p->id() > 0 && p->id() < 7 && p->hardProcessMass() != ZERO )
nHeavyJetVec( p->id() );
}
nLight(nl/2);
const PDVector& partonsInP = particleGroups()["p"];
for ( const auto pip : partonsInP )
if ( pip->id() > 0 && pip->id() < 7 && pip->hardProcessMass() == ZERO )
nLightProtonVec( pip->id() );
for ( auto & amp: amplitudes() ) amp->factory(this);
MH()->largeNBasis()->factory(this);
assert(!(divideSub!=-1&&divideSubNumber==-1)||!(divideSub==-1&&divideSubNumber!=-1));
assert(!subProcessGroups());
//fill the amplitudes
if ( !amplitudes().empty() ) fill_amplitudes();
// prepare the Born and virtual matrix elements
for ( int i = 0 ; i <= max(0, MH()->N()) ; ++i ) prepare_BV(i);
// prepare the real emission matrix elements
for ( int i = 0 ; i <= MH()->N() ; ++i ) prepare_R(i);
orderOLPs();
// start creating matrix elements
MEs().clear();
int onlysubcounter=0;
int i = 0 ;
for (; i <= max(0, MH()->N()) ; ++i )
for ( auto born : thePureMEsMap[i])
if (calc_born && !theonlyUnlopsweights){
if(((theonlysub==-1||theonlysub==onlysubcounter)&&divideSub==-1)
||(divideSub!=-1&&onlysubcounter%divideSub==divideSubNumber))
pushB(born, i);
onlysubcounter++;
}
i = 0 ;
for (; i <=max(0, MH()->N()); ++i )
for ( auto virt : thePureMEsMap[i])
if ( calc_virtual && i <= MH()->M()){
if(((theonlysub==-1||theonlysub==onlysubcounter)&&divideSub==-1)
||(divideSub!=-1&&onlysubcounter%divideSub==divideSubNumber))
pushV(virt, i);
onlysubcounter++;
}
i = 0 ;
for (; i <= max(0, MH()->N()) ; ++i )
for ( auto real : thePureMEsMap[i] )
if (calc_real&& i <= MH()->M() + 1 && i > 0 && !theonlyvirtualNLOParts&&!theonlyUnlopsweights){
if(((theonlysub==-1||theonlysub==onlysubcounter)&&divideSub==-1)
||(divideSub!=-1&&onlysubcounter%divideSub==divideSubNumber))
pushProR(real, i);
onlysubcounter++;
}
if ( !externalAmplitudes().empty() ) {
generator()->log() << "Initializing external amplitudes.\n" << flush;
boost::progress_display * progressBar =
new boost::progress_display(externalAmplitudes().size(),generator()->log());
for ( const auto ext : externalAmplitudes()) {
if ( ! ext->initializeExternal() ) {
throw InitException()
<< "error: failed to initialize amplitude '" << ext->name() << "'\n";
}
++(*progressBar);
}
delete progressBar;
generator()->log() << "--------------------------------------------------------------------------------\n"
<< flush;
}
if ( !olpProcesses().empty() ) {
generator()->log() << "Initializing one-loop provider(s).\n" << flush;
map<Ptr<MatchboxAmplitude>::tptr, map<pair<Process, int>, int> > olps;
for (const auto oit : olpProcesses()) {
olps[oit.first] = oit.second;
}
boost::progress_display * progressBar = new boost::progress_display(olps.size(), generator()->log());
for ( const auto olpit : olps ) {
if ( !olpit.first->startOLP(olpit.second) ) {
throw InitException() << "error: failed to start OLP for amplitude '" << olpit.first->name() << "'\n";
}
++(*progressBar);
}
delete progressBar;
generator()->log() << "--------------------------------------------------------------------------------\n" << flush;
}
cout<<"\n Generated "<<MEs().size()<<" Subprocesses."<<flush;
if(theonlysub!=-1)cout<<" ( "<<theonlysub<<"/"<<onlysubcounter<<" )"<<flush;
cout<<"\n"<<flush;
generator()->log() << "process setup finished.\n" << flush;
ransetup=true;
}
}
-void MFactory::persistentOutput(PersistentOStream & os) const {
+void MergingFactory::persistentOutput(PersistentOStream & os) const {
os
<< calc_born << calc_virtual << calc_real
<< theonlyUnlopsweights << theonlymulti
<< divideSub << divideSubNumber
<< theonlysub << ransetup
<< processMap << theMergingHelper <<theM<<theN;
}
-void MFactory::persistentInput(PersistentIStream & is, int) {
+void MergingFactory::persistentInput(PersistentIStream & is, int) {
is
>> calc_born >> calc_virtual >> calc_real
>> theonlyUnlopsweights >> theonlymulti
>> divideSub >> divideSubNumber
>> theonlysub >> ransetup
>> processMap >> theMergingHelper >>theM>>theN;
}
-void MFactory::Init() {
+void MergingFactory::Init() {
- static Parameter<MFactory, int> interfaceonlymulti("onlymulti", "calculate only the ME with k additional partons.", &MFactory::theonlymulti, -1, -1, 0,
+ static Parameter<MergingFactory, int> interfaceonlymulti("onlymulti", "calculate only the ME with k additional partons.", &MergingFactory::theonlymulti, -1, -1, 0,
false, false, Interface::lowerlim);
- static Parameter<MFactory, int> interfaceonlysub("onlysub", "calculate only one subProcess. this is for building grids.", &MFactory::theonlysub, -1, -1, 0,
+ static Parameter<MergingFactory, int> interfaceonlysub("onlysub", "calculate only one subProcess. this is for building grids.", &MergingFactory::theonlysub, -1, -1, 0,
false, false, Interface::lowerlim);
- static Parameter<MFactory, int> interfacedivideSub("divideSub", "calculate only one subProcess. this is for building grids.", &MFactory::divideSub, -1, -1, 0,
+ static Parameter<MergingFactory, int> interfacedivideSub("divideSub", "calculate only one subProcess. this is for building grids.", &MergingFactory::divideSub, -1, -1, 0,
false, false, Interface::lowerlim);
- static Parameter<MFactory, int> interfacedivideSubNumber("divideSubNumber", "calculate only one subProcess. this is for building grids.", &MFactory::divideSubNumber, -1, -1, 0,
+ static Parameter<MergingFactory, int> interfacedivideSubNumber("divideSubNumber", "calculate only one subProcess. this is for building grids.", &MergingFactory::divideSubNumber, -1, -1, 0,
false, false, Interface::lowerlim);
- static Switch<MFactory, bool> interface_calc_born("calc_born", "[debug] Switch on or off the born contribution.", &MFactory::calc_born, true,
+ static Switch<MergingFactory, bool> interface_calc_born("calc_born", "[debug] Switch on or off the born contribution.", &MergingFactory::calc_born, true,
false, false);
static SwitchOption interface_calc_bornOn(interface_calc_born, "On", "Switch on calculation of born.", true);
static SwitchOption interface_calc_bornOff(interface_calc_born, "Off", "Switch off calculation of born.", false);
- static Switch<MFactory, bool> interface_calc_virtual("calc_virtual", "[debug] Switch on or off the virtual contribution.",
- &MFactory::calc_virtual, true, false, false);
+ static Switch<MergingFactory, bool> interface_calc_virtual("calc_virtual", "[debug] Switch on or off the virtual contribution.",
+ &MergingFactory::calc_virtual, true, false, false);
static SwitchOption interface_calc_virtualOn(interface_calc_virtual, "On", "Switch on calculation of virtual.", true);
static SwitchOption interface_calc_virtualOff(interface_calc_virtual, "Off", "Switch off calculation of virtual.", false);
- static Switch<MFactory, bool> interface_calc_real("calc_real", "[debug] Switch on or off the real contribution.", &MFactory::calc_real, true,
+ static Switch<MergingFactory, bool> interface_calc_real("calc_real", "[debug] Switch on or off the real contribution.", &MergingFactory::calc_real, true,
false, false);
static SwitchOption interface_calc_realOn(interface_calc_real, "On", "Switch on calculation of real.", true);
static SwitchOption interface_calc_realOff(interface_calc_real, "Off", "Switch off calculation of real.", false);
- static Switch<MFactory, bool> interface_theonlyNLOParts("onlyNLOParts", "Switch on or off the onlyNLOParts.", &MFactory::theonlyNLOParts, true, false,
+ static Switch<MergingFactory, bool> interface_theonlyNLOParts("onlyNLOParts", "Switch on or off the onlyNLOParts.", &MergingFactory::theonlyNLOParts, true, false,
false);
static SwitchOption interface_theonlyNLOPartsOn(interface_theonlyNLOParts, "On", "Switch on the theonlyNLOParts.", true);
static SwitchOption interface_theonlyNLOPartsOff(interface_theonlyNLOParts, "Off", "Switch off the theonlyNLOParts.", false);
// theonlyvirtualNLOParts;
// theonlyrealNLOParts;
- static Switch<MFactory, bool> interface_theonlyvirtualNLOParts("onlyvirtualNLOParts", "Switch on or off the onlyvirtualNLOParts.", &MFactory::theonlyvirtualNLOParts, true, false,
+ static Switch<MergingFactory, bool> interface_theonlyvirtualNLOParts("onlyvirtualNLOParts", "Switch on or off the onlyvirtualNLOParts.", &MergingFactory::theonlyvirtualNLOParts, true, false,
false);
static SwitchOption interface_theonlyvirtualNLOPartsOn(interface_theonlyvirtualNLOParts, "On", "Switch on the theonlyvirtualNLOParts.", true);
static SwitchOption interface_theonlyvirtualNLOPartsOff(interface_theonlyvirtualNLOParts, "Off", "Switch off the theonlyvirtualNLOParts.", false);
- static Switch<MFactory, bool> interface_theonlyrealNLOParts("onlyrealNLOParts", "Switch on or off the onlyrealNLOParts.", &MFactory::theonlyrealNLOParts, true, false,
+ static Switch<MergingFactory, bool> interface_theonlyrealNLOParts("onlyrealNLOParts", "Switch on or off the onlyrealNLOParts.", &MergingFactory::theonlyrealNLOParts, true, false,
false);
static SwitchOption interface_theonlyrealNLOPartsOn(interface_theonlyrealNLOParts, "On", "Switch on the theonlyrealNLOParts.", true);
static SwitchOption interface_theonlyrealNLOPartsOff(interface_theonlyrealNLOParts, "Off", "Switch off the theonlyrealNLOParts.", false);
- static Switch<MFactory, bool> interface_theunitarizeNLOParts("unitarizeNLOParts", "Switch on or off the unitarizeNLOParts.", &MFactory::theunitarizeNLOParts, true, false,
+ static Switch<MergingFactory, bool> interface_theunitarizeNLOParts("unitarizeNLOParts", "Switch on or off the unitarizeNLOParts.", &MergingFactory::theunitarizeNLOParts, true, false,
false);
static SwitchOption interface_theunitarizeNLOPartsOn(interface_theunitarizeNLOParts, "On", "Switch on the unitarizeNLOParts.", true);
static SwitchOption interface_theunitarizeNLOPartsOff(interface_theunitarizeNLOParts, "Off", "Switch off the unitarizeNLOParts.", false);
- static Switch<MFactory, bool> interface_theonlyUnlopsweights("onlyUnlopsweights", "Switch on or off the onlyUnlopsweights.", &MFactory::theonlyUnlopsweights, true, false,
+ static Switch<MergingFactory, bool> interface_theonlyUnlopsweights("onlyUnlopsweights", "Switch on or off the onlyUnlopsweights.", &MergingFactory::theonlyUnlopsweights, true, false,
false);
static SwitchOption interface_theonlyUnlopsweightsOn(interface_theonlyUnlopsweights, "On", "Switch on the onlyUnlopsweights.", true);
static SwitchOption interface_theonlyUnlopsweightsOff(interface_theonlyUnlopsweights, "Off", "Switch off the onlyUnlopsweights.", false);
- static Switch<MFactory, bool> interface_Unitarized("Unitarized", "Unitarize the cross section.", &MFactory::unitarized, true, false, false);
+ static Switch<MergingFactory, bool> interface_Unitarized("Unitarized", "Unitarize the cross section.", &MergingFactory::unitarized, true, false, false);
static SwitchOption interface_UnitarizedOn(interface_Unitarized, "On", "Switch on the unitarized cross section.", true);
static SwitchOption interface_UnitarizedOff(interface_Unitarized, "Off", "Switch off the unitarized cross section.", false);
- static Switch<MFactory, bool> interface_NLOUnitarized("NLOUnitarized", "Unitarize the cross section.", &MFactory::NLOunitarized, true, false, false);
+ static Switch<MergingFactory, bool> interface_NLOUnitarized("NLOUnitarized", "Unitarize the cross section.", &MergingFactory::NLOunitarized, true, false, false);
static SwitchOption interface_NLOUnitarizedOn(interface_NLOUnitarized, "On", "Switch on the unitarized NLO cross section.", true);
static SwitchOption interface_NLOUnitarizedOff(interface_NLOUnitarized, "Off", "Switch off the unitarized NLO cross section.", false);
- static Reference<MFactory,Merger> interfaceMergingHelper
+ static Reference<MergingFactory,Merger> interfaceMergingHelper
("MergingHelper",
"",
- &MFactory::theMergingHelper, false, false, true, true, false);
+ &MergingFactory::theMergingHelper, false, false, true, true, false);
- static Parameter<MFactory, int> interfaceaddNLOLegs("NLOProcesses",
- "Set the number of virtual corrections to consider. 0 is default for no virtual correction.", &MFactory::theM, 0, 0, 0, false, false,
+ static Parameter<MergingFactory, int> interfaceaddNLOLegs("NLOProcesses",
+ "Set the number of virtual corrections to consider. 0 is default for no virtual correction.", &MergingFactory::theM, 0, 0, 0, false, false,
Interface::lowerlim);
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
-DescribeClass<MFactory, Herwig::MatchboxFactory> describeHerwigMFactory("Herwig::MFactory", "HwDipoleShower.so");
+DescribeClass<MergingFactory, Herwig::MatchboxFactory> describeHerwigMergingFactory("Herwig::MergingFactory", "HwDipoleShower.so");
diff --git a/Shower/Dipole/Merging/MFactory.fh b/Shower/Dipole/Merging/MergingFactory.fh
rename from Shower/Dipole/Merging/MFactory.fh
rename to Shower/Dipole/Merging/MergingFactory.fh
--- a/Shower/Dipole/Merging/MFactory.fh
+++ b/Shower/Dipole/Merging/MergingFactory.fh
@@ -1,13 +1,13 @@
// -*- C++ -*-
-// This is the forward declaration of the MFactory class
+// This is the forward declaration of the MergingFactory class
-#ifndef HERWIG_MFactory_FH
-#define HERWIG_MFactory_FH
+#ifndef HERWIG_MergingFactory_FH
+#define HERWIG_MergingFactory_FH
namespace Herwig {
-class MFactory;
+class MergingFactory;
}
-#endif // HERWIG_MFactory_FH
+#endif // HERWIG_MergingFactory_FH
diff --git a/Shower/Dipole/Merging/MFactory.h b/Shower/Dipole/Merging/MergingFactory.h
rename from Shower/Dipole/Merging/MFactory.h
rename to Shower/Dipole/Merging/MergingFactory.h
--- a/Shower/Dipole/Merging/MFactory.h
+++ b/Shower/Dipole/Merging/MergingFactory.h
@@ -1,184 +1,184 @@
// -*- C++ -*-
//
- // MFactory.h is a part of Herwig - A multi-purpose Monte Carlo event generator
+ // MergingFactory.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2012 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
-#ifndef HERWIG_MFactory_H
-#define HERWIG_MFactory_H
+#ifndef HERWIG_MergingFactory_H
+#define HERWIG_MergingFactory_H
//
- // This is the declaration of the MFactory class.
+ // This is the declaration of the MergingFactory class.
//
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
#include "Node.fh"
#include "Merger.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Johannes Bellm
*
- * \brief MFactory automatically sets up a NLO
+ * \brief MergingFactory automatically sets up a NLO
* QCD merging carried out in dipole subtraction.
*
- * @see \ref MFactoryInterfaces "The interfaces"
+ * @see \ref MergingFactoryInterfaces "The interfaces"
* defined for MergeboxFactory.
*/
- class MFactory : public MatchboxFactory {
+ class MergingFactory : public MatchboxFactory {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
- MFactory(); //TODO MergingFactory
+ MergingFactory(); //TODO MergingFactory
/**
* The destructor.
*/
- virtual ~MFactory();
+ virtual ~MergingFactory();
//@}
// main method to setup the ME vector
virtual void setup();
//fill all amplitudes, stored in pureMEsMap
void fill_amplitudes();
/// prepare the Born and virtual matrix elements.
void prepare_BV(int i);
//prepare the real emission matrix elements.
void prepare_R(int i);
// push the born contributions to the ME vector.
void pushB(Ptr<MatchboxMEBase>::ptr,int);
//push the virtual contributions to the ME vector.
void pushV(Ptr<MatchboxMEBase>::ptr,int);
// push the real contributions to the ME vector.
void pushProR(Ptr<MatchboxMEBase>::ptr,int);
//order matrix elements form one loop provider.
void orderOLPs();
// Debugging: push only multiplicities to the ME vector
// in range of specified mulltiplicity.
int onlymulti()const {
return theonlymulti==-1?-1:(theonlymulti+processMap.find(0)->second.size());}
// calculate only unlops weights.
bool onlyUnlopsweights() const {return theonlyUnlopsweights;}
// pointer to the merging helper.
Ptr<Merger>::ptr MH(){return theMergingHelper;}
// maximal NLO mulitplicity: 0=NLO corrections to the productio process.
int M()const {return theM-1;}
// leg size of highest multiplicity.
int N()const {return theN;}
// Return the Map of matrix elements to be considered
// (the Key is the number of additional jets)
const map<int, vector<Ptr<MatchboxMEBase>::ptr> >& pureMEsMap() const {
return thePureMEsMap;}
// Access the Map of matrix elements to be considered
// (the Key is the number of additional jets)
map<int, vector<Ptr<MatchboxMEBase>::ptr> >& pureMEsMap() {
return thePureMEsMap;
}
//Parse a process description
virtual vector<string> parseProcess(string);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int);
//@}
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
// Calculate only virtual and real contributions.
bool theonlyNLOParts;
// Calculate only virtual contributions.
bool theonlyvirtualNLOParts;
// Calculate only real contributions.
bool theonlyrealNLOParts;
// Calculate only expanded histories contributions.
bool theonlyUnlopsweights;
// unitarize virtual and real contributions.
bool theunitarizeNLOParts;
// Calculate born contributions.
bool calc_born;
// Calculate virtual contributions.
bool calc_virtual;
// Calculate real contributions.
bool calc_real;
// unitarise the LO contributions.
bool unitarized;
// unitarise the NLO contributions.
bool NLOunitarized;
// did run setup.
bool ransetup;
// Debugging: push only multiplicities to the ME vector
// in range of specified mulltiplicity.
int theonlymulti;
// calculate only the specified subprocess with no.
int theonlysub;
// cut the subprocesses in equal size pieces.
int divideSub;
// interface to calculate every # subprocess.
int divideSubNumber;
// maximal legsize for NLO corrections.
int theM;
// maximal legsize for LO contributions.
int theN;
// Prefix for subtraction data.
string theSubtractionData;
// map for processes.
map< int, vector<string> > processMap;
//The matrix elements: int = number of additional jets
map< int, vector<Ptr<MatchboxMEBase>::ptr> > thePureMEsMap;
// map for virtual contributions
map<int, vector<Ptr<MatchboxInsertionOperator>::ptr> > theVirtualsMap;
// the merging helper
Ptr<Merger>::ptr theMergingHelper;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MFactory & operator=(const MFactory &);
+ MergingFactory & operator=(const MergingFactory &);
};
}
-#endif /* HERWIG_MFactory_H */
+#endif /* HERWIG_MergingFactory_H */
diff --git a/Shower/Dipole/Merging/Node.cc b/Shower/Dipole/Merging/Node.cc
--- a/Shower/Dipole/Merging/Node.cc
+++ b/Shower/Dipole/Merging/Node.cc
@@ -1,406 +1,406 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the Node class.
//
#include "Node.h"
-#include "MFactory.h"
+#include "MergingFactory.h"
#include "Merger.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
#include "Herwig/Shower/ShowerHandler.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Handlers/StdXCombGroup.h"
#include "Herwig/MatrixElement/Matchbox/Base/DipoleRepository.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
Node::Node() {
}
bool NodeDebug=false;
Node::Node(Ptr<MatchboxMEBase>::ptr nodeME, int cutstage,Ptr<Merger>::ptr mh)
:Interfaced(),
thenodeMEPtr(nodeME),
thedipol(),
thechildren(),
theparent(),
theDeepHead(this),
theCutStage(cutstage),
isOrdered(true),
theSubtractedReal(false),
theVirtualContribution(false),
theMergingHelper(mh)
{
nodeME->maxMultCKKW(1);
nodeME->minMultCKKW(0);
}
Node::Node(Ptr<Node>::ptr deephead,
Ptr<Node>::ptr head,
Ptr<SubtractionDipole>::ptr dipol,
Ptr<MatchboxMEBase>::ptr nodeME,
int cutstage)
:Interfaced(),thenodeMEPtr(nodeME),
thedipol(dipol),
theparent(head),
theDeepHead(deephead),
theCutStage(cutstage),
isOrdered(true),
theSubtractedReal(false),
theVirtualContribution(false),
theMergingHelper() //The subnodes have no merging helper
{
}
Node::~Node() { }
Ptr<SubtractionDipole>::ptr Node::dipole() const {
return thedipol;
}
/** returns the matrix element pointer */
const Ptr<MatchboxMEBase>::ptr Node::nodeME() const {
return thenodeMEPtr;
}
/** access the matrix element pointer */
Ptr<MatchboxMEBase>::ptr Node::nodeME() {
return thenodeMEPtr;
}
int Node::legsize() const {return nodeME()->legsize();}
Ptr<Node>::ptr Node::randomChild() {
return thechildren[(int)(UseRandom::rnd() * thechildren.size())];
}
bool Node::allAbove(Energy pt){
for (Ptr<Node>::ptr child : thechildren)
if(child->pT()<pt)return false;
return true;
}
bool Node::isInHistoryOf(Ptr<Node>::ptr other){
while (other->parent()) {
if(other==this)return true;
other=other->parent();
}
return false;
}
void Node::flushCaches() {
this->theProjectors.clear();
for ( auto const & ch: thechildren) {
ch->dipole()->underlyingBornME()->flushCaches();
for (Ptr<MatchboxReweightBase>::ptr r : ch->dipole()->reweights())
r->flushCaches();
if ( ch->xcomb() ) ch->xcomb()->clean();
ch->nodeME()->flushCaches();
ch->flushCaches();
}
}
void Node::setKinematics() {
for (auto const & ch: thechildren) {
ch->dipole()->setXComb(ch->xcomb());
ch->dipole()->setKinematics();
ch->nodeME()->setKinematics();
ch->setKinematics();
}
}
void Node::clearKinematics() {
for (auto const & ch: thechildren) {
ch->dipole()->setXComb(ch->xcomb());
ch->nodeME()->clearKinematics();
ch->dipole()->clearKinematics();
ch->clearKinematics();
}
}
bool Node::generateKinematics(const double *r, int stage, Energy2 ) {
bool isthissafe=true;
for (auto const & ch: thechildren) {
ch->dipole()->setXComb(ch->xcomb());
if ( !ch->dipole()->generateKinematics(r) ) cout << "stop";
ch->generateKinematics(r, stage + 1, ch->xcomb()->lastSHat());
isthissafe = (isthissafe && ch->pT() >=deepHead()->MH()->mergePt());
}
return isthissafe;
}
void Node::firstgenerateKinematics(const double *r, int stage) {
flushCaches();
MH()->smeareMergePt();
//Set here the new merge Pt for the next phase space point.( Smearing!!!)
clustersafer.clear();
for (auto const & ch: thechildren) {
bool ifirst = true;
bool isecond = true;
ch->dipole()->setXComb(ch->xcomb());
if ( !ch->dipole()->generateKinematics(r) ) cout << "stop";
isecond = ch->generateKinematics(r, stage + 1, ch->xcomb()->lastSHat());
ifirst = (ch->pT() >= deepHead()->MH()->mergePt());
pair<pair<int, int>, int> EmitEmisSpec =
make_pair(make_pair(ch->dipole()->realEmitter(),
ch->dipole()->realEmission()),
ch->dipole()->realSpectator());
clustersafer.insert(make_pair(EmitEmisSpec, make_pair(ifirst, isecond)));
}
}
void Node::setXComb(tStdXCombPtr xc, int proStage) {
if ( !parent() ) this->xcomb(xc);
for (auto const & ch: thechildren) {
if ( !ch->xcomb() ) {
ch->xcomb(ch->dipole()->makeBornXComb(xc));
assert(ch->xcomb());
ch->xcomb()->head(xc);
if ( !ch->dipole()->lastXCombPtr() ) {
ch->dipole()->setXComb(ch->xcomb());
}
ch->setXComb(ch->xcomb(), (proStage - 1));
} else {
if ( !(ch->dipole()->lastXCombPtr()->lastScale() == ch->xcomb()->lastScale()) ) {
ch->dipole()->setXComb(ch->xcomb());
}
if ( ch->xcomb()->head() != xc ) ch->xcomb()->head(xc);
ch->setXComb(ch->xcomb(), (proStage - 1));
}
}
}
void Node::birth(vector<Ptr<MatchboxMEBase>::ptr> vec) {
vector<Ptr<SubtractionDipole>::ptr> dipoles =
nodeME()->getDipoles(DipoleRepository::dipoles(
nodeME()->factory()->dipoleSet()), vec,true);
for ( auto const & dip : dipoles ) {
dip->doSubtraction();
Ptr<Node>::ptr node = new_ptr(Node(theDeepHead,
this,
dip,
dip->underlyingBornME(),
theDeepHead->cutStage()));
thechildren.push_back(node);
}
}
vector<Ptr<Node>::ptr> Node::getNextOrderedNodes(bool normal,double hardScaleFactor) {
vector<Ptr<Node>::ptr> temp = children();
vector<Ptr<Node>::ptr> res;
for (Ptr<Node>::ptr const & child : children()) {
if(deepHead()->MH()->mergePt()>child->pT()){
res.clear();
return res;
}
}
for (Ptr<Node>::ptr const & child: children()) {
if (parent()&& normal){
if ( child->pT() < pT() ){
continue;
}
}
if ( child->children().size() != 0 ){
for (Ptr<Node>::ptr itChild: child->children()) {
if( itChild->pT() > child->pT()&&child->inShowerPS(itChild->pT()) ){
res.push_back(child);
break;
}
}
}
else {
child->nodeME()->factory()->scaleChoice()->setXComb(child->xcomb());
if ( sqr(hardScaleFactor)*child->nodeME()->factory()->scaleChoice()->renormalizationScale()
>= sqr(child->pT()) &&
child->inShowerPS(hardScaleFactor*sqrt(child->nodeME()->factory()->scaleChoice()->renormalizationScale()))) {
res.push_back(child);
}
}
}
return res;
}
bool Node::inShowerPS(Energy hardpT){
//Here we decide if the current phase space point can be reached from the underlying Node.
double z_=dipole()->lastZ();
// II
if( dipole()->bornEmitter()<2&&dipole()->bornSpectator()<2&&deepHead()->MH()->openInitialStateZ()) return true;
// IF
if( dipole()->bornEmitter()<2&&dipole()->bornSpectator()>=2&&deepHead()->MH()->openInitialStateZ())
return true;
pair<double,double> zbounds=
dipole()->tildeKinematics()->zBounds(pT(),hardpT);
return (zbounds.first<z_&&z_<zbounds.second);
}
Ptr<Node>::ptr Node::getHistory(bool normal,double hardScaleFactor) {
Ptr<Node>::ptr res=this;
//cout<<"\nstart get next"<<flush;
vector<Ptr<Node>::ptr> temp = getNextOrderedNodes(normal,hardScaleFactor);
Energy minpt=100000.*GeV;
Selector<Ptr<Node>::ptr> subprosel;
while (temp.size()!=0){
minpt=100000.*GeV;
subprosel.clear();
for (Ptr<Node>::ptr const & child : temp) {
if( child->dipole()->underlyingBornME()->largeNColourCorrelatedME2(
make_pair(child->dipole()->bornEmitter(),child->dipole()->bornSpectator()),
deepHead()->MH()->largeNBasis())!=0.
){
double weight=abs(child->dipole()->dSigHatDR()/nanobarn);
if(weight!=0.){
subprosel.insert(weight , child);
minpt=min(minpt,child->pT());
}
/*
if((*it)->nodeME()->dSigHatDR()/nanobarn!=0.){
subprosel.insert((abs((*it)->dipole()->dSigHatDR() /
(*it)->nodeME()->dSigHatDR()*deepHead()->MH()->as((*it)->pT()))), (*it));
minpt=min(minpt,(*it)->pT());
}
*/
//TODO choosehistories
}
}
if (subprosel.empty())
return res;
res = subprosel.select(UseRandom::rnd());
temp = res->getNextOrderedNodes(true,hardScaleFactor);
}
return res;
}
pair<CrossSection,CrossSection> Node::calcDipandPS(Energy scale){
return dipole()->dipandPs(sqr(scale),deepHead()->MH()->largeNBasis());
}
CrossSection Node::calcPs(Energy scale){
return dipole()->ps(sqr(scale),deepHead()->MH()->largeNBasis());
}
CrossSection Node::calcDip(Energy scale){
return dipole()->dip(sqr(scale));
}
IBPtr Node::clone() const {
return new_ptr(*this);
}
IBPtr Node::fullclone() const {
return new_ptr(*this);
}
void Node::persistentOutput(PersistentOStream & os) const {
os <<
thexcomb<<
thenodeMEPtr<<
thedipol<<
thechildren<<
theparent<<
theProjectors<<
theDeepHead<<
theCutStage<<
clustersafer<<
ounit(theRunningPt,GeV)<<
theSubtractedReal<<
theVirtualContribution<<
theMergingHelper;
}
void Node::persistentInput(PersistentIStream & is, int) {
is >>
thexcomb>>
thenodeMEPtr>>
thedipol>>
thechildren>>
theparent>>
theProjectors>>
theDeepHead>>
theCutStage>>
clustersafer>>
iunit(theRunningPt,GeV)>>
theSubtractedReal>>
theVirtualContribution>>
theMergingHelper;
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<Node,Interfaced> describeHerwigNode("Herwig::Node", "HwDipoleShower.so");
void Node::Init() {
static ClassDocumentation<Node> documentation("There is no documentation for the Node class");
}
diff --git a/Shower/Dipole/Merging/Node.h b/Shower/Dipole/Merging/Node.h
--- a/Shower/Dipole/Merging/Node.h
+++ b/Shower/Dipole/Merging/Node.h
@@ -1,245 +1,245 @@
// -*- C++ -*-
#ifndef Herwig_Node_H
#define Herwig_Node_H
//
// This is the declaration of the Node class.
//
//#include "Node.fh"
-#include "MFactory.fh"
+#include "MergingFactory.fh"
#include "Merger.h"
#include "ThePEG/Interface/Interfaced.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.fh"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
#include "Herwig/Shower/Dipole/Base/DipoleEventRecord.h"
#include "ThePEG/MatrixElement/MEBase.h"
#include "ThePEG/Config/Pointers.h"
#include <vector>
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the Node class.
*
* @see \ref NodeInterfaces "The interfaces"
* defined for Node.
*/
/**
* Define the SafeClusterMap type map<pair<pair<emitter,emmision>,spectator >
* ,pair<first-clustering,second-clustering> >
*/
typedef map<pair<pair<int,int>,int >,pair<bool,bool> > SafeClusterMap;
class Node : public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor. Do not use!
*/
Node();
// another constructor for first nodes
Node(Ptr<MatchboxMEBase>::ptr nodeME,int cutstage,Ptr<Merger>::ptr mh);
// another constructor for underlying nodes
Node(Ptr<Node>::ptr deephead,
Ptr<Node>::ptr head,
Ptr<SubtractionDipole>::ptr dipol,
Ptr<MatchboxMEBase>::ptr nodeME,
int cutstage);
/**
* The destructor.
*/
virtual ~Node();
//@}
public:
// get children from vector<Ptr<MatchboxMEBase>::ptr>
void birth(vector<Ptr<MatchboxMEBase>::ptr> vec);
// recursive setXComb. proStage is the number of clusterings
// before the projectors get filled.
void setXComb(tStdXCombPtr xc, int proStage);
// calculate the dipole and ps approximation
pair<CrossSection,CrossSection> calcDipandPS(Energy scale);
// calculate the ps approximation
CrossSection calcPs(Energy scale);
// calculate the dipole
CrossSection calcDip(Energy scale);
// recursive flush caches and clean up XCombs.
void flushCaches();
// recursive clearKinematics
void clearKinematics();
// recursive setKinematics
void setKinematics();
// recursive generateKinematics using tilde kinematics of the dipoles
bool generateKinematics(const double *r, int stage,Energy2 shat);
// generate the kinamatics of the first node
void firstgenerateKinematics(const double *r, int stage);
//return the ME
const Ptr<MatchboxMEBase>::ptr nodeME()const;
//return the node ME
Ptr<MatchboxMEBase>::ptr nodeME();
//return the parent Node
Ptr<Node>::ptr parent()const {return theparent;}
// vector of children nodes created in birth
vector< Ptr<Node>::ptr > children()const {return thechildren;}
//pick a random child (flat)
Ptr<Node>::ptr randomChild();
// true if all children show scales above pt
bool allAbove(Energy pt);
// true if the node is in the history of other.
bool isInHistoryOf(Ptr<Node>::ptr other);
// legsize of the node ME
int legsize() const;
// set the first node (first men). only use in factory
void deepHead(Ptr<Node>::ptr deephead) {theDeepHead = deephead;}
// return the first node
Ptr<Node>::ptr deepHead() const {return theDeepHead;}
// insert nodes to projector vector
void Projector(double a, Ptr<Node>::ptr pro) {
pair<double,Ptr<Node>::ptr> p;
p.first = a;
p.second = pro;
theProjectors.push_back(p);
}
// insert nodes to projector vector
vector< pair <double , Ptr<Node>::ptr > > Projector() {return theProjectors;}
// returns the dipol of the node.
Ptr<SubtractionDipole>::ptr dipole() const;
// set the xcomb of the node
void xcomb(StdXCombPtr xc) { thexcomb = xc;}
// return the xcomb
StdXCombPtr xcomb() const {return thexcomb;}
// return the current running pt
Energy runningPt(){return theRunningPt;}
// set the current running pt
void runningPt(Energy x){theRunningPt=x;}
// return the cut stage to cut on merging pt in generate kinematics
int cutStage() const {return theCutStage;}
// get the clustersafe map for this node
SafeClusterMap clusterSafe() const {return clustersafer;}
// get a vector of the next nodes, ordered in pt (and in parton shower phace space)
vector<Ptr<Node>::ptr> getNextOrderedNodes(bool normal=true,double hardscalefactor=1.);
//true if the node is in shower history for a given pt
bool inShowerPS(Energy hardpt);
//get the history
Ptr<Node>::ptr getHistory(bool normal=true,double hardscalefactor=1.);
//true if node correspond to a subtracted real.
bool subtractedReal() {return theSubtractedReal;}
// set if node correspont to a subtracted real.
void subtractedReal(bool x) { theSubtractedReal = x;}
//true if node correspond to a virtual contribution.
bool virtualContribution() { return theVirtualContribution ;}
// set if node correspont to a virtual contribution.
void virtualContribution(bool x) {theVirtualContribution = x;}
//pointer to the merging helper
Ptr<Merger>::ptr MH()const{return theMergingHelper;}
// set the merging helper
void MH(Ptr<Merger>::ptr a){theMergingHelper=a;}
Energy pT()const{return dipole()->lastPt();}
private:
//the xcomb of the node
StdXCombPtr thexcomb;
// the Matrixelement representing this node.
Ptr<MatchboxMEBase>::ptr thenodeMEPtr;
// the dipol used to substract
// and generate kinematics using tilde kinematics
Ptr<SubtractionDipole>::ptr thedipol;
// vector of the children node
vector< Ptr<Node>::ptr > thechildren;
// the parent node
Ptr<Node>::ptr theparent;
// The nodes of the projection stage.
vector< pair <double,Ptr<Node>::ptr> > theProjectors;
// The godfather node of whole tree.(Firstnode)
Ptr<Node>::ptr theDeepHead;
// The CutStage is number of clusterings which are possible without
// introducing a merging scale to cut away singularities.
// -> subtracted MEs have the CutStage 1.
// -> virtual and normal tree level ME get 0.
int theCutStage;
// For [[Emitter,Emission],Spectator] the mapped pair gives
// information if the first and the second cluster is safe.
SafeClusterMap clustersafer;
// the current running pt
Energy theRunningPt;
// tell if node belongs to an ordered history
bool isOrdered;
// flag to tell if node is subtracted real
bool theSubtractedReal;
// flag to tell if node is virtual contribution
bool theVirtualContribution;
// the merging helper
Ptr<Merger>::ptr theMergingHelper;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
Node & operator=(const Node &);
};
}
#endif /* Herwig_Node_H */
diff --git a/src/Merging/1LO-0NLO-LEP.in b/src/Merging/1LO-0NLO-LEP.in
--- a/src/Merging/1LO-0NLO-LEP.in
+++ b/src/Merging/1LO-0NLO-LEP.in
@@ -1,137 +1,137 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ ]
+do MergingFactory:Process e- e+ -> j j [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 1LO-0NLO-LEP EventGenerator
diff --git a/src/Merging/1LO-0NLO-LEP_Qt.in b/src/Merging/1LO-0NLO-LEP_Qt.in
--- a/src/Merging/1LO-0NLO-LEP_Qt.in
+++ b/src/Merging/1LO-0NLO-LEP_Qt.in
@@ -1,143 +1,143 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ ]
+do MergingFactory:Process e- e+ -> j j [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
set /Herwig/Particles/e+:PDF /Herwig/Partons/NoPDF
set /Herwig/Particles/e-:PDF /Herwig/Partons/NoPDF
set /Herwig/EventHandlers/EventHandler:CascadeHandler /Herwig/Shower/ShowerHandler
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 1LO-0NLO-LEP_Qt EventGenerator
diff --git a/src/Merging/1LO-0NLO-LHC-J.in b/src/Merging/1LO-0NLO-LHC-J.in
--- a/src/Merging/1LO-0NLO-LHC-J.in
+++ b/src/Merging/1LO-0NLO-LHC-J.in
@@ -1,156 +1,156 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> j j [ ]
+do MergingFactory:Process p p -> j j [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 1
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice MaxJetPtScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-J-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
-saverun 1LO-0NLO-LHC-J EventGenerator
\ No newline at end of file
+saverun 1LO-0NLO-LHC-J EventGenerator
diff --git a/src/Merging/1LO-0NLO-LHC-J_OISZ.in b/src/Merging/1LO-0NLO-LHC-J_OISZ.in
--- a/src/Merging/1LO-0NLO-LHC-J_OISZ.in
+++ b/src/Merging/1LO-0NLO-LHC-J_OISZ.in
@@ -1,160 +1,160 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> j j [ ]
+do MergingFactory:Process p p -> j j [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 1
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice MaxJetPtScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-J-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
set /Herwig/DipoleShower/Kinematics/IFLightKinematics:OpenInitialStateZ Yes
set /Herwig/DipoleShower/Kinematics/IILightKinematics:OpenInitialStateZ Yes
set /Herwig/Merging/Merger:OpenInitialStateZ Yes
-saverun 1LO-0NLO-LHC-J_OISZ EventGenerator
\ No newline at end of file
+saverun 1LO-0NLO-LHC-J_OISZ EventGenerator
diff --git a/src/Merging/1LO-0NLO-LHC-T.in b/src/Merging/1LO-0NLO-LHC-T.in
--- a/src/Merging/1LO-0NLO-LHC-T.in
+++ b/src/Merging/1LO-0NLO-LHC-T.in
@@ -1,156 +1,156 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> t tbar [ ]
+do MergingFactory:Process p p -> t tbar [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice TopPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-T-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 1LO-0NLO-LHC-T EventGenerator
diff --git a/src/Merging/1LO-0NLO-LHC-T_QtDecay.in b/src/Merging/1LO-0NLO-LHC-T_QtDecay.in
--- a/src/Merging/1LO-0NLO-LHC-T_QtDecay.in
+++ b/src/Merging/1LO-0NLO-LHC-T_QtDecay.in
@@ -1,163 +1,163 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> t tbar [ ]
+do MergingFactory:Process p p -> t tbar [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice TopPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-T-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
clear /Herwig/DipoleShower/DipoleShowerHandler:DecayInShower
insert /Herwig/EventHandlers/EventHandler:PostCascadeHandlers 0 /Herwig/Shower/ShowerHandler
#Needed for W decay after Top decay
set /Herwig/Shower/ShowerHandler:Interactions QCDandQED
cd /Herwig/Generators
saverun 1LO-0NLO-LHC-T_QtDecay EventGenerator
diff --git a/src/Merging/1LO-0NLO-LHC-W.in b/src/Merging/1LO-0NLO-LHC-W.in
--- a/src/Merging/1LO-0NLO-LHC-W.in
+++ b/src/Merging/1LO-0NLO-LHC-W.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> l nu [ ]
+do MergingFactory:Process p p -> l nu [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-W-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 1LO-0NLO-LHC-W EventGenerator
diff --git a/src/Merging/1LO-0NLO-LHC-Z.in b/src/Merging/1LO-0NLO-LHC-Z.in
--- a/src/Merging/1LO-0NLO-LHC-Z.in
+++ b/src/Merging/1LO-0NLO-LHC-Z.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ ]
+do MergingFactory:Process p p -> e+ e- [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 1LO-0NLO-LHC-Z EventGenerator
diff --git a/src/Merging/1LO-0NLO-LHC-Z_OISZ.in b/src/Merging/1LO-0NLO-LHC-Z_OISZ.in
--- a/src/Merging/1LO-0NLO-LHC-Z_OISZ.in
+++ b/src/Merging/1LO-0NLO-LHC-Z_OISZ.in
@@ -1,160 +1,160 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ ]
+do MergingFactory:Process p p -> e+ e- [ ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
set /Herwig/DipoleShower/Kinematics/IFLightKinematics:OpenInitialStateZ Yes
set /Herwig/DipoleShower/Kinematics/IILightKinematics:OpenInitialStateZ Yes
set /Herwig/Merging/Merger:OpenInitialStateZ Yes
-saverun 1LO-0NLO-LHC-Z_OISZ EventGenerator
\ No newline at end of file
+saverun 1LO-0NLO-LHC-Z_OISZ EventGenerator
diff --git a/src/Merging/2LO-0NLO-LEP.in b/src/Merging/2LO-0NLO-LEP.in
--- a/src/Merging/2LO-0NLO-LEP.in
+++ b/src/Merging/2LO-0NLO-LEP.in
@@ -1,137 +1,137 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j ]
+do MergingFactory:Process e- e+ -> j j [ j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 2LO-0NLO-LEP EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-J.in b/src/Merging/2LO-0NLO-LHC-J.in
--- a/src/Merging/2LO-0NLO-LHC-J.in
+++ b/src/Merging/2LO-0NLO-LHC-J.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> j j [ j ]
+do MergingFactory:Process p p -> j j [ j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 1
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice MaxJetPtScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-J-Analysis.in
##################################################
## Save the generator
##################################################
set /Herwig/Samplers/Sampler:BinSampler:Kappa 0.02
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 2LO-0NLO-LHC-J EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-J_OISZ.in b/src/Merging/2LO-0NLO-LHC-J_OISZ.in
--- a/src/Merging/2LO-0NLO-LHC-J_OISZ.in
+++ b/src/Merging/2LO-0NLO-LHC-J_OISZ.in
@@ -1,164 +1,164 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> j j [ j ]
+do MergingFactory:Process p p -> j j [ j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 2
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice MaxJetPtScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-J-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
set /Herwig/Samplers/Sampler:BinSampler:Kappa 0.02
cd /Herwig/Generators
set /Herwig/DipoleShower/Kinematics/IFLightKinematics:OpenInitialStateZ Yes
set /Herwig/DipoleShower/Kinematics/IILightKinematics:OpenInitialStateZ Yes
set /Herwig/Merging/Merger:OpenInitialStateZ Yes
saverun 2LO-0NLO-LHC-J_OISZ EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-J_only0.in b/src/Merging/2LO-0NLO-LHC-J_only0.in
--- a/src/Merging/2LO-0NLO-LHC-J_only0.in
+++ b/src/Merging/2LO-0NLO-LHC-J_only0.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> j j [ j ]
+do MergingFactory:Process p p -> j j [ j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
-set MFactory:onlymulti 0
+set MergingFactory:onlymulti 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 1
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice MaxJetPtScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-J-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
-saverun 2LO-0NLO-LHC-J EventGenerator
\ No newline at end of file
+saverun 2LO-0NLO-LHC-J EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-J_only1.in b/src/Merging/2LO-0NLO-LHC-J_only1.in
--- a/src/Merging/2LO-0NLO-LHC-J_only1.in
+++ b/src/Merging/2LO-0NLO-LHC-J_only1.in
@@ -1,157 +1,157 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> j j [ j ]
+do MergingFactory:Process p p -> j j [ j ]
-set MFactory:NLOProcesses 0
-set MFactory:onlymulti 1
+set MergingFactory:NLOProcesses 0
+set MergingFactory:onlymulti 1
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 1
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice MaxJetPtScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-J-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
-saverun 2LO-0NLO-LHC-J_only1 EventGenerator
\ No newline at end of file
+saverun 2LO-0NLO-LHC-J_only1 EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-T.in b/src/Merging/2LO-0NLO-LHC-T.in
--- a/src/Merging/2LO-0NLO-LHC-T.in
+++ b/src/Merging/2LO-0NLO-LHC-T.in
@@ -1,156 +1,156 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> t tbar [ j]
+do MergingFactory:Process p p -> t tbar [ j]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice TopPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-T-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 2LO-0NLO-LHC-T EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-T_QtDecay.in b/src/Merging/2LO-0NLO-LHC-T_QtDecay.in
--- a/src/Merging/2LO-0NLO-LHC-T_QtDecay.in
+++ b/src/Merging/2LO-0NLO-LHC-T_QtDecay.in
@@ -1,162 +1,162 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> t tbar [ j]
+do MergingFactory:Process p p -> t tbar [ j]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice TopPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-T-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
clear /Herwig/DipoleShower/DipoleShowerHandler:DecayInShower
insert /Herwig/EventHandlers/EventHandler:PostCascadeHandlers 0 /Herwig/Shower/ShowerHandler
#Needed for W decay after Top decay
set /Herwig/Shower/ShowerHandler:Interactions QCDandQED
cd /Herwig/Generators
saverun 2LO-0NLO-LHC-T_QtDecay EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-W.in b/src/Merging/2LO-0NLO-LHC-W.in
--- a/src/Merging/2LO-0NLO-LHC-W.in
+++ b/src/Merging/2LO-0NLO-LHC-W.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> l nu [ j]
+do MergingFactory:Process p p -> l nu [ j]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-W-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 2LO-0NLO-LHC-W EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-Z.in b/src/Merging/2LO-0NLO-LHC-Z.in
--- a/src/Merging/2LO-0NLO-LHC-Z.in
+++ b/src/Merging/2LO-0NLO-LHC-Z.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ j ]
+do MergingFactory:Process p p -> e+ e- [ j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 2LO-0NLO-LHC-Z EventGenerator
diff --git a/src/Merging/2LO-0NLO-LHC-Z_OISZ.in b/src/Merging/2LO-0NLO-LHC-Z_OISZ.in
--- a/src/Merging/2LO-0NLO-LHC-Z_OISZ.in
+++ b/src/Merging/2LO-0NLO-LHC-Z_OISZ.in
@@ -1,160 +1,160 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ j ]
+do MergingFactory:Process p p -> e+ e- [ j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
set /Herwig/DipoleShower/Kinematics/IFLightKinematics:OpenInitialStateZ Yes
set /Herwig/DipoleShower/Kinematics/IILightKinematics:OpenInitialStateZ Yes
set /Herwig/Merging/Merger:OpenInitialStateZ Yes
-saverun 2LO-0NLO-LHC-Z_OISZ EventGenerator
\ No newline at end of file
+saverun 2LO-0NLO-LHC-Z_OISZ EventGenerator
diff --git a/src/Merging/2LO-1NLO-LEP.in b/src/Merging/2LO-1NLO-LEP.in
--- a/src/Merging/2LO-1NLO-LEP.in
+++ b/src/Merging/2LO-1NLO-LEP.in
@@ -1,137 +1,137 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j ]
+do MergingFactory:Process e- e+ -> j j [ j ]
-set MFactory:NLOProcesses 1
+set MergingFactory:NLOProcesses 1
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 2LO-1NLO-LEP EventGenerator
diff --git a/src/Merging/2LO-1NLO-LHC-W.in b/src/Merging/2LO-1NLO-LHC-W.in
--- a/src/Merging/2LO-1NLO-LHC-W.in
+++ b/src/Merging/2LO-1NLO-LHC-W.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> l nu [j ]
+do MergingFactory:Process p p -> l nu [j ]
-set MFactory:NLOProcesses 1
+set MergingFactory:NLOProcesses 1
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-W-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 2LO-1NLO-LHC-W EventGenerator
diff --git a/src/Merging/2LO-1NLO-LHC-Z.in b/src/Merging/2LO-1NLO-LHC-Z.in
--- a/src/Merging/2LO-1NLO-LHC-Z.in
+++ b/src/Merging/2LO-1NLO-LHC-Z.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ j ]
+do MergingFactory:Process p p -> e+ e- [ j ]
-set MFactory:NLOProcesses 1
+set MergingFactory:NLOProcesses 1
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 2LO-1NLO-LHC-Z EventGenerator
diff --git a/src/Merging/3LO-0NLO-LEP.in b/src/Merging/3LO-0NLO-LEP.in
--- a/src/Merging/3LO-0NLO-LEP.in
+++ b/src/Merging/3LO-0NLO-LEP.in
@@ -1,137 +1,137 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j j ]
+do MergingFactory:Process e- e+ -> j j [ j j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 3LO-0NLO-LEP EventGenerator
diff --git a/src/Merging/3LO-0NLO-LEP_only0.in b/src/Merging/3LO-0NLO-LEP_only0.in
--- a/src/Merging/3LO-0NLO-LEP_only0.in
+++ b/src/Merging/3LO-0NLO-LEP_only0.in
@@ -1,139 +1,139 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j j ]
+do MergingFactory:Process e- e+ -> j j [ j j ]
-set MFactory:onlymulti 0
+set MergingFactory:onlymulti 0
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 3LO-0NLO-LEP_only0 EventGenerator
diff --git a/src/Merging/3LO-0NLO-LEP_only1.in b/src/Merging/3LO-0NLO-LEP_only1.in
--- a/src/Merging/3LO-0NLO-LEP_only1.in
+++ b/src/Merging/3LO-0NLO-LEP_only1.in
@@ -1,139 +1,139 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j j ]
+do MergingFactory:Process e- e+ -> j j [ j j ]
-set MFactory:onlymulti 1
+set MergingFactory:onlymulti 1
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 3LO-0NLO-LEP_only1 EventGenerator
diff --git a/src/Merging/3LO-0NLO-LEP_only2.in b/src/Merging/3LO-0NLO-LEP_only2.in
--- a/src/Merging/3LO-0NLO-LEP_only2.in
+++ b/src/Merging/3LO-0NLO-LEP_only2.in
@@ -1,139 +1,139 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j j ]
+do MergingFactory:Process e- e+ -> j j [ j j ]
-set MFactory:onlymulti 2
+set MergingFactory:onlymulti 2
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 3LO-0NLO-LEP_only2 EventGenerator
diff --git a/src/Merging/3LO-0NLO-LHC-J.in b/src/Merging/3LO-0NLO-LHC-J.in
--- a/src/Merging/3LO-0NLO-LHC-J.in
+++ b/src/Merging/3LO-0NLO-LHC-J.in
@@ -1,156 +1,156 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> j j [ j j]
+do MergingFactory:Process p p -> j j [ j j]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 1
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice MaxJetPtScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-J-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
-saverun 3LO-0NLO-LHC-J EventGenerator
\ No newline at end of file
+saverun 3LO-0NLO-LHC-J EventGenerator
diff --git a/src/Merging/3LO-0NLO-LHC-T.in b/src/Merging/3LO-0NLO-LHC-T.in
--- a/src/Merging/3LO-0NLO-LHC-T.in
+++ b/src/Merging/3LO-0NLO-LHC-T.in
@@ -1,156 +1,156 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 2
-set MFactory:OrderInAlphaEW 0
+set MergingFactory:OrderInAlphaS 2
+set MergingFactory:OrderInAlphaEW 0
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> t tbar [ j j]
+do MergingFactory:Process p p -> t tbar [ j j]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice TopPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-T-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 2LO-0NLO-LHC-T EventGenerator
diff --git a/src/Merging/3LO-0NLO-LHC-W.in b/src/Merging/3LO-0NLO-LHC-W.in
--- a/src/Merging/3LO-0NLO-LHC-W.in
+++ b/src/Merging/3LO-0NLO-LHC-W.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> l nu [j j ]
+do MergingFactory:Process p p -> l nu [j j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-W-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 3LO-0NLO-LHC-W EventGenerator
diff --git a/src/Merging/3LO-0NLO-LHC-Z.in b/src/Merging/3LO-0NLO-LHC-Z.in
--- a/src/Merging/3LO-0NLO-LHC-Z.in
+++ b/src/Merging/3LO-0NLO-LHC-Z.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ j j]
+do MergingFactory:Process p p -> e+ e- [ j j]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
set /Herwig/Samplers/Sampler:BinSampler:Kappa 0.02
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 3LO-0NLO-LHC-Z EventGenerator
diff --git a/src/Merging/3LO-0NLO-LHC-Z_OISZ.in b/src/Merging/3LO-0NLO-LHC-Z_OISZ.in
--- a/src/Merging/3LO-0NLO-LHC-Z_OISZ.in
+++ b/src/Merging/3LO-0NLO-LHC-Z_OISZ.in
@@ -1,160 +1,160 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ j j ]
+do MergingFactory:Process p p -> e+ e- [ j j ]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
set /Herwig/DipoleShower/Kinematics/IFLightKinematics:OpenInitialStateZ Yes
set /Herwig/DipoleShower/Kinematics/IILightKinematics:OpenInitialStateZ Yes
set /Herwig/Merging/Merger:OpenInitialStateZ Yes
-saverun 3LO-0NLO-LHC-Z_OISZ EventGenerator
\ No newline at end of file
+saverun 3LO-0NLO-LHC-Z_OISZ EventGenerator
diff --git a/src/Merging/3LO-1NLO-LEP.in b/src/Merging/3LO-1NLO-LEP.in
--- a/src/Merging/3LO-1NLO-LEP.in
+++ b/src/Merging/3LO-1NLO-LEP.in
@@ -1,137 +1,137 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j j ]
+do MergingFactory:Process e- e+ -> j j [ j j ]
-set MFactory:NLOProcesses 1
+set MergingFactory:NLOProcesses 1
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 3LO-1NLO-LEP EventGenerator
diff --git a/src/Merging/3LO-1NLO-LHC-W.in b/src/Merging/3LO-1NLO-LHC-W.in
--- a/src/Merging/3LO-1NLO-LHC-W.in
+++ b/src/Merging/3LO-1NLO-LHC-W.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> l nu [j j ]
+do MergingFactory:Process p p -> l nu [j j ]
-set MFactory:NLOProcesses 1
+set MergingFactory:NLOProcesses 1
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-W-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 3LO-1NLO-LHC-W EventGenerator
diff --git a/src/Merging/3LO-1NLO-LHC-Z.in b/src/Merging/3LO-1NLO-LHC-Z.in
--- a/src/Merging/3LO-1NLO-LHC-Z.in
+++ b/src/Merging/3LO-1NLO-LHC-Z.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [j j ]
+do MergingFactory:Process p p -> e+ e- [j j ]
-set MFactory:NLOProcesses 1
+set MergingFactory:NLOProcesses 1
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 3LO-1NLO-LHC-Z EventGenerator
diff --git a/src/Merging/3LO-2NLO-LEP.in b/src/Merging/3LO-2NLO-LEP.in
--- a/src/Merging/3LO-2NLO-LEP.in
+++ b/src/Merging/3LO-2NLO-LEP.in
@@ -1,140 +1,140 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j j ]
+do MergingFactory:Process e- e+ -> j j [ j j ]
-set MFactory:NLOProcesses 2
+set MergingFactory:NLOProcesses 2
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set /Herwig/Samplers/Sampler:BinSampler:Kappa 0.02
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
#read Matchbox/MadGraph-OpenLoops.in
#set /Herwig/MatrixElements/Matchbox/Amplitudes/MadGraph:ProcessPath eejjjj
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 3LO-2NLO-LEP EventGenerator
diff --git a/src/Merging/3LO-2NLO-LEP_light.in b/src/Merging/3LO-2NLO-LEP_light.in
--- a/src/Merging/3LO-2NLO-LEP_light.in
+++ b/src/Merging/3LO-2NLO-LEP_light.in
@@ -1,141 +1,141 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/EECollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 91.2*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process e- e+ -> j j [ j j ]
+do MergingFactory:Process e- e+ -> j j [ j j ]
-set MFactory:NLOProcesses 2
+set MergingFactory:NLOProcesses 2
set Merger:MergingScale 4.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
## cuts on additional jets
# read Matchbox/DefaultEEJets.in
# set NJetsCut:NJetsMin 3
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice SHatScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LEP91-Analysis.in
##################################################
## Do not apply profile scales for LEP as hard
## scale coincides with kinematic limit
##################################################
set /Herwig/Shower/ShowerHandler:HardScaleProfile NULL
set /Herwig/DipoleShower/DipoleShowerHandler:HardScaleProfile NULL
##################################################
## Save the generator
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
cd /Herwig/Generators
saverun 3LO-2NLO-LEP_light EventGenerator
diff --git a/src/Merging/3LO-2NLO-LHC-W.in b/src/Merging/3LO-2NLO-LHC-W.in
--- a/src/Merging/3LO-2NLO-LHC-W.in
+++ b/src/Merging/3LO-2NLO-LHC-W.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> l nu [ j j]
+do MergingFactory:Process p p -> l nu [ j j]
-set MFactory:NLOProcesses 2
+set MergingFactory:NLOProcesses 2
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-W-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 3LO-2NLO-LHC-W EventGenerator
diff --git a/src/Merging/3LO-2NLO-LHC-Z.in b/src/Merging/3LO-2NLO-LHC-Z.in
--- a/src/Merging/3LO-2NLO-LHC-Z.in
+++ b/src/Merging/3LO-2NLO-LHC-Z.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ j j]
+do MergingFactory:Process p p -> e+ e- [ j j]
-set MFactory:NLOProcesses 2
+set MergingFactory:NLOProcesses 2
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
set /Herwig/Samplers/Sampler:BinSampler:Kappa 0.02
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 3LO-2NLO-LHC-Z EventGenerator
diff --git a/src/Merging/4LO-0NLO-LHC-Z.in b/src/Merging/4LO-0NLO-LHC-Z.in
--- a/src/Merging/4LO-0NLO-LHC-Z.in
+++ b/src/Merging/4LO-0NLO-LHC-Z.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ j j j]
+do MergingFactory:Process p p -> e+ e- [ j j j]
-set MFactory:NLOProcesses 0
+set MergingFactory:NLOProcesses 0
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 4LO-0NLO-LHC-Z EventGenerator
diff --git a/src/Merging/4LO-2NLO-LHC-Z.in b/src/Merging/4LO-2NLO-LHC-Z.in
--- a/src/Merging/4LO-2NLO-LHC-Z.in
+++ b/src/Merging/4LO-2NLO-LHC-Z.in
@@ -1,158 +1,158 @@
# -*- ThePEG-repository -*-
##################################################
## Herwig/Merging example input file
##################################################
##################################################
## Collider type
##################################################
read Matchbox/PPCollider.in
read Matchbox/Merging.in
##################################################
## Beam energy sqrt(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:LuminosityFunction:Energy 7000*GeV
##################################################
## Process selection
##################################################
## Note that event generation may fail if no matching matrix element has
## been found. Coupling orders are with respect to the Born process,
## i.e. NLO QCD does not require an additional power of alphas.
## Model assumptions
read Matchbox/StandardModelLike.in
read Matchbox/DiagonalCKM.in
## Set the order of the couplings
cd /Herwig/Merging
-set MFactory:OrderInAlphaS 0
-set MFactory:OrderInAlphaEW 2
+set MergingFactory:OrderInAlphaS 0
+set MergingFactory:OrderInAlphaEW 2
## Select the process
## You may use identifiers such as p, pbar, j, l, mu+, h0 etc.
-do MFactory:Process p p -> e+ e- [ j j j ]
+do MergingFactory:Process p p -> e+ e- [ j j j ]
-set MFactory:NLOProcesses 2
+set MergingFactory:NLOProcesses 2
set Merger:MergingScale 10.*GeV
set Merger:MergingScaleSmearing 0.1
set Merger:gamma 1.
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
read Matchbox/PQCDLevel.in
## Special settings required for on-shell production of unstable particles
## enable for on-shell top production
# read Matchbox/OnShellTopProduction.in
## enable for on-shell W, Z or h production
# read Matchbox/OnShellWProduction.in
# read Matchbox/OnShellZProduction.in
# read Matchbox/OnShellHProduction.in
# Special settings for the VBF approximation
# read Matchbox/VBFDiagramsOnly.in
##################################################
## Matrix element library selection
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
read Matchbox/MadGraph-OpenLoops.in
# read Matchbox/HJets.in
# read Matchbox/VBFNLO.in
## Uncomment this to use ggh effective couplings
## currently only supported by MadGraph-GoSam
# read Matchbox/HiggsEffective.in
##################################################
## Cut selection
## See the documentation for more options
##################################################
set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV
set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV
cd /Herwig/MatrixElements/Matchbox/Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
## cuts on additional jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet
# insert JetCuts:JetRegions 1 SecondJet
# insert JetCuts:JetRegions 2 ThirdJet
# insert JetCuts:JetRegions 3 FourthJet
##################################################
## Scale choice
## See the documentation for more options
##################################################
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
##################################################
## Scale uncertainties
##################################################
# read Matchbox/MuDown.in
# read Matchbox/MuUp.in
##################################################
## Shower scale uncertainties
##################################################
# read Matchbox/MuQDown.in
# read Matchbox/MuQUp.in
##################################################
## PDF choice
##################################################
read Matchbox/FiveFlavourNoBMassScheme.in
read Matchbox/MMHT2014.in
##################################################
## Analyses
##################################################
cd /Herwig/Analysis
insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 Rivet
# insert /Herwig/Generators/EventGenerator:AnalysisHandlers 0 HepMC
read Matchbox/LHC7-Z-Analysis.in
##################################################
## Save the generator
##################################################
-do /Herwig/Merging/MFactory:ProductionMode
+do /Herwig/Merging/MergingFactory:ProductionMode
set /Herwig/Generators/EventGenerator:IntermediateOutput Yes
cd /Herwig/Generators
saverun 4LO-2NLO-LHC-Z EventGenerator
diff --git a/src/Merging/MergingLEP.in b/src/Merging/MergingLEP.in
--- a/src/Merging/MergingLEP.in
+++ b/src/Merging/MergingLEP.in
@@ -1,315 +1,315 @@
set /Herwig/Particles/d:NominalMass 0*GeV
set /Herwig/Particles/dbar:NominalMass 0*GeV
set /Herwig/Particles/u:NominalMass 0*GeV
set /Herwig/Particles/ubar:NominalMass 0*GeV
set /Herwig/Particles/s:NominalMass 0*GeV
set /Herwig/Particles/sbar:NominalMass 0*GeV
set /Herwig/Particles/c:NominalMass 0*GeV
set /Herwig/Particles/cbar:NominalMass 0*GeV
#set /Herwig/Particles/b:NominalMass 0*GeV
#set /Herwig/Particles/bbar:NominalMass 0*GeV
#set /Herwig/Particles/e+:PDF /Herwig/Partons/NoPDF
#set /Herwig/Particles/e-:PDF /Herwig/Partons/NoPDF
set /Herwig/Couplings/NLOAlphaS:min_active_flavours 4
set /Herwig/Couplings/NLOAlphaS:input_alpha_s 0.118
set /Herwig/Model:QCD/RunningAlphaS /Herwig/Couplings/NLOAlphaS
set /Herwig/DipoleShower/DipoleShowerHandler:GlobalAlphaS /Herwig/Couplings/NLOAlphaS
cd /Herwig/Merging
create Herwig::Merger Merger
set Merger:DipoleShowerHandler /Herwig/DipoleShower/DipoleShowerHandler
set /Herwig/DipoleShower/DipoleShowerHandler:MergingHelper Merger
cd /Herwig/DipoleShower/Kernels
#clear /Herwig/DipoleShower/DipoleShowerHandler:Kernels
#insert /Herwig/DipoleShower/DipoleShowerHandler:Kernels 0 FFgx2ggxDipoleKernel
#insert /Herwig/DipoleShower/DipoleShowerHandler:Kernels 0 FFqx2qgxDipoleKernel
#insert /Herwig/DipoleShower/DipoleShowerHandler:Kernels 0 FFgx2ddxDipoleKernel
#insert /Herwig/DipoleShower/DipoleShowerHandler:Kernels 0 FFgx2uuxDipoleKernel
#insert /Herwig/DipoleShower/DipoleShowerHandler:Kernels 0 FFgx2ccxDipoleKernel
#insert /Herwig/DipoleShower/DipoleShowerHandler:Kernels 0 FFgx2ssxDipoleKernel
#insert /Herwig/DipoleShower/DipoleShowerHandler:Kernels 0 FFgx2bbxDipoleKernel
cd /Herwig/EventHandlers
set /Herwig/Generators/LEPGenerator:EventHandler:LuminosityFunction:Energy 91.2*GeV
cd /Herwig/Merging
-insert /Herwig/Generators/LEPGenerator:EventHandler:SubProcessHandlers[0] EEMFactory
+insert /Herwig/Generators/LEPGenerator:EventHandler:SubProcessHandlers[0] EEMergingFactory
-set EEMFactory:OrderInAlphaS 0
-set EEMFactory:OrderInAlphaEW 2
-do EEMFactory:Process e- e+ j j
+set EEMergingFactory:OrderInAlphaS 0
+set EEMergingFactory:OrderInAlphaEW 2
+do EEMergingFactory:Process e- e+ j j
create Herwig::SimpleColourBasis LargeNColourBasis
set LargeNColourBasis:LargeN On
set Merger:LargeNBasis LargeNColourBasis
cd /Herwig/Generators
set LEPGenerator:EventHandler:CascadeHandler /Herwig/DipoleShower/DipoleShowerHandler
set LEPGenerator:EventHandler:CascadeHandler:MPIHandler NULL
set LEPGenerator:EventHandler:MultipleInteractionHandler NULL
set /Herwig/Samplers/Sampler:Verbose On
set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV
set /Herwig/Generators/LEPGenerator:EventHandler:CollisionCuts Off
cd /Herwig/MatrixElements/Matchbox/Phasespace
set TreePhasespace:M0 0.001*GeV
set TreePhasespace:MC 0.00001*GeV
-set /Herwig/Merging/EEMFactory:Phasespace TreePhasespace
+set /Herwig/Merging/EEMergingFactory:Phasespace TreePhasespace
cd /Herwig/EventHandlers
set LEPHandler:Sampler /Herwig/Samplers/Sampler
cd /Herwig/MatrixElements/Matchbox
cd Utility
insert DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/gamma
cd /Herwig/Samplers
create Herwig::MonacoSampler Monaco
set /Herwig/Samplers/Sampler:BinSampler Monaco
set Monaco:EnhancementFactor 1.2
set Monaco:InitialPoints 1000
set Monaco:LuminosityMapperBins 0
set Monaco:NIterations 4
set Monaco:RemapChannelDimension Yes
set Monaco:RemapperMinSelection 0.0001
set Monaco:RemapperPoints 1000
set Monaco:UseAllIterations No
set Sampler:UpdateAfter 3000
set Sampler:AddUpSamplers Off
set Sampler:GlobalMaximumWeight Off
set Sampler:FlatSubprocesses Off
set Sampler:MinSelection 0.00001
set Sampler:AlmostUnweighted On
set Sampler:BinSampler:Kappa 1.
set Sampler:RunCombinationData Off
set Sampler:Verbose On
set /Herwig/EventHandlers/LEPHandler:Sampler /Herwig/Samplers/Sampler
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice FixedScale
set FixedScale:FixedScale 91.2*GeV
cd /Herwig/Generators
#set LEPGenerator:EventHandler:DecayHandler NULL
#set LEPGenerator:EventHandler:HadronizationHandler NULL
cd /Herwig/Analysis
clear /Herwig/Generators/LEPGenerator:AnalysisHandlers
create ThePEG::RivetAnalysis RivetAnalysis RivetAnalysis.so
insert /Herwig/Generators/LEPGenerator:AnalysisHandlers 0 RivetAnalysis
cd /Herwig/Generators
set /Herwig/Generators/LEPGenerator:IntermediateOutput Yes
set /Herwig/Generators/LEPGenerator:EventHandler /Herwig/EventHandlers/LEPHandler
set /Herwig/DipoleShower/DipoleShowerHandler:MaxPtIsMuF Yes
cd /Herwig/Cuts
set EECuts:Fuzzy FuzzyTheta
-set MatchboxJetMatcher:Factory /Herwig/Merging/EEMFactory
+set MatchboxJetMatcher:Factory /Herwig/Merging/EEMergingFactory
cd /Herwig/Merging
-set EEMFactory:MergingHelper Merger
-set Merger:MFactory EEMFactory
+set EEMergingFactory:MergingHelper Merger
+set Merger:MergingFactory EEMergingFactory
set MScale:MergingHelper Merger
set Merger:MergingJetFinder /Herwig/Cuts/JetFinder
cd /Herwig/Generators
set LEPGenerator:DebugLevel 1
set LEPGenerator:PrintEvent 10
set /Herwig/DipoleShower/DipoleShowerHandler:MergingHelper:minusL No
### From Tests/Rivet/LEP/LEP-91.in
##################################################
# LEP physics parameters (override defaults)
##################################################
##################################################
# select the analyses
##################################################
# Validated
##################################################
# ALEPH charged particle multiplicity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALEPH_1991_S2435284
# ALEPH main LEP I QCD summary paper
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALEPH_1996_S3486095
# ALEPH D*
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALEPH_1999_S4193598
# OPAL charged hadron analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_1994_S2927284
# OPAL Delta++ analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_1995_S3198391
# OPAL J/Psi analysis analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_1996_S3257789
# ALEPH eta/omega analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALEPH_2002_S4823664
# OPAL K*0 analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_1997_S3608263
# OPAL flavour specific charged multiplicities etc
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_1998_S3780481
# OPAL f_0,f_2 and phi production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_1998_S3702294
# OPAL gamma,pi0,eta,eta',rho+/-,a0+/-
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_1998_S3749908
# OPAL K0
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_2000_S4418603
# SLD flavour specific charged multiplicities etc
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 SLD_1996_S3398250
# SLD flavour specific charged multiplicities etc
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 SLD_1999_S3743934
# SLD flavour specific charged multiplicities etc
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 SLD_2004_S5693039
# OPAL event shapes and multiplicities at different energies
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_2004_S6132243
# ALEPH jet and event shapes at many energies
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALEPH_2004_S5765862
# OPAL/JADE jet rates at many energies
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 JADE_OPAL_2000_S4300807
# DELPHI strange baryon production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 DELPHI_1995_S3137023
# DELPHI f_0, rho_0 and f_2 production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 DELPHI_1999_S3960137
# OPAL strange baryon production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_1997_S3396100
# DELPHI tuning paper
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 DELPHI_1996_S3430090
# DELPHI b quark
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 DELPHI_2002_069_CONF_603
#insert /Herwig/Analysis/RivetAnalysis:Analyses 0 DELPHI_2011_I890503
# ALEPH b quark
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALEPH_2001_S4656318
# SLD b quark
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 SLD_2002_S4869273
# PDG hadron multiplicities and ratios
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 PDG_HADRON_MULTIPLICITIES
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 PDG_HADRON_MULTIPLICITIES_RATIOS
##################################################
# unvalidated
##################################################
# OPAL 4 jet angles
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 OPAL_2001_S4553896
cd /Herwig/DipoleShower/Kernels
set FFgx2ggxDipoleKernel:CMWScheme On
set FFqx2qgxDipoleKernel:CMWScheme On
set FFgx2ddxDipoleKernel:CMWScheme On
set FFgx2uuxDipoleKernel:CMWScheme On
set FFgx2ccxDipoleKernel:CMWScheme On
set FFgx2ssxDipoleKernel:CMWScheme On
set FFgx2bbxDipoleKernel:CMWScheme On
set FFMgx2ggxDipoleKernel:CMWScheme On
set FFMdx2dgxDipoleKernel:CMWScheme On
set FFMux2ugxDipoleKernel:CMWScheme On
set FFMcx2cgxDipoleKernel:CMWScheme On
set FFMsx2sgxDipoleKernel:CMWScheme On
set FFMbx2bgxDipoleKernel:CMWScheme On
set FFMtx2tgxDipoleKernel:CMWScheme On
set FFMgx2ddxDipoleKernel:CMWScheme On
set FFMgx2uuxDipoleKernel:CMWScheme On
set FFMgx2ccxDipoleKernel:CMWScheme On
set FFMgx2ssxDipoleKernel:CMWScheme On
set FFMgx2bbxDipoleKernel:CMWScheme Off
#set FFMbx2bgxDipoleKernel:RenormalizationScaleFreeze 8.4*GeV
set FFMgx2bbxDipoleKernel:RenormalizationScaleFreeze 8.4*GeV
set FFMbx2bgxDipoleKernel:VirtualitySplittingScale No
set FFMgx2bbxDipoleKernel:VirtualitySplittingScale Yes
cd /Herwig/Hadronization
#set /Herwig/DipoleShower/Kinematics/FFLightKinematics:IRCutoff 0.78
#set /Herwig/DipoleShower/Kinematics/FFMassiveKinematics:IRCutoff 0.1018
#set ClusterFissioner:ClMaxLight 3.30
#set ClusterFissioner:ClPowLight 2.50
#set ClusterFissioner:PSplitLight 1.29
#set ClusterDecayer:ClDirLight 1
#set ClusterDecayer:ClSmrLight 3.118342
#set ClusterFissioner:ClMaxCharm 3.11*GeV
#set ClusterFissioner:ClPowCharm 1.62
#set ClusterFissioner:PSplitCharm 2.54
#set ClusterDecayer:ClDirCharm 1
#set ClusterDecayer:ClSmrCharm 0.
#set HadronSelector:SingleHadronLimitCharm 0.0
#set ClusterFissioner:ClMaxBottom 4.30*GeV
get ClusterFissioner:ClMaxBottom
#set ClusterFissioner:ClPowBottom 3.518
get ClusterFissioner:ClPowBottom
#set ClusterFissioner:PSplitBottom 1.5
#set ClusterDecayer:ClDirBottom 1
#set ClusterDecayer:ClSmrBottom .1
#set HadronSelector:SingleHadronLimitBottom 0.1
#set /Herwig/Particles/b:NominalMass 4.0
#set /Herwig/Particles/b:ConstituentMass 4.3
#set /Herwig/Particles/bbar:ConstituentMass 4.3
#set /Herwig/Particles/g:ConstituentMass .7
get /Herwig/Particles/u:ConstituentMass
get /Herwig/Particles/d:ConstituentMass
get /Herwig/Particles/s:ConstituentMass
#set HadronSelector:PwtUquark 1.0
#set HadronSelector:PwtDquark 1.0
#set HadronSelector:PwtSquark 1.09
#set HadronSelector:PwtCquark 1.0
#set HadronSelector:PwtBquark .1
#set HadronSelector:PwtDIquark 0.66
#set HadronSelector:SngWt 1.0
#set HadronSelector:DecWt 1.0
#set /Herwig/Couplings/NLOAlphaS:input_alpha_s 0.118
#set /Herwig/Couplings/NLOAlphaS:min_active_flavours 3
#fulldescribe /Herwig/Couplings/NLOAlphaS:exact_evaluation exact
#set /Herwig/Couplings/NLOAlphaS:max_active_flavours 6
diff --git a/src/Merging/MergingLHC.in b/src/Merging/MergingLHC.in
--- a/src/Merging/MergingLHC.in
+++ b/src/Merging/MergingLHC.in
@@ -1,375 +1,375 @@
cd /Herwig/Partons
create ThePEG::LHAPDF PDFSet ThePEGLHAPDF.so
set PDFSet:RemnantHandler HadronRemnants
set /Herwig/Partons/PDFSet:PDFName MMHT2014nlo68cl
set /Herwig/Particles/p+:PDF PDFSet
set /Herwig/Particles/pbar-:PDF PDFSet
set HardLOPDF:PDFName MMHT2014nlo68cl
set HardNLOPDF:PDFName MMHT2014nlo68cl
set ShowerLOPDF:PDFName MMHT2014nlo68cl
set ShowerNLOPDF:PDFName MMHT2014nlo68cl
#set MPIPDF:PDFName MMHT2014nlo68cl
#set RemnantPDF:PDFName MMHT2014nlo68cl
set /Herwig/DipoleShower/IntrinsicPtGenerator:ValenceIntrinsicPtScale 2.4*GeV
set /Herwig/DipoleShower/IntrinsicPtGenerator:SeaIntrinsicPtScale 2.4*GeV
set /Herwig/DipoleShower/Kinematics/FFLightKinematics:IRCutoff 0.78
set /Herwig/DipoleShower/Kinematics/FILightKinematics:IRCutoff 0.78
set /Herwig/DipoleShower/Kinematics/IFLightKinematics:IRCutoff 0.78
set /Herwig/DipoleShower/Kinematics/IILightKinematics:IRCutoff 0.78
set /Herwig/Model:QCD/RunningAlphaS /Herwig/Couplings/NLOAlphaS
set /Herwig/DipoleShower/DipoleShowerHandler:GlobalAlphaS /Herwig/Couplings/NLOAlphaS
set /Herwig/DipoleShower/DipoleShowerHandler:GlobalAlphaS:input_alpha_s 0.118
set /Herwig/Couplings/NLOAlphaS:input_alpha_s 0.118
read Matchbox/FourFlavourScheme.in
read Matchbox/OnShellTopProduction.in
cd /Herwig/Particles
set d:NominalMass 0*GeV
set dbar:NominalMass 0*GeV
set u:NominalMass 0*GeV
set ubar:NominalMass 0*GeV
set s:NominalMass 0*GeV
set sbar:NominalMass 0*GeV
set c:NominalMass 0*GeV
set cbar:NominalMass 0*GeV
set c:HardProcessMass 0*GeV
set cbar:HardProcessMass 0*GeV
#set b:HardProcessMass 0*GeV
#set bbar:HardProcessMass 0*GeV
set e+:HardProcessMass 0*GeV
set e-:HardProcessMass 0*GeV
set mu+:HardProcessMass 0*GeV
set mu-:HardProcessMass 0*GeV
set nu_e:HardProcessMass 0*GeV
set nu_ebar:HardProcessMass 0*GeV
set nu_mu:HardProcessMass 0*GeV
set nu_mubar:HardProcessMass 0*GeV
set nu_tau:HardProcessMass 0*GeV
set nu_taubar:HardProcessMass 0*GeV
cd /Herwig/Cuts
set MassCut:MinM 66*GeV
set MassCut:MaxM 116*GeV
set /Herwig/Generators/LHCGenerator:EventHandler:CollisionCuts Off
cd /Herwig/MatrixElements/Matchbox/Phasespace
set TreePhasespace:M0 0.01*GeV
set TreePhasespace:MC 0.0001*GeV
set /Herwig/Generators/LHCGenerator:MaxErrors 10000
cd /Herwig/EventHandlers
set /Herwig/EventHandlers/LHCHandler:LuminosityFunction:Energy 7000.0*GeV
set /Herwig/Generators/LHCGenerator:NumberOfEvents 100000000
cd /Herwig/Merging
-insert /Herwig/Generators/LHCGenerator:EventHandler:SubProcessHandlers[0] PPMFactory
+insert /Herwig/Generators/LHCGenerator:EventHandler:SubProcessHandlers[0] PPMergingFactory
-set PPMFactory:QuarkFlavourDiagonal Yes
+set PPMergingFactory:QuarkFlavourDiagonal Yes
set /Herwig/Vertices/FFWMatchboxVertex:Diagonal Yes
-clear PPMFactory:ParticleGroup p
-do PPMFactory:StartParticleGroup p
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/g
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/u
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/ubar
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/d
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/dbar
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/s
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/sbar
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/c
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/cbar
-#insert PPMFactory:ParticleGroup 0 /Herwig/Particles/b
-#insert PPMFactory:ParticleGroup 0 /Herwig/Particles/bbar
-do PPMFactory:EndParticleGroup
+clear PPMergingFactory:ParticleGroup p
+do PPMergingFactory:StartParticleGroup p
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/g
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/u
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/ubar
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/d
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/dbar
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/s
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/sbar
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/c
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/cbar
+#insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/b
+#insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/bbar
+do PPMergingFactory:EndParticleGroup
-clear PPMFactory:ParticleGroup j
-do PPMFactory:StartParticleGroup j
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/g
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/u
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/ubar
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/d
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/dbar
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/s
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/sbar
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/c
-insert PPMFactory:ParticleGroup 0 /Herwig/Particles/cbar
-#insert PPMFactory:ParticleGroup 0 /Herwig/Particles/b
-#insert PPMFactory:ParticleGroup 0 /Herwig/Particles/bbar
-do PPMFactory:EndParticleGroup
+clear PPMergingFactory:ParticleGroup j
+do PPMergingFactory:StartParticleGroup j
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/g
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/u
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/ubar
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/d
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/dbar
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/s
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/sbar
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/c
+insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/cbar
+#insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/b
+#insert PPMergingFactory:ParticleGroup 0 /Herwig/Particles/bbar
+do PPMergingFactory:EndParticleGroup
cd /Herwig/Merging
create Herwig::Merger Merger
create Herwig::MergingReweight MPreWeight HwDipoleShower.so
-#insert PPMFactory:Preweighters 0 MPreWeight
+#insert PPMergingFactory:Preweighters 0 MPreWeight
set MPreWeight:HTPower 0
set MPreWeight:MaxPTPower 0
set MPreWeight:OnlyColoured False
create Herwig::SimpleColourBasis LargeNColourBasis
set LargeNColourBasis:LargeN On
set Merger:LargeNBasis LargeNColourBasis
set Merger:DipoleShowerHandler /Herwig/DipoleShower/DipoleShowerHandler
set /Herwig/DipoleShower/DipoleShowerHandler:MergingHelper Merger
cd /Herwig/Generators
set LHCGenerator:EventHandler:CascadeHandler /Herwig/DipoleShower/DipoleShowerHandler
set LHCGenerator:EventHandler:CascadeHandler:MPIHandler NULL
set LHCGenerator:EventHandler:MultipleInteractionHandler NULL
set LHCGenerator:EventHandler:DecayHandler NULL
set /Herwig/Shower/ShowerHandler:MPIHandler NULL
create Herwig::MonacoSampler /Herwig/Samplers/Monaco
set /Herwig/Samplers/Sampler:BinSampler /Herwig/Samplers/Monaco
cd /Herwig/MatrixElements/Matchbox/Phasespace
set TreePhasespace:M0 0.01*GeV
set TreePhasespace:MC 0.0001*GeV
-set /Herwig/Merging/PPMFactory:Phasespace TreePhasespace
+set /Herwig/Merging/PPMergingFactory:Phasespace TreePhasespace
cd /Herwig/EventHandlers
set LHCHandler:Sampler /Herwig/Samplers/Sampler
cd /Herwig/Samplers
set Monaco:EnhancementFactor 1.2
set Monaco:InitialPoints 1000
set Monaco:LuminosityMapperBins 8
set Monaco:NIterations 4
set Monaco:RemapChannelDimension Yes
set Monaco:RemapperMinSelection 0.0001
set Monaco:RemapperPoints 1000
set Monaco:UseAllIterations No
set Sampler:UpdateAfter 1000
set Sampler:AddUpSamplers Off
set Sampler:GlobalMaximumWeight Off
set Sampler:FlatSubprocesses Off
set Sampler:MinSelection 0.000001
set Sampler:AlmostUnweighted On
set Sampler:BinSampler:Kappa 1.
set Sampler:RunCombinationData Off
set Sampler:Verbose On
cd /Herwig/MatrixElements/Matchbox/Amplitudes
-#clear /Herwig/Merging/PPMFactory:Amplitudes
+#clear /Herwig/Merging/PPMergingFactory:Amplitudes
#set GenericProcesses:TreeLevelAmplitude MadGraph
#set GenericProcesses:OneLoopAmplitude OpenLoops
cd /Herwig/Cuts
set MassCut:MinM 66*GeV
set MassCut:MaxM 116*GeV
set /Herwig/Generators/LHCGenerator:MaxErrors 10000
cd /Herwig/EventHandlers
set /Herwig/EventHandlers/LHCHandler:LuminosityFunction:Energy 7000.0*GeV
cd /Herwig/MatrixElements/Matchbox/Scales/
set /Herwig/Merging/MScale:ScaleChoice LeptonPairMassScale
cd /Herwig/Analysis
clear /Herwig/Generators/LHCGenerator:AnalysisHandlers
create ThePEG::RivetAnalysis RivetAnalysis RivetAnalysis.so
insert /Herwig/Generators/LHCGenerator:AnalysisHandlers 0 RivetAnalysis
cd /Herwig/Generators
set /Herwig/Generators/LHCGenerator:IntermediateOutput Yes
set /Herwig/Generators/LHCGenerator:EventHandler /Herwig/EventHandlers/LHCHandler
set /Herwig/DipoleShower/DipoleShowerHandler:MaxPtIsMuF Yes
cd /Herwig/Cuts
set QCDCuts:Fuzzy FuzzyTheta
-set MatchboxJetMatcher:Factory /Herwig/Merging/PPMFactory
+set MatchboxJetMatcher:Factory /Herwig/Merging/PPMergingFactory
cd /Herwig/Merging
-set PPMFactory:MergingHelper Merger
-set Merger:MFactory PPMFactory
+set PPMergingFactory:MergingHelper Merger
+set Merger:MergingFactory PPMergingFactory
set MScale:MergingHelper Merger
set Merger:MergingJetFinder /Herwig/Cuts/JetFinder
cd /Herwig/Generators
set LHCGenerator:DebugLevel 1
set LHCGenerator:PrintEvent 10
set /Herwig/DipoleShower/DipoleShowerHandler:MergingHelper:minusL No
##################################################
# select the analyses
##################################################
# General analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 MC_ZINC
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 MC_ZJETS
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 MC_ZKTSPLITTINGS
# ATLAS pT
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S9131140
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1300647
# ATLAS Z+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I945498
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1230812
# ATLAS phi*
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1204784
# CMS Z + b-hadron
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1256943
# CMS Z pt and y
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I941555
# ATLAS Z + bjets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1306294
# ATLAS Z
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I928289_Z
# CMS Z AFB
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1122847
# CMS Z+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1310737
# ATLAS event shapes in Z events
#insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1424838
# ATLAS forwrd backward
#insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1351916_EL
cd /Herwig/DipoleShower/Kernels
set FFgx2ggxDipoleKernel:CMWScheme On
set FFqx2qgxDipoleKernel:CMWScheme On
set FFgx2ddxDipoleKernel:CMWScheme On
set FFgx2uuxDipoleKernel:CMWScheme On
set FFgx2ccxDipoleKernel:CMWScheme On
set FFgx2ssxDipoleKernel:CMWScheme On
set FFgx2bbxDipoleKernel:CMWScheme On
set FFMgx2ggxDipoleKernel:CMWScheme On
set FFMdx2dgxDipoleKernel:CMWScheme On
set FFMux2ugxDipoleKernel:CMWScheme On
set FFMcx2cgxDipoleKernel:CMWScheme On
set FFMsx2sgxDipoleKernel:CMWScheme On
set FFMbx2bgxDipoleKernel:CMWScheme On
set FFMtx2tgxDipoleKernel:CMWScheme On
set FFMgx2ddxDipoleKernel:CMWScheme On
set FFMgx2uuxDipoleKernel:CMWScheme On
set FFMgx2ccxDipoleKernel:CMWScheme On
set FFMgx2ssxDipoleKernel:CMWScheme On
set FFMgx2bbxDipoleKernel:CMWScheme On
set FIgx2ggxDipoleKernel:CMWScheme On
set FIqx2qgxDipoleKernel:CMWScheme On
set FIgx2ddxDipoleKernel:CMWScheme On
set FIgx2uuxDipoleKernel:CMWScheme On
set FIgx2ccxDipoleKernel:CMWScheme On
set FIgx2ssxDipoleKernel:CMWScheme On
set FIgx2bbxDipoleKernel:CMWScheme On
set FIMdx2dgxDipoleKernel:CMWScheme On
set FIMux2ugxDipoleKernel:CMWScheme On
set FIMcx2cgxDipoleKernel:CMWScheme On
set FIMsx2sgxDipoleKernel:CMWScheme On
set FIMbx2bgxDipoleKernel:CMWScheme On
set FIMtx2tgxDipoleKernel:CMWScheme On
set FIMgx2ddxDipoleKernel:CMWScheme On
set FIMgx2uuxDipoleKernel:CMWScheme On
set FIMgx2ccxDipoleKernel:CMWScheme On
set FIMgx2ssxDipoleKernel:CMWScheme On
set FIMgx2bbxDipoleKernel:CMWScheme On
#set FIMgx2ttxDipoleKernel:CMWScheme On
set IFgx2ggxDipoleKernel:CMWScheme On
set IFqx2qgxDipoleKernel:CMWScheme On
set IFqx2gqxDipoleKernel:CMWScheme On
set IFgx2ddbarxDipoleKernel:CMWScheme On
set IFgx2dbardxDipoleKernel:CMWScheme On
set IFgx2uubarxDipoleKernel:CMWScheme On
set IFgx2ubaruxDipoleKernel:CMWScheme On
set IFgx2ccbarxDipoleKernel:CMWScheme On
set IFgx2cbarcxDipoleKernel:CMWScheme On
set IFgx2ssbarxDipoleKernel:CMWScheme On
set IFgx2sbarsxDipoleKernel:CMWScheme On
set IFMgx2ggxDipoleKernel:CMWScheme On
set IFMqx2qgxDipoleKernel:CMWScheme On
set IFMqx2gqxDipoleKernel:CMWScheme On
set IFMgx2ddbarxDipoleKernel:CMWScheme On
set IFMgx2dbardxDipoleKernel:CMWScheme On
set IFMgx2uubarxDipoleKernel:CMWScheme On
set IFMgx2ubaruxDipoleKernel:CMWScheme On
set IFMgx2ccbarxDipoleKernel:CMWScheme On
set IFMgx2cbarcxDipoleKernel:CMWScheme On
set IFMgx2ssbarxDipoleKernel:CMWScheme On
set IFMgx2sbarsxDipoleKernel:CMWScheme On
set IIgx2ggxDipoleKernel:CMWScheme On
set IIqx2qgxDipoleKernel:CMWScheme On
set IIqx2gqxDipoleKernel:CMWScheme On
set IIgx2ddbarxDipoleKernel:CMWScheme On
set IIgx2dbardxDipoleKernel:CMWScheme On
set IIgx2uubarxDipoleKernel:CMWScheme On
set IIgx2ubaruxDipoleKernel:CMWScheme On
set IIgx2ccbarxDipoleKernel:CMWScheme On
set IIgx2cbarcxDipoleKernel:CMWScheme On
set IIgx2ssbarxDipoleKernel:CMWScheme On
set IIgx2sbarsxDipoleKernel:CMWScheme On
diff --git a/src/defaults/MatchboxMergingDefaults.in.in b/src/defaults/MatchboxMergingDefaults.in.in
--- a/src/defaults/MatchboxMergingDefaults.in.in
+++ b/src/defaults/MatchboxMergingDefaults.in.in
@@ -1,280 +1,280 @@
################################################################################
#
# Default setup for Matchbox matrix element generation.
# You do not need to make any change in here; processes of
# interest can be chosen in the standard input files.
#
################################################################################
################################################################################
# Integration/sampling
################################################################################
cd /Herwig/Samplers
set FlatBinSampler:InitialPoints 10000
set Sampler:BinSampler FlatBinSampler
set Sampler:AddUpSamplers Off
set Sampler:GlobalMaximumWeight Off
set Sampler:FlatSubprocesses Off
set Sampler:MinSelection 0.000001
set Sampler:AlmostUnweighted Off
set Sampler:RunCombinationData Off
set Sampler:WriteGridsOnFinish No
set Sampler:MaxEnhancement 1.1
################################################################################
# Setup the factory object for merging
################################################################################
mkdir /Herwig/Merging
cd /Herwig/Merging
-create Herwig::MFactory MFactory HwDipoleShower.so
+create Herwig::MergingFactory MergingFactory HwDipoleShower.so
-do MFactory:StartParticleGroup p
-insert MFactory:ParticleGroup 0 /Herwig/Particles/b
-insert MFactory:ParticleGroup 0 /Herwig/Particles/bbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/c
-insert MFactory:ParticleGroup 0 /Herwig/Particles/cbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/s
-insert MFactory:ParticleGroup 0 /Herwig/Particles/sbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/d
-insert MFactory:ParticleGroup 0 /Herwig/Particles/dbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/u
-insert MFactory:ParticleGroup 0 /Herwig/Particles/ubar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/g
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup p
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/b
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/bbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/c
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/cbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/s
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/sbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/d
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/dbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/u
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/ubar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/g
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup pbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/b
-insert MFactory:ParticleGroup 0 /Herwig/Particles/bbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/c
-insert MFactory:ParticleGroup 0 /Herwig/Particles/cbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/s
-insert MFactory:ParticleGroup 0 /Herwig/Particles/sbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/d
-insert MFactory:ParticleGroup 0 /Herwig/Particles/dbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/u
-insert MFactory:ParticleGroup 0 /Herwig/Particles/ubar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/g
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup pbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/b
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/bbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/c
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/cbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/s
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/sbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/d
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/dbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/u
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/ubar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/g
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup j
-insert MFactory:ParticleGroup 0 /Herwig/Particles/b
-insert MFactory:ParticleGroup 0 /Herwig/Particles/bbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/c
-insert MFactory:ParticleGroup 0 /Herwig/Particles/cbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/s
-insert MFactory:ParticleGroup 0 /Herwig/Particles/sbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/d
-insert MFactory:ParticleGroup 0 /Herwig/Particles/dbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/u
-insert MFactory:ParticleGroup 0 /Herwig/Particles/ubar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/g
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup j
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/b
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/bbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/c
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/cbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/s
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/sbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/d
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/dbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/u
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/ubar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/g
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup u
-insert MFactory:ParticleGroup 0 /Herwig/Particles/u
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup u
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/u
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup ubar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/ubar
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup ubar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/ubar
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup d
-insert MFactory:ParticleGroup 0 /Herwig/Particles/d
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup d
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/d
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup dbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/dbar
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup dbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/dbar
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup s
-insert MFactory:ParticleGroup 0 /Herwig/Particles/s
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup s
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/s
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup sbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/sbar
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup sbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/sbar
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup c
-insert MFactory:ParticleGroup 0 /Herwig/Particles/c
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup c
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/c
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup cbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/cbar
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup cbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/cbar
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup b
-insert MFactory:ParticleGroup 0 /Herwig/Particles/b
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup b
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/b
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup bbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/bbar
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup bbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/bbar
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup t
-insert MFactory:ParticleGroup 0 /Herwig/Particles/t
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup t
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/t
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup tbar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/tbar
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup tbar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/tbar
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup g
-insert MFactory:ParticleGroup 0 /Herwig/Particles/g
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup g
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/g
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup gamma
-insert MFactory:ParticleGroup 0 /Herwig/Particles/gamma
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup gamma
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/gamma
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup h0
-insert MFactory:ParticleGroup 0 /Herwig/Particles/h0
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup h0
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/h0
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup W+
-insert MFactory:ParticleGroup 0 /Herwig/Particles/W+
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup W+
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/W+
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup W-
-insert MFactory:ParticleGroup 0 /Herwig/Particles/W-
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup W-
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/W-
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup Z0
-insert MFactory:ParticleGroup 0 /Herwig/Particles/Z0
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup Z0
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/Z0
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup e+
-insert MFactory:ParticleGroup 0 /Herwig/Particles/e+
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup e+
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/e+
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup e-
-insert MFactory:ParticleGroup 0 /Herwig/Particles/e-
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup e-
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/e-
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup mu+
-insert MFactory:ParticleGroup 0 /Herwig/Particles/mu+
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup mu+
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/mu+
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup mu-
-insert MFactory:ParticleGroup 0 /Herwig/Particles/mu-
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup mu-
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/mu-
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup tau+
-insert MFactory:ParticleGroup 0 /Herwig/Particles/tau+
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup tau+
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/tau+
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup tau-
-insert MFactory:ParticleGroup 0 /Herwig/Particles/tau-
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup tau-
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/tau-
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup l
-insert MFactory:ParticleGroup 0 /Herwig/Particles/e+
-insert MFactory:ParticleGroup 0 /Herwig/Particles/mu+
-insert MFactory:ParticleGroup 0 /Herwig/Particles/e-
-insert MFactory:ParticleGroup 0 /Herwig/Particles/mu-
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup l
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/e+
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/mu+
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/e-
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/mu-
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup nu
-insert MFactory:ParticleGroup 0 /Herwig/Particles/nu_e
-insert MFactory:ParticleGroup 0 /Herwig/Particles/nu_mu
-insert MFactory:ParticleGroup 0 /Herwig/Particles/nu_ebar
-insert MFactory:ParticleGroup 0 /Herwig/Particles/nu_mubar
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup nu
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/nu_e
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/nu_mu
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/nu_ebar
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/nu_mubar
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup l+
-insert MFactory:ParticleGroup 0 /Herwig/Particles/e+
-insert MFactory:ParticleGroup 0 /Herwig/Particles/mu+
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup l+
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/e+
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/mu+
+do MergingFactory:EndParticleGroup
-do MFactory:StartParticleGroup l-
-insert MFactory:ParticleGroup 0 /Herwig/Particles/e-
-insert MFactory:ParticleGroup 0 /Herwig/Particles/mu-
-do MFactory:EndParticleGroup
+do MergingFactory:StartParticleGroup l-
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/e-
+insert MergingFactory:ParticleGroup 0 /Herwig/Particles/mu-
+do MergingFactory:EndParticleGroup
################################################################################
# Setup amplitudes
################################################################################
cd /Herwig/MatrixElements/Matchbox/Amplitudes/Builtin
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudellbarqqbar
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudellbarqqbarg
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudellbarqqbargg
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudellbarqqbarqqbar
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudelnuqqbar
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudelnuqqbarg
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudelnuqqbargg
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudelnuqqbarqqbar
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudehgg
-insert /Herwig/Merging/MFactory:Amplitudes 0 Amplitudehggg
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudellbarqqbar
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudellbarqqbarg
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudellbarqqbargg
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudellbarqqbarqqbar
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudelnuqqbar
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudelnuqqbarg
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudelnuqqbargg
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudelnuqqbarqqbar
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudehgg
+insert /Herwig/Merging/MergingFactory:Amplitudes 0 Amplitudehggg
################################################################################
# Setup utilities for process generation
################################################################################
cd /Herwig/MatrixElements/Matchbox
cd Utility
-set /Herwig/Merging/MFactory:DiagramGenerator DiagramGenerator
-set /Herwig/Merging/MFactory:ProcessData ProcessData
+set /Herwig/Merging/MergingFactory:DiagramGenerator DiagramGenerator
+set /Herwig/Merging/MergingFactory:ProcessData ProcessData
################################################################################
# Setup phasespace generators
################################################################################
cd /Herwig/MatrixElements/Matchbox
cd Phasespace
-set /Herwig/Merging/MFactory:Phasespace TreePhasespace
+set /Herwig/Merging/MergingFactory:Phasespace TreePhasespace
################################################################################
# Setup scale choices
################################################################################
cd /Herwig/Merging
create Herwig::MScale MScale
-set MFactory:ScaleChoice MScale
+set MergingFactory:ScaleChoice MScale
create Herwig::Merger Merger
create Herwig::MergingReweight MPreWeight HwDipoleShower.so
-insert MFactory:Preweighters 0 MPreWeight
+insert MergingFactory:Preweighters 0 MPreWeight
create Herwig::SimpleColourBasis LargeNColourBasis
set LargeNColourBasis:LargeN On
set Merger:LargeNBasis LargeNColourBasis
################################################################################
# Factories for different colliders
################################################################################
set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV
-cp MFactory EEMFactory
-set EEMFactory:PartonExtractor /Herwig/Partons/EEExtractor
-set EEMFactory:Cuts /Herwig/Cuts/EECuts
-set EEMFactory:FirstPerturbativePDF No
-set EEMFactory:SecondPerturbativePDF No
+cp MergingFactory EEMergingFactory
+set EEMergingFactory:PartonExtractor /Herwig/Partons/EEExtractor
+set EEMergingFactory:Cuts /Herwig/Cuts/EECuts
+set EEMergingFactory:FirstPerturbativePDF No
+set EEMergingFactory:SecondPerturbativePDF No
-cp MFactory DISMFactory
+cp MergingFactory DISMergingFactory
-set DISMFactory:PartonExtractor /Herwig/Partons/DISExtractor
-set DISMFactory:Cuts /Herwig/Cuts/DISCuts
-set DISMFactory:FirstPerturbativePDF No
-set DISMFactory:SecondPerturbativePDF Yes
+set DISMergingFactory:PartonExtractor /Herwig/Partons/DISExtractor
+set DISMergingFactory:Cuts /Herwig/Cuts/DISCuts
+set DISMergingFactory:FirstPerturbativePDF No
+set DISMergingFactory:SecondPerturbativePDF Yes
-cp MFactory PPMFactory
-set PPMFactory:PartonExtractor /Herwig/Partons/QCDExtractor
-set PPMFactory:Cuts /Herwig/Cuts/QCDCuts
-set PPMFactory:FirstPerturbativePDF Yes
-set PPMFactory:SecondPerturbativePDF Yes
+cp MergingFactory PPMergingFactory
+set PPMergingFactory:PartonExtractor /Herwig/Partons/QCDExtractor
+set PPMergingFactory:Cuts /Herwig/Cuts/QCDCuts
+set PPMergingFactory:FirstPerturbativePDF Yes
+set PPMergingFactory:SecondPerturbativePDF Yes
cd /

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 21, 5:29 PM (12 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023643
Default Alt Text
(356 KB)

Event Timeline