herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
ShowerApproximation.h
1 // -*- C++ -*-
2 //
3 // ShowerApproximation.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_ShowerApproximation_H
10 #define Herwig_ShowerApproximation_H
11 //
12 // This is the declaration of the ShowerApproximation class.
13 //
14 
15 #include "ThePEG/Handlers/HandlerBase.h"
16 #include "ThePEG/Handlers/StandardXComb.h"
17 #include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
18 #include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
19 #include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.fh"
20 #include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.fh"
21 #include "HardScaleProfile.h"
22 
23 namespace Herwig {
24 
25 using namespace ThePEG;
26 
36 
37 public:
38 
45 
49  virtual ~ShowerApproximation();
51 
52 public:
53 
58  virtual bool needsSplittingGenerator() const { return false; }
59 
64  virtual bool hasHEvents() const { return true; }
65 
70  virtual bool needsTildeXCombs() const { return false; }
71 
76  virtual bool needsTruncatedShower() const { return false; }
77 
83  virtual Ptr<TildeKinematics>::tptr showerTildeKinematics() const;
84 
90  virtual Ptr<InvertedTildeKinematics>::tptr showerInvertedTildeKinematics() const;
91 
92 public:
93 
97  void setBornXComb(tStdXCombPtr xc) { theBornXComb = xc; }
98 
102  tStdXCombPtr bornXComb() const { return theBornXComb; }
103 
107  tcStdXCombPtr bornCXComb() const { return theBornXComb; }
108 
112  void setRealXComb(tStdXCombPtr xc) { theRealXComb = xc; }
113 
117  tStdXCombPtr realXComb() const { return theRealXComb; }
118 
122  tcStdXCombPtr realCXComb() const { return theRealXComb; }
123 
127  void setTildeXCombs(const vector<StdXCombPtr>& xc) { theTildeXCombs = xc; }
128 
132  const vector<StdXCombPtr>& tildeXCombs() const { return theTildeXCombs; }
133 
137  void setDipole(Ptr<SubtractionDipole>::tptr);
138 
142  Ptr<SubtractionDipole>::tptr dipole() const;
143 
147  virtual bool hasSpinCorrelations() const { return false; }
148 
149 public:
150 
155  bool belowCutoff() const { return theBelowCutoff; }
156 
161  void wasBelowCutoff() { theBelowCutoff = true; }
162 
166  void resetBelowCutoff() { theBelowCutoff = false; }
167 
171  Energy ffPtCut() const { return theFFPtCut; }
172 
176  Energy fiPtCut() const { return theFIPtCut; }
177 
181  Energy iiPtCut() const { return theIIPtCut; }
182 
186  Energy safeCut() const { return theSafeCut;}
187 
191  Energy ffScreeningScale() const { return theFFScreeningScale; }
192 
196  Energy fiScreeningScale() const { return theFIScreeningScale; }
197 
201  Energy iiScreeningScale() const { return theIIScreeningScale; }
202 
206  virtual Energy2 showerEmissionScale() const;
207 
211  Energy2 showerRenormalizationScale() const {
212  return sqr(renormalizationScaleFactor())*showerEmissionScale();
213  }
214 
218  Energy2 showerFactorizationScale() const {
219  return sqr(factorizationScaleFactor())*showerEmissionScale();
220  }
221 
225  Energy2 bornRenormalizationScale() const;
226 
230  Energy2 bornFactorizationScale() const;
231 
235  Energy2 realRenormalizationScale() const;
236 
240  Energy2 realFactorizationScale() const;
241 
246 
247  bornScale = 0,
250  realScale = 1,
253  showerScale = 2
256  };
257 
262  int realEmissionScaleInSubtraction() const { return theRealEmissionScaleInSubtraction; }
263 
268  int bornScaleInSubtraction() const { return theBornScaleInSubtraction; }
269 
274  int emissionScaleInSubtraction() const { return theEmissionScaleInSubtraction; }
275 
280  int realEmissionScaleInSplitting() const { return theRealEmissionScaleInSplitting; }
281 
286  int bornScaleInSplitting() const { return theBornScaleInSplitting; }
287 
292  int emissionScaleInSplitting() const { return theEmissionScaleInSplitting; }
293 
297  double scaleWeight(int rScale, int bScale, int eScale) const;
298 
302  double subtractionScaleWeight() const {
303  return scaleWeight(realEmissionScaleInSubtraction(),
304  bornScaleInSubtraction(),
305  emissionScaleInSubtraction());
306  }
307 
311  double splittingScaleWeight() const {
312  return scaleWeight(realEmissionScaleInSplitting(),
313  bornScaleInSplitting(),
314  emissionScaleInSplitting());
315  }
316 
317 public:
318 
323  bool restrictPhasespace() const { return theRestrictPhasespace; }
324 
329  void restrictPhasespace(bool yes) { theRestrictPhasespace = yes; }
330 
334  Ptr<HardScaleProfile>::tptr profileScales() const { return theHardScaleProfile; }
335 
339  void profileScales(Ptr<HardScaleProfile>::ptr prof) { theHardScaleProfile = prof; }
340 
344  bool hardScaleIsMuF() const { return maxPtIsMuF; }
345 
349  void hardScaleIsMuF(bool yes) { maxPtIsMuF = yes; }
350 
354  double hardScaleFactor() const { return theHardScaleFactor; }
355 
359  void hardScaleFactor(double f) { theHardScaleFactor = f; }
360 
364  double factorizationScaleFactor() const { return theFactorizationScaleFactor; }
365 
369  double renormalizationScaleFactor() const { return theRenormalizationScaleFactor; }
370 
374  void factorizationScaleFactor(double f) { theFactorizationScaleFactor = f; }
375 
379  void renormalizationScaleFactor(double f) { theRenormalizationScaleFactor = f; }
380 
384  virtual void checkCutoff();
385 
391  virtual void getShowerVariables();
392 
398  virtual CrossSection dSigHatDR() const = 0;
399 
406  virtual double me2() const = 0;
407 
411  double bornPDFWeight(Energy2 muF) const;
412 
416  double realPDFWeight(Energy2 muF) const;
417 
418 protected:
419 
424  virtual bool isInShowerPhasespace() const;
425 
431  virtual bool isAboveCutoff() const;
432 
436  virtual Energy hardScale() const;
437 
441  void useOpenZ(bool yes) { theOpenZ = yes; }
442 
447  bool openZ() const { return theOpenZ; }
448 
449 public:
450 
454  virtual double channelWeight(int emitter, int emission,
455  int spectator, int bemitter) const;
456 
460  virtual double channelWeight() const;
461 
462 public:
463 
470  void persistentOutput(PersistentOStream & os) const;
471 
477  void persistentInput(PersistentIStream & is, int version);
479 
486  static void Init();
487 
488 
489 protected:
490 
498  virtual void doinit();
500 
501 
502 // If needed, insert declarations of virtual function defined in the
503 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
504 
505 public:
506 
511  Ptr<ColourBasis>::tptr largeNBasis() const { return theLargeNBasis; }
512 
513 protected:
514 
519  Ptr<ColourBasis>::ptr theLargeNBasis;
520 
524  void setLargeNBasis();
525 
530 
531 private:
532 
536  tStdXCombPtr theBornXComb;
537 
541  tStdXCombPtr theRealXComb;
542 
546  vector<StdXCombPtr> theTildeXCombs;
547 
551  Ptr<SubtractionDipole>::tptr theDipole;
552 
558 
562  Energy theFFPtCut;
563 
569 
573  Energy theFIPtCut;
574 
580 
584  Energy theIIPtCut;
585 
591 
595  Energy theSafeCut;
596 
602 
607 
612 
617 
623 
629 
635 
641 
647 
653 
658 
663 
668 
672  Ptr<HardScaleProfile>::ptr theHardScaleProfile;
673 
677  bool theOpenZ;
678 
679 private:
680 
685  ShowerApproximation & operator=(const ShowerApproximation &) = delete;
686 
687 };
688 
689 }
690 
691 #endif /* Herwig_ShowerApproximation_H */
bool maxPtIsMuF
True if maximum pt should be deduced from the factorization scale.
double theExtrapolationX
The x value from which on we extrapolate PDFs for numerically stable ratios.
double hardScaleFactor() const
Return the scale factor for the hard scale.
void profileScales(Ptr< HardScaleProfile >::ptr prof)
Set profile scales.
tcStdXCombPtr bornCXComb() const
Return the XComb object describing the Born process.
double subtractionScaleWeight() const
Return the scale weight for the matching subtraction.
tStdXCombPtr realXComb() const
Return the XComb object describing the real emission process.
int bornScaleInSubtraction() const
Return the scale choice in the born cross section to be used in the matching subtraction.
vector< StdXCombPtr > theTildeXCombs
The tilde xcomb objects associated to the real xcomb.
bool hardScaleIsMuF() const
Return true if maximum pt should be deduced from the factorization scale.
int theRealEmissionScaleInSubtraction
The scale choice in the real emission cross section to be used in the matching subtraction.
tStdXCombPtr theBornXComb
The XComb object describing the Born process.
Ptr< SubtractionDipole >::tptr theDipole
The dipole in charge for the emission.
Energy theFFPtCut
The pt cut to be applied for final-final dipoles.
ShowerApproximation describes the shower emission to be used in NLO matching.
int realEmissionScaleInSubtraction() const
Return the scale choice in the real emission cross section to be used in the matching subtraction...
void setTildeXCombs(const vector< StdXCombPtr > &xc)
Set the tilde xcomb objects associated to the real xcomb.
Energy2 showerRenormalizationScale() const
Return the shower renormalization scale.
virtual bool needsTildeXCombs() const
Return true, if this shower approximation will require tilde XCombs for the real phase space point ge...
virtual bool hasSpinCorrelations() const
Return true, if this matching is capable of spin correlations.
Energy theFIPtCut
The pt cut to be applied for final-initial dipoles.
constexpr auto sqr(const T &x) -> decltype(x *x)
void resetBelowCutoff()
Reset the below cutoff flag.
void factorizationScaleFactor(double f)
Set the factorization scale factor.
int theBornScaleInSubtraction
The scale choice in the born cross section to be used in the matching subtraction.
tcStdXCombPtr realCXComb() const
Return the XComb object describing the real emission process.
bool belowCutoff() const
Return true if one of the recently encountered configutations was below the infrared cutoff...
void renormalizationScaleFactor(double f)
Set the renormalization scale factor.
double factorizationScaleFactor() const
Get the factorization scale factor.
double splittingScaleWeight() const
Return the scale weight for the splitting.
void useOpenZ(bool yes)
Use the maximum available phase space for the momentum fraction.
const vector< StdXCombPtr > & tildeXCombs() const
Return the tilde xcomb objects associated to the real xcomb.
Energy safeCut() const
Return the pt cut to be applied for initial-initial dipoles.
Ptr< ColourBasis >::ptr theLargeNBasis
A large-N colour basis to be used when reproducing the shower kernels.
int theBornScaleInSplitting
The scale choice in the born cross section to be used in the splitting.
int emissionScaleInSplitting() const
Return the scale choice in the emission contribution to be used in the splitting. ...
virtual bool hasHEvents() const
Return true, if this shower approximation will require H events.
int realEmissionScaleInSplitting() const
Return the scale choice in the real emission cross section to be used in the splitting.
double theRenormalizationScaleFactor
The scale factor for the renormalization scale.
double theFactorizationScaleFactor
The scale factor for the factorization scale.
Energy ffScreeningScale() const
Return the screening scale to be applied for final-final dipoles.
void setRealXComb(tStdXCombPtr xc)
Set the XComb object describing the real emission process.
Energy theIIScreeningScale
An optional screening scale for initial-initial dipoles; see DipoleSplittingKernel.
void wasBelowCutoff()
Indicate that one of the recently encountered configutations was below the infrared cutoff...
bool restrictPhasespace() const
Return true, if the phase space restrictions of the dipole shower should be applied.
double theHardScaleFactor
The scale factor for the hard scale.
Energy fiPtCut() const
Return the pt cut to be applied for final-initial dipoles.
tStdXCombPtr bornXComb() const
Return the XComb object describing the Born process.
void setBornXComb(tStdXCombPtr xc)
Set the XComb object describing the Born process.
bool theRestrictPhasespace
True, if the phase space restrictions of the dipole shower should be applied.
Energy iiScreeningScale() const
Return the screening scale to be applied for initial-initial dipoles.
bool theBelowCutoff
True if one of the recently encountered configutations was below the infrared cutoff.
void restrictPhasespace(bool yes)
Indicate that the phase space restrictions of the dipole shower should be applied.
Ptr< ColourBasis >::tptr largeNBasis() const
A large-N colour basis to be used when reproducing the shower kernels.
void hardScaleFactor(double f)
Set the scale factor for the hard scale.
Energy iiPtCut() const
Return the pt cut to be applied for initial-initial dipoles.
void hardScaleIsMuF(bool yes)
Indicate that maximum pt should be deduced from the factorization scale.
Energy theSafeCut
The cut to be applied as an enhanced shower cutoff.
bool theOpenZ
Use the maximum available phase space for the momentum fraction.
Ptr< HardScaleProfile >::tptr profileScales() const
Return profile scales.
Energy theRenormalizationScaleFreeze
A freezing value for the renormalization scale.
Energy theFFScreeningScale
An optional screening scale for final-final dipoles; see DipoleSplittingKernel.
-*- C++ -*-
Energy2 showerFactorizationScale() const
Return the shower factorization scale.
int bornScaleInSplitting() const
Return the scale choice in the born cross section to be used in the splitting.
Energy ffPtCut() const
Return the pt cut to be applied for final-final dipoles.
int theEmissionScaleInSubtraction
The scale choice in the emission contribution to be used in the matching subtraction.
Energy theIIPtCut
The pt cut to be applied for initial-initial dipoles.
Ptr< HardScaleProfile >::ptr theHardScaleProfile
The profile scales.
Energy theFIScreeningScale
An optional screening scale for final-initial dipoles; see DipoleSplittingKernel. ...
double renormalizationScaleFactor() const
Get the renormalization scale factor.
int theRealEmissionScaleInSplitting
The scale choice in the real emission cross section to be used in the splitting.
tStdXCombPtr theRealXComb
The XComb object describing the real emission process.
int emissionScaleInSubtraction() const
Return the scale choice in the emission contribution to be used in the matching subtraction.
int theEmissionScaleInSplitting
The scale choice in the emission contribution to be used in the splitting.
Energy theFactorizationScaleFreeze
A freezing value for the factorization scale.
virtual bool needsSplittingGenerator() const
Return true, if this shower approximation will require a splitting generator.
Energy fiScreeningScale() const
Return the screening scale to be applied for final-initial dipoles.
ScaleChoices
Enumerate possible scale choices.
virtual bool needsTruncatedShower() const
Return true, if this shower approximation will require a truncated parton shower. ...
bool openZ() const
Return true if the maximum available phase space should be used for the momentum fraction.