herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.4
IFMassiveDecayKinematics.h
1 // -*- C++ -*-
2 //
3 // IFMassiveDecayKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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 
19 namespace Herwig {
20 
21  using namespace ThePEG;
22 
32 
33  public:
34 
41 
45  virtual ~IFMassiveDecayKinematics();
47 
48  public:
49 
55  virtual pair<double,double> kappaSupport(const DipoleSplittingInfo& dIndex) const;
56 
61  virtual pair<double,double> xiSupport(const DipoleSplittingInfo& dIndex) const;
62 
66  virtual pair<double,double> zBoundaries(Energy,
67  const DipoleSplittingInfo&,
68  const DipoleSplittingKernel&) const {
69  return {0.0,1.0};
70  }
71 
80  virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
81  const Lorentz5Momentum& pSpectator) const;
82 
88  virtual Energy recoilMassKin(const Lorentz5Momentum& pEmitter,
89  const Lorentz5Momentum& pSpectator) const;
90 
94  virtual Energy ptMax(Energy dScale,
95  double emX, double specX,
96  const DipoleSplittingInfo& dInfo,
97  const DipoleSplittingKernel& split) const;
98 
102  virtual Energy QMax(Energy dScale,
103  double emX, double specX,
104  const DipoleSplittingInfo& dInfo,
105  const DipoleSplittingKernel& split) const;
106 
110  virtual Energy ptMax(Energy,
111  double, double,
112  const DipoleIndex&,
113  const DipoleSplittingKernel&) const {
114  // Only the DipoleSplittingInfo version should be used for the decays.
115  assert(false);
116  return 0.0;
117  }
118 
122  virtual Energy QMax(Energy,
123  double, double,
124  const DipoleIndex&,
125  const DipoleSplittingKernel&) const {
126  // Only the DipoleSplittingInfo version should be used for the decays.
127  assert(false);
128  return 0.0;
129  }
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,
157  DipoleSplittingInfo& info,
158  const DipoleSplittingKernel& split);
159 
165  virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
166  const Lorentz5Momentum& pSpectator,
167  const DipoleSplittingInfo& dInfo);
168 
169  /*
170  * Return true if this splitting is of a dipole which contains
171  * a decayed parton and requires the remnant to absorb the recoil.
172  */
173  virtual bool isDecay() const { return true; }
174 
178  virtual void decayRecoil ( PList& recoilSystem ) {
179  PList::iterator beginRecoil = recoilSystem.begin();
180  PList::iterator endRecoil = recoilSystem.end();
181  const ThreeVector<double> transformMom = splitRecoilMomentum().vect();
182  ThePEG::UtilityBase::setMomentum(beginRecoil, endRecoil, transformMom );
183  }
184 
185 
186  public:
187 
191  template <class T>
192  inline double rootOfKallen (T a, T b, T c) const {
193  double sres=a*a + b*b + c*c - 2.*( a*b+a*c+b*c );
194  return sres>0.?sqrt( sres ):0.; }
195 
196  public:
197 
204  void persistentOutput(PersistentOStream & os) const;
205 
211  void persistentInput(PersistentIStream & is, int version);
213 
220  static void Init();
221 
222  protected:
223 
230  virtual IBPtr clone() const;
231 
236  virtual IBPtr fullclone() const;
238 
239 
240  // If needed, insert declarations of virtual function defined in the
241  // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
242 
243 
244  private:
245 
251 
257 
258  };
259 
260 }
261 
262 #include "ThePEG/Utilities/ClassTraits.h"
263 
264 namespace ThePEG {
265 
270  template <>
273  typedef Herwig::DipoleSplittingKinematics NthBase;
274  };
275 
278  template <>
280  : public ClassTraitsBase<Herwig::IFMassiveDecayKinematics> {
282  static string className() { return "Herwig::IFMassiveDecayKinematics"; }
290  static string library() { return "HwDipoleShower.so"; }
291  };
292 
295 }
296 
297 #endif /* HERWIG_IFMassiveDecayKinematics_H */
static ClassDescription< IFMassiveDecayKinematics > initIFMassiveDecayKinematics
The static object used to initialize the description of this class.
double sqrt(int x)
DipoleSplittingKinematics is the base class for dipole splittings as performed in the dipole shower...
virtual Energy ptMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum pt for the given dipole scale.
IFMassiveDecayKinematics implements massive splittings off an initial-final decay dipole...
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
DipoleIndex is used to index splitting generators for a particular dipole.
virtual Energy QMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum virtuality for the given dipole scale.
virtual void decayRecoil(PList &recoilSystem)
Perform the recoil in the case of a decayed parton.
-*- C++ -*-
DipoleSplittingInfo contains all parameters to generate a full dipole splitting.
virtual pair< double, double > zBoundaries(Energy, const DipoleSplittingInfo &, const DipoleSplittingKernel &) const
Return the boundaries on the momentum fraction.
double rootOfKallen(T a, T b, T c) const
Triangular / Kallen function.
static void setMomentum(PType &p, const Momentum3 &q)
DipoleSplittingKernel is the base class for all kernels used within the dipole shower.
list< PPtr > PList