herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 
24 namespace Herwig {
25 
26 using 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};
38 
69 
70 public:
71 
77  : Interfaced(), _interactionType(ShowerInteraction::UNDEFINED),
78  _colourStructure(Undefined), _colourFactor(-1.),
79  angularOrdered_(true), scaleChoice_(2), strictAO_(true) {}
80 
81 public:
82 
90  ShowerInteraction interactionType() const {return _interactionType;}
91 
95  ColourStructure colourStructure() const {return _colourStructure;}
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 {
115  assert(false);
116  return 0.;
117  }
118  }
119  else {
120  assert(false);
121  return 0.;
122  }
123  }
125 
131  virtual bool accept(const IdList & ids) const = 0;
132 
136  virtual bool checkColours(const IdList & ids) const;
137 
151  virtual double P(const double z, const Energy2 t, const IdList & ids,
152  const bool mass, const RhoDMatrix & rho) const = 0;
153 
162  virtual double overestimateP(const double z, const IdList & ids) const = 0;
163 
173  virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
174  const bool mass, const RhoDMatrix & rho) const = 0;
175 
186  virtual double integOverP(const double z, const IdList & ids,
187  unsigned int PDFfactor=0) const = 0;
188 
200  virtual double invIntegOverP(const double r, const IdList & ids,
201  unsigned int PDFfactor=0) const = 0;
203 
213  virtual void colourConnection(tShowerParticlePtr parent,
214  tShowerParticlePtr first,
215  tShowerParticlePtr second,
216  ShowerPartnerType partnerType,
217  const bool back) const;
218 
227  virtual vector<pair<int,Complex> >
228  generatePhiForward(const double z, const Energy2 t, const IdList & ids,
229  const RhoDMatrix &) = 0;
230 
238  virtual vector<pair<int,Complex> >
239  generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
240  const RhoDMatrix &) = 0;
241 
250  virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
251  const IdList & ids, const double phi,
252  bool timeLike) = 0;
253 
257  bool angularOrdered() const {return angularOrdered_;}
258 
262  bool pTScale() const {
263  return scaleChoice_ == 2 ? angularOrdered_ : scaleChoice_ == 0;
264  }
265 
273  void evaluateFinalStateScales(ShowerPartnerType type,
274  Energy scale, double z,
275  tShowerParticlePtr parent,
276  tShowerParticlePtr first,
277  tShowerParticlePtr second);
281  void evaluateInitialStateScales(ShowerPartnerType type,
282  Energy scale, double z,
283  tShowerParticlePtr parent,
284  tShowerParticlePtr first,
285  tShowerParticlePtr second);
286 
290  void evaluateDecayScales(ShowerPartnerType type,
291  Energy scale, double z,
292  tShowerParticlePtr parent,
293  tShowerParticlePtr first,
294  tShowerParticlePtr second);
296 
297 public:
298 
305  void persistentOutput(PersistentOStream & os) const;
306 
312  void persistentInput(PersistentIStream & is, int version);
314 
321  static void Init();
322 
323 protected:
324 
332  virtual void doinit();
334 
335 protected:
336 
340  void colourFactor(double in) {_colourFactor=in;}
341 
342 private:
343 
348  SplittingFunction & operator=(const SplittingFunction &) = delete;
349 
350 private:
351 
356 
361 
366 
371 
375  unsigned int scaleChoice_;
376 
380  bool strictAO_;
381 
382 };
383 
384 }
385 
386 #endif /* HERWIG_SplittingFunction_H */
void colourFactor(double in)
Set the colour factor.
ShowerPartnerType
Enum for the type of shower partner.
ShowerInteraction
Handy header file to be included in all Shower classes.
ShowerInteraction _interactionType
The interaction type for the splitting function.
bool angularOrdered_
Whether or not this interaction is angular-ordered.
constexpr auto sqr(const T &x) -> decltype(x *x)
double _colourFactor
The colour factor.
ColourStructure colourStructure() const
Return the colour structure.
vector< tcPDPtr > IdList
Definition of the IdList for branchings.
Definition: ShowerConfig.h:64
SplittingFunction()
The default constructor.
ColourStructure
Enum to define the possible types of colour structure which can occur in the branching.
bool pTScale() const
Scale choice.
ShowerInteraction interactionType() const
Methods to return the interaction type and order for the splitting function.
double colourFactor(const IdList &ids) const
Return the colour factor.
ColourStructure _colourStructure
The colour structure.
This is an abstract class which defines the common interface for all splitting functions, for both initial-state and final-state radiation.
-*- C++ -*-
bool angularOrdered() const
Whether or not the interaction is angular ordered.
bool strictAO_
Enforce strict AO.
unsigned int scaleChoice_
The choice of scale.