herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
SplittingFunction.h
1 // -*- C++ -*-
2 //
3 // SplittingFunction.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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/Core/ShowerConfig.h"
17 #include "ThePEG/EventRecord/RhoDMatrix.h"
18 #include "Herwig/Decay/DecayMatrixElement.h"
19 #include "Herwig/Shower/Core/Base/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 
76  SplittingFunction(unsigned int b)
77  : Interfaced(), _interactionType(ShowerInteraction::UNDEFINED),
78  _interactionOrder(b),
79  _colourStructure(Undefined), _colourFactor(-1.),
80  angularOrdered_(true), scaleChoice_(2) {}
81 
82 public:
83 
91  ShowerInteraction interactionType() const {return _interactionType;}
92 
96  unsigned int interactionOrder() const {return _interactionOrder;}
97 
101  ColourStructure colourStructure() const {return _colourStructure;}
102 
106  double colourFactor(const IdList &ids) const {
107  if(_colourStructure>0)
108  return _colourFactor;
109  else if(_colourStructure<0) {
110  if(_colourStructure==ChargedChargedNeutral ||
111  _colourStructure==ChargedNeutralCharged) {
112  return sqr(double(ids[0]->iCharge())/3.);
113  }
114  else if(_colourStructure==NeutralChargedCharged) {
115  double fact = sqr(double(ids[1]->iCharge())/3.);
116  if(ids[1]->coloured())
117  fact *= abs(double(ids[1]->iColour()));
118  return fact;
119  }
120  else
121  assert(false);
122  }
123  else
124  assert(false);
125  }
127 
133  virtual bool accept(const IdList & ids) const = 0;
134 
138  virtual bool checkColours(const IdList & ids) const;
139 
153  virtual double P(const double z, const Energy2 t, const IdList & ids,
154  const bool mass, const RhoDMatrix & rho) const = 0;
155 
164  virtual double overestimateP(const double z, const IdList & ids) const = 0;
165 
175  virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
176  const bool mass, const RhoDMatrix & rho) const = 0;
177 
188  virtual double integOverP(const double z, const IdList & ids,
189  unsigned int PDFfactor=0) const = 0;
190 
202  virtual double invIntegOverP(const double r, const IdList & ids,
203  unsigned int PDFfactor=0) const = 0;
205 
215  virtual void colourConnection(tShowerParticlePtr parent,
216  tShowerParticlePtr first,
217  tShowerParticlePtr second,
218  ShowerPartnerType partnerType,
219  const bool back) const;
220 
229  virtual vector<pair<int,Complex> >
230  generatePhiForward(const double z, const Energy2 t, const IdList & ids,
231  const RhoDMatrix &) = 0;
232 
240  virtual vector<pair<int,Complex> >
241  generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
242  const RhoDMatrix &) = 0;
243 
252  virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
253  const IdList & ids, const double phi,
254  bool timeLike) = 0;
255 
259  bool angularOrdered() const {return angularOrdered_;}
260 
264  bool pTScale() const {
265  return scaleChoice_ == 2 ? angularOrdered_ : scaleChoice_ == 0;
266  }
267 
275  void evaluateFinalStateScales(ShowerPartnerType type,
276  Energy scale, double z,
277  tShowerParticlePtr parent,
278  tShowerParticlePtr first,
279  tShowerParticlePtr second);
283  void evaluateInitialStateScales(ShowerPartnerType type,
284  Energy scale, double z,
285  tShowerParticlePtr parent,
286  tShowerParticlePtr first,
287  tShowerParticlePtr second);
288 
292  void evaluateDecayScales(ShowerPartnerType type,
293  Energy scale, double z,
294  tShowerParticlePtr parent,
295  tShowerParticlePtr first,
296  tShowerParticlePtr second);
298 
299 public:
300 
307  void persistentOutput(PersistentOStream & os) const;
308 
314  void persistentInput(PersistentIStream & is, int version);
316 
323  static void Init();
324 
325 protected:
326 
334  virtual void doinit();
336 
337 protected:
338 
342  void colourFactor(double in) {_colourFactor=in;}
343 
344 private:
345 
350  SplittingFunction & operator=(const SplittingFunction &) = delete;
351 
352 private:
353 
358 
362  unsigned int _interactionOrder;
363 
368 
373 
378 
382  unsigned int scaleChoice_;
383 
384 };
385 
386 }
387 
388 #endif /* HERWIG_SplittingFunction_H */
void colourFactor(double in)
Set the colour factor.
unsigned int interactionOrder() const
Return the order of the splitting function in the interaction.
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.
double _colourFactor
The colour factor.
ColourStructure colourStructure() const
Return the colour structure.
unsigned int _interactionOrder
The order of the splitting function in the coupling.
vector< tcPDPtr > IdList
Definition of the IdList for branchings.
Definition: ShowerConfig.h:64
constexpr BinaryOpTraits< T, T >::MulT sqr(const T &x)
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.
SplittingFunction(unsigned int b)
The default constructor.
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.
unsigned int scaleChoice_
The choice of scale.