herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
TildeKinematics.h
1 // -*- C++ -*-
2 //
3 // TildeKinematics.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_TildeKinematics_H
10 #define HERWIG_TildeKinematics_H
11 //
12 // This is the declaration of the TildeKinematics class.
13 //
14 
15 #include "ThePEG/Handlers/HandlerBase.h"
16 #include "ThePEG/Handlers/StandardXComb.h"
17 
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 ~TildeKinematics();
49 
50 public:
51 
55  Ptr<TildeKinematics>::ptr cloneMe() const {
56  return dynamic_ptr_cast<Ptr<TildeKinematics>::ptr>(clone());
57  }
58 
64  const Lorentz5Momentum& realEmitterMomentum() const {
65  return theRealXComb->meMomenta()[theDipole->realEmitter()];
66  }
67 
71  const Lorentz5Momentum& realEmissionMomentum() const {
72  return theRealXComb->meMomenta()[theDipole->realEmission()];
73  }
74 
78  const Lorentz5Momentum& realSpectatorMomentum() const {
79  return theRealXComb->meMomenta()[theDipole->realSpectator()];
80  }
81 
85  const Lorentz5Momentum& bornEmitterMomentum() const { return theBornEmitterMomentum; }
86 
90  const Lorentz5Momentum& bornSpectatorMomentum() const { return theBornSpectatorMomentum; }
91 
95  const vector<double>& subtractionParameters() const { return theDipole->subtractionParameters(); }
96 
101  virtual bool doesTransform() const { return false; }
102 
108  virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const { return p; }
110 
117  virtual void getShowerVariables() const {}
118 
125  virtual double jacobianRatio() const { return 1.; }
126 
127 public:
128 
135  void prepare(tcStdXCombPtr newRealXComb,
136  tcStdXCombPtr newBornXComb) {
137  theRealXComb = newRealXComb; theBornXComb = newBornXComb;
138  }
139 
143  void dipole(Ptr<SubtractionDipole>::tptr dip) { theDipole = dip; }
144 
148  Ptr<SubtractionDipole>::tptr dipole() { return theDipole; }
149 
153  Ptr<SubtractionDipole>::tcptr dipole() const { return theDipole; }
154 
163  virtual bool doMap() = 0;
164 
168  virtual Energy lastPt() const = 0;
169 
170 
174  virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const =0 ;
175 
176 
180  virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const = 0;
181 
182 
186  virtual double lastZ() const = 0;
187 
191  virtual Energy lastScale() const;
192 
193  virtual bool aboveAlpha() const {
194  cerr<<"only implemented for light kinematics";
195  assert(false);
196  return false;
197  }
198 
203  return
204  (theDipole && theRealXComb) ?
205  theRealXComb->mePartonData()[theDipole->realEmitter()] :
206  cPDPtr();
207  }
208 
213  return
214  (theDipole && theRealXComb) ?
215  theRealXComb->mePartonData()[theDipole->realEmission()] :
216  cPDPtr();
217  }
218 
223  return
224  (theDipole && theRealXComb) ?
225  theRealXComb->mePartonData()[theDipole->realSpectator()] :
226  cPDPtr();
227  }
228 
233  return
234  (theDipole && theBornXComb) ?
235  theBornXComb->mePartonData()[theDipole->bornEmitter()] :
236  cPDPtr();
237  }
238 
243  return
244  (theDipole && theBornXComb) ?
245  theBornXComb->mePartonData()[theDipole->bornSpectator()] :
246  cPDPtr();
247  }
249 
250 protected:
251 
255  Lorentz5Momentum& bornEmitterMomentum() { return theBornEmitterMomentum; }
256 
260  Lorentz5Momentum& bornSpectatorMomentum() { return theBornSpectatorMomentum; }
261 
265  vector<double>& subtractionParameters() { return theDipole->subtractionParameters(); }
266 
267 public:
271  double emitterX() const {
272  return
273  theDipole->bornEmitter() == 0 ?
274  theBornXComb->lastX1() :
275  theBornXComb->lastX2();
276  }
277 
278 
282  double spectatorX() const {
283  return
284  theDipole->bornSpectator() == 0 ?
285  theBornXComb->lastX1() :
286  theBornXComb->lastX2();
287  }
288 
289 
290 public:
291 
298  void persistentOutput(PersistentOStream & os) const;
299 
305  void persistentInput(PersistentIStream & is, int version);
307 
314  static void Init();
315 
316 
317 // If needed, insert declarations of virtual function defined in the
318 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
319 
320 
321 protected:
322 
334  virtual void rebind(const TranslationMap & trans);
335 
341  virtual IVector getReferences();
343 
344 
345 private:
346 
350  Ptr<SubtractionDipole>::tptr theDipole;
351 
355  tcStdXCombPtr theRealXComb;
356 
360  tcStdXCombPtr theBornXComb;
361 
365  Lorentz5Momentum theBornEmitterMomentum;
366 
370  Lorentz5Momentum theBornSpectatorMomentum;
371 
372 private:
373 
378  TildeKinematics & operator=(const TildeKinematics &) = delete;
379 
380 };
381 
382 }
383 
384 #endif /* HERWIG_TildeKinematics_H */
void dipole(Ptr< SubtractionDipole >::tptr dip)
Set the current dipole.
Ptr< SubtractionDipole >::tptr dipole()
Return the current dipole.
Ptr< SubtractionDipole >::tcptr dipole() const
Return the current dipole.
Ptr< TildeKinematics >::ptr cloneMe() const
Clone this object.
Lorentz5Momentum & bornSpectatorMomentum()
Access the momentum of the spectator in the underlying Born process.
Ptr< SubtractionDipole >::tptr theDipole
The last dipole this TildeKinematics has been selected for.
vector< double > & subtractionParameters()
Access the vector of dimensionless variables calculated.
const Lorentz5Momentum & bornSpectatorMomentum() const
Return the momentum of the spectator in the underlying Born process.
virtual double jacobianRatio() const
If this tilde kinematics is implementing a mapping different from the baseline dipole mapping...
ThePEG::Ptr< ParticleData >::const_pointer cPDPtr
TildeKinematics is the base class for the &#39;tilde&#39; kinematics being used for subtraction terms in the ...
cPDPtr bornEmitterData() const
Return the particle type of the emitter in the underlying Born process.
Lorentz5Momentum theBornEmitterMomentum
The momentum of the emitter in the underlying Born process.
cPDPtr realEmissionData() const
Return the particle type of the emission in the real emission process.
tcStdXCombPtr theBornXComb
The XComb object describing the underlying Born process.
cPDPtr realSpectatorData() const
Return the particle type of the spectator in the real emission process.
tcStdXCombPtr theRealXComb
The XComb object describing the real emission process.
const Lorentz5Momentum & realSpectatorMomentum() const
Return the momentum of the spectator in the real emission process.
virtual bool doesTransform() const
Return true, if this TildeKinematics object needs to transform all other particles in the process exc...
double spectatorX() const
Return the momentum fraction of the spectator.
double emitterX() const
Return the momentum fraction of the emitter.
void prepare(tcStdXCombPtr newRealXComb, tcStdXCombPtr newBornXComb)
Prepare given a dipole, and XCombs describing the real emission and underlying Born processes...
Lorentz5Momentum & bornEmitterMomentum()
Access the momentum of the emitter in the underlying Born process.
const vector< double > & subtractionParameters() const
Return the vector of dimensionless variables calculated.
const Lorentz5Momentum & realEmissionMomentum() const
Return the momentum of the emission in the real emission process.
virtual Lorentz5Momentum transform(const Lorentz5Momentum &p) const
If this TildeKinematics object needs to transform all other particles in the process except the emitt...
const Lorentz5Momentum & realEmitterMomentum() const
Return the momentum of the emitter in the real emission process.
virtual void getShowerVariables() const
If this tilde kinematics is implementing a mapping different from the baseline dipole mapping...
-*- C++ -*-
const Lorentz5Momentum & bornEmitterMomentum() const
Return the momentum of the emitter in the underlying Born process.
cPDPtr bornSpectatorData() const
Return the particle type of the spectator in the underlying Born process.
vector< IBPtr > IVector
cPDPtr realEmitterData() const
Return the particle type of the emitter in the real emission process.
Lorentz5Momentum theBornSpectatorMomentum
The momentum of the spectator in the underlying Born process.