herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
IILightKinematics.h
1 // -*- C++ -*-
2 //
3 // IILightKinematics.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_IILightKinematics_H
10 #define HERWIG_IILightKinematics_H
11 //
12 // This is the declaration of the IILightKinematics class.
13 //
14 
15 #include "DipoleSplittingKinematics.h"
16 
17 namespace Herwig {
18 
19 using namespace ThePEG;
20 
32 
33  public:
34 
41 
45  virtual ~IILightKinematics();
47 
48  public:
49 
53  virtual Energy ptMax(Energy dScale,
54  double emX, double specX,
55  const DipoleIndex&,
56  const DipoleSplittingKernel&) const;
57 
61  virtual Energy QMax(Energy dScale,
62  double emX, double specX,
63  const DipoleIndex& dIndex,
64  const DipoleSplittingKernel&) const;
65 
69  virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
70 
74  virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
75 
79  virtual pair<double,double> zBoundaries(Energy pt,
80  const DipoleSplittingInfo& dInfo,
81  const DipoleSplittingKernel& split) const;
82 
88  virtual bool generateSplitting(double kappa, double xi, double phi,
89  DipoleSplittingInfo& dIndex,
90  const DipoleSplittingKernel&);
91 
97  virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
98  const Lorentz5Momentum& pSpectator,
99  const DipoleSplittingInfo& dInfo);
100 
106  virtual bool doesTransform () const { return theCollinearScheme || didCollinear; }
107 
111  virtual void setTransformation () ;
112 
113  /*
114  * perform the transformation, if existing
115  */
116  virtual void transform (PPtr& part) {
117  if ( !theCollinearScheme && !didCollinear ) return;
118 
119  Lorentz5Momentum mom = part->momentum();
120 
121  // If particle has SpinInfo check that we're
122  // not dealing with an intermediate spectator.
123  if ( part->spinInfo()
124  && !(part->spinInfo()->timelike() && part->children().size() == 1 )
125  && !(!part->spinInfo()->timelike() && part->parents()[0]->children().size() == 1 ) ) {
126 
127  if ( !theTransformationCalculated )
128  setTransformation();
129 
130  part->spinInfo()->transform(mom,theRecoilTransformation);
131  }
132 
133  part->set5Momentum(mom-(2.*(KplusKtilde*mom)/KplusKtilde2)*KplusKtilde+(2.*(Ktilde*mom)/K2)*K);
134 
135  }
136 
137  /*
138  * SW 30/01/2019: Test feature only, not for release.
139  * Return true to only apply the transformation to non-coloured particles.
140  * Note this requires careful handling in DipoleEventRecord
141  */
142  //virtual bool transformHardOnly() const { return theTransformHardOnly; }
143 
144 
149  // virtual void transformHard ( PPtr& hard ) {
150  // if ( !theTransformationCalculated ) {
151  // setTransformation();
152  // theTransformationCalculated = true;
153  // }
154  // hard->setMomentum(splitRecoilMomentum());
155  // hard->rescaleMass();
156  // }
157 
158 
159  public:
160 
167  void persistentOutput(PersistentOStream & os) const;
168 
174  void persistentInput(PersistentIStream & is, int version);
176 
183  static void Init();
184 
185  protected:
186 
193  virtual IBPtr clone() const;
194 
199  virtual IBPtr fullclone() const;
201 
202 
203  // If needed, insert declarations of virtual function defined in the
204  // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
205 
206 
207  private:
208 
214 
219  IILightKinematics & operator=(const IILightKinematics &) = delete;
220 
221  private:
222 
227 
228  bool didCollinear;
229 
234  //bool theTransformHardOnly;
235 
236  Lorentz5Momentum K;
237  Energy2 K2;
238  Lorentz5Momentum Ktilde;
239  Lorentz5Momentum KplusKtilde;
240  Energy2 KplusKtilde2;
241 
249 
255 
256  };
257 
258 }
259 
260 #include "ThePEG/Utilities/ClassTraits.h"
261 
262 namespace ThePEG {
263 
268  template <>
269  struct BaseClassTrait<Herwig::IILightKinematics,1> {
271  typedef Herwig::DipoleSplittingKinematics NthBase;
272  };
273 
276  template <>
277  struct ClassTraits<Herwig::IILightKinematics>
278  : public ClassTraitsBase<Herwig::IILightKinematics> {
280  static string className() { return "Herwig::IILightKinematics"; }
288  static string library() { return "HwDipoleShower.so"; }
289  };
290 
293 }
294 
295 #endif /* HERWIG_IILightKinematics_H */
ThePEG::Ptr< Particle >::pointer PPtr
DipoleSplittingKinematics is the base class for dipole splittings as performed in the dipole shower...
virtual bool doesTransform() const
Return true, if there is a transformation which should be applied to all other final state particles ...
IILightKinematics implements massless splittings off an initial-initial dipole.
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
DipoleIndex is used to index splitting generators for a particular dipole.
static ClassDescription< IILightKinematics > initIILightKinematics
The static object used to initialize the description of this class.
bool theTransformationCalculated
Bool to avoid unecessary recalculation of the Lorentz transformation.
Lorentz5Momentum K
SW 30/01/2019: Test feature only, not for release.
LorentzRotation theRecoilTransformation
Store the LorentzRotation object equivalent to the transformation applied to the outgoing particles...
-*- C++ -*-
DipoleSplittingInfo contains all parameters to generate a full dipole splitting.
DipoleSplittingKernel is the base class for all kernels used within the dipole shower.
bool theCollinearScheme
Wether or not to choose the `collinear&#39; scheme.