Page MenuHomeHEPForge

No OneTemporary

diff --git a/Shower/SplittingFunctions/OneHalfHalfSplitFn.cc b/Shower/SplittingFunctions/OneHalfHalfSplitFn.cc
--- a/Shower/SplittingFunctions/OneHalfHalfSplitFn.cc
+++ b/Shower/SplittingFunctions/OneHalfHalfSplitFn.cc
@@ -1,137 +1,138 @@
// -*- C++ -*-
//
// OneHalfHalfSplitFn.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 OneHalfHalfSplitFn class.
//
#include "OneHalfHalfSplitFn.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
using namespace Herwig;
DescribeNoPIOClass<OneHalfHalfSplitFn,Herwig::SplittingFunction>
describeOneHalfHalfSplitFn ("Herwig::OneHalfHalfSplitFn","HwShower.so");
void OneHalfHalfSplitFn::Init() {
static ClassDocumentation<OneHalfHalfSplitFn> documentation
("The OneHalfHalfSplitFn class implements the splitting function for g->q qbar");
}
double OneHalfHalfSplitFn::P(const double z, const Energy2 t,
const IdList &ids, const bool mass) const {
double zz = z*(1.-z);
double val=1.-2.*zz;
if(mass) {
Energy m = getParticleData(ids[1])->mass();
val +=2.*sqr(m)/t;
}
return colourFactor(ids)*val;
}
double OneHalfHalfSplitFn::overestimateP(const double,
const IdList &ids) const {
return colourFactor(ids);
}
double OneHalfHalfSplitFn::ratioP(const double z, const Energy2 t,
const IdList &ids, const bool mass) const {
double zz = z*(1.-z);
double val = 1.-2.*zz;
if(mass) {
Energy m = getParticleData(ids[1])->mass();
val+= 2.*sqr(m)/t;
}
return val;
}
double OneHalfHalfSplitFn::integOverP(const double z, const IdList & ids,
unsigned int PDFfactor) const {
switch(PDFfactor) {
case 0:
return colourFactor(ids)*z;
case 1:
return colourFactor(ids)*log(z);
case 2:
return -colourFactor(ids)*log(1.-z);
case 3:
return colourFactor(ids)*log(z/(1.-z));
default:
throw Exception() << "OneHalfHalfSplitFn::integOverP() invalid PDFfactor = "
<< PDFfactor << Exception::runerror;
}
}
double OneHalfHalfSplitFn::invIntegOverP(const double r,
const IdList & ids,
unsigned int PDFfactor) const {
switch(PDFfactor) {
case 0:
return r/colourFactor(ids);
case 1:
return exp(r/colourFactor(ids));
case 2:
return 1.-exp(-r/colourFactor(ids));
case 3:
return 1./(1.+exp(-r/colourFactor(ids)));
default:
throw Exception() << "OneHalfHalfSplitFn::integOverP() invalid PDFfactor = "
<< PDFfactor << Exception::runerror;
}
}
bool OneHalfHalfSplitFn::accept(const IdList &ids) const {
if(ids.size()!=3) return false;
if(ids[1]!=-ids[2]) return false;
tcPDPtr q=getParticleData(ids[1]);
if(q->iSpin()!=PDT::Spin1Half) return false;
tcPDPtr g=getParticleData(ids[0]);
if(g->iSpin()!=PDT::Spin1) return false;
return checkColours(ids);
}
vector<pair<int, Complex> >
OneHalfHalfSplitFn::generatePhi(ShowerParticle & ,ShoKinPtr ,
const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix & rho) {
assert(rho.iSpin()==PDT::Spin1);
double modRho = abs(rho(0,2));
Energy mq = getParticleData(ids[1])->mass();
Energy2 mq2 = sqr(mq);
double fact = z*(1.-z)-mq2/t;
- double max = 1.-2.*fact*(1.+2.*modRho);
+ double max = 1.+2.*fact*(-1.+2.*modRho);
vector<pair<int, Complex> > output;
output.push_back(make_pair( 0,(rho(0,0)+rho(2,2))*(1.-2.*fact)/max));
output.push_back(make_pair(-2,2.*fact*rho(0,2)/max));
output.push_back(make_pair( 2,2.*fact*rho(2,0)/max));
return output;
}
DecayMatrixElement OneHalfHalfSplitFn::matrixElement(ShowerParticle &,ShoKinPtr,
const double z, const Energy2 t,
const IdList & ids, const double phi) {
static const Complex ii(0.,1.);
// calculate the kernal
DecayMatrixElement kernal(PDT::Spin1,PDT::Spin1Half,PDT::Spin1Half);
double mt = getParticleData(ids[1])->mass()/sqrt(t);
+ double mt = 0.;
double root = sqrt(1.-sqr(mt)/z/(1.-z));
kernal(0,0,0) = mt/sqrt(z*(1.-z));
- kernal(1,1,1) = -kernal(0,0,0);
+ kernal(2,1,1) = kernal(0,0,0);
kernal(0,0,1) = -z*root*exp(-ii*phi);
- kernal(1,1,0) = -conj(kernal(0,0,1));
+ kernal(2,1,0) = -conj(kernal(0,0,1));
kernal(0,1,0) = (1.-z)*exp(-ii*phi)*root;
- kernal(1,0,1) = -conj(kernal(0,1,0));
+ kernal(2,0,1) = -conj(kernal(0,1,0));
kernal(0,1,1) = 0.;
- kernal(1,0,0) = 0.;
+ kernal(2,0,0) = 0.;
return kernal;
}
diff --git a/Shower/SplittingFunctions/OneOneOneSplitFn.cc b/Shower/SplittingFunctions/OneOneOneSplitFn.cc
--- a/Shower/SplittingFunctions/OneOneOneSplitFn.cc
+++ b/Shower/SplittingFunctions/OneOneOneSplitFn.cc
@@ -1,123 +1,120 @@
// -*- C++ -*-
//
// OneOneOneSplitFn.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 OneOneOneSplitFn class.
//
#include "OneOneOneSplitFn.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
using namespace Herwig;
DescribeNoPIOClass<OneOneOneSplitFn,Herwig::SplittingFunction>
describeOneOneOneSplitFn ("Herwig::OneOneOneSplitFn","HwShower.so");
void OneOneOneSplitFn::Init() {
static ClassDocumentation<OneOneOneSplitFn> documentation
("The OneOneOneSplitFn class implements the g -> gg splitting function");
}
double OneOneOneSplitFn::P(const double z, const Energy2,
const IdList & ids, const bool)const {
// (this is historically important! the first physics - two years
// after the birth of the project - in the Herwig++ shower! Alberto
// & Stefan, 25/04/2002).
return colourFactor(ids)*sqr(1.-z*(1.-z))/(z*(1.-z));
}
double OneOneOneSplitFn::overestimateP(const double z,
const IdList & ids) const {
return colourFactor(ids)*(1/z + 1/(1.-z));
}
double OneOneOneSplitFn::ratioP(const double z, const Energy2,
const IdList & , const bool) const {
return sqr(1.-z*(1.-z));
}
double OneOneOneSplitFn::invIntegOverP(const double r,
const IdList & ids,
unsigned int PDFfactor) const {
switch(PDFfactor) {
case 0:
return 1./(1.+exp(-r/colourFactor(ids)));
case 1:
case 2:
case 3:
default:
throw Exception() << "OneOneOneSplitFn::integOverP() invalid PDFfactor = "
<< PDFfactor << Exception::runerror;
}
}
double OneOneOneSplitFn::integOverP(const double z, const IdList & ids,
unsigned int PDFfactor) const {
switch(PDFfactor) {
case 0:
assert(z>0.&&z<1.);
return colourFactor(ids)*log(z/(1.-z));
case 1:
case 2:
case 3:
default:
throw Exception() << "OneOneOneSplitFn::integOverP() invalid PDFfactor = "
<< PDFfactor << Exception::runerror;
}
}
bool OneOneOneSplitFn::accept(const IdList & ids) const {
if(ids.size()!=3) return false;
for(unsigned int ix=0;ix<ids.size();++ix) {
tcPDPtr part = getParticleData(ids[ix]);
if(part->iSpin()!=PDT::Spin1) return false;
}
return checkColours(ids);
}
vector<pair<int, Complex> >
OneOneOneSplitFn::generatePhi(ShowerParticle & ,ShoKinPtr ,
- const double z, const Energy2, const IdList &,
- const RhoDMatrix & rho) {
+ const double z, const Energy2, const IdList &,
+ const RhoDMatrix & rho) {
assert(rho.iSpin()==PDT::Spin1);
double modRho = abs(rho(0,2));
- double max = 2.*z*modRho*(1.-z)+sqr(+1.-(1.-z)*z)/(z*(1.-z));
+ double max = 2.*z*modRho*(1.-z)+sqr(1.-(1.-z)*z)/(z*(1.-z));
vector<pair<int, Complex> > output;
output.push_back(make_pair( 0,(rho(0,0)+rho(2,2))*sqr(1.-(1.-z)*z)/(z*(1.-z))/max));
- output.push_back(make_pair(-2,-rho(0,2)*z*(1.-z)));
- output.push_back(make_pair( 2,-rho(2,0)*z*(1.-z)));
+ output.push_back(make_pair(-2,-rho(0,2)*z*(1.-z)/max));
+ output.push_back(make_pair( 2,-rho(2,0)*z*(1.-z)/max));
return output;
}
DecayMatrixElement OneOneOneSplitFn::matrixElement(ShowerParticle &,ShoKinPtr,
const double z, const Energy2,
const IdList &, const double phi) {
// calculate the kernal
DecayMatrixElement kernal(PDT::Spin1,PDT::Spin1,PDT::Spin1);
- double root = sqrt(z*(1.-z));
double omz = 1.-z;
- double fact = 1./z/(1.-z)-1.;
- for(int lamA=-1;lamA<2;lamA+=2) {
- Complex factA = exp(Complex(0.,1.)*double(lamA)*phi);
- for(int lamB=-1;lamB<2;lamB+=2) {
- Complex factB = exp(-Complex(0.,1.)*double(lamB)*phi);
- for(int lamC=-1;lamC<2;lamC+=2) {
- Complex factC = exp(-Complex(0.,1.)*double(lamC)*phi);
- kernal(1+lamA,1+lamB,1+lamC) = -0.5*root*factA*factB*factC*
- (lamA*lamB*lamC*fact+lamA+lamB/z+lamC/omz);
- }
- }
- }
+ double root = sqrt(z*omz);
+ Complex phase = exp(Complex(0.,1.)*phi);
+ kernal(0,0,0) = phase/root;
+ kernal(2,2,2) = -conj(kernal(0,0,0));
+ kernal(0,0,2) = -sqr(z)/root/phase;
+ kernal(2,2,0) = -conj(kernal(0,0,2));
+ kernal(0,2,0) = -sqr(omz)/root/phase;
+ kernal(2,0,2) = -conj(kernal(0,2,0));
+ kernal(0,2,2) = 0.;
+ kernal(2,0,0) = 0.;
return kernal;
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jan 20, 10:35 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4242696
Default Alt Text
(9 KB)

Event Timeline