herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
SplittingFunction.h
1// -*- C++ -*-
2//
3// SplittingFunction.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_SplittingFunction_H
10#define HERWIG_SplittingFunction_H
11//
12// This is the declaration of the SplittingFunction class.
13//
14
15#include "ThePEG/Interface/Interfaced.h"
16#include "Herwig/Shower/QTilde/ShowerConfig.h"
17#include "ThePEG/EventRecord/RhoDMatrix.h"
18#include "Herwig/Decay/DecayMatrixElement.h"
19#include "Herwig/Shower/QTilde/Kinematics/ShowerKinematics.fh"
20#include "ThePEG/EventRecord/ColourLine.h"
21#include "ThePEG/PDT/ParticleData.h"
22#include "SplittingFunction.fh"
23
24namespace Herwig {
25
26using namespace ThePEG;
27
32 enum ColourStructure {Undefined=0,
33 TripletTripletOctet = 1,OctetOctetOctet =2,
34 OctetTripletTriplet = 3,TripletOctetTriplet=4,
35 SextetSextetOctet = 5,
36 ChargedChargedNeutral=-1,ChargedNeutralCharged=-2,
37 NeutralChargedCharged=-3,EW=-4};
38
69
70public:
71
78 _colourStructure(Undefined), _colourFactor(-1.),
79 angularOrdered_(true), scaleChoice_(2), strictAO_(true) {}
80
81public:
82
91
96
100 double colourFactor(const IdList &ids) const {
101 if(_colourStructure>0)
102 return _colourFactor;
103 else if(_colourStructure<0) {
104 if(_colourStructure==ChargedChargedNeutral ||
105 _colourStructure==ChargedNeutralCharged) {
106 return sqr(double(ids[0]->iCharge())/3.);
107 }
108 else if(_colourStructure==NeutralChargedCharged) {
109 double fact = sqr(double(ids[1]->iCharge())/3.);
110 if(ids[1]->coloured())
111 fact *= abs(double(ids[1]->iColour()));
112 return fact;
113 }
114 else if(_colourStructure==EW) {
115 return 1.;
116 }
117 else {
118 assert(false);
119 return 0.;
120 }
121 }
122 else {
123 assert(false);
124 return 0.;
125 }
126 }
128
134 virtual bool accept(const IdList & ids) const = 0;
135
139 virtual bool checkColours(const IdList & ids) const;
140
155 virtual double P(const double z, const Energy2 t, const IdList & ids,
156 const bool mass, const RhoDMatrix & rho) const = 0;
157
166 virtual double overestimateP(const double z, const IdList & ids) const = 0;
167
178 virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
179 const bool mass, const RhoDMatrix & rho) const = 0;
180
191 virtual double integOverP(const double z, const IdList & ids,
192 unsigned int PDFfactor=0) const = 0;
193
205 virtual double invIntegOverP(const double r, const IdList & ids,
206 unsigned int PDFfactor=0) const = 0;
208
218 virtual void colourConnection(tShowerParticlePtr parent,
219 tShowerParticlePtr first,
220 tShowerParticlePtr second,
221 ShowerPartnerType partnerType,
222 const bool back) const;
223
232 virtual vector<pair<int,Complex> >
233 generatePhiForward(const double z, const Energy2 t, const IdList & ids,
234 const RhoDMatrix &) = 0;
235
243 virtual vector<pair<int,Complex> >
244 generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
245 const RhoDMatrix &) = 0;
246
255 virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
256 const IdList & ids, const double phi,
257 bool timeLike) = 0;
258
262 bool angularOrdered() const {return angularOrdered_;}
263
267 bool pTScale() const {
268 return scaleChoice_ == 2 ? angularOrdered_ : scaleChoice_ == 0;
269 }
270
279 Energy scale, double z,
280 tShowerParticlePtr parent,
281 tShowerParticlePtr first,
282 tShowerParticlePtr second);
287 Energy scale, double z,
288 tShowerParticlePtr parent,
289 tShowerParticlePtr first,
290 tShowerParticlePtr second);
291
296 Energy scale, double z,
297 tShowerParticlePtr parent,
298 tShowerParticlePtr first,
299 tShowerParticlePtr second);
301
302public:
303
311
317 void persistentInput(PersistentIStream & is, int version);
319
326 static void Init();
327
328protected:
329
337 virtual void doinit();
339
340protected:
341
345 void colourFactor(double in) {_colourFactor=in;}
346
347private:
348
354
355private:
356
361
366
371
376
380 unsigned int scaleChoice_;
381
386
387};
388
389}
390
391#endif /* HERWIG_SplittingFunction_H */
This is an abstract class which defines the common interface for all splitting functions,...
void evaluateFinalStateScales(ShowerPartnerType type, Energy scale, double z, tShowerParticlePtr parent, tShowerParticlePtr first, tShowerParticlePtr second)
Functions to state scales after branching happens.
ShowerInteraction _interactionType
The interaction type for the splitting function.
ColourStructure _colourStructure
The colour structure.
virtual double integOverP(const double z, const IdList &ids, unsigned int PDFfactor=0) const =0
Purely virtual method which should return the indefinite integral of the overestimated splitting func...
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
double _colourFactor
The colour factor.
SplittingFunction & operator=(const SplittingFunction &)=delete
The assignment operator is private and must never be called.
SplittingFunction()
The default constructor.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
virtual bool accept(const IdList &ids) const =0
Purely virtual method which should determine whether this splitting function can be used for a given ...
void colourFactor(double in)
Set the colour factor.
static void Init()
The standard Init function used to initialize the interfaces.
unsigned int scaleChoice_
The choice of scale.
bool strictAO_
Enforce strict AO.
double colourFactor(const IdList &ids) const
Return the colour factor.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
bool angularOrdered() const
Whether or not the interaction is angular ordered.
virtual DecayMEPtr matrixElement(const double z, const Energy2 t, const IdList &ids, const double phi, bool timeLike)=0
Calculate the matrix element for the splitting.
void evaluateDecayScales(ShowerPartnerType type, Energy scale, double z, tShowerParticlePtr parent, tShowerParticlePtr first, tShowerParticlePtr second)
Sort out scales for decay emission.
bool angularOrdered_
Whether or not this interaction is angular-ordered.
virtual void colourConnection(tShowerParticlePtr parent, tShowerParticlePtr first, tShowerParticlePtr second, ShowerPartnerType partnerType, const bool back) const
Purely virtual method which should make the proper colour connection between the emitting parent and ...
virtual vector< pair< int, Complex > > generatePhiForward(const double z, const Energy2 t, const IdList &ids, const RhoDMatrix &)=0
Method to calculate the azimuthal angle for forward evolution.
virtual vector< pair< int, Complex > > generatePhiBackward(const double z, const Energy2 t, const IdList &ids, const RhoDMatrix &)=0
Method to calculate the azimuthal angle for backward evolution.
ColourStructure colourStructure() const
Return the colour structure.
virtual double overestimateP(const double z, const IdList &ids) const =0
Purely virtual method which should return an overestimate of the splitting function,...
virtual double P(const double z, const Energy2 t, const IdList &ids, const bool mass, const RhoDMatrix &rho) const =0
Methods to return the splitting function.
virtual double ratioP(const double z, const Energy2 t, const IdList &ids, const bool mass, const RhoDMatrix &rho) const =0
Purely virtual method which should return the ratio of the splitting function to the overestimate,...
bool pTScale() const
Scale choice.
void evaluateInitialStateScales(ShowerPartnerType type, Energy scale, double z, tShowerParticlePtr parent, tShowerParticlePtr first, tShowerParticlePtr second)
Sort out scales for initial-state emission.
virtual bool checkColours(const IdList &ids) const
Method to check the colours are correct.
virtual double invIntegOverP(const double r, const IdList &ids, unsigned int PDFfactor=0) const =0
Purely virtual method which should return the inverse of the indefinite integral of the overestimated...
ShowerInteraction interactionType() const
Methods to return the interaction type and order for the splitting function.
ColourStructure
Enum to define the possible types of colour structure which can occur in the branching.
ShowerInteraction
Handy header file to be included in all Shower classes.
-*- C++ -*-
ShowerPartnerType
Enum for the type of shower partner.
vector< tcPDPtr > IdList
Definition of the IdList for branchings.
Definition: ShowerConfig.h:64
constexpr auto sqr(const T &x) -> decltype(x *x)