Page MenuHomeHEPForge

No OneTemporary

diff --git a/MatrixElement/Powheg/MEPP2GammaGammaPowheg.cc b/MatrixElement/Powheg/MEPP2GammaGammaPowheg.cc
new file mode 100644
--- /dev/null
+++ b/MatrixElement/Powheg/MEPP2GammaGammaPowheg.cc
@@ -0,0 +1,2200 @@
+// -*- C++ -*-
+//
+// This is the implementation of the non-inlined, non-templated member
+// functions of the MEPP2GammaGammaPowheg class.
+//
+
+#include "MEPP2GammaGammaPowheg.h"
+#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/Interface/Switch.h"
+#include "ThePEG/Interface/Parameter.h"
+#include "ThePEG/Interface/Reference.h"
+#include "ThePEG/Persistency/PersistentOStream.h"
+#include "ThePEG/Persistency/PersistentIStream.h"
+#include "ThePEG/PDT/EnumParticles.h"
+#include "ThePEG/MatrixElement/Tree2toNDiagram.h"
+#include "ThePEG/Cuts/Cuts.h"
+#include "ThePEG/Utilities/SimplePhaseSpace.h"
+#include "Herwig/Models/StandardModel/StandardModel.h"
+#include "Herwig/Utilities/Maths.h"
+#include "Herwig/Shower/Base/ShowerTree.h"
+#include "Herwig/Shower/Base/ShowerProgenitor.h"
+#include "Herwig/Shower/Base/ShowerParticle.h"
+#include "Herwig/Shower/Base/Branching.h"
+#include "Herwig/Shower/Base/HardTree.h"
+#include "ThePEG/Utilities/DescribeClass.h"
+
+using namespace Herwig;
+
+// The following static variable is needed for the type
+// description system in ThePEG.
+DescribeClass<MEPP2GammaGammaPowheg,Herwig::HwMEBase>
+describeMEPP2GammaGammaPowheg("Herwig::MEPP2GammaGammaPowheg",
+ "HwMEHadron.so HwPowhegMEHadron.so");
+
+unsigned int MEPP2GammaGammaPowheg::orderInAlphaS() const {
+ return 0;
+}
+
+unsigned int MEPP2GammaGammaPowheg::orderInAlphaEW() const {
+ return 2;
+}
+
+IBPtr MEPP2GammaGammaPowheg::clone() const {
+ return new_ptr(*this);
+}
+
+IBPtr MEPP2GammaGammaPowheg::fullclone() const {
+ return new_ptr(*this);
+}
+
+MEPP2GammaGammaPowheg::MEPP2GammaGammaPowheg()
+ : contrib_(1), power_(0.1), process_(0), threeBodyProcess_(0),
+ maxflavour_(5), alphaS_(0.), fixedAlphaS_(false),
+ supressionFunction_(0), supressionScale_(0), lambda_(20.*GeV),
+ preQCDqqbarq_(5.), preQCDqqbarqbar_(0.5), preQCDqg_(50.), preQCDgqbar_(50.),
+ preQEDqqbarq_(40.), preQEDqqbarqbar_(0.5), preQEDqgq_(1.), preQEDgqbarqbar_(1.),
+ minpT_(2.*GeV), scaleChoice_(0), scalePreFactor_(1.)
+{}
+
+void MEPP2GammaGammaPowheg::getDiagrams() const {
+ tcPDPtr gamma = getParticleData(ParticleID::gamma);
+ tcPDPtr g = getParticleData(ParticleID::g);
+ for(int ix=1;ix<=maxflavour_;++ix) {
+ tcPDPtr qk = getParticleData(ix);
+ tcPDPtr qb = qk->CC();
+ // gamma gamma
+ if(process_==0 || process_ == 1) {
+ add(new_ptr((Tree2toNDiagram(3), qk, qk, qb, 1, gamma, 2, gamma, -1)));
+ add(new_ptr((Tree2toNDiagram(3), qk, qk, qb, 2, gamma, 1, gamma, -2)));
+ }
+ // gamma +jet
+ if(process_==0 || process_ == 2) {
+ add(new_ptr((Tree2toNDiagram(3), qk, qb, qb, 1, gamma,
+ 2, g, -4)));
+ add(new_ptr((Tree2toNDiagram(3), qk, qk, qb, 2, gamma,
+ 1, g, -5)));
+ add(new_ptr((Tree2toNDiagram(3), qk, qk, g, 1, gamma,
+ 2, qk, -6)));
+ add(new_ptr((Tree2toNDiagram(2), qk, g, 1, qk, 3, gamma,
+ 3, qk, -7)));
+ add(new_ptr((Tree2toNDiagram(3), g, qb, qb, 2, gamma,
+ 1, qb, -8)));
+ add(new_ptr((Tree2toNDiagram(2), g, qb, 1, qb, 3, gamma,
+ 3, qb, -9)));
+ }
+ // gamma + jet + gamma
+ if((process_==0 && contrib_==1) || process_ == 3) {
+ // gamma + g + gamma
+ if(threeBodyProcess_==0 || threeBodyProcess_==1) {
+ add(new_ptr((Tree2toNDiagram(4), qk, qk, qk, qb, 1, gamma,
+ 2, gamma, 3, g, -10)));
+ add(new_ptr((Tree2toNDiagram(4), qk, qk, qk, qb, 3, gamma,
+ 2, gamma, 1, g, -12)));
+ }
+ // Z + q + gamma
+ if(threeBodyProcess_==0 || threeBodyProcess_==2) {
+ add(new_ptr((Tree2toNDiagram(4),qk,qk,qk,g,1,gamma,2,gamma,3,qk, -20)));
+ add(new_ptr((Tree2toNDiagram(4),qk,qk,qk,g,2,gamma,1,gamma,3,qk, -21)));
+ add(new_ptr((Tree2toNDiagram(3),qk,qk,g,1,gamma,2,qk,5,gamma,5,qk,-22)));
+ }
+ // Z + qbar + gamma
+ if(threeBodyProcess_==0 || threeBodyProcess_==3) {
+ add(new_ptr((Tree2toNDiagram(4),g,qb,qb,qb,3,gamma,2,gamma,1,qb ,-30)));
+ add(new_ptr((Tree2toNDiagram(4),g,qb,qb,qb,2,gamma,3,gamma,1,qb ,-31)));
+ add(new_ptr((Tree2toNDiagram(3),g,qb,qb ,2,gamma,1,qb,5,gamma,5,qb,-32)));
+ }
+ }
+ }
+}
+
+Energy2 MEPP2GammaGammaPowheg::scale() const {
+ Energy2 scale;
+ if(scaleChoice_==0) {
+ Energy pt;
+ if(meMomenta()[2].perp(meMomenta()[0].vect())>=
+ meMomenta()[3].perp(meMomenta()[0].vect())){
+ pt = meMomenta()[2].perp(meMomenta()[0].vect());
+ } else {
+ pt = meMomenta()[3].perp(meMomenta()[0].vect());
+ }
+ scale = sqr(pt);
+ }
+ else if(scaleChoice_==1) {
+ scale = sHat();
+ }
+ return scalePreFactor_*scale;
+}
+
+int MEPP2GammaGammaPowheg::nDim() const {
+ return HwMEBase::nDim() + ( contrib_>=1 ? 3 : 0 );
+}
+
+bool MEPP2GammaGammaPowheg::generateKinematics(const double * r) {
+ // radiative variables
+ if(contrib_>=1) {
+ zTilde_ = r[nDim()-1];
+ vTilde_ = r[nDim()-2];
+ phi_ = Constants::twopi*r[nDim()-3];
+ }
+ // set the jacobian
+ jacobian(1.0);
+ // set up the momenta
+ for ( int i = 2, N = meMomenta().size(); i < N; ++i )
+ meMomenta()[i] = Lorentz5Momentum(ZERO);
+ // generate sHat
+ Energy2 shat(sHat());
+ if(mePartonData().size()==5) {
+ double eps = sqr(meMomenta()[2].mass())/shat;
+ jacobian(jacobian()*(1.-eps));
+ shat *= eps+zTilde_*(1.-eps);
+ }
+ // momenta of the core process
+ double ctmin = -1.0, ctmax = 1.0;
+ Energy q = ZERO;
+ try {
+ q = SimplePhaseSpace::
+ getMagnitude(shat, meMomenta()[2].mass(), ZERO);
+ }
+ catch ( ImpossibleKinematics ) {
+ return false;
+ }
+ Energy e = 0.5*sqrt(shat);
+ Energy2 m22 = meMomenta()[2].mass2();
+ Energy2 e0e2 = 2.0*e*sqrt(sqr(q) + m22);
+ Energy2 e1e2 = 2.0*e*sqrt(sqr(q) + m22);
+ Energy2 e0e3 = 2.0*e*sqrt(sqr(q));
+ Energy2 e1e3 = 2.0*e*sqrt(sqr(q));
+ Energy2 pq = 2.0*e*q;
+ if(mePartonData().size()==4) {
+ Energy2 thmin = lastCuts().minTij(mePartonData()[0], mePartonData()[2]);
+ if ( thmin > ZERO ) ctmax = min(ctmax, (e0e2 - m22 - thmin)/pq);
+ thmin = lastCuts().minTij(mePartonData()[1], mePartonData()[2]);
+ if ( thmin > ZERO ) ctmin = max(ctmin, (thmin + m22 - e1e2)/pq);
+ thmin = lastCuts().minTij(mePartonData()[1], mePartonData()[3]);
+ if ( thmin > ZERO ) ctmax = min(ctmax, (e1e3 - thmin)/pq);
+ thmin = lastCuts().minTij(mePartonData()[0], mePartonData()[3]);
+ if ( thmin > ZERO ) ctmin = max(ctmin, (thmin - e0e3)/pq);
+ Energy ptmin = max(lastCuts().minKT(mePartonData()[2]),
+ lastCuts().minKT(mePartonData()[3]));
+ if ( ptmin > ZERO ) {
+ double ctm = 1.0 - sqr(ptmin/q);
+ if ( ctm <= 0.0 ) return false;
+ ctmin = max(ctmin, -sqrt(ctm));
+ ctmax = min(ctmax, sqrt(ctm));
+ }
+ double ymin2 = lastCuts().minYStar(mePartonData()[2]);
+ double ymax2 = lastCuts().maxYStar(mePartonData()[2]);
+ double ymin3 = lastCuts().minYStar(mePartonData()[3]);
+ double ymax3 = lastCuts().maxYStar(mePartonData()[3]);
+ double ytot = lastCuts().Y() + lastCuts().currentYHat();
+ if ( ymin2 + ytot > -0.9*Constants::MaxRapidity )
+ ctmin = max(ctmin, sqrt(sqr(q) + m22)*tanh(ymin2)/q);
+ if ( ymax2 + ytot < 0.9*Constants::MaxRapidity )
+ ctmax = min(ctmax, sqrt(sqr(q) + m22)*tanh(ymax2)/q);
+ if ( ymin3 + ytot > -0.9*Constants::MaxRapidity )
+ ctmax = min(ctmax, tanh(-ymin3));
+ if ( ymax3 + ytot < 0.9*Constants::MaxRapidity )
+ ctmin = max(ctmin, tanh(-ymax3));
+ if ( ctmin >= ctmax ) return false;
+ }
+ double cth = getCosTheta(ctmin, ctmax, r[0]);
+ Energy pt = q*sqrt(1.0-sqr(cth));
+ phi(rnd(2.0*Constants::pi));
+ meMomenta()[2].setVect(Momentum3( pt*sin(phi()), pt*cos(phi()), q*cth));
+ meMomenta()[3].setVect(Momentum3(-pt*sin(phi()), -pt*cos(phi()), -q*cth));
+ meMomenta()[2].rescaleEnergy();
+ meMomenta()[3].rescaleEnergy();
+ // jacobian
+ tHat(pq*cth + m22 - e0e2);
+ uHat(m22 - shat - tHat());
+ jacobian(pq/shat*Constants::pi*jacobian());
+ // end for 2->2 processes
+ if(mePartonData().size()==4) {
+ vector<LorentzMomentum> out(2);
+ out[0] = meMomenta()[2];
+ out[1] = meMomenta()[3];
+ tcPDVector tout(2);
+ tout[0] = mePartonData()[2];
+ tout[1] = mePartonData()[3];
+ if ( !lastCuts().passCuts(tout, out, mePartonData()[0], mePartonData()[1]) )
+ return false;
+ return true;
+ }
+ // special for 2-3 processes
+ pair<double,double> x = make_pair(lastX1(),lastX2());
+ // partons
+ pair<tcPDPtr,tcPDPtr> partons = make_pair(mePartonData()[0],mePartonData()[1]);
+ // If necessary swap the particle data objects so that
+ // first beam gives the incoming quark
+ if(lastPartons().first ->dataPtr()!=partons.first) {
+ swap(x.first,x.second);
+ }
+ // use vTilde to select the dipole for emission
+ // gamma gamma g processes
+ if(mePartonData()[4]->id()==ParticleID::g) {
+ if(vTilde_<=0.5) {
+ dipole_ = IIQCD1;
+ vTilde_ = 4.*vTilde_;
+ }
+ else {
+ dipole_ = IIQCD2;
+ vTilde_ = 4.*(vTilde_-0.25);
+ }
+ jacobian(2.*jacobian());
+ }
+ // gamma gamma q processes
+ else if(mePartonData()[4]->id()>0&&mePartonData()[4]->id()<6) {
+ if(vTilde_<=1./3.) {
+ dipole_ = IIQCD2;
+ vTilde_ = 3.*vTilde_;
+ }
+ else if(vTilde_<=2./3.) {
+ dipole_ = IFQED1;
+ vTilde_ = 3.*vTilde_-1.;
+ }
+ else {
+ dipole_ = FIQED1;
+ vTilde_ = 3.*vTilde_-2.;
+ }
+ jacobian(3.*jacobian());
+ }
+ // gamma gamma qbar processes
+ else if(mePartonData()[4]->id()<0&&mePartonData()[4]->id()>-6) {
+ if(vTilde_<=1./3.) {
+ dipole_ = IIQCD1;
+ vTilde_ = 3.*vTilde_;
+ }
+ else if(vTilde_<=2./3.) {
+ dipole_ = IFQED2;
+ vTilde_ = 3.*vTilde_-1.;
+ }
+ else {
+ dipole_ = FIQED2;
+ vTilde_ = 3.*vTilde_-2.;
+ }
+ jacobian(3.*jacobian());
+ }
+ else {
+ assert(false);
+ }
+ // initial-initial dipoles
+ if(dipole_<=4) {
+ double z = shat/sHat();
+ double vt = vTilde_*(1.-z);
+ double vJac = 1.-z;
+ Energy pT = sqrt(shat*vt*(1.-vt-z)/z);
+ if(pT<MeV) return false;
+ double rapidity;
+ Energy rs=sqrt(lastS());
+ Lorentz5Momentum pcmf;
+ // emission from first beam
+ if(dipole_<=2) {
+ rapidity = -log(x.second*sqrt(lastS())/pT*vt);
+ pcmf = Lorentz5Momentum(ZERO,ZERO,
+ 0.5*rs*(x.first*z-x.second),
+ 0.5*rs*(x.first*z+x.second));
+ }
+ // emission from second beam
+ else {
+ rapidity = log(x.first *sqrt(lastS())/pT*vt);
+ pcmf = Lorentz5Momentum(ZERO,ZERO,
+ 0.5*rs*(x.first-x.second*z),
+ 0.5*rs*(x.first+x.second*z));
+ }
+ pcmf.rescaleMass();
+ Boost blab(pcmf.boostVector());
+ // emission from the quark radiation
+ vector<Lorentz5Momentum> pnew(5);
+ pnew [0] = Lorentz5Momentum(ZERO,ZERO,0.5*rs*x.first,
+ 0.5*rs*x.first,ZERO);
+ pnew [1] = Lorentz5Momentum(ZERO,ZERO,-0.5*rs*x.second,
+ 0.5*rs*x.second,ZERO) ;
+ pnew [2] = meMomenta()[2];
+ pnew [3] = meMomenta()[3];
+ pnew [4] = Lorentz5Momentum(pT*cos(phi_),pT*sin(phi_),
+ pT*sinh(rapidity),
+ pT*cosh(rapidity), ZERO);
+ pnew[4].rescaleEnergy();
+ Lorentz5Momentum K = pnew [0]+pnew [1]-pnew [4];
+ Lorentz5Momentum Kt = pcmf;
+ Lorentz5Momentum Ksum = K+Kt;
+ Energy2 K2 = K.m2();
+ Energy2 Ksum2 = Ksum.m2();
+ for(unsigned int ix=2;ix<4;++ix) {
+ pnew [ix].boost(blab);
+ pnew [ix] = pnew [ix] - 2.*Ksum*(Ksum*pnew [ix])/Ksum2
+ +2*K*(Kt*pnew [ix])/K2;
+ pnew[ix].rescaleEnergy();
+ }
+ pcmf = Lorentz5Momentum(ZERO,ZERO,
+ 0.5*rs*(x.first-x.second),
+ 0.5*rs*(x.first+x.second));
+ pcmf.rescaleMass();
+ blab = pcmf.boostVector();
+ for(unsigned int ix=0;ix<pnew.size();++ix)
+ pnew[ix].boost(-blab);
+ // phase-space prefactors
+ jacobian(jacobian()*vJac);
+ if(dipole_%2!=0) swap(pnew[3],pnew[4]);
+ for(unsigned int ix=2;ix<meMomenta().size();++ix)
+ meMomenta()[ix] = pnew[ix];
+ }
+ else if(dipole_<=8) {
+ double x = shat/sHat();
+ double z = vTilde_;
+ double x1 = -1./x;
+ double x3 = 1.-z/x;
+ double x2 = 2.+x1-x3;
+ double xT = sqrt(4.*(1-x)*(1-z)*z/x);
+ // rotate the momenta into the Breit-frame
+ Lorentz5Momentum pin,pcmf;
+ if(dipole_<=6) {
+ pin = x*meMomenta()[0];
+ pcmf = pin+meMomenta()[1];
+ }
+ else {
+ pin = x*meMomenta()[1];
+ pcmf = pin+meMomenta()[0];
+ }
+ Boost bv = pcmf.boostVector();
+ meMomenta()[2].boost(bv);
+ meMomenta()[3].boost(bv);
+ Lorentz5Momentum q = meMomenta()[3]-pin;
+ Axis axis(q.vect().unit());
+ LorentzRotation rot;
+ double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
+ rot = LorentzRotation();
+ if(axis.perp2()>1e-20) {
+ rot.setRotate(-acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
+ rot.rotateX(Constants::pi);
+ }
+ if(abs(1.-q.e()/q.vect().mag())>1e-6)
+ rot.boostZ(q.e()/q.vect().mag());
+ pin *= rot;
+ if(pin.perp2()/GeV2>1e-20) {
+ Boost trans = -1./pin.e()*pin.vect();
+ trans.setZ(0.);
+ rot.boost(trans);
+ }
+ rot.invert();
+ Energy Q = sqrt(-q.m2());
+ meMomenta()[4] = rot*Lorentz5Momentum( 0.5*Q*xT*cos(phi_), 0.5*Q*xT*sin(phi_),
+ -0.5*Q*x2,0.5*Q*sqrt(sqr(x2)+sqr(xT)));
+ meMomenta()[3] = rot*Lorentz5Momentum(-0.5*Q*xT*cos(phi_),-0.5*Q*xT*sin(phi_),
+ -0.5*Q*x3,0.5*Q*sqrt(sqr(x3)+sqr(xT)));
+
+ double ratio;
+ if(dipole_<=6) {
+ ratio = 2.*((meMomenta()[3]+meMomenta()[4])*meMomenta()[0])/sHat();
+ }
+ else {
+ ratio = 2.*((meMomenta()[3]+meMomenta()[4])*meMomenta()[1])/sHat();
+ }
+ jacobian(jacobian()*ratio);
+ }
+ else {
+ assert(false);
+ }
+ vector<LorentzMomentum> out(3);
+ tcPDVector tout(3);
+ for(unsigned int ix=0;ix<3;++ix) {
+ out[ix] = meMomenta() [2+ix];
+ tout[ix] = mePartonData()[2+ix];
+ }
+ return lastCuts().passCuts(tout, out, mePartonData()[0], mePartonData()[1]);
+}
+
+double MEPP2GammaGammaPowheg::me2() const {
+ // Born configurations
+ if(mePartonData().size()==4) {
+ // gamma gamma core process
+ if(mePartonData()[3]->id()==ParticleID::gamma) {
+ return 2.*Constants::twopi*alphaEM_*
+ loGammaGammaME(mePartonData(),meMomenta(),true);
+ }
+ // V jet core process
+ else if(mePartonData()[3]->id()==ParticleID::g) {
+ return 2.*Constants::twopi*alphaS_*
+ loGammagME(mePartonData(),meMomenta(),true);
+ }
+ else if(mePartonData()[3]->id()>0) {
+ return 2.*Constants::twopi*alphaS_*
+ loGammaqME(mePartonData(),meMomenta(),true);
+ }
+ else if(mePartonData()[3]->id()<0) {
+ return 2.*Constants::twopi*alphaS_*
+ loGammaqbarME(mePartonData(),meMomenta(),true);
+ }
+ else
+ assert(false);
+ }
+ // hard emission configurations
+ else {
+ if(mePartonData()[4]->id()==ParticleID::g)
+ return sHat()*realGammaGammagME (mePartonData(),meMomenta(),dipole_,Hard,true);
+ else if(mePartonData()[4]->id()>0&&mePartonData()[4]->id()<6)
+ return sHat()*realGammaGammaqME (mePartonData(),meMomenta(),dipole_,Hard,true);
+ else if(mePartonData()[4]->id()<0&&mePartonData()[4]->id()>-6)
+ return sHat()*realGammaGammaqbarME(mePartonData(),meMomenta(),dipole_,Hard,true);
+ else
+ assert(false);
+ }
+}
+
+CrossSection MEPP2GammaGammaPowheg::dSigHatDR() const {
+ // couplings
+ if(!fixedAlphaS_) alphaS_ = SM().alphaS(scale());
+ alphaEM_ = SM().alphaEM();
+ // cross section
+ CrossSection preFactor =
+ jacobian()/(16.0*sqr(Constants::pi)*sHat())*sqr(hbarc);
+ loME_ = me2();
+
+ if( contrib_== 0 || mePartonData().size()==5 ||
+ (mePartonData().size()==4&& mePartonData()[3]->coloured()))
+ return loME_*preFactor;
+ else
+ return NLOWeight()*preFactor;
+}
+
+
+Selector<MEBase::DiagramIndex>
+MEPP2GammaGammaPowheg::diagrams(const DiagramVector & diags) const {
+ if(mePartonData().size()==4) {
+ if(mePartonData()[3]->id()==ParticleID::gamma) {
+
+ Selector<DiagramIndex> sel;
+ for ( DiagramIndex i = 0; i < diags.size(); ++i ){
+ sel.insert(meInfo()[abs(diags[i]->id())], i);
+ }
+ return sel;
+ }
+ else {
+ Selector<DiagramIndex> sel;
+ for ( DiagramIndex i = 0; i < diags.size(); ++i ){
+ sel.insert(meInfo()[abs(diags[i]->id())%2], i);
+ }
+ return sel;
+ }
+ }
+ else {
+ Selector<DiagramIndex> sel;
+ for ( DiagramIndex i = 0; i < diags.size(); ++i ) {
+ if(abs(diags[i]->id()) == 10 && dipole_ == IIQCD2 )
+ sel.insert(1., i);
+ else if(abs(diags[i]->id()) == 12 && dipole_ == IIQCD1 )
+ sel.insert(1., i);
+ else if(abs(diags[i]->id()) == 20 && dipole_ == IIQCD2 )
+ sel.insert(1., i);
+ else if(abs(diags[i]->id()) == 21 && dipole_ == IFQED1 )
+ sel.insert(1., i);
+ else if(abs(diags[i]->id()) == 22 && dipole_ == FIQED1 )
+ sel.insert(1., i);
+ else
+ sel.insert(0., i);
+ }
+ return sel;
+ }
+}
+
+Selector<const ColourLines *>
+MEPP2GammaGammaPowheg::colourGeometries(tcDiagPtr diag) const {
+ // colour lines for V gamma
+ static ColourLines cs("1 -2");
+ static ColourLines ct("1 2 -3");
+ // colour lines for q qbar -> V g
+ static const ColourLines cqqbar[2]={ColourLines("1 -2 5,-3 -5"),
+ ColourLines("1 5,-5 2 -3")};
+ // colour lines for q g -> V q
+ static const ColourLines cqg [2]={ColourLines("1 2 -3,3 5"),
+ ColourLines("1 -2,2 3 5")};
+ // colour lines for g qbar -> V qbar
+ static const ColourLines cgqbar[2]={ColourLines("-3 -2 1,-1 -5"),
+ ColourLines("-2 1,-1 -3 -5")};
+ // colour lines for q qbar -> V gamma g
+ static const ColourLines cqqbarg[4]={ColourLines("1 2 3 7,-4 -7"),
+ ColourLines("1 2 7,-4 3 -7"),
+ ColourLines("1 7,-4 3 2 -7"),
+ ColourLines("1 2 7,-4 3 -7")};
+ // colour lines for q g -> V gamma q
+ static const ColourLines cqgq [3]={ColourLines("1 2 3 -4,4 7"),
+ ColourLines("1 2 3 -4,4 7"),
+ ColourLines("1 2 -3,3 5 7")};
+ // colour lines for gbar -> V gamma qbar
+ static const ColourLines cqbargqbar[3]={ColourLines("1 -2 -3 -4,-1 -7"),
+ ColourLines("1 -2 -3 -4,-1 -7"),
+ ColourLines("1 -2 -3,-1 -5 -7")};
+ Selector<const ColourLines *> sel;
+ switch(abs(diag->id())) {
+ case 1 :case 2 :
+ sel.insert(1.0, &ct);
+ break;
+ case 3 :
+ sel.insert(1.0, &cs);
+ break;
+ case 4 :
+ sel.insert(1.0, &cqqbar[0]);
+ break;
+ case 5:
+ sel.insert(1.0, &cqqbar[1]);
+ break;
+ case 6:
+ sel.insert(1.0, &cqg[0]);
+ break;
+ case 7:
+ sel.insert(1.0, &cqg[1]);
+ break;
+ case 8:
+ sel.insert(1.0, &cgqbar[0]);
+ break;
+ case 9:
+ sel.insert(1.0, &cgqbar[1]);
+ break;
+ case 10: case 11: case 12: case 13:
+ sel.insert(1.0, &cqqbarg[abs(diag->id())-10]);
+ break;
+ case 20: case 21: case 22:
+ sel.insert(1.0, &cqgq[abs(diag->id())-20]);
+ break;
+ case 30: case 31: case 32:
+ sel.insert(1.0, &cqbargqbar[abs(diag->id())-30]);
+ break;
+ default:
+ assert(false);
+ }
+ return sel;
+}
+
+void MEPP2GammaGammaPowheg::persistentOutput(PersistentOStream & os) const {
+ os << FFPvertex_ << FFGvertex_
+ << contrib_ << power_ << gluon_ << prefactor_
+ << process_ << threeBodyProcess_<< maxflavour_
+ << alphaS_ << fixedAlphaS_
+ << supressionFunction_ << supressionScale_ << ounit(lambda_,GeV)
+ << alphaQCD_ << alphaQED_ << ounit(minpT_,GeV)
+ << preQCDqqbarq_ << preQCDqqbarqbar_ << preQCDqg_ << preQCDgqbar_
+ << preQEDqqbarq_ << preQEDqqbarqbar_ << preQEDqgq_ << preQEDgqbarqbar_
+ << scaleChoice_ << scalePreFactor_;
+}
+
+void MEPP2GammaGammaPowheg::persistentInput(PersistentIStream & is, int) {
+ is >> FFPvertex_ >> FFGvertex_
+ >> contrib_ >> power_ >> gluon_ >> prefactor_
+ >> process_ >> threeBodyProcess_ >> maxflavour_
+ >> alphaS_ >> fixedAlphaS_
+ >> supressionFunction_ >> supressionScale_ >> iunit(lambda_,GeV)
+ >> alphaQCD_ >> alphaQED_ >> iunit(minpT_,GeV)
+ >> preQCDqqbarq_ >> preQCDqqbarqbar_ >> preQCDqg_ >> preQCDgqbar_
+ >> preQEDqqbarq_ >> preQEDqqbarqbar_ >> preQEDqgq_ >> preQEDgqbarqbar_
+ >> scaleChoice_ >> scalePreFactor_;
+}
+
+void MEPP2GammaGammaPowheg::Init() {
+
+ static ClassDocumentation<MEPP2GammaGammaPowheg> documentation
+ ("TheMEPP2GammaGammaPowheg class implements gamma gamma production at NLO");
+
+ static Switch<MEPP2GammaGammaPowheg,unsigned int> interfaceProcess
+ ("Process",
+ "Which processes to include",
+ &MEPP2GammaGammaPowheg::process_, 0, false, false);
+ static SwitchOption interfaceProcessAll
+ (interfaceProcess,
+ "All",
+ "Include all the processes",
+ 0);
+ static SwitchOption interfaceProcessGammaGamma
+ (interfaceProcess,
+ "GammaGamma",
+ "Only include gamma gamma",
+ 1);
+ static SwitchOption interfaceProcessVJet
+ (interfaceProcess,
+ "VJet",
+ "Only include gamma + jet",
+ 2);
+ static SwitchOption interfaceProcessHard
+ (interfaceProcess,
+ "Hard",
+ "Only include hard radiation contributions",
+ 3);
+
+ static Switch<MEPP2GammaGammaPowheg,unsigned int> interfaceThreeBodyProcess
+ ("ThreeBodyProcess",
+ "The possible three body processes to include",
+ &MEPP2GammaGammaPowheg::threeBodyProcess_, 0, false, false);
+ static SwitchOption interfaceThreeBodyProcessAll
+ (interfaceThreeBodyProcess,
+ "All",
+ "Include all processes",
+ 0);
+ static SwitchOption interfaceThreeBodyProcessqqbar
+ (interfaceThreeBodyProcess,
+ "qqbar",
+ "Only include q qbar -> gamma gamma g processes",
+ 1);
+ static SwitchOption interfaceThreeBodyProcessqg
+ (interfaceThreeBodyProcess,
+ "qg",
+ "Only include q g -> gamma gamma q processes",
+ 2);
+ static SwitchOption interfaceThreeBodyProcessgqbar
+ (interfaceThreeBodyProcess,
+ "gqbar",
+ "Only include g qbar -> gamma gamma qbar processes",
+ 3);
+
+ static Switch<MEPP2GammaGammaPowheg,unsigned int> interfaceContribution
+ ("Contribution",
+ "Which contributions to the cross section to include",
+ &MEPP2GammaGammaPowheg::contrib_, 1, false, false);
+ static SwitchOption interfaceContributionLeadingOrder
+ (interfaceContribution,
+ "LeadingOrder",
+ "Just generate the leading order cross section",
+ 0);
+ static SwitchOption interfaceContributionPositiveNLO
+ (interfaceContribution,
+ "PositiveNLO",
+ "Generate the positive contribution to the full NLO cross section",
+ 1);
+ static SwitchOption interfaceContributionNegativeNLO
+ (interfaceContribution,
+ "NegativeNLO",
+ "Generate the negative contribution to the full NLO cross section",
+ 2);
+
+ static Parameter<MEPP2GammaGammaPowheg,int> interfaceMaximumFlavour
+ ("MaximumFlavour",
+ "The maximum flavour allowed for the incoming quarks",
+ &MEPP2GammaGammaPowheg::maxflavour_, 5, 1, 5,
+ false, false, Interface::limited);
+
+ static Parameter<MEPP2GammaGammaPowheg,double> interfaceAlphaS
+ ("AlphaS",
+ "The value of alphaS to use if using a fixed alphaS",
+ &MEPP2GammaGammaPowheg::alphaS_, 0.118, 0.0, 0.2,
+ false, false, Interface::limited);
+
+ static Switch<MEPP2GammaGammaPowheg,bool> interfaceFixedAlphaS
+ ("FixedAlphaS",
+ "Use a fixed value of alphaS",
+ &MEPP2GammaGammaPowheg::fixedAlphaS_, false, false, false);
+ static SwitchOption interfaceFixedAlphaSYes
+ (interfaceFixedAlphaS,
+ "Yes",
+ "Use a fixed alphaS",
+ true);
+ static SwitchOption interfaceFixedAlphaSNo
+ (interfaceFixedAlphaS,
+ "No",
+ "Use a running alphaS",
+ false);
+
+ static Switch<MEPP2GammaGammaPowheg,unsigned int> interfaceSupressionFunction
+ ("SupressionFunction",
+ "Choice of the supression function",
+ &MEPP2GammaGammaPowheg::supressionFunction_, 0, false, false);
+ static SwitchOption interfaceSupressionFunctionNone
+ (interfaceSupressionFunction,
+ "None",
+ "Default POWHEG approach",
+ 0);
+ static SwitchOption interfaceSupressionFunctionThetaFunction
+ (interfaceSupressionFunction,
+ "ThetaFunction",
+ "Use theta functions at scale Lambda",
+ 1);
+ static SwitchOption interfaceSupressionFunctionSmooth
+ (interfaceSupressionFunction,
+ "Smooth",
+ "Supress high pT by pt^2/(pt^2+lambda^2)",
+ 2);
+
+ static Parameter<MEPP2GammaGammaPowheg,Energy> interfaceSupressionScale
+ ("SupressionScale",
+ "The square of the scale for the supression function",
+ &MEPP2GammaGammaPowheg::lambda_, GeV, 20.0*GeV, 0.0*GeV, 0*GeV,
+ false, false, Interface::lowerlim);
+
+ static Switch<MEPP2GammaGammaPowheg,unsigned int> interfaceSupressionScaleChoice
+ ("SupressionScaleChoice",
+ "Choice of the supression scale",
+ &MEPP2GammaGammaPowheg::supressionScale_, 0, false, false);
+ static SwitchOption interfaceSupressionScaleChoiceFixed
+ (interfaceSupressionScaleChoice,
+ "Fixed",
+ "Use a fixed scale",
+ 0);
+ static SwitchOption interfaceSupressionScaleChoiceVariable
+ (interfaceSupressionScaleChoice,
+ "Variable",
+ "Use the pT of the hard process as the scale",
+ 1);
+
+ static Reference<MEPP2GammaGammaPowheg,ShowerAlpha> interfaceShowerAlphaQCD
+ ("ShowerAlphaQCD",
+ "Reference to the object calculating the QCD coupling for the shower",
+ &MEPP2GammaGammaPowheg::alphaQCD_, false, false, true, false, false);
+
+ static Reference<MEPP2GammaGammaPowheg,ShowerAlpha> interfaceShowerAlphaQED
+ ("ShowerAlphaQED",
+ "Reference to the object calculating the QED coupling for the shower",
+ &MEPP2GammaGammaPowheg::alphaQED_, false, false, true, false, false);
+
+ static Parameter<MEPP2GammaGammaPowheg,double> interfacepreQCDqqbarq
+ ("preQCDqqbarq",
+ "The constant for the Sudakov overestimate for the "
+ "q qbar -> V Gamma +g with emission from the q",
+ &MEPP2GammaGammaPowheg::preQCDqqbarq_, 23.0, 0.0, 1000.0,
+ false, false, Interface::limited);
+
+ static Parameter<MEPP2GammaGammaPowheg,double> interfacepreQCDqqbarqbar
+ ("preQCDqqbarqbar",
+ "The constant for the Sudakov overestimate for the "
+ "q qbar -> V Gamma +g with emission from the qbar",
+ &MEPP2GammaGammaPowheg::preQCDqqbarqbar_, 23.0, 0.0, 1000.0,
+ false, false, Interface::limited);
+
+ static Switch<MEPP2GammaGammaPowheg,unsigned int> interfaceScaleChoice
+ ("ScaleChoice",
+ "The scale choice to use",
+ &MEPP2GammaGammaPowheg::scaleChoice_, 0, false, false);
+ static SwitchOption interfaceScaleChoicepT
+ (interfaceScaleChoice,
+ "pT",
+ "Use the pT of the photons",
+ 0);
+ static SwitchOption interfaceScaleChoiceMGammaGamma
+ (interfaceScaleChoice,
+ "MGammaGamma",
+ "Use the mass of the photon pair",
+ 1);
+
+ static Parameter<MEPP2GammaGammaPowheg,double> interfaceScalePreFactor
+ ("ScalePreFactor",
+ "Prefactor to change factorization/renormalisation scale",
+ &MEPP2GammaGammaPowheg::scalePreFactor_, 1.0, 0.1, 10.0,
+ false, false, Interface::limited);
+
+
+// prefactor_.push_back(preQCDqg_);
+// prefactor_.push_back(preQCDgqbar_);
+// prefactor_.push_back(preQEDqqbarq_);
+// prefactor_.push_back(preQEDqqbarqbar_);
+// prefactor_.push_back(preQEDqgq_);
+// prefactor_.push_back(preQEDgqbarqbar_);
+}
+
+double MEPP2GammaGammaPowheg::NLOWeight() const {
+ // if leading-order return
+ if(contrib_==0) return loME_;
+ // prefactors
+ CFfact_ = 4./3.*alphaS_/Constants::twopi;
+ TRfact_ = 1./2.*alphaS_/Constants::twopi;
+ // scale
+ Energy2 mu2 = scale();
+ // virtual pieces
+ double virt = CFfact_*subtractedVirtual();
+ // extract the partons and stuff for the real emission
+ // and collinear counter terms
+ // hadrons
+ pair<tcBeamPtr,tcBeamPtr> hadrons=
+ make_pair(dynamic_ptr_cast<tcBeamPtr>(lastParticles().first->dataPtr() ),
+ dynamic_ptr_cast<tcBeamPtr>(lastParticles().second->dataPtr()));
+ // momentum fractions
+ pair<double,double> x = make_pair(lastX1(),lastX2());
+ // partons
+ pair<tcPDPtr,tcPDPtr> partons = make_pair(mePartonData()[0],mePartonData()[1]);
+ // If necessary swap the particle data objects so that
+ // first beam gives the incoming quark
+ if(lastPartons().first ->dataPtr()!=partons.first) {
+ swap(x.first,x.second);
+ swap(hadrons.first,hadrons.second);
+ }
+ // convert the values of z tilde to z
+ pair<double,double> z;
+ pair<double,double> zJac;
+ double rhomax(pow(1.-x.first,1.-power_));
+ double rho = zTilde_*rhomax;
+ z.first = 1.-pow(rho,1./(1.-power_));
+ zJac.first = rhomax*pow(1.-z.first,power_)/(1.-power_);
+ rhomax = pow(1.-x.second,1.-power_);
+ rho = zTilde_*rhomax;
+ z.second = 1.-pow(rho,1./(1.-power_));
+ zJac.second = rhomax*pow(1.-z.second,power_)/(1.-power_);
+ // calculate the PDFs
+ pair<double,double> oldqPDF =
+ make_pair(hadrons.first ->pdf()->xfx(hadrons.first ,partons.first ,scale(),
+ x.first )/x.first ,
+ hadrons.second->pdf()->xfx(hadrons.second,partons.second,scale(),
+ x.second)/x.second);
+ // real/coll q/qbar
+ pair<double,double> newqPDF =
+ make_pair(hadrons.first ->pdf()->xfx(hadrons.first ,partons.first ,scale(),
+ x.first /z.first )*z.first /x.first ,
+ hadrons.second->pdf()->xfx(hadrons.second,partons.second,scale(),
+ x.second/z.second)*z.second/x.second);
+ // real/coll gluon
+ pair<double,double> newgPDF =
+ make_pair(hadrons.first ->pdf()->xfx(hadrons.first ,gluon_,scale(),
+ x.first /z.first )*z.first /x.first ,
+ hadrons.second->pdf()->xfx(hadrons.second,gluon_,scale(),
+ x.second/z.second)*z.second/x.second);
+ // coll terms
+ // g -> q
+ double collGQ = collinearGluon(mu2,zJac.first,z.first,
+ oldqPDF.first,newgPDF.first);
+ // g -> qbar
+ double collGQbar = collinearGluon(mu2,zJac.second,z.second,
+ oldqPDF.second,newgPDF.second);
+ // q -> q
+ double collQQ = collinearQuark(x.first ,mu2,zJac.first ,z.first ,
+ oldqPDF.first ,newqPDF.first );
+ // qbar -> qbar
+ double collQbarQbar = collinearQuark(x.second,mu2,zJac.second,z.second,
+ oldqPDF.second,newqPDF.second);
+ // collinear remnants
+ double coll = collQQ+collQbarQbar+collGQ+collGQbar;
+ // real emission contribution
+ double real1 = subtractedReal(x,z. first,zJac. first,oldqPDF. first,
+ newqPDF. first,newgPDF. first, true);
+ double real2 = subtractedReal(x,z.second,zJac.second,oldqPDF.second,
+ newqPDF.second,newgPDF.second,false);
+ // the total weight
+ double wgt = loME_ + loME_*virt + loME_*coll + real1 + real2;
+ return contrib_ == 1 ? max(0.,wgt) : max(0.,-wgt);
+}
+
+double MEPP2GammaGammaPowheg::loGammaGammaME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ bool first) const {
+ double output(0.);
+ // analytic formula for speed
+ if(!first) {
+ Energy2 th = (momenta[0]-momenta[2]).m2();
+ Energy2 uh = (momenta[0]-momenta[3]).m2();
+ output = 4./3.*Constants::pi*SM().alphaEM(ZERO)*(th/uh+uh/th)*
+ pow(double(particles[0]->iCharge())/3.,4);
+ }
+ // HE code result
+ else {
+ // wavefunctions for the incoming fermions
+ SpinorWaveFunction em_in( momenta[0],particles[0],incoming);
+ SpinorBarWaveFunction ep_in( momenta[1],particles[1],incoming);
+ // wavefunctions for the outgoing bosons
+ VectorWaveFunction v1_out(momenta[2],particles[2],outgoing);
+ VectorWaveFunction v2_out(momenta[3],particles[3],outgoing);
+ vector<SpinorWaveFunction> f1;
+ vector<SpinorBarWaveFunction> a1;
+ vector<VectorWaveFunction> v1,v2;
+ // calculate the wavefunctions
+ for(unsigned int ix=0;ix<2;++ix) {
+ em_in.reset(ix);
+ f1.push_back(em_in);
+ ep_in.reset(ix);
+ a1.push_back(ep_in);
+ v1_out.reset(2*ix);
+ v1.push_back(v1_out);
+ v2_out.reset(2*ix);
+ v2.push_back(v2_out);
+ }
+ vector<double> me(4,0.0);
+ me_.reset(ProductionMatrixElement(PDT::Spin1Half,PDT::Spin1Half,
+ PDT::Spin1,PDT::Spin1));
+ vector<Complex> diag(2,0.0);
+ SpinorWaveFunction inter;
+ for(unsigned int ihel1=0;ihel1<2;++ihel1) {
+ for(unsigned int ihel2=0;ihel2<2;++ihel2) {
+ for(unsigned int ohel1=0;ohel1<2;++ohel1) {
+ for(unsigned int ohel2=0;ohel2<2;++ohel2) {
+ inter = FFPvertex_->evaluate(ZERO,5,f1[ihel1].particle(),
+ f1[ihel1],v1[ohel1]);
+ diag[0] = FFPvertex_->evaluate(ZERO,inter,a1[ihel2],v2[ohel2]);
+ inter = FFPvertex_->evaluate(ZERO,5,f1[ihel1].particle(),
+ f1[ihel1] ,v2[ohel2]);
+ diag[1] = FFPvertex_->evaluate(ZERO,inter,a1[ihel2],v1[ohel1]);
+ // individual diagrams
+ for (size_t ii=0; ii<2; ++ii) me[ii] += std::norm(diag[ii]);
+ // full matrix element
+ diag[0] += diag[1];
+ output += std::norm(diag[0]);
+ // storage of the matrix element for spin correlations
+ me_(ihel1,ihel2,2*ohel1,2*ohel2) = diag[0];
+ }
+ }
+ }
+ }
+ // store diagram info, etc.
+ DVector save(3);
+ for (size_t i = 0; i < 3; ++i) save[i] = 0.25 * me[i];
+ meInfo(save);
+ // spin and colour factors
+ output *= 0.125/3./norm(FFPvertex_->norm());
+ }
+ return output;
+}
+
+double MEPP2GammaGammaPowheg::loGammaqME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ bool first) const {
+ double output(0.);
+ // analytic formula for speed
+ if(!first) {
+ Energy2 sh = (momenta[0]+momenta[1]).m2();
+ Energy2 th = (momenta[0]-momenta[2]).m2();
+ Energy2 uh = (momenta[0]-momenta[3]).m2();
+ output = -1./3./sh/th*(sh*sh+th*th+2.*uh*(sh+th+uh))*
+ 4.*Constants::pi*SM().alphaEM(ZERO)*
+ sqr(particles[0]->iCharge()/3.);
+ }
+ // HE result
+ else {
+ vector<SpinorWaveFunction> fin;
+ vector<VectorWaveFunction> gin;
+ vector<SpinorBarWaveFunction> fout;
+ vector<VectorWaveFunction> vout;
+ SpinorWaveFunction qin (momenta[0],particles[0],incoming);
+ VectorWaveFunction glin(momenta[1],particles[1],incoming);
+ VectorWaveFunction wout(momenta[2],particles[2],outgoing);
+ SpinorBarWaveFunction qout(momenta[3],particles[3],outgoing);
+ // polarization states for the particles
+ for(unsigned int ix=0;ix<2;++ix) {
+ qin.reset(ix) ;
+ fin.push_back(qin);
+ qout.reset(ix);
+ fout.push_back(qout);
+ glin.reset(2*ix);
+ gin.push_back(glin);
+ wout.reset(2*ix);
+ vout.push_back(wout);
+ }
+ me_.reset(ProductionMatrixElement(PDT::Spin1Half,PDT::Spin1,
+ PDT::Spin1,PDT::Spin1Half));
+ // compute the matrix elements
+ double me[3]={0.,0.,0.};
+ Complex diag[2];
+ SpinorWaveFunction inters;
+ SpinorBarWaveFunction interb;
+ for(unsigned int ihel1=0;ihel1<2;++ihel1) {
+ for(unsigned int ihel2=0;ihel2<2;++ihel2) {
+ for(unsigned int ohel1=0;ohel1<2;++ohel1) {
+ // intermediates for the diagrams
+ interb= FFGvertex_->evaluate(scale(),5,particles[3],
+ fout[ohel1],gin[ihel2]);
+ inters= FFGvertex_->evaluate(scale(),5,particles[0],
+ fin[ihel1],gin[ihel2]);
+ for(unsigned int vhel=0;vhel<2;++vhel) {
+ diag[0] = FFPvertex_->evaluate(ZERO,fin[ihel1],interb,vout[vhel]);
+ diag[1] = FFPvertex_->evaluate(ZERO,inters,fout[ohel1],vout[vhel]);
+ // diagram contributions
+ me[1] += norm(diag[0]);
+ me[2] += norm(diag[1]);
+ // total
+ diag[0] += diag[1];
+ me[0] += norm(diag[0]);
+ me_(ihel1,2*ihel2,2*vhel,ohel1) = diag[0];
+ }
+ }
+ }
+ }
+ // results
+ // initial state spin and colour average
+ double colspin = 1./24./4.;
+ // and C_F N_c from matrix element
+ colspin *= 4.;
+ DVector save;
+ for(unsigned int ix=0;ix<3;++ix) {
+ me[ix] *= colspin;
+ if(ix>0) save.push_back(me[ix]);
+ }
+ meInfo(save);
+ output = me[0]/norm(FFGvertex_->norm());
+ }
+ return output;
+}
+
+double MEPP2GammaGammaPowheg::loGammaqbarME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ bool first) const {
+ double output(0.);
+ // analytic formula for speed
+ if(!first) {
+ Energy2 sh = (momenta[0]+momenta[1]).m2();
+ Energy2 uh = (momenta[0]-momenta[2]).m2();
+ Energy2 th = (momenta[0]-momenta[3]).m2();
+ output = -1./3./sh/th*(sh*sh+th*th+2.*uh*(sh+th+uh))*
+ 4.*Constants::pi*SM().alphaEM()*
+ sqr(particles[1]->iCharge()/3.);
+ }
+ // HE result
+ else {
+ vector<SpinorBarWaveFunction> ain;
+ vector<VectorWaveFunction> gin;
+ vector<SpinorWaveFunction> aout;
+ vector<VectorWaveFunction> vout;
+ VectorWaveFunction glin (momenta[0],particles[0],incoming);
+ SpinorBarWaveFunction qbin (momenta[1],particles[1],incoming);
+ VectorWaveFunction wout (momenta[2],particles[2],outgoing);
+ SpinorWaveFunction qbout(momenta[3],particles[3],outgoing);
+ // polarization states for the particles
+ for(unsigned int ix=0;ix<2;++ix) {
+ qbin .reset(ix );
+ ain .push_back(qbin );
+ qbout.reset(ix );
+ aout.push_back(qbout);
+ glin.reset(2*ix);
+ gin.push_back(glin);
+ wout.reset(2*ix);
+ vout.push_back(wout);
+ }
+ // if calculation spin corrections construct the me
+ me_.reset(ProductionMatrixElement(PDT::Spin1,PDT::Spin1Half,
+ PDT::Spin1,PDT::Spin1Half));
+ // compute the matrix elements
+ double me[3]={0.,0.,0.};
+ Complex diag[2];
+ SpinorWaveFunction inters;
+ SpinorBarWaveFunction interb;
+ for(unsigned int ihel1=0;ihel1<2;++ihel1) {
+ for(unsigned int ihel2=0;ihel2<2;++ihel2) {
+ for(unsigned int ohel1=0;ohel1<2;++ohel1) {
+ // intermediates for the diagrams
+ inters= FFGvertex_->evaluate(scale(),5,particles[3],
+ aout[ohel1],gin[ihel1]);
+ interb= FFGvertex_->evaluate(scale(),5,particles[1],
+ ain[ihel2],gin[ihel1]);
+ for(unsigned int vhel=0;vhel<2;++vhel) {
+ diag[0]= FFPvertex_->evaluate(ZERO,inters,ain[ihel2],vout[vhel]);
+ diag[1]= FFPvertex_->evaluate(ZERO,aout[ohel1],interb,vout[vhel]);
+ // diagram contributions
+ me[1] += norm(diag[0]);
+ me[2] += norm(diag[1]);
+ // total
+ diag[0] += diag[1];
+ me[0] += norm(diag[0]);
+ me_(2*ihel1,ihel2,2*vhel,ohel1) = diag[0];
+ }
+ }
+ }
+ }
+ // results
+ // initial state spin and colour average
+ double colspin = 1./24./4.;
+ // and C_F N_c from matrix element
+ colspin *= 4.;
+ DVector save;
+ for(unsigned int ix=0;ix<3;++ix) {
+ me[ix] *= colspin;
+ if(ix>0) save.push_back(me[ix]);
+ }
+ meInfo(save);
+ output = me[0]/norm(FFGvertex_->norm());
+ }
+ return output;
+}
+
+double MEPP2GammaGammaPowheg::loGammagME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ bool first) const {
+ double output(0.);
+ // analytic formula for speed
+ if(!first) {
+ Energy2 uh = (momenta[0]-momenta[2]).m2();
+ Energy2 th = (momenta[0]-momenta[3]).m2();
+ output = 8./9.*double((th*th+uh*uh)/uh/th)*
+ 4.*Constants::pi*SM().alphaEM(ZERO)*
+ sqr(particles[0]->iCharge()/3.);
+ }
+ else {
+ vector<SpinorWaveFunction> fin;
+ vector<SpinorBarWaveFunction> ain;
+ vector<VectorWaveFunction> gout;
+ vector<VectorWaveFunction> vout;
+ SpinorWaveFunction qin (momenta[0],particles[0],incoming);
+ SpinorBarWaveFunction qbin(momenta[1],particles[1],incoming);
+ VectorWaveFunction wout(momenta[2],particles[2],outgoing);
+ VectorWaveFunction glout(momenta[3],particles[3],outgoing);
+ // polarization states for the particles
+ for(unsigned int ix=0;ix<2;++ix) {
+ qin.reset(ix) ;
+ fin.push_back(qin);
+ qbin.reset(ix) ;
+ ain.push_back(qbin);
+ glout.reset(2*ix);
+ gout.push_back(glout);
+ wout.reset(2*ix);
+ vout.push_back(wout);
+ }
+ // if calculation spin corrections construct the me
+ if(first) me_.reset(ProductionMatrixElement(PDT::Spin1Half,PDT::Spin1Half,
+ PDT::Spin1,PDT::Spin1));
+ // compute the matrix elements
+ double me[3]={0.,0.,0.};
+ Complex diag[2];
+ SpinorWaveFunction inters;
+ SpinorBarWaveFunction interb;
+ for(unsigned int ihel1=0;ihel1<2;++ihel1) {
+ for(unsigned int ihel2=0;ihel2<2;++ihel2) {
+ for(unsigned int ohel1=0;ohel1<2;++ohel1) {
+ // intermediates for the diagrams
+ inters= FFGvertex_->evaluate(scale(),5,particles[0],
+ fin[ihel1],gout[ohel1]);
+ interb= FFGvertex_->evaluate(scale(),5,particles[1],
+ ain[ihel2],gout[ohel1]);
+ for(unsigned int vhel=0;vhel<2;++vhel) {
+ diag[0]= FFPvertex_->evaluate(ZERO,fin[ihel1],interb,vout[vhel]);
+ diag[1]= FFPvertex_->evaluate(ZERO,inters,ain[ihel2],vout[vhel]);
+ // diagram contributions
+ me[1] += norm(diag[0]);
+ me[2] += norm(diag[1]);
+ // total
+ diag[0] += diag[1];
+ me[0] += norm(diag[0]);
+ if(first) me_(ihel1,ihel2,vhel,2*ohel1) = diag[0];
+ }
+ }
+ }
+ }
+ // results
+ // initial state spin and colour average
+ double colspin = 1./9./4.;
+ // and C_F N_c from matrix element
+ colspin *= 4.;
+ DVector save;
+ for(unsigned int ix=0;ix<3;++ix) {
+ me[ix] *= colspin;
+ if(ix>0) save.push_back(me[ix]);
+ }
+ meInfo(save);
+ output = me[0]/norm(FFGvertex_->norm());
+ }
+ return output;
+}
+
+InvEnergy2 MEPP2GammaGammaPowheg::
+realGammaGammagME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ DipoleType dipole, RadiationType rad,
+ bool ) const {
+ // matrix element
+ double sum = realME(particles,momenta);
+ // loop over the QCD and QCD dipoles
+ InvEnergy2 dipoles[2];
+ pair<double,double> supress[2];
+ // compute the two dipole terms
+ unsigned int iemit = 4, ihard = 3;
+ double x = (momenta[0]*momenta[1]-momenta[iemit]*momenta[1]-
+ momenta[iemit]*momenta[0])/(momenta[0]*momenta[1]);
+ Lorentz5Momentum Kt = momenta[0]+momenta[1]-momenta[iemit];
+ vector<Lorentz5Momentum> pa(4),pb(4);
+ // momenta for q -> q g/gamma emission
+ pa[0] = x*momenta[0];
+ pa[1] = momenta[1];
+ Lorentz5Momentum K = pa[0]+pa[1];
+ Lorentz5Momentum Ksum = K+Kt;
+ Energy2 K2 = K.m2();
+ Energy2 Ksum2 = Ksum.m2();
+ pa[2] = momenta[2]-2.*Ksum*(Ksum*momenta[2])/Ksum2+2*K*(Kt*momenta[2])/K2;
+ pa[2].setMass(momenta[2].mass());
+ pa[3] = momenta[ihard]
+ -2.*Ksum*(Ksum*momenta[ihard])/Ksum2+2*K*(Kt*momenta[ihard])/K2;
+ pa[3].setMass(ZERO);
+ cPDVector part(particles.begin(),--particles.end());
+ part[3] = particles[ihard];
+ // first leading-order matrix element
+ double lo1 = loGammaGammaME(part,pa);
+ // first dipole
+ dipoles[0] = 1./(momenta[0]*momenta[iemit])/x*(2./(1.-x)-(1.+x))*lo1;
+ supress[0] = supressionFunction(momenta[iemit].perp(),pa[3].perp());
+ // momenta for qbar -> qbar g/gamma emission
+ pb[0] = momenta[0];
+ pb[1] = x*momenta[1];
+ K = pb[0]+pb[1];
+ Ksum = K+Kt;
+ K2 = K.m2();
+ Ksum2 = Ksum.m2();
+ pb[2] = momenta[2]-2.*Ksum*(Ksum*momenta[2])/Ksum2+2*K*(Kt*momenta[2])/K2;
+ pb[2].setMass(momenta[2].mass());
+ pb[3] = momenta[ihard]
+ -2.*Ksum*(Ksum*momenta[ihard])/Ksum2+2*K*(Kt*momenta[ihard])/K2;
+ pb[3].setMass(ZERO);
+ // second LO matrix element
+ double lo2 = loGammaGammaME(part,pb);
+ // second dipole
+ dipoles[1] = 1./(momenta[1]*momenta[iemit])/x*(2./(1.-x)-(1.+x))*lo2;
+ supress[1] = supressionFunction(momenta[iemit].perp(),pb[3].perp());
+ for(unsigned int ix=0;ix<2;++ix) dipoles[ix] *= 4./3.;
+ // denominator for the matrix element
+ InvEnergy2 denom = abs(dipoles[0]) + abs(dipoles[1]);
+ // contribution
+ if( denom==ZERO || dipoles[(dipole-1)/2]==ZERO ) return ZERO;
+ sum *= abs(dipoles[(dipole-1)/2])/denom;
+ // final coupling factors
+ InvEnergy2 output;
+ if(rad==Subtraction) {
+ output = alphaS_*alphaEM_*
+ (sum*UnitRemoval::InvE2*supress[(dipole-1)/2].first
+ - dipoles[(dipole-1)/2]);
+ }
+ else {
+ output = alphaS_*alphaEM_*sum*UnitRemoval::InvE2;
+ if(rad==Hard) output *=supress[(dipole-1)/2].second;
+ else if(rad==Shower) output *=supress[(dipole-1)/2].first ;
+ }
+ return output;
+}
+
+InvEnergy2 MEPP2GammaGammaPowheg::realGammaGammaqME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ DipoleType dipole, RadiationType rad,
+ bool ) const {
+ double sum = realME(particles,momenta);
+ // initial-state QCD dipole
+ double x = (momenta[0]*momenta[1]-momenta[4]*momenta[1]-
+ momenta[4]*momenta[0])/(momenta[0]*momenta[1]);
+ Lorentz5Momentum Kt = momenta[0]+momenta[1]-momenta[4];
+ vector<Lorentz5Momentum> pa(4);
+ pa[0] = momenta[0];
+ pa[1] = x*momenta[1];
+ Lorentz5Momentum K = pa[0]+pa[1];
+ Lorentz5Momentum Ksum = K+Kt;
+ Energy2 K2 = K.m2();
+ Energy2 Ksum2 = Ksum.m2();
+ pa[2] = momenta[2]-2.*Ksum*(Ksum*momenta[2])/Ksum2+2*K*(Kt*momenta[2])/K2;
+ pa[2].setMass(momenta[2].mass());
+ pa[3] = momenta[3]
+ -2.*Ksum*(Ksum*momenta[3])/Ksum2+2*K*(Kt*momenta[3])/K2;
+ pa[3].setMass(ZERO);
+ cPDVector part(particles.begin(),--particles.end());
+ part[1] = particles[4]->CC();
+ double lo1 = loGammaGammaME(part,pa);
+ InvEnergy2 D1 = 0.5/(momenta[1]*momenta[4])/x*(1.-2.*x*(1.-x))*lo1;
+ // initial-final QED dipole
+ vector<Lorentz5Momentum> pb(4);
+ x = 1.-(momenta[3]*momenta[4])/(momenta[4]*momenta[0]+momenta[0]*momenta[3]);
+ pb[3] = momenta[4]+momenta[3]-(1.-x)*momenta[0];
+ pb[0] = x*momenta[0];
+ pb[1] = momenta[1];
+ pb[2] = momenta[2];
+ double z = momenta[0]*momenta[3]/(momenta[0]*momenta[3]+momenta[0]*momenta[4]);
+ part[1] = particles[1];
+ part[3] = particles[4];
+ double lo2 = loGammaqME(part,pb);
+ Energy pT = sqrt(-(pb[0]-pb[3]).m2()*(1.-x)*(1.-z)*z/x);
+ InvEnergy2 DF = 1./(momenta[4]*momenta[3])/x*(1./(1.-x+z)-2.+z)*lo2;
+ InvEnergy2 DI = 1./(momenta[0]*momenta[3])/x*(1./(1.-x+z)-1.-x)*lo2;
+ DI *= sqr(double(particles[0]->iCharge())/3.);
+ DF *= sqr(double(particles[0]->iCharge())/3.);
+ InvEnergy2 denom = abs(D1)+abs(DI)+abs(DF);
+ pair<double,double> supress;
+ InvEnergy2 term;
+ if ( dipole == IFQED1 ) {
+ term = DI;
+ supress = supressionFunction(pT,pb[3].perp());
+ }
+ else if( dipole == FIQED1 ) {
+ term = DF;
+ supress = supressionFunction(pT,pb[3].perp());
+ }
+ else {
+ term = D1;
+ supress = supressionFunction(momenta[4].perp(),pa[3].perp());
+ }
+ if( denom==ZERO || term == ZERO ) return ZERO;
+ sum *= abs(term)/denom;
+ // final coupling factors
+ InvEnergy2 output;
+ if(rad==Subtraction) {
+ output = alphaS_*alphaEM_*
+ (sum*UnitRemoval::InvE2*supress.first - term);
+ }
+ else {
+ output = alphaS_*alphaEM_*sum*UnitRemoval::InvE2;
+ if(rad==Hard) output *= supress.second;
+ else if(rad==Shower) output *= supress.first ;
+ }
+ // final coupling factors
+ return output;
+}
+
+InvEnergy2 MEPP2GammaGammaPowheg::
+realGammaGammaqbarME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ DipoleType dipole, RadiationType rad,
+ bool) const {
+ double sum = realME(particles,momenta);
+ // initial-state QCD dipole
+ double x = (momenta[0]*momenta[1]-momenta[4]*momenta[1]-momenta[4]*momenta[0])/
+ (momenta[0]*momenta[1]);
+ Lorentz5Momentum Kt = momenta[0]+momenta[1]-momenta[4];
+ vector<Lorentz5Momentum> pa(4);
+ pa[0] = x*momenta[0];
+ pa[1] = momenta[1];
+ Lorentz5Momentum K = pa[0]+pa[1];
+ Lorentz5Momentum Ksum = K+Kt;
+ Energy2 K2 = K.m2();
+ Energy2 Ksum2 = Ksum.m2();
+ pa[2] = momenta[2]-2.*Ksum*(Ksum*momenta[2])/Ksum2+2*K*(Kt*momenta[2])/K2;
+ pa[2].setMass(momenta[2].mass());
+ pa[3] = momenta[3]
+ -2.*Ksum*(Ksum*momenta[3])/Ksum2+2*K*(Kt*momenta[3])/K2;
+ pa[3].setMass(ZERO);
+ cPDVector part(particles.begin(),--particles.end());
+ part[0] = particles[4]->CC();
+ double lo1 = loGammaGammaME(part,pa);
+ InvEnergy2 D1 = 0.5/(momenta[0]*momenta[4])/x*(1.-2.*x*(1.-x))*lo1;
+ // initial-final QED dipole
+ vector<Lorentz5Momentum> pb(4);
+ x = 1.-(momenta[3]*momenta[4])/(momenta[4]*momenta[1]+momenta[1]*momenta[3]);
+ pb[3] = momenta[4]+momenta[3]-(1.-x)*momenta[1];
+ pb[0] = momenta[0];
+ pb[1] = x*momenta[1];
+ pb[2] = momenta[2];
+ double z = momenta[1]*momenta[3]/(momenta[1]*momenta[3]+momenta[1]*momenta[4]);
+ part[0] = particles[0];
+ part[3] = particles[4];
+ double lo2 = loGammaqbarME(part,pb);
+ Energy pT = sqrt(-(pb[1]-pb[3]).m2()*(1.-x)*(1.-z)*z/x);
+ InvEnergy2 DF = 1./(momenta[4]*momenta[3])/x*(2./(1.-x+z)-2.+z)*lo2;
+ InvEnergy2 DI = 1./(momenta[0]*momenta[3])/x*(2./(1.-x+z)-1.-x)*lo2;
+ InvEnergy2 term;
+ DI *= sqr(double(particles[1]->iCharge())/3.);
+ DF *= sqr(double(particles[1]->iCharge())/3.);
+ InvEnergy2 denom = abs(D1)+abs(DI)+abs(DF);
+ pair<double,double> supress;
+ if ( dipole == IFQED2 ) {
+ term = DI;
+ supress = supressionFunction(pT,pb[3].perp());
+ }
+ else if( dipole == FIQED2 ) {
+ term = DF;
+ supress = supressionFunction(pT,pb[3].perp());
+ }
+ else {
+ term = D1;
+ supress = supressionFunction(momenta[4].perp(),pa[3].perp());
+ }
+ if( denom==ZERO || dipole==ZERO ) return ZERO;
+ sum *= abs(term)/denom;
+ // final coupling factors
+ InvEnergy2 output;
+ if(rad==Subtraction) {
+ output = alphaS_*alphaEM_*
+ (sum*UnitRemoval::InvE2*supress.first - term);
+ }
+ else {
+ output = alphaS_*alphaEM_*sum*UnitRemoval::InvE2;
+ if(rad==Hard) output *= supress.second;
+ else if(rad==Shower) output *= supress.first ;
+ }
+ // final coupling factors
+ return output;
+}
+
+double MEPP2GammaGammaPowheg::
+realME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta) const {
+ vector<SpinorWaveFunction> qin;
+ vector<SpinorBarWaveFunction> qbarin;
+ vector<VectorWaveFunction> wout,pout,gout;
+ SpinorWaveFunction q_in;
+ SpinorBarWaveFunction qbar_in;
+ VectorWaveFunction g_out;
+ VectorWaveFunction v_out (momenta[2],particles[2],outgoing);
+ VectorWaveFunction p_out (momenta[3],particles[3],outgoing);
+ // q qbar -> gamma gamma g
+ if(particles[4]->id()==ParticleID::g) {
+ q_in = SpinorWaveFunction (momenta[0],particles[0],incoming);
+ qbar_in = SpinorBarWaveFunction (momenta[1],particles[1],incoming);
+ g_out = VectorWaveFunction (momenta[4],particles[4],outgoing);
+ }
+ // q g -> gamma gamma q
+ else if(particles[4]->id()>0) {
+ q_in = SpinorWaveFunction (momenta[0],particles[0],incoming);
+ qbar_in = SpinorBarWaveFunction (momenta[4],particles[4],outgoing);
+ g_out = VectorWaveFunction (momenta[1],particles[1],incoming);
+ }
+ else if(particles[4]->id()<0) {
+ q_in = SpinorWaveFunction (momenta[4],particles[4],outgoing);
+ qbar_in = SpinorBarWaveFunction (momenta[1],particles[1],incoming);
+ g_out = VectorWaveFunction (momenta[0],particles[0],incoming);
+ }
+ else assert(false);
+ for(unsigned int ix=0;ix<2;++ix) {
+ q_in.reset(ix);
+ qin.push_back(q_in);
+ qbar_in.reset(ix);
+ qbarin.push_back(qbar_in);
+ g_out.reset(2*ix);
+ gout.push_back(g_out);
+ p_out.reset(2*ix);
+ pout.push_back(p_out);
+ v_out.reset(2*ix);
+ wout.push_back(v_out);
+ }
+ vector<Complex> diag(6 , 0.);
+ Energy2 mu2 = scale();
+ double sum(0.);
+ for(unsigned int ihel1=0;ihel1<2;++ihel1) {
+ for(unsigned int ihel2=0;ihel2<2;++ihel2) {
+ for(unsigned int whel=0;whel<2;++whel) {
+ for(unsigned int phel=0;phel<2;++phel) {
+ for(unsigned int ghel=0;ghel<2;++ghel) {
+ // first diagram
+ SpinorWaveFunction inters1 =
+ FFPvertex_->evaluate(ZERO,5,qin[ihel1].particle(),qin[ihel1],pout[phel]);
+ SpinorBarWaveFunction inters2 =
+ FFPvertex_->evaluate(ZERO,5,qin[ihel1].particle()->CC(),
+ qbarin[ihel2],wout[whel]);
+ diag[0] = FFGvertex_->evaluate(mu2,inters1,inters2,gout[ghel]);
+ // second diagram
+ SpinorWaveFunction inters3 =
+ FFGvertex_->evaluate(mu2,5,qin[ihel1].particle(),qin[ihel1],gout[ghel]);
+ SpinorBarWaveFunction inters4 =
+ FFPvertex_->evaluate(ZERO,5,qbarin[ihel2].particle(),
+ qbarin[ihel2],pout[phel]);
+ diag[1] = FFPvertex_->evaluate(ZERO,inters3,inters4,wout[whel]);
+ // fourth diagram
+ diag[2] = FFPvertex_->evaluate(ZERO,inters3,inters2,pout[phel]);
+ // fifth diagram
+ SpinorBarWaveFunction inters5 =
+ FFGvertex_->evaluate(mu2,5,qbarin[ihel2].particle(),
+ qbarin[ihel2],gout[ghel]);
+ diag[3] =
+ FFPvertex_->evaluate(ZERO,inters1,inters5,wout[whel]);
+ // sixth diagram
+ SpinorWaveFunction inters6 =
+ FFPvertex_->evaluate(ZERO,5,qbarin[ihel2].particle()->CC(),
+ qin[ihel1],wout[whel]);
+ diag[4] = FFGvertex_->evaluate(mu2,inters6,inters4,gout[ghel]);
+ // eighth diagram
+ diag[5] = FFPvertex_->evaluate(ZERO,inters6,inters5,pout[phel]);
+ // sum
+ Complex dsum = std::accumulate(diag.begin(),diag.end(),Complex(0.));
+ sum += norm(dsum);
+ }
+ }
+ }
+ }
+ }
+ // divide out the em and strong couplings
+ sum /= norm(FFGvertex_->norm()*FFPvertex_->norm());
+ // final spin and colour factors spin = 1/4 colour = 4/9
+ if(particles[4]->id()==ParticleID::g) sum /= 9.;
+ // final spin and colour factors spin = 1/4 colour = 4/(3*8)
+ else sum /= 24.;
+ // finally identical particle factor
+ return 0.5*sum;
+}
+
+double MEPP2GammaGammaPowheg::subtractedVirtual() const {
+ double v = 1+tHat()/sHat();
+ double born = (1-v)/v+v/(1-v);
+ double finite_term = born*
+ (2./3.*sqr(Constants::pi)-3.+sqr(log(v))+sqr(log(1-v))+3.*log(1-v))+
+ 2.+2.*log(v)+2.*log(1-v)+3.*(1-v)/v*(log(v)-log(1-v))+
+ (2.+v/(1-v))*sqr(log(v))+(2.+(1-v)/v)*sqr(log(1-v));
+
+ double virt = ((6.-(2./3.)*sqr(Constants::pi))*
+ born-2.+finite_term);
+
+ return virt/born;
+}
+
+double MEPP2GammaGammaPowheg::subtractedReal(pair<double,double> x, double z,
+ double zJac, double oldqPDF, double newqPDF,
+ double newgPDF,bool order) const {
+ double vt = vTilde_*(1.-z);
+ double vJac = 1.-z;
+ Energy pT = sqrt(sHat()*vt*(1.-vt-z)/z);
+ // rapidities
+ double rapidity;
+ if(order) {
+ rapidity = -log(x.second*sqrt(lastS())/pT*vt);
+ }
+ else {
+ rapidity = log(x.first *sqrt(lastS())/pT*vt);
+ }
+ // CMS system
+ Energy rs=sqrt(lastS());
+ Lorentz5Momentum pcmf = Lorentz5Momentum(ZERO,ZERO,0.5*rs*(x.first-x.second),
+ 0.5*rs*(x.first+x.second));
+ pcmf.rescaleMass();
+ Boost blab(pcmf.boostVector());
+ // emission from the quark radiation
+ vector<Lorentz5Momentum> pnew(5);
+ if(order) {
+ pnew [0] = Lorentz5Momentum(ZERO,ZERO,0.5*rs*x.first/z,
+ 0.5*rs*x.first/z,ZERO);
+ pnew [1] = Lorentz5Momentum(ZERO,ZERO,-0.5*rs*x.second,
+ 0.5*rs*x.second,ZERO) ;
+ }
+ else {
+ pnew[0] = Lorentz5Momentum(ZERO,ZERO,0.5*rs*x.first,
+ 0.5*rs*x.first,ZERO);
+ pnew[1] = Lorentz5Momentum(ZERO,ZERO,-0.5*rs*x.second/z,
+ 0.5*rs*x.second/z,ZERO) ;
+ }
+ pnew [2] = meMomenta()[2];
+ pnew [3] = meMomenta()[3];
+ pnew [4] = Lorentz5Momentum(pT*cos(phi_),pT*sin(phi_),
+ pT*sinh(rapidity),
+ pT*cosh(rapidity), ZERO);
+ Lorentz5Momentum K = pnew [0]+pnew [1]-pnew [4];
+ Lorentz5Momentum Kt = pcmf;
+ Lorentz5Momentum Ksum = K+Kt;
+ Energy2 K2 = K.m2();
+ Energy2 Ksum2 = Ksum.m2();
+ for(unsigned int ix=2;ix<4;++ix) {
+ pnew [ix].boost(blab);
+ pnew [ix] = pnew [ix] - 2.*Ksum*(Ksum*pnew [ix])/Ksum2
+ +2*K*(Kt*pnew [ix])/K2;
+ }
+ // phase-space prefactors
+ double phase = zJac*vJac/z;
+ // real emission q qbar
+ vector<double> output(4,0.);
+ double realQQ(0.),realGQ(0.);
+ if(!(zTilde_<1e-7 || vt<1e-7 || 1.-z-vt < 1e-7 )) {
+ cPDVector particles(mePartonData());
+ particles.push_back(gluon_);
+ // calculate the full 2->3 matrix element
+ realQQ = sHat()*phase*newqPDF/oldqPDF*
+ realGammaGammagME(particles,pnew,order ? IIQCD1 : IIQCD2,Subtraction,false);
+ if(order) {
+ particles[0] = gluon_;
+ particles[4] = mePartonData()[0]->CC();
+ realGQ = sHat()*phase*newgPDF/oldqPDF*
+ realGammaGammaqbarME(particles,pnew,IIQCD2,Subtraction,false);
+ }
+ else {
+ particles[1] = gluon_;
+ particles[4] = mePartonData()[1]->CC();
+ realGQ = sHat()*phase*newgPDF/oldqPDF*
+ realGammaGammaqME (particles,pnew,IIQCD1,Subtraction,false);
+ }
+ }
+ // return the answer
+ return realQQ+realGQ;
+}
+
+double MEPP2GammaGammaPowheg::collinearQuark(double x, Energy2 mu2, double jac, double z,
+ double oldPDF, double newPDF) const {
+ if(1.-z < 1.e-8) return 0.;
+ return CFfact_*(
+ // this bit is multiplied by LO PDF
+ sqr(Constants::pi)/3.-5.+2.*sqr(log(1.-x ))
+ +(1.5+2.*log(1.-x ))*log(sHat()/mu2)
+ // NLO PDF bit
+ +jac /z * newPDF /oldPDF *
+ (1.-z -(1.+z )*log(sqr(1.-z )/z )
+ -(1.+z )*log(sHat()/mu2)-2.*log(z )/(1.-z ))
+ // + function bit
+ +jac /z *(newPDF /oldPDF -z )*
+ 2./(1.-z )*log(sHat()*sqr(1.-z )/mu2));
+}
+
+double MEPP2GammaGammaPowheg::collinearGluon(Energy2 mu2, double jac, double z,
+ double oldPDF, double newPDF) const {
+ if(1.-z < 1.e-8) return 0.;
+ return TRfact_*jac/z*newPDF/oldPDF*
+ ((sqr(z)+sqr(1.-z))*log(sqr(1.-z)*sHat()/z/mu2)
+ +2.*z*(1.-z));
+}
+
+void MEPP2GammaGammaPowheg::doinit() {
+ HwMEBase::doinit();
+ vector<unsigned int> mopt(2,1);
+ massOption(mopt);
+ // get the vertices we need
+ // get a pointer to the standard model object in the run
+ static const tcHwSMPtr hwsm
+ = dynamic_ptr_cast<tcHwSMPtr>(standardModel());
+ if (!hwsm) throw InitException() << "hwsm pointer is null in"
+ << " MEPP2GammaGamma::doinit()"
+ << Exception::abortnow;
+ // get pointers to all required Vertex objects
+ FFPvertex_ = hwsm->vertexFFP();
+ FFGvertex_ = hwsm->vertexFFG();
+ gluon_ = getParticleData(ParticleID::g);
+ // sampling factors
+ prefactor_.push_back(preQCDqqbarq_);
+ prefactor_.push_back(preQCDqqbarqbar_);
+ prefactor_.push_back(preQCDqg_);
+ prefactor_.push_back(preQCDgqbar_);
+ prefactor_.push_back(preQEDqqbarq_);
+ prefactor_.push_back(preQEDqqbarqbar_);
+ prefactor_.push_back(preQEDqgq_);
+ prefactor_.push_back(preQEDgqbarqbar_);
+}
+
+HardTreePtr MEPP2GammaGammaPowheg::
+generateHardest(ShowerTreePtr tree,
+ vector<ShowerInteraction::Type> interactions) {
+ beams_.clear();
+ partons_.clear();
+ bool QCDAllowed(false),QEDAllowed(false);
+ for(unsigned int ix=0;ix<interactions.size();++ix) {
+ if(interactions[ix]==ShowerInteraction::QED)
+ QEDAllowed = true;
+ else if(interactions[ix]==ShowerInteraction::QCD)
+ QCDAllowed = true;
+ else if(interactions[ix]==ShowerInteraction::Both) {
+ QEDAllowed = true;
+ QCDAllowed = true;
+ }
+ }
+ // find the incoming particles
+ ShowerParticleVector incoming;
+ // get the particles to be showered
+ map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator cit;
+ vector<ShowerProgenitorPtr> particlesToShower;
+ //progenitor particles are produced in z direction.
+ for( cit = tree->incomingLines().begin();
+ cit != tree->incomingLines().end(); ++cit ) {
+ incoming.push_back( cit->first->progenitor() );
+ beams_.push_back( cit->first->beam() );
+ partons_.push_back( cit->first->progenitor()->dataPtr() );
+ particlesToShower.push_back( cit->first );
+ }
+ // find the parton which should be first
+ if( ( particlesToShower[1]->progenitor()->id() > 0 &&
+ particlesToShower[0]->progenitor()->id() < 0 ) ||
+ ( particlesToShower[0]->progenitor()->id() == ParticleID::g &&
+ particlesToShower[1]->progenitor()->id() < 6 &&
+ particlesToShower[1]->progenitor()->id() > 0 ) )
+ swap(particlesToShower[0],particlesToShower[1]);
+ // check that quark is along +ve z direction
+ quarkplus_ = particlesToShower[0]->progenitor()->momentum().z() > ZERO;
+ if( partons_[0]->id() < 0 ||
+ (partons_[0]->id()==ParticleID::g && partons_[1]->id()>0)) {
+ swap(partons_[0],partons_[1]);
+ swap(beams_ [0],beams_ [1]);
+ }
+ // outgoing partons
+ for( map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator
+ cjt= tree->outgoingLines().begin();
+ cjt != tree->outgoingLines().end();++cjt ) {
+ particlesToShower.push_back( cjt->first );
+ }
+ if(particlesToShower.size()!=4) return HardTreePtr();
+ if(particlesToShower[2]->id()!=ParticleID::gamma)
+ swap(particlesToShower[2],particlesToShower[3]);
+ if(particlesToShower[3]->progenitor()->id()==ParticleID::gamma) {
+ if(QCDAllowed) return hardQCDEmission(particlesToShower);
+ }
+ else {
+ if(QEDAllowed) return hardQEDEmission(particlesToShower);
+ }
+ return HardTreePtr();
+}
+
+HardTreePtr MEPP2GammaGammaPowheg::
+hardQCDEmission(vector<ShowerProgenitorPtr> particlesToShower) {
+ Energy rootS = sqrt(lastS());
+ // limits on the rapidity of the jet
+ double minyj = -8.0,maxyj = 8.0;
+ // generate the hard emission
+ pair<double,double> x = make_pair(particlesToShower[0]->progenitor()->x(),
+ particlesToShower[1]->progenitor()->x());
+ vector<Energy> pT;
+ Energy pTmax(-GeV);
+ cPDVector selectedParticles;
+ vector<Lorentz5Momentum> selectedMomenta;
+ int iemit(-1);
+ for(unsigned int ix=0;ix<4;++ix) {
+ pT.push_back(0.5*generator()->maximumCMEnergy());
+ double a = alphaQCD_->overestimateValue()/Constants::twopi*
+ prefactor_[ix]*(maxyj-minyj);
+ cPDVector particles;
+ for(unsigned int iy=0;iy<particlesToShower.size();++iy)
+ particles.push_back(particlesToShower[iy]->progenitor()->dataPtr());
+ if(ix<2) particles.push_back(gluon_);
+ else if(ix==2) {
+ particles.push_back(particles[0]->CC());
+ particles[0] = gluon_;
+ }
+ else {
+ particles.push_back(particles[1]->CC());
+ particles[1] = gluon_;
+ }
+ vector<Lorentz5Momentum> momenta(5);
+ do {
+ pT[ix] *= pow(UseRandom::rnd(),1./a);
+ double y = UseRandom::rnd()*(maxyj-minyj)+ minyj;
+ double vt,z;
+ if(ix%2==0) {
+ vt = pT[ix]*exp(-y)/rootS/x.second;
+ z = (1.-pT[ix]*exp(-y)/rootS/x.second)/(1.+pT[ix]*exp( y)/rootS/x.first );
+ if(z>1.||z<x.first) continue;
+ }
+ else {
+ vt = pT[ix]*exp( y)/rootS/x.first ;
+ z = (1.-pT[ix]*exp( y)/rootS/x.first )/(1.+pT[ix]*exp(-y)/rootS/x.second );
+ if(z>1.||z<x.second) continue;
+ }
+ if(vt>1.-z || vt<0.) continue;
+ if(ix%2==0) {
+ momenta[0] = particlesToShower[0]->progenitor()->momentum()/z;
+ momenta[1] = particlesToShower[1]->progenitor()->momentum();
+ }
+ else {
+ momenta[0] = particlesToShower[0]->progenitor()->momentum();
+ momenta[1] = particlesToShower[1]->progenitor()->momentum()/z;
+ }
+ double phi = Constants::twopi*UseRandom::rnd();
+ momenta[2] = particlesToShower[2]->progenitor()->momentum();
+ momenta[3] = particlesToShower[3]->progenitor()->momentum();
+ if(!quarkplus_) y *= -1.;
+ momenta[4] = Lorentz5Momentum(pT[ix]*cos(phi),pT[ix]*sin(phi),
+ pT[ix]*sinh(y),pT[ix]*cosh(y), ZERO);
+ Lorentz5Momentum K = momenta[0] + momenta[1] - momenta[4];
+ Lorentz5Momentum Kt = momenta[2]+momenta[3];
+ Lorentz5Momentum Ksum = K+Kt;
+ Energy2 K2 = K.m2(), Ksum2 = Ksum.m2();
+ for(unsigned int iy=2;iy<4;++iy) {
+ momenta [iy] = momenta [iy] - 2.*Ksum*(Ksum*momenta [iy])/Ksum2
+ +2*K*(Kt*momenta [iy])/K2;
+ }
+ // matrix element piece
+ double wgt = alphaQCD_->ratio(sqr(pT[ix]))*z/(1.-vt)/prefactor_[ix]/loME_;
+ if(ix==0)
+ wgt *= sqr(pT[ix])*realGammaGammagME(particles,momenta,IIQCD1,Shower,false);
+ else if(ix==1)
+ wgt *= sqr(pT[ix])*realGammaGammagME(particles,momenta,IIQCD2,Shower,false);
+ else if(ix==2)
+ wgt *= sqr(pT[ix])*realGammaGammaqbarME(particles,momenta,IIQCD1,Shower,false);
+ else if(ix==3)
+ wgt *= sqr(pT[ix])*realGammaGammaqME(particles,momenta,IIQCD2,Shower,false);
+ wgt *= 4.*Constants::pi/alphaS_;
+ // pdf piece
+ double pdf[2];
+ if(ix%2==0) {
+ pdf[0] = beams_[0]->pdf()->xfx(beams_[0],partons_ [0],
+ scale(), x.first ) /x.first;
+ pdf[1] = beams_[0]->pdf()->xfx(beams_[0],particles[0],
+ scale()+sqr(pT[ix]),x.first /z)*z/x.first;
+ }
+ else {
+ pdf[0] = beams_[1]->pdf()->xfx(beams_[1],partons_ [1],
+ scale() ,x.second ) /x.second;
+ pdf[1] = beams_[1]->pdf()->xfx(beams_[1],particles[1],
+ scale()+sqr(pT[ix]),x.second/z)*z/x.second;
+ }
+ if(pdf[0]<=0.||pdf[1]<=0.) continue;
+ wgt *= pdf[1]/pdf[0];
+ if(wgt>1.) generator()->log() << "Weight greater than one in "
+ << "MEPP2GammaGammaPowheg::hardQCDEmission() "
+ << "for channel " << ix
+ << " Weight = " << wgt << "\n";
+ if(UseRandom::rnd()<wgt) break;
+ }
+ while(pT[ix]>minpT_);
+ if(pT[ix]>minpT_ && pT[ix]>pTmax) {
+ pTmax = pT[ix];
+ selectedParticles = particles;
+ selectedMomenta = momenta;
+ iemit=ix;
+ }
+ }
+ // if no emission
+ if(pTmax<ZERO) {
+ for(unsigned int ix=0;ix<particlesToShower.size();++ix)
+ particlesToShower[ix]->maximumpT(minpT_,ShowerInteraction::QCD);
+ return HardTreePtr();
+ }
+ // construct the HardTree object needed to perform the showers
+ // create the partons
+ ShowerParticleVector newparticles;
+ newparticles.push_back(new_ptr(ShowerParticle(selectedParticles[0],false)));
+ newparticles.push_back(new_ptr(ShowerParticle(selectedParticles[1],false)));
+ newparticles.push_back(new_ptr(ShowerParticle(selectedParticles[4], true)));
+ // set the momenta
+ for(unsigned int ix=0;ix<2;++ix)
+ newparticles[ix]->set5Momentum(selectedMomenta[ix]);
+ newparticles[2]->set5Momentum(selectedMomenta[4]);
+ // create the off-shell particle
+ Lorentz5Momentum poff = selectedMomenta[iemit%2] - selectedMomenta[4];
+ poff.rescaleMass();
+ newparticles.push_back(new_ptr(ShowerParticle(partons_[iemit%2],false)));
+ newparticles.back()->set5Momentum(poff);
+ for(unsigned int ix=2;ix<particlesToShower.size();++ix) {
+ newparticles.push_back(new_ptr(ShowerParticle(particlesToShower[ix]->
+ progenitor()->dataPtr(),true)));
+ newparticles.back()->set5Momentum(selectedMomenta[ix]);
+ }
+ vector<HardBranchingPtr> inBranch,hardBranch;
+ // create the branchings for the incoming particles
+ inBranch.push_back(new_ptr(HardBranching(newparticles[0],SudakovPtr(),
+ HardBranchingPtr(),HardBranching::Incoming)));
+ inBranch.push_back(new_ptr(HardBranching(newparticles[1],SudakovPtr(),
+ HardBranchingPtr(),HardBranching::Incoming)));
+ // intermediate IS particle
+ hardBranch.push_back(new_ptr(HardBranching(newparticles[3],SudakovPtr(),
+ inBranch[iemit%2],HardBranching::Incoming)));
+ inBranch[iemit%2]->addChild(hardBranch.back());
+ if(newparticles[3]->id()>0)
+ inBranch[iemit%2]->type(ShowerPartnerType::QCDColourLine );
+ else
+ inBranch[iemit%2]->type(ShowerPartnerType::QCDAntiColourLine);
+ // create the branching for the emitted jet
+ inBranch[iemit%2]->addChild(new_ptr(HardBranching(newparticles[2],SudakovPtr(),
+ inBranch[iemit%2],
+ HardBranching::Outgoing)));
+ // set the colour partners
+ hardBranch.back()->colourPartner(inBranch[iemit%2==0 ? 1 : 0]);
+ inBranch[iemit%2==0 ? 1 : 0]->colourPartner(hardBranch.back());
+ // add other particle
+ hardBranch.push_back(inBranch[iemit%2==0 ? 1 : 0]);
+ // outgoing particles
+ for(unsigned int ix=4;ix<newparticles.size();++ix) {
+ hardBranch.push_back(new_ptr(HardBranching(newparticles[ix],SudakovPtr(),
+ HardBranchingPtr(),
+ HardBranching::Outgoing)));
+ }
+ // make the tree
+ HardTreePtr hardtree=new_ptr(HardTree(hardBranch,inBranch,ShowerInteraction::QCD));
+ // connect the ShowerParticles with the branchings
+ // and set the maximum pt for the radiation
+ set<HardBranchingPtr> hard=hardtree->branchings();
+ for(unsigned int ix=0;ix<particlesToShower.size();++ix) {
+ particlesToShower[ix]->maximumpT(pTmax,ShowerInteraction::QCD);
+ for(set<HardBranchingPtr>::const_iterator mit=hard.begin();
+ mit!=hard.end();++mit) {
+ if(particlesToShower[ix]->progenitor()->id()==(*mit)->branchingParticle()->id()&&
+ (( particlesToShower[ix]->progenitor()->isFinalState()&&
+ (**mit).status()==HardBranching::Outgoing)||
+ (!particlesToShower[ix]->progenitor()->isFinalState()&&
+ (**mit).status()==HardBranching::Incoming))) {
+ hardtree->connect(particlesToShower[ix]->progenitor(),*mit);
+ if((**mit).status()==HardBranching::Incoming) {
+ (*mit)->beam(particlesToShower[ix]->original()->parents()[0]);
+ }
+ HardBranchingPtr parent=(*mit)->parent();
+ while(parent) {
+ parent->beam(particlesToShower[ix]->original()->parents()[0]);
+ parent=parent->parent();
+ };
+ }
+ }
+ }
+ ColinePtr newline=new_ptr(ColourLine());
+ for(set<HardBranchingPtr>::const_iterator cit=hardtree->branchings().begin();
+ cit!=hardtree->branchings().end();++cit) {
+ if((**cit).branchingParticle()->dataPtr()->iColour()==PDT::Colour3)
+ newline->addColoured((**cit).branchingParticle());
+ else if((**cit).branchingParticle()->dataPtr()->iColour()==PDT::Colour3bar)
+ newline->addAntiColoured((**cit).branchingParticle());
+ }
+ // return the tree
+ return hardtree;
+}
+
+HardTreePtr MEPP2GammaGammaPowheg::
+hardQEDEmission(vector<ShowerProgenitorPtr> particlesToShower) {
+ // return if not emission from quark
+ if(particlesToShower[0]->progenitor()->id()!=ParticleID::g &&
+ particlesToShower[1]->progenitor()->id()!=ParticleID::g )
+ return HardTreePtr();
+ // generate the hard emission
+ pair<double,double> x = make_pair(particlesToShower[0]->progenitor()->x(),
+ particlesToShower[1]->progenitor()->x());
+ vector<Energy> pT;
+ Energy pTmax(-GeV);
+ cPDVector selectedParticles;
+ vector<Lorentz5Momentum> selectedMomenta;
+ int iemit(-1);
+ pair<double,double> mewgt(make_pair(0.,0.));
+ for(unsigned int ix=0;ix<particlesToShower.size();++ix) {
+ selectedParticles.push_back(particlesToShower[ix]->progenitor()->dataPtr());
+ selectedMomenta.push_back(particlesToShower[ix]->progenitor()->momentum());
+ }
+ selectedParticles.push_back(getParticleData(ParticleID::gamma));
+ swap(selectedParticles[3],selectedParticles[4]);
+ selectedMomenta.push_back(Lorentz5Momentum());
+ swap(selectedMomenta[3],selectedMomenta[4]);
+ Lorentz5Momentum pin,pout;
+ double xB;
+ unsigned int iloc;
+ if(particlesToShower[0]->progenitor()->dataPtr()->charged()) {
+ pin = particlesToShower[0]->progenitor()->momentum();
+ xB = x.first;
+ iloc = 6;
+ }
+ else {
+ pin = particlesToShower[1]->progenitor()->momentum();
+ xB = x.second;
+ iloc = 7;
+ }
+ pout = particlesToShower[3]->progenitor()->momentum();
+ Lorentz5Momentum q = pout-pin;
+ Axis axis(q.vect().unit());
+ LorentzRotation rot;
+ double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
+ rot = LorentzRotation();
+ if(axis.perp2()>1e-20) {
+ rot.setRotate(-acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
+ rot.rotateX(Constants::pi);
+ }
+ if(abs(1.-q.e()/q.vect().mag())>1e-6)
+ rot.boostZ(q.e()/q.vect().mag());
+ Lorentz5Momentum ptemp = rot*pin;
+ if(ptemp.perp2()/GeV2>1e-20) {
+ Boost trans = -1./ptemp.e()*ptemp.vect();
+ trans.setZ(0.);
+ rot.boost(trans);
+ }
+ rot.invert();
+ Energy Q = sqrt(-q.m2());
+ double xT = sqrt((1.-xB)/xB);
+ double xTMin = 2.*minpT_/Q;
+ double wgt(0.);
+ double a = alphaQED_->overestimateValue()*prefactor_[iloc]/Constants::twopi;
+ Lorentz5Momentum p1,p2,p3;
+ do {
+ wgt = 0.;
+ // intergration variables dxT/xT^3
+ xT *= 1./sqrt(1.-2.*log(UseRandom::rnd())/a*sqr(xT));
+ // dz
+ double zp = UseRandom::rnd();
+ double xp = 1./(1.+0.25*sqr(xT)/zp/(1.-zp));
+ if(xT<xTMin) break;
+ // check allowed
+ if(xp<xB||xp>1.) continue;
+ // phase-space piece of the weight
+ wgt = 4.*sqr(1.-xp)*(1.-zp)*zp/prefactor_[iloc]/loME_;
+ // coupling
+ Energy2 pT2 = 0.25*sqr(Q*xT);
+ wgt *= alphaQED_->ratio(pT2);
+ // matrix element
+ wgt *= 4.*Constants::pi/alphaEM_;
+ // PDF
+ double pdf[2];
+ if(iloc==6) {
+ pdf[0] = beams_[0]->pdf()->
+ xfx(beams_[0],partons_[0],scale() ,x.first );
+ pdf[1] = beams_[0]->pdf()->
+ xfx(beams_[0],partons_[0],scale()+pT2,x.first /xp);
+ }
+ else {
+ pdf[0] = beams_[1]->pdf()->
+ xfx(beams_[1],partons_[1],scale() ,x.second );
+ pdf[1] = beams_[1]->pdf()->
+ xfx(beams_[1],partons_[1],scale()+pT2,x.second/xp);
+ }
+ if(pdf[0]<=0.||pdf[1]<=0.) {
+ wgt = 0.;
+ continue;
+ }
+ wgt *= pdf[1]/pdf[0];
+ // matrix element piece
+ double phi = Constants::twopi*UseRandom::rnd();
+ double x2 = 1.-(1.-zp)/xp;
+ double x3 = 2.-1./xp-x2;
+ p1=Lorentz5Momentum(ZERO,ZERO,0.5*Q/xp,0.5*Q/xp,ZERO);
+ p2=Lorentz5Momentum( 0.5*Q*xT*cos(phi), 0.5*Q*xT*sin(phi),
+ -0.5*Q*x2,0.5*Q*sqrt(sqr(xT)+sqr(x2)));
+ p3=Lorentz5Momentum(-0.5*Q*xT*cos(phi),-0.5*Q*xT*sin(phi),
+ -0.5*Q*x3,0.5*Q*sqrt(sqr(xT)+sqr(x3)));
+ selectedMomenta[iloc-6] = rot*p1;
+ selectedMomenta[3] = rot*p3;
+ selectedMomenta[4] = rot*p2;
+ if(iloc==6) {
+ mewgt.first =
+ sqr(Q)*realGammaGammaqME(selectedParticles,selectedMomenta,IFQED1,Shower,false);
+ mewgt.second =
+ sqr(Q)*realGammaGammaqME(selectedParticles,selectedMomenta,FIQED1,Shower,false);
+ wgt *= mewgt.first+mewgt.second;
+ }
+ else {
+ mewgt.first =
+ sqr(Q)*realGammaGammaqbarME(selectedParticles,selectedMomenta,IFQED2,Shower,false);
+ mewgt.second =
+ sqr(Q)*realGammaGammaqbarME(selectedParticles,selectedMomenta,FIQED2,Shower,false);
+ wgt *= mewgt.first+mewgt.second;
+ }
+ if(wgt>1.) generator()->log() << "Weight greater than one in "
+ << "MEPP2GammaGammaPowheg::hardQEDEmission() "
+ << "for IF channel "
+ << " Weight = " << wgt << "\n";
+ }
+ while(xT>xTMin&&UseRandom::rnd()>wgt);
+ // if no emission
+ if(xT<xTMin) {
+ for(unsigned int ix=0;ix<particlesToShower.size();++ix)
+ particlesToShower[ix]->maximumpT(minpT_,ShowerInteraction::QED);
+ return HardTreePtr();
+ }
+ pTmax = 0.5*xT*Q;
+ iemit = mewgt.first>mewgt.second ? 2 : 3;
+ // construct the HardTree object needed to perform the showers
+ // create the partons
+ ShowerParticleVector newparticles;
+ newparticles.push_back(new_ptr(ShowerParticle(selectedParticles[0],false)));
+ newparticles.push_back(new_ptr(ShowerParticle(selectedParticles[1],false)));
+ newparticles.push_back(new_ptr(ShowerParticle(selectedParticles[3], true)));
+ // set the momenta
+ for(unsigned int ix=0;ix<2;++ix)
+ newparticles[ix]->set5Momentum(selectedMomenta[ix]);
+ newparticles[2]->set5Momentum(selectedMomenta[3]);
+ // create the off-shell particle
+ if(iemit==2) {
+ if(particlesToShower[0]->progenitor()->dataPtr()->charged()) {
+ Lorentz5Momentum poff = selectedMomenta[0] - selectedMomenta[3];
+ poff.rescaleMass();
+ newparticles.push_back(new_ptr(ShowerParticle(partons_[0],false)));
+ newparticles.back()->set5Momentum(poff);
+ }
+ else {
+ Lorentz5Momentum poff = selectedMomenta[1] - selectedMomenta[3];
+ poff.rescaleMass();
+ newparticles.push_back(new_ptr(ShowerParticle(partons_[1],false)));
+ newparticles.back()->set5Momentum(poff);
+ }
+ }
+ else if(iemit==3) {
+ Lorentz5Momentum poff = selectedMomenta[3]+selectedMomenta[4];
+ poff.rescaleMass();
+ newparticles.push_back(new_ptr(ShowerParticle(particlesToShower[3]
+ ->progenitor()->dataPtr(),true)));
+ newparticles.back()->set5Momentum(poff);
+ }
+ else
+ assert(false);
+ for(unsigned int ix=2;ix<particlesToShower.size();++ix) {
+ newparticles.push_back(new_ptr(ShowerParticle(particlesToShower[ix]->
+ progenitor()->dataPtr(),true)));
+ newparticles.back()->set5Momentum(selectedMomenta[ix==2 ? 2 : 4 ]);
+ }
+ vector<HardBranchingPtr> inBranch,hardBranch;
+ // create the branchings for the incoming particles
+ inBranch.push_back(new_ptr(HardBranching(newparticles[0],SudakovPtr(),
+ HardBranchingPtr(),HardBranching::Incoming)));
+ inBranch.push_back(new_ptr(HardBranching(newparticles[1],SudakovPtr(),
+ HardBranchingPtr(),HardBranching::Incoming)));
+ if(iemit<3) {
+ int icharged = iemit;
+ if(icharged==2) icharged = particlesToShower[0]->progenitor()->
+ dataPtr()->charged() ? 0 : 1;
+ // intermediate IS particle
+ hardBranch.push_back(new_ptr(HardBranching(newparticles[3],SudakovPtr(),
+ inBranch[icharged],HardBranching::Incoming)));
+ inBranch[icharged]->addChild(hardBranch.back());
+ inBranch[icharged]->type(ShowerPartnerType::QED);
+ // create the branching for the emitted jet
+ inBranch[icharged]->addChild(new_ptr(HardBranching(newparticles[2],SudakovPtr(),
+ inBranch[icharged],
+ HardBranching::Outgoing)));
+ // set the colour partners
+ if(iemit<2) {
+ hardBranch.back()->colourPartner(inBranch[icharged==0 ? 1 : 0]);
+ inBranch[icharged==0 ? 1 : 0]->colourPartner(hardBranch.back());
+ }
+ // add other particle
+ hardBranch.push_back(inBranch[icharged == 0 ? 1 : 0]);
+ // outgoing particles
+ for(unsigned int ix=4;ix<newparticles.size();++ix) {
+ hardBranch.push_back(new_ptr(HardBranching(newparticles[ix],SudakovPtr(),
+ HardBranchingPtr(),
+ HardBranching::Outgoing)));
+ }
+ if(iemit==2) {
+ hardBranch.back()->colourPartner(hardBranch[0]);
+ hardBranch[0]->colourPartner(hardBranch.back());
+ }
+ }
+ else {
+ for(unsigned int ix=0;ix<2;++ix)
+ hardBranch.push_back(inBranch[ix]);
+ hardBranch.push_back(new_ptr(HardBranching(newparticles[4],SudakovPtr(),
+ HardBranchingPtr(),
+ HardBranching::Outgoing)));
+ hardBranch.push_back(new_ptr(HardBranching(newparticles[3],SudakovPtr(),
+ HardBranchingPtr(),
+ HardBranching::Outgoing)));
+ hardBranch.back()->type(ShowerPartnerType::QED);
+ hardBranch.back()->addChild(new_ptr(HardBranching(newparticles[5],SudakovPtr(),
+ HardBranchingPtr(),
+ HardBranching::Outgoing)));
+ hardBranch.back()->addChild(new_ptr(HardBranching(newparticles[2],SudakovPtr(),
+ HardBranchingPtr(),
+ HardBranching::Outgoing)));
+ if(hardBranch[0]->branchingParticle()->dataPtr()->charged()) {
+ hardBranch.back()->colourPartner(hardBranch[0]);
+ hardBranch[0]->colourPartner(hardBranch.back());
+ }
+ else {
+ hardBranch.back()->colourPartner(hardBranch[1]);
+ hardBranch[1]->colourPartner(hardBranch.back());
+ }
+ }
+ // make the tree
+ HardTreePtr hardtree=new_ptr(HardTree(hardBranch,inBranch,ShowerInteraction::QED));
+ // connect the ShowerParticles with the branchings
+ // and set the maximum pt for the radiation
+ set<HardBranchingPtr> hard=hardtree->branchings();
+ for(unsigned int ix=0;ix<particlesToShower.size();++ix) {
+ particlesToShower[ix]->maximumpT(pTmax,ShowerInteraction::QED);
+ for(set<HardBranchingPtr>::const_iterator mit=hard.begin();
+ mit!=hard.end();++mit) {
+ if(particlesToShower[ix]->progenitor()->id()==(*mit)->branchingParticle()->id()&&
+ (( particlesToShower[ix]->progenitor()->isFinalState()&&
+ (**mit).status()==HardBranching::Outgoing)||
+ (!particlesToShower[ix]->progenitor()->isFinalState()&&
+ (**mit).status()==HardBranching::Incoming))) {
+ hardtree->connect(particlesToShower[ix]->progenitor(),*mit);
+ if((**mit).status()==HardBranching::Incoming) {
+ (*mit)->beam(particlesToShower[ix]->original()->parents()[0]);
+ }
+ HardBranchingPtr parent=(*mit)->parent();
+ while(parent) {
+ parent->beam(particlesToShower[ix]->original()->parents()[0]);
+ parent=parent->parent();
+ };
+ }
+ }
+ }
+ ColinePtr newline1 = new_ptr(ColourLine());
+ ColinePtr newline2 = new_ptr(ColourLine());
+ HardBranchingPtr gluon,quark,antiQuark;
+ for(set<HardBranchingPtr>::const_iterator cit=hardtree->branchings().begin();
+ cit!=hardtree->branchings().end();++cit) {
+ if((**cit).branchingParticle()->dataPtr()->iColour()==PDT::Colour8) {
+ gluon = *cit;
+ if((**cit).status()==HardBranching::Incoming) {
+ newline1->addColoured ((**cit).branchingParticle());
+ newline2->addAntiColoured((**cit).branchingParticle());
+ }
+ else {
+ newline2->addColoured ((**cit).branchingParticle());
+ newline1->addAntiColoured((**cit).branchingParticle());
+ }
+ }
+ else if((**cit).branchingParticle()->dataPtr()->iColour()==PDT::Colour3) {
+ if((**cit).status()==HardBranching::Incoming) {
+ antiQuark = *cit;
+ newline2->addColoured((**cit).branchingParticle());
+ }
+ else {
+ quark = *cit;
+ newline1->addColoured((**cit).branchingParticle());
+ }
+ }
+ else if((**cit).branchingParticle()->dataPtr()->iColour()==PDT::Colour3bar) {
+ if((**cit).status()==HardBranching::Incoming) {
+ quark = *cit;
+ newline1->addAntiColoured((**cit).branchingParticle());
+ }
+ else {
+ antiQuark = *cit;
+ newline2->addAntiColoured((**cit).branchingParticle());
+ }
+ }
+ }
+ assert(quark&&antiQuark&&gluon);
+ gluon->colourPartner(UseRandom::rndbool() ? quark : antiQuark);
+ // return the tree
+ return hardtree;
+}
diff --git a/MatrixElement/Powheg/MEPP2GammaGammaPowheg.h b/MatrixElement/Powheg/MEPP2GammaGammaPowheg.h
new file mode 100644
--- /dev/null
+++ b/MatrixElement/Powheg/MEPP2GammaGammaPowheg.h
@@ -0,0 +1,538 @@
+// -*- C++ -*-
+#ifndef HERWIG_MEPP2GammaGammaPowheg_H
+#define HERWIG_MEPP2GammaGammaPowheg_H
+//
+// This is the declaration of the MEPP2GammaGammaPowheg class.
+//
+
+#include "Herwig/MatrixElement/HwMEBase.h"
+#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
+#include "Herwig/MatrixElement/ProductionMatrixElement.h"
+#include "Herwig/Shower/Couplings/ShowerAlpha.h"
+
+namespace Herwig {
+
+using namespace ThePEG;
+
+/**
+ * Here is the documentation of the MEPP2GammaGammaPowheg class.
+ *
+ * @see \ref MEPP2GammaGammaPowhegInterfaces "The interfaces"
+ * defined for MEPP2GammaGammaPowheg.
+ */
+class MEPP2GammaGammaPowheg: public HwMEBase {
+
+ enum DipoleType { IIQCD1=2, IIQCD2=4,
+ IFQED1=5, FIQED1=6, IFQED2=7, FIQED2=8 };
+
+ enum RadiationType {Subtraction,Hard,Shower};
+
+public:
+
+ /** @name Standard constructors and destructors. */
+ //@{
+ /**
+ * The default constructor.
+ */
+ MEPP2GammaGammaPowheg();
+ //@}
+
+ /** @name Member functions for the generation of hard QCD radiation */
+ //@{
+ /**
+ * Has a POWHEG style correction
+ */
+ virtual POWHEGType hasPOWHEGCorrection() {return ISR;}
+
+ /**
+ * Apply the POWHEG style correction
+ */
+ virtual HardTreePtr generateHardest(ShowerTreePtr,
+ vector<ShowerInteraction::Type>);
+ //@}
+
+public:
+
+ /** @name Virtual functions required by the MEBase class. */
+ //@{
+ /**
+ * Return the order in \f$\alpha_S\f$ in which this matrix
+ * element is given.
+ */
+ virtual unsigned int orderInAlphaS() const;
+
+ /**
+ * Return the order in \f$\alpha_{EW}\f$ in which this matrix
+ * element is given.
+ */
+ virtual unsigned int orderInAlphaEW() const;
+
+ /**
+ * The matrix element for the kinematical configuration
+ * previously provided by the last call to setKinematics(), suitably
+ * scaled by sHat() to give a dimension-less number.
+ * @return the matrix element scaled with sHat() to give a
+ * dimensionless number.
+ */
+ virtual double me2() const;
+
+ /**
+ * Return the scale associated with the last set phase space point.
+ */
+ virtual Energy2 scale() const;
+
+ /**
+ * The number of internal degrees of freedom used in the matrix
+ * element.
+ */
+ virtual int nDim() const;
+
+ /**
+ * Generate internal degrees of freedom given nDim() uniform
+ * random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
+ * generator, the dSigHatDR should be a smooth function of these
+ * numbers, although this is not strictly necessary.
+ * @param r a pointer to the first of nDim() consecutive random numbers.
+ * @return true if the generation succeeded, otherwise false.
+ */
+ virtual bool generateKinematics(const double * r);
+
+ /**
+ * Return the matrix element squared differential in the variables
+ * given by the last call to generateKinematics().
+ */
+ virtual CrossSection dSigHatDR() const;
+
+ /**
+ * Add all possible diagrams with the add() function.
+ */
+ virtual void getDiagrams() const;
+
+ /**
+ * Get diagram selector. With the information previously supplied with the
+ * setKinematics method, a derived class may optionally
+ * override this method to weight the given diagrams with their
+ * (although certainly not physical) relative probabilities.
+ * @param dv the diagrams to be weighted.
+ * @return a Selector relating the given diagrams to their weights.
+ */
+ virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
+
+ /**
+ * Return a Selector with possible colour geometries for the selected
+ * diagram weighted by their relative probabilities.
+ * @param diag the diagram chosen.
+ * @return the possible colour geometries weighted by their
+ * relative probabilities.
+ */
+ virtual Selector<const ColourLines *>
+ colourGeometries(tcDiagPtr diag) const;
+ //@}
+
+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:
+
+ /**
+ * Calculate of the full next-to-leading order weight
+ */
+ virtual double NLOWeight() const;
+
+ /**
+ * Leading-order matrix element for \f$q\bar q\to \gamma\gamma\f$
+ */
+ double loGammaGammaME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ bool first=false) const;
+
+ /**
+ * Leading-order matrix element for \f$qg\to \gamma q\f$
+ */
+ double loGammaqME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ bool first=false) const;
+
+ /**
+ * Leading-order matrix element for \f$g\bar q\to \gamma \bar q\f$
+ */
+ double loGammaqbarME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ bool first=false) const;
+
+ /**
+ * Leading-order matrix element for \f$q\bar q\to \gamma g\f$
+ */
+ double loGammagME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ bool first=false) const;
+
+ /**
+ * Real emission matrix element for \f$q\bar q\to \gamma \gamma g\f$
+ */
+ InvEnergy2 realGammaGammagME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ DipoleType dipole, RadiationType rad,
+ bool first=false) const;
+
+ /**
+ * Real emission matrix element for \f$qg\to \gamma \gamma q\f$
+ */
+ InvEnergy2 realGammaGammaqME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ DipoleType dipole, RadiationType rad,
+ bool first=false) const;
+
+ /**
+ * Real emission matrix element for \f$g\bar q\to \gamma \gamma \bar q\f$
+ */
+ InvEnergy2 realGammaGammaqbarME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta,
+ DipoleType dipole, RadiationType rad,
+ bool first=false) const;
+
+ /**
+ * The dipole subtractedvirtual contribution
+ */
+ double subtractedVirtual() const;
+
+ /**
+ * Subtracted real contribution
+ */
+ double subtractedReal(pair<double,double> x, double z,
+ double zJac, double oldqPDF, double newqPDF,
+ double newgPDF,bool order) const;
+
+ /**
+ * Calculate of the collinear counterterms
+ */
+ //@{
+ /**
+ * Quark collinear counter term
+ */
+ double collinearQuark(double x, Energy2 mu2, double jac, double z,
+ double oldPDF, double newPDF) const;
+
+ /**
+ * Gluon collinear counter term
+ */
+ double collinearGluon(Energy2 mu2, double jac, double z,
+ double oldPDF, double newPDF) const;
+ //@}
+
+ /**
+ * The real matrix element divided by \f$2 g_S^2\f$, to be implemented in the
+ * inheriting classes.
+ * @param particles The ParticleData objects of the particles
+ * @param momenta The momenta of the particles
+ */
+ double realME(const cPDVector & particles,
+ const vector<Lorentz5Momentum> & momenta) const;
+
+ /**
+ * Generate hard QCD emission
+ */
+ HardTreePtr hardQCDEmission(vector<ShowerProgenitorPtr>);
+
+ /**
+ * Generate hard QED emission
+ */
+ HardTreePtr hardQEDEmission(vector<ShowerProgenitorPtr>);
+
+ /**
+ * The supression function
+ */
+ pair<double,double> supressionFunction(Energy pT,Energy scale) const {
+ if(supressionScale_==0) scale = lambda_;
+ Energy2 scale2 = sqr(scale), pT2 = sqr(pT);
+ switch( supressionFunction_ ) {
+ case 0:
+ return make_pair(1.,0.);
+ case 1:
+ if(pT < scale ) return make_pair(1.,0.);
+ else return make_pair(0.,1.);
+ case 2:
+ return make_pair(scale2/(pT2+scale2),pT2/(pT2+scale2));
+ default:
+ assert(false);
+ }
+ }
+
+
+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;
+ //@}
+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();
+ //@}
+
+private:
+
+ /**
+ * The assignment operator is private and must never be called.
+ * In fact, it should not even be implemented.
+ */
+ MEPP2GammaGammaPowheg & operator=(const MEPP2GammaGammaPowheg &);
+
+private:
+
+ /**
+ * Vertices
+ */
+ //@{
+ /**
+ * FFPVertex
+ */
+ AbstractFFVVertexPtr FFPvertex_;
+
+ /**
+ * FFGVertex
+ */
+ AbstractFFVVertexPtr FFGvertex_;
+ //@}
+
+ /**
+ * Kinematic variables for the real radiation
+ */
+ //@{
+ /**
+ * First variable
+ */
+ mutable double zTilde_;
+
+ /**
+ * Second variable
+ */
+ mutable double vTilde_;
+
+ /**
+ * Azimuthal angle
+ */
+ mutable double phi_;
+ //@}
+
+ /**
+ * Whether to generate the positive, negative or leading order contribution
+ */
+ unsigned int contrib_;
+
+ /**
+ * Power for sampling \f$x_p\f$
+ */
+ double power_;
+
+ /**
+ * Pointer to the gluon ParticleData object
+ */
+ tcPDPtr gluon_;
+
+ /**
+ * Processes
+ */
+ unsigned int process_;
+
+ /**
+ * Processes
+ */
+ unsigned int threeBodyProcess_;
+
+ /**
+ * Allowed flavours of the incoming quarks
+ */
+ int maxflavour_;
+
+ /**
+ * Factor for \f$C_F\f$ dependent pieces
+ */
+ mutable double CFfact_;
+
+ /**
+ * Factor for \f$T_R\f$ dependent pieces
+ */
+ mutable double TRfact_;
+
+ /**
+ * Strong coupling
+ */
+ mutable double alphaS_;
+
+ /**
+ * Use a fixed value of \f$\alpha_S\f$
+ */
+ bool fixedAlphaS_;
+
+ /**
+ * Electromagnetic coupling
+ */
+ mutable double alphaEM_;
+
+ /**
+ * Leading-order matrix element
+ */
+ mutable double loME_;
+
+ /**
+ * The matrix element
+ */
+ mutable ProductionMatrixElement me_;
+
+ /**
+ * the selected dipole
+ */
+ mutable DipoleType dipole_;
+
+ /**
+ * Supression Function
+ */
+ //@{
+ /**
+ * Choice of the supression function
+ */
+ unsigned int supressionFunction_;
+
+ /**
+ * Choice for the scale in the supression function
+ */
+ unsigned int supressionScale_;
+
+ /**
+ * Scalar for the supression function
+ */
+ Energy lambda_;
+ //@}
+
+
+ /**
+ * Hard emission stuff
+ */
+ //@{
+ /**
+ * Whether the quark is in the + or - z direction
+ */
+ bool quarkplus_;
+ //@}
+
+ /**
+ * Properties of the incoming particles
+ */
+ //@{
+ /**
+ * Pointers to the BeamParticleData objects
+ */
+ vector<tcBeamPtr> beams_;
+
+ /**
+ * Pointers to the ParticleDataObjects for the partons
+ */
+ vector<tcPDPtr> partons_;
+ //@}
+
+ /**
+ * Constants for the sampling. The distribution is assumed to have the
+ * form \f$\frac{c}{{\rm GeV}}\times\left(\frac{{\rm GeV}}{p_T}\right)^n\f$
+ */
+ //@{
+ /**
+ * The prefactor, \f$c\f$ for the \f$q\bar{q}\f$ channel
+ */
+ double preQCDqqbarq_;
+ /**
+ * The prefactor, \f$c\f$ for the \f$q\bar{q}\f$ channel
+ */
+ double preQCDqqbarqbar_;
+
+ /**
+ * The prefactor, \f$c\f$ for the \f$qg\f$ channel
+ */
+ double preQCDqg_;
+
+ /**
+ * The prefactor, \f$c\f$ for the \f$g\bar{q}\f$ channel
+ */
+ double preQCDgqbar_;
+
+ double preQEDqqbarq_;
+ double preQEDqqbarqbar_;
+ double preQEDqgq_;
+ double preQEDgqbarqbar_;
+
+ /**
+ * The prefactors as a vector for easy use
+ */
+ vector<double> prefactor_;
+ //@}
+
+ /**
+ * The transverse momentum of the jet
+ */
+ Energy minpT_;
+
+ /**
+ * Pointer to the object calculating the strong coupling
+ */
+ ShowerAlphaPtr alphaQCD_;
+
+ /**
+ * Pointer to the object calculating the EM
+ */
+ ShowerAlphaPtr alphaQED_;
+
+ /**
+ * Scale choice
+ */
+ unsigned int scaleChoice_;
+
+ /**
+ * Scale factor
+ */
+ double scalePreFactor_;
+
+};
+
+}
+
+#endif /* HERWIG_MEPP2GammaGammaPowheg_H */
diff --git a/MatrixElement/Powheg/Makefile.am b/MatrixElement/Powheg/Makefile.am
--- a/MatrixElement/Powheg/Makefile.am
+++ b/MatrixElement/Powheg/Makefile.am
@@ -1,16 +1,17 @@
pkglib_LTLIBRARIES = HwPowhegMEHadron.la HwPowhegMELepton.la
HwPowhegMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0
HwPowhegMEHadron_la_SOURCES = \
MEqq2gZ2ffPowheg.cc MEqq2gZ2ffPowheg.h \
MEqq2W2ffPowheg.cc MEqq2W2ffPowheg.h \
MEPP2HiggsPowheg.cc MEPP2HiggsPowheg.h \
MEPP2WHPowheg.cc MEPP2WHPowheg.h \
MEPP2ZHPowheg.cc MEPP2ZHPowheg.h \
MEPP2VVPowheg.cc MEPP2VVPowheg.h \
VVKinematics.cc VVKinematics.h \
+MEPP2GammaGammaPowheg.cc MEPP2GammaGammaPowheg.h \
MEPP2HiggsVBFPowheg.cc MEPP2HiggsVBFPowheg.h
HwPowhegMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0
HwPowhegMELepton_la_SOURCES = \
MEee2gZ2qqPowheg.cc MEee2gZ2qqPowheg.h \
MEee2gZ2llPowheg.cc MEee2gZ2llPowheg.h
diff --git a/Tests/Makefile.am b/Tests/Makefile.am
--- a/Tests/Makefile.am
+++ b/Tests/Makefile.am
@@ -1,357 +1,360 @@
AUTOMAKE_OPTIONS = -Wno-portability
AM_LDFLAGS += -module -avoid-version -rpath /dummy/path/not/used
EXTRA_DIST = Inputs python Rivet
dist-hook:
rm -rf $(distdir)/Inputs/.svn
rm -rf $(distdir)/python/.svn
rm -rf $(distdir)/Rivet/.svn
EXTRA_LTLIBRARIES = LeptonTest.la GammaTest.la HadronTest.la DISTest.la
if WANT_LIBFASTJET
EXTRA_LTLIBRARIES += HadronJetTest.la LeptonJetTest.la
HadronJetTest_la_SOURCES = \
Hadron/VHTest.h Hadron/VHTest.cc\
Hadron/VTest.h Hadron/VTest.cc\
Hadron/HTest.h Hadron/HTest.cc
HadronJetTest_la_CPPFLAGS = $(AM_CPPFLAGS) $(FASTJETINCLUDE) \
-I$(FASTJETPATH)
HadronJetTest_la_LIBADD = $(FASTJETLIBS)
LeptonJetTest_la_SOURCES = \
Lepton/TopDecay.h Lepton/TopDecay.cc
LeptonJetTest_la_CPPFLAGS = $(AM_CPPFLAGS) $(FASTJETINCLUDE) \
-I$(FASTJETPATH)
LeptonJetTest_la_LIBADD = $(FASTJETLIBS)
endif
LeptonTest_la_SOURCES = \
Lepton/VVTest.h Lepton/VVTest.cc \
Lepton/VBFTest.h Lepton/VBFTest.cc \
Lepton/VHTest.h Lepton/VHTest.cc \
Lepton/FermionTest.h Lepton/FermionTest.cc
GammaTest_la_SOURCES = \
Gamma/GammaMETest.h Gamma/GammaMETest.cc \
Gamma/GammaPMETest.h Gamma/GammaPMETest.cc
DISTest_la_SOURCES = \
DIS/DISTest.h DIS/DISTest.cc
HadronTest_la_SOURCES = \
Hadron/HadronVVTest.h Hadron/HadronVVTest.cc\
Hadron/HadronVBFTest.h Hadron/HadronVBFTest.cc\
Hadron/WHTest.h Hadron/WHTest.cc\
Hadron/ZHTest.h Hadron/ZHTest.cc\
Hadron/VGammaTest.h Hadron/VGammaTest.cc\
Hadron/ZJetTest.h Hadron/ZJetTest.cc\
Hadron/WJetTest.h Hadron/WJetTest.cc\
Hadron/QQHTest.h Hadron/QQHTest.cc
REPO = $(top_builddir)/src/HerwigDefaults.rpo
HERWIG = $(top_builddir)/src/Herwig
HWREAD = $(HERWIG) read --repo $(REPO) -L $(builddir)/.libs -i $(top_builddir)/src
HWRUN = $(HERWIG) run
tests : tests-LEP tests-DIS tests-LHC tests-Gamma
if WANT_LIBFASTJET
tests-LEP : test-LEP-VV test-LEP-VH test-LEP-VBF test-LEP-BB test-LEP-Quarks test-LEP-Leptons \
test-LEP-default test-LEP-Powheg test-LEP-TopDecay
else
tests-LEP : test-LEP-VV test-LEP-VH test-LEP-VBF test-LEP-BB test-LEP-Quarks test-LEP-Leptons
endif
tests-DIS : test-DIS-Charged test-DIS-Neutral
if WANT_LIBFASTJET
tests-LHC : test-LHC-WW test-LHC-WZ test-LHC-ZZ test-LHC-ZGamma test-LHC-WGamma \
test-LHC-ZH test-LHC-WH test-LHC-ZJet test-LHC-WJet test-LHC-Z test-LHC-W test-LHC-ZZVBF test-LHC-VBF \
test-LHC-WWVBF test-LHC-bbH test-LHC-ttH test-LHC-GammaGamma test-LHC-GammaJet test-LHC-Higgs \
test-LHC-HiggsJet test-LHC-QCDFast test-LHC-QCD test-LHC-Top test-LHC-Bottom \
test-LHC-WHJet test-LHC-ZHJet test-LHC-HJet test-LHC-ZShower test-LHC-WShower\
test-LHC-WHJet-Powheg test-LHC-ZHJet-Powheg test-LHC-HJet-Powheg \
test-LHC-ZShower-Powheg test-LHC-WShower-Powheg
else
tests-LHC : test-LHC-WW test-LHC-WZ test-LHC-ZZ test-LHC-ZGamma test-LHC-WGamma \
test-LHC-ZH test-LHC-WH test-LHC-ZJet test-LHC-WJet test-LHC-Z test-LHC-W test-LHC-ZZVBF test-LHC-VBF \
test-LHC-WWVBF test-LHC-bbH test-LHC-ttH test-LHC-GammaGamma test-LHC-GammaJet test-LHC-Higgs \
test-LHC-HiggsJet test-LHC-QCDFast test-LHC-QCD test-LHC-Top
endif
tests-Gamma : test-Gamma-FF test-Gamma-WW test-Gamma-P
if WANT_LIBFASTJET
test-LEP-% : Inputs/LEP-%.in LeptonTest.la LeptonJetTest.la
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
else
test-LEP-% : Inputs/LEP-%.in LeptonTest.la
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
endif
Rivet-LHC-Matchbox-% : Rivet/LHC-Matchbox-%.in
if [ ! -d Rivet-$(notdir $(subst .in,,$<)) ]; then mkdir Rivet-$(notdir $(subst .in,,$<)); fi;
cd Rivet-$(notdir $(subst .in,,$<)); echo `pwd`; \
../$(HERWIG) read --repo ../$(REPO) -L ../$(top_builddir)/lib -i ../$(top_builddir)/src ../$<; \
../$(HERWIG) run $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}; \
mv $(notdir $(subst .in,.yoda,$<)) ..; \
cd ..
Rivet-TVT-Matchbox-% : Rivet/TVT-Matchbox-%.in
if [ ! -d Rivet-$(notdir $(subst .in,,$<)) ]; then mkdir Rivet-$(notdir $(subst .in,,$<)); fi;
cd Rivet-$(notdir $(subst .in,,$<)); echo `pwd`; \
../$(HERWIG) read --repo ../$(REPO) -L ../$(top_builddir)/lib -i ../$(top_builddir)/src ../$<; \
../$(HERWIG) run $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}; \
mv $(notdir $(subst .in,.yoda,$<)) ..; \
cd ..
Rivet-TVT-Dipole-% : Rivet/TVT-Dipole-%.in
if [ ! -d Rivet-$(notdir $(subst .in,,$<)) ]; then mkdir Rivet-$(notdir $(subst .in,,$<)); fi;
cd Rivet-$(notdir $(subst .in,,$<)); echo `pwd`; \
../$(HERWIG) read --repo ../$(REPO) -L ../$(top_builddir)/lib -i ../$(top_builddir)/src ../$<; \
../$(HERWIG) run $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}; \
mv $(notdir $(subst .in,.yoda,$<)) ..; \
cd ..
Rivet-LHC-Dipole-% : Rivet/LHC-Dipole-%.in
if [ ! -d Rivet-$(notdir $(subst .in,,$<)) ]; then mkdir Rivet-$(notdir $(subst .in,,$<)); fi;
cd Rivet-$(notdir $(subst .in,,$<)); echo `pwd`; \
../$(HERWIG) read --repo ../$(REPO) -L ../$(top_builddir)/lib -i ../$(top_builddir)/src ../$<; \
../$(HERWIG) run $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}; \
mv $(notdir $(subst .in,.yoda,$<)) ..; \
cd ..
Rivet/LEP-%.in :
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet/DIS-%.in :
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet/BFactory-%.in:
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet/TVT-%.in:
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet/LHC-%.in:
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet/Star-%.in:
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet/SppS-%.in:
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet/ISR-%.in:
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet-LEP-Matchbox-% : Rivet/LEP-Matchbox-%.in
if [ ! -d Rivet-$(notdir $(subst .in,,$<)) ]; then mkdir Rivet-$(notdir $(subst .in,,$<)); fi;
cd Rivet-$(notdir $(subst .in,,$<)); echo `pwd`; \
../$(HERWIG) read --repo ../$(REPO) -L ../$(top_builddir)/lib -i ../$(top_builddir)/src ../$<; \
../$(HERWIG) run $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}; \
mv $(notdir $(subst .in,.yoda,$<)) ..; \
cd ..
Rivet-LEP-Dipole-% : Rivet/LEP-Dipole-%.in
if [ ! -d Rivet-$(notdir $(subst .in,,$<)) ]; then mkdir Rivet-$(notdir $(subst .in,,$<)); fi;
cd Rivet-$(notdir $(subst .in,,$<)); echo `pwd`; \
../$(HERWIG) read --repo ../$(REPO) -L ../$(top_builddir)/lib -i ../$(top_builddir)/src ../$<; \
../$(HERWIG) run $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}; \
mv $(notdir $(subst .in,.yoda,$<)) ..; \
cd ..
Rivet-BFactory-Matchbox-% : Rivet/BFactory-Matchbox-%.in
if [ ! -d Rivet-$(notdir $(subst .in,,$<)) ]; then mkdir Rivet-$(notdir $(subst .in,,$<)); fi;
cd Rivet-$(notdir $(subst .in,,$<)); echo `pwd`; \
../$(HERWIG) read --repo ../$(REPO) -L ../$(top_builddir)/lib -i ../$(top_builddir)/src ../$<; \
../$(HERWIG) run $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}; \
mv $(notdir $(subst .in,.yoda,$<)) ..; \
cd ..
Rivet-LEP-% : Rivet/LEP-%.in
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
Rivet-BFactory-% : Rivet/BFactory-%.in
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
Rivet-TVT-% : Rivet/TVT-%.in
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
Rivet-DIS-% : Rivet/DIS-%.in
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
Rivet-LHC-% : Rivet/LHC-%.in
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
Rivet-Star-% : Rivet/Star-%.in
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
Rivet-SppS-% : Rivet/SppS-%.in
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
Rivet-ISR-% : Rivet/ISR-%.in
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
Rivet-inputfiles: $(shell echo Rivet/LEP{,-Powheg,-Matchbox,-Dipole,-Matchbox-Powheg}-{10,14,22,35,44,91,130,133,136,161,172,177,183,189,192,196,197,200,202,206,91-nopi}.in) \
$(shell echo Rivet/BFactory{,-Powheg,-Matchbox,-Dipole,-Matchbox-Powheg}-{10.52,10.52-sym,10.54,10.45,10.58}.in) \
$(shell echo Rivet/BFactory-{Upsilon,Upsilon2,Upsilon4,Tau}.in) \
$(shell echo Rivet/DIS{,-NoME,-Powheg,-Matchbox,-Dipole,-Matchbox-Powheg}-{e--LowQ2,e+-LowQ2,e+-HighQ2}.in) \
$(shell echo Rivet/TVT{,-Powheg,-Matchbox,-Dipole,-Matchbox-Powheg}-{Run-I-Z,Run-I-W,Run-I-WZ,Run-II-Z-e,Run-II-Z-{,LowMass-,HighMass-}mu,Run-II-W}.in) \
- $(shell echo Rivet/TVT-Run-II-{DiPhoton,PromptPhoton}.in) \
+ $(shell echo Rivet/TVT-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet,PromptPhoton}.in) \
+ $(shell echo Rivet/TVT-Powheg-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet}.in) \
$(shell echo Rivet/TVT{,-Dipole,-Matchbox,-Matchbox-Powheg}-{Run-II-Jets-{0..11},Run-I-Jets-{1..8}}.in ) \
$(shell echo Rivet/TVT{,-Dipole,-Matchbox,-Matchbox-Powheg}-{630-Jets-{1..3},300-Jets-1,900-Jets-1}.in ) \
$(shell echo Rivet/TVT-{Run-I,Run-II,300,630,900}-UE.in) \
$(shell echo Rivet/LHC{,-Dipole,-Matchbox,-Matchbox-Powheg}-7-Jets-{0..15}.in ) \
$(shell echo Rivet/LHC-{900,2360,2760,7,8,13}-UE.in ) \
$(shell echo Rivet/LHC-{900,7}-UE-Long.in ) \
$(shell echo Rivet/LHC{,-Dipole,-Matchbox,-Matchbox-Powheg}-7-Charm-{1..5}.in) \
$(shell echo Rivet/LHC{,-Dipole,-Matchbox,-Matchbox-Powheg}-7-Bottom-{0..8}.in) \
$(shell echo Rivet/LHC{,-Matchbox,-Matchbox-Powheg}-7-Top-{L,SL,All}.in) \
$(shell echo Rivet/Star-{UE,Jets-{1..4}}.in ) \
$(shell echo Rivet/ISR-{30,44,53,62}-UE.in ) \
$(shell echo Rivet/SppS-{53,63,200,500,900,546}-UE.in ) \
$(shell echo Rivet/LHC{,-Matchbox,-Matchbox-Powheg,-Powheg,-Dipole}-{W-{e,mu},13-Z-{e,mu},Z-{e,mu},Z-LowMass-{e,mu},Z-MedMass-e,WZ,WW-{emu,ll},ZZ-{ll,lv},W-Z-{e,mu},8-Z-mu}.in) \
$(shell echo Rivet/LHC{,-Matchbox,-Matchbox-Powheg,-Dipole}-{7-W-Jet-{1..3}-e,7-Z-Jet-{0..3}-e,7-Z-Jet-0-mu}.in) \
$(shell echo Rivet/LHC{-Matchbox,-Matchbox-Powheg,-Dipole}-{Z-b,Z-bb,W-b,8-Z-jj}.in) \
- $(shell echo Rivet/LHC-7-PromptPhoton-{1..4}.in) \
- Rivet/LHC-7-DiPhoton.in Rivet/LHC-GammaGamma-7.in \
+ $(shell echo Rivet/LHC-7-PromptPhoton-{1..4}.in) Rivet/LHC-GammaGamma-7.in \
+ $(shell echo Rivet/LHC{,-Powheg}-7-{DiPhoton-GammaGamma,DiPhoton-GammaJet}.in) \
$(shell echo Rivet/LHC{,-Powheg,-Matchbox,-Matchbox-Powheg,-Dipole}-{ggH,VBF,WH,ZH}.in) \
$(shell echo Rivet/LHC{,-Powheg,-Matchbox,-Matchbox-Powheg,-Dipole}-8-{ggH,VBF,WH,ZH}{,-GammaGamma}.in) \
$(shell echo Rivet/LHC{,-Matchbox,-Matchbox-Powheg,-Dipole}-ggHJet.in)
Rivet-LEP: $(shell echo Rivet-LEP{,-Powheg,-Matchbox,-Dipole}-{10,14,22,35,44,91,130,133,136,161,172,177,183,189,192,196,197,200,202,206,91-nopi})
rm -rf Rivet-LEP
python/merge-LEP LEP
python/merge-LEP LEP-Powheg
python/merge-LEP LEP-Matchbox
python/merge-LEP LEP-Dipole
rivet-mkhtml -o Rivet-LEP LEP.yoda:Hw++ LEP-Powheg.yoda:Hw++-Powheg LEP-Matchbox.yoda:Hw++-Matchbox LEP-Dipole.yoda:Hw++-Dipole
Rivet-BFactory: $(shell echo Rivet-BFactory{,-Powheg,-Matchbox,-Dipole}-{10.52,10.52-sym,10.54,10.45,10.58}) \
$(shell echo Rivet-BFactory-{Upsilon,Upsilon2,Upsilon4,Tau})
rm -rf Rivet-BFactory
python/merge-BFactory BFactory
python/merge-BFactory BFactory-Powheg
python/merge-BFactory BFactory-Matchbox
python/merge-BFactory BFactory-Dipole
rivet-mkhtml -o Rivet-BFactory BFactory.yoda:Hw++ BFactory-Powheg.yoda:Hw++-Powheg BFactory-Matchbox.yoda:Hw++-Matchbox BFactory-Dipole.yoda:Hw++-Dipole
Rivet-DIS: $(shell echo Rivet-DIS{,-NoME,-Powheg,-Matchbox,-Dipole}-{e--LowQ2,e+-LowQ2,e+-HighQ2})
rm -rf Rivet-DIS
python/merge-DIS DIS
python/merge-DIS DIS-Powheg
python/merge-DIS DIS-NoME
python/merge-DIS DIS-Matchbox
python/merge-DIS DIS-Dipole
rivet-mkhtml -o Rivet-DIS DIS.yoda:Hw++ DIS-Powheg.yoda:Hw++-Powheg DIS-NoME.yoda:Hw++-NoME DIS-Matchbox.yoda:Hw++-Matchbox DIS-Dipole.yoda:Hw++-Dipole
Rivet-TVT-WZ: $(shell echo Rivet-TVT{,-Powheg,-Matchbox,-Dipole}-{Run-I-Z,Run-I-W,Run-I-WZ,Run-II-Z-{e,{,LowMass-,HighMass-}mu},Run-II-W})
rm -rf Rivet-TVT-WZ
python/merge-TVT-EW TVT-Run-II-W.yoda TVT-Run-II-Z-{e,{,LowMass-,HighMass-}mu}.yoda\
TVT-Run-I-{W,Z,WZ}.yoda -o TVT-WZ.yoda
python/merge-TVT-EW TVT-Powheg-Run-II-W.yoda TVT-Powheg-Run-II-Z-{e,{,LowMass-,HighMass-}mu}.yoda\
TVT-Powheg-Run-I-{W,Z,WZ}.yoda -o TVT-Powheg-WZ.yoda
python/merge-TVT-EW TVT-Matchbox-Run-II-W.yoda TVT-Matchbox-Run-II-Z-{e,{,LowMass-,HighMass-}mu}.yoda\
TVT-Matchbox-Run-I-{W,Z,WZ}.yoda -o TVT-Matchbox-WZ.yoda
python/merge-TVT-EW TVT-Dipole-Run-II-W.yoda TVT-Dipole-Run-II-Z-{e,{,LowMass-,HighMass-}mu}.yoda\
TVT-Dipole-Run-I-{W,Z,WZ}.yoda -o TVT-Dipole-WZ.yoda
rivet-mkhtml -o Rivet-TVT-WZ TVT-WZ.yoda:Hw++ TVT-Powheg-WZ.yoda:Hw++-Powheg TVT-Matchbox-WZ.yoda:Hw++-Matchbox TVT-Dipole-WZ.yoda:Hw++-Dipole
-Rivet-TVT-Photon: $(shell echo Rivet-TVT-Run-II-{DiPhoton,PromptPhoton})
-# Rivet-TVT-Run-I-PromptPhoton
- rm -rf Rivet-TVT-Photon
- cat TVT-Run-II-DiPhoton.yoda TVT-Run-II-PromptPhoton.yoda > TVT-Photon.yoda
- rivet-mkhtml -o Rivet-TVT-Photon TVT-Photon.yoda:Hw++
+Rivet-TVT-Photon: $(shell echo Rivet-TVT-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet,PromptPhoton}) \
+ $(shell echo Rivet-TVT-Powheg-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet})
+ rm -rf Rivet-TVT-Photon
+ python/merge-TVT-Photon TVT -o TVT-Photon.yoda
+ python/merge-TVT-Photon TVT-Powheg -o TVT-Powheg-Photon.yoda
+ rivet-mkhtml -o Rivet-TVT-Photon TVT-Photon.yoda:Hw TVT-Powheg-Photon.yoda:Hw-Powheg
Rivet-TVT-Jets: $(shell echo Rivet-TVT-{Run-II-Jets-{0..11},Run-I-Jets-{1..8}} ) \
$(shell echo Rivet-TVT-{630-Jets-{1..3},300-Jets-1,900-Jets-1} ) \
$(shell echo Rivet-TVT-{Run-I,Run-II,300,630,900}-UE)
python/merge-TVT-Energy TVT
rivet-merge-CDF_2012_NOTE10874 TVT-300-Energy.yoda TVT-900-Energy.yoda TVT-1960-Energy.yoda
flat2yoda RatioPlots.dat -o TVT-RatioPlots.yoda
rm -rf Rivet-TVT-Jets
python/merge-TVT-Jets TVT
rivet-mkhtml -o Rivet-TVT-Jets TVT-Jets.yoda:Hw++
Rivet-LHC-Jets: $(shell echo Rivet-LHC-7-Jets-{0..15} ) \
$(shell echo Rivet-LHC-{900,2360,2760,7,8,13}-UE ) \
$(shell echo Rivet-LHC-{900,7}-UE-Long ) \
$(shell echo Rivet-LHC-7-Charm-{1..5}) \
$(shell echo Rivet-LHC-7-Bottom-{0..8}) \
$(shell echo Rivet-LHC-7-Top-{L,SL,All})
rm -rf Rivet-LHC-Jets
python/merge-LHC-Jets
rivet-mkhtml -o Rivet-LHC-Jets LHC-Jets.yoda:Hw++
Rivet-Star: $(shell echo Rivet-Star-{UE,Jets-{1..4}} )
rm -rf Rivet-Star
python/merge-Star Star
rivet-mkhtml -o Rivet-Star Star.yoda
Rivet-SppS: $(shell echo Rivet-ISR-{30,44,53,62}-UE ) \
$(shell echo Rivet-SppS-{53,63,200,500,900,546}-UE )
rm -rf Rivet-SppS
python/merge-SppS SppS
rivet-mkhtml -o Rivet-SppS SppS.yoda
Rivet-LHC-EW: $(shell echo Rivet-LHC{,-Matchbox,-Powheg,-Dipole}-{13-Z-{e,mu},W-{e,mu},Z-{e,mu},Z-LowMass-{e,mu},Z-MedMass-e,WZ,WW-{emu,ll},ZZ-{ll,lv},W-Z-{e,mu},8-Z-mu}) \
$(shell echo Rivet-LHC{,-Matchbox,-Dipole}-{7-W-Jet-{1..3}-e,7-Z-Jet-{0..3}-e,7-Z-Jet-0-mu}) \
$(shell echo Rivet-LHC{-Matchbox,-Dipole}-{Z-b,Z-bb,W-b,8-Z-jj})
rm -rf Rivet-LHC-EW;
python/merge-LHC-EW LHC-{13-Z-{e,mu},W-{e,mu},Z-e,Z-mu,Z-LowMass-{e,mu},Z-MedMass-e,W-Z-{e,mu},WW-{emu,ll},WZ,ZZ-{ll,lv}}.yoda LHC-7-{W,Z}-Jet-{1,2,3}-e.yoda -o LHC-EW.yoda;
python/merge-LHC-EW LHC-Matchbox-{13-Z-{e,mu},W-{e,mu},Z-{e,mu},Z-LowMass-{e,mu},Z-MedMass-e,W-Z-{e,mu},WW-{emu,ll},WZ,ZZ-{ll,lv}}.yoda LHC-Matchbox-7-{W,Z}-Jet-{1,2,3}-e.yoda -o LHC-Matchbox-EW.yoda;
python/merge-LHC-EW LHC-Dipole-{13-Z-{e,mu},W-{e,mu},Z-{e,mu},Z-LowMass-{e,mu},Z-MedMass-e,W-Z-{e,mu},WW-{emu,ll},WZ,ZZ-{ll,lv}}.yoda LHC-Dipole-7-{W,Z}-Jet-{1,2,3}-e.yoda -o LHC-Dipole-EW.yoda;
python/merge-LHC-EW LHC-Powheg-{W-{e,mu},Z-{e,mu},Z-LowMass-{e,mu},Z-MedMass-e,W-Z-{e,mu},WW-{emu,ll},WZ,ZZ-{ll,lv}}.yoda -o LHC-Powheg-EW.yoda;
rivet-mkhtml -o Rivet-LHC-EW LHC-EW.yoda:Hw++ LHC-Powheg-EW.yoda:Hw++-Powheg LHC-Matchbox-EW.yoda:Hw++-Matchbox LHC-Matchbox-Z-b.yoda:Hw++-Matchbox-Zb \
LHC-Matchbox-Z-bb.yoda:Hw++-Matchbox-Zbb LHC-Matchbox-W-b.yoda:Hw++-Matchbox-W-bb LHC-Dipole-EW.yoda:Hw++-Dipole \
LHC-Dipole-Z-b.yoda:Hw++-Dipole-Zb LHC-Dipole-Z-bb.yoda:Hw++-Dipole-Zbb LHC-Dipole-W-b.yoda:Hw++-Dipole-W-bb;
-Rivet-LHC-Photon: $(shell echo Rivet-LHC-7-PromptPhoton-{1..4}) \
- Rivet-LHC-7-DiPhoton Rivet-LHC-GammaGamma-7
- rm -rf Rivet-LHC-Photon
- python/merge-LHC-Photon -o LHC-Photon.yoda
- rivet-mkhtml -o Rivet-LHC-Photon LHC-Photon.yoda:Hw++
+Rivet-LHC-Photon: $(shell echo Rivet-LHC-7-PromptPhoton-{1..4}) Rivet-LHC-GammaGamma-7 \
+ $(shell echo Rivet-LHC{,-Powheg}-7-{DiPhoton-GammaGamma,DiPhoton-GammaJet})
+ rm -rf Rivet-LHC-Photon
+ python/merge-LHC-Photon LHC -o LHC-Photon.yoda
+ python/merge-LHC-Photon LHC-Powheg -o LHC-Powheg-Photon.yoda
+ rivet-mkhtml -o Rivet-LHC-Photon LHC-Photon.yoda:Hw LHC-Powheg-Photon.yoda:Hw-Powheg
Rivet-LHC-Higgs: $(shell echo Rivet-LHC{,-Powheg}-{ggH,VBF,WH,ZH})\
$(shell echo Rivet-LHC{,-Powheg}-8-{ggH,VBF,WH,ZH}{,-GammaGamma}) Rivet-LHC-ggHJet
rm -rf Rivet-LHC-Higgs
rivet-mkhtml -o Rivet-LHC-Higgs LHC-Powheg-ggH.yoda:gg-Powheg LHC-ggH.yoda:gg LHC-ggHJet.yoda:HJet \
LHC-Powheg-VBF.yoda:VBF-Powheg LHC-VBF.yoda:VBF LHC-WH.yoda:WH LHC-ZH.yoda:ZH \
LHC-Powheg-WH.yoda:WH-Powheg LHC-Powheg-ZH.yoda:ZH-Powheg
tests-Rivet : Rivet-LEP Rivet-BFactory Rivet-DIS Rivet-TVT-WZ Rivet-TVT-Photon Rivet-TVT-Jets Rivet-LHC-Jets Rivet-Star Rivet-SppS Rivet-LHC-EW Rivet-LHC-Photon
test-Gamma-% : Inputs/Gamma-%.in GammaTest.la
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
test-DIS-% : Inputs/DIS-%.in DISTest.la
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
if WANT_LIBFASTJET
test-LHC-% : Inputs/LHC-%.in HadronTest.la GammaTest.la HadronJetTest.la
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
else
test-LHC-% : Inputs/LHC-%.in HadronTest.la GammaTest.la
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<)) -N $${NUMEVENTS:-10000}
endif
clean-local:
rm -f *.out *.log *.tex *.top *.run *.dump *.mult *.Bmult *.yoda
diff --git a/Tests/python/make_input_files.py b/Tests/python/make_input_files.py
--- a/Tests/python/make_input_files.py
+++ b/Tests/python/make_input_files.py
@@ -1,1316 +1,1354 @@
#! /usr/bin/env python
import logging,sys,os
from string import strip, Template
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name [...]")
(opts, args) = parser.parse_args()
## Check args
if len(args) != 1:
logging.error("Must specify at least input file")
sys.exit(1)
name=args[0]
collider=""
# select the template to load
# collider
parameters = {}
if(name.find("BFactory")==0) :
collider="BFactory"
elif(name.find("LEP")==0) :
collider="LEP"
elif(name.find("DIS")==0) :
collider="DIS"
elif(name.find("TVT")==0) :
collider="TVT"
elif(name.find("LHC-GammaGamma")==0) :
collider="LHC-GammaGamma"
elif(name.find("LHC")==0) :
collider="LHC"
elif(name.find("ISR")==0) :
collider="ISR"
elif(name.find("SppS")==0) :
collider="SppS"
elif(name.find("Star")==0) :
collider="Star"
simulation=""
istart = 1
print name
if(name.find("Matchbox-Powheg")>0) :
istart = 3
simulation="Matchbox"
parameters["shower"] = "read Matchbox/Powheg-DefaultShower.in\n"
elif(name.find("Matchbox")>0) :
istart = 2
simulation="Matchbox"
parameters["shower"] = "read Matchbox/MCatNLO-DefaultShower.in\n"
elif(name.find("Dipole")>0) :
istart = 2
simulation="Matchbox"
parameters["shower"] = "read Matchbox/MCatNLO-DipoleShower.in\n"
elif(name.find("Powheg")>0) :
istart = 2
simulation="Powheg"
if(simulation=="Matchbox") :
parameters["bscheme"] = "read Matchbox/FiveFlavourScheme.in\n"
if(parameters["shower"].find("Dipole")>=0) :
parameters["bscheme"] += "read Matchbox/FiveFlavourNoBMassScheme.in\n"
if(collider.find("DIS")<0) :
parameters["nlo"] = "read Matchbox/MadGraph-OpenLoops.in\n"
if(collider=="") :
logging.error("Can\'t find collider")
sys.exit(1)
# find the template
if(simulation=="") :
if(collider.find("LHC-GammaGamma") >=0) :
istart += 1
templateName="Hadron-Gamma.in"
elif(collider.find("TVT")>=0 or collider.find("LHC") >=0 or
collider.find("ISR")>=0 or collider.find("SppS")>=0 or
collider.find("Star")>=0) :
templateName="Hadron.in"
elif(collider.find("BFactory")<0) :
templateName= "%s.in" % (collider)
else :
templateName= "LEP.in"
else :
if(collider.find("TVT")>=0 or collider.find("LHC") >=0 or
collider.find("ISR")>=0 or collider.find("SppS")>=0 or
collider.find("Star")>=0) :
templateName= "Hadron-%s.in" % (simulation)
elif(collider.find("BFactory")<0) :
templateName= "%s-%s.in" % (collider,simulation)
else :
templateName= "LEP-%s.in" % (simulation)
with open(os.path.join("Rivet/Templates",templateName), 'r') as f:
templateText = f.read()
template = Template( templateText )
# work out the name of the parameter file
nameSplit=name.split("-")
parameterName=nameSplit[istart]
for i in range(istart+1,len(nameSplit)) :
parameterName += "-%s" % nameSplit[i]
# work out the process and parameters
process=""
# Bfactory
if(collider=="BFactory") :
if(simulation=="") :
process = "set /Herwig/MatrixElements/MEee2gZ2qq:MaximumFlavour 4"
if(parameterName=="10.58") :
process += "\ncreate Herwig::MEee2VectorMeson /Herwig/MatrixElements/MEUpsilon HwMELepton.so\nset /Herwig/MatrixElements/MEUpsilon:VectorMeson /Herwig/Particles/Upsilon(4S)\nset /Herwig/MatrixElements/MEUpsilon:Coupling 0.0004151809\ninsert /Herwig/MatrixElements/SimpleEE:MatrixElements 0 /Herwig/MatrixElements/MEUpsilon"
elif(simulation=="Powheg") :
process = "set /Herwig/MatrixElements/PowhegMEee2gZ2qq:MaximumFlavour 4"
if(parameterName=="10.58") :
process += "\ncreate Herwig::MEee2VectorMeson /Herwig/MatrixElements/MEUpsilon HwMELepton.so\nset /Herwig/MatrixElements/MEUpsilon:VectorMeson /Herwig/Particles/Upsilon(4S)\nset /Herwig/MatrixElements/MEUpsilon:Coupling 0.0004151809\ninsert /Herwig/MatrixElements/SimpleEE:MatrixElements 0 /Herwig/MatrixElements/MEUpsilon"
elif(simulation=="Matchbox" ) :
process = "do Factory:Process e- e+ -> u ubar\ndo Factory:Process e- e+ -> d dbar\ndo Factory:Process e- e+ -> c cbar\ndo Factory:Process e- e+ -> s sbar"
if(parameterName=="10.58") :
process += "\ninsert /Herwig/Generators/EventGenerator:EventHandler:SubProcessHandlers 0 /Herwig/MatrixElements/SimpleEE\ncreate Herwig::MEee2VectorMeson /Herwig/MatrixElements/MEUpsilon HwMELepton.so\nset /Herwig/MatrixElements/MEUpsilon:VectorMeson /Herwig/Particles/Upsilon(4S)\nset /Herwig/MatrixElements/MEUpsilon:Coupling 0.0004151809\ninsert /Herwig/MatrixElements/SimpleEE:MatrixElements 0 /Herwig/MatrixElements/MEUpsilon\n"
# DIS
elif(collider=="DIS") :
if(simulation=="") :
if(parameterName.find("NoME")>=0) :
process = "set /Herwig/Shower/Evolver:MECorrMode 0"
parameterName=parameterName.replace("NoME-","")
else :
process = ""
elif(simulation=="Powheg") :
process = ""
elif(simulation=="Matchbox" ) :
if(parameterName.find("e-")>=0) :
process="do Factory:Process e- p -> e- j"
else :
process="do Factory:Process e+ p -> e+ j"
# LEP
elif(collider=="LEP") :
if(simulation=="") :
process=""
if(parameterName=="10") :
process="set /Herwig/MatrixElements/MEee2gZ2qq:MaximumFlavour 4"
elif(simulation=="Powheg") :
process=""
if(parameterName=="10") :
process="set /Herwig/MatrixElements/PowhegMEee2gZ2qq:MaximumFlavour 4"
elif(simulation=="Matchbox" ) :
if(parameterName=="10") :
process="do Factory:Process e- e+ -> u ubar\ndo Factory:Process e- e+ -> d dbar\ndo Factory:Process e- e+ -> c cbar\ndo Factory:Process e- e+ -> s sbar"
else :
process="do Factory:Process e- e+ -> j j"
# TVT
elif(collider=="TVT") :
process="set /Herwig/Generators/EventGenerator:EventHandler:BeamB /Herwig/Particles/pbar-\n"
if(parameterName.find("Run-II")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 1960.0\n"
elif(parameterName.find("Run-I")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 1800.0\n"
elif(parameterName.find("900")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 900.0\n"
elif(parameterName.find("630")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 630.0\n"
elif(parameterName.find("300")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 300.0\n"
if(simulation=="") :
if(parameterName.find("PromptPhoton")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEGammaJet\n"
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 15.\n"
- elif(parameterName.find("DiPhoton")>=0) :
+ elif(parameterName.find("DiPhoton-GammaGamma")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEGammaGamma\n"
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
+ parameterName=parameterName.replace("-GammaGamma","")
+ elif(parameterName.find("DiPhoton-GammaJet")>=0) :
+ process+="insert SimpleQCD:MatrixElements[0] MEGammaJet\n"
+ process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
+ parameterName=parameterName.replace("-GammaJet","")
elif(parameterName.find("UE")>=0) :
process += "insert SimpleQCD:MatrixElements[0] MEMinBias\n"
process += "set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
process += "set /Herwig/Generators/EventGenerator:EventHandler:Cuts /Herwig/Cuts/MinBiasCuts\n"
process += "create Herwig::MPIXSecReweighter /Herwig/Generators/MPIXSecReweighter\n"
process += "insert /Herwig/Generators/EventGenerator:EventHandler:PostSubProcessHandlers 0 /Herwig/Generators/MPIXSecReweighter\n"
process += "set /Herwig/Decays/DecayHandler:LifeTimeOption 0\n"
process += "set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm\n"
elif(parameterName.find("Jets")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEQCD2to2\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if(parameterName.find("Run-II-Jets-10")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 500.*GeV\n"
elif(parameterName.find("Run-II-Jets-11")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 900.*GeV\n"
elif(parameterName.find("Run-I-Jets-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
elif(parameterName.find("Run-I-Jets-2")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 40.\n"
elif(parameterName.find("Run-I-Jets-3")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 65.\n"
elif(parameterName.find("Run-I-Jets-4")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 90.\n"
elif(parameterName.find("Run-I-Jets-5")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 160.\n"
elif(parameterName.find("Run-I-Jets-6")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 100.*GeV\n"
elif(parameterName.find("Run-I-Jets-7")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 400.*GeV\n"
elif(parameterName.find("Run-I-Jets-8")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 700.*GeV\n"
elif(parameterName.find("Run-II-Jets-0")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 15.\n"
elif(parameterName.find("Run-II-Jets-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 25.\n"
elif(parameterName.find("Run-II-Jets-2")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 40.\n"
elif(parameterName.find("Run-II-Jets-3")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 60.\n"
elif(parameterName.find("Run-II-Jets-4")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 85.\n"
elif(parameterName.find("Run-II-Jets-5")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 110.\n"
elif(parameterName.find("Run-II-Jets-6")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 160.\n"
elif(parameterName.find("Run-II-Jets-7")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 250.\n"
elif(parameterName.find("Run-II-Jets-8")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 100.*GeV\n"
elif(parameterName.find("Run-II-Jets-9")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 300.*GeV\n"
elif(parameterName.find("900-Jets-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 10.\n"
elif(parameterName.find("300-Jets-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 6.\n"
elif(parameterName.find("630-Jets-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
elif(parameterName.find("630-Jets-2")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 40.\n"
elif(parameterName.find("630-Jets-3")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 75.\n"
elif(parameterName.find("900-Jets-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 10.\n"
elif(parameterName.find("Run-I-WZ")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2W2ff\nset MEqq2W2ff:Process Electron\ninsert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Electron\n"
elif(parameterName.find("Run-I-W")>=0 or parameterName.find("Run-II-W")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2W2ff\nset MEqq2W2ff:Process Electron\n"
elif(parameterName.find("Run-I-Z")>=0 or parameterName.find("Run-II-Z-e")>=0) :
process +="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Electron\n"
elif(parameterName.find("Run-II-Z-LowMass-mu")>=0) :
process +="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Muon\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 25*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 70*GeV\n"
elif(parameterName.find("Run-II-Z-HighMass-mu")>=0) :
process +="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Muon\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 150*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 600*GeV\n"
elif(parameterName.find("Run-II-Z-mu")>=0) :
process +="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Muon\n"
elif(simulation=="Powheg") :
if(parameterName.find("Run-I-WZ")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2W2ff\nset PowhegMEqq2W2ff:Process Electron\ninsert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Electron\n"
elif(parameterName.find("Run-I-W")>=0 or parameterName.find("Run-II-W")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2W2ff\nset PowhegMEqq2W2ff:Process Electron\n"
elif(parameterName.find("Run-I-Z")>=0 or parameterName.find("Run-II-Z-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Electron\n"
elif(parameterName.find("Run-II-Z-LowMass-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Muon\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 25*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 70*GeV\n"
elif(parameterName.find("Run-II-Z-HighMass-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Muon\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 150*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 600*GeV\n"
elif(parameterName.find("Run-II-Z-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Muon\n"
+ elif(parameterName.find("DiPhoton-GammaGamma")>=0) :
+ process+="insert SimpleQCD:MatrixElements[0] MEGammaGammaPowheg\n"
+ process+="set MEGammaGammaPowheg:Process GammaGamma\n"
+ process+="insert SimpleQCD:MatrixElements[0] MEGammaGamma\n"
+ process+="set MEGammaGamma:Process gg\n"
+ process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
+ process+="set /Herwig/Cuts/JetKtCut:MinKT 5.\n"
+ parameterName=parameterName.replace("-GammaGamma","")
+ elif(parameterName.find("DiPhoton-GammaJet")>=0) :
+ process+="insert SimpleQCD:MatrixElements[0] MEGammaGammaPowheg\n"
+ process+="set MEGammaGammaPowheg:Process VJet\n"
+ process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
+ process+="set /Herwig/Cuts/JetKtCut:MinKT 5.\n"
+ parameterName=parameterName.replace("-GammaJet","")
elif(simulation=="Matchbox" ) :
if(parameterName.find("Jets")>=0) :
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 0\n"
process+="do Factory:Process p p j j\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/MaxJetPtScale\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if(parameterName.find("Run-II-Jets-10")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 500.*GeV\n"
elif(parameterName.find("Run-II-Jets-11")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 900.*GeV\n"
elif(parameterName.find("Run-II-Jets-12")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 300.*GeV\n"
elif(parameterName.find("Run-I-Jets-1")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 20.\n"
elif(parameterName.find("Run-I-Jets-2")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 40.\n"
elif(parameterName.find("Run-I-Jets-3")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 65.\n"
elif(parameterName.find("Run-I-Jets-4")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 90.\n"
elif(parameterName.find("Run-I-Jets-5")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 160.\n"
elif(parameterName.find("Run-I-Jets-6")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 100.*GeV\n"
elif(parameterName.find("Run-I-Jets-7")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 400.*GeV\n"
elif(parameterName.find("Run-I-Jets-8")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 700.*GeV\n"
elif(parameterName.find("Run-II-Jets-0")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 15.\n"
elif(parameterName.find("Run-II-Jets-1")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 25.\n"
elif(parameterName.find("Run-II-Jets-2")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 40.\n"
elif(parameterName.find("Run-II-Jets-3")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 60.\n"
elif(parameterName.find("Run-II-Jets-4")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 85.\n"
elif(parameterName.find("Run-II-Jets-5")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 110.\n"
elif(parameterName.find("Run-II-Jets-6")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 160.\n"
elif(parameterName.find("Run-II-Jets-7")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 250.\n"
elif(parameterName.find("Run-II-Jets-8")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 100.*GeV\n"
elif(parameterName.find("Run-II-Jets-9")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 300.*GeV\n"
elif(parameterName.find("900-Jets-1")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 10.\n"
elif(parameterName.find("300-Jets-1")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 6.\n"
elif(parameterName.find("630-Jets-1")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 20.\n"
elif(parameterName.find("630-Jets-2")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 40.\n"
elif(parameterName.find("630-Jets-3")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 75.\n"
elif(parameterName.find("900-Jets-1")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 10.\n"
elif(parameterName.find("Run-I-WZ")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p pbar e+ e-\ndo Factory:Process p pbar e+ nu\ndo Factory:Process p pbar e- nu\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("Run-I-W")>=0 or parameterName.find("Run-II-W")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p pbar e+ nu\ndo Factory:Process p pbar e- nu\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("Run-I-Z")>=0 or parameterName.find("Run-II-Z-e")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p pbar e+ e-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("Run-II-Z-LowMass-mu")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p pbar mu+ mu-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 25*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 70*GeV\n"
elif(parameterName.find("Run-II-Z-HighMass-mu")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p pbar mu+ mu-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 150.*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 600*GeV\n"
elif(parameterName.find("Run-II-Z-mu")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p pbar mu+ mu-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
# Star
elif(collider=="Star" ) :
process = "set /Herwig/Decays/DecayHandler:LifeTimeOption 0\n"
process+= "set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm\n"
process+= "set /Herwig/Generators/EventGenerator:EventHandler:BeamB /Herwig/Particles/p+\n"
process+= "set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 200.0\n"
process+= "set /Herwig/Cuts/QCDCuts:X2Min 0.01\n"
if(simulation=="") :
if(parameterName.find("UE")>=0) :
process += "insert SimpleQCD:MatrixElements[0] MEMinBias\n"
process += "set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
process += "set /Herwig/Generators/EventGenerator:EventHandler:Cuts /Herwig/Cuts/MinBiasCuts\n"
process += "create Herwig::MPIXSecReweighter /Herwig/Generators/MPIXSecReweighter\n"
process += "insert /Herwig/Generators/EventGenerator:EventHandler:PostSubProcessHandlers 0 /Herwig/Generators/MPIXSecReweighter\n"
else :
process+="insert SimpleQCD:MatrixElements[0] MEQCD2to2\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if(parameterName.find("Jets-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 2.\n"
elif(parameterName.find("Jets-2")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 5.\n"
elif(parameterName.find("Jets-3")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
elif(parameterName.find("Jets-4")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 25.\n"
else :
logging.error("Star not supported for %s " % simulation)
sys.exit(1)
# ISR and SppS
elif(collider=="ISR" or collider =="SppS" ) :
process="set /Herwig/Decays/DecayHandler:LifeTimeOption 0\n"
process+="set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm\n"
if(collider=="SppS") :
process ="set /Herwig/Generators/EventGenerator:EventHandler:BeamB /Herwig/Particles/pbar-\n"
if(parameterName.find("30")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 30.4\n"
elif(parameterName.find("44")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 44.4\n"
elif(parameterName.find("53")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 53.0\n"
elif(parameterName.find("62")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 62.2\n"
elif(parameterName.find("63")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 63.0\n"
elif(parameterName.find("200")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 200.0\n"
elif(parameterName.find("500")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 500.0\n"
elif(parameterName.find("546")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 546.0\n"
elif(parameterName.find("900")>=0) :
process+="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 900.0\n"
if(simulation=="") :
process += "insert SimpleQCD:MatrixElements[0] MEMinBias\n"
process += "set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
process += "set /Herwig/Generators/EventGenerator:EventHandler:Cuts /Herwig/Cuts/MinBiasCuts\n"
process += "create Herwig::MPIXSecReweighter /Herwig/Generators/MPIXSecReweighter\n"
process += "insert /Herwig/Generators/EventGenerator:EventHandler:PostSubProcessHandlers 0 /Herwig/Generators/MPIXSecReweighter\n"
else :
logging.error(" SppS and ISR not supported for %s " % simulation)
sys.exit(1)
# LHC
elif(collider=="LHC") :
if(parameterName.find("7-")==0) :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 7000.0\n"
elif(parameterName.find("8-")==0) :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 8000.0\n"
elif(parameterName.find("13-")==0) :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 13000.0\n"
elif(parameterName.find("900")==0) :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 900.0\n"
elif(parameterName.find("2360")==0) :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 2360.0\n"
elif(parameterName.find("2760")==0) :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 2760.0\n"
else :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 7000.0\n"
if(simulation=="") :
if(parameterName.find("8-VBF")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEPP2HiggsVBF\n"
elif(parameterName.find("VBF")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->tau-,tau+;\n"
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+="insert SimpleQCD:MatrixElements[0] MEPP2HiggsVBF\n"
elif(parameterName.find("ggHJet")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->tau-,tau+;\n"
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+="insert SimpleQCD:MatrixElements[0] MEHiggsJet\n"
elif(parameterName.find("8-ggH")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEHiggs\n"
process+="insert SimpleQCD:MatrixElements[0] MEHiggsJet\n"
process+="set MEHiggsJet:Process qqbar\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("ggH")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->tau-,tau+;\n"
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+="insert SimpleQCD:MatrixElements[0] MEHiggs\n"
process+="insert SimpleQCD:MatrixElements[0] MEHiggsJet\n"
process+="set MEHiggsJet:Process qqbar\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("PromptPhoton")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEGammaJet\n"
if(parameterName.find("PromptPhoton-1")>=0) :
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
elif(parameterName.find("PromptPhoton-2")>=0) :
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 25.\n"
elif(parameterName.find("PromptPhoton-3")>=0) :
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 80.\n"
elif(parameterName.find("PromptPhoton-4")>=0) :
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 150.\n"
- elif(parameterName.find("DiPhoton")>=0) :
+ elif(parameterName.find("DiPhoton-GammaGamma")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEGammaGamma\n"
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
+ parameterName=parameterName.replace("-GammaGamma","")
+ elif(parameterName.find("DiPhoton-GammaJet")>=0) :
+ process+="insert SimpleQCD:MatrixElements[0] MEGammaJet\n"
+ process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
+ parameterName=parameterName.replace("-GammaJet","")
elif(parameterName.find("8-WH")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEPP2WH\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("8-ZH")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEPP2ZH\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("WH")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->b,bbar;\n"
process+="do /Herwig/Particles/W+:SelectDecayModes W+->nu_e,e+; W+->nu_mu,mu+;\n"
process+="insert SimpleQCD:MatrixElements[0] MEPP2WH\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("ZH")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->b,bbar;\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes Z0->e-,e+; Z0->mu-,mu+;\n"
process+="insert SimpleQCD:MatrixElements[0] MEPP2ZH\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("UE")>=0) :
process += "insert SimpleQCD:MatrixElements[0] MEMinBias\n"
process += "set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
process += "set /Herwig/Generators/EventGenerator:EventHandler:Cuts /Herwig/Cuts/MinBiasCuts\n"
process += "create Herwig::MPIXSecReweighter /Herwig/Generators/MPIXSecReweighter\n"
process += "insert /Herwig/Generators/EventGenerator:EventHandler:PostSubProcessHandlers 0 /Herwig/Generators/MPIXSecReweighter\n"
if(parameterName.find("Long")>=0) :
process += "set /Herwig/Decays/DecayHandler:MaxLifeTime 100*mm\n"
elif(parameterName.find("7-Jets")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEQCD2to2\n"
process+="set MEQCD2to2:MaximumFlavour 5\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if(parameterName.find("7-Jets-0")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 5.\n"
elif(parameterName.find("7-Jets-10")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 200.*GeV\n"
elif(parameterName.find("7-Jets-11")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 600.*GeV\n"
elif(parameterName.find("7-Jets-12")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 1000.*GeV\n"
elif(parameterName.find("7-Jets-13")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 1600.*GeV\n"
elif(parameterName.find("7-Jets-14")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 2200.*GeV\n"
elif(parameterName.find("7-Jets-15")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 2800.*GeV\n"
elif(parameterName.find("7-Jets-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 10.\n"
elif(parameterName.find("7-Jets-2")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
elif(parameterName.find("7-Jets-3")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 40.\n"
elif(parameterName.find("7-Jets-4")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 70.\n"
elif(parameterName.find("7-Jets-5")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 150.\n"
elif(parameterName.find("7-Jets-6")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 200.\n"
elif(parameterName.find("7-Jets-7")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 300.\n"
elif(parameterName.find("7-Jets-8")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 500.\n"
elif(parameterName.find("7-Jets-9")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 90.*GeV\n"
elif(parameterName.find("7-Charm")>=0 or \
parameterName.find("7-Bottom")>=0) :
if(parameterName.find("7-Bottom")>=0) :
process+="cp MEHeavyQuark MEBottom\n"
process+="set MEBottom:QuarkType Bottom\n"
process+="insert SimpleQCD:MatrixElements[0] MEBottom\n"
else :
process+="cp MEHeavyQuark MECharm\n"
process+="set MECharm:QuarkType Charm\n"
process+="insert SimpleQCD:MatrixElements[0] MECharm\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if(parameterName.find("7-Heavy-0")>=0) :
if(parameterName.find("7-Bottom")>=0) :
process+="set MEBottom:Process Pair\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.\n"
elif(parameterName.find("-1")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 5.\n"
elif(parameterName.find("-2")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 20.\n"
elif(parameterName.find("-3")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 50.\n"
elif(parameterName.find("-4")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 80.\n"
elif(parameterName.find("-5")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 110.\n"
elif(parameterName.find("-6")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 90.*GeV\n"
elif(parameterName.find("-7")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 340.*GeV\n"
elif(parameterName.find("-8")>=0) :
process+="set /Herwig/Cuts/JetKtCut:MinKT 30.\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 500.*GeV\n"
elif(parameterName.find("7-Top-L")>=0) :
process+="set MEHeavyQuark:QuarkType Top\n"
process+="insert SimpleQCD:MatrixElements[0] MEHeavyQuark\n"
process+="do /Herwig/Particles/t:SelectDecayModes t->nu_e,e+,b; t->nu_mu,mu+,b;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("7-Top-SL")>=0) :
process+="set MEHeavyQuark:QuarkType Top\n"
process+="insert SimpleQCD:MatrixElements[0] MEHeavyQuark\n"
process+="set /Herwig/Particles/t:Synchronized Not_synchronized\n"
process+="set /Herwig/Particles/tbar:Synchronized Not_synchronized\n"
process+="do /Herwig/Particles/t:SelectDecayModes t->nu_e,e+,b; t->nu_mu,mu+,b;\n"
process+="do /Herwig/Particles/tbar:SelectDecayModes tbar->b,bbar,cbar; tbar->bbar,cbar,d; tbar->bbar,cbar,s; tbar->bbar,s,ubar; tbar->bbar,ubar,d;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("7-Top-All")>=0) :
process+="set MEHeavyQuark:QuarkType Top\n"
process+="insert SimpleQCD:MatrixElements[0] MEHeavyQuark\n"
elif(parameterName.find("WZ")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEPP2VV\nset MEPP2VV:Process WZ\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+; /Herwig/Particles/W+/W+->nu_mu,mu+;\n"
process+="do /Herwig/Particles/W-:SelectDecayModes /Herwig/Particles/W-/W-->nu_ebar,e-; /Herwig/Particles/W-/W-->nu_mubar,mu-;\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("WW-emu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEPP2VV\nset MEPP2VV:Process WW\n"
process+="set /Herwig/Particles/W+:Synchronized 0\n"
process+="set /Herwig/Particles/W-:Synchronized 0\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+;\n"
process+="do /Herwig/Particles/W-:SelectDecayModes /Herwig/Particles/W-/W-->nu_mubar,mu-;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("WW-ll")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEPP2VV\nset MEPP2VV:Process WW\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+; /Herwig/Particles/W+/W+->nu_mu,mu+; /Herwig/Particles/W+/W+->nu_tau,tau+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("ZZ-ll")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEPP2VV\nset MEPP2VV:Process ZZ\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+; /Herwig/Particles/Z0/Z0->tau-,tau+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("ZZ-lv")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEPP2VV\nset MEPP2VV:Process ZZ\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+; /Herwig/Particles/Z0/Z0->tau-,tau+; /Herwig/Particles/Z0/Z0->nu_e,nu_ebar; /Herwig/Particles/Z0/Z0->nu_mu,nu_mubar; /Herwig/Particles/Z0/Z0->nu_tau,nu_taubar;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("W-Z-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Electron\n"
process+="insert SimpleQCD:MatrixElements[0] MEqq2W2ff\nset MEqq2W2ff:Process Electron\n"
elif(parameterName.find("W-Z-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Muon\n"
process+="insert SimpleQCD:MatrixElements[0] MEqq2W2ff\nset MEqq2W2ff:Process Muon\n"
elif(parameterName.find("W-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2W2ff\nset MEqq2W2ff:Process Electron\n"
elif(parameterName.find("W-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2W2ff\nset MEqq2W2ff:Process Muon\n"
elif(parameterName.find("Z-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Electron\n"
elif(parameterName.find("Z-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Muon\n"
elif(parameterName.find("Z-LowMass-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Electron\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 20.*GeV\nset /Herwig/Cuts/MassCut:MinM 20.*GeV\nset /Herwig/Cuts/MassCut:MaxM 70.*GeV\n"
elif(parameterName.find("Z-MedMass-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Electron\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 40.*GeV\nset /Herwig/Cuts/MassCut:MinM 40.*GeV\nset /Herwig/Cuts/MassCut:MaxM 130.*GeV\n"
elif(parameterName.find("Z-LowMass-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Muon\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 10.*GeV\nset /Herwig/Cuts/MassCut:MinM 10.*GeV\nset /Herwig/Cuts/MassCut:MaxM 70.*GeV\n"
elif(parameterName.find("W-Jet")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEWJet\nset MEWJet:WDecay Electron\n"
if(parameterName.find("W-Jet-1-e")>=0) :
process+="set /Herwig/Cuts/WBosonKtCut:MinKT 100.0*GeV\n"
parameterName=parameterName.replace("W-Jet-1-e","W-Jet-e")
elif(parameterName.find("W-Jet-2-e")>=0) :
process+="set /Herwig/Cuts/WBosonKtCut:MinKT 190.0*GeV\n"
parameterName=parameterName.replace("W-Jet-2-e","W-Jet-e")
elif(parameterName.find("W-Jet-3-e")>=0) :
process+="set /Herwig/Cuts/WBosonKtCut:MinKT 270.0*GeV\n"
parameterName=parameterName.replace("W-Jet-3-e","W-Jet-e")
elif(parameterName.find("Z-Jet")>=0) :
if(parameterName.find("-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEZJet\nset MEZJet:ZDecay Electron\n"
if(parameterName.find("Z-Jet-0-e")>=0) :
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 35.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-0-e","Z-Jet-e")
elif(parameterName.find("Z-Jet-1-e")>=0) :
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 100.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-1-e","Z-Jet-e")
elif(parameterName.find("Z-Jet-2-e")>=0) :
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 190.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-2-e","Z-Jet-e")
elif(parameterName.find("Z-Jet-3-e")>=0) :
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 270.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-3-e","Z-Jet-e")
else :
process+="insert SimpleQCD:MatrixElements[0] MEZJet\nset MEZJet:ZDecay Muon\n"
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 35.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-0-mu","Z-Jet-mu")
else :
logging.error(" Process %s not supported for internal matrix elements" % name)
sys.exit(1)
elif(simulation=="Powheg") :
if(parameterName.find("8-VBF")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2HiggsVBF\n"
elif(parameterName.find("VBF")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->tau-,tau+;\n"
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2HiggsVBF\n"
elif(parameterName.find("ggHJet")>=0) :
logging.error(" Process %s not supported for POWHEG matrix elements" % name)
sys.exit(1)
elif(parameterName.find("8-ggH")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEHiggs\n"
elif(parameterName.find("ggH")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->tau-,tau+;\n"
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEHiggs\n"
elif(parameterName.find("8-WH")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2WH\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("8-ZH")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2ZH\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("WH")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->b,bbar;\n"
process+="do /Herwig/Particles/W+:SelectDecayModes W+->nu_e,e+; W+->nu_mu,mu+;\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2WH\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("ZH")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->b,bbar;\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes Z0->e-,e+; Z0->mu-,mu+;\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2ZH\n"
process+="set /Herwig/Cuts/JetKtCut:MinKT 0.0*GeV\n"
elif(parameterName.find("UE")>=0) :
logging.error(" Process %s not supported for powheg matrix elements" % name)
sys.exit(1)
elif(parameterName.find("WZ")>=0) :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2VV\nset PowhegMEPP2VV:Process WZ\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+; /Herwig/Particles/W+/W+->nu_mu,mu+;\n"
process+="do /Herwig/Particles/W-:SelectDecayModes /Herwig/Particles/W-/W-->nu_ebar,e-; /Herwig/Particles/W-/W-->nu_mubar,mu-;\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("WW-emu")>=0) :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2VV\nset PowhegMEPP2VV:Process WW\n"
process+="set /Herwig/Particles/W+:Synchronized 0\n"
process+="set /Herwig/Particles/W-:Synchronized 0\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+;\n"
process+="do /Herwig/Particles/W-:SelectDecayModes /Herwig/Particles/W-/W-->nu_mubar,mu-;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("WW-ll")>=0) :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2VV\nset PowhegMEPP2VV:Process WW\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+; /Herwig/Particles/W+/W+->nu_mu,mu+; /Herwig/Particles/W+/W+->nu_tau,tau+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("ZZ-ll")>=0) :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2VV\nset PowhegMEPP2VV:Process ZZ\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+; /Herwig/Particles/Z0/Z0->tau-,tau+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("ZZ-lv")>=0) :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEPP2VV\nset PowhegMEPP2VV:Process ZZ\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+; /Herwig/Particles/Z0/Z0->tau-,tau+; /Herwig/Particles/Z0/Z0->nu_e,nu_ebar; /Herwig/Particles/Z0/Z0->nu_mu,nu_mubar; /Herwig/Particles/Z0/Z0->nu_tau,nu_taubar;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("W-Z-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Electron\n"
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2W2ff\nset PowhegMEqq2W2ff:Process Electron\n"
elif(parameterName.find("W-Z-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] MEqq2gZ2ff\nset MEqq2gZ2ff:Process Muon\n"
process+="insert SimpleQCD:MatrixElements[0] MEqq2W2ff\nset MEqq2W2ff:Process Muon\n"
elif(parameterName.find("W-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2W2ff\nset PowhegMEqq2W2ff:Process Electron\n"
elif(parameterName.find("W-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2W2ff\nset PowhegMEqq2W2ff:Process Muon\n"
elif(parameterName.find("Z-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Electron\n"
elif(parameterName.find("Z-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Muon\n"
elif(parameterName.find("Z-LowMass-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Electron\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 20.*GeV\nset /Herwig/Cuts/MassCut:MinM 20.*GeV\nset /Herwig/Cuts/MassCut:MaxM 70.*GeV\n"
elif(parameterName.find("Z-MedMass-e")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Electron\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 40.*GeV\nset /Herwig/Cuts/MassCut:MinM 40.*GeV\nset /Herwig/Cuts/MassCut:MaxM 130.*GeV\n"
elif(parameterName.find("Z-LowMass-mu")>=0) :
process+="insert SimpleQCD:MatrixElements[0] PowhegMEqq2gZ2ff\nset PowhegMEqq2gZ2ff:Process Muon\n"
process+="set /Herwig/Cuts/QCDCuts:MHatMin 10.*GeV\nset /Herwig/Cuts/MassCut:MinM 10.*GeV\nset /Herwig/Cuts/MassCut:MaxM 70.*GeV\n"
+ elif(parameterName.find("DiPhoton-GammaGamma")>=0) :
+ process+="insert SimpleQCD:MatrixElements[0] MEGammaGammaPowheg\n"
+ process+="set MEGammaGammaPowheg:Process GammaGamma\n"
+ process+="insert SimpleQCD:MatrixElements[0] MEGammaGamma\n"
+ process+="set MEGammaGamma:Process gg\n"
+ process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
+ process+="set /Herwig/Cuts/JetKtCut:MinKT 5.\n"
+ parameterName=parameterName.replace("-GammaGamma","")
+ elif(parameterName.find("DiPhoton-GammaJet")>=0) :
+ process+="insert SimpleQCD:MatrixElements[0] MEGammaGammaPowheg\n"
+ process+="set MEGammaGammaPowheg:Process VJet\n"
+ process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
+ process+="set /Herwig/Cuts/JetKtCut:MinKT 5.\n"
+ parameterName=parameterName.replace("-GammaJet","")
else :
logging.error(" Process %s not supported for internal POWHEG matrix elements" % name)
sys.exit(1)
elif(simulation=="Matchbox" ) :
if(parameterName.find("8-VBF")>=0) :
parameters["nlo"] = "read Matchbox/VBFNLO.in\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 3\n"
process+="insert Factory:DiagramGenerator:RestrictLines 0 /Herwig/Particles/Z0\n"
process+="insert Factory:DiagramGenerator:RestrictLines 0 /Herwig/Particles/W+\n"
process+="insert Factory:DiagramGenerator:RestrictLines 0 /Herwig/Particles/W-\n"
process+="insert Factory:DiagramGenerator:RestrictLines 0 /Herwig/Particles/gamma\n"
process+="do Factory:DiagramGenerator:TimeLikeRange 0 0\n"
process+="do Factory:Process p p h0 j j\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
elif(parameterName.find("VBF")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->tau-,tau+;\n"
process+="set /Herwig/Particles/tau-:Stable Stable\n"
parameters["nlo"] = "read Matchbox/VBFNLO.in\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 3\n"
process+="insert Factory:DiagramGenerator:RestrictLines 0 /Herwig/Particles/Z0\n"
process+="insert Factory:DiagramGenerator:RestrictLines 0 /Herwig/Particles/W+\n"
process+="insert Factory:DiagramGenerator:RestrictLines 0 /Herwig/Particles/W-\n"
process+="insert Factory:DiagramGenerator:RestrictLines 0 /Herwig/Particles/gamma\n"
process+="do Factory:DiagramGenerator:TimeLikeRange 0 0\n"
process+="do Factory:Process p p h0 j j\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
elif(parameterName.find("ggHJet")>=0) :
parameters["nlo"] = "read Matchbox/MadGraph-GoSam.in\nread Matchbox/HiggsEffective.in\n"
process+="do /Herwig/Particles/h0:SelectDecayModes h0->tau-,tau+;\n"
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+="set Factory:OrderInAlphaS 3\nset Factory:OrderInAlphaEW 1\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="do Factory:Process p p h0 j\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 20.\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
elif(parameterName.find("8-ggH")>=0) :
parameters["nlo"] = "read Matchbox/MadGraph-GoSam.in\nread Matchbox/HiggsEffective.in\n"
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 1\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="do Factory:Process p p h0\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
elif(parameterName.find("ggH")>=0) :
parameters["nlo"] = "read Matchbox/MadGraph-GoSam.in\nread Matchbox/HiggsEffective.in\n"
process+="do /Herwig/Particles/h0:SelectDecayModes h0->tau-,tau+;\n"
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 1\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="do Factory:Process p p h0\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
elif(parameterName.find("8-WH")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="do Factory:Process p p W+ h0\n"
process+="do Factory:Process p p W- h0\n"
process+="set /Herwig/Particles/W+:HardProcessWidth 0.\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
elif(parameterName.find("8-ZH")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="set /Herwig/Particles/Z0:HardProcessWidth 0.\n"
process+="do Factory:Process p p Z0 h0\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
elif(parameterName.find("WH")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->b,bbar;\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 3\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="do Factory:Process p p e+ nu h0\n"
process+="do Factory:Process p p e- nu h0\n"
process+="do Factory:Process p p mu+ nu h0\n"
process+="do Factory:Process p p mu- nu h0\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("ZH")>=0) :
process+="do /Herwig/Particles/h0:SelectDecayModes h0->b,bbar;\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 3\n"
process+="set /Herwig/Particles/h0:HardProcessWidth 0.\n"
process+="do Factory:Process p p e+ e- h0\n"
process+="do Factory:Process p p mu+ mu- h0\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("UE")>=0) :
logging.error(" Process %s not supported for Matchbox matrix elements" % name)
sys.exit(1)
elif(parameterName.find("7-Jets")>=0) :
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 0\n"
process+="do Factory:Process p p j j\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/MaxJetPtScale\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if(parameterName.find("7-Jets-0")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 5.\n"
elif(parameterName.find("7-Jets-10")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 20.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 15.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 200.*GeV\n"
elif(parameterName.find("7-Jets-11")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 20.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 15.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 600.*GeV\n"
elif(parameterName.find("7-Jets-12")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 20.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 15.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 1000.*GeV\n"
elif(parameterName.find("7-Jets-13")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 20.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 15.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 1600.*GeV\n"
elif(parameterName.find("7-Jets-14")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 20.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 15.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 2200.*GeV\n"
elif(parameterName.find("7-Jets-15")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 20.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 15.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 2800.*GeV\n"
elif(parameterName.find("7-Jets-1")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 10.\n"
elif(parameterName.find("7-Jets-2")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 20.\n"
elif(parameterName.find("7-Jets-3")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 40.\n"
elif(parameterName.find("7-Jets-4")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 70.\n"
elif(parameterName.find("7-Jets-5")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 150.\n"
elif(parameterName.find("7-Jets-6")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 200.\n"
elif(parameterName.find("7-Jets-7")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 300.\n"
elif(parameterName.find("7-Jets-8")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 500.\n"
elif(parameterName.find("7-Jets-9")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 20.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 15.*GeV\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 90.*GeV\n"
elif(parameterName.find("7-Charm")>=0 or \
parameterName.find("7-Bottom")>=0) :
parameters["bscheme"]="read Matchbox/FourFlavourScheme.in"
process+="set /Herwig/Particles/b:HardProcessMass 4.2*GeV\n"
process+="set /Herwig/Particles/bbar:HardProcessMass 4.2*GeV\n"
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 0\n"
if(parameterName.find("7-Bottom")>=0) :
process+="do Factory:Process p p b bbar\n"
else:
process+="do Factory:Process p p c cbar\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/MaxJetPtScale\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if(parameterName.find("-0")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 0.\n"
elif(parameterName.find("-1")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 5.\n"
elif(parameterName.find("-2")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 20.\n"
elif(parameterName.find("-3")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 50.\n"
elif(parameterName.find("-4")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 80.\n"
elif(parameterName.find("-5")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 110.\n"
elif(parameterName.find("-6")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 90.*GeV\n"
elif(parameterName.find("-7")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 340.*GeV\n"
elif(parameterName.find("-8")>=0) :
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 25.\n"
process+="create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so\n"
process+="set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass\n"
process+="set /Herwig/Cuts/JetPairMass:MassMin 500.*GeV\n"
elif(parameterName.find("7-Top-L")>=0) :
process+="set /Herwig/Particles/t:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/tbar:HardProcessWidth 0.*GeV\n"
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 0\n"
process+="do Factory:Process p p t tbar\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/TopPairMTScale\n"
process+="do /Herwig/Particles/t:SelectDecayModes t->nu_e,e+,b; t->nu_mu,mu+,b;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("7-Top-SL")>=0) :
process+="set /Herwig/Particles/t:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/tbar:HardProcessWidth 0.*GeV\n"
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 0\n"
process+="do Factory:Process p p t tbar\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/TopPairMTScale\n"
process+="set /Herwig/Particles/t:Synchronized Not_synchronized\n"
process+="set /Herwig/Particles/tbar:Synchronized Not_synchronized\n"
process+="do /Herwig/Particles/t:SelectDecayModes t->nu_e,e+,b; t->nu_mu,mu+,b;\n"
process+="do /Herwig/Particles/tbar:SelectDecayModes tbar->b,bbar,cbar; tbar->bbar,cbar,d; tbar->bbar,cbar,s; tbar->bbar,s,ubar; tbar->bbar,ubar,d;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
elif(parameterName.find("7-Top-All")>=0) :
process+="set /Herwig/Particles/t:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/tbar:HardProcessWidth 0.*GeV\n"
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 0\n"
process+="do Factory:Process p p t tbar\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/TopPairMTScale\n"
elif(parameterName.find("WZ")>=0) :
process+="set /Herwig/Particles/W+:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/W-:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/Z0:HardProcessWidth 0.*GeV\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p W+ Z0\ndo Factory:Process p p W- Z0\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 171.6*GeV\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+; /Herwig/Particles/W+/W+->nu_mu,mu+;\n"
process+="do /Herwig/Particles/W-:SelectDecayModes /Herwig/Particles/W-/W-->nu_ebar,e-; /Herwig/Particles/W-/W-->nu_mubar,mu-;\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("WW-emu")>=0) :
process+="set /Herwig/Particles/W+:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/W-:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/Z0:HardProcessWidth 0.*GeV\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p W+ W-\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 160.8*GeV\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/Particles/W+:Synchronized 0\n"
process+="set /Herwig/Particles/W-:Synchronized 0\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+;\n"
process+="do /Herwig/Particles/W-:SelectDecayModes /Herwig/Particles/W-/W-->nu_mubar,mu-;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("WW-ll")>=0) :
process+="set /Herwig/Particles/W+:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/W-:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/Z0:HardProcessWidth 0.*GeV\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p W+ W-\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 160.8*GeV\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="do /Herwig/Particles/W+:SelectDecayModes /Herwig/Particles/W+/W+->nu_e,e+; /Herwig/Particles/W+/W+->nu_mu,mu+; /Herwig/Particles/W+/W+->nu_tau,tau+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("ZZ-ll")>=0) :
process+="set /Herwig/Particles/W+:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/W-:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/Z0:HardProcessWidth 0.*GeV\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p Z0 Z0\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 182.2*GeV\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+; /Herwig/Particles/Z0/Z0->tau-,tau+;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("ZZ-lv")>=0) :
process+="set /Herwig/Particles/W+:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/W-:HardProcessWidth 0.*GeV\n"
process+="set /Herwig/Particles/Z0:HardProcessWidth 0.*GeV\n"
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p Z0 Z0\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 182.2*GeV\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="do /Herwig/Particles/Z0:SelectDecayModes /Herwig/Particles/Z0/Z0->e-,e+; /Herwig/Particles/Z0/Z0->mu-,mu+; /Herwig/Particles/Z0/Z0->tau-,tau+; /Herwig/Particles/Z0/Z0->nu_e,nu_ebar; /Herwig/Particles/Z0/Z0->nu_mu,nu_mubar; /Herwig/Particles/Z0/Z0->nu_tau,nu_taubar;\n"
process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("W-Z-e")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\n"
process+="do Factory:Process p p e+ e-\ndo Factory:Process p p e+ nu\ndo Factory:Process p p e- nu\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("W-Z-mu")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\n"
process+="do Factory:Process p p mu+ mu-\ndo Factory:Process p p mu+ nu\ndo Factory:Process p p mu- nu\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("W-e")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p e+ nu\ndo Factory:Process p p e- nu\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("W-mu")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p mu+ nu\ndo Factory:Process p p mu- nu\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("Z-e")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p e+ e-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("Z-mu")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p mu+ mu-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("Z-jj")>=0) :
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 2\n"
process+="do Factory:Process p p e+ e- j j\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 40.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("Z-LowMass-e")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p e+ e-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 20*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 70*GeV\n"
elif(parameterName.find("Z-MedMass-e")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p e+ e-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 40*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 130*GeV\n"
elif(parameterName.find("Z-LowMass-mu")>=0) :
process+="set Factory:OrderInAlphaS 0\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p mu+ mu-\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 10*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 70*GeV\n"
elif(parameterName.find("W-Jet")>=0) :
process+="set Factory:OrderInAlphaS 1\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p e+ nu j\ndo Factory:Process p p e- nu j\n\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/HTScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
if(parameterName.find("W-Jet-1-e")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 100.*GeV\n"
parameterName=parameterName.replace("W-Jet-1-e","W-Jet-e")
elif(parameterName.find("W-Jet-2-e")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 190.0*GeV\n"
parameterName=parameterName.replace("W-Jet-2-e","W-Jet-e")
elif(parameterName.find("W-Jet-3-e")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 270.0*GeV\n"
parameterName=parameterName.replace("W-Jet-3-e","W-Jet-e")
elif(parameterName.find("Z-Jet")>=0) :
process+="set Factory:OrderInAlphaS 1\nset Factory:OrderInAlphaEW 2\n"
if(parameterName.find("-e")>=0) :
process+="do Factory:Process p p e+ e- j\n"
if(parameterName.find("Z-Jet-0-e")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 35.*GeV\n"
parameterName=parameterName.replace("Z-Jet-0-e","Z-Jet-e")
elif(parameterName.find("Z-Jet-1-e")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 100.*GeV\n"
parameterName=parameterName.replace("Z-Jet-1-e","Z-Jet-e")
elif(parameterName.find("Z-Jet-2-e")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 190.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-2-e","Z-Jet-e")
elif(parameterName.find("Z-Jet-3-e")>=0) :
process+="set /Herwig/Cuts/FirstJet:PtMin 270.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-3-e","Z-Jet-e")
else :
process+="do Factory:Process p p mu+ mu- j\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 35.*GeV\n"
parameterName=parameterName.replace("Z-Jet-0-mu","Z-Jet-mu")
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
process+="set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/HTScale\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
elif(parameterName.find("Z-bb")>=0) :
parameters["bscheme"]="read Matchbox/FourFlavourScheme.in"
process+="set /Herwig/Particles/b:HardProcessMass 4.2*GeV\nset /Herwig/Particles/bbar:HardProcessMass 4.2*GeV\n"
process+="set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p e+ e- b bbar\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 91.2*GeV\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 66*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 116*GeV\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 18.*GeV\n"
process+="set /Herwig/Cuts/SecondJet:PtMin 15.*GeV\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
elif(parameterName.find("Z-b")>=0) :
process+="do Factory:StartParticleGroup bjet\n"
process+="insert Factory:ParticleGroup 0 /Herwig/Particles/b\n"
process+="insert Factory:ParticleGroup 0 /Herwig/Particles/bbar\n"
process+="do Factory:EndParticleGroup\n"
process+="set Factory:OrderInAlphaS 1\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p e+ e- bjet\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 91.2*GeV\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 15.*GeV\n"
elif(parameterName.find("W-b")>=0) :
parameters["bscheme"]="read Matchbox/FourFlavourScheme.in"
process += "set /Herwig/Particles/b:HardProcessMass 4.2*GeV\nset /Herwig/Particles/bbar:HardProcessMass 4.2*GeV\n"
process += "set Factory:OrderInAlphaS 2\nset Factory:OrderInAlphaEW 2\ndo Factory:Process p p e+ nu b bbar\ndo Factory:Process p p e- nu b bbar\n"
process += "set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 80.4*GeV\nset Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
process+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
process+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
process+="set /Herwig/Cuts/FirstJet:PtMin 30.*GeV\n"
process+="set /Herwig/Cuts/LeptonPairMassCut:MinMass 60*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass 120*GeV\n"
else :
logging.error(" Process %s not supported for Matchbox matrix elements" % name)
sys.exit(1)
# Star
elif(collider=="LHC-GammaGamma" ) :
if(parameterName.find("-7-")>=0) :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 7000.0\n"
elif(parameterName.find("-8-")>=0) :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 8000.0\n"
else :
process="set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy 7000.0\n"
if(simulation=="") :
if(parameterName.find("7")>=0) :
process += "insert SimpleQCD:MatrixElements 0 /Herwig/MatrixElements/MEgg2ff\n"
process += "set /Herwig/MatrixElements/MEgg2ff:Process Muon\n"
else :
logging.error(" Process %s not supported for default matrix elements" % name)
sys.exit(1)
else :
logging.error("LHC-GammaGamma not supported for %s " % simulation)
sys.exit(1)
parameters['parameterFile'] = os.path.join(collider,collider+"-"+parameterName+".in")
parameters['runname'] = name
parameters['process'] = process
# write the file
if(simulation=="Matchbox" ) :
with open(os.path.join("Rivet",name+".in") ,'w') as f:
f.write( template.substitute(parameters))
else :
with open(os.path.join("Rivet",name+".in") ,'w') as f:
f.write( template.substitute(parameters))
diff --git a/Tests/python/merge-LHC-Photon b/Tests/python/merge-LHC-Photon
--- a/Tests/python/merge-LHC-Photon
+++ b/Tests/python/merge-LHC-Photon
@@ -1,252 +1,265 @@
#! /usr/bin/env python
import logging
import sys
import os, yoda
"""%prog
Script for merging aida files
"""
def fillAbove(scale,desthisto, sourcehistosbyptmin):
pthigh= 1e100
ptlow =-1e100
for pt, h in sorted(sourcehistosbyptmin.iteritems(),reverse=True):
ptlow=pt
if(type(desthisto)==yoda.core.Scatter2D) :
for i in range(0,h.numPoints) :
xMin = h.points[i].x-h.points[i].xErrs.minus
if( xMin*scale >= ptlow and
xMin*scale < pthigh ) :
desthisto.addPoint(h.points[i])
elif(type(desthisto)==yoda.core.Profile1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin*scale >= ptlow and
h.bins[i].xMin*scale < pthigh ) :
desthisto.bins[i] += h.bins[i]
elif(type(desthisto)==yoda.core.Histo1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin*scale >= ptlow and
h.bins[i].xMin*scale < pthigh ) :
desthisto.bins[i] += h.bins[i]
else :
logging.error("Can't merge %s, unknown type" % desthisto.path)
sys.exit(1)
pthigh=pt
def mergeByPt(hpath, scale=1.):
global inhistos
global outhistos
try:
fillAbove(scale,outhistos[hpath], inhistos[hpath])
except:
pass
def useOnePt(hpath, ptmin):
global inhistos
global outhistos
try:
## Find best pT_min match
ptmins = inhistos[hpath].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested pTmin=%s: " % ptmin + \
"using pTmin=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos[hpath][closest_ptmin]
except:
pass
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog aidafile aidafile2 [...]")
parser.add_option("-o", "--out", dest="OUTFILE", default="-")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
+ ## Check args
+ if len(args) < 1:
+ logging.error("Must specify at least the name of the files")
+ sys.exit(1)
+
files=["-7-PromptPhoton-1.yoda","-7-PromptPhoton-2.yoda",
"-7-PromptPhoton-3.yoda","-7-PromptPhoton-4.yoda",
- "-7-DiPhoton.yoda","-GammaGamma-7.yoda"]
+ "-7-DiPhoton-GammaGamma.yoda","-7-DiPhoton-GammaJet.yoda","-GammaGamma-7.yoda"]
## Get histos
inhistos = {}
outhistos={}
for f in files:
- file="LHC"+f
+ file=args[0]+f
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
- break
+ continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as XML" % file)
break
if(file.find("PromptPhoton")>=0) :
if(file.find("-7-PromptPhoton-1")>0) :
ptmin=0.
elif(file.find("-7-PromptPhoton-2")>0) :
ptmin=35.
elif(file.find("-7-PromptPhoton-3")>0) :
ptmin=90.
elif(file.find("-7-PromptPhoton-4")>0) :
ptmin=170.
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
if (aopath.find("CMS_2013_I1258128")>0) :
if(aopath.find("d05")>0 or aopath.find("d06")>0 or
aopath.find("d07")>0 or aopath.find("d08")>0) :
inhistos[aopath][ptmin] = ao
else :
inhistos[aopath][ptmin] = ao
else :
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
- outhistos[aopath] = ao
-
+ if(aopath.find("XSEC")>=0 or aopath.find("EVTCOUNT")>=0) : continue
+ print aopath
+ if ( aopath in outhistos ) :
+ aotype = type(ao)
+ if aotype in (yoda.Counter, yoda.Histo1D, yoda.Histo2D, yoda.Profile1D, yoda.Profile2D):
+ outhistos[aopath] += ao
+ else :
+ quit()
+ else:
+ outhistos[aopath] = ao
for hpath,hsets in inhistos.iteritems():
if( hpath.find("1263495")>0 or
hpath.find("1093738")>0 or
hpath.find("921594")>0 or
hpath.find("8914702")>0 or
hpath.find("1244522")>0 ) :
if(type(hsets.values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].path,
hsets.values()[0].title)
elif(type(hsets.values()[0])==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].path,
hsets.values()[0].title)
for i in range(0,hsets.values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].bins[i].xMin,
hsets.values()[0].bins[i].xMax)
elif(type(hsets.values()[0])==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(hsets.values()[0].path,
hsets.values()[0].title)
for i in range(0,hsets.values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].bins[i].xMin,
hsets.values()[0].bins[i].xMax)
else :
logging.error("Histogram %s is of unknown type" % hpath)
print hpath,type(hsets.values()[0])
sys.exit(1)
logging.info("Processing ATLAS_2013_I1263495")
mergeByPt("/ATLAS_2013_I1263495/d01-x01-y01")
mergeByPt("/ATLAS_2013_I1263495/d01-x01-y03")
useOnePt("/ATLAS_2013_I1263495/d01-x02-y01", "90" )
logging.info("Processing ATLAS_2012_I1093738")
mergeByPt("/ATLAS_2012_I1093738/d01-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d02-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d03-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d04-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d05-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d06-x01-y01")
logging.info("Processing ATLAS_2011_I921594")
mergeByPt("/ATLAS_2011_I921594/d01-x01-y01")
mergeByPt("/ATLAS_2011_I921594/d01-x01-y02")
mergeByPt("/ATLAS_2011_I921594/d01-x01-y04")
mergeByPt("/ATLAS_2011_I921594/d01-x01-y05")
logging.info("Processing ATLAS_2010_S8914702")
mergeByPt("/ATLAS_2010_S8914702/d01-x01-y01")
mergeByPt("/ATLAS_2010_S8914702/d01-x01-y02")
mergeByPt("/ATLAS_2010_S8914702/d01-x01-y03")
logging.info("Processing CMS_2013_I1258128")
useOnePt("/CMS_2013_I1258128/d05-x01-y01", "35" )
useOnePt("/CMS_2013_I1258128/d06-x01-y01", "35" )
useOnePt("/CMS_2013_I1258128/d07-x01-y01", "35" )
useOnePt("/CMS_2013_I1258128/d08-x01-y01", "35" )
logging.info("Processing ATLAS_2013_I1244522")
mergeByPt("/ATLAS_2013_I1244522/d01-x01-y01")
mergeByPt("/ATLAS_2013_I1244522/d02-x01-y01")
useOnePt("/ATLAS_2013_I1244522/d03-x01-y01", "35" )
useOnePt("/ATLAS_2013_I1244522/d04-x01-y01", "35" )
useOnePt("/ATLAS_2013_I1244522/d05-x01-y01", "35" )
useOnePt("/ATLAS_2013_I1244522/d06-x01-y01", "35" )
useOnePt("/ATLAS_2013_I1244522/d07-x01-y01", "35" )
logging.info("Processing /MC_PHOTONJETS")
useOnePt("/MC_PHOTONJETS/jet_HT","0")
useOnePt("/MC_PHOTONJETS/jet_eta_1","0")
useOnePt("/MC_PHOTONJETS/jet_eta_2","0")
useOnePt("/MC_PHOTONJETS/jet_eta_3","0")
useOnePt("/MC_PHOTONJETS/jet_eta_4","0")
useOnePt("/MC_PHOTONJETS/jet_eta_pmratio_1","0")
useOnePt("/MC_PHOTONJETS/jet_eta_pmratio_2","0")
useOnePt("/MC_PHOTONJETS/jet_eta_pmratio_3","0")
useOnePt("/MC_PHOTONJETS/jet_eta_pmratio_4","0")
useOnePt("/MC_PHOTONJETS/jet_mass_1","0")
useOnePt("/MC_PHOTONJETS/jet_mass_2","0")
useOnePt("/MC_PHOTONJETS/jet_mass_3","0")
useOnePt("/MC_PHOTONJETS/jet_mass_4","0")
useOnePt("/MC_PHOTONJETS/jet_multi_exclusive","0")
useOnePt("/MC_PHOTONJETS/jet_multi_inclusive","0")
useOnePt("/MC_PHOTONJETS/jet_multi_ratio","0")
useOnePt("/MC_PHOTONJETS/jet_pT_1","0")
useOnePt("/MC_PHOTONJETS/jet_pT_2","0")
useOnePt("/MC_PHOTONJETS/jet_pT_3","0")
useOnePt("/MC_PHOTONJETS/jet_pT_4","0")
useOnePt("/MC_PHOTONJETS/jet_y_1","0")
useOnePt("/MC_PHOTONJETS/jet_y_2","0")
useOnePt("/MC_PHOTONJETS/jet_y_3","0")
useOnePt("/MC_PHOTONJETS/jet_y_4","0")
useOnePt("/MC_PHOTONJETS/jet_y_pmratio_1","0")
useOnePt("/MC_PHOTONJETS/jet_y_pmratio_2","0")
useOnePt("/MC_PHOTONJETS/jet_y_pmratio_3","0")
useOnePt("/MC_PHOTONJETS/jet_y_pmratio_4","0")
useOnePt("/MC_PHOTONJETS/jets_dR_12","0")
useOnePt("/MC_PHOTONJETS/jets_dR_13","0")
useOnePt("/MC_PHOTONJETS/jets_dR_23","0")
useOnePt("/MC_PHOTONJETS/jets_deta_12","0")
useOnePt("/MC_PHOTONJETS/jets_deta_13","0")
useOnePt("/MC_PHOTONJETS/jets_deta_23","0")
useOnePt("/MC_PHOTONJETS/jets_dphi_12","0")
useOnePt("/MC_PHOTONJETS/jets_dphi_13","0")
useOnePt("/MC_PHOTONJETS/jets_dphi_23","0")
useOnePt("/MC_PHOTONJETS/photon_jet1_dR","0")
useOnePt("/MC_PHOTONJETS/photon_jet1_deta","0")
useOnePt("/MC_PHOTONJETS/photon_jet1_dphi","0")
useOnePt("/MC_PHOTONJETUE/gammajet-dR","0")
useOnePt("/MC_PHOTONJETUE/gammajet-dphi","0")
useOnePt("/MC_PHOTONJETUE/trans-maxnchg-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-maxnchg-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-maxptsum-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-maxptsum-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-minnchg-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-minnchg-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-minptsum-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-minptsum-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-nchg-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-nchg-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-ptavg-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-ptavg-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-ptsum-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-ptsum-jet","0")
# Choose output file
yoda.writeYODA(outhistos,opts.OUTFILE)
sys.exit(0)
diff --git a/Tests/python/merge-TVT-Photon b/Tests/python/merge-TVT-Photon
new file mode 100644
--- /dev/null
+++ b/Tests/python/merge-TVT-Photon
@@ -0,0 +1,65 @@
+#! /usr/bin/env python
+import logging
+import sys
+import os, yoda
+
+"""%prog
+
+Script for merging aida files
+
+"""
+
+if sys.version_info[:3] < (2,4,0):
+ print "rivet scripts require Python version >= 2.4.0... exiting"
+ sys.exit(1)
+
+if __name__ == "__main__":
+ import logging
+ from optparse import OptionParser, OptionGroup
+ parser = OptionParser(usage="%prog aidafile aidafile2 [...]")
+ parser.add_option("-o", "--out", dest="OUTFILE", default="-")
+ verbgroup = OptionGroup(parser, "Verbosity control")
+ verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
+ default=logging.INFO, help="print debug (very verbose) messages")
+ verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
+ default=logging.INFO, help="be very quiet")
+ parser.add_option_group(verbgroup)
+ (opts, args) = parser.parse_args()
+ logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
+
+ ## Check args
+ if len(args) < 1:
+ logging.error("Must specify at least the name of the files")
+ sys.exit(1)
+
+files=["-Run-II-PromptPhoton.yoda",
+ "-Run-II-DiPhoton-GammaGamma.yoda","-Run-II-DiPhoton-GammaJet.yoda"]
+
+## Get histos
+inhistos = {}
+outhistos={}
+for f in files:
+ file=args[0]+f
+ if not os.access(file, os.R_OK):
+ logging.error("%s can not be read" % file)
+ continue
+ try:
+ aos = yoda.read(file)
+ except:
+ logging.error("%s can not be parsed as XML" % file)
+ break
+ ## Get histos from this YODA file
+ for aopath, ao in aos.iteritems() :
+ if(aopath.find("XSEC")>=0 or aopath.find("EVTCOUNT")>=0) : continue
+ if ( aopath in outhistos ) :
+ aotype = type(ao)
+ if aotype in (yoda.Counter, yoda.Histo1D, yoda.Histo2D, yoda.Profile1D, yoda.Profile2D):
+ outhistos[aopath] += ao
+ else :
+ quit()
+ else:
+ outhistos[aopath] = ao
+
+# Choose output file
+yoda.writeYODA(outhistos,opts.OUTFILE)
+sys.exit(0)
diff --git a/src/defaults/MatrixElements.in b/src/defaults/MatrixElements.in
--- a/src/defaults/MatrixElements.in
+++ b/src/defaults/MatrixElements.in
@@ -1,254 +1,261 @@
# -*- ThePEG-repository -*-
##############################################################################
# Setup of default matrix elements.
#
# Only one ME is activated by default, but this file lists
# some alternatives. All available MEs can be found in the
# 'include/Herwig/MatrixElements' subdirectory of your Herwig
# installation.
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Instead of editing this file directly, you should reset
# the matrix elements in your own input files:
#
# - create your custom SubProcessHandler
# - insert the MEs you need
# - set your SubProcessHandler instead of the default (see HerwigDefaults.in)
##############################################################################
mkdir /Herwig/MatrixElements
cd /Herwig/MatrixElements
library HwMELepton.so
library HwMEHadron.so
library HwMEDIS.so
############################################################
# e+e- matrix elements
############################################################
# e+e- > q qbar
create Herwig::MEee2gZ2qq MEee2gZ2qq
newdef MEee2gZ2qq:MinimumFlavour 1
newdef MEee2gZ2qq:MaximumFlavour 5
newdef MEee2gZ2qq:AlphaQCD /Herwig/Shower/AlphaQCD
newdef MEee2gZ2qq:AlphaQED /Herwig/Shower/AlphaQED
# e+e- -> l+l-
create Herwig::MEee2gZ2ll MEee2gZ2ll
newdef MEee2gZ2ll:Allowed Charged
set MEee2gZ2ll:AlphaQED /Herwig/Shower/AlphaQED
# e+e- -> W+W- ZZ
create Herwig::MEee2VV MEee2VV
# e+e- -> ZH
create Herwig::MEee2ZH MEee2ZH
newdef MEee2ZH:Coupling /Herwig/Shower/AlphaQCD
# e+e- -> e+e-H/nu_enu_ebarH
create Herwig::MEee2HiggsVBF MEee2HiggsVBF
############################################################
# NLO (POWHEG e+e- matrix elements
############################################################
library HwPowhegMELepton.so
create Herwig::MEee2gZ2qqPowheg PowhegMEee2gZ2qq
newdef PowhegMEee2gZ2qq:MinimumFlavour 1
newdef PowhegMEee2gZ2qq:MaximumFlavour 5
newdef PowhegMEee2gZ2qq:AlphaQCD /Herwig/Shower/AlphaQCD
newdef PowhegMEee2gZ2qq:AlphaQED /Herwig/Shower/AlphaQED
create Herwig::MEee2gZ2llPowheg PowhegMEee2gZ2ll
newdef PowhegMEee2gZ2ll:Allowed Charged
set PowhegMEee2gZ2ll:AlphaQED /Herwig/Shower/AlphaQED
############################################################
# hadron-hadron matrix elements
############################################################
###################################
# Electroweak processes
###################################
# q qbar -> gamma/Z -> l+l-
create Herwig::MEqq2gZ2ff MEqq2gZ2ff
newdef MEqq2gZ2ff:Process 3
newdef MEqq2gZ2ff:Coupling /Herwig/Shower/AlphaQCD
# q qbar to W -> l nu
create Herwig::MEqq2W2ff MEqq2W2ff
newdef MEqq2W2ff:Process 2
newdef MEqq2W2ff:Coupling /Herwig/Shower/AlphaQCD
# W+jet
create Herwig::MEPP2WJet MEWJet
newdef MEWJet:WDecay Leptons
# Z+jet
create Herwig::MEPP2ZJet MEZJet
newdef MEZJet:ZDecay ChargedLeptons
# PP->WW/WZ/ZZ
create Herwig::MEPP2VV MEPP2VV
# PP->WZ gamma
create Herwig::MEPP2VGamma MEPP2VGamma
###################################
# Photon and jet processes
###################################
# qqbar/gg -> gamma gamma
create Herwig::MEPP2GammaGamma MEGammaGamma
# hadron-hadron to gamma+jet
create Herwig::MEPP2GammaJet MEGammaJet
# QCD 2-to-2
create Herwig::MEQCD2to2 MEQCD2to2
# MinBias
create Herwig::MEMinBias MEMinBias
###################################
# Heavy Quark
###################################
# qqbar/gg -> t tbar
create Herwig::MEPP2QQ MEHeavyQuark
create Herwig::MEPP2SingleTop MESingleTopTChannel
set MESingleTopTChannel:Process tChannel
create Herwig::MEPP2SingleTop MESingleTopSChannel
set MESingleTopSChannel:Process sChannel
create Herwig::MEPP2SingleTop MESingleTopTW
set MESingleTopTW:Process tW
###################################
# Higgs processes
###################################
# hadron-hadron to higgs
create Herwig::MEPP2Higgs MEHiggs
newdef MEHiggs:ShapeScheme MassGenerator
newdef MEHiggs:Process gg
newdef MEHiggs:Coupling /Herwig/Shower/AlphaQCD
# hadron-hadron to higgs+jet
create Herwig::MEPP2HiggsJet MEHiggsJet
# PP->ZH
create Herwig::MEPP2ZH MEPP2ZH
newdef MEPP2ZH:Coupling /Herwig/Shower/AlphaQCD
# PP->WH
create Herwig::MEPP2WH MEPP2WH
newdef MEPP2WH:Coupling /Herwig/Shower/AlphaQCD
# PP -> Higgs via VBF
create Herwig::MEPP2HiggsVBF MEPP2HiggsVBF
newdef MEPP2HiggsVBF:ShowerAlphaQCD /Herwig/Shower/AlphaQCD
# PP -> t tbar Higgs
create Herwig::MEPP2QQHiggs MEPP2ttbarH
newdef MEPP2ttbarH:QuarkType Top
# PP -> b bbar Higgs
create Herwig::MEPP2QQHiggs MEPP2bbbarH
newdef MEPP2bbbarH:QuarkType Bottom
##########################################################
# Hadron-Hadron NLO matrix elements in the Powheg scheme
##########################################################
library HwPowhegMEHadron.so
# q qbar -> gamma/Z -> l+l-
create Herwig::MEqq2gZ2ffPowheg PowhegMEqq2gZ2ff
newdef PowhegMEqq2gZ2ff:Process 3
newdef PowhegMEqq2gZ2ff:Coupling /Herwig/Shower/AlphaQCD
# q qbar to W -> l nu
create Herwig::MEqq2W2ffPowheg PowhegMEqq2W2ff
newdef PowhegMEqq2W2ff:Process 2
newdef PowhegMEqq2W2ff:Coupling /Herwig/Shower/AlphaQCD
# PP->ZH
create Herwig::MEPP2ZHPowheg PowhegMEPP2ZH
newdef PowhegMEPP2ZH:Coupling /Herwig/Shower/AlphaQCD
# PP->WH
create Herwig::MEPP2WHPowheg PowhegMEPP2WH
newdef PowhegMEPP2WH:Coupling /Herwig/Shower/AlphaQCD
# hadron-hadron to higgs
create Herwig::MEPP2HiggsPowheg PowhegMEHiggs
newdef PowhegMEHiggs:ShapeScheme MassGenerator
newdef PowhegMEHiggs:Process gg
newdef PowhegMEHiggs:Coupling /Herwig/Shower/AlphaQCD
# PP->VV
create Herwig::MEPP2VVPowheg PowhegMEPP2VV
newdef PowhegMEPP2VV:Coupling /Herwig/Shower/AlphaQCD
# PP -> Higgs via VBF
create Herwig::MEPP2HiggsVBFPowheg PowhegMEPP2HiggsVBF
newdef PowhegMEPP2HiggsVBF:ShowerAlphaQCD /Herwig/Shower/AlphaQCD
+# PP -> diphoton NLO
+create Herwig::MEPP2GammaGammaPowheg MEGammaGammaPowheg
+set MEGammaGammaPowheg:Process 0
+set MEGammaGammaPowheg:Contribution 1
+set MEGammaGammaPowheg:ShowerAlphaQCD /Herwig/Shower/AlphaQCD
+set MEGammaGammaPowheg:ShowerAlphaQED /Herwig/Shower/AlphaQED
+
##########################################################
# DIS matrix elements
##########################################################
# neutral current
create Herwig::MENeutralCurrentDIS MEDISNC
newdef MEDISNC:Coupling /Herwig/Shower/AlphaQCD
newdef MEDISNC:Contribution 0
# charged current
create Herwig::MEChargedCurrentDIS MEDISCC
newdef MEDISCC:Coupling /Herwig/Shower/AlphaQCD
newdef MEDISCC:Contribution 0
# neutral current (POWHEG)
create Herwig::MENeutralCurrentDIS PowhegMEDISNC
newdef PowhegMEDISNC:Coupling /Herwig/Shower/AlphaQCD
newdef PowhegMEDISNC:Contribution 1
# charged current (POWHEG)
create Herwig::MEChargedCurrentDIS PowhegMEDISCC
newdef PowhegMEDISCC:Coupling /Herwig/Shower/AlphaQCD
newdef PowhegMEDISCC:Contribution 1
##########################################################
# Gamma-Gamma matrix elements
##########################################################
# fermion-antiferimon
create Herwig::MEGammaGamma2ff MEgg2ff HwMEGammaGamma.so
# W+ W-
create Herwig::MEGammaGamma2WW MEgg2WW HwMEGammaGamma.so
##########################################################
# Gamma-Hadron matrix elements
##########################################################
# gamma parton -> 2 jets
create Herwig::MEGammaP2Jets MEGammaP2Jets HwMEGammaHadron.so
##########################################################
# Set up the Subprocesses
#
# For e+e-
##########################################################
create ThePEG::SubProcessHandler SimpleEE
newdef SimpleEE:PartonExtractor /Herwig/Partons/EEExtractor
##########################################################
# For hadron-hadron
##########################################################
create ThePEG::SubProcessHandler SimpleQCD
newdef SimpleQCD:PartonExtractor /Herwig/Partons/QCDExtractor
##########################################################
# For DIS
##########################################################
create ThePEG::SubProcessHandler SimpleDIS
newdef SimpleDIS:PartonExtractor /Herwig/Partons/DISExtractor

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 6:02 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3797841
Default Alt Text
(232 KB)

Event Timeline