herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
DipoleSplittingKinematics.h
1 // -*- C++ -*-
2 //
3 // DipoleSplittingKinematics.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_DipoleSplittingKinematics_H
10 #define HERWIG_DipoleSplittingKinematics_H
11 //
12 // This is the declaration of the DipoleSplittingKinematics class.
13 //
14 
15 #include "ThePEG/Handlers/HandlerBase.h"
16 #include "ThePEG/Vectors/Lorentz5Vector.h"
17 
18 #include "ThePEG/EventRecord/Particle.h"
19 #include "ThePEG/Utilities/UtilityBase.h"
20 
21 #include "Herwig/Shower/Dipole/Utility/DipoleMCCheck.h"
22 
23 namespace Herwig {
24 
25  using namespace ThePEG;
26 
27  class DipoleIndex;
28  class DipoleSplittingInfo;
29  class DipoleSplittingKernel;
30 
42 
43  public:
44 
51 
55  virtual ~DipoleSplittingKinematics();
57 
58  public:
59 
65  virtual pair<double,double> kappaSupport(const DipoleSplittingInfo&) const {
66  return {0.0,1.0};
67  }
68 
73  virtual pair<double,double> xiSupport(const DipoleSplittingInfo&) const {
74  return {0.0,1.0};
75  }
76 
85  virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
86  const Lorentz5Momentum& pSpectator) const {
87  // MEMinBias produces non-zero zeros.
88  if(abs(pEmitter*pSpectator)<0.0000001*GeV2)return ZERO;
89  assert(pEmitter*pSpectator >= ZERO);
90  return sqrt(2.*pEmitter*pSpectator);
91  }
92 
98  virtual Energy recoilMassKin(const Lorentz5Momentum&,
99  const Lorentz5Momentum& pSpectator) const {
100  return pSpectator.m();
101  }
102 
106  virtual Energy ptMax(Energy dScale,
107  double emX, double specX,
108  const DipoleIndex& dIndex,
109  const DipoleSplittingKernel& split) const =0;
110 
114  virtual Energy ptMax(Energy dScale,
115  double emX, double specX,
116  const DipoleSplittingInfo& dInfo,
117  const DipoleSplittingKernel& split) const;
118 
122  virtual Energy QMax(Energy dScale,
123  double emX, double specX,
124  const DipoleIndex& dIndex,
125  const DipoleSplittingKernel& split) const =0;
126 
130  virtual Energy QMax(Energy dScale,
131  double emX, double specX,
132  const DipoleSplittingInfo& dInfo,
133  const DipoleSplittingKernel& split) const;
134 
138  virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const = 0;
139 
143  virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const = 0;
144 
148  virtual Energy IRCutoff() const { return theIRCutoff; }
149 
154  double xMin() const { return theXMin; }
155 
159  Energy generatePt(double r, Energy dScale,
160  double emX, double specX,
161  const DipoleIndex& dIndex,
162  const DipoleSplittingKernel& split,
163  double& weight) const;
164 
169  virtual double ptToRandom(Energy pt, Energy dScale,
170  double emX, double specX,
171  const DipoleIndex& dIndex,
172  const DipoleSplittingKernel& split) const;
173 
177  virtual pair<double,double> zBoundaries(Energy pt,
178  const DipoleSplittingInfo& dInfo,
179  const DipoleSplittingKernel& split) const = 0;
180 
185 
186  FlatZ = 0,
187  OneOverZ,
188  OneOverOneMinusZ,
189  OneOverZOneMinusZ
190 
191  };
192 
196  double generateZ(double r, Energy pt, int sampling,
197  const DipoleSplittingInfo& dInfo,
198  const DipoleSplittingKernel& split,
199  double& weight) const;
200 
206  virtual bool generateSplitting(double kappa, double xi, double phi,
207  DipoleSplittingInfo& info,
208  const DipoleSplittingKernel&) = 0;
209 
216  double jacobian() const { return theJacobian; }
217 
223  virtual bool haveOverestimate() const { return false; }
224 
229  virtual double jacobianOverestimate() const { return -1.; }
230 
234  Energy lastPt() const { return theLastPt; }
235 
239  double lastZ() const { return theLastZ; }
240 
245  // Do not need in current implementation,
246  // using lastSplittingParameters instead.
247  //double lastZPrime() const { return theLastZPrime; }
248 
252  double lastPhi() const { return theLastPhi; }
253 
258  double lastEmitterZ() const { return theLastEmitterZ; }
259 
264  double lastSpectatorZ() const { return theLastSpectatorZ; }
265 
271  const vector<double>& lastSplittingParameters() const { return theLastSplittingParameters; }
272 
278  void prepareSplitting(DipoleSplittingInfo& dInfo);
279 
280  public:
281 
287  virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
288  const Lorentz5Momentum& pSpectator,
289  const DipoleSplittingInfo& dInfo) = 0;
290 
291 
292 
296  const Lorentz5Momentum& lastEmitterMomentum() const { return theEmitterMomentum; }
297 
301  const Lorentz5Momentum& lastSpectatorMomentum() const { return theSpectatorMomentum; }
302 
306  const Lorentz5Momentum& lastEmissionMomentum() const { return theEmissionMomentum; }
307 
308  /*
309  * Return true, if there is a transformation which should
310  * be applied to all other final state particles except the ones
311  * involved in the splitting after having performed the splitting.
312  */
313  virtual bool doesTransform () const { return false; }
314 
315  /*
316  * Use the Dipole scale instead of hardpt for z-boundaries.
317  */
318  int openZBoundaries() const { return theOpenZBoundaries; }
319 
320  /*
321  * perform the transformation if required.
322  */
323  virtual Lorentz5Momentum transform (const Lorentz5Momentum& p) const { return p; }
324 
325  /*
326  * Return true if this splitting is of a dipole which contains
327  * a decayed parton and requires the remnant to absorb the recoil.
328  */
329  virtual bool isDecay() const { return false; }
330 
334  //virtual Lorentz5Momentum decayRecoil ( const Lorentz5Momentum& p, const int) { return p; }
335 
339  virtual void decayRecoil ( PList& ) {};
340 
341  // {;}
342 
343  protected:
344 
349  Lorentz5Momentum getKt(const Lorentz5Momentum& p1,
350  const Lorentz5Momentum& p2,
351  Energy pt,
352  double phi,
353  bool spacelike = false) const;
354 
361  void jacobian(double w) { theJacobian = w; }
362 
366  void lastPt(Energy p) { theLastPt = p; }
367 
371  void lastZ(double z) { theLastZ = z; }
372 
376  // Do not need in current implementation,
377  // using lastSplittingParameters instead.
378  //void lastZPrime(double zPrime) { theLastZPrime = zPrime; }
379 
383  void lastPhi(double p) { theLastPhi = p; }
384 
389  void lastEmitterZ(double z) { theLastEmitterZ = z; }
390 
395  void lastSpectatorZ(double z) { theLastSpectatorZ = z; }
396 
402  vector<double>& splittingParameters() { return theLastSplittingParameters; }
403 
407  void emitterMomentum(const Lorentz5Momentum& p) { theEmitterMomentum = p; }
408 
412  void spectatorMomentum(const Lorentz5Momentum& p) { theSpectatorMomentum = p; }
413 
417  void emissionMomentum(const Lorentz5Momentum& p) { theEmissionMomentum = p; }
418 
423  //void recoilMomentum( const Lorentz5Momentum& mom ) { theRecoilMomentum = mom; }
424 
428  void splitRecoilMomentum( const Lorentz5Momentum& mom ) { theSplitRecoilMomentum = mom; }
429 
434  //const Lorentz5Momentum& recoilMomentum() const { return theRecoilMomentum; }
435 
439  const Lorentz5Momentum& splitRecoilMomentum() const { return theSplitRecoilMomentum; }
440 
441  public:
442 
449  static void Init();
450 
451  public:
452 
459  void persistentOutput(PersistentOStream & os) const;
460 
466  void persistentInput(PersistentIStream & is, int version);
468 
469 
470  // If needed, insert declarations of virtual function defined in the
471  // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
472 
473  private:
474 
479  Energy theIRCutoff;
480 
485  double theXMin;
486 
490  double theJacobian;
491 
495  Energy theLastPt;
496 
500  double theLastZ;
501 
507  // Do not need in current implementation,
508  // using lastSplittingParameters instead.
509  //double theLastZPrime;
510 
514  double theLastPhi;
515 
521 
527 
534 
538  Lorentz5Momentum theEmitterMomentum;
539 
543  Lorentz5Momentum theEmissionMomentum;
544 
548  Lorentz5Momentum theSpectatorMomentum;
549 
554  //Lorentz5Momentum theRecoilMomentum;
555 
559  Lorentz5Momentum theSplitRecoilMomentum;
560 
561 
562 
563  int theOpenZBoundaries;
564 
565  protected:
566 
570  Ptr<DipoleMCCheck>::ptr theMCCheck;
571 
572  private:
573 
579 
584  DipoleSplittingKinematics & operator=(const DipoleSplittingKinematics &) = delete;
585 
586  };
587 
588 }
589 
590 #include "ThePEG/Utilities/ClassTraits.h"
591 
592 namespace ThePEG {
593 
598  template <>
599  struct BaseClassTrait<Herwig::DipoleSplittingKinematics,1> {
601  typedef HandlerBase NthBase;
602  };
603 
606  template <>
607  struct ClassTraits<Herwig::DipoleSplittingKinematics>
608  : public ClassTraitsBase<Herwig::DipoleSplittingKinematics> {
610  static string className() { return "Herwig::DipoleSplittingKinematics"; }
618  static string library() { return "HwDipoleShower.so"; }
619  };
620 
623 }
624 
625 #endif /* HERWIG_DipoleSplittingKinematics_H */
Lorentz5Momentum theEmitterMomentum
The emitter&#39;s momentum after the splitting.
double lastSpectatorZ() const
Return the momentum fraction, by which the spectator&#39;s momentum fraction should be divided after the ...
double sqrt(int x)
DipoleSplittingKinematics is the base class for dipole splittings as performed in the dipole shower...
const Lorentz5Momentum & lastEmissionMomentum() const
Return the emission&#39;s momentum.
void lastPt(Energy p)
Set the last generated pt.
double jacobian() const
Get the splitting phasespace weight associated to the last call to generateSplitting.
const vector< double > & lastSplittingParameters() const
Return any additional parameters needed to evaluate the splitting kernel or to generate the full spli...
double lastPhi() const
Return the last calculated zPrime for massive FF and decay dipoles.
double theLastEmitterZ
The momentum fraction, by which the emitter&#39;s momentum fraction should be divided after the splitting...
virtual double jacobianOverestimate() const
Return the overestimated jacobian for the last generated parameters.
DipoleIndex is used to index splitting generators for a particular dipole.
double theJacobian
The last calculated splitting phase space weight.
const Lorentz5Momentum & splitRecoilMomentum() const
Return the momentum of the recoil system before splitting.
Energy theLastPt
The last generated pt.
void lastSpectatorZ(double z)
Set the momentum fraction, by which the spectator&#39;s momentum fraction should be divided after the spl...
virtual pair< double, double > xiSupport(const DipoleSplittingInfo &) const
Return the boundaries in between the momentum fraction random number is to be sampled.
vector< double > theLastSplittingParameters
Any additional parameters needed to evaluate the splitting kernel or to generate the full splitting...
static AbstractClassDescription< DipoleSplittingKinematics > initDipoleSplittingKinematics
The static object used to initialize the description of this class.
double xMin() const
Return the minimum momentum fraction for incoming partons.
Lorentz5Momentum theSplitRecoilMomentum
The momentum of the recoil system used in decay dipole kinematics.
Lorentz5Momentum theSpectatorMomentum
The spectator&#39;s momentum after the splitting.
void splitRecoilMomentum(const Lorentz5Momentum &mom)
Set the momentum of the recoil system before the splitting.
double lastEmitterZ() const
Return the momentum fraction, by which the emitter&#39;s momentum fraction should be divided after the sp...
const Lorentz5Momentum & lastEmitterMomentum() const
Return the emitter&#39;s momentum after the splitting.
const Lorentz5Momentum & lastSpectatorMomentum() const
Return the spectator&#39;s momentum after the splitting.
ZSamplingOptions
Enumerate the variants of sampling z.
virtual void decayRecoil(PList &)
Perform the recoil in the case of a decayed parton.
Ptr< DipoleMCCheck >::ptr theMCCheck
Pointer to a check histogram object.
void lastEmitterZ(double z)
Set the momentum fraction, by which the emitter&#39;s momentum fraction should be divided after the split...
double theLastPhi
The last calculated zPrime required for massive FF and decay kinematics dipoles.
virtual bool haveOverestimate() const
Return true, if this splitting kinematics class is capable of delivering an overestimate to the jacob...
virtual Energy recoilMassKin(const Lorentz5Momentum &, const Lorentz5Momentum &pSpectator) const
Return the mass of the system absorbing the recoil in the dipole splitting.
vector< double > & splittingParameters()
Access any additional parameters needed to evaluate the splitting kernel or to generate the full spli...
void lastZ(double z)
Set the last generated momentum fraction.
double lastZ() const
Return the last generated momentum fraction.
-*- C++ -*-
double theXMin
The minimum momentum fraction for incoming partons.
virtual pair< double, double > kappaSupport(const DipoleSplittingInfo &) const
Return the boundaries in between the evolution variable random number is to be sampled; the lower cuo...
void spectatorMomentum(const Lorentz5Momentum &p)
Set the spectator&#39;s momentum after the splitting.
void lastPhi(double p)
Set the last calculated zPrime for massive FF and decay dipoles.
void emissionMomentum(const Lorentz5Momentum &p)
Set the emission&#39;s momentum.
DipoleSplittingInfo contains all parameters to generate a full dipole splitting.
virtual Energy dipoleScale(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator) const
Return the dipole scale associated to the given pair of emitter and spectator.
void jacobian(double w)
Set the splitting phasespace weight associated to the last call to generateSplitting.
virtual Energy IRCutoff() const
Return the infrared cutoff.
double theLastZ
The last generated momentum fraction.
Energy theIRCutoff
The infrared cutoff associated to this splitting kinematics.
constexpr ZeroUnit ZERO
Energy lastPt() const
Return the last generated pt.
DipoleSplittingKernel is the base class for all kernels used within the dipole shower.
list< PPtr > PList
double theLastSpectatorZ
The momentum fraction, by which the spectator&#39;s momentum fraction should be divided after the splitti...
Lorentz5Momentum theEmissionMomentum
The emission&#39;s momentum after the splitting.
void emitterMomentum(const Lorentz5Momentum &p)
Set the emitter&#39;s momentum after the splitting.