herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
DipoleSplittingKinematics.h
1// -*- C++ -*-
2//
3// DipoleSplittingKinematics.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_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
23namespace Herwig {
24
25 using namespace ThePEG;
26
27 class DipoleIndex;
28 class DipoleSplittingInfo;
29 class DipoleSplittingKernel;
30
42
43 public:
44
49
50 public:
51
57 virtual pair<double,double> kappaSupport(const DipoleSplittingInfo&) const {
58 return {0.0,1.0};
59 }
60
65 virtual pair<double,double> xiSupport(const DipoleSplittingInfo&) const {
66 return {0.0,1.0};
67 }
68
77 virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
78 const Lorentz5Momentum& pSpectator) const {
79 // MEMinBias produces non-zero zeros.
80 if(abs(pEmitter*pSpectator)<0.0000001*GeV2)return ZERO;
81 assert(pEmitter*pSpectator >= ZERO);
82 return sqrt(2.*pEmitter*pSpectator);
83 }
84
90 virtual Energy recoilMassKin(const Lorentz5Momentum&,
91 const Lorentz5Momentum& pSpectator) const {
92 return pSpectator.m();
93 }
94
98 virtual Energy ptMax(Energy dScale,
99 double emX, double specX,
100 const DipoleIndex& dIndex,
101 const DipoleSplittingKernel& split) const =0;
102
106 virtual Energy ptMax(Energy dScale,
107 double emX, double specX,
108 const DipoleSplittingInfo& dInfo,
109 const DipoleSplittingKernel& split) const;
110
114 virtual Energy ptMax(Energy dScale,
115 double emX, double specX,
116 const DipoleIndex& dIndex,
117 const DipoleSplittingKernel& split,
118 tPPtr emitter, tPPtr spectator) const;
119
123 virtual Energy QMax(Energy dScale,
124 double emX, double specX,
125 const DipoleIndex& dIndex,
126 const DipoleSplittingKernel& split) const =0;
127
131 virtual Energy QMax(Energy dScale,
132 double emX, double specX,
133 const DipoleSplittingInfo& dInfo,
134 const DipoleSplittingKernel& split) const;
135
139 virtual Energy QMax(Energy dScale,
140 double emX, double specX,
141 const DipoleIndex& dIndex,
142 const DipoleSplittingKernel& split,
143 tPPtr emitter, tPPtr spectator) const;
144
148 virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const = 0;
149
153 virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const = 0;
154
158 virtual Energy IRCutoff() const { return theIRCutoff; }
159
164 double xMin() const { return theXMin; }
165
169 Energy generatePt(double r, Energy dScale,
170 double emX, double specX,
171 const DipoleIndex& dIndex,
172 const DipoleSplittingKernel& split,
173 double& weight) const;
174
179 virtual double ptToRandom(Energy pt, Energy dScale,
180 double emX, double specX,
181 const DipoleIndex& dIndex,
182 const DipoleSplittingKernel& split) const;
183
187 virtual pair<double,double> zBoundaries(Energy pt,
188 const DipoleSplittingInfo& dInfo,
189 const DipoleSplittingKernel& split) const = 0;
190
195
196 FlatZ = 0,
197 OneOverZ,
198 OneOverOneMinusZ,
199 OneOverZOneMinusZ
200
201 };
202
206 double generateZ(double r, Energy pt, int sampling,
207 const DipoleSplittingInfo& dInfo,
208 const DipoleSplittingKernel& split,
209 double& weight) const;
210
216 virtual bool generateSplitting(double kappa, double xi, double phi,
218 const DipoleSplittingKernel&) = 0;
219
226 double jacobian() const { return theJacobian; }
227
233 virtual bool haveOverestimate() const { return false; }
234
239 virtual double jacobianOverestimate() const { return -1.; }
240
244 Energy lastPt() const { return theLastPt; }
245
249 double lastZ() const { return theLastZ; }
250
255 // Do not need in current implementation,
256 // using lastSplittingParameters instead.
257 //double lastZPrime() const { return theLastZPrime; }
258
262 double lastPhi() const { return theLastPhi; }
263
268 double lastEmitterZ() const { return theLastEmitterZ; }
269
274 double lastSpectatorZ() const { return theLastSpectatorZ; }
275
281 const vector<double>& lastSplittingParameters() const { return theLastSplittingParameters; }
282
289
290 public:
291
297 virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
298 const Lorentz5Momentum& pSpectator,
299 const DipoleSplittingInfo& dInfo) = 0;
300
301
302
306 const Lorentz5Momentum& lastEmitterMomentum() const { return theEmitterMomentum; }
307
311 const Lorentz5Momentum& lastSpectatorMomentum() const { return theSpectatorMomentum; }
312
316 const Lorentz5Momentum& lastEmissionMomentum() const { return theEmissionMomentum; }
317
318 /*
319 * Return true, if there is a transformation which should
320 * be applied to all other final state particles except the ones
321 * involved in the splitting after having performed the splitting.
322 */
323 virtual bool doesTransform () const { return false; }
324
328 virtual void setTransformation () {};
329
330 /*
331 * Use the Dipole scale instead of hardpt for z-boundaries.
332 */
333 int openZBoundaries() const { return theOpenZBoundaries; }
334
335 /*
336 * perform the transformation if required.
337 */
338 virtual void transform (PPtr&) {};
339
340 /*
341 * SW 30/01/2019: Test feature only, not for release.
342 * Return true to only apply the transformation to non-coloured particles.
343 * Note this requires careful handling in DipoleEventRecord
344 */
345 //virtual bool transformHardOnly() const { return false; }
346
351 //virtual void transformHard ( PPtr& ) {};
352
358 // void addToRecoilMom( const Lorentz5Momentum& mom ) {
359 // Lorentz5Momentum newRecoilMom = splitRecoilMomentum() + mom;
360 // splitRecoilMomentum(newRecoilMom);
361 // }
362
363 /*
364 * Return true if this splitting is of a dipole which contains
365 * a decayed parton and requires the remnant to absorb the recoil.
366 */
367 virtual bool isDecay() const { return false; }
368
372 //virtual Lorentz5Momentum decayRecoil ( const Lorentz5Momentum& p, const int) { return p; }
373
377 virtual void decayRecoil ( PList& ) {};
378
382 virtual Lorentz5Momentum pVector(const Lorentz5Momentum& pEmitter,
383 const Lorentz5Momentum&,
384 const DipoleSplittingInfo&) const {
385 return pEmitter;
386 }
387
391 virtual Lorentz5Momentum nVector(const Lorentz5Momentum&,
392 const Lorentz5Momentum& pSpectator,
393 const DipoleSplittingInfo&) const {
394 return pSpectator;
395 }
396
397 // {;}
398
399 protected:
400
405 Lorentz5Momentum getKt(const Lorentz5Momentum& p1,
406 const Lorentz5Momentum& p2,
407 Energy pt,
408 double phi,
409 bool spacelike = false) const;
410
417 void jacobian(double w) { theJacobian = w; }
418
422 void lastPt(Energy p) { theLastPt = p; }
423
427 void lastZ(double z) { theLastZ = z; }
428
432 // Do not need in current implementation,
433 // using lastSplittingParameters instead.
434 //void lastZPrime(double zPrime) { theLastZPrime = zPrime; }
435
439 void lastPhi(double p) { theLastPhi = p; }
440
445 void lastEmitterZ(double z) { theLastEmitterZ = z; }
446
451 void lastSpectatorZ(double z) { theLastSpectatorZ = z; }
452
459
463 void emitterMomentum(const Lorentz5Momentum& p) { theEmitterMomentum = p; }
464
468 void spectatorMomentum(const Lorentz5Momentum& p) { theSpectatorMomentum = p; }
469
473 void emissionMomentum(const Lorentz5Momentum& p) { theEmissionMomentum = p; }
474
478 void splitRecoilMomentum( const Lorentz5Momentum& mom ) { theSplitRecoilMomentum = mom; }
479
483 const Lorentz5Momentum& splitRecoilMomentum() const { return theSplitRecoilMomentum; }
484
485 public:
486
493 static void Init();
494
495 public:
496
504
510 void persistentInput(PersistentIStream & is, int version);
512
513
514 // If needed, insert declarations of virtual function defined in the
515 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
516
517 private:
518
524
529 double theXMin;
530
535
539 Energy theLastPt;
540
544 double theLastZ;
545
551 // Do not need in current implementation,
552 // using lastSplittingParameters instead.
553 //double theLastZPrime;
554
559
565
571
578
582 Lorentz5Momentum theEmitterMomentum;
583
587 Lorentz5Momentum theEmissionMomentum;
588
592 Lorentz5Momentum theSpectatorMomentum;
593
598 Lorentz5Momentum theSplitRecoilMomentum;
599
600
601
602 int theOpenZBoundaries;
603
604 protected:
605
609 Ptr<DipoleMCCheck>::ptr theMCCheck;
610
611 private:
612
618
624
625 };
626
627}
628
629#include "ThePEG/Utilities/ClassTraits.h"
630
631namespace ThePEG {
632
637 template <>
638 struct BaseClassTrait<Herwig::DipoleSplittingKinematics,1> {
640 typedef HandlerBase NthBase;
641 };
642
645 template <>
646 struct ClassTraits<Herwig::DipoleSplittingKinematics>
647 : public ClassTraitsBase<Herwig::DipoleSplittingKinematics> {
649 static string className() { return "Herwig::DipoleSplittingKinematics"; }
657 static string library() { return "HwDipoleShower.so"; }
658 };
659
662}
663
664#endif /* HERWIG_DipoleSplittingKinematics_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.
void spectatorMomentum(const Lorentz5Momentum &p)
Set the spectator's momentum after the splitting.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual pair< double, double > zBoundaries(Energy pt, const DipoleSplittingInfo &dInfo, const DipoleSplittingKernel &split) const =0
Return the boundaries on the momentum fraction.
virtual void setTransformation()
Calculate and store a required Lorentz transformation.
DipoleSplittingKinematics & operator=(const DipoleSplittingKinematics &)=delete
The assignment operator is private and must never be called.
double theLastPhi
The last calculated zPrime required for massive FF and decay kinematics dipoles.
const Lorentz5Momentum & lastEmitterMomentum() const
Return the emitter's momentum after the splitting.
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo &) const =0
Return the pt given a virtuality.
virtual Energy ptMax(Energy dScale, double emX, double specX, const DipoleIndex &dIndex, const DipoleSplittingKernel &split, tPPtr emitter, tPPtr spectator) const
Return the maximum pt for the given dipole scale.
const Lorentz5Momentum & lastEmissionMomentum() const
Return the emission's momentum.
double generateZ(double r, Energy pt, int sampling, const DipoleSplittingInfo &dInfo, const DipoleSplittingKernel &split, double &weight) const
Generate a z value flat.
void lastPhi(double p)
Set the last calculated zPrime for massive FF and decay dipoles.
virtual Energy QMax(Energy dScale, double emX, double specX, const DipoleIndex &dIndex, const DipoleSplittingKernel &split) const =0
Return the maximum virtuality for the given dipole scale.
double lastEmitterZ() const
Return the momentum fraction, by which the emitter's momentum fraction should be divided after the sp...
Energy generatePt(double r, Energy dScale, double emX, double specX, const DipoleIndex &dIndex, const DipoleSplittingKernel &split, double &weight) const
Generate a pt.
Lorentz5Momentum getKt(const Lorentz5Momentum &p1, const Lorentz5Momentum &p2, Energy pt, double phi, bool spacelike=false) const
Calculate a transverse momentum for the given momenta, invariant pt and azimuth.
vector< double > theLastSplittingParameters
Any additional parameters needed to evaluate the splitting kernel or to generate the full splitting.
Ptr< DipoleMCCheck >::ptr theMCCheck
Pointer to a check histogram object.
vector< double > & splittingParameters()
Access any additional parameters needed to evaluate the splitting kernel or to generate the full spli...
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo &) const =0
Return the virtuality given a pt.
virtual Energy ptMax(Energy dScale, double emX, double specX, const DipoleIndex &dIndex, const DipoleSplittingKernel &split) const =0
Return the maximum pt for the given dipole scale.
ZSamplingOptions
Enumerate the variants of sampling z.
double jacobian() const
Get the splitting phasespace weight associated to the last call to generateSplitting.
double lastSpectatorZ() const
Return the momentum fraction, by which the spectator's momentum fraction should be divided after the ...
const Lorentz5Momentum & splitRecoilMomentum() const
Return the momentum of the recoil system after splitting.
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.
void jacobian(double w)
Set the splitting phasespace weight associated to the last call to generateSplitting.
DipoleSplittingKinematics()
The default constructor.
double theJacobian
The last calculated splitting phase space weight.
Energy theIRCutoff
The infrared cutoff associated to this splitting kinematics.
Energy lastPt() const
Return the last generated pt.
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 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.
double lastZ() const
Return the last generated momentum fraction.
void lastPt(Energy p)
Set the last generated pt.
Lorentz5Momentum theEmitterMomentum
The emitter's momentum after the splitting.
virtual bool isDecay() const
SW 30/01/2019: Test feature only, not for release.
virtual Energy IRCutoff() const
Return the infrared cutoff.
virtual void decayRecoil(PList &)
Perform the recoil in the case of a decayed parton.
const Lorentz5Momentum & lastSpectatorMomentum() const
Return the spectator's momentum after the splitting.
static void Init()
The standard Init function used to initialize the interfaces.
void emissionMomentum(const Lorentz5Momentum &p)
Set the emission's momentum.
double theXMin
The minimum momentum fraction for incoming partons.
void lastEmitterZ(double z)
Set the momentum fraction, by which the emitter's momentum fraction should be divided after the split...
void lastSpectatorZ(double z)
Set the momentum fraction, by which the spectator's momentum fraction should be divided after the spl...
static AbstractClassDescription< DipoleSplittingKinematics > initDipoleSplittingKinematics
The static object used to initialize the description of this class.
virtual bool generateSplitting(double kappa, double xi, double phi, DipoleSplittingInfo &info, const DipoleSplittingKernel &)=0
Generate splitting variables given three random numbers and the momentum fractions of the emitter and...
double lastPhi() const
Return the last calculated zPrime for massive FF and decay dipoles.
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 prepareSplitting(DipoleSplittingInfo &dInfo)
Complete a DipoleSplittingInfo object with the parameters generated by the last call to generateSplit...
double theLastEmitterZ
The momentum fraction, by which the emitter's momentum fraction should be divided after the splitting...
Lorentz5Momentum theEmissionMomentum
The emission's momentum after the splitting.
virtual Lorentz5Momentum pVector(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &, const DipoleSplittingInfo &) const
Return the pVector, required for spin correlations.
virtual Energy dipoleScale(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator) const
Return the dipole scale associated to the given pair of emitter and spectator.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
double xMin() const
Return the minimum momentum fraction for incoming partons.
virtual void generateKinematics(const Lorentz5Momentum &pEmitter, const Lorentz5Momentum &pSpectator, const DipoleSplittingInfo &dInfo)=0
Generate the full kinematics given emitter and spectator momentum and a previously completeted Dipole...
virtual double jacobianOverestimate() const
Return the overestimated jacobian for the last generated parameters.
Lorentz5Momentum theSpectatorMomentum
The spectator's momentum after the splitting.
double theLastSpectatorZ
The momentum fraction, by which the spectator's momentum fraction should be divided after the splitti...
Lorentz5Momentum theSplitRecoilMomentum
The momentum of the recoil system after the splitting, used in decay dipole kinematics.
Energy theLastPt
The last generated pt.
void emitterMomentum(const Lorentz5Momentum &p)
Set the emitter's momentum after the splitting.
double theLastZ
The last generated momentum fraction.
virtual Energy QMax(Energy dScale, double emX, double specX, const DipoleIndex &dIndex, const DipoleSplittingKernel &split, tPPtr emitter, tPPtr spectator) const
Return the maximum virtuality for the given dipole scale.
void lastZ(double z)
Set the last generated momentum fraction.
virtual pair< double, double > xiSupport(const DipoleSplittingInfo &) const
Return the boundaries in between the momentum fraction random number is to be sampled.
void splitRecoilMomentum(const Lorentz5Momentum &mom)
Set the momentum of the recoil system after the splitting.
const vector< double > & lastSplittingParameters() const
Return any additional parameters needed to evaluate the splitting kernel or to generate the full spli...
virtual bool haveOverestimate() const
Return true, if this splitting kinematics class is capable of delivering an overestimate to the jacob...
virtual Lorentz5Momentum nVector(const Lorentz5Momentum &, const Lorentz5Momentum &pSpectator, const DipoleSplittingInfo &) const
Return the nVector, required for spin correlations.
virtual Energy recoilMassKin(const Lorentz5Momentum &, const Lorentz5Momentum &pSpectator) const
Return the mass of the system absorbing the recoil in the dipole splitting.
-*- C++ -*-
ThePEG::Ptr< Particle >::transient_pointer tPPtr
double sqrt(int x)
ThePEG::Ptr< Particle >::pointer PPtr
constexpr ZeroUnit ZERO
list< PPtr > PList
static string className()
static string library()