herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 
19 namespace Herwig {
20 
21  using namespace ThePEG;
22 
32 
33  public:
34 
41 
45  virtual ~FIMassiveDecayKinematics();
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 ptMax(Energy dScale,
103  double, double,
104  const DipoleIndex& dIndex,
105  const DipoleSplittingKernel& split,
106  tPPtr emitter, tPPtr spectator) const;
107 
111  virtual Energy QMax(Energy dScale,
112  double emX, double specX,
113  const DipoleSplittingInfo& dInfo,
114  const DipoleSplittingKernel& split) const;
115 
119  virtual Energy ptMax(Energy,
120  double, double,
121  const DipoleIndex&,
122  const DipoleSplittingKernel&) const {
123  // Only the DipoleSplittingInfo version should be used for the decays.
124  assert(false);
125  return ZERO;
126  }
127 
131  virtual Energy QMax(Energy,
132  double, double,
133  const DipoleIndex&,
134  const DipoleSplittingKernel&) const {
135  // Only the DipoleSplittingInfo version should be used for the decays.
136  assert(false);
137  return ZERO;
138  }
139 
143  virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
144 
148  virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
149 
154  virtual double ptToRandom(Energy pt, Energy dScale,
155  double emX, double specX,
156  const DipoleIndex& dIndex,
157  const DipoleSplittingKernel& split) const;
158 
164  virtual bool generateSplitting(double kappa, double xi, double phi,
165  DipoleSplittingInfo& info,
166  const DipoleSplittingKernel& split);
167 
173  virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
174  const Lorentz5Momentum& pSpectator,
175  const DipoleSplittingInfo& dInfo);
176 
180  virtual Lorentz5Momentum nVector(const Lorentz5Momentum& pEmitter, const Lorentz5Momentum& pSpectator, const DipoleSplittingInfo& dInfo) const;
181 
182  /*
183  * Return true if this splitting is of a dipole which contains
184  * a decayed parton and requires the remnant to absorb the recoil.
185  */
186  virtual bool isDecay() const { return true; }
187 
191  virtual void decayRecoil ( PList& recoilSystem ) {
192  PList::iterator beginRecoil = recoilSystem.begin();
193  PList::iterator endRecoil = recoilSystem.end();
194 
195  // This is the final momentum that we must transform the system to
196  const Momentum3 transformMom = splitRecoilMomentum().vect();
197 
198  // Calculate required Lorentz rotation
199  Lorentz5Momentum sum = ThePEG::UtilityBase::sumMomentum(beginRecoil, endRecoil);
202  (Lorentz5Momentum(transformMom, sqrt(transformMom.mag2() + sum.m2()))) * rot;
203 
204  // Transform the particle spinInfo if required
205  for ( const auto& p : recoilSystem ) {
206  if ( p->spinInfo() )
207  p->spinInfo()->transform(p->momentum(),rot);
208  }
209 
210  ThePEG::UtilityBase::transform(beginRecoil, endRecoil, rot );
211  }
212 
213 
214  public:
215 
219  template <class T>
220  inline T rootOfKallen (T a, T b, T c) const {
221  if ( a*a + b*b + c*c - 2.*(a*b + a*c + b*c) > ZERO )
222  return sqrt(a*a + b*b + c*c - 2.*(a*b + a*c + b*c) ) ;
223  else
224  return ZERO; }
225 
226  public:
227 
234  void persistentOutput(PersistentOStream & os) const;
235 
241  void persistentInput(PersistentIStream & is, int version);
243 
250  static void Init();
251 
252  protected:
253 
260  virtual IBPtr clone() const;
261 
266  virtual IBPtr fullclone() const;
268 
269 
270  // If needed, insert declarations of virtual function defined in the
271  // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
272 
273 
274  private:
275 
281 
286  FIMassiveDecayKinematics & operator=(const FIMassiveDecayKinematics &) = delete;
287 
288  };
289 
290 }
291 
292 #include "ThePEG/Utilities/ClassTraits.h"
293 
294 namespace ThePEG {
295 
300  template <>
301  struct BaseClassTrait<Herwig::FIMassiveDecayKinematics,1> {
303  typedef Herwig::DipoleSplittingKinematics NthBase;
304  };
305 
308  template <>
309  struct ClassTraits<Herwig::FIMassiveDecayKinematics>
310  : public ClassTraitsBase<Herwig::FIMassiveDecayKinematics> {
312  static string className() { return "Herwig::FIMassiveDecayKinematics"; }
320  static string library() { return "HwDipoleShower.so"; }
321  };
322 
325 }
326 
327 #endif /* HERWIG_FIMassiveDecayKinematics_H */
static ClassDescription< FIMassiveDecayKinematics > initFIMassiveDecayKinematics
The static object used to initialize the description of this class.
T rootOfKallen(T a, T b, T c) const
Triangular / Kallen function.
double sqrt(int x)
DipoleSplittingKinematics is the base class for dipole splittings as performed in the dipole shower...
static void transform(Iterator first, Iterator last, const LorentzRotation &boost)
static LorentzRotation transformToCMS(const LV &sum, LV zAxis)
virtual bool isDecay() const
SW 30/01/2019: Test feature only, not for release.
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
DipoleIndex is used to index splitting generators for a particular dipole.
virtual void decayRecoil(PList &recoilSystem)
Perform the recoil in the case of a decayed parton.
virtual Energy QMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum virtuality for the given dipole scale.
static LorentzMomentum sumMomentum(const Cont &c)
ThePEG::Ptr< Particle >::transient_pointer tPPtr
FIMassiveDecayKinematics implements massive splittings off a final-initial decay dipole.
virtual Energy ptMax(Energy, double, double, const DipoleIndex &, const DipoleSplittingKernel &) const
Return the maximum pt for the given dipole scale.
-*- C++ -*-
LorentzRotation & transform(const LorentzRotation &lt)
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.
constexpr ZeroUnit ZERO
static LorentzRotation transformFromCMS(const LV &p)
DipoleSplittingKernel is the base class for all kernels used within the dipole shower.
list< PPtr > PList