Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7877897
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
9 KB
Subscribers
None
View Options
diff --git a/Shower/SplittingFunctions/HalfHalfOneSplitFn.cc b/Shower/SplittingFunctions/HalfHalfOneSplitFn.cc
--- a/Shower/SplittingFunctions/HalfHalfOneSplitFn.cc
+++ b/Shower/SplittingFunctions/HalfHalfOneSplitFn.cc
@@ -1,129 +1,129 @@
// -*- C++ -*-
//
// HalfHalfOneSplitFn.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 HalfHalfOneSplitFn class.
//
#include "HalfHalfOneSplitFn.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "Herwig++/Shower/Base/ShowerParticle.h"
using namespace Herwig;
DescribeNoPIOClass<HalfHalfOneSplitFn,Herwig::SplittingFunction>
describeHalfHalfOneSplitFn ("Herwig::HalfHalfOneSplitFn","HwShower.so");
void HalfHalfOneSplitFn::Init() {
static ClassDocumentation<HalfHalfOneSplitFn> documentation
("The HalfHalfOneSplitFn class implements the q -> qg splitting function");
}
double HalfHalfOneSplitFn::P(const double z, const Energy2 t,
const IdList &ids, const bool mass) const {
double val = (1. + sqr(z))/(1.-z);
if(mass) {
Energy m = getParticleData(ids[0])->mass();
val -= 2.*sqr(m)/t;
}
return colourFactor(ids)*val;
}
double HalfHalfOneSplitFn::overestimateP(const double z,
const IdList & ids) const {
return 2.*colourFactor(ids)/(1.-z);
}
double HalfHalfOneSplitFn::ratioP(const double z, const Energy2 t,
const IdList & ids, const bool mass) const {
double val = 1. + sqr(z);
if(mass) {
Energy m = getParticleData(ids[0])->mass();
val -= 2.*sqr(m)*(1.-z)/t;
}
return 0.5*val;
}
double HalfHalfOneSplitFn::integOverP(const double z,
const IdList & ids,
unsigned int PDFfactor) const {
switch (PDFfactor) {
case 0:
return -2.*colourFactor(ids)*Math::log1m(z);
case 1:
return 2.*colourFactor(ids)*log(z/(1.-z));
case 2:
return 2.*colourFactor(ids)/(1.-z);
case 3:
default:
throw Exception() << "HalfHalfOneSplitFn::integOverP() invalid PDFfactor = "
<< PDFfactor << Exception::runerror;
}
}
double HalfHalfOneSplitFn::invIntegOverP(const double r, const IdList & ids,
unsigned int PDFfactor) const {
switch (PDFfactor) {
case 0:
return 1. - exp(- 0.5*r/colourFactor(ids));
case 1:
return 1./(1.-exp(-0.5*r/colourFactor(ids)));
case 2:
return 1.-2.*colourFactor(ids)/r;
case 3:
default:
throw Exception() << "HalfHalfOneSplitFn::invIntegOverP() invalid PDFfactor = "
<< PDFfactor << Exception::runerror;
}
}
bool HalfHalfOneSplitFn::accept(const IdList &ids) const {
// 3 particles and in and out fermion same
if(ids.size()!=3 || ids[0]!=ids[1]) return false;
tcPDPtr q=getParticleData(ids[0]);
tcPDPtr g=getParticleData(ids[2]);
if(q->iSpin()!=PDT::Spin1Half ||
g->iSpin()!=PDT::Spin1) return false;
return checkColours(ids);
}
vector<pair<int, Complex> >
HalfHalfOneSplitFn::generatePhi(ShowerParticle & ,ShoKinPtr ,
- const double z, const Energy2, const IdList & ,
+ const double, const Energy2, const IdList & ,
const RhoDMatrix &) {
// no dependence on the spin density matrix, dependence on off-diagonal terms cancels
// and rest = splitting function for Tr(rho)=1 as required by defn
return vector<pair<int, Complex> >(1,make_pair(0,1.));
}
-DecayMatrixElement HalfHalfOneSplitFn::matrixElement(ShowerParticle & particle,ShoKinPtr showerkin,
+DecayMatrixElement HalfHalfOneSplitFn::matrixElement(ShowerParticle & particle,ShoKinPtr,
const double z, const Energy2 t,
- const IdList & ids, const double phi) {
+ const IdList &, const double phi) {
// calculate the kernal
DecayMatrixElement kernal(PDT::Spin1Half,PDT::Spin1Half,PDT::Spin1);
Energy m = particle.dataPtr()->mass();
double mt = m/sqrt(t);
double root = sqrt(1.-(1.-z)*sqr(m)/z/t);
double romz = sqrt(1.-z);
double rz = sqrt(z);
Complex phase = exp(Complex(0.,1.)*phi);
kernal(0,0,0) = -root/romz*phase;
kernal(1,1,2) = -conj(kernal(0,0,0));
kernal(0,0,2) = root/romz*z/phase;
kernal(1,1,0) = -conj(kernal(0,0,2));
kernal(1,0,2) = mt*(1.-z)/rz;
kernal(0,1,0) = conj(kernal(1,0,2));
kernal(0,1,2) = 0.;
kernal(1,0,0) = 0.;
return kernal;
}
diff --git a/Shower/SplittingFunctions/OneHalfHalfSplitFn.cc b/Shower/SplittingFunctions/OneHalfHalfSplitFn.cc
--- a/Shower/SplittingFunctions/OneHalfHalfSplitFn.cc
+++ b/Shower/SplittingFunctions/OneHalfHalfSplitFn.cc
@@ -1,138 +1,137 @@
// -*- 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);
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(2,1,1) = kernal(0,0,0);
kernal(0,0,1) = -z*root*exp(-ii*phi);
kernal(2,1,0) = -conj(kernal(0,0,1));
kernal(0,1,0) = (1.-z)*exp(-ii*phi)*root;
kernal(2,0,1) = -conj(kernal(0,1,0));
kernal(0,1,1) = 0.;
kernal(2,0,0) = 0.;
return kernal;
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 19, 4:40 PM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3805203
Default Alt Text
(9 KB)
Attached To
rHERWIGHG herwighg
Event Timeline
Log In to Comment