Page MenuHomeHEPForge

No OneTemporary

Size
37 KB
Referenced Files
None
Subscribers
None
diff --git a/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.cc b/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.cc
--- a/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.cc
+++ b/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.cc
@@ -1,135 +1,146 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the FFMgx2ggxDipoleKernel class.
//
#include "FFMgx2ggxDipoleKernel.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
FFMgx2ggxDipoleKernel::FFMgx2ggxDipoleKernel()
- : DipoleSplittingKernel(),theSymmetryFactor(0.5) {}
+ : DipoleSplittingKernel(){}
FFMgx2ggxDipoleKernel::~FFMgx2ggxDipoleKernel() {}
IBPtr FFMgx2ggxDipoleKernel::clone() const {
return new_ptr(*this);
}
IBPtr FFMgx2ggxDipoleKernel::fullclone() const {
return new_ptr(*this);
}
bool FFMgx2ggxDipoleKernel::canHandle(const DipoleIndex& ind) const {
return
useThisKernel() &&
ind.emitterData()->id() == ParticleID::g &&
ind.spectatorData()->mass() != ZERO &&
!ind.initialStateEmitter() && !ind.initialStateSpectator() &&
!ind.incomingDecayEmitter() && !ind.incomingDecaySpectator();
}
bool FFMgx2ggxDipoleKernel::canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const {
assert(canHandle(a));
if ( !canHandle(b) )
return false;
return
sk.emitter(b)->id() == ParticleID::g &&
sk.emission(b)->id() == ParticleID::g &&
abs(spectator(a)->mass()) == abs(sk.spectator(b)->mass());
}
tcPDPtr FFMgx2ggxDipoleKernel::emitter(const DipoleIndex&) const {
return getParticleData(ParticleID::g);
}
tcPDPtr FFMgx2ggxDipoleKernel::emission(const DipoleIndex&) const {
return getParticleData(ParticleID::g);
}
tcPDPtr FFMgx2ggxDipoleKernel::spectator(const DipoleIndex& ind) const {
return ind.spectatorData();
}
double FFMgx2ggxDipoleKernel::evaluate(const DipoleSplittingInfo& split) const {
double ret = alphaPDF(split);
// These are the physical variables as used in the
// standard form of the kernel (i.e. do not redefine variables or kernel)
const double z = split.lastZ();
const Energy pt = split.lastPt();
// Need zPrime to calculate y,
// TODO: Should just store y in the dipole splitting info everywhere anyway!!!
// The only value stored in dInfo.lastSplittingParameters() should be zPrime
const double zPrime = split.lastSplittingParameters()[0];
// Construct mass squared variables
// Construct mass squared variables
double muj2 = sqr(split.spectatorMass() / split.scale());
double bar = 1. - muj2;
// Calculate y
double y = sqr(pt)/sqr(split.scale()) / (bar*zPrime*(1.-zPrime));
double vijk = sqrt( sqr(2.*muj2+bar*(1.-y))-4.*muj2 ) / (bar*(1.-y));
double viji = 1.;
double zp = 0.5*(1.+viji*vijk);
double zm = 0.5*(1.-viji*vijk);
// how to choose kappa?
double kappa = 0.;
- ret *= theSymmetryFactor*3.*(1./(1.-z*(1.-y))+1./(1.-(1.-z)*(1.-y)) + (z*(1.-z)-(1.-kappa)*zp*zm-2.)/vijk);
+ double S1=1./(1.-z*(1.-y));
+ double S2=1./(1.-(1.-z)*(1.-y));
+ double NS=(z*(1.-z)-(1.-kappa)*zp*zm-2.)/vijk;
+
+ if( theAsymmetryOption == 0 ){
+ ret *= 3.*( S1 + 0.5 * NS);
+ }else if ( theAsymmetryOption == 1 ){
+ ret *= 3.*z*( S1 +S2 + NS );
+ }else{
+ ret *= 3.*0.5*( S1 + S2 + NS );
+ }
+
+ ret *= 3.*(1./(1.-z*(1.-y))+ 0.5*(z*(1.-z)-(1.-kappa)*zp*zm-2.)/vijk);
return ret > 0. ? ret : 0.;
}
// If needed, insert default implementations of function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void FFMgx2ggxDipoleKernel::persistentOutput(PersistentOStream & os) const {
- os<<theSymmetryFactor;
+ os << theAsymmetryOption;
}
void FFMgx2ggxDipoleKernel::persistentInput(PersistentIStream & is, int) {
- is>>theSymmetryFactor;
+ is >> theAsymmetryOption;
}
ClassDescription<FFMgx2ggxDipoleKernel> FFMgx2ggxDipoleKernel::initFFMgx2ggxDipoleKernel;
// Definition of the static class description member.
void FFMgx2ggxDipoleKernel::Init() {
static ClassDocumentation<FFMgx2ggxDipoleKernel> documentation
("FFMgx2ggxDipoleKernel");
-
- static Parameter<FFMgx2ggxDipoleKernel,double> interfaceSymmetryFactor
- ("SymmetryFactor",
- "The symmetry factor for final state gluon spliitings.",
- &FFMgx2ggxDipoleKernel::theSymmetryFactor, 1.0, 0.0, 0,
- false, false, Interface::lowerlim);
-
+
+ static Parameter<FFMgx2ggxDipoleKernel,int> interfacetheAsymmetryOption
+ ("AsymmetryOption",
+ "The asymmetry option for final state gluon spliitings.",
+ &FFMgx2ggxDipoleKernel::theAsymmetryOption, 1, 0, 0,
+ false, false, Interface::lowerlim);
}
diff --git a/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.h
@@ -1,187 +1,187 @@
// -*- C++ -*-
#ifndef HERWIG_FFMgx2ggxDipoleKernel_H
#define HERWIG_FFMgx2ggxDipoleKernel_H
//
// This is the declaration of the FFMgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll, Stephen Webster
*
* \brief FFMgx2ggxDipoleKernel implements the g -> gg
* splitting off a final-final dipole
*
*/
class FFMgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~FFMgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
- * Symmetry factor for final state gluon splittings (should be 1/2).
+ * Asymmetry option for final state gluon splittings.
*/
- double theSymmetryFactor;
+ int theAsymmetryOption=1;
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFMgx2ggxDipoleKernel> initFFMgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
FFMgx2ggxDipoleKernel & operator=(const FFMgx2ggxDipoleKernel &);
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFMgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FFMgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of FFMgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFMgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFMgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::FFMgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFMgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FFMgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FFMgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFMgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.cc b/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.cc
--- a/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.cc
+++ b/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.cc
@@ -1,107 +1,115 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the FFgx2ggxDipoleKernel class.
//
#include "FFgx2ggxDipoleKernel.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
FFgx2ggxDipoleKernel::FFgx2ggxDipoleKernel()
- : DipoleSplittingKernel(),theSymmetryFactor(0.5){}
+ : DipoleSplittingKernel(){}
FFgx2ggxDipoleKernel::~FFgx2ggxDipoleKernel() {}
IBPtr FFgx2ggxDipoleKernel::clone() const {
return new_ptr(*this);
}
IBPtr FFgx2ggxDipoleKernel::fullclone() const {
return new_ptr(*this);
}
bool FFgx2ggxDipoleKernel::canHandle(const DipoleIndex& ind) const {
return
useThisKernel() &&
ind.emitterData()->id() == ParticleID::g &&
ind.spectatorData()->mass() == ZERO &&
!ind.initialStateEmitter() && !ind.initialStateSpectator();
}
bool FFgx2ggxDipoleKernel::canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const {
assert(canHandle(a));
if ( !canHandle(b) )
return false;
return
sk.emitter(b)->id() == ParticleID::g &&
sk.emission(b)->id() == ParticleID::g;
}
tcPDPtr FFgx2ggxDipoleKernel::emitter(const DipoleIndex&) const {
return getParticleData(ParticleID::g);
}
tcPDPtr FFgx2ggxDipoleKernel::emission(const DipoleIndex&) const {
return getParticleData(ParticleID::g);
}
tcPDPtr FFgx2ggxDipoleKernel::spectator(const DipoleIndex& ind) const {
return ind.spectatorData();
}
double FFgx2ggxDipoleKernel::evaluate(const DipoleSplittingInfo& split) const {
double ret = alphaPDF(split);
double z = split.lastZ();
double y = sqr(split.lastPt() / split.scale()) / (z*(1.-z));
- ret *=theSymmetryFactor*3.*(1./(1.-z*(1.-y))+1./(1.-(1.-z)*(1.-y))-2.+z*(1.-z));
+ double S1=1./(1.-z*(1.-y));
+ double S2=1./(1.-(1.-z)*(1.-y));
+ double NS=(-2 + z*(1.-z));
-
+ if( theAsymmetryOption == 0 ){
+ ret *= 3.*( S1 + 0.5 * NS);
+ }else if ( theAsymmetryOption == 1 ){
+ ret *= 3.*z*( S1 +S2 + NS );
+ }else{
+ ret *= 3.*0.5*( S1 + S2 + NS );
+ }
+
return ret > 0. ? ret : 0.;
-
}
// If needed, insert default implementations of function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void FFgx2ggxDipoleKernel::persistentOutput(PersistentOStream & os) const {
- os<<theSymmetryFactor;
+ os << theAsymmetryOption;
}
void FFgx2ggxDipoleKernel::persistentInput(PersistentIStream & is, int) {
- is>>theSymmetryFactor;
+ is >> theAsymmetryOption;
}
ClassDescription<FFgx2ggxDipoleKernel> FFgx2ggxDipoleKernel::initFFgx2ggxDipoleKernel;
// Definition of the static class description member.
void FFgx2ggxDipoleKernel::Init() {
static ClassDocumentation<FFgx2ggxDipoleKernel> documentation
("FFgx2ggxDipoleKernel");
- static Parameter<FFgx2ggxDipoleKernel,double> interfaceSymmetryFactor
- ("SymmetryFactor",
- "The symmetry factor for final state gluon spliitings.",
- &FFgx2ggxDipoleKernel::theSymmetryFactor, 1.0, 0.0, 0,
+ static Parameter<FFgx2ggxDipoleKernel,int> interfacetheAsymmetryOption
+ ("AsymmetryOption",
+ "The asymmetry option for final state gluon spliitings.",
+ &FFgx2ggxDipoleKernel::theAsymmetryOption, 1, 0, 0,
false, false, Interface::lowerlim);
}
diff --git a/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.h
@@ -1,187 +1,187 @@
// -*- C++ -*-
#ifndef HERWIG_FFgx2ggxDipoleKernel_H
#define HERWIG_FFgx2ggxDipoleKernel_H
//
// This is the declaration of the FFgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FFgx2ggxDipoleKernel implements the g -> gg
* splitting off a final-final dipole
*
*/
class FFgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~FFgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFgx2ggxDipoleKernel> initFFgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
FFgx2ggxDipoleKernel & operator=(const FFgx2ggxDipoleKernel &);
/**
- * Symmetry factor for final state gluon splittings (should be 1/2).
- */
-
- double theSymmetryFactor;
+ * Asymmetry option for final state gluon splittings.
+ */
+
+ int theAsymmetryOption=1;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FFgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of FFgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::FFgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FFgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FFgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.cc b/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.cc
--- a/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.cc
+++ b/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.cc
@@ -1,106 +1,116 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the FIgx2ggxDipoleKernel class.
//
#include "FIgx2ggxDipoleKernel.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
FIgx2ggxDipoleKernel::FIgx2ggxDipoleKernel()
- : DipoleSplittingKernel(),theSymmetryFactor(0.5) {}
+ : DipoleSplittingKernel() {}
FIgx2ggxDipoleKernel::~FIgx2ggxDipoleKernel() {}
IBPtr FIgx2ggxDipoleKernel::clone() const {
return new_ptr(*this);
}
IBPtr FIgx2ggxDipoleKernel::fullclone() const {
return new_ptr(*this);
}
bool FIgx2ggxDipoleKernel::canHandle(const DipoleIndex& ind) const {
return
useThisKernel() &&
ind.emitterData()->id() == ParticleID::g &&
ind.spectatorData()->mass() == ZERO &&
!ind.initialStateEmitter() && ind.initialStateSpectator();
}
bool FIgx2ggxDipoleKernel::canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const {
assert(canHandle(a));
if ( !canHandle(b) )
return false;
return
sk.emitter(b)->id() == ParticleID::g &&
sk.emission(b)->id() == ParticleID::g &&
a.spectatorPDF() == b.spectatorPDF();
}
tcPDPtr FIgx2ggxDipoleKernel::emitter(const DipoleIndex&) const {
return getParticleData(ParticleID::g);
}
tcPDPtr FIgx2ggxDipoleKernel::emission(const DipoleIndex&) const {
return getParticleData(ParticleID::g);
}
tcPDPtr FIgx2ggxDipoleKernel::spectator(const DipoleIndex& ind) const {
return ind.spectatorData();
}
double FIgx2ggxDipoleKernel::evaluate(const DipoleSplittingInfo& split) const {
double ret = alphaPDF(split);
double z = split.lastZ();
double x = 1. / ( 1. + sqr(split.lastPt()/split.scale()) / (z*(1.-z)) );
- ret *=theSymmetryFactor* 3. * ( 1./(1.-z+(1.-x)) + 1./(z+(1.-x)) - 2.+z*(1.-z) + (1.-x)*(1.+x*z*(1.-z)) );
-
+ double S1=1./(1.-z*(1.-x));
+ double S2=1./(1.-(1.-z)*(1.-x));
+ double NS=(-2 + z*(1.-z)+(1.-x)*(1.+x*z*(1.-z)));
+
+ if( theAsymmetryOption == 0 ){
+ ret *= 3.*( S1 + 0.5 * NS);
+ }else if ( theAsymmetryOption == 1 ){
+ ret *= 3.*z*( S1 +S2 + NS );
+ }else{
+ ret *= 3.*0.5*( S1 + S2 + NS );
+ }
+
return ret > 0. ? ret : 0.;
}
// If needed, insert default implementations of function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void FIgx2ggxDipoleKernel::persistentOutput(PersistentOStream & os) const {
- os<<theSymmetryFactor;
+ os << theAsymmetryOption;
}
void FIgx2ggxDipoleKernel::persistentInput(PersistentIStream & is, int) {
- is>>theSymmetryFactor;
+ is >> theAsymmetryOption;
}
ClassDescription<FIgx2ggxDipoleKernel> FIgx2ggxDipoleKernel::initFIgx2ggxDipoleKernel;
// Definition of the static class description member.
void FIgx2ggxDipoleKernel::Init() {
static ClassDocumentation<FIgx2ggxDipoleKernel> documentation
("FIgx2ggxDipoleKernel");
- static Parameter<FIgx2ggxDipoleKernel,double> interfaceSymmetryFactor
- ("SymmetryFactor",
- "The symmetry factor for final state gluon spliitings.",
- &FIgx2ggxDipoleKernel::theSymmetryFactor, 1.0, 0.0, 0,
- false, false, Interface::lowerlim);
+ static Parameter<FIgx2ggxDipoleKernel,int> interfacetheAsymmetryOption
+ ("AsymmetryOption",
+ "The asymmetry option for final state gluon spliitings.",
+ &FIgx2ggxDipoleKernel::theAsymmetryOption, 1, 0, 0,
+ false, false, Interface::lowerlim);
}
diff --git a/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.h
@@ -1,186 +1,186 @@
// -*- C++ -*-
#ifndef HERWIG_FIgx2ggxDipoleKernel_H
#define HERWIG_FIgx2ggxDipoleKernel_H
//
// This is the declaration of the FIgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FIgx2ggxDipoleKernel implements the g -> gg
* splitting off a final-initial dipole
*
*/
class FIgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
- * Symmetry factor for final state gluon splittings (should be 1/2).
- */
-
- double theSymmetryFactor;
+ * Asymmetry option for final state gluon splittings.
+ */
+
+ int theAsymmetryOption=1;
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIgx2ggxDipoleKernel> initFIgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
FIgx2ggxDipoleKernel & operator=(const FIgx2ggxDipoleKernel &);
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of FIgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::FIgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kinematics/DipoleSplittingKinematics.cc b/Shower/Dipole/Kinematics/DipoleSplittingKinematics.cc
--- a/Shower/Dipole/Kinematics/DipoleSplittingKinematics.cc
+++ b/Shower/Dipole/Kinematics/DipoleSplittingKinematics.cc
@@ -1,327 +1,327 @@
// -*- C++ -*-
//
// DipoleSplittingKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 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 DipoleSplittingKinematics class.
//
#include "DipoleSplittingKinematics.h"
#include "Herwig/Shower/Dipole/Base/DipoleSplittingInfo.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 "Herwig/MatrixElement/Matchbox/Phasespace/RandomHelpers.h"
#include <limits>
using namespace Herwig;
DipoleSplittingKinematics::DipoleSplittingKinematics()
: HandlerBase(), theIRCutoff(1.0*GeV),
theXMin(1.e-5), theJacobian(0.0),
theLastPt(0.0*GeV), theLastZ(0.0), theLastPhi(0.0),
theLastEmitterZ(1.0), theLastSpectatorZ(1.0),
- theLastSplittingParameters(),theOpenZBoundaries(0) {}
+ theLastSplittingParameters(),theOpenZBoundaries(1) {}
DipoleSplittingKinematics::~DipoleSplittingKinematics() {}
void DipoleSplittingKinematics::persistentOutput(PersistentOStream & os) const {
os << ounit(theIRCutoff,GeV) << theXMin << theMCCheck<<theOpenZBoundaries;
}
void DipoleSplittingKinematics::persistentInput(PersistentIStream & is, int) {
is >> iunit(theIRCutoff,GeV) >> theXMin >> theMCCheck>>theOpenZBoundaries;
}
void DipoleSplittingKinematics::prepareSplitting(DipoleSplittingInfo& dInfo) {
dInfo.splittingKinematics(this);
if ( lastPt() > IRCutoff() )
dInfo.lastPt(lastPt());
else {
dInfo.lastPt(0.0*GeV);
dInfo.didStopEvolving();
}
dInfo.lastZ(lastZ());
dInfo.lastPhi(lastPhi());
dInfo.lastEmitterZ(lastEmitterZ());
dInfo.lastSpectatorZ(lastSpectatorZ());
dInfo.splittingParameters().resize(lastSplittingParameters().size());
copy(lastSplittingParameters().begin(),lastSplittingParameters().end(),
dInfo.splittingParameters().begin());
}
Energy DipoleSplittingKinematics::ptMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const {
return ptMax(dScale, emX, specX, dInfo.index(), split);
}
Energy DipoleSplittingKinematics::ptMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
tPPtr, tPPtr) const {
return ptMax(dScale, emX, specX, dIndex, split);
}
Energy DipoleSplittingKinematics::QMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const {
return QMax(dScale, emX, specX, dInfo.index(), split);
}
Energy DipoleSplittingKinematics::QMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
tPPtr, tPPtr) const {
return QMax(dScale, emX, specX, dIndex, split);
}
Energy DipoleSplittingKinematics::generatePt(double r, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
double& weight) const {
Energy maxPt = ptMax(dScale,emX,specX,dIndex,split);
if ( maxPt <= IRCutoff() ) {
weight = 0.0;
return ZERO;
}
weight *= log(sqr(maxPt/IRCutoff()));
return IRCutoff()*pow(maxPt/IRCutoff(),r);
}
double DipoleSplittingKinematics::ptToRandom(Energy pt, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split) const {
Energy maxPt = ptMax(dScale,emX,specX,dIndex,split);
assert(pt >= IRCutoff() && pt <= maxPt);
return log(pt/IRCutoff())/log(maxPt/IRCutoff());
}
double DipoleSplittingKinematics::generateZ(double r, Energy pt, int sampling,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split,
double& weight) const {
pair<double,double> zLims = zBoundaries(pt,dInfo,split);
if(zLims.first==zLims.second){
weight = 0.0;
return 0.0;
}
using namespace RandomHelpers;
if ( sampling == FlatZ ) {
pair<double,double> kw = generate(flat(zLims.first,zLims.second),r);
if ( kw.second != 0. ) {
weight *= kw.second;
return kw.first;
}
else {
assert( kw.first < zLims.first || kw.first > zLims.second );
weight *= kw.second;
return -1.;
}
}
if ( sampling == OneOverZ ) {
pair<double,double> kw = generate(inverse(0.0,zLims.first,zLims.second),r);
if ( kw.second != 0. ) {
weight *= kw.second;
return kw.first;
}
else {
assert( kw.first < zLims.first || kw.first > zLims.second );
weight *= kw.second;
return -1.;
}
}
if ( sampling == OneOverOneMinusZ ) {
pair<double,double> kw = generate(inverse(1.0,zLims.first,zLims.second),r);
if ( kw.second != 0. ) {
weight *= kw.second;
return kw.first;
}
else {
assert( kw.first < zLims.first || kw.first > zLims.second );
weight *= kw.second;
return -1.;
}
}
if ( sampling == OneOverZOneMinusZ ) {
pair<double,double> kw = generate(inverse(0.0,zLims.first,zLims.second) +
inverse(1.0,zLims.first,zLims.second),r);
if ( kw.second != 0. ) {
weight *= kw.second;
return kw.first;
}
else {
assert( kw.first < zLims.first || kw.first > zLims.second );
weight *= kw.second;
return -1.;
}
}
weight = 0.0;
return 0.0;
}
Lorentz5Momentum DipoleSplittingKinematics::getKt(const Lorentz5Momentum& p1,
const Lorentz5Momentum& p2,
Energy pt,
double phi,
bool spacelike) const {
Lorentz5Momentum P;
if ( !spacelike )
P = p1 + p2;
else
P = p1 - p2;
Energy2 Q2 = abs(P.m2());
Lorentz5Momentum Q =
!spacelike ?
Lorentz5Momentum(ZERO,ZERO,ZERO,sqrt(Q2),sqrt(Q2)) :
Lorentz5Momentum(ZERO,ZERO,sqrt(Q2),ZERO,-sqrt(Q2));
if ( spacelike && Q.z() < P.z() )
Q.setZ(-Q.z());
bool boost =
abs((P-Q).vect().mag2()/GeV2) > 1e-10 ||
abs((P-Q).t()/GeV) > 1e-5;
boost &= (P*Q-Q.mass2())/GeV2 > 1e-8;
Lorentz5Momentum inFrame1;
if ( boost )
inFrame1 = p1 + ((P*p1-Q*p1)/(P*Q-Q.mass2()))*(P-Q);
else
inFrame1 = p1;
Energy ptx = inFrame1.x();
Energy pty = inFrame1.y();
Energy q = 2.*inFrame1.z();
Energy Qp = sqrt(4.*(sqr(ptx)+sqr(pty))+sqr(q));
Energy Qy = sqrt(4.*sqr(pty)+sqr(q));
double cPhi = cos(phi);
double sPhi = sqrt(1.-sqr(cPhi));
if ( phi > Constants::pi )
sPhi = -sPhi;
Lorentz5Momentum kt;
if ( !spacelike ) {
kt.setT(ZERO);
kt.setX(pt*Qy*cPhi/Qp);
kt.setY(-pt*(4*ptx*pty*cPhi/Qp+q*sPhi)/Qy);
kt.setZ(2.*pt*(-ptx*q*cPhi/Qp + pty*sPhi)/Qy);
} else {
kt.setT(2.*pt*(ptx*q*cPhi+pty*Qp*sPhi)/(q*Qy));
kt.setX(pt*(Qp*q*cPhi+4.*ptx*pty*sPhi)/(q*Qy));
kt.setY(pt*Qy*sPhi/q);
kt.setZ(ZERO);
}
if ( boost )
kt = kt + ((P*kt-Q*kt)/(P*Q-Q.mass2()))*(P-Q);
kt.setMass(-pt);
kt.rescaleRho();
return kt;
}
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
AbstractClassDescription<DipoleSplittingKinematics> DipoleSplittingKinematics::initDipoleSplittingKinematics;
// Definition of the static class description member.
void DipoleSplittingKinematics::Init() {
static ClassDocumentation<DipoleSplittingKinematics> documentation
("DipoleSplittingKinematics is the base class for dipole splittings "
"as performed in the dipole shower.");
static Parameter<DipoleSplittingKinematics,Energy> interfaceIRCutoff
("IRCutoff",
"The IR cutoff to be used by this splitting kinematics.",
&DipoleSplittingKinematics::theIRCutoff, GeV, 1.0*GeV, 0.0*GeV, 0*GeV,
false, false, Interface::lowerlim);
static Parameter<DipoleSplittingKinematics,double> interfaceXMin
("XMin",
"The minimum momentum fraction for incoming partons",
&DipoleSplittingKinematics::theXMin, 1.0e-5, 0.0, 1.0,
false, false, Interface::limited);
static Reference<DipoleSplittingKinematics,DipoleMCCheck> interfaceMCCheck
("MCCheck",
"[debug option] MCCheck",
&DipoleSplittingKinematics::theMCCheck, false, false, true, true, false);
interfaceMCCheck.rank(-1);
static Switch<DipoleSplittingKinematics,int> interfaceOpenZBoundaries
("OpenZBoundaries", "",
&DipoleSplittingKinematics::theOpenZBoundaries, 0, false, false);
static SwitchOption interfaceOpenZBoundarieshardScale
(interfaceOpenZBoundaries, "Hard", "", 0);
static SwitchOption interfaceOpenZBoundariesfull
(interfaceOpenZBoundaries, "Full", "", 1);
static SwitchOption interfaceOpenZBoundariesDipoleScale
(interfaceOpenZBoundaries, "DipoleScale", "", 2);
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Sep 30, 5:54 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6566400
Default Alt Text
(37 KB)

Event Timeline