Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:24:06

0001 // -*- C++ -*-
0002 #ifndef Herwig_PerturbativeDecayer_H
0003 #define Herwig_PerturbativeDecayer_H
0004 //
0005 // This is the declaration of the PerturbativeDecayer class.
0006 //
0007 
0008 #include "Herwig/Decay/DecayIntegrator.h"
0009 #include "Herwig/Shower/ShowerAlpha.h"
0010 #include "Herwig/Shower/ShowerInteraction.h"
0011 
0012 namespace Herwig {
0013 
0014 using namespace ThePEG;
0015 
0016 /**
0017  * The PerturbativeDecayer class is the base class for perturbative decays in
0018  * Herwig and implements the functuality for the POWHEG corrections
0019  *
0020  * @see \ref PerturbativeDecayerInterfaces "The interfaces"
0021  * defined for PerturbativeDecayer.
0022  */
0023 class PerturbativeDecayer: public DecayIntegrator {
0024 
0025 protected:
0026   
0027   /**
0028    * Type of dipole
0029    */
0030   enum dipoleType {FFa, FFc, IFa, IFc, IFba, IFbc, FFg};
0031 
0032   /**
0033    *   Phase-space region for an emission (assumes \f$a\to b,c\f$
0034    */
0035   enum phaseSpaceRegion {emissionFromB,emissionFromC,emissionFromA1,emissionFromA2,deadZone};
0036 
0037   /**
0038    *  Type of dipole
0039    */
0040   struct DipoleType {
0041 
0042     DipoleType() {}
0043 
0044     DipoleType(dipoleType a, ShowerInteraction b)
0045       : type(a), interaction(b)
0046     {}
0047     
0048     dipoleType type;
0049 
0050     ShowerInteraction interaction;
0051   };
0052 
0053 public:
0054 
0055   /**
0056    * The default constructor.
0057    */
0058   PerturbativeDecayer() : inter_(ShowerInteraction::QCD),
0059               pTmin_(GeV), useMEforT2_(true),
0060               C_(5.), ymax_(10.), phaseOpt_(1),
0061               pT_(ZERO),mb_(ZERO), e_(0.),
0062               s_(0.), e2_(0.), s2_(0.), enhance_(1.)
0063   {}
0064 
0065   /**
0066    *  Has a POWHEG style correction
0067    */
0068   virtual POWHEGType hasPOWHEGCorrection() {return No;}
0069 
0070   /**
0071    *  Member to generate the hardest emission in the POWHEG scheme
0072    */
0073   virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr);
0074 
0075   /**
0076    *  Apply the hard matrix element correction to a given hard process or decay
0077    */
0078   virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
0079 
0080 public:
0081 
0082   /** @name Functions used by the persistent I/O system. */
0083   //@{
0084   /**
0085    * Function used to write out object persistently.
0086    * @param os the persistent output stream written to.
0087    */
0088   void persistentOutput(PersistentOStream & os) const;
0089 
0090   /**
0091    * Function used to read in object persistently.
0092    * @param is the persistent input stream read from.
0093    * @param version the version number of the object when written.
0094    */
0095   void persistentInput(PersistentIStream & is, int version);
0096   //@}
0097 
0098   /**
0099    * The standard Init function used to initialize the interfaces.
0100    * Called exactly once for each class by the class description system
0101    * before the main function starts or
0102    * when this class is dynamically loaded.
0103    */
0104   static void Init();
0105 
0106 protected:
0107 
0108   /**
0109    *  Calculate matrix element ratio \f$\frac{M^2}{\alpha_S}\frac{|\overline{\rm{ME}}_3|}{|\overline{\rm{ME}}_2|}\f$
0110    */
0111   virtual double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
0112                     const ParticleVector & decay3, MEOption meopt,
0113                     ShowerInteraction inter);
0114 
0115   /**
0116    *  Work out the type of process
0117    */
0118   bool identifyDipoles(vector<DipoleType> & dipoles,
0119                PPtr & aProgenitor,
0120                PPtr & bProgenitor,
0121                PPtr & cProgenitor,
0122                ShowerInteraction inter) const;
0123 
0124   /**
0125    *  Coupling for the generation of hard QCD radiation
0126    */
0127   ShowerAlphaPtr alphaS() {return alphaS_;}
0128 
0129   /**
0130    *  Coupling for the generation of hard QED radiation
0131    */
0132   ShowerAlphaPtr alphaEM() {return alphaEM_;}
0133 
0134   /**
0135    *  Return the momenta including the hard emission
0136    */
0137   vector<Lorentz5Momentum> hardMomenta(PPtr in, PPtr emitter, 
0138                        PPtr spectator, 
0139                        const vector<DipoleType>  & dipoles,
0140                        int i, bool inDeadZone);
0141 
0142   /**
0143    *  Calculate momenta of all the particles
0144    */
0145   bool calcMomenta(int j, Energy pT, double y, double phi, double& xg, 
0146            double& xs, double& xe, double& xe_z, 
0147            vector<Lorentz5Momentum>& particleMomenta);
0148 
0149   /**
0150    *  Check the calculated momenta are physical
0151    */
0152   bool psCheck(const double xg, const double xs);
0153 
0154   /**
0155    * Return dipole corresponding to the DipoleType dipoleId
0156    */
0157   pair<double,double> calculateDipole(const DipoleType & dipoleId,
0158                       const Particle & inpart,
0159                       const ParticleVector & decay3);
0160 
0161   /**
0162    * Return contribution to dipole that depends on the spin of the emitter
0163    */
0164   double dipoleSpinFactor(tcPDPtr emitter, double z);
0165 
0166   /**
0167    *  Return the colour coefficient of the dipole
0168    */
0169   double colourCoeff(tcPDPtr emitter, tcPDPtr spectator,
0170              tcPDPtr other, DipoleType dipole);
0171   
0172   /**
0173    * Set up the colour lines
0174    */
0175   void getColourLines(RealEmissionProcessPtr real);
0176 
0177   /**
0178    *  Generate a hard emission
0179    */
0180   RealEmissionProcessPtr getHardEvent(RealEmissionProcessPtr born,
0181                       bool inDeadZone,
0182                       ShowerInteraction inter);
0183 
0184   /**
0185    *  Is the \f$x_g,x_s\f$ point in the dead-zone for all the dipoles
0186    */
0187   bool inTotalDeadZone(double xg, double xs,
0188                const vector<DipoleType>  & dipoles,
0189                int i);
0190 
0191   /**
0192    *  Is the \f$x_g,x_a\f$ point in the dead-zone for an initial-final colour connection
0193    */
0194   phaseSpaceRegion inInitialFinalDeadZone(double xg, double xa, double a, double c) const;
0195 
0196   /**
0197    *  Is the \f$x_b,x_c\f$ point in the dead-zone for a final-final colour connection
0198    */
0199   phaseSpaceRegion inFinalFinalDeadZone(double xb, double xc, double b, double c) const;
0200 
0201   /**
0202    *  For me corrections use the shower or me for the T2 region
0203    */
0204   bool useMEforT2() const {return useMEforT2_;}
0205 
0206 protected:
0207 
0208   /**
0209    *  Access to the kinematics for inheriting classes
0210    */
0211   //@{
0212   /**
0213    *  Transverse momentum of the emission
0214    */
0215   const Energy & pT() const { return pT_;}
0216 
0217   /**
0218    *  Mass of decaying particle
0219    */
0220   const Energy & mb() const {return mb_;}
0221 
0222   /**
0223    *  Reduced mass of emitter child particle
0224    */
0225   const double & e() const {return e_;}
0226 
0227   /**
0228    * Reduced mass of spectator child particle
0229    */
0230   const double & s() const {return s_;}
0231 
0232   /**
0233    *  Reduced mass of emitter child particle squared
0234    */
0235   const double & e2() const {return e2_;}
0236 
0237   /**
0238    * Reduced mass of spectator child particle squared
0239    */
0240   const double & s2() const {return s2_;}
0241   //@}
0242  
0243 private:
0244 
0245   /**
0246    * The assignment operator is private and must never be called.
0247    * In fact, it should not even be implemented.
0248    */
0249   PerturbativeDecayer & operator=(const PerturbativeDecayer &) = delete;
0250 
0251 private:
0252 
0253   /**
0254    *  Members for the generation of the hard radiation
0255    */
0256   //@{
0257   /**
0258    *  Which types of radiation to generate
0259    */
0260   ShowerInteraction inter_;
0261   
0262   /**
0263    *  Coupling for the generation of hard QCD radiation
0264    */
0265   ShowerAlphaPtr alphaS_;
0266   
0267   /**
0268    *  Coupling for the generation of hard QED radiation
0269    */
0270   ShowerAlphaPtr alphaEM_;
0271 
0272   /**
0273    *  Minimum \f$p_T\f$
0274    */
0275   Energy pTmin_;
0276 
0277   /**
0278    *  This flag determines whether the T2 region in the decay shower
0279    *  (JHEP12(2003)_045) is populated by the ME correction (true) or
0280    *  the shower from the decaying particle.
0281    */
0282   bool useMEforT2_;
0283 
0284   /**
0285    *   Prefactor for the sampling
0286    */
0287   double C_;
0288 
0289   /**
0290    *   Maximum value for y
0291    */
0292   double ymax_;
0293 
0294   /**
0295    *  Option for phase-space sampling
0296    */
0297   unsigned int phaseOpt_;
0298   //@}
0299 
0300 private:
0301 
0302   /**
0303    *   Mmeber variables for the kinematics of the hard emission
0304    */
0305   //@{
0306   /**
0307    *  Transverse momentum of the emission
0308    */
0309   Energy pT_;
0310 
0311   /**
0312    *  Mass of decaying particle
0313    */
0314   Energy mb_;
0315 
0316   /**
0317    *  Reduced mass of emitter child particle
0318    */
0319   double e_;
0320 
0321   /**
0322    * Reduced mass of spectator child particle
0323    */
0324   double s_;
0325 
0326   /**
0327    *  Reduced mass of emitter child particle squared
0328    */
0329   double e2_;
0330 
0331   /**
0332    * Reduced mass of spectator child particle squared
0333    */
0334   double s2_;
0335 
0336   /**
0337    *  Enhancement prefactor for special cases
0338    */
0339   mutable double enhance_;
0340   //@}
0341 };
0342 
0343 }
0344 
0345 #endif /* Herwig_PerturbativeDecayer_H */