herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
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
18namespace Herwig {
19
20using namespace ThePEG;
21
30class Dipole {
31
32public:
33
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
58public:
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
171public:
172
177 const DipoleIndex& index(pair<bool,bool> conf) const {
178 return conf.first ? theIndices.first : theIndices.second;
179 }
180
185
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
255public:
256
261 pair<Dipole,Dipole> split (DipoleSplittingInfo& dsplit,
262 bool colourSpectator,
263 bool subleadingNc = false) const;
264
271 bool colourSpectator) const;
272
273
279
280public:
281
285 void print(ostream&) const;
286
287private:
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
331inline ostream& operator << (ostream& os, const Dipole& di) {
332 di.print(os);
333 return os;
334}
335
336}
337
338#endif /* HERWIG_Dipole_H */
DipoleIndex is used to index splitting generators for a particular dipole.
DipoleSplittingInfo contains all parameters to generate a full dipole splitting.
The Dipole class is used by the dipole shower to represent a dipole of two coloured partons.
Definition: Dipole.h:30
const PDF & emitterPDF(pair< bool, bool > conf) const
Return the PDF of the emitter for the selected configuration.
Definition: Dipole.h:235
void update()
Update information, if modified.
bool rightDecaying()
Get the bool indicating incoming decay for the right particle, for debugging only.
Definition: Dipole.h:102
pair< PDF, PDF > thePDFs
The PDF objects.
Definition: Dipole.h:297
void leftFraction(double x)
Set the momentum fraction for the left particle.
Definition: Dipole.h:127
pair< double, double > theFractions
The momentum fractions associated to the incoming particles.
Definition: Dipole.h:303
const PDF & spectatorPDF(pair< bool, bool > conf) const
Return the PDF of the spectator for the selected configuration.
Definition: Dipole.h:251
pair< bool, bool > theOffShell
Indicates if either the first or second parton can be off-shell (required for sampling).
Definition: Dipole.h:321
const PDF & rightPDF() const
Get the right PDF.
Definition: Dipole.h:78
void emitterScale(pair< bool, bool > conf, Energy scale)
Set the scale associated to the emitter for the selected configuration.
Definition: Dipole.h:219
void leftPDF(const PDF &p)
Set the left PDF.
Definition: Dipole.h:117
void recoil(DipoleSplittingInfo &dsplit)
Produce a new spectator according to the given splitting.
void rightParticle(PPtr p)
Set the right particle.
Definition: Dipole.h:112
pair< DipoleIndex, DipoleIndex > theIndices
The dipole indices, if the first or second particle is considered as emitter.
Definition: Dipole.h:309
Energy rightScale() const
Get the scale for the right particle.
Definition: Dipole.h:147
void rightDecaying(bool decaying)
Set the decayed particle indicator for the right particle.
Definition: Dipole.h:164
pair< PPtr, PPtr > theParticles
The particles forming the dipole.
Definition: Dipole.h:292
void rightFraction(double x)
Set the momentum fraction for the right particle.
Definition: Dipole.h:132
void setFirstIndex(DipoleIndex s)
Set the first index.
Definition: Dipole.h:184
pair< bool, bool > theDecaying
Indicates if either the first or the second parton is incoming to a decay.
Definition: Dipole.h:315
const DipoleIndex & index(pair< bool, bool > conf) const
Return the dipole index for the selected emitter-spectator assignment.
Definition: Dipole.h:177
tPPtr spectator(pair< bool, bool > conf) const
Return the spectator particle for the selected configuration.
Definition: Dipole.h:203
void tmpsplit(DipoleSplittingInfo &dsplit, bool colourSpectator) const
As split, but without touching the event record.
Energy emitterScale(pair< bool, bool > conf) const
Return the scale associated to the emitter for the selected configuration.
Definition: Dipole.h:211
void setSecondIndex(DipoleIndex s)
Set the first index.
Definition: Dipole.h:189
pair< Energy, Energy > theScales
The scale associated to the first and second particle, respectively.
Definition: Dipole.h:327
void leftDecaying(bool decaying)
Set the decayed particle indicator for the left particle.
Definition: Dipole.h:158
double rightFraction() const
Get the right fraction.
Definition: Dipole.h:88
void rightScale(Energy s)
Set the scale for the right particle.
Definition: Dipole.h:152
Dipole(const pair< PPtr, PPtr > &newParticles, const pair< PDF, PDF > &newPDFs, pair< double, double > newFractions, const pair< bool, bool > decaying=pair< bool, bool >(false, false), const pair< bool, bool > offShell=pair< bool, bool >(false, false), pair< Energy, Energy > newScales=pair< Energy, Energy >(ZERO, ZERO))
The standard constructor.
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
pair< Dipole, Dipole > split(DipoleSplittingInfo &dsplit, bool colourSpectator, bool subleadingNc=false) const
Split this dipole according to the given splitting.
double leftFraction() const
Get the left fraction.
Definition: Dipole.h:83
void leftParticle(PPtr p)
Set the left particle.
Definition: Dipole.h:107
double spectatorX(pair< bool, bool > conf) const
Return the momentum fraction of the spectator for the selected configuration.
Definition: Dipole.h:243
Dipole()
The default constructor.
tPPtr leftParticle() const
Get the left particle.
Definition: Dipole.h:63
void leftScale(Energy s)
Set the scale for the left particle.
Definition: Dipole.h:142
double emitterX(pair< bool, bool > conf) const
Return the momentum fraction of the emitter for the selected configuration.
Definition: Dipole.h:227
tPPtr rightParticle() const
Get the right particle.
Definition: Dipole.h:68
bool leftDecaying()
Get the bool indicating incoming decay for the left particle, for debugging only.
Definition: Dipole.h:95
Dipole(const pair< PPtr, PPtr > &newParticles, const pair< PDF, PDF > &newPDFs, pair< double, double > newFractions, pair< Energy, Energy > newScales)
The standard constructor.
const PDF & leftPDF() const
Get the left PDF.
Definition: Dipole.h:73
tPPtr emitter(pair< bool, bool > conf) const
Return the emitter particle for the selected configuration.
Definition: Dipole.h:195
void print(ostream &) const
Put information to ostream.
-*- C++ -*-
ThePEG::Ptr< Particle >::transient_pointer tPPtr
ThePEG::Ptr< Particle >::pointer PPtr
constexpr ZeroUnit ZERO
ostream & operator<<(ostream &, const Collision &)