herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
FIMassiveDecayKinematics.h
1// -*- C++ -*-
2//
3// FIMassiveDecayKinematics.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_FIMassiveDecayKinematics_H
10#define HERWIG_FIMassiveDecayKinematics_H
11//
12// This is the declaration of the FIMassiveDecayKinematics 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 ptMax(Energy dScale,
95 double, double,
96 const DipoleIndex& dIndex,
97 const DipoleSplittingKernel& split,
98 tPPtr emitter, tPPtr spectator) const;
99
103 virtual Energy QMax(Energy dScale,
104 double emX, double specX,
105 const DipoleSplittingInfo& dInfo,
106 const DipoleSplittingKernel& split) const;
107
111 virtual Energy ptMax(Energy,
112 double, double,
113 const DipoleIndex&,
114 const DipoleSplittingKernel&) const {
115 // Only the DipoleSplittingInfo version should be used for the decays.
116 assert(false);
117 return ZERO;
118 }
119
123 virtual Energy QMax(Energy,
124 double, double,
125 const DipoleIndex&,
126 const DipoleSplittingKernel&) const {
127 // Only the DipoleSplittingInfo version should be used for the decays.
128 assert(false);
129 return ZERO;
130 }
131
135 virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
136
140 virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
141
146 virtual double ptToRandom(Energy pt, Energy dScale,
147 double emX, double specX,
148 const DipoleIndex& dIndex,
149 const DipoleSplittingKernel& split) const;
150
156 virtual bool generateSplitting(double kappa, double xi, double phi,
158 const DipoleSplittingKernel& split);
159
165 virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
166 const Lorentz5Momentum& pSpectator,
167 const DipoleSplittingInfo& dInfo);
168
172 virtual Lorentz5Momentum nVector(const Lorentz5Momentum& pEmitter, const Lorentz5Momentum& pSpectator, const DipoleSplittingInfo& dInfo) const;
173
174 /*
175 * Return true if this splitting is of a dipole which contains
176 * a decayed parton and requires the remnant to absorb the recoil.
177 */
178 virtual bool isDecay() const { return true; }
179
183 virtual void decayRecoil ( PList& recoilSystem ) {
184 PList::iterator beginRecoil = recoilSystem.begin();
185 PList::iterator endRecoil = recoilSystem.end();
186
187 // This is the final momentum that we must transform the system to
188 const Momentum3 transformMom = splitRecoilMomentum().vect();
189
190 // Calculate required Lorentz rotation
191 Lorentz5Momentum sum = ThePEG::UtilityBase::sumMomentum(beginRecoil, endRecoil);
194 (Lorentz5Momentum(transformMom, sqrt(transformMom.mag2() + sum.m2()))) * rot;
195
196 // Transform the particle spinInfo if required
197 for ( const auto& p : recoilSystem ) {
198 if ( p->spinInfo() )
199 p->spinInfo()->transform(p->momentum(),rot);
200 }
201
202 ThePEG::UtilityBase::transform(beginRecoil, endRecoil, rot );
203 }
204
205
206 public:
207
211 template <class T>
212 inline T rootOfKallen (T a, T b, T c) const {
213 if ( a*a + b*b + c*c - 2.*(a*b + a*c + b*c) > ZERO )
214 return sqrt(a*a + b*b + c*c - 2.*(a*b + a*c + b*c) ) ;
215 else
216 return ZERO; }
217
218 public:
219
227
233 void persistentInput(PersistentIStream & is, int version);
235
242 static void Init();
243
244 protected:
245
252 virtual IBPtr clone() const;
253
258 virtual IBPtr fullclone() const;
260
261
262 // If needed, insert declarations of virtual function defined in the
263 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
264
265
266 private:
267
273
279
280 };
281
282}
283
284#include "ThePEG/Utilities/ClassTraits.h"
285
286namespace ThePEG {
287
292 template <>
293 struct BaseClassTrait<Herwig::FIMassiveDecayKinematics,1> {
296 };
297
300 template <>
301 struct ClassTraits<Herwig::FIMassiveDecayKinematics>
302 : public ClassTraitsBase<Herwig::FIMassiveDecayKinematics> {
304 static string className() { return "Herwig::FIMassiveDecayKinematics"; }
312 static string library() { return "HwDipoleShower.so"; }
313 };
314
317}
318
319#endif /* HERWIG_FIMassiveDecayKinematics_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.
FIMassiveDecayKinematics implements massive splittings off a final-initial decay dipole.
virtual void decayRecoil(PList &recoilSystem)
Perform the recoil in the case of a decayed parton.
virtual Energy ptMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum pt for the given dipole scale.
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 generateKinematics(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator, const DipoleSplittingInfo &dInfo)
Generate the full kinematics given emitter and spectator momentum and a previously completeted Dipole...
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo &) const
Return the pt given a virtuality.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual Energy QMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum virtuality for the given dipole scale.
virtual Lorentz5Momentum nVector(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator, const DipoleSplittingInfo &dInfo) const
Return the nVector as required for spin correlations.
static void Init()
The standard Init function used to initialize the interfaces.
T rootOfKallen(T a, T b, T c) const
Triangular / Kallen function.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
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 bool isDecay() const
SW 30/01/2019: Test feature only, not for release.
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 dipoleScale(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator) const
Return the dipole scale associated to the given pair of emitter and spectator.
virtual pair< double, double > zBoundaries(Energy, const DipoleSplittingInfo &, const DipoleSplittingKernel &) const
Return the boundaries on the momentum fraction.
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.
virtual Energy recoilMassKin(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator) const
Return the mass of the system absorbing the recoil in the dipole splitting.
FIMassiveDecayKinematics()
The default constructor.
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 IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo &) const
Return the virtuality given a pt.
FIMassiveDecayKinematics & operator=(const FIMassiveDecayKinematics &)=delete
The assignment operator is private and must never be called.
virtual pair< double, double > xiSupport(const DipoleSplittingInfo &dIndex) const
Return the boundaries in between the momentum fraction random number is to be sampled.
static ClassDescription< FIMassiveDecayKinematics > initFIMassiveDecayKinematics
The static object used to initialize the description of this class.
LorentzRotation & transform(const LorentzRotation &lt)
-*- C++ -*-
ThePEG::Ptr< Particle >::transient_pointer tPPtr
double sqrt(int x)
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
constexpr ZeroUnit ZERO
list< PPtr > PList
static string className()
static string library()
static LorentzMomentum sumMomentum(const Cont &c)
static void transform(Iterator first, Iterator last, const LorentzRotation &boost)
static LorentzRotation transformFromCMS(const LV &p)
static LorentzRotation transformToCMS(const LV &sum, LV zAxis)