Page MenuHomeHEPForge

No OneTemporary

This file is larger than 256 KB, so syntax highlighting was skipped.
diff --git a/Hadronization/ClusterFissioner.cc b/Hadronization/ClusterFissioner.cc
--- a/Hadronization/ClusterFissioner.cc
+++ b/Hadronization/ClusterFissioner.cc
@@ -1,950 +1,943 @@
// -*- C++ -*-
//
// ClusterFissioner.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2011 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// Thisk is the implementation of the non-inlined, non-templated member
// functions of the ClusterFissioner class.
//
#include "ClusterFissioner.h"
#include <ThePEG/Interface/ClassDocumentation.h>
#include <ThePEG/Interface/Reference.h>
#include <ThePEG/Interface/Parameter.h>
#include <ThePEG/Interface/Switch.h>
#include <ThePEG/Persistency/PersistentOStream.h>
#include <ThePEG/Persistency/PersistentIStream.h>
#include <ThePEG/PDT/EnumParticles.h>
#include "Herwig/Utilities/Kinematics.h"
#include "CheckId.h"
#include "Cluster.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include <ThePEG/Utilities/DescribeClass.h>
using namespace Herwig;
DescribeClass<ClusterFissioner,Interfaced>
describeClusterFissioner("Herwig::ClusterFissioner","");
ClusterFissioner::ClusterFissioner() :
_clMaxLight(3.35*GeV),
_clMaxBottom(3.35*GeV),
_clMaxCharm(3.35*GeV),
_clMaxExotic(3.35*GeV),
_clPowLight(2.0),
_clPowBottom(2.0),
_clPowCharm(2.0),
_clPowExotic(2.0),
_pSplitLight(1.0),
_pSplitBottom(1.0),
_pSplitCharm(1.0),
_pSplitExotic(1.0),
_btClM(1.0*GeV),
_iopRem(1),
_kappa(1.0e15*GeV/meter)
{}
IBPtr ClusterFissioner::clone() const {
return new_ptr(*this);
}
IBPtr ClusterFissioner::fullclone() const {
return new_ptr(*this);
}
void ClusterFissioner::persistentOutput(PersistentOStream & os) const {
os << _hadronsSelector << ounit(_clMaxLight,GeV)
<< ounit(_clMaxBottom,GeV) << ounit(_clMaxCharm,GeV)
<< ounit(_clMaxExotic,GeV) << _clPowLight << _clPowBottom
<< _clPowCharm << _clPowExotic << _pSplitLight
<< _pSplitBottom << _pSplitCharm << _pSplitExotic << ounit(_btClM,GeV)
<< _iopRem << ounit(_kappa, GeV/meter);
}
void ClusterFissioner::persistentInput(PersistentIStream & is, int) {
is >> _hadronsSelector >> iunit(_clMaxLight,GeV)
>> iunit(_clMaxBottom,GeV) >> iunit(_clMaxCharm,GeV)
>> iunit(_clMaxExotic,GeV) >> _clPowLight >> _clPowBottom
>> _clPowCharm >> _clPowExotic >> _pSplitLight
>> _pSplitBottom >> _pSplitCharm >> _pSplitExotic
>> iunit(_btClM,GeV) >> _iopRem
>> iunit(_kappa, GeV/meter);
}
void ClusterFissioner::Init() {
static ClassDocumentation<ClusterFissioner> documentation
("Class responsibles for chopping up the clusters");
static Reference<ClusterFissioner,HadronSelector>
interfaceHadronSelector("HadronSelector",
"A reference to the HadronSelector object",
&Herwig::ClusterFissioner::_hadronsSelector,
false, false, true, false);
// ClMax for light, Bottom, Charm and exotic (e.g. Susy) quarks
static Parameter<ClusterFissioner,Energy>
interfaceClMaxLight ("ClMaxLight","cluster max mass for light quarks (unit [GeV])",
&ClusterFissioner::_clMaxLight, GeV, 3.35*GeV, ZERO, 10.0*GeV,
false,false,false);
static Parameter<ClusterFissioner,Energy>
interfaceClMaxBottom ("ClMaxBottom","cluster max mass for b quarks (unit [GeV])",
&ClusterFissioner::_clMaxBottom, GeV, 3.35*GeV, ZERO, 10.0*GeV,
false,false,false);
static Parameter<ClusterFissioner,Energy>
interfaceClMaxCharm ("ClMaxCharm","cluster max mass for c quarks (unit [GeV])",
&ClusterFissioner::_clMaxCharm, GeV, 3.35*GeV, ZERO, 10.0*GeV,
false,false,false);
static Parameter<ClusterFissioner,Energy>
interfaceClMaxExotic ("ClMaxExotic","cluster max mass for exotic quarks (unit [GeV])",
&ClusterFissioner::_clMaxExotic, GeV, 3.35*GeV, ZERO, 10.0*GeV,
false,false,false);
// ClPow for light, Bottom, Charm and exotic (e.g. Susy) quarks
static Parameter<ClusterFissioner,double>
interfaceClPowLight ("ClPowLight","cluster mass exponent for light quarks",
&ClusterFissioner::_clPowLight, 0, 2.0, 0.0, 10.0,false,false,false);
static Parameter<ClusterFissioner,double>
interfaceClPowBottom ("ClPowBottom","cluster mass exponent for b quarks",
&ClusterFissioner::_clPowBottom, 0, 2.0, 0.0, 10.0,false,false,false);
static Parameter<ClusterFissioner,double>
interfaceClPowCharm ("ClPowCharm","cluster mass exponent for c quarks",
&ClusterFissioner::_clPowCharm, 0, 2.0, 0.0, 10.0,false,false,false);
static Parameter<ClusterFissioner,double>
interfaceClPowExotic ("ClPowExotic","cluster mass exponent for exotic quarks",
&ClusterFissioner::_clPowExotic, 0, 2.0, 0.0, 10.0,false,false,false);
// PSplit for light, Bottom, Charm and exotic (e.g. Susy) quarks
static Parameter<ClusterFissioner,double>
interfacePSplitLight ("PSplitLight","cluster mass splitting param for light quarks",
&ClusterFissioner::_pSplitLight, 0, 1.0, 0.0, 10.0,false,false,false);
static Parameter<ClusterFissioner,double>
interfacePSplitBottom ("PSplitBottom","cluster mass splitting param for b quarks",
&ClusterFissioner::_pSplitBottom, 0, 1.0, 0.0, 10.0,false,false,false);
static Parameter<ClusterFissioner,double>
interfacePSplitCharm ("PSplitCharm","cluster mass splitting param for c quarks",
&ClusterFissioner::_pSplitCharm, 0, 1.0, 0.0, 10.0,false,false,false);
static Parameter<ClusterFissioner,double>
interfacePSplitExotic ("PSplitExotic","cluster mass splitting param for exotic quarks",
&ClusterFissioner::_pSplitExotic, 0, 1.0, 0.0, 10.0,false,false,false);
static Switch<ClusterFissioner,int> interfaceRemnantOption
("RemnantOption",
"Option for the treatment of remnant clusters",
&ClusterFissioner::_iopRem, 1, false, false);
static SwitchOption interfaceRemnantOptionSoft
(interfaceRemnantOption,
"Soft",
"Both clusters produced in the fission of the beam cluster"
" are treated as soft clusters.",
0);
static SwitchOption interfaceRemnantOptionHard
(interfaceRemnantOption,
"Hard",
"Only the cluster containing the remnant is treated as a soft cluster.",
1);
static SwitchOption interfaceRemnantOptionVeryHard
(interfaceRemnantOption,
"VeryHard",
"Even remnant clusters are treated as hard, i.e. all clusters the same",
2);
static Parameter<ClusterFissioner,Energy> interfaceBTCLM
("SoftClusterFactor",
"Parameter for the mass spectrum of remnant clusters",
&ClusterFissioner::_btClM, GeV, 1.*GeV, 0.1*GeV, 10.0*GeV,
false, false, Interface::limited);
static Parameter<ClusterFissioner,Tension> interfaceStringTension
("StringTension",
"String tension used in vertex displacement calculation",
&ClusterFissioner::_kappa, GeV/meter,
1.0e15*GeV/meter, ZERO, ZERO,
false, false, Interface::lowerlim);
}
tPVector ClusterFissioner::fission(ClusterVector & clusters, bool softUEisOn) {
// return if no clusters
if (clusters.empty()) return tPVector();
/*****************
* Loop over the (input) collection of cluster pointers, and store in
* the vector splitClusters all the clusters that need to be split
* (these are beam clusters, if soft underlying event is off, and
* heavy non-beam clusters).
********************/
stack<ClusterPtr> splitClusters;
for(ClusterVector::iterator it = clusters.begin() ;
it != clusters.end() ; ++it) {
/**************
* Skip 3-component clusters that have been redefined (as 2-component
* clusters) or not available clusters. The latter check is indeed
* redundant now, but it is used for possible future extensions in which,
* for some reasons, some of the clusters found by ClusterFinder are tagged
* straight away as not available.
**************/
if((*it)->isRedefined() || !(*it)->isAvailable()) continue;
// if the cluster is a beam cluster add it to the vector of clusters
// to be split or if it is heavy
if((*it)->isBeamCluster() || isHeavy(*it)) splitClusters.push(*it);
}
tPVector finalhadrons;
cut(splitClusters, clusters, finalhadrons, softUEisOn);
return finalhadrons;
}
void ClusterFissioner::cut(stack<ClusterPtr> & clusterStack,
ClusterVector &clusters, tPVector & finalhadrons,
bool softUEisOn) {
/**************************************************
* This method does the splitting of the cluster pointed by cluPtr
* and "recursively" by all of its cluster children, if heavy. All of these
* new children clusters are added (indeed the pointers to them) to the
* collection of cluster pointers collecCluPtr. The method works as follows.
* Initially the vector vecCluPtr contains just the input pointer to the
* cluster to be split. Then it will be filled "recursively" by all
* of the cluster's children that are heavy enough to require, in their turn,
* to be split. In each loop, the last element of the vector vecCluPtr is
* considered (only once because it is then removed from the vector).
* This approach is conceptually recursive, but avoid the overhead of
* a concrete recursive function. Furthermore it requires minimal changes
* in the case that the fission of an heavy cluster could produce more
* than two cluster children as assumed now.
*
* Draw the masses: for normal, non-beam clusters a power-like mass dist
* is used, whereas for beam clusters a fast-decreasing exponential mass
* dist is used instead (to avoid many iterative splitting which could
* produce an unphysical large transverse energy from a supposed soft beam
* remnant process).
****************************************/
// Here we recursively loop over clusters in the stack and cut them
while (!clusterStack.empty()) {
// take the last element of the vector
ClusterPtr iCluster = clusterStack.top(); clusterStack.pop();
// split it
cutType ct = iCluster->numComponents() == 2 ?
cutTwo(iCluster, finalhadrons, softUEisOn) :
cutThree(iCluster, finalhadrons, softUEisOn);
// There are cases when we don't want to split, even if it fails mass test
if(!ct.first.first || !ct.second.first) {
// if an unsplit beam cluster leave if for the underlying event
if(iCluster->isBeamCluster() && softUEisOn)
iCluster->isAvailable(false);
continue;
}
// check if clusters
ClusterPtr one = dynamic_ptr_cast<ClusterPtr>(ct.first.first);
ClusterPtr two = dynamic_ptr_cast<ClusterPtr>(ct.second.first);
// is a beam cluster must be split into two clusters
if(iCluster->isBeamCluster() && (!one||!two) && softUEisOn) {
iCluster->isAvailable(false);
continue;
}
// There should always be a intermediate quark(s) from the splitting
assert(ct.first.second && ct.second.second);
/// \todo sort out motherless quark pairs here. Watch out for 'quark in final state' errors
iCluster->addChild(ct.first.first);
// iCluster->addChild(ct.first.second);
// ct.first.second->addChild(ct.first.first);
iCluster->addChild(ct.second.first);
// iCluster->addChild(ct.second.second);
// ct.second.second->addChild(ct.second.first);
// Sometimes the clusters decay C -> H + C' rather then C -> C' + C''
if(one) {
clusters.push_back(one);
if(one->isBeamCluster() && softUEisOn)
one->isAvailable(false);
if(isHeavy(one) && one->isAvailable())
clusterStack.push(one);
}
if(two) {
clusters.push_back(two);
if(two->isBeamCluster() && softUEisOn)
two->isAvailable(false);
if(isHeavy(two) && two->isAvailable())
clusterStack.push(two);
}
}
}
namespace {
/**
* Check if can't make a hadron from the partons
*/
bool cantMakeHadron(tcPPtr p1, tcPPtr p2) {
return ! CheckId::canBeHadron(p1->dataPtr(), p2->dataPtr());
}
/**
* Check if can't make a diquark from the partons
*/
bool cantMakeDiQuark(tcPPtr p1, tcPPtr p2) {
long id1 = p1->id(), id2 = p2->id();
return ! (QuarkMatcher::Check(id1) && QuarkMatcher::Check(id2) && id1*id2>0);
}
}
ClusterFissioner::cutType
ClusterFissioner::cutTwo(ClusterPtr & cluster, tPVector & finalhadrons,
bool softUEisOn) {
// need to make sure only 2-cpt clusters get here
assert(cluster->numComponents() == 2);
tPPtr ptrQ1 = cluster->particle(0);
tPPtr ptrQ2 = cluster->particle(1);
Energy Mc = cluster->mass();
assert(ptrQ1);
assert(ptrQ2);
// And check if those particles are from a beam remnant
bool rem1 = cluster->isBeamRemnant(0);
bool rem2 = cluster->isBeamRemnant(1);
// workout which distribution to use
bool soft1(false),soft2(false);
switch (_iopRem) {
case 0:
soft1 = rem1 || rem2;
soft2 = rem2 || rem1;
break;
case 1:
soft1 = rem1;
soft2 = rem2;
break;
}
// Initialization for the exponential ("soft") mass distribution.
static const int max_loop = 1000;
int counter = 0;
Energy Mc1 = ZERO, Mc2 = ZERO,m1=ZERO,m2=ZERO,m=ZERO;
- bool toHadron1(false), toHadron2(false);
+ tcPDPtr toHadron1, toHadron2;
PPtr newPtr1 = PPtr ();
PPtr newPtr2 = PPtr ();
bool succeeded = false;
do
{
succeeded = false;
++counter;
drawNewFlavour(newPtr1,newPtr2);
// check for right ordering
assert (ptrQ2);
assert (newPtr2);
assert (ptrQ2->dataPtr());
assert (newPtr2->dataPtr());
if(cantMakeHadron(ptrQ1, newPtr1) || cantMakeHadron(ptrQ2, newPtr2)) {
swap(newPtr1, newPtr2);
// check again
if(cantMakeHadron(ptrQ1, newPtr1) || cantMakeHadron(ptrQ2, newPtr2)) {
throw Exception()
<< "ClusterFissioner cannot split the cluster ("
<< ptrQ1->PDGName() << ' ' << ptrQ2->PDGName()
<< ") into hadrons.\n" << Exception::runerror;
}
}
// Check that new clusters can produce particles and there is enough
// phase space to choose the drawn flavour
m1 = ptrQ1->data().constituentMass();
m2 = ptrQ2->data().constituentMass();
m = newPtr1->data().constituentMass();
// Do not split in the case there is no phase space available
if(Mc < m1+m + m2+m) continue;
// power for splitting
double exp1=_pSplitLight;
double exp2=_pSplitLight;
if (CheckId::isExotic(ptrQ1->dataPtr())) exp1 = _pSplitExotic;
else if(CheckId::hasBottom(ptrQ1->dataPtr()))exp1 = _pSplitBottom;
else if(CheckId::hasCharm(ptrQ1->dataPtr())) exp1 = _pSplitCharm;
if (CheckId::isExotic(ptrQ2->dataPtr())) exp2 = _pSplitExotic;
else if(CheckId::hasBottom(ptrQ2->dataPtr())) exp2 = _pSplitBottom;
else if(CheckId::hasCharm(ptrQ2->dataPtr())) exp2 = _pSplitCharm;
// If, during the drawing of candidate masses, too many attempts fail
// (because the phase space available is tiny)
/// \todo run separate loop here?
Mc1 = drawChildMass(Mc,m1,m2,m,exp1,soft1);
Mc2 = drawChildMass(Mc,m2,m1,m,exp2,soft2);
if(Mc1 < m1+m || Mc2 < m+m2 || Mc1+Mc2 > Mc) continue;
/**************************
* New (not present in Fortran Herwig):
* check whether the fragment masses Mc1 and Mc2 are above the
* threshold for the production of the lightest pair of hadrons with the
* right flavours. If not, then set by hand the mass to the lightest
* single hadron with the right flavours, in order to solve correctly
* the kinematics, and (later in this method) create directly such hadron
* and add it to the children hadrons of the cluster that undergoes the
* fission (i.e. the one pointed by iCluPtr). Notice that in this special
* case, the heavy cluster that undergoes the fission has one single
* cluster child and one single hadron child. We prefer this approach,
* rather than to create a light cluster, with the mass set equal to
* the lightest hadron, and let then the class LightClusterDecayer to do
* the job to decay it to that single hadron, for two reasons:
* First, because the sum of the masses of the two constituents can be,
* in this case, greater than the mass of that hadron, hence it would
* be impossible to solve the kinematics for such two components, and
* therefore we would have a cluster whose components are undefined.
* Second, the algorithm is faster, because it avoids the reshuffling
* procedure that would be necessary if we used LightClusterDecayer
* to decay the light cluster to the lightest hadron.
****************************/
- toHadron1 = false;
- if(Mc1 < _hadronsSelector->massLightestHadronPair(ptrQ1->dataPtr(), newPtr1->dataPtr())) {
- Mc1 = _hadronsSelector->massLightestHadron(ptrQ1->dataPtr(), newPtr1->dataPtr());
- toHadron1 = true;
- }
- toHadron2 = false;
- if(Mc2 < _hadronsSelector->massLightestHadronPair(ptrQ2->dataPtr(), newPtr2->dataPtr())) {
- Mc2 = _hadronsSelector->massLightestHadron(ptrQ2->dataPtr(), newPtr2->dataPtr());
- toHadron2 = true;
- }
-
+ toHadron1 = _hadronsSelector->chooseSingleHadron(ptrQ1->dataPtr(), newPtr1->dataPtr(),Mc1);
+ if(toHadron1) Mc1 = toHadron1->mass();
+ toHadron2 = _hadronsSelector->chooseSingleHadron(ptrQ2->dataPtr(), newPtr2->dataPtr(),Mc2);
+ if(toHadron2) Mc2 = toHadron2->mass();
// if a beam cluster not allowed to decay to hadrons
if(cluster->isBeamCluster() && (toHadron1||toHadron2) && softUEisOn)
continue;
// Check if the decay kinematics is still possible: if not then
// force the one-hadron decay for the other cluster as well.
if(Mc1 + Mc2 > Mc) {
if(!toHadron1) {
- Mc1 = _hadronsSelector->massLightestHadron(ptrQ1->dataPtr(), newPtr1->dataPtr());
- toHadron1 = true;
- } else if(!toHadron2) {
- Mc2 = _hadronsSelector->massLightestHadron(ptrQ2->dataPtr(), newPtr2->dataPtr());
- toHadron2 = true;
+ toHadron1 = _hadronsSelector->chooseSingleHadron(ptrQ1->dataPtr(), newPtr1->dataPtr(),Mc-Mc2);
+ if(toHadron1) Mc1 = toHadron1->mass();
+ }
+ else if(!toHadron2) {
+ toHadron2 = _hadronsSelector->chooseSingleHadron(ptrQ2->dataPtr(), newPtr2->dataPtr(),Mc-Mc1);
+ if(toHadron2) Mc2 = toHadron2->mass();
}
}
succeeded = (Mc >= Mc1+Mc2);
}
while (!succeeded && counter < max_loop);
if(counter >= max_loop) {
static const PPtr null = PPtr();
return cutType(PPair(null,null),PPair(null,null));
}
// Determined the (5-components) momenta (all in the LAB frame)
Lorentz5Momentum pClu = cluster->momentum(); // known
Lorentz5Momentum p0Q1 = ptrQ1->momentum(); // known (mom Q1 before fission)
Lorentz5Momentum pClu1, pClu2, pQ1, pQone, pQtwo, pQ2; //unknown
pClu1.setMass(Mc1);
pClu2.setMass(Mc2);
pQ1.setMass(m1);
pQ2.setMass(m2);
pQone.setMass(m);
pQtwo.setMass(m);
-
calculateKinematics(pClu,p0Q1,toHadron1,toHadron2,
pClu1,pClu2,pQ1,pQone,pQtwo,pQ2); // out
/******************
* The previous methods have determined the kinematics and positions
* of C -> C1 + C2.
* In the case that one of the two product is light, that means either
* decayOneHadronClu1 or decayOneHadronClu2 is true, then the momenta
* of the components of that light product have not been determined,
* and a (light) cluster will not be created: the heavy father cluster
* decays, in this case, into a single (not-light) cluster and a
* single hadron. In the other, "normal", cases the father cluster
* decays into two clusters, each of which has well defined components.
* Notice that, in the case of components which point to particles, the
* momenta of the components is properly set to the new values, whereas
* we do not change the momenta of the pointed particles, because we
* want to keep all of the information (that is the new momentum of a
* component after the splitting, which is contained in the _momentum
* member of the Component class, and the (old) momentum of that component
* before the splitting, which is contained in the momentum of the
* pointed particle). Please not make confusion of this only apparent
* inconsistency!
********************/
LorentzPoint posC,pos1,pos2;
posC = cluster->vertex();
calculatePositions(pClu, posC, pClu1, pClu2, pos1, pos2);
cutType rval;
if(toHadron1) {
- rval.first = produceHadron(ptrQ1->dataPtr(), newPtr1, pClu1, pos1);
+ rval.first = produceHadron(toHadron1, newPtr1, pClu1, pos1);
finalhadrons.push_back(rval.first.first);
}
else {
rval.first = produceCluster(ptrQ1, newPtr1, pClu1, pos1, pQ1, pQone, rem1);
}
if(toHadron2) {
- rval.second = produceHadron(ptrQ2->dataPtr(), newPtr2, pClu2, pos2);
+ rval.second = produceHadron(toHadron2, newPtr2, pClu2, pos2);
finalhadrons.push_back(rval.second.first);
}
else {
rval.second = produceCluster(ptrQ2, newPtr2, pClu2, pos2, pQ2, pQtwo, rem2);
}
return rval;
}
ClusterFissioner::cutType
ClusterFissioner::cutThree(ClusterPtr & cluster, tPVector & finalhadrons,
bool softUEisOn) {
// need to make sure only 3-cpt clusters get here
assert(cluster->numComponents() == 3);
// extract quarks
tPPtr ptrQ[3] = {cluster->particle(0),cluster->particle(1),cluster->particle(2)};
assert( ptrQ[0] && ptrQ[1] && ptrQ[2] );
// find maximum mass pair
Energy mmax(ZERO);
Lorentz5Momentum pDiQuark;
int iq1(-1),iq2(-1);
Lorentz5Momentum psum;
for(int q1=0;q1<3;++q1) {
psum+= ptrQ[q1]->momentum();
for(int q2=q1+1;q2<3;++q2) {
Lorentz5Momentum ptest = ptrQ[q1]->momentum()+ptrQ[q2]->momentum();
ptest.rescaleMass();
Energy mass = ptest.m();
if(mass>mmax) {
mmax = mass;
pDiQuark = ptest;
iq1 = q1;
iq2 = q2;
}
}
}
// and the spectators
int iother(-1);
for(int ix=0;ix<3;++ix) if(ix!=iq1&&ix!=iq2) iother=ix;
assert(iq1>=0&&iq2>=0&&iother>=0);
// And check if those particles are from a beam remnant
bool rem1 = cluster->isBeamRemnant(iq1);
bool rem2 = cluster->isBeamRemnant(iq2);
// workout which distribution to use
bool soft1(false),soft2(false);
switch (_iopRem) {
case 0:
soft1 = rem1 || rem2;
soft2 = rem2 || rem1;
break;
case 1:
soft1 = rem1;
soft2 = rem2;
break;
}
// Initialization for the exponential ("soft") mass distribution.
static const int max_loop = 1000;
int counter = 0;
Energy Mc1 = ZERO, Mc2 = ZERO, m1=ZERO, m2=ZERO, m=ZERO;
- bool toHadron(false), toDiQuark(false);
+ tcPDPtr toHadron;
+ bool toDiQuark(false);
PPtr newPtr1 = PPtr(),newPtr2 = PPtr();
PDPtr diquark;
bool succeeded = false;
do {
succeeded = false;
++counter;
drawNewFlavour(newPtr1,newPtr2);
// randomly pick which will be (anti)diquark and which a mesonic cluster
if(UseRandom::rndbool()) {
swap(iq1,iq2);
swap(rem1,rem2);
}
// check first order
if(cantMakeHadron(ptrQ[iq1], newPtr1) || cantMakeDiQuark(ptrQ[iq2], newPtr2)) {
swap(newPtr1,newPtr2);
}
// check again
if(cantMakeHadron(ptrQ[iq1], newPtr1) || cantMakeDiQuark(ptrQ[iq2], newPtr2)) {
throw Exception()
<< "ClusterFissioner cannot split the cluster ("
<< ptrQ[iq1]->PDGName() << ' ' << ptrQ[iq2]->PDGName()
<< ") into a hadron and diquark.\n" << Exception::runerror;
}
// Check that new clusters can produce particles and there is enough
// phase space to choose the drawn flavour
m1 = ptrQ[iq1]->data().constituentMass();
m2 = ptrQ[iq2]->data().constituentMass();
m = newPtr1->data().constituentMass();
// Do not split in the case there is no phase space available
if(mmax < m1+m + m2+m) continue;
// power for splitting
double exp1(_pSplitLight),exp2(_pSplitLight);
if (CheckId::isExotic (ptrQ[iq1]->dataPtr())) exp1 = _pSplitExotic;
else if(CheckId::hasBottom(ptrQ[iq1]->dataPtr())) exp1 = _pSplitBottom;
else if(CheckId::hasCharm (ptrQ[iq1]->dataPtr())) exp1 = _pSplitCharm;
if (CheckId::isExotic (ptrQ[iq2]->dataPtr())) exp2 = _pSplitExotic;
else if(CheckId::hasBottom(ptrQ[iq2]->dataPtr())) exp2 = _pSplitBottom;
else if(CheckId::hasCharm (ptrQ[iq2]->dataPtr())) exp2 = _pSplitCharm;
// If, during the drawing of candidate masses, too many attempts fail
// (because the phase space available is tiny)
/// \todo run separate loop here?
Mc1 = drawChildMass(mmax,m1,m2,m,exp1,soft1);
Mc2 = drawChildMass(mmax,m2,m1,m,exp2,soft2);
if(Mc1 < m1+m || Mc2 < m+m2 || Mc1+Mc2 > mmax) continue;
// check if need to force meson clster to hadron
- toHadron = false;
- if(Mc1 < _hadronsSelector->massLightestHadronPair(ptrQ[iq1]->dataPtr(), newPtr1->dataPtr())) {
- Mc1 = _hadronsSelector->massLightestHadron(ptrQ[iq1]->dataPtr(), newPtr1->dataPtr());
- toHadron = true;
- }
+ toHadron = _hadronsSelector->chooseSingleHadron(ptrQ[iq1]->dataPtr(), newPtr1->dataPtr(),Mc1);
+ if(toHadron) Mc1 = toHadron->mass();
// check if need to force diquark cluster to be on-shell
toDiQuark = false;
diquark = CheckId::makeDiquark(ptrQ[iq2]->dataPtr(), newPtr2->dataPtr());
if(Mc2 < diquark->constituentMass()) {
Mc2 = diquark->constituentMass();
toDiQuark = true;
}
// if a beam cluster not allowed to decay to hadrons
if(cluster->isBeamCluster() && toHadron && softUEisOn)
continue;
// Check if the decay kinematics is still possible: if not then
// force the one-hadron decay for the other cluster as well.
if(Mc1 + Mc2 > mmax) {
if(!toHadron) {
- Mc1 = _hadronsSelector->massLightestHadron(ptrQ[iq1]->dataPtr(), newPtr1->dataPtr());
- toHadron = true;
+ toHadron = _hadronsSelector->chooseSingleHadron(ptrQ[iq1]->dataPtr(), newPtr1->dataPtr(),mmax-Mc2);
+ if(toHadron) Mc1 = toHadron->mass();
}
else if(!toDiQuark) {
Mc2 = _hadronsSelector->massLightestHadron(ptrQ[iq2]->dataPtr(), newPtr2->dataPtr());
toDiQuark = true;
}
}
succeeded = (mmax >= Mc1+Mc2);
}
while (!succeeded && counter < max_loop);
// check no of tries
if(counter >= max_loop) return cutType();
// Determine the (5-components) momenta (all in the LAB frame)
Lorentz5Momentum p0Q1 = ptrQ[iq1]->momentum();
// to be determined
Lorentz5Momentum pClu1(Mc1), pClu2(Mc2), pQ1(m1), pQone(m), pQtwo(m), pQ2(m2);
calculateKinematics(pDiQuark,p0Q1,toHadron,toDiQuark,
pClu1,pClu2,pQ1,pQone,pQtwo,pQ2);
// positions of the new clusters
LorentzPoint pos1,pos2;
Lorentz5Momentum pBaryon = pClu2+ptrQ[iother]->momentum();
calculatePositions(cluster->momentum(), cluster->vertex(), pClu1, pBaryon, pos1, pos2);
// first the mesonic cluster/meson
cutType rval;
if(toHadron) {
- rval.first = produceHadron(ptrQ[iq1]->dataPtr(), newPtr1, pClu1, pos1);
+ rval.first = produceHadron(toHadron, newPtr1, pClu1, pos1);
finalhadrons.push_back(rval.first.first);
}
else {
rval.first = produceCluster(ptrQ[iq1], newPtr1, pClu1, pos1, pQ1, pQone, rem1);
}
if(toDiQuark) {
rem2 |= cluster->isBeamRemnant(iother);
PPtr newDiQuark = diquark->produceParticle(pClu2);
rval.second = produceCluster(newDiQuark, ptrQ[iother], pBaryon, pos2, pClu2,
ptrQ[iother]->momentum(), rem2);
}
else {
rval.second = produceCluster(ptrQ[iq2], newPtr2, pBaryon, pos2, pQ2, pQtwo, rem2,
ptrQ[iother],cluster->isBeamRemnant(iother));
}
cluster->isAvailable(false);
return rval;
}
ClusterFissioner::PPair
-ClusterFissioner::produceHadron(tcPDPtr ptrQ, tPPtr newPtr,
- const Lorentz5Momentum &a,
+ClusterFissioner::produceHadron(tcPDPtr hadron, tPPtr newPtr, const Lorentz5Momentum &a,
const LorentzPoint &b) const {
PPair rval;
- rval.first =( _hadronsSelector->lightestHadron(ptrQ,newPtr->dataPtr()))->produceParticle();
-
+ if(hadron->coloured()) {
+ rval.first = (_hadronsSelector->lightestHadron(hadron,newPtr->dataPtr()))->produceParticle();
+ }
+ else
+ rval.first = hadron->produceParticle();
rval.second = newPtr;
rval.first->set5Momentum(a);
rval.first->setVertex(b);
return rval;
}
ClusterFissioner::PPair ClusterFissioner::produceCluster(tPPtr ptrQ, tPPtr newPtr,
const Lorentz5Momentum & a,
const LorentzPoint & b,
const Lorentz5Momentum & c,
const Lorentz5Momentum & d,
bool isRem,
tPPtr spect, bool remSpect) const {
PPair rval;
rval.second = newPtr;
ClusterPtr cluster = !spect ? new_ptr(Cluster(ptrQ,rval.second)) : new_ptr(Cluster(ptrQ,rval.second,spect));
rval.first = cluster;
cluster->set5Momentum(a);
cluster->setVertex(b);
assert(cluster->particle(0)->id() == ptrQ->id());
cluster->particle(0)->set5Momentum(c);
cluster->particle(1)->set5Momentum(d);
cluster->setBeamRemnant(0,isRem);
if(remSpect) cluster->setBeamRemnant(2,remSpect);
return rval;
}
void ClusterFissioner::drawNewFlavour(PPtr& newPtrPos,PPtr& newPtrNeg) const {
// Flavour is assumed to be only u, d, s, with weights
// (which are not normalized probabilities) given
// by the same weights as used in HadronsSelector for
// the decay of clusters into two hadrons.
double prob_d = _hadronsSelector->pwtDquark();
double prob_u = _hadronsSelector->pwtUquark();
double prob_s = _hadronsSelector->pwtSquark();
int choice = UseRandom::rnd3(prob_u, prob_d, prob_s);
long idNew = 0;
switch (choice) {
case 0: idNew = ThePEG::ParticleID::u; break;
case 1: idNew = ThePEG::ParticleID::d; break;
case 2: idNew = ThePEG::ParticleID::s; break;
}
newPtrPos = getParticle(idNew);
newPtrNeg = getParticle(-idNew);
assert (newPtrPos);
assert(newPtrNeg);
assert (newPtrPos->dataPtr());
assert(newPtrNeg->dataPtr());
}
Energy ClusterFissioner::drawChildMass(const Energy M, const Energy m1,
const Energy m2, const Energy m,
const double expt, const bool soft) const {
/***************************
* This method, given in input the cluster mass Mclu of an heavy cluster C,
* made of consituents of masses m1 and m2, draws the masses Mclu1 and Mclu2
* of, respectively, the children cluster C1, made of constituent masses m1
* and m, and cluster C2, of mass Mclu2 and made of constituent masses m2
* and m. The mass is extracted from one of the two following mass
* distributions:
* --- power-like ("normal" distribution)
* d(Prob) / d(M^exponent) = const
* where the exponent can be different from the two children C1 (exp1)
* and C2 (exponent2).
* --- exponential ("soft" distribution)
* d(Prob) / d(M^2) = exp(-b*M)
* where b = 2.0 / average.
* Such distributions are limited below by the masses of
* the constituents quarks, and above from the mass of decaying cluster C.
* The choice of which of the two mass distributions to use for each of the
* two cluster children is dictated by iRemnant (see below).
* If the number of attempts to extract a pair of mass values that are
* kinematically acceptable is above some fixed number (max_loop, see below)
* the method gives up and returns false; otherwise, when it succeeds, it
* returns true.
*
* These distributions have been modified from HERWIG:
* Before these were:
* Mclu1 = m1 + (Mclu - m1 - m2)*pow( rnd(), 1.0/exponent1 );
* The new one coded here is a more efficient version, same density
* but taking into account 'in phase space from' beforehand
***************************/
// hard cluster
if(!soft) {
return pow(UseRandom::rnd(pow((M-m1-m2-m)*UnitRemoval::InvE, expt),
pow(m*UnitRemoval::InvE, expt)), 1./expt
)*UnitRemoval::E + m1;
}
// Otherwise it uses a soft mass distribution
else {
static const InvEnergy b = 2.0 / _btClM;
Energy max = M-m1-m2-2.0*m;
double rmin = b*max;
rmin = ( rmin < 50 ) ? exp(-rmin) : 0.;
double r1;
do {
r1 = UseRandom::rnd(rmin, 1.0) * UseRandom::rnd(rmin, 1.0);
}
while (r1 < rmin);
return m1 + m - log(r1)/b;
}
}
void ClusterFissioner::calculateKinematics(const Lorentz5Momentum & pClu,
const Lorentz5Momentum & p0Q1,
const bool toHadron1,
const bool toHadron2,
Lorentz5Momentum & pClu1,
Lorentz5Momentum & pClu2,
Lorentz5Momentum & pQ1,
Lorentz5Momentum & pQbar,
Lorentz5Momentum & pQ,
Lorentz5Momentum & pQ2bar) const {
/******************
* This method solves the kinematics of the two body cluster decay:
* C (Q1 Q2bar) ---> C1 (Q1 Qbar) + C2 (Q Q2bar)
* In input we receive the momentum of C, pClu, and the momentum
* of the quark Q1 (constituent of C), p0Q1, both in the LAB frame.
* Furthermore, two boolean variables inform whether the two fission
* products (C1, C2) decay immediately into a single hadron (in which
* case the cluster itself is identify with that hadron) and we do
* not have to solve the kinematics of the components (Q1,Qbar) for
* C1 and (Q,Q2bar) for C2.
* The output is given by the following momenta (all 5-components,
* and all in the LAB frame):
* pClu1 , pClu2 respectively of C1 , C2
* pQ1 , pQbar respectively of Q1 , Qbar in C1
* pQ , pQ2bar respectively of Q , Q2 in C2
* The assumption, suggested from the string model, is that, in C frame,
* C1 and its constituents Q1 and Qbar are collinear, and collinear to
* the direction of Q1 in C (that is before cluster decay); similarly,
* (always in the C frame) C2 and its constituents Q and Q2bar are
* collinear (and therefore anti-collinear with C1,Q1,Qbar).
* The solution is then obtained by using Lorentz boosts, as follows.
* The kinematics of C1 and C2 is solved in their parent C frame,
* and then boosted back in the LAB. The kinematics of Q1 and Qbar
* is solved in their parent C1 frame and then boosted back in the LAB;
* similarly, the kinematics of Q and Q2bar is solved in their parent
* C2 frame and then boosted back in the LAB. In each of the three
* "two-body decay"-like cases, we use the fact that the direction
* of the motion of the decay products is known in the rest frame of
* their parent. This is obvious for the first case in which the
* parent rest frame is C; but it is also true in the other two cases
* where the rest frames are C1 and C2. This is because C1 and C2
* are boosted w.r.t. C in the same direction where their components,
* respectively (Q1,Qbar) and (Q,Q2bar) move in C1 and C2 rest frame
* respectively.
* Of course, although the notation used assumed that C = (Q1 Q2bar)
* where Q1 is a quark and Q2bar an antiquark, indeed everything remain
* unchanged also in all following cases:
* Q1 quark, Q2bar antiquark; --> Q quark;
* Q1 antiquark , Q2bar quark; --> Q antiquark;
* Q1 quark, Q2bar diquark; --> Q quark
* Q1 antiquark, Q2bar anti-diquark; --> Q antiquark
* Q1 diquark, Q2bar quark --> Q antiquark
* Q1 anti-diquark, Q2bar antiquark; --> Q quark
**************************/
// Calculate the unit three-vector, in the C frame, along which
// all of the constituents and children clusters move.
Lorentz5Momentum u(p0Q1);
u.boost( -pClu.boostVector() ); // boost from LAB to C
// the unit three-vector is then u.vect().unit()
// Calculate the momenta of C1 and C2 in the (parent) C frame first,
// where the direction of C1 is u.vect().unit(), and then boost back in the
// LAB frame.
if (pClu.m() < pClu1.mass() + pClu2.mass() ) {
throw Exception() << "Impossible Kinematics in ClusterFissioner::calculateKinematics() (A)"
<< Exception::eventerror;
}
Kinematics::twoBodyDecay(pClu, pClu1.mass(), pClu2.mass(),
u.vect().unit(), pClu1, pClu2);
// In the case that cluster1 does not decay immediately into a single hadron,
// calculate the momenta of Q1 (as constituent of C1) and Qbar in the
// (parent) C1 frame first, where the direction of Q1 is u.vect().unit(),
// and then boost back in the LAB frame.
if(!toHadron1) {
if (pClu1.m() < pQ1.mass() + pQbar.mass() ) {
throw Exception() << "Impossible Kinematics in ClusterFissioner::calculateKinematics() (B)"
<< Exception::eventerror;
}
Kinematics::twoBodyDecay(pClu1, pQ1.mass(), pQbar.mass(),
u.vect().unit(), pQ1, pQbar);
}
// In the case that cluster2 does not decay immediately into a single hadron,
// Calculate the momenta of Q and Q2bar (as constituent of C2) in the
// (parent) C2 frame first, where the direction of Q is u.vect().unit(),
// and then boost back in the LAB frame.
if(!toHadron2) {
if (pClu2.m() < pQ.mass() + pQ2bar.mass() ) {
throw Exception() << "Impossible Kinematics in ClusterFissioner::calculateKinematics() (C)"
<< Exception::eventerror;
}
Kinematics::twoBodyDecay(pClu2, pQ.mass(), pQ2bar.mass(),
u.vect().unit(), pQ, pQ2bar);
}
}
void ClusterFissioner::calculatePositions(const Lorentz5Momentum & pClu,
const LorentzPoint & positionClu,
const Lorentz5Momentum & pClu1,
const Lorentz5Momentum & pClu2,
LorentzPoint & positionClu1,
LorentzPoint & positionClu2) const {
// Determine positions of cluster children.
// See Marc Smith's thesis, page 127, formulas (4.122) and (4.123).
Energy Mclu = pClu.m();
Energy Mclu1 = pClu1.m();
Energy Mclu2 = pClu2.m();
// Calculate the unit three-vector, in the C frame, along which
// children clusters move.
Lorentz5Momentum u(pClu1);
u.boost( -pClu.boostVector() ); // boost from LAB to C frame
// the unit three-vector is then u.vect().unit()
Energy pstarChild = Kinematics::pstarTwoBodyDecay(Mclu,Mclu1,Mclu2);
// First, determine the relative positions of the children clusters
// in the parent cluster reference frame.
Length x1 = ( 0.25*Mclu + 0.5*( pstarChild + (sqr(Mclu2) - sqr(Mclu1))/(2.0*Mclu)))/_kappa;
Length t1 = Mclu/_kappa - x1;
LorentzDistance distanceClu1( x1 * u.vect().unit(), t1 );
Length x2 = (-0.25*Mclu + 0.5*(-pstarChild + (sqr(Mclu2) - sqr(Mclu1))/(2.0*Mclu)))/_kappa;
Length t2 = Mclu/_kappa + x2;
LorentzDistance distanceClu2( x2 * u.vect().unit(), t2 );
// Then, transform such relative positions from the parent cluster
// reference frame to the Lab frame.
distanceClu1.boost( pClu.boostVector() );
distanceClu2.boost( pClu.boostVector() );
// Finally, determine the absolute positions in the Lab frame.
positionClu1 = positionClu + distanceClu1;
positionClu2 = positionClu + distanceClu2;
}
bool ClusterFissioner::isHeavy(tcClusterPtr clu) {
// default
double clpow = _clPowLight;
Energy clmax = _clMaxLight;
// particle data for constituents
tcPDPtr cptr[3]={tcPDPtr(),tcPDPtr(),tcPDPtr()};
for(int ix=0;ix<min(clu->numComponents(),3);++ix) {
cptr[ix]=clu->particle(ix)->dataPtr();
}
// different parameters for exotic, bottom and charm clusters
if(CheckId::isExotic(cptr[0],cptr[1],cptr[1])) {
clpow = _clPowExotic;
clmax = _clMaxExotic;
}
else if(CheckId::hasBottom(cptr[0],cptr[1],cptr[1])) {
clpow = _clPowBottom;
clmax = _clMaxBottom;
}
else if(CheckId::hasCharm(cptr[0],cptr[1],cptr[1])) {
clpow = _clPowCharm;
clmax = _clMaxCharm;
}
bool aboveCutoff = (
pow(clu->mass()*UnitRemoval::InvE , clpow)
>
pow(clmax*UnitRemoval::InvE, clpow)
+ pow(clu->sumConstituentMasses()*UnitRemoval::InvE, clpow)
);
// required test for SUSY clusters, since aboveCutoff alone
// cannot guarantee (Mc > m1 + m2 + 2*m) in cut()
static const Energy minmass
= getParticleData(ParticleID::d)->constituentMass();
bool canSplitMinimally
= clu->mass() > clu->sumConstituentMasses() + 2.0 * minmass;
return aboveCutoff && canSplitMinimally;
}
diff --git a/Hadronization/ClusterFissioner.h b/Hadronization/ClusterFissioner.h
--- a/Hadronization/ClusterFissioner.h
+++ b/Hadronization/ClusterFissioner.h
@@ -1,387 +1,386 @@
// -*- C++ -*-
//
// ClusterFissioner.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2011 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ClusterFissioner_H
#define HERWIG_ClusterFissioner_H
#include <ThePEG/Interface/Interfaced.h>
#include "CluHadConfig.h"
#include "HadronSelector.h"
#include "ClusterFissioner.fh"
namespace Herwig {
using namespace ThePEG;
//class Cluster; // forward declaration
/** \ingroup Hadronization
* \class ClusterFissioner
* \brief This class handles clusters which are too heavy.
* \author Philip Stephens
* \author Alberto Ribon
* \author Stefan Gieseke
*
* This class does the job of chopping up either heavy clusters or beam
* clusters in two lighter ones. The procedure is repeated recursively until
* all of the cluster children have masses below some threshold values.
*
* For the beam remnant clusters, at the moment what is done is the following.
* In the case that the soft underlying event is switched on, the
* beam remnant clusters are tagged as not available,
* therefore they will not be treated at all during the hadronization.
* In the case instead that the soft underlying event is switched off,
* then the beam remnant clusters are treated exactly as "normal" clusters,
* with the only exception of the mass spectrum used to generate the
* cluster children masses. For non-beam clusters, the masses of the cluster
* children are draw from a power-like mass distribution; for beam clusters,
* according to the value of the flag _IOpRem, either both
* children masses are draw from a fast-decreasing exponential mass
* distribution (case _IOpRem == 0, or, indendently by
* _IOpRem, in the special case that the beam cluster contains two
* beam remnants), or one mass from the exponential distribution (corresponding
* of the cluster child with the beam remnant) and the other with the usual
* power-like distribution (case _IOpRem == 1, which is the
* default one, as in Herwig 6.3).
*
* The reason behind the use of a fast-decreasing exponential distribution
* is that to avoid a large transverse energy from the many sequential
* fissions that would otherwise occur due to the typical large cluster
* mass of beam clusters. Using instead an exponential distribution
* the masses of the two cluster children will be very small (order of
* GeV).
*
* The rationale behind the implementation of the splitting of clusters
* has been to preserve *all* of the information about such splitting
* process. More explicitly a ThePEG::Step class is passed in and the
* new clusters are added to the step as the decay products of the
* heavy cluster. This approach has the twofold
* advantage to provide all of the information that could be needed
* (expecially in future developments), without any information loss,
* and furthermore it allows a better debugging.
*
* @see HadronSelector
* @see \ref ClusterFissionerInterfaces "The interfaces"
* defined for ClusterFissioner.
*/
class ClusterFissioner: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
ClusterFissioner();
//@}
/** Splits the clusters which are too heavy.
*
* Split either heavy clusters or beam clusters recursively until all
* children have mass below some threshold. Heavy clusters are those that
* satisfy the condition
* \f[ M^P > C^P + S^P \f]
* where \f$ M \f$ is the clusters mass, \f$ P \f$ is the parameter
* ClPow, \f$ C \f$ is the parameter ClMax and \f$ S \f$ is the
* sum of the clusters constituent partons.
* For beam clusters, they are split only if the soft underlying event
* is switched off, otherwise these clusters will be tagged as unavailable
* and they will not be treated by the hadronization altogether.
* In the case beam clusters will be split, the procedure is exactly
* the same as for normal non-beam clusters, with the only exception
* of the mass spectrum from which to draw the masses of the two
* cluster children (see method drawChildrenMasses for details).
*/
tPVector fission(ClusterVector & clusters, bool softUEisOn);
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);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Private and non-existent assignment operator.
*/
ClusterFissioner & operator=(const ClusterFissioner &);
/**
* This method directs the splitting of the heavy clusters
*
* This method does the splitting of the clusters and all of its cluster
* children, if heavy. All of these new children clusters are added to the
* collection of clusters. The method works as follows.
* Initially the vector contains just the stack of input pointers to the
* clusters to be split. Then it will be filled recursively by all
* of the cluster's children that are heavy enough to require
* to be split. In each loop, the last element of the vector is
* considered (only once because it is then removed from the vector).
*
* \todo is the following still true?
* For normal, non-beam clusters, a power-like mass distribution
* is used, whereas for beam clusters a fast-decreasing exponential mass
* distribution is used instead. This avoids many iterative splitting which
* could produce an unphysical large transverse energy from a supposed
* soft beam remnant process.
*/
void cut(stack<ClusterPtr> &,
ClusterVector&, tPVector & finalhadrons, bool softUEisOn);
public:
/**
* Definition for easy passing of two particles.
*/
typedef pair<PPtr,PPtr> PPair;
/**
* Definition for use in the cut function.
*/
typedef pair<PPair,PPair> cutType;
/**
* Splits the input cluster.
*
* Split the input cluster (which can be either an heavy non-beam
* cluster or a beam cluster). The result is two pairs of particles. The
* first element of each pair is new cluster/hadron, while the second
* element of each pair is the particle drawn from the vacuum to create
* the new cluster/hadron.
* Notice that this method treats also beam clusters by using a different
* mass spectrum used to generate the cluster child masses (see method
* drawChildMass).
*/
//@{
/**
* Split two-component cluster
*/
virtual cutType cutTwo(ClusterPtr &, tPVector & finalhadrons, bool softUEisOn);
/**
* Split three-component cluster
*/
virtual cutType cutThree(ClusterPtr &, tPVector & finalhadrons, bool softUEisOn);
//@}
public:
/**
* Produces a hadron and returns the flavour drawn from the vacuum.
*
- * This routine produces a new hadron from the partons ptrQ and newPtr. It
+ * This routine produces a new hadron. It
* also sets the momentum and vertex to the values given.
*/
- PPair produceHadron(tcPDPtr ptrQ, tPPtr newPtr,
- const Lorentz5Momentum &a,
+ PPair produceHadron(tcPDPtr hadron, tPPtr newPtr, const Lorentz5Momentum &a,
const LorentzPoint &b) const;
protected:
/**
* Produces a cluster from the flavours passed in.
*
* This routine produces a new cluster with the flavours given by ptrQ and newPtr.
* The new 5 momentum is a and the parent momentum are c and d. C is for the
* ptrQ and d is for the new particle newPtr. rem specifies whether the existing
* particle is a beam remnant or not.
*/
PPair produceCluster(tPPtr ptrQ, tPPtr newPtr, const Lorentz5Momentum &a,
const LorentzPoint &b, const Lorentz5Momentum &c,
const Lorentz5Momentum &d, const bool rem,
tPPtr spect=tPPtr(), bool remSpect=false) const;
/**
* Returns the new quark-antiquark pair
* needed for fission of a heavy cluster. Equal probabilities
* are assumed for producing u, d, or s pairs.
*/
void drawNewFlavour(PPtr& newPtrPos,PPtr& newPtrNeg) const;
/**
* Produces the mass of a child cluster.
*
* Draw the masses \f$M'\f$ of the the cluster child produced
* by the fission of an heavy cluster (of mass M). m1, m2 are the masses
* of the constituents of the cluster; m is the mass of the quark extract
* from the vacuum (together with its antiparticle). The algorithm produces
* the mass of the cluster formed with consituent m1.
* Two mass distributions can be used for the child cluster mass:
* -# power-like mass distribution ("normal" mass) with power exp
* \f[ M' = {\rm rnd}((M-m_1-m_2-m)^P, m^p)^{1/P} + m_1 \f]
* where \f$ P \f$ is a parameter of the model and \f$ \rm{rnd} \f$ is
* the function:
* \f[ \rm{rnd}(a,b) = (1-r)a + r b \f]
* and here \f$ r \f$ is a random number [0,1].
* -# fast-decreasing exponential mass distribution ("soft" mass) with
* rmin. rmin is given by
* \f[ r_{\rm min} = \exp(-b (M - m_1 - m_2 - 2 m)) \f]
* where \f$ b \f$ is a parameter of the model. The generated mass is
* given by
* \f[ M' = m_1 + m - \frac{\log\left(
* {\rm rnd}(r_{\rm min}, 1-r_{\rm min})\right)}{b} \f].
*
* The choice of which mass distribution should be used for each of the two
* cluster children is dictated by the parameter soft.
*/
Energy drawChildMass(const Energy M, const Energy m1, const Energy m2,
const Energy m, const double exp, const bool soft) const;
/**
* Determines the kinematics of a heavy cluster decay C->C1 + C2
*/
void calculateKinematics(const Lorentz5Momentum &pClu,
const Lorentz5Momentum &p0Q1,
const bool toHadron1, const bool toHadron2,
Lorentz5Momentum &pClu1, Lorentz5Momentum &pClu2,
Lorentz5Momentum &pQ1, Lorentz5Momentum &pQb,
Lorentz5Momentum &pQ2, Lorentz5Momentum &pQ2b) const;
/**
* Determine the positions of the two children clusters.
*
* This routine generates the momentum of the decay products. It also
* generates the momentum in the lab frame of the partons drawn out of
* the vacuum.
*/
void calculatePositions(const Lorentz5Momentum &pClu,
const LorentzPoint & positionClu,
const Lorentz5Momentum & pClu1,
const Lorentz5Momentum & pClu2,
LorentzPoint & positionClu1,
LorentzPoint & positionClu2 ) const;
protected:
/** @name Access members for child classes. */
//@{
/**
* Access to the hadron selector
*/
HadronSelectorPtr hadronsSelector() const {return _hadronsSelector;}
/**
* Access to soft-cluster parameter
*/
Energy btClM() const {return _btClM;}
/**
* Cluster splitting paramater for light quarks
*/
double pSplitLight() const {return _pSplitLight;}
/**
* Cluster splitting paramater for bottom quarks
*/
double pSplitBottom() const {return _pSplitBottom;}
/**
* Cluster splitting paramater for charm quarks
*/
double pSplitCharm() const {return _pSplitCharm;}
/**
* Cluster splitting paramater for exotic particles
*/
double pSplitExotic() const {return _pSplitExotic;}
//@}
private:
/**
* Check if a cluster is heavy enough to split again
*/
bool isHeavy(tcClusterPtr );
/**
* A pointer to a Herwig::HadronSelector object for generating hadrons.
*/
HadronSelectorPtr _hadronsSelector;
/**
* @name The Cluster max mass,dependant on which quarks are involved, used to determine when
* fission will occur.
*/
//@{
Energy _clMaxLight;
Energy _clMaxBottom;
Energy _clMaxCharm;
Energy _clMaxExotic;
//@}
/**
* @name The power used to determine when cluster fission will occur.
*/
//@{
double _clPowLight;
double _clPowBottom;
double _clPowCharm;
double _clPowExotic;
//@}
/**
* @name The power, dependant on whic quarks are involved, used in the cluster mass generation.
*/
//@{
double _pSplitLight;
double _pSplitBottom;
double _pSplitCharm;
double _pSplitExotic;
//@}
/**
* Parameter used (2/b) for the beam cluster mass generation.
* Currently hard coded value.
*/
Energy _btClM;
/**
* Flag used to determine what distributions to use for the cluster masses.
*/
int _iopRem;
/**
* The string constant
*/
Tension _kappa;
};
}
#endif /* HERWIG_ClusterFissioner_H */
diff --git a/Hadronization/HadronSelector.cc b/Hadronization/HadronSelector.cc
--- a/Hadronization/HadronSelector.cc
+++ b/Hadronization/HadronSelector.cc
@@ -1,823 +1,1003 @@
// -*- C++ -*-
//
// HadronSelector.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2011 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the HadronSelector class.
//
#include "HadronSelector.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/RefVector.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include <ThePEG/PDT/EnumParticles.h>
#include <ThePEG/Repository/EventGenerator.h>
#include <ThePEG/Repository/CurrentGenerator.h>
#include <ThePEG/Repository/Repository.h>
#include "CheckId.h"
#include <ThePEG/Utilities/DescribeClass.h>
using namespace Herwig;
DescribeAbstractClass<HadronSelector,Interfaced>
describeHadronSelector("Herwig::HadronSelector","");
namespace {
// // debug helper
// void dumpTable(const HadronSelector::HadronTable & tbl) {
// typedef HadronSelector::HadronTable::const_iterator TableIter;
// for (TableIter it = tbl.begin(); it != tbl.end(); ++it) {
// cerr << it->first.first << ' '
// << it->first.second << '\n';
// for (HadronSelector::KupcoData::const_iterator jt = it->second.begin();
// jt != it->second.end(); ++jt) {
// cerr << '\t' << *jt << '\n';
// }
// }
// }
bool weightIsLess (pair<long,double> a, pair<long,double> b) {
return a.second < b.second;
}
}
ostream & Herwig::operator<< (ostream & os,
const HadronSelector::HadronInfo & hi ) {
os << std::scientific << std::showpoint
<< std::setprecision(4)
<< setw(2)
<< hi.id << '\t'
// << hi.ptrData << ' '
<< hi.swtef << '\t'
<< hi.wt << '\t'
<< hi.overallWeight << '\t'
<< ounit(hi.mass,GeV);
return os;
}
HadronSelector::HadronSelector(unsigned int opt)
: _pwtDquark( 1.0 ),_pwtUquark( 1.0 ),_pwtSquark( 1.0 ),_pwtCquark( 1.0 ),
_pwtBquark( 1.0 ),_pwtDIquark( 1.0 ),
_weight1S0(Nmax,1.),_weight3S1(Nmax,1.),_weight1P1(Nmax,1.),_weight3P0(Nmax,1.),
_weight3P1(Nmax,1.),_weight3P2(Nmax,1.),_weight1D2(Nmax,1.),_weight3D1(Nmax,1.),
_weight3D2(Nmax,1.),_weight3D3(Nmax,1.),
_repwt(Lmax,vector<vector<double> >(Jmax,vector<double>(Nmax))),
_sngWt( 1.0 ),_decWt( 1.0 ),
- _topt(opt),_trial(0)
+ _topt(opt),_trial(0),
+ _limBottom(), _limCharm(), _limExotic(), belowThreshold_(0)
{
// The mixing angles
// the ideal mixing angle
const double idealAngleMix = atan( sqrt(0.5) ) * 180.0 / Constants::pi;
// \eta-\eta' mixing angle
_etamix = -23.0;
// phi-omega mixing angle
_phimix = +36.0;
// h_1'-h_1 mixing angle
_h1mix = idealAngleMix;
// f_0(1710)-f_0(1370) mixing angle
_f0mix = idealAngleMix;
// f_1(1420)-f_1(1285)\f$ mixing angle
_f1mix = idealAngleMix;
// f'_2-f_2\f$ mixing angle
_f2mix = +26.0;
// eta_2(1870)-eta_2(1645) mixing angle
_eta2mix = idealAngleMix;
// phi(???)-omega(1650) mixing angle
_omhmix = idealAngleMix;
// phi_3-omega_3 mixing angle
_ph3mix = +28.0;
// eta(1475)-eta(1295) mixing angle
_eta2Smix = idealAngleMix;
// phi(1680)-omega(1420) mixing angle
_phi2Smix = idealAngleMix;
}
void HadronSelector::persistentOutput(PersistentOStream & os) const {
os << _partons << _pwtDquark << _pwtUquark << _pwtSquark
<< _pwtCquark << _pwtBquark << _pwtDIquark
<< _etamix << _phimix << _h1mix << _f0mix << _f1mix << _f2mix
<< _eta2mix << _omhmix << _ph3mix << _eta2Smix << _phi2Smix
<< _weight1S0 << _weight3S1 << _weight1P1 << _weight3P0 << _weight3P1
<< _weight3P2 << _weight1D2 << _weight3D1 << _weight3D2 << _weight3D3
<< _forbidden << _sngWt << _decWt << _repwt << _pwt
+ << _limBottom << _limCharm << _limExotic << belowThreshold_
<< _table;
}
void HadronSelector::persistentInput(PersistentIStream & is, int) {
is >> _partons >> _pwtDquark >> _pwtUquark >> _pwtSquark
>> _pwtCquark >> _pwtBquark
>> _pwtDIquark>> _etamix >> _phimix >> _h1mix >> _f0mix >> _f1mix >> _f2mix
>> _eta2mix >> _omhmix >> _ph3mix >> _eta2Smix >> _phi2Smix
>> _weight1S0 >> _weight3S1 >> _weight1P1 >> _weight3P0 >> _weight3P1
>> _weight3P2 >> _weight1D2 >> _weight3D1 >> _weight3D2 >> _weight3D3
>> _forbidden >> _sngWt >> _decWt >> _repwt >> _pwt
+ >> _limBottom >> _limCharm >> _limExotic >> belowThreshold_
>> _table;
}
void HadronSelector::Init() {
static ClassDocumentation<HadronSelector> documentation
("There is no documentation for the HadronSelector class");
static Parameter<HadronSelector,double>
interfacePwtDquark("PwtDquark","Weight for choosing a quark D",
&HadronSelector::_pwtDquark, 0, 1.0, 0.0, 10.0,
false,false,false);
static Parameter<HadronSelector,double>
interfacePwtUquark("PwtUquark","Weight for choosing a quark U",
&HadronSelector::_pwtUquark, 0, 1.0, 0.0, 10.0,
false,false,false);
static Parameter<HadronSelector,double>
interfacePwtSquark("PwtSquark","Weight for choosing a quark S",
&HadronSelector::_pwtSquark, 0, 1.0, 0.0, 10.0,
false,false,false);
static Parameter<HadronSelector,double>
interfacePwtCquark("PwtCquark","Weight for choosing a quark C",
&HadronSelector::_pwtCquark, 0, 1.0, 0.0, 10.0,
false,false,false);
static Parameter<HadronSelector,double>
interfacePwtBquark("PwtBquark","Weight for choosing a quark B",
&HadronSelector::_pwtBquark, 0, 1.0, 0.0, 10.0,
false,false,false);
static Parameter<HadronSelector,double>
interfacePwtDIquark("PwtDIquark","Weight for choosing a DIquark",
&HadronSelector::_pwtDIquark, 0, 1.0, 0.0, 100.0,
false,false,false);
static Parameter<HadronSelector,double>
interfaceSngWt("SngWt","Weight for singlet baryons",
&HadronSelector::_sngWt, 0, 1.0, 0.0, 10.0,
false,false,false);
static Parameter<HadronSelector,double>
interfaceDecWt("DecWt","Weight for decuplet baryons",
&HadronSelector::_decWt, 0, 1.0, 0.0, 10.0,
false,false,false);
static RefVector<HadronSelector,ParticleData> interfacePartons
("Partons",
"The partons which are to be considered as the consistuents of the hadrons.",
&HadronSelector::_partons, -1, false, false, true, false, false);
static RefVector<HadronSelector,ParticleData> interfaceForbidden
("Forbidden",
"The PDG codes of the particles which cannot be produced in the hadronization.",
&HadronSelector::_forbidden, -1, false, false, true, false, false);
//
// mixing angles
//
// the ideal mixing angle
const double idealAngleMix = atan( sqrt(0.5) ) * 180.0 / Constants::pi;
static Parameter<HadronSelector,double> interface11S0Mixing
("11S0Mixing",
"The mixing angle for the I=0 mesons from the 1 1S0 multiplet,"
" i.e. eta and etaprime.",
&HadronSelector::_etamix, -23., -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface13S1Mixing
("13S1Mixing",
"The mixing angle for the I=0 mesons from the 1 3S1 multiplet,"
" i.e. phi and omega.",
&HadronSelector::_phimix, +36., -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface11P1Mixing
("11P1Mixing",
"The mixing angle for the I=0 mesons from the 1 1P1 multiplet,"
" i.e. h_1' and h_1.",
&HadronSelector::_h1mix, idealAngleMix, -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface13P0Mixing
("13P0Mixing",
"The mixing angle for the I=0 mesons from the 1 3P0 multiplet,"
" i.e. f_0(1710) and f_0(1370).",
&HadronSelector::_f0mix, idealAngleMix, -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface13P1Mixing
("13P1Mixing",
"The mixing angle for the I=0 mesons from the 1 3P1 multiplet,"
" i.e. f_1(1420) and f_1(1285).",
&HadronSelector::_f1mix, idealAngleMix, -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface13P2Mixing
("13P2Mixing",
"The mixing angle for the I=0 mesons from the 1 3P2 multiplet,"
" i.e. f'_2 and f_2.",
&HadronSelector::_f2mix, 26.0, -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface11D2Mixing
("11D2Mixing",
"The mixing angle for the I=0 mesons from the 1 1D2 multiplet,"
" i.e. eta_2(1870) and eta_2(1645).",
&HadronSelector::_eta2mix, idealAngleMix, -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface13D0Mixing
("13D0Mixing",
"The mixing angle for the I=0 mesons from the 1 3D0 multiplet,"
" i.e. eta_2(1870) phi(?) and omega(1650).",
&HadronSelector::_omhmix, idealAngleMix, -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface13D1Mixing
("13D1Mixing",
"The mixing angle for the I=0 mesons from the 1 3D1 multiplet,"
" i.e. phi_3 and omega_3.",
&HadronSelector::_ph3mix, 28.0, -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface21S0Mixing
("21S0Mixing",
"The mixing angle for the I=0 mesons from the 2 1S0 multiplet,"
" i.e. eta(1475) and eta(1295).",
&HadronSelector::_eta2Smix, idealAngleMix, -180., 180.,
false, false, Interface::limited);
static Parameter<HadronSelector,double> interface23S1Mixing
("23S1Mixing",
"The mixing angle for the I=0 mesons from the 1 3S1 multiplet,"
" i.e. phi(1680) and omega(1420).",
&HadronSelector::_phi2Smix, idealAngleMix, -180., 180.,
false, false, Interface::limited);
//
// the meson weights
//
static ParVector<HadronSelector,double> interface1S0Weights
("1S0Weights",
"The weights for the 1S0 multiplets start with n=1.",
&HadronSelector::_weight1S0, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface3S1Weights
("3S1Weights",
"The weights for the 3S1 multiplets start with n=1.",
&HadronSelector::_weight3S1, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface1P1Weights
("1P1Weights",
"The weights for the 1P1 multiplets start with n=1.",
&HadronSelector::_weight1P1, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface3P0Weights
("3P0Weights",
"The weights for the 3P0 multiplets start with n=1.",
&HadronSelector::_weight3P0, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface3P1Weights
("3P1Weights",
"The weights for the 3P1 multiplets start with n=1.",
&HadronSelector::_weight3P1, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface3P2Weights
("3P2Weights",
"The weights for the 3P2 multiplets start with n=1.",
&HadronSelector::_weight3P2, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface1D2Weights
("1D2Weights",
"The weights for the 1D2 multiplets start with n=1.",
&HadronSelector::_weight1D2, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface3D1Weights
("3D1Weights",
"The weights for the 3D1 multiplets start with n=1.",
&HadronSelector::_weight3D1, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface3D2Weights
("3D2Weights",
"The weights for the 3D2 multiplets start with n=1.",
&HadronSelector::_weight3D2, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static ParVector<HadronSelector,double> interface3D3Weights
("3D3Weights",
"The weights for the 3D3 multiplets start with n=1.",
&HadronSelector::_weight3D3, Nmax, 1.0, 0.0, 100.0,
false, false, Interface::limited);
static Switch<HadronSelector,unsigned int> interfaceTrial
("Trial",
"A Debugging option to only produce certain types of hadrons",
&HadronSelector::_trial, 0, false, false);
static SwitchOption interfaceTrialAll
(interfaceTrial,
"All",
"Produce all the hadrons",
0);
static SwitchOption interfaceTrialPions
(interfaceTrial,
"Pions",
"Only produce pions",
1);
static SwitchOption interfaceTrialSpin2
(interfaceTrial,
"Spin2",
"Only mesons with spin less than or equal to two are produced",
2);
static SwitchOption interfaceTrialSpin3
(interfaceTrial,
"Spin3",
- "Only hadrons with spin less tan or equal to three are produced",
+ "Only hadrons with spin less than or equal to three are produced",
3);
+ static Parameter<HadronSelector,double>
+ interfaceSingleHadronLimitBottom ("SingleHadronLimitBottom",
+ "Threshold for one-hadron decay of b-cluster",
+ &HadronSelector::_limBottom,
+ 0, 0.0, 0.0, 100.0,false,false,false);
+
+ static Parameter<HadronSelector,double>
+ interfaceSingleHadronLimitCharm ("SingleHadronLimitCharm",
+ "threshold for one-hadron decay of c-cluster",
+ &HadronSelector::_limCharm,
+ 0, 0.0, 0.0, 100.0,false,false,false);
+
+ static Parameter<HadronSelector,double>
+ interfaceSingleHadronLimitExotic ("SingleHadronLimitExotic",
+ "threshold for one-hadron decay of exotic cluster",
+ &HadronSelector::_limExotic,
+ 0, 0.0, 0.0, 100.0,false,false,false);
+
+ static Switch<HadronSelector,unsigned int> interfaceBelowThreshold
+ ("BelowThreshold",
+ "Option fo the selection of the hadrons if the cluster is below the pair threshold",
+ &HadronSelector::belowThreshold_, 0, false, false);
+ static SwitchOption interfaceBelowThresholdLightest
+ (interfaceBelowThreshold,
+ "Lightest",
+ "Force cluster to decay to the lightest hadron with the appropriate flavours",
+ 0);
+ static SwitchOption interfaceBelowThresholdAll
+ (interfaceBelowThreshold,
+ "All",
+ "Select from all the hadrons below the two hadron threshold according to their spin weights",
+ 1);
+
+
}
double HadronSelector::mixingStateWeight(long id) const {
switch(id) {
case ParticleID::eta: return 0.5*probabilityMixing(_etamix ,1);
case ParticleID::etaprime: return 0.5*probabilityMixing(_etamix ,2);
case ParticleID::phi: return 0.5*probabilityMixing(_phimix ,1);
case ParticleID::omega: return 0.5*probabilityMixing(_phimix ,2);
case ParticleID::hprime_1: return 0.5*probabilityMixing(_h1mix ,1);
case ParticleID::h_1: return 0.5*probabilityMixing(_h1mix ,2);
case 10331: return 0.5*probabilityMixing(_f0mix ,1);
case 10221: return 0.5*probabilityMixing(_f0mix ,2);
case ParticleID::fprime_1: return 0.5*probabilityMixing(_f1mix ,1);
case ParticleID::f_1: return 0.5*probabilityMixing(_f1mix ,2);
case ParticleID::fprime_2: return 0.5*probabilityMixing(_f2mix ,1);
case ParticleID::f_2: return 0.5*probabilityMixing(_f2mix ,2);
case 10335: return 0.5*probabilityMixing(_eta2mix ,1);
case 10225: return 0.5*probabilityMixing(_eta2mix ,2);
// missing phi member of 13D1 should be here
case 30223: return 0.5*probabilityMixing(_omhmix ,2);
case 337: return 0.5*probabilityMixing(_ph3mix ,1);
case 227: return 0.5*probabilityMixing(_ph3mix ,2);
case 100331: return 0.5*probabilityMixing(_eta2mix ,1);
case 100221: return 0.5*probabilityMixing(_eta2mix ,2);
case 100333: return 0.5*probabilityMixing(_phi2Smix,1);
case 100223: return 0.5*probabilityMixing(_phi2Smix,2);
default: return 1./3.;
}
}
void HadronSelector::doinit() {
Interfaced::doinit();
// the default partons allowed
// the quarks
for ( int ix=1; ix<=5; ++ix ) {
_partons.push_back(getParticleData(ix));
}
// the diquarks
for(unsigned int ix=1;ix<=5;++ix) {
for(unsigned int iy=1; iy<=ix;++iy) {
_partons.push_back(getParticleData(CheckId::makeDiquarkID(ix,iy)));
}
}
// set the weights for the various excited mesons
// set all to one to start with
for (int l = 0; l < Lmax; ++l ) {
for (int j = 0; j < Jmax; ++j) {
for (int n = 0; n < Nmax; ++n) {
_repwt[l][j][n] = 1.0;
}
}
}
// set the others from the relevant vectors
for( int ix=0;ix<max(int(_weight1S0.size()),int(Nmax));++ix)
_repwt[0][0][ix]=_weight1S0[ix];
for( int ix=0;ix<max(int(_weight3S1.size()),int(Nmax));++ix)
_repwt[0][1][ix]=_weight3S1[ix];
for( int ix=0;ix<max(int(_weight1P1.size()),int(Nmax));++ix)
_repwt[1][1][ix]=_weight1P1[ix];
for( int ix=0;ix<max(int(_weight3P0.size()),int(Nmax));++ix)
_repwt[1][0][ix]=_weight3P0[ix];
for( int ix=0;ix<max(int(_weight3P1.size()),int(Nmax));++ix)
_repwt[1][1][ix]=_weight3P1[ix];
for( int ix=0;ix<max(int(_weight3P2.size()),int(Nmax));++ix)
_repwt[1][2][ix]=_weight3P2[ix];
for( int ix=0;ix<max(int(_weight1D2.size()),int(Nmax));++ix)
_repwt[2][2][ix]=_weight1D2[ix];
for( int ix=0;ix<max(int(_weight3D1.size()),int(Nmax));++ix)
_repwt[2][1][ix]=_weight3D1[ix];
for( int ix=0;ix<max(int(_weight3D2.size()),int(Nmax));++ix)
_repwt[2][2][ix]=_weight3D2[ix];
for( int ix=0;ix<max(int(_weight3D3.size()),int(Nmax));++ix)
_repwt[2][3][ix]=_weight3D3[ix];
// weights for the different quarks etc
for(unsigned int ix=0; ix<_partons.size(); ++ix) {
_pwt[_partons[ix]->id()]=1.;
}
_pwt[1] = _pwtDquark;
_pwt[2] = _pwtUquark;
_pwt[3] = _pwtSquark;
_pwt[4] = _pwtCquark;
_pwt[5] = _pwtBquark;
_pwt[1103] = _pwtDIquark * _pwtDquark * _pwtDquark;
_pwt[2101] = 0.5 * _pwtDIquark * _pwtUquark * _pwtDquark;
_pwt[2203] = _pwtDIquark * _pwtUquark * _pwtUquark;
_pwt[3101] = 0.5 * _pwtDIquark * _pwtSquark * _pwtDquark;
_pwt[3201] = 0.5 * _pwtDIquark * _pwtSquark * _pwtUquark;
_pwt[3303] = _pwtDIquark * _pwtSquark * _pwtSquark;
// Commenting out heavy di-quark weights
_pwt[4101] = 0.0;
_pwt[4201] = 0.0;
_pwt[4301] = 0.0;
_pwt[4403] = 0.0;
_pwt[5101] = 0.0;
_pwt[5201] = 0.0;
_pwt[5301] = 0.0;
_pwt[5401] = 0.0;
_pwt[5503] = 0.0;
// find the maximum
map<long,double>::iterator pit =
max_element(_pwt.begin(),_pwt.end(),weightIsLess);
const double pmax = pit->second;
for(pit=_pwt.begin(); pit!=_pwt.end(); ++pit) {
pit->second/=pmax;
}
// construct the hadron tables
constructHadronTable();
// for debugging
// dumpTable(table());
}
void HadronSelector::constructHadronTable() {
// initialise the table
_table.clear();
for(unsigned int ix=0; ix<_partons.size(); ++ix) {
for(unsigned int iy=0; iy<_partons.size(); ++iy) {
if (!(DiquarkMatcher::Check(_partons[ix]->id())
&& DiquarkMatcher::Check(_partons[iy]->id())))
_table[make_pair(_partons[ix]->id(),_partons[iy]->id())] = KupcoData();
}
}
// get the particles from the event generator
ParticleMap particles = generator()->particles();
// loop over the particles
double maxdd(0.),maxss(0.),maxrest(0.);
for(ParticleMap::iterator it=particles.begin();
it!=particles.end(); ++it) {
long pid = it->first;
tPDPtr particle = it->second;
int pspin = particle->iSpin();
// Don't include hadrons which are explicitly forbidden
if(find(_forbidden.begin(),_forbidden.end(),particle)!=_forbidden.end())
continue;
// Don't include non-hadrons or antiparticles
if(pid < 100) continue;
// remove diffractive particles
if(pspin == 0) continue;
// K_0S and K_0L not made make K0 and Kbar0
if(pid==ParticleID::K_S0||pid==ParticleID::K_L0) continue;
// Debugging options
// Only include those with 2J+1 less than...5
if(_trial==2 && pspin >= 5) continue;
// Only include those with 2J+1 less than...7
if(_trial==3 && pspin >= 7) continue;
// Only include pions
if(_trial==1 && pid!=111 && pid!=211) continue;
// shouldn't be coloured
if(particle->coloured()) continue;
// Get the flavours
const int x4 = (pid/1000)%10;
const int x3 = (pid/100 )%10;
const int x2 = (pid/10 )%10;
const int x7 = (pid/1000000)%10;
const bool wantSusy = x7 == 1 || x7 == 2;
int flav1;
int flav2;
// Skip non-hadrons (susy particles, etc...)
if(x3 == 0 || x2 == 0) continue;
else if(x4 == 0) { // meson
flav1 = x2;
flav2 = x3;
}
else { // baryon
flav1 = CheckId::makeDiquarkID(x2,x3);
flav2 = x4;
}
if (wantSusy) flav2 += 1000000 * x7;
HadronInfo a(pid,
particle,
specialWeight(pid),
particle->mass());
// set the weight to the number of spin states
a.overallWeight = pspin;
// identical light flavours
if(flav1 == flav2 && flav1<=3) {
// ddbar> uubar> admixture states
if(flav1==1) {
if(_topt != 0) a.overallWeight *= 0.5*a.swtef;
_table[make_pair(1,1)].insert(a);
_table[make_pair(2,2)].insert(a);
if(_topt == 0 && a.overallWeight > maxdd) maxdd = a.overallWeight;
}
// load up ssbar> uubar> ddbar> admixture states
else {
a.wt = mixingStateWeight(pid);
a.overallWeight *= a.wt;
if(_topt != 0) a.overallWeight *= a.swtef;
_table[make_pair(1,1)].insert(a);
_table[make_pair(2,2)].insert(a);
if(_topt == 0 && a.overallWeight > maxdd) maxdd = a.overallWeight;
a.wt = (_topt != 0) ? 1.- 2.*a.wt : 1 - a.wt;
if(a.wt > 0) {
a.overallWeight = a.wt * a.swtef * pspin;
_table[make_pair(3,3)].insert(a);
if(_topt == 0 && a.overallWeight > maxss) maxss = a.overallWeight;
}
}
}
// light baryons with all quarks identical
else if((flav1 == 1 && flav2 == 1103) || (flav1 == 1103 && flav2 == 1) ||
(flav1 == 2 && flav2 == 2203) || (flav1 == 2203 && flav2 == 2) ||
(flav1 == 3 && flav2 == 3303) || (flav1 == 3303 && flav2 == 3)) {
if(_topt != 0) a.overallWeight *= 1.5*a.swtef;
_table[make_pair(flav1,flav2)].insert(a);
_table[make_pair(flav2,flav1)].insert(a);
if(_topt == 0 && a.overallWeight > maxrest) maxrest = a.overallWeight;
}
// all other cases
else {
if(_topt != 0) a.overallWeight *=a.swtef;
_table[make_pair(flav1,flav2)].insert(a);
if(flav1 != flav2) _table[make_pair(flav2,flav1)].insert(a);
if(_topt == 0 && a.overallWeight > maxrest) maxrest = a.overallWeight;
}
}
// Account for identical combos of diquark/quarks and symmetrical elements
// e.g. U UD = D UU
HadronTable::iterator tit;
for(tit=_table.begin();tit!=_table.end();++tit) {
if(tit->first.first>ParticleID::c) continue;
if(!DiquarkMatcher::Check(tit->first.second)) continue;
long k, l, sub;
if(tit->first.second>=ParticleID::bd_0) {
k = ParticleID::b;
sub = ParticleID::bd_0/100;
}
else if(tit->first.second>=ParticleID::cd_0) {
k = ParticleID::c;
sub = ParticleID::cd_0/100;
}
else if(tit->first.second>=ParticleID::sd_0) {
k = ParticleID::s;
sub = ParticleID::sd_0/100;
}
else if(tit->first.second>=ParticleID::ud_0) {
k = ParticleID::u;
sub = ParticleID::ud_0/100;
}
else if(tit->first.second==ParticleID::dd_1) {
k = ParticleID::d;
sub = ParticleID::dd_1/100;
}
else continue;
sub=tit->first.second/100-sub+1;
if(sub > tit->first.first) {
l = 1000*sub+100*tit->first.first+1;
}
else if(sub==tit->first.first) {
l = 1000*sub+ 100*tit->first.first+3;
}
else {
l = 100*sub +1000*tit->first.first+1;
}
if(tit->second.empty()) {
pair<long,long> newpair(k,l);
tit->second=_table[newpair];
newpair=make_pair(tit->first.second,tit->first.first);
_table[newpair]=tit->second;
};
}
// normalise weights to one for first option
if(_topt == 0) {
HadronTable::const_iterator tit;
KupcoData::iterator it;
for(tit=_table.begin();tit!=_table.end();++tit) {
double weight;
if(tit->first.first==tit->first.second) {
if(tit->first.first==1||tit->first.first==2) weight=1./maxdd;
else if (tit->first.first==3) weight=1./maxss;
else weight=1./maxrest;
}
else weight=1./maxrest;
for(it = tit->second.begin(); it!=tit->second.end(); ++it) {
it->rescale(weight);
}
}
}
}
double HadronSelector::specialWeight(long id) const {
const int pspin = id % 10;
// Only K0L and K0S have pspin == 0, should
// not get them until Decay step
assert( pspin != 0 );
// Baryon : J = 1/2 or 3/2
if(pspin == 2) {
// Singlet (Lambda-like) baryon
if( (id/100)%10 < (id/10 )%10 ) return sqr(_sngWt);
// octet
else return 1.;
}
// Decuplet baryon
else if (pspin == 4) {
return sqr(_decWt);
}
// Meson
else if(pspin % 2 == 1) {
// Total angular momentum
int j = (pspin - 1) / 2;
// related to Orbital angular momentum l
int nl = (id/10000 )%10;
int l = -999;
int n = (id/100000)%10; // Radial excitation
if(j == 0) l = nl;
else if(nl == 0) l = j - 1;
else if(nl == 1 || nl == 2) l = j;
else if(nl == 3) l = j + 1;
// Angular or Radial excited meson
if((l||j||n) && l>=0 && l<Lmax && j<Jmax && n<Nmax) {
return sqr(_repwt[l][j][n]);
}
}
// rest is not excited or
// has spin >= 5/2 (ispin >= 6), haven't got those
return 1.0;
}
int HadronSelector::signHadron(tcPDPtr idQ1, tcPDPtr idQ2,
tcPDPtr hadron) const {
// This method receives in input three PDG ids, whose the
// first two have proper signs (corresponding to particles, id > 0,
// or antiparticles, id < 0 ), whereas the third one must
// be always positive (particle not antiparticle),
// corresponding to:
// --- quark-antiquark, or antiquark-quark, or
// quark-diquark, or diquark-quark, or
// antiquark-antidiquark, or antidiquark-antiquark
// for the first two input (idQ1, idQ2);
// --- meson or baryon for the third input (idHad):
// The method returns:
// --- + 1 if the two partons (idQ1, idQ2) are exactly
// the constituents for the hadron idHad;
// --- - 1 if the two partons (idQ1, idQ2) are exactly
// the constituents for the anti-hadron -idHad;
// --- + 0 otherwise.
// The method it is therefore useful to decide the
// sign of the id of the produced hadron as appeared
// in the vector _vecHad (where only hadron idHad > 0 are present)
// given the two constituent partons.
int sign = 0;
long idHad = hadron->id();
assert(idHad > 0);
int chargeIn = idQ1->iCharge() + idQ2->iCharge();
int chargeOut = hadron->iCharge();
// same charge
if( chargeIn == chargeOut && chargeIn !=0 ) sign = +1;
else if(chargeIn == -chargeOut && chargeIn !=0 ) sign = -1;
else if(chargeIn == 0 && chargeOut == 0 ) {
// In the case of same null charge, there are four cases:
// i) K0-like mesons, B0-like mesons, Bs-like mesons
// the PDG convention is to consider them "antiparticle" (idHad < 0)
// if the "dominant" (heavier) flavour (respectively, s, b)
// is a quark (idQ > 0): for instance, B0s = (b, sbar) has id < 0
// Remember that there is an important exception for K0L (id=130) and
// K0S (id=310): they don't have antiparticles, therefore idHad > 0
// always. We use below the fact that K0L and K0S are the unique
// hadrons having 0 the first (less significant) digit of their id.
// 2) D0-like mesons: the PDG convention is to consider them "particle"
// (idHad > 0) if the charm flavour is carried by a c: (c,ubar) has id>0
// 3) the remaining mesons should not have antiparticle, therefore their
// sign is always positive.
// 4) for baryons, that is when one of idQ1 and idQ2 is a (anti-) quark and
// the other one is a (anti-) diquark the sign is negative when both
// constituents are "anti", that is both with id < 0; positive otherwise.
// meson
if(abs(int(idQ1->iColour()))== 3 && abs(int(idQ2->iColour())) == 3 &&
!DiquarkMatcher::Check(idQ1->id()) && !DiquarkMatcher::Check(idQ2->id()))
{
int idQa = abs(idQ1->id());
int idQb = abs(idQ2->id());
int dominant = idQ2->id();
if(idQa > idQb) {
swap(idQa,idQb);
dominant = idQ1->id();
}
if((idQa==ParticleID::d && idQb==ParticleID::s) ||
(idQa==ParticleID::d && idQb==ParticleID::b) ||
(idQa==ParticleID::s && idQb==ParticleID::b)) {
// idHad%10 is zero for K0L,K0S
if (dominant < 0 || idHad%10 == 0) sign = +1;
else if(dominant > 0) sign = -1;
}
else if((idQa==ParticleID::u && idQb==ParticleID::c) ||
(idQa==ParticleID::u && idQb==ParticleID::t) ||
(idQa==ParticleID::c && idQb==ParticleID::t)) {
if (dominant > 0) sign = +1;
else if(dominant < 0) sign = -1;
}
else if(idQa==idQb) sign = +1;
// sets sign for Susy particles
else sign = (dominant > 0) ? +1 : -1;
}
// baryon
else if(DiquarkMatcher::Check(idQ1->id()) || DiquarkMatcher::Check(idQ2->id())) {
if (idQ1->id() > 0 && idQ2->id() > 0) sign = +1;
else if(idQ1->id() < 0 && idQ2->id() < 0) sign = -1;
}
}
if (sign == 0) {
cerr << "Could not work out sign for "
<< idQ1->PDGName() << ' '
<< idQ2->PDGName() << " => "
<< hadron->PDGName() << '\n';
assert(false);
}
return sign;
}
pair<tcPDPtr,tcPDPtr> HadronSelector::lightestHadronPair(tcPDPtr ptr1, tcPDPtr ptr2,
tcPDPtr ptr3) const {
// throw exception of id3!=0 as doesn't work
if ( ptr3 ) throw Exception()
<< "ptr3!=0 not yet implemented in HadronSelector::lightestHadronPair"
<< Exception::abortnow;
// charge
int totalcharge = ptr1->iCharge() + ptr2->iCharge();
if ( ptr3 ) totalcharge += ptr3->iCharge();
tcPDPtr vIdHad1[2]={tcPDPtr(),tcPDPtr()},vIdHad2[2]={tcPDPtr(),tcPDPtr()};
bool vOk[2] = {false, false};
Energy vMassPair[2] = { ZERO, ZERO };
for (int i = 0; i < 2; i++) {
tcPDPtr idPartner = i==0 ? getParticleData(ParticleID::d) : getParticleData(ParticleID::u);
// Change sign to idPartner (transform it into a anti-quark) if it is not
// possible to form a meson or a baryon.
assert (ptr1 && idPartner);
if (!CheckId::canBeHadron(ptr1, idPartner)) idPartner = idPartner->CC();
vIdHad1[i] = lightestHadron(ptr1, idPartner);
vIdHad2[i] = lightestHadron(ptr2, idPartner->CC());
if ( vIdHad1[i] && vIdHad2[i] &&
vIdHad1[i]->iCharge() + vIdHad2[i]->iCharge() == totalcharge ) {
vOk[i] = true;
vMassPair[i] = vIdHad1[i]->mass() + vIdHad2[i]->mass();
}
}
// Take the lightest pair compatible with charge conservation.
if ( vOk[0] && ( ! vOk[1] || vMassPair[0] <= vMassPair[1] ) ) {
return make_pair(vIdHad1[0],vIdHad2[0]);
}
else if ( vOk[1] && ( ! vOk[0] || vMassPair[1] < vMassPair[0] ) ) {
return make_pair(vIdHad1[1],vIdHad2[1]);
}
else {
return make_pair(tcPDPtr(),tcPDPtr());
}
}
Energy HadronSelector::massLightestBaryonPair(tcPDPtr ptr1, tcPDPtr ptr2) const {
// Make sure that we don't have any diquarks as input, return arbitrarily
// large value if we do
Energy currentSum = Constants::MaxEnergy;
for(unsigned int ix=0; ix<_partons.size(); ++ix) {
if(!DiquarkMatcher::Check(_partons[ix]->id())) continue;
HadronTable::const_iterator
tit1=_table.find(make_pair(abs(ptr1->id()),_partons[ix]->id())),
tit2=_table.find(make_pair(_partons[ix]->id(),abs(ptr2->id())));
if( tit1==_table.end() || tit2==_table.end()) continue;
if(tit1->second.empty()||tit2->second.empty()) continue;
Energy s = tit1->second.begin()->mass + tit2->second.begin()->mass;
if(currentSum > s) currentSum = s;
}
return currentSum;
}
+tcPDPtr HadronSelector::lightestHadron(tcPDPtr ptr1, tcPDPtr ptr2,tcPDPtr ptr3) const {
+ // The method assumes ptr3 == 0 rest not implemented
+ assert(ptr1 && ptr2 && !ptr3);
+ // find entry in the table
+ pair<long,long> ids = make_pair(abs(ptr1->id()),abs(ptr2->id()));
+ HadronTable::const_iterator tit=_table.find(ids);
+ // throw exception if flavours wrong
+ if (tit==_table.end())
+ throw Exception() << "Could not find "
+ << ids.first << ' ' << ids.second
+ << " in _table. "
+ << "In HadronSelector::lightestHadron()"
+ << Exception::eventerror;
+ if(tit->second.empty())
+ throw Exception() << "HadronSelector::lightestHadron "
+ << "could not find any hadrons containing "
+ << ptr1->id() << ' ' << ptr2->id() << '\n'
+ << tit->first.first << ' '
+ << tit->first.second << Exception::eventerror;
+ // find the lightest hadron
+ int sign = signHadron(ptr1,ptr2,tit->second.begin()->ptrData);
+ tcPDPtr candidate = sign > 0 ?
+ tit->second.begin()->ptrData : tit->second.begin()->ptrData->CC();
+ // \todo 20 GeV limit is temporary fudge to let SM particles go through.
+ // \todo Use isExotic instead?
+ if (candidate->mass() > 20*GeV
+ && candidate->mass() < ptr1->constituentMass() + ptr2->constituentMass()) {
+ generator()->log() << "HadronSelector::lightestHadron: "
+ << "chosen candidate " << candidate->PDGName()
+ << " is lighter than its constituents "
+ << ptr1->PDGName() << ", " << ptr2->PDGName() << '\n'
+ << candidate->mass()/GeV << " < " << ptr1->constituentMass()/GeV
+ << " + " << ptr2->constituentMass()/GeV << '\n'
+ << "Check your particle data tables.\n";
+ assert(false);
+ }
+ return candidate;
+}
+
+vector<pair<tcPDPtr,double> >
+HadronSelector::hadronsBelowThreshold(Energy threshold, tcPDPtr ptr1,
+ tcPDPtr ptr2, tcPDPtr ptr3) const {
+ // The method assumes ptr3 == 0 rest not implemented
+ assert(ptr1 && ptr2 && !ptr3);
+ // find entry in the table
+ pair<long,long> ids = make_pair(abs(ptr1->id()),abs(ptr2->id()));
+ HadronTable::const_iterator tit=_table.find(ids);
+ // throw exception if flavours wrong
+ if (tit==_table.end())
+ throw Exception() << "Could not find "
+ << ids.first << ' ' << ids.second
+ << " in _table. "
+ << "In HadronSelector::hadronsBelowThreshold()"
+ << Exception::eventerror;
+ if(tit->second.empty())
+ throw Exception() << "HadronSelector::hadronsBelowThreshold() "
+ << "could not find any hadrons containing "
+ << ptr1->id() << ' ' << ptr2->id() << '\n'
+ << tit->first.first << ' '
+ << tit->first.second << Exception::eventerror;
+ vector<pair<tcPDPtr,double> > candidates;
+ KupcoData::const_iterator hit = tit->second.begin();
+ // find the hadrons
+ while(hit->mass<threshold&&hit!=tit->second.end()) {
+ // find the hadron
+ int sign = signHadron(ptr1,ptr2,hit->ptrData);
+ tcPDPtr candidate = sign > 0 ? hit->ptrData : hit->ptrData->CC();
+ // \todo 20 GeV limit is temporary fudge to let SM particles go through.
+ // \todo Use isExotic instead?
+ if (candidate->mass() > 20*GeV
+ && candidate->mass() < ptr1->constituentMass() + ptr2->constituentMass()) {
+ generator()->log() << "HadronSelector::hadronsBelowTheshold: "
+ << "chosen candidate " << candidate->PDGName()
+ << " is lighter than its constituents "
+ << ptr1->PDGName() << ", " << ptr2->PDGName() << '\n'
+ << candidate->mass()/GeV << " < " << ptr1->constituentMass()/GeV
+ << " + " << ptr2->constituentMass()/GeV << '\n'
+ << "Check your particle data tables.\n";
+ assert(false);
+ }
+ candidates.push_back(make_pair(candidate,hit->overallWeight));
+ ++hit;
+ }
+ return candidates;
+}
+
+
+tcPDPtr HadronSelector::chooseSingleHadron(tcPDPtr par1, tcPDPtr par2,
+ Energy mass) const {
+ // Determine the sum of the nominal masses of the two lightest hadrons
+ // with the right flavour numbers as the cluster under consideration.
+ // Notice that we don't need real masses (drawn by a Breit-Wigner
+ // distribution) because the lightest pair of hadrons does not involve
+ // any broad resonance.
+ Energy threshold = massLightestHadronPair(par1,par2);
+ // Special: it allows one-hadron decays also above threshold.
+ if (CheckId::isExotic(par1,par2))
+ threshold *= (1.0 + UseRandom::rnd()*_limExotic);
+ else if (CheckId::hasBottom(par1,par2))
+ threshold *= (1.0 + UseRandom::rnd()*_limBottom);
+ else if (CheckId::hasCharm(par1,par2))
+ threshold *= (1.0 + UseRandom::rnd()*_limCharm);
+
+ // only do one hadron decay is mass less than the threshold
+ if(mass>=threshold) return tcPDPtr();
+
+ // select the hadron
+ tcPDPtr hadron;
+ // old option pick the lightest hadron
+ if(belowThreshold_ == 0) {
+ hadron= lightestHadron(par1,par2);
+ }
+ // new option select from those available
+ else if(belowThreshold_ == 1) {
+ vector<pair<tcPDPtr,double> > hadrons =
+ hadronsBelowThreshold(threshold,par1,par2);
+ if(hadrons.size()==1) {
+ hadron = hadrons[0].first;
+ }
+ else if(hadrons.empty()) {
+ hadron= lightestHadron(par1,par2);
+ }
+ else {
+ double totalWeight=0.;
+ for(unsigned int ix=0;ix<hadrons.size();++ix) {
+ totalWeight += hadrons[ix].second;
+ }
+ totalWeight *= UseRandom::rnd();
+ for(unsigned int ix=0;ix<hadrons.size();++ix) {
+ if(totalWeight<=hadrons[ix].second) {
+ hadron = hadrons[ix].first;
+ break;
+ }
+ else
+ totalWeight -= hadrons[ix].second;
+ }
+ assert(hadron);
+ }
+ }
+ else
+ assert(false);
+ return hadron;
+}
diff --git a/Hadronization/HadronSelector.h b/Hadronization/HadronSelector.h
--- a/Hadronization/HadronSelector.h
+++ b/Hadronization/HadronSelector.h
@@ -1,811 +1,814 @@
// -*- C++ -*-
//
// HadronSelector.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2011 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HadronSelector_H
#define HERWIG_HadronSelector_H
//
// This is the declaration of the HadronSelector class.
//
#include "ThePEG/Interface/Interfaced.h"
#include <ThePEG/Persistency/PersistentOStream.h>
#include <ThePEG/Persistency/PersistentIStream.h>
#include <ThePEG/PDT/ParticleData.h>
#include <ThePEG/PDT/StandardMatchers.h>
#include <ThePEG/Repository/EventGenerator.h>
#include "HadronSelector.fh"
namespace Herwig {
using namespace ThePEG;
/**\ingroup Hadronization
* \class HadronSelector
* \brief This class selects the hadron flavours of a cluster decay.
* \author Philip Stephens
* \author Alberto Ribon
* \author Peter Richardson
*
* This is the base class for the selection of either a pair of hadrons, or
* in some cases a single hadron. The different approaches which were
* previously implemented in this class are now implemented in the
* HwppSelector and Hw64Selector which inherit from this class.
*
* This class implements a number of methods which are needed by all models
* and in addition contains the weights for the different meson multiplets and
* mixing of the light \f$I=0\f$ mesons.
*
* @see \ref HadronSelectorInterfaces "The interfaces"
* defined for HadronSelector.
* @see HwppSelector
* @see Hw64Selector
*/
class HadronSelector: public Interfaced {
public:
/** \ingroup Hadronization
* \class HadronInfo
* \brief Class used to store all the hadron information for easy access.
* \author Philip Stephens
*
* Note that:
* - the hadrons in _table can be filled in any ordered
* w.r.t. the mass value, and flavours for different
* groups (for instance, (u,s) hadrons don't need to
* be placed after (d,s) or any other flavour), but
* all hadrons with the same flavours must be consecutive
* ( for instance you cannot alternate hadrons of type
* (d,s) with those of flavour (u,s) ).
* Furthermore, it is assumed that particle and antiparticle
* have the same weights, and therefore only one of them
* must be entered in the table: we have chosen to refer
* to the particle, defined as PDG id > 0, although if
* an anti-particle is provided in input it is automatically
* transform to its particle, simply by taking the modulus
* of its id.
*/
class HadronInfo {
public:
/**
* Constructor
* @param idin The PDG code of the hadron
* @param datain The pointer to the ParticleData object
* @param swtin The singlet/decuplet/orbital factor
* @param massin The mass of the hadron
*/
HadronInfo(long idin=0, tPDPtr datain=tPDPtr(),
double swtin=1., Energy massin=ZERO)
: id(idin), ptrData(datain), swtef(swtin), wt(1.0), overallWeight(0.0),
mass(massin)
{}
/**
* Comparision operator on mass
*/
bool operator<(const HadronInfo &x) const {
if(mass!=x.mass) return mass < x.mass;
else return id < x.id;
}
/**
* The hadrons id.
*/
long id;
/**
* pointer to ParticleData, to get the spin, etc...
*/
tPDPtr ptrData;
/**
* singlet/decuplet/orbital factor
*/
double swtef;
/**
* mixing factor
*/
double wt;
/**
* (2*J+1)*wt*swtef
*/
double overallWeight;
/**
* The hadrons mass
*/
Energy mass;
/**
* Rescale the weight for a given hadron
*/
void rescale(double x) const {
const_cast<HadronInfo*>(this)->overallWeight *= x;
}
/**
* Friend method used to print the value of a table element.
*/
friend PersistentOStream & operator<< (PersistentOStream & os,
const HadronInfo & hi ) {
os << hi.id << hi.ptrData << hi.swtef << hi.wt
<< hi.overallWeight << ounit(hi.mass,GeV);
return os;
}
/**
* debug output
*/
friend ostream & operator<< (ostream & os, const HadronInfo & hi );
/**
* Friend method used to read in the value of a table element.
*/
friend PersistentIStream & operator>> (PersistentIStream & is,
HadronInfo & hi ) {
is >> hi.id >> hi.ptrData >> hi.swtef >> hi.wt
>> hi.overallWeight >> iunit(hi.mass,GeV);
return is;
}
};
/** \ingroup Hadronization
* \class Kupco
* \brief Class designed to make STL routines easy to use.
* \author Philip Stephens
*
* This class is used to generate a list of the hadron pairs which can
* be produced that allows easy traversal and quick access.
*/
class Kupco {
public:
/**
* Constructor
* @param inidQ PDG code of the quark drawn from the vacuum.
* @param inhad1 ParticleData for the first hadron produced.
* @param inhad2 ParticleData for the second hadron produced.
* @param inwgt The weight for the hadron pair
*/
Kupco(tcPDPtr inidQ,tcPDPtr inhad1,tcPDPtr inhad2, Energy inwgt)
: idQ(inidQ),hadron1(inhad1),hadron2(inhad2),weight(inwgt)
{}
/**
* id of the quark drawn from the vacuum.
*/
tcPDPtr idQ;
/**
* The ParticleData object for the first hadron produced.
*/
tcPDPtr hadron1;
/**
* The ParticleData object for the second hadron produced.
*/
tcPDPtr hadron2;
/**
* Weight factor of this componation.
*/
Energy weight;
};
public:
/**
* The helper classes
*/
//@{
/**
* The type is used to contain all the hadrons info of a given flavour.
*/
typedef set<HadronInfo> KupcoData;
//@}
/**
* The hadron table type.
*/
typedef map<pair<long,long>,KupcoData> HadronTable;
public:
+
/**
* The default constructor.
*/
HadronSelector(unsigned int);
/**
* Method to return a pair of hadrons given the PDG codes of
* two or three constituents
* @param cluMass The mass of the cluster
* @param par1 The first constituent
* @param par2 The second constituent
* @param par3 The third constituent
*/
virtual pair<tcPDPtr,tcPDPtr> chooseHadronPair(const Energy cluMass, tcPDPtr par1,
tcPDPtr par2,tcPDPtr par3 = PDPtr()) const
= 0;
/**
+ * Select the single hadron for a cluster decay
+ * return null pointer if not a single hadron decay
+ * @param par1 1st constituent
+ * @param par2 2nd constituent
+ * @param mass Mass of the cluster
+ */
+ tcPDPtr chooseSingleHadron(tcPDPtr par1, tcPDPtr par2, Energy mass) const;
+
+ /**
* This returns the lightest pair of hadrons given by the flavours.
*
* Given the two (or three) constituents of a cluster, it returns
* the two lightest hadrons with proper flavour numbers.
* Furthermore, the first of the two hadrons must have the constituent with
* par1, and the second must have the constituent with par2.
* \todo At the moment it does *nothing* in the case that also par3 is present.
*
* The method is implemented by calling twice lightestHadron,
* once with (par1,quarktopick->CC()) ,and once with (par2,quarktopick)
* where quarktopick is either the pointer to
* d or u quarks . In fact, the idea is that whatever the flavour of par1
* and par2, no matter if (anti-)quark or (anti-)diquark, the lightest
* pair of hadrons containing flavour par1 and par2 will have either
* flavour d or u, being the lightest quarks.
* The method returns the pair (PDPtr(),PDPtr()) if anything goes wrong.
*
* \todo The method assumes par3 == PDPtr() (otherwise we don't know how to proceed: a
* possible, trivial way would be to randomly select two of the three
* (anti-)quarks and treat them as a (anti-)diquark, reducing the problem
* to two components as treated below.
* In the normal (two components) situation, the strategy is the following:
* treat in the same way the two possibilities: (d dbar) (i=0) and
* (u ubar) (i=1) as the pair quark-antiquark necessary to form a
* pair of hadrons containing the input flavour par1 and par2; finally,
* select the one that produces the lightest pair of hadrons, compatible
* with the charge conservation constraint.
*/
pair<tcPDPtr,tcPDPtr> lightestHadronPair(tcPDPtr ptr1, tcPDPtr ptr2,
tcPDPtr ptr3 = PDPtr ()) const;
/**
* Returns the mass of the lightest pair of hadrons with the given particles
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
* @param ptr3 is the third constituent
*/
Energy massLightestHadronPair(tcPDPtr ptr1, tcPDPtr ptr2,
tcPDPtr ptr3 = PDPtr ()) const {
pair<tcPDPtr,tcPDPtr> pairData = lightestHadronPair(ptr1, ptr2, ptr3);
if ( ! pairData.first || ! pairData.second ) return ZERO;
return ( pairData.first->mass() + pairData.second->mass() );
}
/**
* Returns the lightest hadron formed by the given particles.
*
* Given the id of two (or three) constituents of a cluster, it returns
* the lightest hadron with proper flavour numbers.
* At the moment it does *nothing* in the case that also 'ptr3' present.
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
* @param ptr3 is the third constituent
*/
tcPDPtr lightestHadron(tcPDPtr ptr1, tcPDPtr ptr2,
-#ifndef NDEBUG
- tcPDPtr ptr3 = PDPtr ()) const {
-#else
- tcPDPtr = PDPtr ()) const {
-#endif
- // The method assumes ptr3 == 0
- // rest not implemented
- assert(ptr1 && ptr2 && !ptr3);
- // find entry in the table
- pair<long,long> ids = make_pair(abs(ptr1->id()),abs(ptr2->id()));
- HadronTable::const_iterator tit=_table.find(ids);
- // throw exception if flavours wrong
- if (tit==_table.end())
- throw Exception() << "Could not find "
- << ids.first << ' ' << ids.second
- << " in _table. "
- << "In HadronSelector::lightestHadron()"
- << Exception::eventerror;
- if(tit->second.empty())
- throw Exception() << "HadronSelector::lightestHadron "
- << "could not find any hadrons containing "
- << ptr1->id() << ' ' << ptr2->id() << '\n'
- << tit->first.first << ' '
- << tit->first.second << Exception::eventerror;
- // find the lightest hadron
- int sign = signHadron(ptr1,ptr2,tit->second.begin()->ptrData);
- tcPDPtr candidate = sign > 0 ?
- tit->second.begin()->ptrData : tit->second.begin()->ptrData->CC();
- // \todo 20 GeV limit is temporary fudge to let SM particles go through.
- // \todo Use isExotic instead?
- if (candidate->mass() > 20*GeV
- && candidate->mass() < ptr1->constituentMass() + ptr2->constituentMass()) {
- generator()->log() << "HadronSelector::lightestHadron: "
- << "chosen candidate " << candidate->PDGName()
- << " is lighter than its constituents "
- << ptr1->PDGName() << ", " << ptr2->PDGName() << '\n'
- << candidate->mass()/GeV << " < " << ptr1->constituentMass()/GeV
- << " + " << ptr2->constituentMass()/GeV << '\n'
- << "Check your particle data tables.\n";
- assert(false);
- }
- return candidate;
- }
+ tcPDPtr ptr3 = PDPtr ()) const;
+
+ /**
+ * Returns the hadrons below the constituent mass threshold formed by the given particles,
+ * together with their total weight
+ *
+ * Given the id of two (or three) constituents of a cluster, it returns
+ * the lightest hadron with proper flavour numbers.
+ * At the moment it does *nothing* in the case that also 'ptr3' present.
+ * @param threshold The theshold
+ * @param ptr1 is the first constituent
+ * @param ptr2 is the second constituent
+ * @param ptr3 is the third constituent
+ */
+ vector<pair<tcPDPtr,double> >
+ hadronsBelowThreshold(Energy threshold,
+ tcPDPtr ptr1, tcPDPtr ptr2,
+ tcPDPtr ptr3 = PDPtr ()) const;
/**
* Return the nominal mass of the hadron returned by lightestHadron()
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
* @param ptr3 is the third constituent
*/
Energy massLightestHadron(tcPDPtr ptr1, tcPDPtr ptr2,
#ifndef NDEBUG
tcPDPtr ptr3 = PDPtr ()) const {
#else
tcPDPtr = PDPtr ()) const {
#endif
// The method assumes ptr3 == empty
assert(!(ptr3));
// find entry in the table
pair<long,long> ids(abs(ptr1->id()),abs(ptr2->id()));
HadronTable::const_iterator tit=_table.find(ids);
// throw exception if flavours wrong
if(tit==_table.end()||tit->second.empty())
throw Exception() << "HadronSelector::massLightestHadron "
<< "failed for particle" << ptr1->id() << " "
<< ptr2->id()
<< Exception::eventerror;
// return the mass
return tit->second.begin()->mass;
}
/**
* Returns the mass of the lightest pair of baryons.
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
*/
Energy massLightestBaryonPair(tcPDPtr ptr1, tcPDPtr ptr2) const;
/**
* Return the weights for the different quarks and diquarks
*/
//@{
/**
* The down quark weight.
*/
double pwtDquark() const {
return _pwtDquark;
}
/**
* The up quark weight.
*/
double pwtUquark() const {
return _pwtUquark;
}
/**
* The strange quark weight.
*/
double pwtSquark() const {
return _pwtSquark;
}
/**
* The charm quark weight.
*/
double pwtCquark() const {
return _pwtCquark;
}
/**
* The bottom quark weight.
*/
double pwtBquark() const {
return _pwtBquark;
}
/**
* The diquark weight.
*/
double pwtDIquark() const {
return _pwtDIquark;
}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
*
* The array _repwt is initialized using the interfaces to set different
* weights for different meson multiplets and the constructHadronTable()
* method called to complete the construction of the hadron tables.
*
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Construct the table of hadron data
* This is the main method to initialize the hadron data (mainly the
* weights associated to each hadron, taking into account its spin,
* eventual isoscalar-octect mixing, singlet-decuplet factor). This is
* the method that one should update when new or updated hadron data is
* available.
*
* This class implements the construction of the basic table but can be
* overridden if needed in inheriting classes.
*
* The rationale for factors used for diquarks involving different quarks can
* be can be explained by taking a prototype example that in the exact SU(2) limit,
* in which:
* \f[m_u=m_d\f]
* \f[M_p=M_n=M_\Delta\f]
* and we will have equal numbers of u and d quarks produced.
* Suppose that we weight 1 the diquarks made of the same
* quark and 1/2 those made of different quarks, the fractions
* of u and d baryons (p, n, Delta) we get are the following:
* - \f$\Delta^{++}\f$: 1 possibility only u uu with weight 1
* - \f$\Delta^- \f$: 1 possibility only d dd with weight 1
* - \f$p,\Delta^+ \f$: 2 possibilities u ud with weight 1/2
* d uu with weight 1
* - \f$n,\Delta^0 \f$: 2 possibilities d ud with weight 1/2
* u dd with weight 1
* In the latter two cases, we have to take into account the
* fact that p and n have spin 1/2 whereas Delta+ and Delta0
* have spin 3/2 therefore from phase space we get a double weight
* for Delta+ and Delta0 relative to p and n respectively.
* Therefore the relative amount of these baryons that is
* produced is the following:
* # p = # n = ( 1/2 + 1 ) * 1/3 = 1/2
* # Delta++ = # Delta- = 1 = ( 1/2 + 1) * 2/3 # Delta+ = # Delta0
* which is correct, and therefore the weight 1/2 for the
* diquarks of different types of quarks is justified (at least
* in this limit of exact SU(2) ).
*/
virtual void constructHadronTable();
/**
* Access to the table of hadrons
*/
const HadronTable & table() const {
return _table;
}
/**
* Access to the list of partons
*/
const vector<PDPtr> & partons() const {
return _partons;
}
/**
* Access the parton weights
*/
double pwt(long pid) const {
map<long,double>::const_iterator it = _pwt.find(abs(pid));
assert( it != _pwt.end() );
return it->second;
}
/**
* Methods for the mixing of \f$I=0\f$ mesons
*/
//@{
/**
* Return the probability of mixing for Octet-Singlet isoscalar mixing,
* the probability of the
* \f$\frac1{\sqrt{2}}(|u\bar{u}\rangle + |d\bar{d}\rangle)\f$ component
* is returned.
* @param angleMix The mixing angle in degrees (not radians)
* @param order is 0 for no mixing, 1 for the first resonance of a pair,
* 2 for the second one.
* The mixing is defined so that for example with \f$\eta-\eta'\f$ mixing where
* the mixing angle is \f$\theta=-23^0$ with $\eta\f$ as the first particle
* and \f$\eta'\f$ the second one.
* The convention used is
* \f[\eta = \cos\theta|\eta_{\rm octet }\rangle
* -\sin\theta|\eta_{\rm singlet}\rangle\f]
* \f[\eta' = \sin\theta|\eta_{\rm octet }\rangle
* -\cos\theta|\eta_{\rm singlet}\rangle\f]
* with
* \f[|\eta_{\rm singlet}\rangle = \frac1{\sqrt{3}}
* \left[|u\bar{u}\rangle + |d\bar{d}\rangle + |s\bar{s}\rangle\right]\f]
* \f[|\eta_{\rm octet }\rangle = \frac1{\sqrt{6}}
* \left[|u\bar{u}\rangle + |d\bar{d}\rangle - 2|s\bar{s}\rangle\right]\f]
*/
double probabilityMixing(const double angleMix,
const int order) const {
static double convert=Constants::pi/180.0;
if (order == 1)
return sqr( cos( angleMix*convert + atan( sqrt(2.0) ) ) );
else if (order == 2)
return sqr( sin( angleMix*convert + atan( sqrt(2.0) ) ) );
else
return 1.;
}
/**
* Returns the weight of given mixing state.
* @param id The PDG code of the meson
*/
virtual double mixingStateWeight(long id) const;
//@}
/**
* Calculates a special weight specific to a given hadron.
* @param id The PDG code of the hadron
*/
double specialWeight(long id) const;
/**
* This method returns the proper sign ( > 0 hadron; < 0 anti-hadron )
* for the input PDG id idHad > 0, suppose to be made by the
* two constituent particle pointers: par1 and par2 (both with proper sign).
*/
int signHadron(tcPDPtr ptr1, tcPDPtr ptr2, tcPDPtr hadron) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
HadronSelector & operator=(const HadronSelector &);
private:
/**
* The PDG codes of the constituent particles allowed
*/
vector<PDPtr> _partons;
/**
* The PDG codes of the hadrons which cannot be produced in the hadronization
*/
vector<PDPtr> _forbidden;
/**
* The weights for the different quarks and diquarks
*/
//@{
/**
* The probability of producting a down quark.
*/
double _pwtDquark;
/**
* The probability of producting an up quark.
*/
double _pwtUquark;
/**
* The probability of producting a strange quark.
*/
double _pwtSquark;
/**
* The probability of producting a charm quark.
*/
double _pwtCquark;
/**
* The probability of producting a bottom quark.
*/
double _pwtBquark;
/**
* The probability of producting a diquark.
*/
double _pwtDIquark;
/**
* Weights for quarks and diquarks.
*/
map<long,double> _pwt;
//@}
/**
* The mixing angles for the \f$I=0\f$ mesons containing light quarks
*/
//@{
/**
* The \f$\eta-\eta'\f$ mixing angle
*/
double _etamix;
/**
* The \f$\phi-\omega\f$ mixing angle
*/
double _phimix;
/**
* The \f$h_1'-h_1\f$ mixing angle
*/
double _h1mix;
/**
* The \f$f_0(1710)-f_0(1370)\f$ mixing angle
*/
double _f0mix;
/**
* The \f$f_1(1420)-f_1(1285)\f$ mixing angle
*/
double _f1mix;
/**
* The \f$f'_2-f_2\f$ mixing angle
*/
double _f2mix;
/**
* The \f$\eta_2(1870)-\eta_2(1645)\f$ mixing angle
*/
double _eta2mix;
/**
* The \f$\phi(???)-\omega(1650)\f$ mixing angle
*/
double _omhmix;
/**
* The \f$\phi_3-\omega_3\f$ mixing angle
*/
double _ph3mix;
/**
* The \f$\eta(1475)-\eta(1295)\f$ mixing angle
*/
double _eta2Smix;
/**
* The \f$\phi(1680)-\omega(1420)\f$ mixing angle
*/
double _phi2Smix;
//@}
/**
* The weights for the various meson multiplets to be used to supress the
* production of particular states
*/
//@{
/**
* The weights for the \f$\phantom{1}^1S_0\f$ multiplets
*/
vector<double> _weight1S0;
/**
* The weights for the \f$\phantom{1}^3S_1\f$ multiplets
*/
vector<double> _weight3S1;
/**
* The weights for the \f$\phantom{1}^1P_1\f$ multiplets
*/
vector<double> _weight1P1;
/**
* The weights for the \f$\phantom{1}^3P_0\f$ multiplets
*/
vector<double> _weight3P0;
/**
* The weights for the \f$\phantom{1}^3P_1\f$ multiplets
*/
vector<double> _weight3P1;
/**
* The weights for the \f$\phantom{1}^3P_2\f$ multiplets
*/
vector<double> _weight3P2;
/**
* The weights for the \f$\phantom{1}^1D_2\f$ multiplets
*/
vector<double> _weight1D2;
/**
* The weights for the \f$\phantom{1}^3D_1\f$ multiplets
*/
vector<double> _weight3D1;
/**
* The weights for the \f$\phantom{1}^3D_2\f$ multiplets
*/
vector<double> _weight3D2;
/**
* The weights for the \f$\phantom{1}^3D_3\f$ multiplets
*/
vector<double> _weight3D3;
//@}
/**
* The weights for the excited meson multiplets
*/
vector<vector<vector<double> > > _repwt;
/**
* Singlet and Decuplet weights
*/
//@{
/**
* The singlet weight
*/
double _sngWt;
/**
* The decuplet weight
*/
double _decWt;
//@}
/**
* The table of hadron data
*/
HadronTable _table;
/**
* Enums so arrays can be statically allocated
*/
//@{
/**
* Defines values for array sizes. L,J,N max values for excited mesons.
*/
enum MesonMultiplets { Lmax = 3, Jmax = 4, Nmax = 4};
//@}
/**
* Option for the construction of the tables
*/
unsigned int _topt;
/**
* Which particles to produce for debugging purposes
*/
unsigned int _trial;
+
+ /**
+ * @name A parameter used for determining when clusters are too light.
+ *
+ * This parameter is used for setting the lower threshold, \f$ t \f$ as
+ * \f[ t' = t(1 + r B^1_{\rm lim}) \f]
+ * where \f$ r \f$ is a random number [0,1].
+ */
+ //@{
+ double _limBottom;
+ double _limCharm;
+ double _limExotic;
+ //@}
+
+ /**
+ * Option for the selection of hadrons below the pair threshold
+ */
+ unsigned int belowThreshold_;
};
}
#endif /* HERWIG_HadronSelector_H */
diff --git a/Hadronization/LightClusterDecayer.cc b/Hadronization/LightClusterDecayer.cc
--- a/Hadronization/LightClusterDecayer.cc
+++ b/Hadronization/LightClusterDecayer.cc
@@ -1,417 +1,386 @@
// -*- C++ -*-
//
// LightClusterDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2011 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the LightClusterDecayer class.
//
#include "LightClusterDecayer.h"
#include <ThePEG/Interface/ClassDocumentation.h>
#include <ThePEG/Interface/Parameter.h>
#include <ThePEG/Interface/Reference.h>
+#include <ThePEG/Interface/Switch.h>
#include <ThePEG/Persistency/PersistentOStream.h>
#include <ThePEG/Persistency/PersistentIStream.h>
#include <ThePEG/PDT/EnumParticles.h>
#include <ThePEG/Repository/EventGenerator.h>
#include "Cluster.h"
#include "CheckId.h"
#include "Herwig/Utilities/Kinematics.h"
#include <ThePEG/Utilities/DescribeClass.h>
using namespace Herwig;
DescribeClass<LightClusterDecayer,Interfaced>
describeLightClusterDecayer("Herwig::LightClusterDecayer","");
IBPtr LightClusterDecayer::clone() const {
return new_ptr(*this);
}
IBPtr LightClusterDecayer::fullclone() const {
return new_ptr(*this);
}
void LightClusterDecayer::persistentOutput(PersistentOStream & os) const {
- os << _hadronSelector << _limBottom << _limCharm << _limExotic;
+ os << _hadronSelector;
}
void LightClusterDecayer::persistentInput(PersistentIStream & is, int) {
- is >> _hadronSelector >> _limBottom >> _limCharm >> _limExotic ;
+ is >> _hadronSelector;
}
void LightClusterDecayer::Init() {
static ClassDocumentation<LightClusterDecayer> documentation
("There is the class responsible for the one-hadron decay of light clusters");
static Reference<LightClusterDecayer,HadronSelector>
interfaceHadronSelector("HadronSelector",
"A reference to the HadronSelector object",
&Herwig::LightClusterDecayer::_hadronSelector,
false, false, true, false);
-
-static Parameter<LightClusterDecayer,double>
- interfaceSingleHadronLimitBottom ("SingleHadronLimitBottom","threshold for one-hadron decay of b-cluster",
- &LightClusterDecayer::_limBottom, 0, 0.0, 0.0, 100.0,false,false,false);
-static Parameter<LightClusterDecayer,double>
- interfaceSingleHadronLimitCharm ("SingleHadronLimitCharm","threshold for one-hadron decay of c-cluster",
- &LightClusterDecayer::_limCharm, 0, 0.0, 0.0, 100.0,false,false,false);
-static Parameter<LightClusterDecayer,double>
- interfaceSingleHadronLimitExotic ("SingleHadronLimitExotic","threshold for one-hadron decay of exotic cluster",
- &LightClusterDecayer::_limExotic, 0, 0.0, 0.0, 100.0,false,false,false);
}
-
bool LightClusterDecayer::decay(ClusterVector & clusters, tPVector & finalhadrons) {
// Loop over all clusters, and for those that were not heavy enough
// to undergo to fission, check if they are below the threshold
// for normal two-hadron decays. If this is the case, then the cluster
// should be decayed into a single hadron: this can happen only if
// it is possible to reshuffle momenta between the cluster and
// another one; in the rare occasions in which such exchange of momenta
// is not possible (because all of the clusters are too light) then
// the event is skipped.
// Notice that, differently from what happens in Fortran Herwig,
// light (that is below the threshold for the production of the lightest
// pair of hadrons with the proper flavours) fission products, produced
// by the fission of heavy clusters in class ClusterFissioner
// have been already "decayed" into single hadron (the lightest one
// with proper flavour) by the same latter class, without requiring
// any reshuffling. Therefore the light clusters that are treated in
// this LightClusterDecayer class are produced directly
// (originally) by the class ClusterFinder.
// To preserve all of the information, the cluster partner with which
// the light cluster (that decays into a single hadron) exchanges
// momentum in the reshuffling procedure is redefined and inserted
// in the vector vecNewRedefinedCluPtr. Only at the end, when all
// light clusters have been examined, the elements this vector will be
// copied in collecCluPtr (the reason is that it is not allowed to
// modify a STL container while iterating over it. At the same time,
// this ensures that a cluster can be redefined only once, which seems
// sensible although not strictly necessary).
// Notice that the cluster reshuffling partner is normally redefined
// and inserted in the vector vecNewRedefinedCluPtr, but not always:
// in the case it is also light, then it is also decayed immediately
// into a single hadron, without redefining it (the reason being that,
// otherwise, the would-be redefined cluster could have undefined
// components).
vector<tClusterPtr> redefinedClusters;
for (ClusterVector::const_iterator it = clusters.begin();
it != clusters.end(); ++it) {
// Skip the clusters that are not available or that are
// heavy, intermediate, clusters that have undergone to fission,
if ( ! (*it)->isAvailable() || ! (*it)->isReadyToDecay() ) continue;
// We need to require (at least at the moment, maybe in the future we
// could change it) that the cluster has exactly two components,
// because otherwise we don't know how to deal with the kinematics.
// If this is not the case, then send a warning because it is not suppose
// to happen, and then do nothing with (ignore) such cluster.
if ( (*it)->numComponents() != 2 ) {
generator()->logWarning( Exception("LightClusterDecayer::decay "
"***Still cluster with not exactly"
" 2 components*** ",
Exception::warning) );
continue;
}
- // Extract the particle pointer of the two components of the cluster.
-
- tPPtr ptrQ1 = (*it)->particle(0);
- tPPtr ptrQ2 = (*it)->particle(1);
+ // select the hadron for single hadron decay
+ tcPDPtr hadron = _hadronSelector->chooseSingleHadron((*it)->particle(0)->dataPtr(),
+ (*it)->particle(1)->dataPtr(),
+ (**it).mass());
+ // if not single decay continue
+ if(!hadron) continue;
- tcPDPtr par1 = ptrQ1->dataPtr();
- tcPDPtr par2 = ptrQ2->dataPtr();
-
- // Determine the sum of the nominal masses of the two lightest hadrons
- // with the right flavour numbers as the cluster under consideration.
- // Notice that we don't need real masses (drawn by a Breit-Wigner
- // distribution) because the lightest pair of hadrons does not involve
- // any broad resonance.
- Energy threshold = _hadronSelector->massLightestHadronPair(par1,par2);
- // Special: it allows one-hadron decays also above threshold.
- if (CheckId::isExotic(par1,par2))
- threshold *= (1.0 + UseRandom::rnd()*_limExotic);
- else if (CheckId::hasBottom(par1,par2))
- threshold *= (1.0 + UseRandom::rnd()*_limBottom);
- else if (CheckId::hasCharm(par1,par2))
- threshold *= (1.0 + UseRandom::rnd()*_limCharm);
-
-
- // only do one hadron decay is mass less than the threshold
- if((*it)->mass()>=threshold) continue;
-
- tcPDPtr hadron= _hadronSelector->lightestHadron(par1,par2);
-
// We assume that the candidate reshuffling cluster partner,
// with whom the light cluster can exchange momenta,
// is chosen as the closest in space-time between the available
// clusters. Notice that an alternative, sensible approach
// could be to consider instead the "closeness" in the colour
// structure...
// Notice that nor a light cluster (which decays into a single hadron)
// neither its cluster reshuffling partner (which either has a
// redefined cluster or also decays into a single hadron) can be
// a reshuffling partner of another light cluster.
// This because we are requiring that the considered candidate cluster
// reshuffling partner has the status "isAvailable && isReadyToDecay" true;
// furthermore, the new redefined clusters are not added to the collection
// of cluster before the end of the entire reshuffling procedure, avoiding
// in this way that the redefined cluster of a cluster reshuffling partner
// is used again later. Needless to say, this is just an assumption,
// although reasonable, but nothing more than that!
// Build a multimap of available reshuffling cluster partners,
// with key given by the module of the invariant space-time distance
// w.r.t. the light cluster, so that this new collection is automatically
// ordered in increasing distance values.
// We use a multimap, rather than a map, just for precaution against not properly
// defined cluster positions which could produce all identical (null) distances.
multimap<Length,tClusterPtr> candidates;
for ( ClusterVector::iterator jt = clusters.begin();
jt != clusters.end(); ++jt ) {
if ((*jt)->isAvailable() && (*jt)->isReadyToDecay() && jt != it) {
Length distance = abs (((*it)->vertex() - (*jt)->vertex()).m());
candidates.insert(pair<Length,tClusterPtr>(distance,*jt));
}
}
// Loop sequentially the multimap.
multimap<Length,tClusterPtr>::const_iterator mmapIt = candidates.begin();
bool found = false;
while (!found && mmapIt != candidates.end()) {
found = reshuffling(hadron, *it, (*mmapIt).second, redefinedClusters, finalhadrons);
if (!found) ++mmapIt;
}
if (!found) return partonicReshuffle(hadron,*it,finalhadrons);
} // end loop over collecCluPtr
// Add to collecCluPtr all of the redefined new clusters (indeed the
// pointers to them are added) contained in vecNewRedefinedCluPtr.
for (tClusterVector::const_iterator it = redefinedClusters.begin();
it != redefinedClusters.end(); ++it) {
clusters.push_back(*it);
}
return true;
}
bool LightClusterDecayer::reshuffling(const tcPDPtr pdata1,
tClusterPtr cluPtr1,
tClusterPtr cluPtr2,
tClusterVector & redefinedClusters,
tPVector & finalhadrons)
{
// don't reshuffle with beam clusters
if(cluPtr2->isBeamCluster()) return false;
// This method does the reshuffling of momenta between the cluster "1",
// that must decay into a single hadron (with id equal to idhad1), and
// the candidate cluster "2". It returns true if the reshuffling succeed,
// false otherwise.
PPtr ptrhad1 = pdata1->produceParticle();
if ( ! ptrhad1 ) {
generator()->logWarning( Exception("LightClusterDecayer::reshuffling"
"***Cannot create a particle with specified id***",
Exception::warning) );
return false;
}
Energy mhad1 = ptrhad1->mass();
// Let's call "3" and "4" the two constituents of the second cluster
tPPtr part3 = cluPtr2->particle(0);
tPPtr part4 = cluPtr2->particle(1);
// Check if the system of the two clusters can kinematically be replaced by
// an hadron of mass mhad1 (which is the lightest single hadron with the
// same flavour numbers as the first cluster) and the second cluster.
// If not, then try to replace the second cluster with the lightest hadron
// with the same flavour numbers; if it still fails, then give up!
Lorentz5Momentum pSystem = cluPtr1->momentum() + cluPtr2->momentum();
pSystem.rescaleMass(); // set the mass as the invariant of the quadri-vector
Energy mSystem = pSystem.mass();
Energy mclu2 = cluPtr2->mass();
bool singleHadron = false;
Energy mLHP2 = _hadronSelector->massLightestHadronPair(part3->dataPtr(),part4->dataPtr());
Energy mLH2 = _hadronSelector->massLightestHadron(part3->dataPtr(),part4->dataPtr());
if(mSystem > mhad1 + mclu2 && mclu2 > mLHP2) { singleHadron = false; }
else if(mSystem > mhad1 + mLH2) { singleHadron = true; mclu2 = mLH2; }
else return false;
// Let's call from now on "Sys" the system of the two clusters, and
// had1 (of mass mhad1) the lightest hadron in which the first
// cluster decays, and clu2 (of mass mclu2) either the second
// cluster or the lightest hadron in which it decays (depending
// which one is kinematically allowed, see above).
// The idea behind the reshuffling is to replace the system of the
// two clusters by the system of the hadron had1 and (cluster or hadron) clu2,
// but leaving the overall system unchanged. Furthermore, the motion
// of had1 and clu2 in the Sys frame is assumed to be parallel to, respectively,
// those of the original cluster1 and cluster2 in the same Sys frame.
// Calculate the unit three-vector, in the frame "Sys" along which the
// two initial clusters move.
Lorentz5Momentum u( cluPtr1->momentum() );
u.boost( - pSystem.boostVector() ); // boost from LAB to Sys
// Calculate the momenta of had1 and clu2 in the Sys frame first,
// and then boost back in the LAB frame.
Lorentz5Momentum phad1, pclu2;
if (pSystem.m() < mhad1 + mclu2 ) {
throw Exception() << "Impossible Kinematics in LightClusterDecayer::reshuffling()"
<< Exception::eventerror;
}
Kinematics::twoBodyDecay(pSystem, mhad1, mclu2, u.vect().unit(), phad1, pclu2);
ptrhad1->set5Momentum( phad1 ); // set momentum of first hadron.
ptrhad1->setVertex(cluPtr1->vertex()); // set hadron vertex position to the
// parent cluster position.
cluPtr1->addChild(ptrhad1);
finalhadrons.push_back(ptrhad1);
cluPtr1->flagAsReshuffled();
cluPtr2->flagAsReshuffled();
if(singleHadron) {
// In the case that also the cluster reshuffling partner is light
// it is decayed into a single hadron, *without* creating the
// redefined cluster (this choice is justified in order to avoid
// clusters that could have undefined components).
PPtr ptrhad2 = _hadronSelector->lightestHadron(part3->dataPtr(),part4->dataPtr())
->produceParticle();
ptrhad2->set5Momentum( pclu2 );
ptrhad2->setVertex( cluPtr2->vertex() ); // set hadron vertex position to the
// parent cluster position.
cluPtr2->addChild(ptrhad2);
finalhadrons.push_back(ptrhad2);
} else {
// Create the new cluster which is the redefinitions of the cluster
// partner (cluster "2") used in the reshuffling procedure of the
// light cluster (cluster "1").
// The rationale of this is to preserve completely all of the information.
ClusterPtr cluPtr2new = ClusterPtr();
if(part3 && part4) cluPtr2new = new_ptr(Cluster(part3,part4));
cluPtr2new->set5Momentum( pclu2 );
cluPtr2new->setVertex( cluPtr2->vertex() );
cluPtr2->addChild( cluPtr2new );
redefinedClusters.push_back( cluPtr2new );
// Set consistently the momenta of the two components of the second cluster
// after the reshuffling. To do that we first calculate the momenta of the
// constituents in the initial cluster rest frame; then we boost them back
// in the lab but using this time the new cluster rest frame. Finally we store
// these information in the new cluster. Notice that we do *not* set
// consistently also the momenta of the (eventual) particles pointed by the
// two components: that's because we do not need to do so, being the momentum
// an explicit private member of the class Component (which is set equal
// to the momentum of the eventual particle pointed only in the constructor,
// but then later should not necessary be the same), and furthermore it allows
// us not to loose any information, in the sense that we can always, later on,
// to find the original momenta of the two components before the reshuffling.
Lorentz5Momentum p3 = part3->momentum(); //p3new->momentum();
p3.boost( - (cluPtr2->momentum()).boostVector() ); // from LAB to clu2 (old) frame
p3.boost( pclu2.boostVector() ); // from clu2 (new) to LAB frame
Lorentz5Momentum p4 = part4->momentum(); //p4new->momentum();
p4.boost( - (cluPtr2->momentum()).boostVector() ); // from LAB to clu2 (old) frame
p4.boost( pclu2.boostVector() ); // from clu2 (new) to LAB frame
cluPtr2new->particle(0)->set5Momentum(p3);
cluPtr2new->particle(1)->set5Momentum(p4);
} // end of if (singleHadron)
return true;
}
bool LightClusterDecayer::partonicReshuffle(const tcPDPtr had,
const PPtr cluster,
tPVector & finalhadrons) {
tPPtr meson(cluster);
if(!meson->parents().empty()) meson=meson->parents()[0];
if(!meson->parents().empty()) meson=meson->parents()[0];
// check b/c hadron decay
int ptype(abs(meson->id())%10000);
bool heavy = (ptype/1000 == 5 || ptype/1000 ==4 );
heavy |= (ptype/100 == 5 || ptype/100 ==4 );
heavy |= (ptype/10 == 5 || ptype/10 ==4 );
if(!heavy) return false;
// find the leptons
tPVector leptons;
for(unsigned int ix=0;ix<meson->children().size();++ix) {
if(!(meson->children()[ix]->dataPtr()->coloured())) {
leptons.push_back(meson->children()[ix]);
}
}
if(leptons.size()==1) {
tPPtr w=leptons[0];
leptons.pop_back();
for(unsigned int ix=0;ix<w->children().size();++ix) {
if(!w->children()[ix]->dataPtr()->coloured()) {
leptons.push_back(w->children()[ix]);
}
}
}
if(leptons.size()!=2) return false;
// get momentum of leptonic system and the its minimum possible mass
Energy mmin(ZERO);
Lorentz5Momentum pw;
for(unsigned int ix=0;ix<leptons.size();++ix) {
pw+=leptons[ix]->momentum();
mmin+=leptons[ix]->mass();
}
pw.rescaleMass();
// check we can do the reshuffling
PPtr ptrhad = had->produceParticle();
// total momentum fo the system
Lorentz5Momentum pSystem = pw + cluster->momentum();
pSystem.rescaleMass();
// normal case get additional energy by rescaling momentum in rest frame of
// system
if(pSystem.mass()>ptrhad->mass()+pw.mass()&&pw.mass()>mmin) {
// Calculate the unit three-vector, in the frame "Sys" along which the
// two initial clusters move.
Lorentz5Momentum u(cluster->momentum());
u.boost( - pSystem.boostVector() );
// Calculate the momenta of had1 and clu2 in the Sys frame first,
// and then boost back in the LAB frame.
Lorentz5Momentum phad1, pclu2;
Kinematics::twoBodyDecay(pSystem, ptrhad->mass(), pw.mass(),
u.vect().unit(), phad1, pclu2);
// set momentum of first hadron.
ptrhad->set5Momentum( phad1 );
// set hadron vertex position to the parent cluster position.
ptrhad->setLabVertex(cluster->vertex());
// add hadron
cluster->addChild(ptrhad);
finalhadrons.push_back(ptrhad);
// reshuffle the leptons
// boost the leptons to the rest frame of the system
Boost boost1(-pw.boostVector());
Boost boost2( pclu2.boostVector());
for(unsigned int ix=0;ix<leptons.size();++ix) {
leptons[ix]->deepBoost(boost1);
leptons[ix]->deepBoost(boost2);
}
return true;
}
else {
return false;
}
}
diff --git a/Hadronization/LightClusterDecayer.h b/Hadronization/LightClusterDecayer.h
--- a/Hadronization/LightClusterDecayer.h
+++ b/Hadronization/LightClusterDecayer.h
@@ -1,161 +1,147 @@
// -*- C++ -*-
//
// LightClusterDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2011 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LightClusterDecayer_H
#define HERWIG_LightClusterDecayer_H
#include <ThePEG/Interface/Interfaced.h>
#include "CluHadConfig.h"
#include "HadronSelector.h"
#include "LightClusterDecayer.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Hadronization
* \class LightClusterDecayer
* \brief This class performs the decay of light clusters into a single hadron.
* \author Philip Stephens
* \author Alberto Ribon
*
* This is the class that performs the decay of light clusters into
* only one hadron. The major difficulty is that a kinematical reshuffling
* is necessary, between the cluster under consideration and its
* "neighbouring" clusters, to conserve energy-momentum in one-body decay.
* Notice that, differently from what happens in Fortran Herwig,
* light (that is below the threshold for the production of the lightest
* pair of hadrons with the proper flavours) fission products, produced
* by the fission of heavy clusters in ClusterFissioner
* have been already "decayed" into single hadron (the lightest one
* with proper flavour) by the same latter class, without require
* any reshuffling. Therefore the light clusters that are treated in
* this LightClusterDecayer class are produced directly
* (originally) by the ClusterFinder.
*
* Notice:
* - The choice of the candidate cluster with whom to reshuffle momentum
* is based on the minimal space-time distance from the light cluster.
* - An alternate choice of what is considered a "neighbour" could be
* implemented but was not considered for Herwig.
*
* @see HadronSelector
* @see \ref LightClusterDecayerInterfaces "The interfaces"
* defined for LightClusterDecayer.
*/
class LightClusterDecayer: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
- LightClusterDecayer() : _limBottom(), _limCharm(), _limExotic()
- {}
+ LightClusterDecayer() {}
//@}
/**
* This method does the decay of light hadron in one hadron.
*
* This method requires a kinematical reshuffling for energy-momentum
* conservation. This is done explicitly by the (private) method
* reshuffling().
*/
bool decay(ClusterVector & clusters, tPVector & finalhadrons);
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);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Private and non-existent assignment operator.
*/
LightClusterDecayer & operator=(const LightClusterDecayer &);
/**
* This (private) method, called by decay(), takes care of the kinematical
* reshuffling necessary for energy-momentum conservation.
*/
bool reshuffling( const tcPDPtr, tClusterPtr, tClusterPtr,
tClusterVector &, tPVector & finalhadrons)
;
/**
* This (private) method, called by decay(), performs reshuffling in the
* special case of a semileptonic partonic b/c decay
* @param hadron The hadron to be produced
* @param cluster The cluster to be reshuffled
* @param finalhadrons The vector of outgoing hadrons
*/
bool partonicReshuffle(const tcPDPtr hadron,const PPtr cluster,
tPVector & finalhadrons);
/**
* A pointer to a Herwig::HadronSelector object used for producing hadrons.
*/
Ptr<HadronSelector>::pointer _hadronSelector;
-
- /**
- * @name A parameter used for determining when clusters are too light.
- *
- * This parameter is used for setting the lower threshold, \f$ t \f$ as
- * \f[ t' = t(1 + r B^1_{\rm lim}) \f]
- * where \f$ r \f$ is a random number [0,1].
- */
- //@{
- double _limBottom;
- double _limCharm;
- double _limExotic;
- //@}
};
}
#endif /* HERWIG_LightClusterDecayer_H */
diff --git a/MatrixElement/HwMEBase.cc b/MatrixElement/HwMEBase.cc
--- a/MatrixElement/HwMEBase.cc
+++ b/MatrixElement/HwMEBase.cc
@@ -1,277 +1,289 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the HwMEBase class.
//
#include "HwMEBase.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Utilities/SimplePhaseSpace.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "ThePEG/Cuts/Cuts.h"
#include "Herwig/Shower/Base/HardTree.h"
#include "Herwig/Shower/Base/Branching.h"
using namespace Herwig;
void HwMEBase::persistentOutput(PersistentOStream & os) const {
os << massOption_ << rescaleOption_;
}
void HwMEBase::persistentInput(PersistentIStream & is, int) {
is >> massOption_ >> rescaleOption_;
}
AbstractClassDescription<HwMEBase> HwMEBase::initHwMEBase;
// Definition of the static class description member.
void HwMEBase::Init() {
static ClassDocumentation<HwMEBase> documentation
("The HwMEBase class is the base class for matrix elements in Herwig"
" and provides the virtual members for hard radiation corrections in the"
" shower.");
}
int HwMEBase::nDim() const {
unsigned ndim = 1;
for(unsigned int ix=0;ix<massOption_.size();++ix)
if(massOption_[ix]==2) ++ndim;
return ndim;
}
CrossSection HwMEBase::dSigHatDR() const {
return me2()*jacobian()/(16.0*sqr(Constants::pi)*sHat())*sqr(hbarc);
}
void HwMEBase::setKinematics() {
MEBase::setKinematics();
lastTHat_ = (meMomenta()[0] - meMomenta()[2]).m2();
lastUHat_ = (meMomenta()[1] - meMomenta()[2]).m2();
lastPhi_ = meMomenta()[2].phi();
}
bool HwMEBase::generateMasses(vector<Energy> & masses, double & mjac,
const double *r) {
assert(massOption_.size()+2==mePartonData().size());
mjac = 1.;
masses.clear();
masses.resize(massOption_.size(),ZERO);
Energy ecm = sqrt(sHat());
Energy emin(ZERO);
int noff(0);
for(unsigned int ix=0;ix<massOption_.size();++ix) {
if(massOption_[ix]==1) {
masses[ix] = mePartonData()[ix+2]->hardProcessMass();
emin += masses[ix];
}
else if (massOption_[ix]==2) {
emin += mePartonData()[ix+2]->massMin();
++noff;
}
}
// check allowed
if(emin>ecm) return false;
// if nothing off-shell return
if(noff==0) return true;
int iloc = nDim()-noff;
emin = ecm - emin;
// generate the masses
for(unsigned int ix=0;ix<massOption_.size();++ix) {
if(massOption_[ix]!=2) continue;
Energy mmin = mePartonData()[ix+2]->massMin();
emin += mmin;
Energy mmax = min(mePartonData()[ix+2]->massMax(),emin);
if(mmin>mmax) return false;
tGenericMassGeneratorPtr gen = mePartonData()[ix+2]->massGenerator() ?
dynamic_ptr_cast<tGenericMassGeneratorPtr>(mePartonData()[ix+2]->massGenerator()) :
tGenericMassGeneratorPtr();
if(gen) {
double jtemp(0.);
masses[ix] = gen->mass(jtemp,*mePartonData()[ix+2],mmin,mmax,r[iloc]);
mjac *= jtemp;
}
else {
Energy mon(mePartonData()[ix+2]->hardProcessMass());
Energy width(mePartonData()[ix+2]->width());
double rhomin = atan2((sqr(mmin)-sqr(mon)), mon*width);
double rhomax = atan2((sqr(mmax)-sqr(mon)), mon*width);
masses[ix] = sqrt(mon*width*tan(rhomin+r[iloc]*(rhomax-rhomin))+sqr(mon));
mjac *= (rhomax-rhomin)/Constants::pi;
}
emin -= masses[ix];
if(emin<ZERO) return false;
++iloc;
}
return true;
}
bool HwMEBase::generateKinematics(const double * r) {
jacobian(1.);
vector<Energy> masses;
double mjac(0.);
if(!generateMasses(masses,mjac,r)) return false;
// set up the momenta
for ( int i = 2, N = meMomenta().size(); i < N; ++i ) {
meMomenta()[i] = Lorentz5Momentum(masses[i-2]);
}
double ctmin = -1.0, ctmax = 1.0;
Energy q = ZERO;
try {
q = SimplePhaseSpace::
getMagnitude(sHat(), meMomenta()[2].mass(), meMomenta()[3].mass());
}
catch ( ImpossibleKinematics ) {
return false;
}
Energy e = sqrt(sHat())/2.0;
Energy2 m22 = meMomenta()[2].mass2();
Energy2 m32 = meMomenta()[3].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) + m32);
Energy2 e1e3 = 2.0*e*sqrt(sqr(q) + m32);
Energy2 pq = 2.0*e*q;
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 - m32 - thmin)/pq);
thmin = lastCuts().minTij(mePartonData()[0], mePartonData()[3]);
if ( thmin > ZERO ) ctmin = max(ctmin, (thmin + m32 - 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, sqrt(sqr(q) + m32)*tanh(-ymin3)/q);
if ( ymax3 + ytot < 0.9*Constants::MaxRapidity )
ctmin = max(ctmin, sqrt(sqr(q) + m32)*tanh(-ymax3)/q);
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();
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;
tHat(pq*cth + m22 - e0e2);
uHat(m22 + m32 - sHat() - tHat());
jacobian((pq/sHat())*Constants::pi*jacobian()*mjac);
// compute the rescaled momenta
return rescaleMomenta(meMomenta(),mePartonData());
}
bool HwMEBase::rescaleMomenta(const vector<Lorentz5Momentum> & momenta,
- const cPDVector & data) {
+ const cPDVector & data) {
assert(momenta.size()==4&&data.size()==4);
// default just use the ones we generated
rescaledMomenta_=momenta;
if(rescaleOption_==1) return true;
Energy mnew[2] = {0*MeV, ZERO};
if(rescaleOption_==0) {
mnew[0] = ZERO;
mnew[1] = ZERO;
}
else if(rescaleOption_==2) {
mnew[0] = data[2]->hardProcessMass();
mnew[1] = data[3]->hardProcessMass();
}
else if(rescaleOption_==3) {
if(abs(data[2]->id())!=abs(data[3]->id())) return true;
mnew[0] = 0.5*(momenta[2].mass()+momenta[3].mass());
mnew[1] = mnew[0];
}
else {
assert(false);
}
Lorentz5Momentum pcm(momenta[2]+momenta[3]);
Energy m0=pcm.m();
if(m0<mnew[0]+mnew[1]) return false;
Boost bv = pcm.boostVector();
rescaledMomenta_[2].boost(bv);
rescaledMomenta_[2].setMass(mnew[0]);
rescaledMomenta_[2].setE(0.5*(sqr(m0)+sqr(mnew[0])-sqr(mnew[1]))/m0);
- rescaledMomenta_[2].rescaleRho();
+ if(rescaledMomenta_[2].t()-rescaledMomenta_[2].mass()>1e-10*(rescaledMomenta_[2].t()+rescaledMomenta_[2].mass()))
+ rescaledMomenta_[2].rescaleRho();
+ else {
+ rescaledMomenta_[2].setX(ZERO);
+ rescaledMomenta_[2].setY(ZERO);
+ rescaledMomenta_[2].setZ(ZERO);
+ }
rescaledMomenta_[2].boost(-bv);
rescaledMomenta_[3].boost(bv);
rescaledMomenta_[3].setMass(mnew[1]);
rescaledMomenta_[3].setE(0.5*(sqr(m0)-sqr(mnew[0])+sqr(mnew[1]))/m0);
- rescaledMomenta_[3].rescaleRho();
+ if(rescaledMomenta_[3].t()-rescaledMomenta_[3].mass()>1e-10*(rescaledMomenta_[3].t()+rescaledMomenta_[3].mass()))
+ rescaledMomenta_[3].rescaleRho();
+ else {
+ rescaledMomenta_[3].setX(ZERO);
+ rescaledMomenta_[3].setY(ZERO);
+ rescaledMomenta_[3].setZ(ZERO);
+ }
rescaledMomenta_[3].boost(-bv);
return true;
}
double HwMEBase::getCosTheta(double ctmin, double ctmax, const double r) {
double cth = 0.0;
static const double eps = 1.0e-6;
if ( 1.0 + ctmin <= eps && 1.0 - ctmax <= eps ) {
jacobian(jacobian()*(ctmax - ctmin));
cth = ctmin + r*(ctmax - ctmin);
} else if ( 1.0 + ctmin <= eps ) {
cth = 1.0 - (1.0 - ctmax)*pow((1.0 - ctmin)/(1.0 - ctmax), r);
jacobian(jacobian()*log((1.0 - ctmin)/(1.0 - ctmax))*(1.0 - cth));
} else if ( 1.0 - ctmax <= eps ) {
cth = -1.0 + (1.0 + ctmin)*pow((1.0 + ctmax)/(1.0 + ctmin), r);
jacobian(jacobian()*log((1.0 + ctmax)/(1.0 + ctmin))*(1.0 + cth));
} else {
double zmin = 0.5*(1.0 - ctmax);
double zmax = 0.5*(1.0 - ctmin);
double A1 = -ctmin/(zmax*(1.0-zmax));
double A0 = -ctmax/(zmin*(1.0-zmin));
double A = r*(A1 - A0) + A0;
double z = A < 2.0? 2.0/(sqrt(sqr(A) + 4.0) + 2 - A):
0.5*(A - 2.0 + sqrt(sqr(A) + 4.0))/A;
cth = 1.0 - 2.0*z;
jacobian(jacobian()*2.0*(A1 - A0)*sqr(z)*sqr(1.0 - z)/(sqr(z) + sqr(1.0 - z)));
}
return cth;
}
bool HwMEBase::softMatrixElementVeto(ShowerProgenitorPtr,
ShowerParticlePtr,Branching) {
return false;
}
HardTreePtr HwMEBase::generateHardest(ShowerTreePtr,vector<ShowerInteraction::Type>) {
return HardTreePtr();
}
diff --git a/Tests/Makefile.am b/Tests/Makefile.am
--- a/Tests/Makefile.am
+++ b/Tests/Makefile.am
@@ -1,362 +1,364 @@
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/BFactory{,-Powheg,-Matchbox,-Dipole,-Matchbox-Powheg}-{10.52,10.52-sym,10.54,10.45,10.58-non}.in) \
+ $(shell echo Rivet/BFactory-{Upsilon,Upsilon2,Upsilon4,Tau,10.58-res}.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-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/LHC{,-Matchbox,-Matchbox-Powheg}-8-Top-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,mu-SOPHTY},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-7-{W,Z}Gamma-{e,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-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})
+Rivet-BFactory: $(shell echo Rivet-BFactory{,-Powheg,-Matchbox,-Dipole}-{10.52,10.52-sym,10.54,10.45}) \
+ $(shell echo Rivet-BFactory-{Upsilon,Upsilon2,Upsilon4,Tau,10.58-res,10.58})
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-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})\
$(shell echo Rivet-LHC-8-Top-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,mu-SOPHTY},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})
+ $(shell echo Rivet-LHC{-Matchbox,-Dipole}-{Z-b,Z-bb,W-b,8-Z-jj}) \
+ $(shell echo Rivet-LHC-7-{W,Z}Gamma-{e,mu}) \
rm -rf Rivet-LHC-EW;
python/merge-LHC-EW LHC-{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-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-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/Rivet/BFactory/BFactory-10.58.in b/Tests/Rivet/BFactory/BFactory-10.58-res.in
copy from Tests/Rivet/BFactory/BFactory-10.58.in
copy to Tests/Rivet/BFactory/BFactory-10.58-res.in
--- a/Tests/Rivet/BFactory/BFactory-10.58.in
+++ b/Tests/Rivet/BFactory/BFactory-10.58-res.in
@@ -1,12 +1,11 @@
create ThePEG::LuminosityFunction /Herwig/EventHandlers/BFactoryLuminosity
set /Herwig/EventHandlers/BFactoryLuminosity:BeamEMaxA 3.5*GeV
set /Herwig/EventHandlers/BFactoryLuminosity:BeamEMaxB 8.*GeV
set /Herwig/Generators/EventGenerator:EventHandler:Cuts:MHatMin 9.99
set /Herwig/Particles/e-:PDF /Herwig/Partons/NoPDF
set /Herwig/Particles/e+:PDF /Herwig/Partons/NoPDF
set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction /Herwig/EventHandlers/BFactoryLuminosity
# BELLE charm hadron production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 BELLE_2001_S4598261
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 BABAR_2005_S6181155
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 BABAR_2007_S6895344
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 BABAR_2003_I593379
diff --git a/Tests/Rivet/BFactory/BFactory-10.58.in b/Tests/Rivet/BFactory/BFactory-10.58.in
--- a/Tests/Rivet/BFactory/BFactory-10.58.in
+++ b/Tests/Rivet/BFactory/BFactory-10.58.in
@@ -1,12 +1,9 @@
create ThePEG::LuminosityFunction /Herwig/EventHandlers/BFactoryLuminosity
set /Herwig/EventHandlers/BFactoryLuminosity:BeamEMaxA 3.5*GeV
set /Herwig/EventHandlers/BFactoryLuminosity:BeamEMaxB 8.*GeV
set /Herwig/Generators/EventGenerator:EventHandler:Cuts:MHatMin 9.99
set /Herwig/Particles/e-:PDF /Herwig/Partons/NoPDF
set /Herwig/Particles/e+:PDF /Herwig/Partons/NoPDF
set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction /Herwig/EventHandlers/BFactoryLuminosity
# BELLE charm hadron production
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 BELLE_2001_S4598261
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 BABAR_2005_S6181155
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 BABAR_2007_S6895344
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 BABAR_2003_I593379
diff --git a/Tests/Rivet/LHC/LHC-7-UE.in b/Tests/Rivet/LHC/LHC-7-UE.in
--- a/Tests/Rivet/LHC/LHC-7-UE.in
+++ b/Tests/Rivet/LHC/LHC-7-UE.in
@@ -1,81 +1,83 @@
##################################################
# select the analyses
##################################################
# ATLAS jet shapes
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S8924791
# ATLAS jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8817804
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1082936
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S8994773
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8894728
# ATLAS fragmentation function
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_CONF_2010_049
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8918562
# ALICE charged particles
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2010_S8625980
# CMS particle spectra
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S8978280
# CMS charged particle multiplicity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S8884919
# CMS charged particle pT and rapidity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2010_S8656010
# CMS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S9120041
# ATLAS track jet
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I919017
# LHCB phi production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2011_I919315
# ATLAS phi production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1282441
# LHCB promt hadron productiom
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2012_I1119400
# ATLAS rap gap
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1084540
# CMS forward energy flow
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S9215166
# CMS charged particle rapidity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_QCD_10_024
# LHC K0s/Lambda
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2011_I917009
# TOTEM at large rapidity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 TOTEM_2012_I1115294
# ATLAS Azimuthal ordering of charged hadrons
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1091481
# ALICE single/double diffractive and inelastic sigma
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2012_I1181770
# ATLAS inelastic cross section
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I894867
# CMS inelastic cross section
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I1193338
# total transverse energy
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1183818
# underlying event forward rapidities
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1218372
# strange particles in underlying event
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_PAS_QCD_11_010
# CMS central and forward jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I1087342
# CMS dijet
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I1184941
# ATLAS charged particle in min bias
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1125575
# ATLAS two particle correlation
#insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1094061
# ATLAS correlations
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1093734
# LHCB energy flow
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2013_I1208105
# ATLAS charged particle event shapes
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1124167
# CMS Jet/UE properties
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1261026
# ATLAS leading jet UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1298811
# LHCB charged particles in min bias
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2014_I1281685
# ALICE identified particle spectra
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2015_I1357424
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2014_I1300380
\ No newline at end of file
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2014_I1300380
+# LHCB min bias
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2015_I1333223
diff --git a/Tests/Rivet/LHC/LHC-7-WGamma-e.in b/Tests/Rivet/LHC/LHC-7-WGamma-e.in
new file mode 100644
--- /dev/null
+++ b/Tests/Rivet/LHC/LHC-7-WGamma-e.in
@@ -0,0 +1,3 @@
+# ATLAS W Gamma analysis
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_W
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_W_EL
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-7-WGamma-mu.in b/Tests/Rivet/LHC/LHC-7-WGamma-mu.in
new file mode 100644
--- /dev/null
+++ b/Tests/Rivet/LHC/LHC-7-WGamma-mu.in
@@ -0,0 +1,2 @@
+# ATLAS W Gamma analysis
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_W_MU
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-7-ZGamma-e.in b/Tests/Rivet/LHC/LHC-7-ZGamma-e.in
new file mode 100644
--- /dev/null
+++ b/Tests/Rivet/LHC/LHC-7-ZGamma-e.in
@@ -0,0 +1,3 @@
+# ATLAS Z Gamma analysis
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_Z
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_Z_EL
diff --git a/Tests/Rivet/LHC/LHC-7-ZGamma-mu.in b/Tests/Rivet/LHC/LHC-7-ZGamma-mu.in
new file mode 100644
--- /dev/null
+++ b/Tests/Rivet/LHC/LHC-7-ZGamma-mu.in
@@ -0,0 +1,2 @@
+# ATLAS Z Gamma analysis
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_Z_MU
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,1356 +1,1374 @@
#! /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"
+ if(parameterName=="10.58-res") :
+ 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\nset /Herwig/MatrixElements/SimpleEE:MatrixElements 0 /Herwig/MatrixElements/MEUpsilon"
+ elif(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\n"
+ process += "set /Herwig/MatrixElements/MEee2gZ2qq:MaximumFlavour 4\n"
+ else :
+ process += "set /Herwig/MatrixElements/MEee2gZ2qq:MaximumFlavour 4\n"
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"
+ process = "set /Herwig/MatrixElements/PowhegMEee2gZ2qq:MaximumFlavour 4\n"
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"
+ 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\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-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-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("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("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("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")
+ elif(parameterName.find("WGamma")>=0) :
+ process+="insert SimpleQCD:MatrixElements[0] MEPP2VGamma\nset MEPP2VGamma:Process 1\nset MEPP2VGamma:MassOption 1\n"
+ process+="set /Herwig/Cuts/PhotonKtCut:MinKT 10.\n"
+ process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
+ process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
+ if(parameterName.find("-e")>=0) :
+ process+="do /Herwig/Particles/W+:SelectDecayModes W+->nu_e,e+;\n"
+ else :
+ process+="do /Herwig/Particles/W+:SelectDecayModes W+->nu_mu,mu+;\n"
+ elif(parameterName.find("ZGamma")>=0) :
+ process+="insert SimpleQCD:MatrixElements[0] MEPP2VGamma\nset MEPP2VGamma:Process 2\n"
+ process+="set /Herwig/Cuts/PhotonKtCut:MinKT 10.\n"
+ process+="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
+ process+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
+ if(parameterName.find("-e")>=0) :
+ process+="do /Herwig/Particles/Z0:SelectDecayModes Z0->e-,e+;\n"
+ else :
+ process+="do /Herwig/Particles/Z0:SelectDecayModes Z0->mu-,mu+;\n"
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("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("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("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\n"
process += "do Factory:Process p p e+ nu b bbar\ndo Factory:Process p p e- nu b bbar\n"
process += "do Factory:Process p p mu+ nu b bbar\ndo Factory:Process p p mu- 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)
# LHC-GammaGamma
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-BFactory b/Tests/python/merge-BFactory
--- a/Tests/python/merge-BFactory
+++ b/Tests/python/merge-BFactory
@@ -1,211 +1,212 @@
#! /usr/bin/env python
import logging
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda
# #############################################
def fillAbove(desthisto, sourcehistosbysqrts):
for sqrts, h in sorted(sourcehistosbysqrts.iteritems()) :
for i in range(0,h.numPoints) :
if(h.points[i].x-0.01<sqrts and
h.points[i].x+0.01>sqrts) :
desthisto.addPoint(h.points[i])
def merge(hpath):
global inhistos
global outhistos
try:
fillAbove(outhistos[hpath], inhistos[hpath])
except:
logging.error("Unknown analysis object" + hpath)
sys.exit(1)
def useOne(hpath, sqrts):
global inhistos
global outhistos
try:
outhistos[hpath] = inhistos[hpath][float(sqrts)]
except:
pass
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
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)
# #######################################
-yodafiles=["-10.52.yoda","-10.52-sym.yoda","-10.54.yoda","-10.58.yoda","-Upsilon.yoda",
+yodafiles=["-10.52.yoda","-10.52-sym.yoda","-10.54.yoda",
+ "-10.58-res.yoda","-10.58.yoda","-Upsilon.yoda",
"-Upsilon2.yoda","-Upsilon4.yoda","-10.45.yoda","-Tau.yoda"]
## Get histos
inhistos = {}
outhistos={}
weights = {}
for f in yodafiles:
file = args[0]+f
if(file.find("10.45")>0) :
sqrts=10.45
elif(file.find("10.52")>0) :
sqrts=10.52
elif(file.find("10.54")>0) :
sqrts=10.54
elif(file.find("10.58")>0) :
sqrts=10.58
elif(file.find("Tau")>0) :
sqrts=10.58
elif(file.find("Upsilon4")>0) :
sqrts=10.58
elif(file.find("Upsilon2")>0) :
sqrts=10.02
elif(file.find("Upsilon")>0) :
sqrts=9.46
if not os.access(file, os.R_OK):
if(file.find("Upsilon")>=0 or file.find("Tau")>=0) : continue
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as yoda" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
# jet shapes
if(aopath.find("6265367")>0 or aopath.find("6895344")>0 or
aopath.find("6181155")>0 or aopath.find("2789213")>0 or
aopath.find("2669951")>0) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
tmpE = inhistos[aopath]
sqrttemp=sqrts
if(aopath.find("2669951")>0 and aopath.find("d01")>0 and
sqrts==10.45) :
sqrts=9.9
if not tmpE.has_key(sqrts):
tmpE[sqrts] = ao
else:
- raise Exception("A set with sqrts = %s already exists" % ( sqrts))
+ raise Exception("A set with sqrts = %s already exists" % ( sqrts))
sqrts=sqrttemp
else :
outhistos[aopath] = ao
## Make empty output histos if needed
for hpath,hsets in inhistos.iteritems():
if( hpath.find("2669951")>0) :
if(type(hsets.values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].path,hsets.values()[0].title)
else :
outhistos[hpath] = hsets.values()[0]
# BELLE
useOne("/BELLE_2006_S6265367/d01-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y03","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y04","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y05","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y06","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y07","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y08","10.52")
useOne("/BELLE_2006_S6265367/d02-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d02-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d03-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d03-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d04-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d04-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d05-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d05-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d06-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d06-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d07-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d07-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d08-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d08-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d09-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d09-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d10-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d10-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d11-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d11-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d12-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d12-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d13-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d13-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d14-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d14-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d15-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d15-x01-y02","10.58")
# BABAR
useOne("/BABAR_2007_S6895344/d01-x01-y01","10.54")
useOne("/BABAR_2007_S6895344/d02-x01-y01","10.54")
useOne("/BABAR_2007_S6895344/d03-x01-y01","10.58")
useOne("/BABAR_2007_S6895344/d04-x01-y01","10.58")
# BABAR
useOne("/BABAR_2005_S6181155/d01-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d02-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d02-x01-y02","10.54")
useOne("/BABAR_2005_S6181155/d03-x01-y01","10.54")
useOne("/BABAR_2005_S6181155/d04-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d05-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d05-x01-y02","10.54")
# ARGUS
useOne("/ARGUS_1993_S2789213/d01-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y02","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y03","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y04","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y05","10.45")
useOne("/ARGUS_1993_S2789213/d02-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d02-x01-y02", "9.46")
useOne("/ARGUS_1993_S2789213/d02-x01-y03", "9.46")
useOne("/ARGUS_1993_S2789213/d02-x01-y04", "9.46")
useOne("/ARGUS_1993_S2789213/d02-x01-y05", "9.46")
useOne("/ARGUS_1993_S2789213/d03-x01-y01","10.58")
useOne("/ARGUS_1993_S2789213/d03-x01-y02","10.58")
useOne("/ARGUS_1993_S2789213/d03-x01-y03","10.58")
useOne("/ARGUS_1993_S2789213/d03-x01-y04","10.58")
useOne("/ARGUS_1993_S2789213/d03-x01-y05","10.58")
useOne("/ARGUS_1993_S2789213/d04-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d05-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d06-x01-y01","10.58")
useOne("/ARGUS_1993_S2789213/d07-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d08-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d09-x01-y01","10.58")
useOne("/ARGUS_1993_S2789213/d10-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d11-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d12-x01-y01","10.58")
useOne("/ARGUS_1993_S2789213/d13-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d14-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d15-x01-y01","10.58")
useOne("/ARGUS_1993_S2669951/d02-x01-y01","10.45")
useOne("/ARGUS_1993_S2669951/d03-x01-y01","9.46")
useOne("/ARGUS_1993_S2669951/d04-x01-y01","10.02")
merge("/ARGUS_1993_S2669951/d01-x01-y01")
merge("/ARGUS_1993_S2669951/d01-x01-y02")
merge("/ARGUS_1993_S2669951/d05-x01-y01")
# Choose output file
name = args[0]+".yoda"
# output the yoda file
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/src/Matchbox/MCatNLO-Default-HardAlphaSTune.in b/src/Matchbox/MCatNLO-Default-HardAlphaSTune.in
--- a/src/Matchbox/MCatNLO-Default-HardAlphaSTune.in
+++ b/src/Matchbox/MCatNLO-Default-HardAlphaSTune.in
@@ -1,38 +1,38 @@
# tune where the world average perutbative alphaS is used for the hard me
# and matching and the shower alpha_S tuned seperately
# shower
set /Herwig/Shower/QtoQGSudakov:pTmin 1.63
set /Herwig/Shower/GtoGGSudakov:pTmin 1.63
set /Herwig/Shower/GtoQQbarSudakov:pTmin 1.63
set /Herwig/Shower/GtobbbarSudakov:pTmin 1.63
set /Herwig/Shower/GtoccbarSudakov:pTmin 1.63
set /Herwig/Shower/QtoGQSudakov:pTmin 1.63
set /Herwig/Shower/utoGuSudakov:pTmin 1.63
set /Herwig/Shower/dtoGdSudakov:pTmin 1.63
set /Herwig/Shower/AlphaQCD:AlphaMZ 0.135
# hadronization
set /Herwig/Hadronization/ClusterFissioner:ClMaxLight 3.46*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowLight 2.71
set /Herwig/Hadronization/ClusterFissioner:PSplitLight 0.82
set /Herwig/Hadronization/ClusterDecayer:ClDirLight 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrLight 0.78
set /Herwig/Hadronization/HadronSelector:PwtSquark 0.64
set /Herwig/Hadronization/HadronSelector:PwtDIquark 0.43
set /Herwig/Hadronization/ClusterFissioner:ClMaxCharm 3.57*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowCharm 2.32
set /Herwig/Hadronization/ClusterFissioner:PSplitCharm 1.22
set /Herwig/Hadronization/ClusterDecayer:ClDirCharm 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrCharm 0.
-set /Herwig/Hadronization/LightClusterDecayer:SingleHadronLimitCharm 0.0
+set /Herwig/Hadronization/HadronSelector:SingleHadronLimitCharm 0.0
set /Herwig/Hadronization/ClusterFissioner:ClMaxBottom 5.04*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowBottom 0.84
set /Herwig/Hadronization/ClusterFissioner:PSplitBottom 0.79
set /Herwig/Hadronization/ClusterDecayer:ClDirBottom 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrBottom 0.
-set /Herwig/Hadronization/LightClusterDecayer:SingleHadronLimitBottom 0.33
+set /Herwig/Hadronization/HadronSelector:SingleHadronLimitBottom 0.33
diff --git a/src/Matchbox/MCatNLO-Default-ShowerAlphaSTune.in b/src/Matchbox/MCatNLO-Default-ShowerAlphaSTune.in
--- a/src/Matchbox/MCatNLO-Default-ShowerAlphaSTune.in
+++ b/src/Matchbox/MCatNLO-Default-ShowerAlphaSTune.in
@@ -1,40 +1,40 @@
# tune wherre the alphaS used for the hard me
# and matching and the shower alpha_S are the same
# shower
set /Herwig/Shower/QtoQGSudakov:pTmin 1.45
set /Herwig/Shower/GtoGGSudakov:pTmin 1.45
set /Herwig/Shower/GtoQQbarSudakov:pTmin 1.45
set /Herwig/Shower/GtobbbarSudakov:pTmin 1.45
set /Herwig/Shower/GtoccbarSudakov:pTmin 1.45
set /Herwig/Shower/QtoGQSudakov:pTmin 1.45
set /Herwig/Shower/utoGuSudakov:pTmin 1.45
set /Herwig/Shower/dtoGdSudakov:pTmin 1.45
set /Herwig/Shower/AlphaQCD:AlphaMZ 0.132
set /Herwig/Couplings/NLOAlphaS:input_alpha_s 0.132
set /Herwig/Couplings/NLOAlphaS:input_scale 91.18*GeV
# hadronization
set /Herwig/Hadronization/ClusterFissioner:ClMaxLight 4.02*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowLight 2.14
set /Herwig/Hadronization/ClusterFissioner:PSplitLight 0.81
set /Herwig/Hadronization/ClusterDecayer:ClDirLight 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrLight 0.78
set /Herwig/Hadronization/HadronSelector:PwtSquark 0.59
set /Herwig/Hadronization/HadronSelector:PwtDIquark 0.29
set /Herwig/Hadronization/ClusterFissioner:ClMaxCharm 3.70*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowCharm 2.35
set /Herwig/Hadronization/ClusterFissioner:PSplitCharm 1.19
set /Herwig/Hadronization/ClusterDecayer:ClDirCharm 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrCharm 0.
-set /Herwig/Hadronization/LightClusterDecayer:SingleHadronLimitCharm 0.0
+set /Herwig/Hadronization/HadronSelector:SingleHadronLimitCharm 0.0
set /Herwig/Hadronization/ClusterFissioner:ClMaxBottom 6.24*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowBottom 0.74
set /Herwig/Hadronization/ClusterFissioner:PSplitBottom 0.85
set /Herwig/Hadronization/ClusterDecayer:ClDirBottom 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrBottom 0.
-set /Herwig/Hadronization/LightClusterDecayer:SingleHadronLimitBottom 0.12
+set /Herwig/Hadronization/HadronSelector:SingleHadronLimitBottom 0.12
diff --git a/src/Matchbox/MCatNLO-Dipole-HardAlphaSTune.in b/src/Matchbox/MCatNLO-Dipole-HardAlphaSTune.in
--- a/src/Matchbox/MCatNLO-Dipole-HardAlphaSTune.in
+++ b/src/Matchbox/MCatNLO-Dipole-HardAlphaSTune.in
@@ -1,115 +1,115 @@
# -*- ThePEG-repository -*-
# tune where the world average perutbative alphaS is used for the hard me
# and matching and the shower alpha_S tuned seperately
##################################################
## special scale choices
##################################################
cd /Herwig/DipoleShower/Kernels
set FFgx2ddxDipoleKernel:VirtualitySplittingScale Yes
set FFgx2uuxDipoleKernel:VirtualitySplittingScale Yes
set FFgx2ccxDipoleKernel:VirtualitySplittingScale Yes
set FFgx2ssxDipoleKernel:VirtualitySplittingScale Yes
set FFgx2bbxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2ddxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2uuxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2ccxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2ssxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2bbxDipoleKernel:VirtualitySplittingScale Yes
set IFgx2ggxDipoleKernel:VirtualitySplittingScale Yes
set IFqx2gqxDipoleKernel:VirtualitySplittingScale Yes
set IIgx2ggxDipoleKernel:VirtualitySplittingScale Yes
set IIqx2gqxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2ddxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2uuxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2ccxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2ssxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2bbxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2ddxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2uuxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2ccxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2ssxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2bbxDipoleKernel:VirtualitySplittingScale Yes
# set IFMgx2ggxDipoleKernel:VirtualitySplittingScale Yes
# set IFMqx2gqxDipoleKernel:VirtualitySplittingScale Yes
##################################################
## intrinsic pt
##################################################
set /Herwig/DipoleShower/IntrinsicPtGenerator:ValenceIntrinsicPtScale 2.0*GeV
set /Herwig/DipoleShower/IntrinsicPtGenerator:SeaIntrinsicPtScale 2.0*GeV
##################################################
## Dipole shower tune settings
##################################################
set /Herwig/Particles/g:ConstituentMass 0.7899848*GeV
##################################################
## (two-loop) alpha_s
##################################################
set /Herwig/DipoleShower/NLOAlphaS:input_alpha_s 0.125
set /Herwig/DipoleShower/NLOAlphaS:input_scale 91.18*GeV
##################################################
## cutoffs
##################################################
set /Herwig/DipoleShower/Kinematics/FFLightKinematics:IRCutoff 0.45*GeV
set /Herwig/DipoleShower/Kinematics/FFMassiveKinematics:IRCutoff 0.45*GeV
set /Herwig/DipoleShower/Kinematics/FILightKinematics:IRCutoff 0.45*GeV
set /Herwig/DipoleShower/Kinematics/FIMassiveKinematics:IRCutoff 0.45*GeV
set /Herwig/DipoleShower/Kinematics/IFLightKinematics:IRCutoff 0.45*GeV
set /Herwig/DipoleShower/Kinematics/IFMassiveKinematics:IRCutoff 0.45*GeV
set /Herwig/DipoleShower/Kinematics/IILightKinematics:IRCutoff 0.45*GeV
## needs to be synchronized with settings above
set /Herwig/MatrixElements/Matchbox/DipoleMatching:FFPtCut 0.45*GeV
set /Herwig/MatrixElements/Matchbox/DipoleMatching:FIPtCut 0.45*GeV
set /Herwig/MatrixElements/Matchbox/DipoleMatching:IIPtCut 0.45*GeV
##################################################
## hadronization parameters -- complete?
##################################################
cd /Herwig/Hadronization
set ClusterFissioner:ClMaxLight 3.30
set ClusterFissioner:ClPowLight 2.50
set ClusterFissioner:PSplitLight 1.29
set ClusterDecayer:ClDirLight 1
set ClusterDecayer:ClSmrLight 3.118342
set ClusterFissioner:ClMaxCharm 3.11*GeV
set ClusterFissioner:ClPowCharm 1.62
set ClusterFissioner:PSplitCharm 2.54
set ClusterDecayer:ClDirCharm 1
set ClusterDecayer:ClSmrCharm 0.
-set LightClusterDecayer:SingleHadronLimitCharm 0.0
+set HadronSelector:SingleHadronLimitCharm 0.0
set ClusterFissioner:ClMaxBottom 1.38*GeV
set ClusterFissioner:ClPowBottom 0.62
set ClusterFissioner:PSplitBottom 0.20
set ClusterDecayer:ClDirBottom 1
set ClusterDecayer:ClSmrBottom 0.
-set LightClusterDecayer:SingleHadronLimitBottom 0.12
+set HadronSelector:SingleHadronLimitBottom 0.12
set HadronSelector:PwtUquark 1.0
set HadronSelector:PwtDquark 1.0
set HadronSelector:PwtSquark 1.09
set HadronSelector:PwtCquark 1.0
set HadronSelector:PwtBquark 1.0
set HadronSelector:PwtDIquark 0.66
set HadronSelector:SngWt 1.0
set HadronSelector:DecWt 1.0
cd /
diff --git a/src/Matchbox/MCatNLO-Dipole-ShowerAlphaSTune.in b/src/Matchbox/MCatNLO-Dipole-ShowerAlphaSTune.in
--- a/src/Matchbox/MCatNLO-Dipole-ShowerAlphaSTune.in
+++ b/src/Matchbox/MCatNLO-Dipole-ShowerAlphaSTune.in
@@ -1,117 +1,117 @@
# -*- ThePEG-repository -*-
# tune wherre the alphaS used for the hard me
# and matching and the shower alpha_S are the same
##################################################
## special scale choices
##################################################
cd /Herwig/DipoleShower/Kernels
set FFgx2ddxDipoleKernel:VirtualitySplittingScale Yes
set FFgx2uuxDipoleKernel:VirtualitySplittingScale Yes
set FFgx2ccxDipoleKernel:VirtualitySplittingScale Yes
set FFgx2ssxDipoleKernel:VirtualitySplittingScale Yes
set FFgx2bbxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2ddxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2uuxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2ccxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2ssxDipoleKernel:VirtualitySplittingScale Yes
set FIgx2bbxDipoleKernel:VirtualitySplittingScale Yes
set IFgx2ggxDipoleKernel:VirtualitySplittingScale Yes
set IFqx2gqxDipoleKernel:VirtualitySplittingScale Yes
set IIgx2ggxDipoleKernel:VirtualitySplittingScale Yes
set IIqx2gqxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2ddxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2uuxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2ccxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2ssxDipoleKernel:VirtualitySplittingScale Yes
set FFMgx2bbxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2ddxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2uuxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2ccxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2ssxDipoleKernel:VirtualitySplittingScale Yes
# set FIMgx2bbxDipoleKernel:VirtualitySplittingScale Yes
# set IFMgx2ggxDipoleKernel:VirtualitySplittingScale Yes
# set IFMqx2gqxDipoleKernel:VirtualitySplittingScale Yes
##################################################
## intrinsic pt
##################################################
set /Herwig/DipoleShower/IntrinsicPtGenerator:ValenceIntrinsicPtScale 2.0*GeV
set /Herwig/DipoleShower/IntrinsicPtGenerator:SeaIntrinsicPtScale 2.0*GeV
##################################################
## Dipole shower tune settings
##################################################
set /Herwig/Particles/g:ConstituentMass 0.7899848*GeV
##################################################
## (two-loop) alpha_s
##################################################
set /Herwig/DipoleShower/NLOAlphaS:input_alpha_s 0.139
set /Herwig/DipoleShower/NLOAlphaS:input_scale 91.18*GeV
set /Herwig/Couplings/NLOAlphaS:input_alpha_s 0.139
set /Herwig/Couplings/NLOAlphaS:input_scale 91.18*GeV
##################################################
## cutoffs
##################################################
set /Herwig/DipoleShower/Kinematics/FFLightKinematics:IRCutoff 1.12*GeV
set /Herwig/DipoleShower/Kinematics/FFMassiveKinematics:IRCutoff 1.12*GeV
set /Herwig/DipoleShower/Kinematics/FILightKinematics:IRCutoff 1.12*GeV
set /Herwig/DipoleShower/Kinematics/FIMassiveKinematics:IRCutoff 1.12*GeV
set /Herwig/DipoleShower/Kinematics/IFLightKinematics:IRCutoff 1.12*GeV
set /Herwig/DipoleShower/Kinematics/IFMassiveKinematics:IRCutoff 1.12*GeV
set /Herwig/DipoleShower/Kinematics/IILightKinematics:IRCutoff 1.12*GeV
## needs to be synchronized with settings above
set /Herwig/MatrixElements/Matchbox/DipoleMatching:FFPtCut 1.12*GeV
set /Herwig/MatrixElements/Matchbox/DipoleMatching:FIPtCut 1.12*GeV
set /Herwig/MatrixElements/Matchbox/DipoleMatching:IIPtCut 1.12*GeV
##################################################
## hadronization parameters -- complete?
##################################################
cd /Herwig/Hadronization
set ClusterFissioner:ClMaxLight 3.03
set ClusterFissioner:ClPowLight 0.92
set ClusterFissioner:PSplitLight 0.57
set ClusterDecayer:ClDirLight 1
set ClusterDecayer:ClSmrLight 3.118342
set ClusterFissioner:ClMaxCharm 3.58*GeV
set ClusterFissioner:ClPowCharm 2.36
set ClusterFissioner:PSplitCharm 1.08
set ClusterDecayer:ClDirCharm 1
set ClusterDecayer:ClSmrCharm 0.
-set LightClusterDecayer:SingleHadronLimitCharm 0.0
+set HadronSelector:SingleHadronLimitCharm 0.0
set ClusterFissioner:ClMaxBottom 2.03*GeV
set ClusterFissioner:ClPowBottom 0.67
set ClusterFissioner:PSplitBottom 0.01
set ClusterDecayer:ClDirBottom 1
set ClusterDecayer:ClSmrBottom 0.
-set LightClusterDecayer:SingleHadronLimitBottom 0.12
+set HadronSelector:SingleHadronLimitBottom 0.12
set HadronSelector:PwtUquark 1.0
set HadronSelector:PwtDquark 1.0
set HadronSelector:PwtSquark 0.61
set HadronSelector:PwtCquark 1.0
set HadronSelector:PwtBquark 1.0
set HadronSelector:PwtDIquark 0.46
set HadronSelector:SngWt 1.0
set HadronSelector:DecWt 1.0
cd /
diff --git a/src/Matchbox/Powheg-Default-HardAlphaSTune.in b/src/Matchbox/Powheg-Default-HardAlphaSTune.in
--- a/src/Matchbox/Powheg-Default-HardAlphaSTune.in
+++ b/src/Matchbox/Powheg-Default-HardAlphaSTune.in
@@ -1,37 +1,38 @@
# tune where the world average perutbative alphaS is used for the hard me
# and matching and the shower alpha_S tuned seperately
# shower
set /Herwig/Shower/QtoQGSudakov:pTmin 1.78
set /Herwig/Shower/GtoGGSudakov:pTmin 1.78
set /Herwig/Shower/GtoQQbarSudakov:pTmin 1.78
set /Herwig/Shower/GtobbbarSudakov:pTmin 1.78
set /Herwig/Shower/GtoccbarSudakov:pTmin 1.78
set /Herwig/Shower/QtoGQSudakov:pTmin 1.78
set /Herwig/Shower/utoGuSudakov:pTmin 1.78
set /Herwig/Shower/dtoGdSudakov:pTmin 1.78
set /Herwig/Shower/AlphaQCD:AlphaMZ 0.136
# hadronization
set /Herwig/Hadronization/ClusterFissioner:ClMaxLight 3.57*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowLight 1.97
set /Herwig/Hadronization/ClusterFissioner:PSplitLight 0.93
set /Herwig/Hadronization/ClusterDecayer:ClDirLight 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrLight 0.78
set /Herwig/Hadronization/HadronSelector:PwtSquark 0.53
set /Herwig/Hadronization/HadronSelector:PwtDIquark 0.26
set /Herwig/Hadronization/ClusterFissioner:ClMaxCharm 3.95*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowCharm 2.10
set /Herwig/Hadronization/ClusterFissioner:PSplitCharm 1.19
set /Herwig/Hadronization/ClusterDecayer:ClDirCharm 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrCharm 0.
-set /Herwig/Hadronization/LightClusterDecayer:SingleHadronLimitCharm 0.0
+set /Herwig/Hadronization/HadronSelector:SingleHadronLimitCharm 0.0
set /Herwig/Hadronization/ClusterFissioner:ClMaxBottom 4.79*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowBottom 0.77
set /Herwig/Hadronization/ClusterFissioner:PSplitBottom 0.44
set /Herwig/Hadronization/ClusterDecayer:ClDirBottom 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrBottom 0.
-set /Herwig/Hadronization/LightClusterDecayer:SingleHadronLimitBottom 0.
+set /Herwig/Hadronization/HadronSelector:SingleHadronLimitBottom 0.
+
diff --git a/src/Matchbox/Powheg-Default-ShowerAlphaSTune.in b/src/Matchbox/Powheg-Default-ShowerAlphaSTune.in
--- a/src/Matchbox/Powheg-Default-ShowerAlphaSTune.in
+++ b/src/Matchbox/Powheg-Default-ShowerAlphaSTune.in
@@ -1,40 +1,40 @@
# tune wherre the alphaS used for the hard me
# and matching and the shower alpha_S are the same
# shower
set /Herwig/Shower/QtoQGSudakov:pTmin 1.36
set /Herwig/Shower/GtoGGSudakov:pTmin 1.36
set /Herwig/Shower/GtoQQbarSudakov:pTmin 1.36
set /Herwig/Shower/GtobbbarSudakov:pTmin 1.36
set /Herwig/Shower/GtoccbarSudakov:pTmin 1.36
set /Herwig/Shower/QtoGQSudakov:pTmin 1.36
set /Herwig/Shower/utoGuSudakov:pTmin 1.36
set /Herwig/Shower/dtoGdSudakov:pTmin 1.36
set /Herwig/Shower/AlphaQCD:AlphaMZ 0.124
set /Herwig/Couplings/NLOAlphaS:input_alpha_s 0.124
set /Herwig/Couplings/NLOAlphaS:input_scale 91.18*GeV
# hadronization
set /Herwig/Hadronization/ClusterFissioner:ClMaxLight 3.71*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowLight 2.44
set /Herwig/Hadronization/ClusterFissioner:PSplitLight 0.88
set /Herwig/Hadronization/ClusterDecayer:ClDirLight 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrLight 0.78
set /Herwig/Hadronization/HadronSelector:PwtSquark 0.55
set /Herwig/Hadronization/HadronSelector:PwtDIquark 0.36
set /Herwig/Hadronization/ClusterFissioner:ClMaxCharm 3.56*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowCharm 2.10
set /Herwig/Hadronization/ClusterFissioner:PSplitCharm 1.30
set /Herwig/Hadronization/ClusterDecayer:ClDirCharm 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrCharm 0.
-set /Herwig/Hadronization/LightClusterDecayer:SingleHadronLimitCharm 0.0
+set /Herwig/Hadronization/HadronSelector:SingleHadronLimitCharm 0.0
set /Herwig/Hadronization/ClusterFissioner:ClMaxBottom 5.60*GeV
set /Herwig/Hadronization/ClusterFissioner:ClPowBottom 1.01
set /Herwig/Hadronization/ClusterFissioner:PSplitBottom 0.31
set /Herwig/Hadronization/ClusterDecayer:ClDirBottom 1
set /Herwig/Hadronization/ClusterDecayer:ClSmrBottom 0.
-set /Herwig/Hadronization/LightClusterDecayer:SingleHadronLimitBottom 0.12
+set /Herwig/Hadronization/HadronSelector:SingleHadronLimitBottom 0.12
diff --git a/src/defaults/Hadronization.in b/src/defaults/Hadronization.in
--- a/src/defaults/Hadronization.in
+++ b/src/defaults/Hadronization.in
@@ -1,104 +1,103 @@
# -*- ThePEG-repository -*-
############################################################
# Setup of default hadronization
#
# There are no user servicable parts inside.
#
# Anything that follows below should only be touched if you
# know what you're doing.
#############################################################
cd /Herwig/Particles
create ThePEG::ParticleData Cluster
setup Cluster 81 Cluster 0.00990 0.0 0.0 0.0 0 0 0 1
create ThePEG::ParticleData Remnant
setup Remnant 82 Remnant 0.00990 0.0 0.0 0.0 0 0 0 1
mkdir /Herwig/Hadronization
cd /Herwig/Hadronization
create Herwig::ClusterHadronizationHandler ClusterHadHandler
create Herwig::PartonSplitter PartonSplitter
create Herwig::ClusterFinder ClusterFinder
create Herwig::ColourReconnector ColourReconnector
create Herwig::ClusterFissioner ClusterFissioner
create Herwig::LightClusterDecayer LightClusterDecayer
create Herwig::ClusterDecayer ClusterDecayer
create Herwig::HwppSelector HadronSelector
newdef ClusterHadHandler:PartonSplitter PartonSplitter
newdef ClusterHadHandler:ClusterFinder ClusterFinder
newdef ClusterHadHandler:ColourReconnector ColourReconnector
newdef ClusterHadHandler:ClusterFissioner ClusterFissioner
newdef ClusterHadHandler:LightClusterDecayer LightClusterDecayer
newdef ClusterHadHandler:ClusterDecayer ClusterDecayer
newdef ClusterHadHandler:MinVirtuality2 0.1*GeV2
newdef ClusterHadHandler:MaxDisplacement 1.0e-10*millimeter
newdef ClusterHadHandler:UnderlyingEventHandler NULL
##################################################
# The UA5 soft underlying event model
# (disabled by default)
##################################################
create Herwig::UA5Handler UA5 HwUA5.so
newdef UA5:ClusterFissioner ClusterFissioner
newdef UA5:ClusterDecayer ClusterDecayer
#set ClusterHadHandler:UnderlyingEventHandler UA5
##################################################
newdef ClusterFissioner:HadronSelector HadronSelector
newdef LightClusterDecayer:HadronSelector HadronSelector
newdef ClusterDecayer:HadronSelector HadronSelector
newdef ColourReconnector:ColourReconnection Yes
newdef ColourReconnector:ReconnectionProbability 0.4276
newdef ColourReconnector:Algorithm Plain
newdef ColourReconnector:InitialTemperature 0.01
newdef ColourReconnector:AnnealingFactor 0.21
newdef ColourReconnector:AnnealingSteps 10
newdef ColourReconnector:TriesPerStepFactor 0.66
# Clustering parameters for light quarks
newdef ClusterFissioner:ClMaxLight 3.26*GeV
newdef ClusterFissioner:ClPowLight 1.61
newdef ClusterFissioner:PSplitLight 0.81
newdef ClusterDecayer:ClDirLight 1
newdef ClusterDecayer:ClSmrLight 0.78
# Clustering parameters for b-quarks
newdef ClusterFissioner:ClMaxBottom 3.75*GeV
newdef ClusterFissioner:ClPowBottom 0.70
newdef ClusterFissioner:PSplitBottom 0.92
newdef ClusterDecayer:ClDirBottom 1
newdef ClusterDecayer:ClSmrBottom 0.00
-newdef LightClusterDecayer:SingleHadronLimitBottom 0.34
+newdef HadronSelector:SingleHadronLimitBottom 0.34
# Clustering parameters for c-quarks
newdef ClusterFissioner:ClMaxCharm 3.55*GeV
newdef ClusterFissioner:ClPowCharm 2.11
newdef ClusterFissioner:PSplitCharm 1.20
newdef ClusterDecayer:ClDirCharm 1
newdef ClusterDecayer:ClSmrCharm 0.
-newdef LightClusterDecayer:SingleHadronLimitCharm 0.0
+newdef HadronSelector:SingleHadronLimitCharm 0.0
# Clustering parameters for exotic quarks
# (e.g. hadronizing Susy particles)
newdef ClusterFissioner:ClMaxExotic 2.7*GeV
newdef ClusterFissioner:ClPowExotic 1.46
newdef ClusterFissioner:PSplitExotic 1.00
newdef ClusterDecayer:ClDirExotic 1
newdef ClusterDecayer:ClSmrExotic 0.78
-newdef LightClusterDecayer:SingleHadronLimitExotic 0.1
+newdef HadronSelector:SingleHadronLimitExotic 0.1
#
newdef HadronSelector:PwtDquark 1.0
newdef HadronSelector:PwtUquark 1.0
newdef HadronSelector:PwtSquark 0.58
newdef HadronSelector:PwtCquark 1.0
newdef HadronSelector:PwtBquark 1.0
newdef HadronSelector:PwtDIquark 0.38
newdef HadronSelector:SngWt 0.74
newdef HadronSelector:DecWt 0.62
newdef HadronSelector:Mode 1
-
diff --git a/src/defaults/Makefile.am b/src/defaults/Makefile.am
--- a/src/defaults/Makefile.am
+++ b/src/defaults/Makefile.am
@@ -1,51 +1,51 @@
BUILT_SOURCES = done-all-links
defaultsdir = ${pkgdatadir}/defaults
INPUTFILES = Analysis.in \
baryon_decays.in baryons.in boson_decays.in \
bosons.in Cuts.in decayers.in \
Decays.in DiffractiveParticles.in diquarks.in \
Hadronization.in HerwigDefaults.in HerwigCleanup.in \
lepton_decays.in leptons.in \
masses.in MatrixElements.in meson_decays.in mesons.in Model.in BSM.in \
Particles.in QEDRadiation.in quark_decays.in quarks.in \
setup.gosam.in Shower.in StandardModelVertices.in UnderlyingEvent.in widths.in Partons.in \
MatchboxDefaults.in DipoleShowerDefaults.in MatchboxLoopInduced.in \
-EvtGenDecayer.in EvtGenBDecays.in HerwigBDecays.in
+EvtGenDecayer.in HerwigBDecays.in
dist_defaults_DATA = $(INPUTFILES)
EXTRA_DIST = PDF.in.in
defaults_DATA = PDF.in
CLEANFILES = PDF.in done-all-links
## For an explanation of this magic, see autoconf book 4.7.2
if WANT_LOCAL_PDF
edit = sed -e "s,@HERWIG_PDF_DEFAULT\@,`cd $(top_srcdir) && pwd`/$(HERWIG_PDF_DEFAULT)," -e "s,@HERWIG_PDF_NLO\@,`cd $(top_srcdir) && pwd`/$(HERWIG_PDF_NLO)," -e "s,@HERWIG_PDF_POMERON\@,`cd $(top_srcdir) && pwd`/$(HERWIG_PDF_POMERON),"
installname = $(DESTDIR)$(pkgdatadir)/$(HERWIG_PDF_DEFAULT)
installnameNLO = $(DESTDIR)$(pkgdatadir)/$(HERWIG_PDF_NLO)
installnamePOMERON = $(DESTDIR)$(pkgdatadir)/$(HERWIG_PDF_POMERON)
install-data-hook:
rm -f $(DESTDIR)$(defaultsdir)/PDF.in
sed -e 's,@HERWIG_PDF_DEFAULT\@,$(installname),' \
-e 's,@HERWIG_PDF_NLO\@,$(installnameNLO),' \
-e 's,@HERWIG_PDF_POMERON\@,$(installnamePOMERON),' \
$(srcdir)/PDF.in.in > $(DESTDIR)$(defaultsdir)/PDF.in
else
edit = sed -e 's,@HERWIG_PDF_DEFAULT\@,$(HERWIG_PDF_DEFAULT),' -e 's,@HERWIG_PDF_NLO\@,$(HERWIG_PDF_NLO),' -e 's,@HERWIG_PDF_POMERON\@,$(HERWIG_PDF_POMERON),'
endif
PDF.in: Makefile $(srcdir)/PDF.in.in
@echo "Updating PDF.in"
@rm -f PDF.in PDF.in.tmp
@$(edit) $(srcdir)/PDF.in.in > PDF.in.tmp
@mv PDF.in.tmp PDF.in
done-all-links: $(INPUTFILES)
@echo "Linking input files"
@for i in $(INPUTFILES); do \
if test -f $(srcdir)/$$i -a ! -e $$i; then \
$(LN_S) -f $(srcdir)/$$i; fi; done
@touch done-all-links
diff --git a/src/snippets/EvtGen.in b/src/snippets/EvtGen.in
new file mode 100644
--- /dev/null
+++ b/src/snippets/EvtGen.in
@@ -0,0 +1,27 @@
+# -*- ThePEG-repository -*-
+# input file to switch from Herwig to EvtGen for weak bottom and charm meson decays
+# switch the decays
+cd /Herwig/Particles
+read EvtGenBDecays.in
+# tuning parameters
+# hadronization parameters
+cd /Herwig/Hadronization
+set ClusterFissioner:ClMaxLight 3.27*GeV
+set ClusterFissioner:ClPowLight 2.79
+set ClusterFissioner:PSplitLight 0.80
+set ClusterFissioner:ClMaxCharm 3.58*GeV
+set ClusterFissioner:ClPowCharm 2.47
+set ClusterFissioner:PSplitCharm 1.18
+set HadronSelector:SingleHadronLimitCharm 0.08
+set HadronSelector:PwtSquark 0.60
+set HadronSelector:PwtDIquark 0.40
+# shower parameters
+cd /Herwig/Shower
+set /Herwig/Shower/QtoQGSudakov:pTmin 1.62*GeV
+set /Herwig/Shower/GtoGGSudakov:pTmin 1.62*GeV
+set /Herwig/Shower/GtoQQbarSudakov:pTmin 1.62*GeV
+set /Herwig/Shower/GtobbbarSudakov:pTmin 1.62*GeV
+set /Herwig/Shower/GtoccbarSudakov:pTmin 1.62*GeV
+set /Herwig/Shower/QtoGQSudakov:pTmin 1.62*GeV
+set /Herwig/Shower/utoGuSudakov:pTmin 1.62*GeV
+set /Herwig/Shower/dtoGdSudakov:pTmin 1.62*GeV
diff --git a/src/defaults/EvtGenBDecays.in b/src/snippets/EvtGenBDecays.in
rename from src/defaults/EvtGenBDecays.in
rename to src/snippets/EvtGenBDecays.in
--- a/src/defaults/EvtGenBDecays.in
+++ b/src/snippets/EvtGenBDecays.in
@@ -1,21 +1,37 @@
# -*- ThePEG-repository -*-
#
# EvtGen decay model for weakly decaying B mesons
#
#
+# switch off internal modes
+do B0:SelectDecayModes none
+do Bbar0:SelectDecayModes none
+do B+:SelectDecayModes none
+do B-:SelectDecayModes none
+do B_s0:SelectDecayModes none
+do B_sbar0:SelectDecayModes none
+# create EvtGen ones
decaymode B0->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode Bbar0->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode B+->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode B-->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode B_s0->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode B_sbar0->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
#
# EvtGen decay model for weakly decaying D mesons
#
+# switch off internal modes
+do D0:SelectDecayModes none
+do Dbar0:SelectDecayModes none
+do D+:SelectDecayModes none
+do D-:SelectDecayModes none
+do D_s+:SelectDecayModes none
+do D_s-:SelectDecayModes none
+# create EvtGen ones
decaymode D0->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode Dbar0->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode D+->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode D-->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode D_s+->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
decaymode D_s-->*MatchAny; 1. 1 /Herwig/Decays/EvtGenDecayer
diff --git a/src/snippets/Makefile.am b/src/snippets/Makefile.am
--- a/src/snippets/Makefile.am
+++ b/src/snippets/Makefile.am
@@ -1,21 +1,22 @@
BUILT_SOURCES = done-all-links
snippetsdir = ${pkgdatadir}/snippets
INPUTFILES = \
DipoleShowerFiveFlavours.in \
DipoleShowerFourFlavours.in \
Particles-SetLonglivedParticlesStable.in \
PDF-CT10.in \
-PDF-NNPDF30NLO.in
+PDF-NNPDF30NLO.in \
+EvtGenBDecays.in EvtGen.in
dist_snippets_DATA = $(INPUTFILES)
CLEANFILES = done-all-links
done-all-links: $(INPUTFILES)
@echo "Linking input files"
@for i in $(INPUTFILES); do \
if test -f $(srcdir)/$$i -a ! -e $$i; then \
$(LN_S) -f $(srcdir)/$$i; fi; done
@touch done-all-links

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 5:44 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3797666
Default Alt Text
(316 KB)

Event Timeline