herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
InvertedTildeKinematics.h
1// -*- C++ -*-
2//
3// InvertedTildeKinematics.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_InvertedTildeKinematics_H
10#define HERWIG_InvertedTildeKinematics_H
11//
12// This is the declaration of the InvertedTildeKinematics class.
13//
14
15#include "ThePEG/Handlers/HandlerBase.h"
16#include "ThePEG/Handlers/StandardXComb.h"
17#include "ThePEG/Repository/EventGenerator.h"
18#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
19
20namespace Herwig {
21
22using namespace ThePEG;
23
34
35public:
36
41
42public:
43
49 const Lorentz5Momentum& realEmitterMomentum() const { return theRealEmitterMomentum; }
50
54 const Lorentz5Momentum& realEmissionMomentum() const { return theRealEmissionMomentum; }
55
59 const Lorentz5Momentum& realSpectatorMomentum() const { return theRealSpectatorMomentum; }
60
64 const Lorentz5Momentum& bornEmitterMomentum() const {
65 return theBornXComb->meMomenta()[theDipole->bornEmitter()];
66 }
67
71 const Lorentz5Momentum& bornSpectatorMomentum() const {
72 return theBornXComb->meMomenta()[theDipole->bornSpectator()];
73 }
74
78 double emitterX() const {
79 return
80 theDipole->bornEmitter() == 0 ?
81 theBornXComb->lastX1() :
82 theBornXComb->lastX2();
83 }
84
88 double spectatorX() const {
89 return
90 theDipole->bornSpectator() == 0 ?
91 theBornXComb->lastX1() :
92 theBornXComb->lastX2();
93 }
94
98 const vector<double>& subtractionParameters() const { return theDipole->subtractionParameters(); }
99
104 virtual bool doesTransform() const { return false; }
105
111 virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const { return p; }
112
116 Energy2 sHat() const { return theBornXComb->lastSHat(); }
118
119public:
120
124 Ptr<InvertedTildeKinematics>::ptr cloneMe() const {
125 return dynamic_ptr_cast<Ptr<InvertedTildeKinematics>::ptr>(clone());
126 }
127
134 void prepare(tcStdXCombPtr newRealXComb,
135 tcStdXCombPtr newBornXComb) {
136 theRealXComb = newRealXComb; theBornXComb = newBornXComb;
137 }
138
142 tcStdXCombPtr realXComb() const { return theRealXComb; }
143
147 tcStdXCombPtr bornXComb() const { return theBornXComb; }
148
152 void dipole(Ptr<SubtractionDipole>::tptr dip) { theDipole = dip; }
153
157 Ptr<SubtractionDipole>::tptr dipole() { return theDipole; }
158
162 Ptr<SubtractionDipole>::tcptr dipole() const { return theDipole; }
163
169 virtual int nDimRadiation() const { return 3; }
170
179 virtual bool doMap(const double *) = 0;
180
185 void ptCut(Energy pt) { thePtCut = pt; }
186
191 Energy ptCut() const { return thePtCut; }
192
197 virtual int evolutionVariable() const { return 0; }
198
203 virtual double evolutionCutoff() const { return 0.0; }
204
208 virtual Energy lastPt() const = 0;
209
213 virtual double lastZ() const = 0;
214
218 virtual Energy lastScale() const;
219
223 virtual Energy ptMax() const = 0;
224
229 virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const = 0;
230
234 virtual pair<Energy,double> generatePtZ(double& jac, const double * r,
235 double power=1., vector<double>* values = NULL) const;
236
241 double jacobian() const { return theJacobian; }
242
247 return
248 (theDipole && theRealXComb) ?
249 theRealXComb->mePartonData()[theDipole->realEmitter()] :
250 cPDPtr();
251 }
252
257 return
258 (theDipole && theRealXComb) ?
259 theRealXComb->mePartonData()[theDipole->realEmission()] :
260 cPDPtr();
261 }
262
267 return
268 (theDipole && theRealXComb) ?
269 theRealXComb->mePartonData()[theDipole->realSpectator()] :
270 cPDPtr();
271 }
272
277 return
278 (theDipole && theBornXComb) ?
279 theBornXComb->mePartonData()[theDipole->bornEmitter()] :
280 cPDPtr();
281 }
282
287 return
288 (theDipole && theBornXComb) ?
289 theBornXComb->mePartonData()[theDipole->bornSpectator()] :
290 cPDPtr();
291 }
293
294protected:
295
299 Lorentz5Momentum& realEmitterMomentum() { return theRealEmitterMomentum; }
300
304 Lorentz5Momentum& realEmissionMomentum() { return theRealEmissionMomentum; }
305
309 Lorentz5Momentum& realSpectatorMomentum() { return theRealSpectatorMomentum; }
310
314 vector<double>& subtractionParameters() { return theDipole->subtractionParameters(); }
315
320 void jacobian(double w) { theJacobian = w; }
321
326 Lorentz5Momentum getKt(const Lorentz5Momentum& p1,
327 const Lorentz5Momentum& p2,
328 Energy pt,
329 double phi,
330 bool spacelike = false) const;
331
332public:
333
341
347 void persistentInput(PersistentIStream & is, int version);
349
356 static void Init();
357
358
359// If needed, insert declarations of virtual function defined in the
360// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
361
362protected:
363
375 virtual void rebind(const TranslationMap & trans);
376
384
385
386private:
387
391 Ptr<SubtractionDipole>::tptr theDipole;
392
396 tcStdXCombPtr theRealXComb;
397
401 tcStdXCombPtr theBornXComb;
402
406 Lorentz5Momentum theRealEmitterMomentum;
407
411 Lorentz5Momentum theRealEmissionMomentum;
412
416 Lorentz5Momentum theRealSpectatorMomentum;
417
423
428 Energy thePtCut;
429
430private:
431
437
438};
439
440}
441
442#endif /* HERWIG_InvertedTildeKinematics_H */
InvertedTildeKinematics is the base class for the inverted 'tilde' kinematics being used for subtract...
void dipole(Ptr< SubtractionDipole >::tptr dip)
Set the current dipole.
double spectatorX() const
Return the momentum fraction of the spectator.
tcStdXCombPtr theRealXComb
The XComb object describing the real emission process.
virtual pair< Energy, double > generatePtZ(double &jac, const double *r, double power=1., vector< double > *values=NULL) const
Generate pt and z.
Lorentz5Momentum theRealSpectatorMomentum
The momentum of the spectator in the real emission process.
Energy thePtCut
The optional cutoff on the emission's transverse momentum.
cPDPtr bornEmitterData() const
Return the particle type of the emitter in the underlying Born process.
Lorentz5Momentum theRealEmissionMomentum
The momentum of the emission in the real emission process.
cPDPtr bornSpectatorData() const
Return the particle type of the spectator in the underlying Born process.
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 > & subtractionParameters()
Access the vector of dimensionless variables calculated.
InvertedTildeKinematics()
The default constructor.
Lorentz5Momentum & realEmitterMomentum()
Access the momentum of the emitter in the real emission process.
static void Init()
The standard Init function used to initialize the interfaces.
Ptr< SubtractionDipole >::tptr theDipole
The last dipole this InvertedTildeKinematics has been selected for.
Energy2 sHat() const
Return the centre of mass energy for the underlying Born configuration.
virtual int evolutionVariable() const
Return the random number index corresponding to the evolution variable.
cPDPtr realEmitterData() const
Return the particle type of the emitter in the real emission process.
Lorentz5Momentum theRealEmitterMomentum
The momentum of the emitter in the real emission process.
void jacobian(double w)
Set the single particle phase space weight in units of sHat() for the last selected configuration.
tcStdXCombPtr bornXComb() const
Return the Born xcomb.
Ptr< SubtractionDipole >::tcptr dipole() const
Return the current dipole.
void ptCut(Energy pt)
Set an optional cutoff on the emission's transverse momentum.
virtual Energy ptMax() const =0
Return the upper bound on pt.
tcStdXCombPtr realXComb() const
Return the real xcomb.
virtual Energy lastPt() const =0
Return the pt associated to the last generated splitting.
InvertedTildeKinematics & operator=(const InvertedTildeKinematics &)=delete
The assignment operator is private and must never be called.
cPDPtr realEmissionData() const
Return the particle type of the emission in the real emission process.
const Lorentz5Momentum & realEmissionMomentum() const
Return the momentum of the emission in the real emission process.
Energy ptCut() const
Return the optional cutoff on the emission's transverse momentum.
double emitterX() const
Return the momentum fraction of the emitter.
double jacobian() const
Return the single particle phase space weight in units of sHat() for the last selected configuration.
cPDPtr realSpectatorData() const
Return the particle type of the spectator in the real emission process.
virtual Lorentz5Momentum transform(const Lorentz5Momentum &p) const
If this InvertedTildeKinematics object needs to transform all other particles in the process except t...
const Lorentz5Momentum & bornSpectatorMomentum() const
Return the momentum of the spectator in the underlying Born process.
void prepare(tcStdXCombPtr newRealXComb, tcStdXCombPtr newBornXComb)
Prepare given a dipole, and XCombs describing the real emission and underlying Born processes,...
virtual bool doMap(const double *)=0
Perform the mapping of the tilde kinematics for the last selected process and store all dimensionless...
tcStdXCombPtr theBornXComb
The XComb object describing the underlying Born process.
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
Ptr< SubtractionDipole >::tptr dipole()
Return the current dipole.
const Lorentz5Momentum & bornEmitterMomentum() const
Return the momentum of the emitter in the underlying Born process.
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual pair< double, double > zBounds(Energy pt, Energy hardPt=ZERO) const =0
Given a pt and a hard pt, return the boundaries on z; if the hard pt is zero, ptMax() will be used.
const Lorentz5Momentum & realEmitterMomentum() const
Return the momentum of the emitter in the real emission process.
virtual Energy lastScale() const
Return the relevant dipole scale.
const Lorentz5Momentum & realSpectatorMomentum() const
Return the momentum of the spectator in the real emission process.
const vector< double > & subtractionParameters() const
Return the vector of dimensionless variables calculated.
Lorentz5Momentum & realEmissionMomentum()
Access the momentum of the emission in the real emission process.
virtual bool doesTransform() const
Return true, if this InvertedTildeKinematics object needs to transform all other particles in the pro...
Lorentz5Momentum & realSpectatorMomentum()
Access the momentum of the spectator in the real emission process.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual int nDimRadiation() const
Return the number of random numbers needed to generate a real emission configuration off the underlyi...
virtual double lastZ() const =0
Return the momentum fraction associated to the last splitting.
virtual double evolutionCutoff() const
Return the cutoff on the evolution random number corresponding to the pt cut.
double theJacobian
Return the single particle phase space weight in units of sHat() for the last selected configuration.
Ptr< InvertedTildeKinematics >::ptr cloneMe() const
Clone this object.
virtual IBPtr clone() const=0
-*- C++ -*-
constexpr ZeroUnit ZERO
ThePEG::Ptr< ParticleData >::const_pointer cPDPtr
vector< IBPtr > IVector