herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 
20 namespace Herwig {
21 
22 using namespace ThePEG;
23 
34 
35 public:
36 
43 
47  virtual ~InvertedTildeKinematics();
49 
50 public:
51 
57  const Lorentz5Momentum& realEmitterMomentum() const { return theRealEmitterMomentum; }
58 
62  const Lorentz5Momentum& realEmissionMomentum() const { return theRealEmissionMomentum; }
63 
67  const Lorentz5Momentum& realSpectatorMomentum() const { return theRealSpectatorMomentum; }
68 
72  const Lorentz5Momentum& bornEmitterMomentum() const {
73  return theBornXComb->meMomenta()[theDipole->bornEmitter()];
74  }
75 
79  const Lorentz5Momentum& bornSpectatorMomentum() const {
80  return theBornXComb->meMomenta()[theDipole->bornSpectator()];
81  }
82 
86  double emitterX() const {
87  return
88  theDipole->bornEmitter() == 0 ?
89  theBornXComb->lastX1() :
90  theBornXComb->lastX2();
91  }
92 
96  double spectatorX() const {
97  return
98  theDipole->bornSpectator() == 0 ?
99  theBornXComb->lastX1() :
100  theBornXComb->lastX2();
101  }
102 
106  const vector<double>& subtractionParameters() const { return theDipole->subtractionParameters(); }
107 
112  virtual bool doesTransform() const { return false; }
113 
119  virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const { return p; }
120 
124  Energy2 sHat() const { return theBornXComb->lastSHat(); }
126 
127 public:
128 
132  Ptr<InvertedTildeKinematics>::ptr cloneMe() const {
133  return dynamic_ptr_cast<Ptr<InvertedTildeKinematics>::ptr>(clone());
134  }
135 
142  void prepare(tcStdXCombPtr newRealXComb,
143  tcStdXCombPtr newBornXComb) {
144  theRealXComb = newRealXComb; theBornXComb = newBornXComb;
145  }
146 
150  tcStdXCombPtr realXComb() const { return theRealXComb; }
151 
155  tcStdXCombPtr bornXComb() const { return theBornXComb; }
156 
160  void dipole(Ptr<SubtractionDipole>::tptr dip) { theDipole = dip; }
161 
165  Ptr<SubtractionDipole>::tptr dipole() { return theDipole; }
166 
170  Ptr<SubtractionDipole>::tcptr dipole() const { return theDipole; }
171 
177  virtual int nDimRadiation() const { return 3; }
178 
187  virtual bool doMap(const double *) = 0;
188 
193  void ptCut(Energy pt) { thePtCut = pt; }
194 
199  Energy ptCut() const { return thePtCut; }
200 
205  virtual int evolutionVariable() const { return 0; }
206 
211  virtual double evolutionCutoff() const { return 0.0; }
212 
216  virtual Energy lastPt() const = 0;
217 
221  virtual double lastZ() const = 0;
222 
226  virtual Energy lastScale() const;
227 
231  virtual Energy ptMax() const = 0;
232 
237  virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const = 0;
238 
242  virtual pair<Energy,double> generatePtZ(double& jac, const double * r,
243  double power=1., vector<double>* values = NULL) const;
244 
249  double jacobian() const { return theJacobian; }
250 
255  return
256  (theDipole && theRealXComb) ?
257  theRealXComb->mePartonData()[theDipole->realEmitter()] :
258  cPDPtr();
259  }
260 
265  return
266  (theDipole && theRealXComb) ?
267  theRealXComb->mePartonData()[theDipole->realEmission()] :
268  cPDPtr();
269  }
270 
275  return
276  (theDipole && theRealXComb) ?
277  theRealXComb->mePartonData()[theDipole->realSpectator()] :
278  cPDPtr();
279  }
280 
285  return
286  (theDipole && theBornXComb) ?
287  theBornXComb->mePartonData()[theDipole->bornEmitter()] :
288  cPDPtr();
289  }
290 
295  return
296  (theDipole && theBornXComb) ?
297  theBornXComb->mePartonData()[theDipole->bornSpectator()] :
298  cPDPtr();
299  }
301 
302 protected:
303 
307  Lorentz5Momentum& realEmitterMomentum() { return theRealEmitterMomentum; }
308 
312  Lorentz5Momentum& realEmissionMomentum() { return theRealEmissionMomentum; }
313 
317  Lorentz5Momentum& realSpectatorMomentum() { return theRealSpectatorMomentum; }
318 
322  vector<double>& subtractionParameters() { return theDipole->subtractionParameters(); }
323 
328  void jacobian(double w) { theJacobian = w; }
329 
334  Lorentz5Momentum getKt(const Lorentz5Momentum& p1,
335  const Lorentz5Momentum& p2,
336  Energy pt,
337  double phi,
338  bool spacelike = false) const;
339 
340 public:
341 
348  void persistentOutput(PersistentOStream & os) const;
349 
355  void persistentInput(PersistentIStream & is, int version);
357 
364  static void Init();
365 
366 
367 // If needed, insert declarations of virtual function defined in the
368 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
369 
370 protected:
371 
383  virtual void rebind(const TranslationMap & trans);
384 
390  virtual IVector getReferences();
392 
393 
394 private:
395 
399  Ptr<SubtractionDipole>::tptr theDipole;
400 
404  tcStdXCombPtr theRealXComb;
405 
409  tcStdXCombPtr theBornXComb;
410 
414  Lorentz5Momentum theRealEmitterMomentum;
415 
419  Lorentz5Momentum theRealEmissionMomentum;
420 
424  Lorentz5Momentum theRealSpectatorMomentum;
425 
430  double theJacobian;
431 
436  Energy thePtCut;
437 
438 private:
439 
444  InvertedTildeKinematics & operator=(const InvertedTildeKinematics &) = delete;
445 
446 };
447 
448 }
449 
450 #endif /* HERWIG_InvertedTildeKinematics_H */
void prepare(tcStdXCombPtr newRealXComb, tcStdXCombPtr newBornXComb)
Prepare given a dipole, and XCombs describing the real emission and underlying Born processes...
Energy2 sHat() const
Return the centre of mass energy for the underlying Born configuration.
Lorentz5Momentum & realSpectatorMomentum()
Access the momentum of the spectator in the real emission process.
double emitterX() const
Return the momentum fraction of the emitter.
const vector< double > & subtractionParameters() const
Return the vector of dimensionless variables calculated.
Energy ptCut() const
Return the optional cutoff on the emission&#39;s transverse momentum.
InvertedTildeKinematics is the base class for the inverted &#39;tilde&#39; kinematics being used for subtract...
virtual Lorentz5Momentum transform(const Lorentz5Momentum &p) const
If this InvertedTildeKinematics object needs to transform all other particles in the process except t...
Ptr< InvertedTildeKinematics >::ptr cloneMe() const
Clone this object.
cPDPtr realEmissionData() const
Return the particle type of the emission in the real emission process.
tcStdXCombPtr bornXComb() const
Return the Born xcomb.
Ptr< SubtractionDipole >::tptr theDipole
The last dipole this InvertedTildeKinematics has been selected for.
tcStdXCombPtr realXComb() const
Return the real xcomb.
cPDPtr bornSpectatorData() const
Return the particle type of the spectator in the underlying Born process.
cPDPtr bornEmitterData() const
Return the particle type of the emitter in the underlying Born process.
double jacobian() const
Return the single particle phase space weight in units of sHat() for the last selected configuration...
vector< double > & subtractionParameters()
Access the vector of dimensionless variables calculated.
Energy thePtCut
The optional cutoff on the emission&#39;s transverse momentum.
double theJacobian
Return the single particle phase space weight in units of sHat() for the last selected configuration...
ThePEG::Ptr< ParticleData >::const_pointer cPDPtr
void ptCut(Energy pt)
Set an optional cutoff on the emission&#39;s transverse momentum.
tcStdXCombPtr theRealXComb
The XComb object describing the real emission process.
Ptr< SubtractionDipole >::tptr dipole()
Return the current dipole.
virtual double evolutionCutoff() const
Return the cutoff on the evolution random number corresponding to the pt cut.
const Lorentz5Momentum & realEmitterMomentum() const
Return the momentum of the emitter in the real emission process.
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.
const Lorentz5Momentum & realSpectatorMomentum() const
Return the momentum of the spectator in the real emission process.
Ptr< SubtractionDipole >::tcptr dipole() const
Return the current dipole.
const Lorentz5Momentum & bornEmitterMomentum() const
Return the momentum of the emitter in the underlying Born process.
virtual bool doesTransform() const
Return true, if this InvertedTildeKinematics object needs to transform all other particles in the pro...
virtual int evolutionVariable() const
Return the random number index corresponding to the evolution variable.
Lorentz5Momentum & realEmitterMomentum()
Access the momentum of the emitter in the real emission process.
double spectatorX() const
Return the momentum fraction of the spectator.
Lorentz5Momentum theRealSpectatorMomentum
The momentum of the spectator in the real emission process.
virtual int nDimRadiation() const
Return the number of random numbers needed to generate a real emission configuration off the underlyi...
-*- C++ -*-
const Lorentz5Momentum & realEmissionMomentum() const
Return the momentum of the emission in the real emission process.
Lorentz5Momentum theRealEmissionMomentum
The momentum of the emission 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...
Lorentz5Momentum & realEmissionMomentum()
Access the momentum of the emission in the real emission process.
void dipole(Ptr< SubtractionDipole >::tptr dip)
Set the current dipole.
tcStdXCombPtr theBornXComb
The XComb object describing the underlying Born process.
vector< IBPtr > IVector
cPDPtr realSpectatorData() const
Return the particle type of the spectator in the real emission process.
const Lorentz5Momentum & bornSpectatorMomentum() const
Return the momentum of the spectator in the underlying Born process.
Generator< Power > power(double z, double p, double lower, double upper)
Construct the density |(x-z)|^p.
constexpr ZeroUnit ZERO