herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
FFMassiveKinematics.h
1// -*- C++ -*-
2//
3// FFMassiveKinematics.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_FFMassiveKinematics_H
10#define HERWIG_FFMassiveKinematics_H
11//
12// This is the declaration of the FFMassiveKinematics class.
13//
14
15#include "DipoleSplittingKinematics.h"
16
17namespace Herwig {
18
19using namespace ThePEG;
20
30
31public:
32
37
38public:
39
45 virtual pair<double,double> kappaSupport(const DipoleSplittingInfo& dIndex) const;
46
51 virtual pair<double,double> xiSupport(const DipoleSplittingInfo& dIndex) const;
52
56 virtual pair<double,double> zBoundaries(Energy,
58 const DipoleSplittingKernel&) const {
59 return {0.0,1.0};
60 }
61
70 virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
71 const Lorentz5Momentum& pSpectator) const;
72
76 virtual Energy ptMax(Energy dScale,
77 double emX, double specX,
78 const DipoleSplittingInfo& dInfo,
79 const DipoleSplittingKernel& split) const;
80
84 virtual Energy ptMax(Energy dScale,
85 double, double,
86 const DipoleIndex& dIndex,
87 const DipoleSplittingKernel& split,
88 tPPtr emitter, tPPtr spectator) const;
89
93 virtual Energy ptMax(Energy,
94 double, double,
95 const DipoleIndex&,
96 const DipoleSplittingKernel&) const {
97 // Only the DipoleSplittingInfo version should be used for massive
98 // dipoles, for now anyway.
99 assert(false);
100 return ZERO;
101 }
102
106 virtual Energy QMax(Energy dScale,
107 double emX, double specX,
108 const DipoleSplittingInfo& dInfo,
109 const DipoleSplittingKernel& split) const;
110
114 virtual Energy QMax(Energy,
115 double, double,
116 const DipoleIndex&,
117 const DipoleSplittingKernel&) const {
118 // Only the DipoleSplittingInfo version should be used for massive
119 // dipoles, for now anyway.
120 assert(false);
121 return ZERO;
122 }
123
127 virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
128
132 virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
133
138 virtual double ptToRandom(Energy pt, Energy dScale,
139 double emX, double specX,
140 const DipoleIndex& dIndex,
141 const DipoleSplittingKernel& split) const;
142
148 virtual bool generateSplitting(double kappa, double xi, double phi,
149 DipoleSplittingInfo& dIndex,
150 const DipoleSplittingKernel& split);
151
157 virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
158 const Lorentz5Momentum& pSpectator,
159 const DipoleSplittingInfo& dInfo);
160
161public:
162
166 template <class T>
167 inline T rootOfKallen (T a, T b, T c) const {
168 if ( a*a + b*b + c*c - 2.*(a*b + a*c + b*c) > ZERO )
169 return sqrt(a*a + b*b + c*c - 2.*(a*b + a*c + b*c) ) ;
170 else
171 return ZERO; }
172
178 ThreeVector<double> rotateToZ (Lorentz5Momentum& pTarget, Lorentz5Momentum& p1){
179 ThreeVector<double> oldAxis = pTarget.vect().unit();
180 double ct = oldAxis.z(); double st = sqrt( 1.-sqr(ct) ); // cos,sin(theta)
181 double cp = oldAxis.x()/st; double sp = oldAxis.y()/st; // cos,sin(phi)
182 pTarget.setZ( pTarget.vect().mag() ); pTarget.setX( 0.*GeV ); pTarget.setY( 0.*GeV );
183 Lorentz5Momentum p1old = p1;
184 p1.setX( sp*p1old.x() - cp*p1old.y() );
185 p1.setY( ct*cp*p1old.x() + ct*sp*p1old.y() - st*p1old.z() );
186 p1.setZ( st*cp*p1old.x() + st*sp*p1old.y() + ct*p1old.z() );
187 return oldAxis;
188 }
189
190public:
191
199
205 void persistentInput(PersistentIStream & is, int version);
207
214 static void Init();
215
216protected:
217
224 virtual IBPtr clone() const;
225
230 virtual IBPtr fullclone() const;
232
233
234// If needed, insert declarations of virtual function defined in the
235// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
236
237
238private:
239
245
251
252};
253
254}
255
256#include "ThePEG/Utilities/ClassTraits.h"
257
258namespace ThePEG {
259
264template <>
265struct BaseClassTrait<Herwig::FFMassiveKinematics,1> {
268};
269
272template <>
273struct ClassTraits<Herwig::FFMassiveKinematics>
274 : public ClassTraitsBase<Herwig::FFMassiveKinematics> {
276 static string className() { return "Herwig::FFMassiveKinematics"; }
284 static string library() { return "HwDipoleShower.so"; }
285};
286
289}
290
291#endif /* HERWIG_FFMassiveKinematics_H */
DipoleIndex is used to index splitting generators for a particular dipole.
DipoleSplittingInfo contains all parameters to generate a full dipole splitting.
DipoleSplittingKernel is the base class for all kernels used within the dipole shower.
DipoleSplittingKinematics is the base class for dipole splittings as performed in the dipole shower.
FFMassiveKinematics implements massive splittings off a final-final dipole.
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo &) const
Return the pt given a virtuality.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual IBPtr clone() const
Make a simple clone of this object.
static ClassDescription< FFMassiveKinematics > initFFMassiveKinematics
The static object used to initialize the description of this class.
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo &) const
Return the virtuality given a pt.
virtual Energy dipoleScale(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator) const
Return the dipole scale associated to the given pair of emitter and spectator.
virtual void generateKinematics(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator, const DipoleSplittingInfo &dInfo)
Generate the full kinematics given emitter and spectator momentum and a previously completeted Dipole...
virtual bool generateSplitting(double kappa, double xi, double phi, DipoleSplittingInfo &dIndex, const DipoleSplittingKernel &split)
Generate splitting variables given three random numbers and the momentum fractions of the emitter and...
FFMassiveKinematics()
The default constructor.
FFMassiveKinematics & operator=(const FFMassiveKinematics &)=delete
The assignment operator is private and must never be called.
virtual pair< double, double > zBoundaries(Energy, const DipoleSplittingInfo &, const DipoleSplittingKernel &) const
Return the boundaries on the momentum fraction.
virtual Energy QMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum virtuality for the given dipole scale.
static void Init()
The standard Init function used to initialize the interfaces.
virtual double ptToRandom(Energy pt, Energy dScale, double emX, double specX, const DipoleIndex &dIndex, const DipoleSplittingKernel &split) const
Return the random number associated to the given pt.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThreeVector< double > rotateToZ(Lorentz5Momentum &pTarget, Lorentz5Momentum &p1)
Perform a rotation on both momenta such that the first one will point along the (positive) z axis.
virtual Energy QMax(Energy dScale, double emX, double specX, const DipoleSplittingInfo &dInfo, const DipoleSplittingKernel &split) const
Return the maximum virtuality for the given dipole scale.
virtual Energy ptMax(Energy dScale, double emX, double specX, const DipoleSplittingInfo &dInfo, const DipoleSplittingKernel &split) const
Return the maximum pt for the given dipole scale.
T rootOfKallen(T a, T b, T c) const
Triangular / Kallen function.
virtual pair< double, double > kappaSupport(const DipoleSplittingInfo &dIndex) const
Return the boundaries in between the evolution variable random number is to be sampled; the lower cuo...
virtual Energy ptMax(Energy dScale, double, double, const DipoleIndex &dIndex, const DipoleSplittingKernel &split, tPPtr emitter, tPPtr spectator) const
Return the maximum pt for the given dipole scale.
virtual pair< double, double > xiSupport(const DipoleSplittingInfo &dIndex) const
Return the boundaries in between the momentum fraction random number is to be sampled.
virtual Energy ptMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum pt for the given dipole scale.
ThreeVector< double > unit() const
-*- C++ -*-
ThePEG::Ptr< Particle >::transient_pointer tPPtr
double sqrt(int x)
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
constexpr ZeroUnit ZERO
constexpr auto sqr(const T &x) -> decltype(x *x)
static string className()
static string library()