herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
FFMassiveInvertedTildeKinematics.h
1// -*- C++ -*-
2//
3// FFMassiveInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 The Herwig Collaboration
5//
6// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef HERWIG_FFMassiveInvertedTildeKinematics_H
10#define HERWIG_FFMassiveInvertedTildeKinematics_H
11//
12// This is the declaration of the FFMassiveInvertedTildeKinematics class.
13//
14
15#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
16
17namespace Herwig {
18
19using namespace ThePEG;
20
30
31public:
32
41 virtual bool doMap(const double *);
42
46 virtual Energy lastPt() const;
47
51 virtual double lastZ() const;
52
56 virtual Energy ptMax() const;
57
62 virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
63
68 /*virtual*/ bool ptzAllowed(pair<Energy,double> ptz, vector<double>* values ) const;
69
73 virtual pair<Energy,double> generatePtZ(double& jac, const double * r, vector<double>* values) const;
74
75public:
76
80 template <class T>
81 inline T rootOfKallen (T a, T b, T c) const {
82 return sqrt( a*a + b*b + c*c - 2.*( a*b+a*c+b*c ) ); }
83
84 // TODO: remove in both
91 ThreeVector<double> rotateToZ (Lorentz5Momentum& pTarget, Lorentz5Momentum& p1) {
92 ThreeVector<double> oldAxis = pTarget.vect().unit();
93 double ct = oldAxis.z(); double st = sqrt( 1.-sqr(ct) ); // cos,sin(theta)
94 double cp = oldAxis.x()/st; double sp = oldAxis.y()/st; // cos,sin(phi)
95 pTarget.setZ( pTarget.vect().mag() ); pTarget.setX( 0.*GeV ); pTarget.setY( 0.*GeV );
96 Lorentz5Momentum p1old = p1;
97 p1.setX( sp*p1old.x() - cp*p1old.y() );
98 p1.setY( ct*cp*p1old.x() + ct*sp*p1old.y() - st*p1old.z() );
99 p1.setZ( st*cp*p1old.x() + st*sp*p1old.y() + ct*p1old.z() );
100 return oldAxis;
101 }
102
103public:
104
112
118 void persistentInput(PersistentIStream & is, int version);
120
127 static void Init();
128
129protected:
130
137 virtual IBPtr clone() const;
138
143 virtual IBPtr fullclone() const;
145
146
147// If needed, insert declarations of virtual function defined in the
148// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
149
150
151private:
152
158
159
160};
161
162}
163
164#endif /* HERWIG_FFMassiveInvertedTildeKinematics_H */
FFMassiveInvertedTildeKinematics inverts the final-final tilde kinematics.
virtual Energy ptMax() const
Return the upper bound on pt.
T rootOfKallen(T a, T b, T c) const
Triangular / Kallen function.
virtual pair< Energy, double > generatePtZ(double &jac, const double *r, vector< double > *values) const
Generate pt and z.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThreeVector< double > rotateToZ(Lorentz5Momentum &pTarget, Lorentz5Momentum &p1)
stolen from FFMassiveKinematics.h Perform a rotation on both momenta such that the first one will poi...
virtual pair< double, double > zBounds(Energy pt, Energy hardPt=ZERO) const
Given a pt, return the boundaries on z Note that allowing parton masses these bounds may be too loose...
virtual double lastZ() const
Return the momentum fraction associated to the last splitting.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual bool doMap(const double *)
Perform the mapping of the tilde kinematics for the last selected process and store all dimensionless...
bool ptzAllowed(pair< Energy, double > ptz, vector< double > *values) const
For generated pt and z, check if this point is kinematically allowed.
static void Init()
The standard Init function used to initialize the interfaces.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual Energy lastPt() const
Return the pt associated to the last generated splitting.
FFMassiveInvertedTildeKinematics & operator=(const FFMassiveInvertedTildeKinematics &)=delete
The assignment operator is private and must never be called.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
InvertedTildeKinematics is the base class for the inverted 'tilde' kinematics being used for subtract...
ThreeVector< double > unit() const
-*- C++ -*-
double sqrt(int x)
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
constexpr ZeroUnit ZERO
constexpr auto sqr(const T &x) -> decltype(x *x)