herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
IFMassiveDecayKinematics.h
1// -*- C++ -*-
2//
3// IFMassiveDecayKinematics.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_IFMassiveDecayKinematics_H
10#define HERWIG_IFMassiveDecayKinematics_H
11//
12// This is the declaration of the IFMassiveDecayKinematics class.
13//
14
15#include "DipoleSplittingKinematics.h"
16#include "ThePEG/EventRecord/Particle.h"
17#include "ThePEG/Utilities/UtilityBase.h"
18
19namespace Herwig {
20
21 using namespace ThePEG;
22
32
33 public:
34
39
40 public:
41
47 virtual pair<double,double> kappaSupport(const DipoleSplittingInfo& dIndex) const;
48
53 virtual pair<double,double> xiSupport(const DipoleSplittingInfo& dIndex) const;
54
58 virtual pair<double,double> zBoundaries(Energy,
60 const DipoleSplittingKernel&) const {
61 return {0.0,1.0};
62 }
63
72 virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
73 const Lorentz5Momentum& pSpectator) const;
74
80 virtual Energy recoilMassKin(const Lorentz5Momentum& pEmitter,
81 const Lorentz5Momentum& pSpectator) const;
82
86 virtual Energy ptMax(Energy dScale,
87 double emX, double specX,
88 const DipoleSplittingInfo& dInfo,
89 const DipoleSplittingKernel& split) const;
90
94 virtual Energy QMax(Energy dScale,
95 double emX, double specX,
96 const DipoleSplittingInfo& dInfo,
97 const DipoleSplittingKernel& split) const;
98
102 virtual Energy ptMax(Energy,
103 double, double,
104 const DipoleIndex&,
105 const DipoleSplittingKernel&) const {
106 // Only the DipoleSplittingInfo version should be used for the decays.
107 assert(false);
108 return 0.0;
109 }
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 the decays.
119 assert(false);
120 return 0.0;
121 }
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,
150 const DipoleSplittingKernel& split);
151
157 virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
158 const Lorentz5Momentum& pSpectator,
159 const DipoleSplittingInfo& dInfo);
160
161 /*
162 * Return true if this splitting is of a dipole which contains
163 * a decayed parton and requires the remnant to absorb the recoil.
164 */
165 virtual bool isDecay() const { return true; }
166
170 virtual void decayRecoil ( PList& recoilSystem ) {
171 PList::iterator beginRecoil = recoilSystem.begin();
172 PList::iterator endRecoil = recoilSystem.end();
173 const ThreeVector<double> transformMom = splitRecoilMomentum().vect();
174 ThePEG::UtilityBase::setMomentum(beginRecoil, endRecoil, transformMom );
175 }
176
177
178 public:
179
183 template <class T>
184 inline double rootOfKallen (T a, T b, T c) const {
185 double sres=a*a + b*b + c*c - 2.*( a*b+a*c+b*c );
186 return sres>0.?sqrt( sres ):0.; }
187
188 public:
189
197
203 void persistentInput(PersistentIStream & is, int version);
205
212 static void Init();
213
214 protected:
215
222 virtual IBPtr clone() const;
223
228 virtual IBPtr fullclone() const;
230
231
232 // If needed, insert declarations of virtual function defined in the
233 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
234
235
236 private:
237
243
249
250 };
251
252}
253
254#include "ThePEG/Utilities/ClassTraits.h"
255
256namespace ThePEG {
257
262 template <>
263 struct BaseClassTrait<Herwig::IFMassiveDecayKinematics,1> {
266 };
267
270 template <>
271 struct ClassTraits<Herwig::IFMassiveDecayKinematics>
272 : public ClassTraitsBase<Herwig::IFMassiveDecayKinematics> {
274 static string className() { return "Herwig::IFMassiveDecayKinematics"; }
282 static string library() { return "HwDipoleShower.so"; }
283 };
284
287}
288
289#endif /* HERWIG_IFMassiveDecayKinematics_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.
const Lorentz5Momentum & splitRecoilMomentum() const
Return the momentum of the recoil system after splitting.
IFMassiveDecayKinematics implements massive splittings off an initial-final decay dipole.
virtual bool isDecay() const
SW 30/01/2019: Test feature only, not for release.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
IFMassiveDecayKinematics()
The default constructor.
virtual Energy QMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum virtuality for the given dipole scale.
virtual Energy ptMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) 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 dScale, double emX, double specX, const DipoleSplittingInfo &dInfo, const DipoleSplittingKernel &split) const
Return the maximum pt for the given dipole scale.
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 Energy QMax(Energy dScale, double emX, double specX, const DipoleSplittingInfo &dInfo, const DipoleSplittingKernel &split) const
Return the maximum virtuality for the given dipole scale.
static void Init()
The standard Init function used to initialize the interfaces.
virtual Energy recoilMassKin(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator) const
Return the mass of the system absorbing the recoil in the dipole splitting.
double 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 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.
virtual void decayRecoil(PList &recoilSystem)
Perform the recoil in the case of a decayed parton.
virtual pair< double, double > zBoundaries(Energy, const DipoleSplittingInfo &, const DipoleSplittingKernel &) const
Return the boundaries on the momentum fraction.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
static ClassDescription< IFMassiveDecayKinematics > initIFMassiveDecayKinematics
The static object used to initialize the description of this class.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual bool generateSplitting(double kappa, double xi, double phi, DipoleSplittingInfo &info, const DipoleSplittingKernel &split)
Generate splitting variables given three random numbers and the momentum fractions of the emitter and...
virtual Energy dipoleScale(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator) const
Return the dipole scale associated to the given pair of emitter and spectator.
IFMassiveDecayKinematics & operator=(const IFMassiveDecayKinematics &)=delete
The assignment operator is private and must never be called.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo &) const
Return the pt given a virtuality.
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo &) const
Return the virtuality given a pt.
-*- C++ -*-
double sqrt(int x)
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
list< PPtr > PList
static string className()
static string library()
static void setMomentum(PType &p, const Momentum3 &q)