Page MenuHomeHEPForge

No OneTemporary

diff --git a/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.cc b/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.cc
--- a/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.cc
+++ b/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.cc
@@ -1,155 +1,144 @@
// -*- C++ -*-
//
// IILightInvertedTildeKinematics.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2012 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 IILightInvertedTildeKinematics class.
//
#include "IILightInvertedTildeKinematics.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
-IILightInvertedTildeKinematics::IILightInvertedTildeKinematics() {}
-
-IILightInvertedTildeKinematics::~IILightInvertedTildeKinematics() {}
-
IBPtr IILightInvertedTildeKinematics::clone() const {
return new_ptr(*this);
}
IBPtr IILightInvertedTildeKinematics::fullclone() const {
return new_ptr(*this);
}
bool IILightInvertedTildeKinematics::doMap(const double * r) {
if ( ptMax() < ptCut() ) {
jacobian(0.0);
return false;
}
Lorentz5Momentum emitter = bornEmitterMomentum();
Lorentz5Momentum spectator = bornSpectatorMomentum();
double mapping = 1.0;
pair<Energy,double> ptz = generatePtZ(mapping,r);
if ( mapping == 0.0 ) {
jacobian(0.0);
return false;
}
Energy pt = ptz.first;
double z = ptz.second;
double ratio = sqr(pt/lastScale());
double x = z*(1.-z) / ( 1. - z + ratio );
double v = ratio * z / ( 1. - z + ratio );
if ( x < emitterX() || x > 1. ||
v < 0. || v > 1.-x ) {
jacobian(0.0);
return false;
}
mapping /= z*(1.-z);
jacobian(mapping*(sqr(lastScale())/sHat())/(16.*sqr(Constants::pi)));
subtractionParameters().resize(2);
subtractionParameters()[0] = x;
subtractionParameters()[1] = v;
double phi = 2.*Constants::pi*r[2];
Lorentz5Momentum kt = getKt(emitter,spectator,pt,phi);
realEmitterMomentum() = (1./x)*emitter;
realEmissionMomentum() = ((1.-x-v)/x)*emitter+v*spectator+kt;
realSpectatorMomentum() = spectator;
realEmitterMomentum().setMass(ZERO);
realEmitterMomentum().rescaleEnergy();
realEmissionMomentum().setMass(ZERO);
realEmissionMomentum().rescaleEnergy();
realSpectatorMomentum().setMass(ZERO);
realSpectatorMomentum().rescaleEnergy();
K = realEmitterMomentum() + realSpectatorMomentum() - realEmissionMomentum();
K2 = K.m2();
Ktilde = emitter + spectator;
KplusKtilde = K + Ktilde;
KplusKtilde2 = KplusKtilde.m2();
return true;
}
Energy IILightInvertedTildeKinematics::lastPt() const {
Energy scale = sqrt(2.*(bornEmitterMomentum()*bornSpectatorMomentum()));
double x = subtractionParameters()[0];
double v = subtractionParameters()[1];
return scale * sqrt(v*(1.-x-v)/x);
}
double IILightInvertedTildeKinematics::lastZ() const {
double x = subtractionParameters()[0];
double v = subtractionParameters()[1];
return x + v;
}
Energy IILightInvertedTildeKinematics::ptMax() const {
- double tau = emitterX()*spectatorX();
- return (1.-tau)*lastScale()/(2.*sqrt(tau));
+ return 0.5*(1.-emitterX())/sqrt(emitterX())*lastScale();
}
-pair<double,double> IILightInvertedTildeKinematics::zBounds(Energy pt, Energy hardPt) const {
- hardPt = hardPt == ZERO ? ptMax() : min(hardPt,ptMax());
- double tau = emitterX()*spectatorX();
- double s = sqrt(1.-sqr(pt/hardPt));
- return make_pair(0.5*(1.+tau-(1.-tau)*s),0.5*(1.+tau+(1.-tau)*s));
+pair<double,double> IILightInvertedTildeKinematics::zBounds(Energy pt, Energy) const {
+ double root = sqr(1.-emitterX())-4*emitterX()*sqr(pt/lastScale());
+ root=sqrt(max(root,0.));
+ return make_pair(0.5*( 1.+emitterX() - root),0.5*( 1.+emitterX() + root));
}
-
-// If needed, insert default implementations of virtual function defined
-// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
-
-
void IILightInvertedTildeKinematics::persistentOutput(PersistentOStream & os) const {
os << ounit(K,GeV) << ounit(K2,GeV2) << ounit(Ktilde,GeV)
<< ounit(KplusKtilde,GeV) << ounit(KplusKtilde2,GeV2);
}
void IILightInvertedTildeKinematics::persistentInput(PersistentIStream & is, int) {
is >> iunit(K,GeV) >> iunit(K2,GeV2) >> iunit(Ktilde,GeV)
>> iunit(KplusKtilde,GeV) >> iunit(KplusKtilde2,GeV2);
}
void IILightInvertedTildeKinematics::Init() {
static ClassDocumentation<IILightInvertedTildeKinematics> documentation
("IILightInvertedTildeKinematics inverts the initial-initial tilde "
"kinematics.");
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<IILightInvertedTildeKinematics,InvertedTildeKinematics>
describeHerwigIILightInvertedTildeKinematics("Herwig::IILightInvertedTildeKinematics", "Herwig.so");
diff --git a/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.h
@@ -1,160 +1,145 @@
// -*- C++ -*-
//
// IILightInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2012 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_IILightInvertedTildeKinematics_H
#define HERWIG_IILightInvertedTildeKinematics_H
//
// This is the declaration of the IILightInvertedTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IILightInvertedTildeKinematics inverts the final-final tilde
* kinematics.
*
*/
class IILightInvertedTildeKinematics: public Herwig::InvertedTildeKinematics {
public:
- /** @name Standard constructors and destructors. */
- //@{
- /**
- * The default constructor.
- */
- IILightInvertedTildeKinematics();
-
- /**
- * The destructor.
- */
- virtual ~IILightInvertedTildeKinematics();
- //@}
-
-public:
-
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *);
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
/**
* Return true, if this InvertedTildeKinematics object needs to transform
* all other particles in the process except the emitter, emission and spectator
*/
virtual bool doesTransform() const { return true; }
/**
* If this InvertedTildeKinematics object needs to transform all other particles
* in the process except the emitter, emission and spectator, return the transformed
* momentum.
*/
virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const {
return p-(2.*(KplusKtilde*p)/KplusKtilde2)*KplusKtilde+(2.*(Ktilde*p)/K2)*K;
}
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:
Lorentz5Momentum K;
Energy2 K2;
Lorentz5Momentum Ktilde;
Lorentz5Momentum KplusKtilde;
Energy2 KplusKtilde2;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
IILightInvertedTildeKinematics & operator=(const IILightInvertedTildeKinematics &);
};
}
#endif /* HERWIG_IILightInvertedTildeKinematics_H */

File Metadata

Mime Type
text/x-diff
Expires
Wed, May 14, 10:58 AM (20 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5100778
Default Alt Text
(10 KB)

Event Timeline