herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
Dipole.h
1 // -*- C++ -*-
2 //
3 // Dipole.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_Dipole_H
10 #define HERWIG_Dipole_H
11 //
12 // This is the declaration of the Dipole class.
13 //
14 
15 #include "Herwig/Shower/Dipole/Kinematics/DipoleSplittingKinematics.h"
16 #include "Herwig/Shower/Dipole/Base/DipoleSplittingInfo.h"
17 
18 namespace Herwig {
19 
20 using namespace ThePEG;
21 
30 class Dipole {
31 
32 public:
33 
37  Dipole();
38 
42  Dipole(const pair<PPtr,PPtr>& newParticles,
43  const pair<PDF,PDF>& newPDFs,
44  pair<double,double> newFractions,
45  pair<Energy,Energy> newScales);
46 
50  Dipole(const pair<PPtr,PPtr>& newParticles,
51  const pair<PDF,PDF>& newPDFs,
52  pair<double,double> newFractions,
53  const pair<bool,bool> decaying = pair<bool,bool>(false,false),
54  const pair<bool,bool> offShell = pair<bool,bool>(false,false),
55  pair<Energy,Energy> newScales = pair<Energy,Energy>(ZERO,ZERO));
56 
57 
58 public:
59 
63  tPPtr leftParticle() const { return theParticles.first; }
64 
68  tPPtr rightParticle() const { return theParticles.second; }
69 
73  const PDF& leftPDF() const { return thePDFs.first; }
74 
78  const PDF& rightPDF() const { return thePDFs.second; }
79 
83  double leftFraction() const { return theFractions.first; }
84 
88  double rightFraction() const { return theFractions.second; }
89 
95  bool leftDecaying() { return theDecaying.first; }
96 
102  bool rightDecaying() { return theDecaying.second; }
103 
107  void leftParticle(PPtr p) { theParticles.first = p; }
108 
112  void rightParticle(PPtr p) { theParticles.second = p; }
113 
117  void leftPDF(const PDF& p) { thePDFs.first = p; }
118 
122  void rightPDF(const PDF& p) { thePDFs.second = p; }
123 
127  void leftFraction(double x) { theFractions.first = x; }
128 
132  void rightFraction(double x) { theFractions.second = x; }
133 
137  Energy leftScale() const { return theScales.first; }
138 
142  void leftScale(Energy s) { theScales.first = s; }
143 
147  Energy rightScale() const { return theScales.second; }
148 
152  void rightScale(Energy s) { theScales.second = s; }
153 
158  void leftDecaying(bool decaying) { theDecaying.first = decaying; }
159 
164  void rightDecaying(bool decaying) { theDecaying.second = decaying; }
165 
169  void update();
170 
171 public:
172 
177  const DipoleIndex& index(pair<bool,bool> conf) const {
178  return conf.first ? theIndices.first : theIndices.second;
179  }
180 
184  void setFirstIndex(DipoleIndex s){theIndices.first=s;}
185 
189  void setSecondIndex(DipoleIndex s){theIndices.second=s;}
190 
195  tPPtr emitter(pair<bool,bool> conf) const {
196  return conf.first ? theParticles.first : theParticles.second;
197  }
198 
203  tPPtr spectator(pair<bool,bool> conf) const {
204  return conf.first ? theParticles.second : theParticles.first;
205  }
206 
211  Energy emitterScale(pair<bool,bool> conf) const {
212  return conf.first ? theScales.first : theScales.second;
213  }
214 
219  void emitterScale(pair<bool,bool> conf, Energy scale) {
220  (conf.first ? theScales.first : theScales.second) = scale;
221  }
222 
227  double emitterX(pair<bool,bool> conf) const {
228  return conf.first ? theFractions.first : theFractions.second;
229  }
230 
235  const PDF& emitterPDF(pair<bool,bool> conf) const {
236  return conf.first ? thePDFs.first : thePDFs.second;
237  }
238 
243  double spectatorX(pair<bool,bool> conf) const {
244  return conf.first ? theFractions.second : theFractions.first;
245  }
246 
251  const PDF& spectatorPDF(pair<bool,bool> conf) const {
252  return conf.first ? thePDFs.second : thePDFs.first;
253  }
254 
255 public:
256 
261  pair<Dipole,Dipole> split (DipoleSplittingInfo& dsplit,
262  bool colourSpectator,
263  bool subleadingNc = false) const;
264 
270  void tmpsplit (DipoleSplittingInfo& dsplit,
271  bool colourSpectator) const;
272 
273 
278  void recoil (DipoleSplittingInfo& dsplit);
279 
280 public:
281 
285  void print(ostream&) const;
286 
287 private:
288 
292  pair<PPtr,PPtr> theParticles;
293 
297  pair<PDF,PDF> thePDFs;
298 
303  pair<double,double> theFractions;
304 
309  pair<DipoleIndex,DipoleIndex> theIndices;
310 
315  pair<bool,bool> theDecaying;
316 
321  pair<bool,bool> theOffShell;
322 
327  pair<Energy,Energy> theScales;
328 
329 };
330 
331 inline ostream& operator << (ostream& os, const Dipole& di) {
332  di.print(os);
333  return os;
334 }
335 
336 }
337 
338 #endif /* HERWIG_Dipole_H */
ThePEG::Ptr< Particle >::pointer PPtr
bool leftDecaying()
Get the bool indicating incoming decay for the left particle, for debugging only. ...
Definition: Dipole.h:95
tPPtr spectator(pair< bool, bool > conf) const
Return the spectator particle for the selected configuration.
Definition: Dipole.h:203
pair< DipoleIndex, DipoleIndex > theIndices
The dipole indices, if the first or second particle is considered as emitter.
Definition: Dipole.h:309
const PDF & leftPDF() const
Get the left PDF.
Definition: Dipole.h:73
const DipoleIndex & index(pair< bool, bool > conf) const
Return the dipole index for the selected emitter-spectator assignment.
Definition: Dipole.h:177
void print(ostream &) const
Put information to ostream.
void rightScale(Energy s)
Set the scale for the right particle.
Definition: Dipole.h:152
void rightParticle(PPtr p)
Set the right particle.
Definition: Dipole.h:112
void leftPDF(const PDF &p)
Set the left PDF.
Definition: Dipole.h:117
DipoleIndex is used to index splitting generators for a particular dipole.
void rightDecaying(bool decaying)
Set the decayed particle indicator for the right particle.
Definition: Dipole.h:164
double spectatorX(pair< bool, bool > conf) const
Return the momentum fraction of the spectator for the selected configuration.
Definition: Dipole.h:243
const PDF & rightPDF() const
Get the right PDF.
Definition: Dipole.h:78
pair< PPtr, PPtr > theParticles
The particles forming the dipole.
Definition: Dipole.h:292
void leftDecaying(bool decaying)
Set the decayed particle indicator for the left particle.
Definition: Dipole.h:158
const PDF & emitterPDF(pair< bool, bool > conf) const
Return the PDF of the emitter for the selected configuration.
Definition: Dipole.h:235
void setFirstIndex(DipoleIndex s)
Set the first index.
Definition: Dipole.h:184
void leftParticle(PPtr p)
Set the left particle.
Definition: Dipole.h:107
tPPtr leftParticle() const
Get the left particle.
Definition: Dipole.h:63
tPPtr emitter(pair< bool, bool > conf) const
Return the emitter particle for the selected configuration.
Definition: Dipole.h:195
const PDF & spectatorPDF(pair< bool, bool > conf) const
Return the PDF of the spectator for the selected configuration.
Definition: Dipole.h:251
ostream & operator<<(ostream &, const DecayIntegrator &)
Output information on the DecayIntegrator for debugging purposes.
pair< bool, bool > theOffShell
Indicates if either the first or second parton can be off-shell (required for sampling).
Definition: Dipole.h:321
void emitterScale(pair< bool, bool > conf, Energy scale)
Set the scale associated to the emitter for the selected configuration.
Definition: Dipole.h:219
bool rightDecaying()
Get the bool indicating incoming decay for the right particle, for debugging only.
Definition: Dipole.h:102
pair< double, double > theFractions
The momentum fractions associated to the incoming particles.
Definition: Dipole.h:303
pair< bool, bool > theDecaying
Indicates if either the first or the second parton is incoming to a decay.
Definition: Dipole.h:315
The Dipole class is used by the dipole shower to represent a dipole of two coloured partons...
Definition: Dipole.h:30
void leftFraction(double x)
Set the momentum fraction for the left particle.
Definition: Dipole.h:127
ThePEG::Ptr< Particle >::transient_pointer tPPtr
pair< PDF, PDF > thePDFs
The PDF objects.
Definition: Dipole.h:297
Energy rightScale() const
Get the scale for the right particle.
Definition: Dipole.h:147
-*- C++ -*-
double rightFraction() const
Get the right fraction.
Definition: Dipole.h:88
void rightFraction(double x)
Set the momentum fraction for the right particle.
Definition: Dipole.h:132
void setSecondIndex(DipoleIndex s)
Set the first index.
Definition: Dipole.h:189
double leftFraction() const
Get the left fraction.
Definition: Dipole.h:83
DipoleSplittingInfo contains all parameters to generate a full dipole splitting.
pair< Energy, Energy > theScales
The scale associated to the first and second particle, respectively.
Definition: Dipole.h:327
Energy emitterScale(pair< bool, bool > conf) const
Return the scale associated to the emitter for the selected configuration.
Definition: Dipole.h:211
constexpr ZeroUnit ZERO
void leftScale(Energy s)
Set the scale for the left particle.
Definition: Dipole.h:142
void rightPDF(const PDF &p)
Set the right PDF.
Definition: Dipole.h:122
Energy leftScale() const
Get the scale for the left particle.
Definition: Dipole.h:137
tPPtr rightParticle() const
Get the right particle.
Definition: Dipole.h:68
double emitterX(pair< bool, bool > conf) const
Return the momentum fraction of the emitter for the selected configuration.
Definition: Dipole.h:227