herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
SudakovFormFactor.h
1 // -*- C++ -*-
2 //
3 // SudakovFormFactor.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_SudakovFormFactor_H
10 #define HERWIG_SudakovFormFactor_H
11 //
12 // This is the declaration of the SudakovFormFactor class.
13 //
14 
15 #include "ThePEG/Interface/Interfaced.h"
16 #include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
17 #include "Herwig/Shower/ShowerAlpha.h"
18 #include "Herwig/Shower/QTilde/SplittingFunctions/SplittingGenerator.fh"
19 #include "ThePEG/Repository/UseRandom.h"
20 #include "ThePEG/PDF/BeamParticleData.h"
21 #include "ThePEG/EventRecord/RhoDMatrix.h"
22 #include "ThePEG/EventRecord/SpinInfo.h"
23 #include "Herwig/Shower/QTilde/Kinematics/ShowerKinematics.fh"
24 #include "SudakovFormFactor.fh"
25 #include "SudakovCutOff.h"
26 
27 namespace Herwig {
28 
29 using namespace ThePEG;
30 
34 typedef Ptr<BeamParticleData>::transient_const_pointer tcBeamPtr;
35 
128 
133  friend class SplittingGenerator;
134 
135 public:
136 
140  SudakovFormFactor() : pdfmax_(35.0), pdffactor_(0),
141  z_( 0.0 ),phi_(0.0), pT_(){}
142 
155  virtual ShoKinPtr generateNextTimeBranching(const Energy startingScale,
156  const IdList &ids,
157  const RhoDMatrix & rho,
158  double enhance, double detuning);
159 
170  virtual ShoKinPtr generateNextDecayBranching(const Energy startingScale,
171  const Energy stoppingScale,
172  const Energy minmass,
173  const IdList &ids,
174  const RhoDMatrix & rho,
175  double enhance,
176  double detuning);
177 
188  virtual ShoKinPtr generateNextSpaceBranching(const Energy startingScale,
189  const IdList &ids,double x,
190  const RhoDMatrix & rho,
191  double enhance,
192  tcBeamPtr beam,
193  double detuning);
195 
202  virtual double generatePhiForward(ShowerParticle & particle,const IdList & ids,
203  ShoKinPtr kinematics,
204  const RhoDMatrix & rho);
205 
212  virtual double generatePhiBackward(ShowerParticle & particle,const IdList & ids,
213  ShoKinPtr kinematics,
214  const RhoDMatrix & rho);
215 
222  virtual double generatePhiDecay(ShowerParticle & particle,const IdList & ids,
223  ShoKinPtr kinematics,
224  const RhoDMatrix & rho);
225 
233  tSplittingFnPtr splittingFn() const { return splittingFn_; }
234 
238  tShowerAlphaPtr alpha() const { return alpha_; }
239 
244  {return splittingFn_->interactionType();}
246 
247 public:
248 
256  double z() const { return z_; }
257 
261  double phi() const { return phi_; }
262 
266  Energy pT() const { return pT_; }
268 
272  double pdfMax() const { return pdfmax_;}
273 
278  virtual Energy calculateScale(double z, Energy pt, IdList ids,unsigned int iopt);
279 
280 public:
281 
288  void persistentOutput(PersistentOStream & os) const;
289 
295  void persistentInput(PersistentIStream & is, int version);
297 
304  static void Init();
305 
306 protected:
319  bool guessTimeLike(Energy2 &t, Energy2 tmin, double enhance, double detune);
320 
328  bool guessDecay(Energy2 &t, Energy2 tmax,Energy minmass,
329  double enhance, double detune);
330 
338  bool guessSpaceLike(Energy2 &t, Energy2 tmin, const double x,
339  double enhance, double detune);
341 
347  void initialize(const IdList & ids,Energy2 &tmin);
348 
356  bool PSVeto(const Energy2 t);
357 
363  bool computeTimeLikeLimits(Energy2 & scale);
364 
371  bool computeSpaceLikeLimits(Energy2 & scale, double x);
372 
373 protected:
374 
393  void guesstz(Energy2 t1,unsigned int iopt, const IdList &ids,
394  double enhance,bool ident,
395  double detune, Energy2 &t_main, double &z_main);
396 
407  bool PDFVeto(const Energy2 t, const double x,
408  const tcPDPtr parton0, const tcPDPtr parton1,
409  tcBeamPtr beam) const;
413  double PDFVetoRatio(const Energy2 t, const double x,
414  const tcPDPtr parton0, const tcPDPtr parton1,
415  tcBeamPtr beam,double factor) const;
416 
424  bool SplittingFnVeto(const Energy2 t,
425  const IdList &ids,
426  const bool mass,
427  const RhoDMatrix & rho,
428  double detune) const {
429  return UseRandom::rnd()>SplittingFnVetoRatio(t,ids,mass,rho,detune);
430  }
431 
436  double SplittingFnVetoRatio(const Energy2 t,
437  const IdList &ids,
438  const bool mass,
439  const RhoDMatrix & rho,
440  double detune) const {
441  return splittingFn_->ratioP(z_, t, ids,mass,rho)/detune;
442  }
443 
449  bool alphaSVeto(Energy2 pt2) const;
450 
455  double alphaSVetoRatio(Energy2 pt2,double factor) const;
456 
457 
459 
463  void addSplitting(const IdList &);
464 
468  void removeSplitting(const IdList &);
469 
473  const vector<IdList> & particles() const { return particles_; }
474 
475 public:
476 
480  void setPDF(tcPDFPtr pdf, Energy scale) {
481  pdf_ = pdf;
482  freeze_ = scale;
483  }
484 
485 public:
486 
490  const vector<Energy> & virtualMasses(const IdList & ids) {
491  return cutoff_->virtualMasses(ids);
492  }
493 
497  Energy2 pT2min() { return cutoff_->pT2min(); }
498 
499 protected:
500 
507  virtual IBPtr clone() const {return new_ptr(*this);}
508 
513  virtual IBPtr fullclone() const {return new_ptr(*this);}
515 
516 private:
517 
522  SudakovFormFactor & operator=(const SudakovFormFactor &) = delete;
523 
524 private:
525 
529  SplittingFnPtr splittingFn_;
530 
534  ShowerAlphaPtr alpha_;
535 
539  SudakovCutOffPtr cutoff_;
540 
544  double pdfmax_;
545 
550  vector<IdList> particles_;
551 
555  unsigned pdffactor_;
556 
557 private:
558 
567  double z_;
568 
572  double phi_;
573 
577  Energy pT_;
579 
583  pair<double,double> zlimits_;
584 
593 
597  Energy freeze_;
599 
600 private:
601 
605  Energy q_;
606 
611 
615  vector<Energy> masses_;
616 
620  vector<Energy2> masssquared_;
621 
622 };
623 
624 }
625 
626 #endif /* HERWIG_SudakovFormFactor_H */
Ptr< BeamParticleData >::transient_const_pointer tcBeamPtr
A typedef for the BeamParticleData.
Definition: HwMEBase.h:20
Energy freeze_
Freezing scale.
vector< IdList > particles_
List of the particles this Sudakov is used for to aid in setting up interpolation tables if needed...
vector< Energy2 > masssquared_
The mass squared of the particles in the current branching.
This is the definition of the Sudakov form factor class.
ShowerInteraction
Handy header file to be included in all Shower classes.
double z_
Member variables to keep the shower kinematics information generated by a call to generateNextTimeBra...
ShowerAlphaPtr alpha_
Pointer to the coupling for this Sudakov form factor.
pair< double, double > zlimits_
The limits of in the splitting.
ThePEG::Ptr< PDFBase >::transient_const_pointer tcPDFPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
const vector< IdList > & particles() const
Access the potential branchings.
Energy pT() const
The transverse momentum.
SudakovFormFactor()
The default constructor.
static double rnd()
Energy2 pT2min()
The minimum pT2.
vector< tcPDPtr > IdList
Definition of the IdList for branchings.
Definition: ShowerConfig.h:64
IdList ids_
The Ids of the particles in the current branching.
bool SplittingFnVeto(const Energy2 t, const IdList &ids, const bool mass, const RhoDMatrix &rho, double detune) const
The veto on the splitting function.
tSplittingFnPtr splittingFn() const
Methods to provide public access to the private member variables.
vector< Energy > masses_
The masses of the particles in the current branching.
ShowerInteraction interactionType() const
The type of interaction.
virtual IBPtr clone() const
Make a simple clone of this object.
SplittingFnPtr splittingFn_
Pointer to the splitting function for this Sudakov form factor.
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
const vector< Energy > & virtualMasses(const IdList &ids)
Calculate the virtual masses for a branchings.
void setPDF(tcPDFPtr pdf, Energy scale)
Set the PDF.
double phi_
The azimuthal angle.
This class represents a particle in the showering process.
Energy pT_
The transverse momentum.
tShowerAlphaPtr alpha() const
Return the pointer to the ShowerAlpha object.
SudakovCutOffPtr cutoff_
Pointer to the coupling for this Sudakov form factor.
Energy q_
The evolution scale, .
unsigned pdffactor_
Option for the inclusion of a factor in the PDF estimate.
-*- C++ -*-
double pdfMax() const
Access the maximum weight for the PDF veto.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
double SplittingFnVetoRatio(const Energy2 t, const IdList &ids, const bool mass, const RhoDMatrix &rho, double detune) const
The Splitting function veto ratio.
double z() const
Methods to access the kinematic variables for the branching.
double phi() const
The azimuthal angle.
This class is responsible for creating, at the beginning of the Run, all the SplittingFunction object...
tcPDFPtr pdf_
Stuff for the PDFs.
double pdfmax_
Maximum value of the PDF weight.