Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // SFFDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
0004 // Copyright (C) 2002-2019 The Herwig Collaboration
0005 //
0006 // Herwig is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef HERWIG_SFFDecayer_H
0010 #define HERWIG_SFFDecayer_H
0011 //
0012 // This is the declaration of the SFFDecayer class.
0013 //
0014 
0015 #include "GeneralTwoBodyDecayer.h"
0016 #include "ThePEG/Repository/EventGenerator.h"
0017 #include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
0018 #include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
0019 #include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
0020 
0021 namespace Herwig {
0022 using namespace ThePEG;
0023 using Helicity::FFSVertexPtr;
0024 
0025   /** \ingroup Decay
0026    * The SFFDecayer class implements the decay of a scalar to 2
0027    * fermions in a general model. It holds an FFSVertex pointer that 
0028    * must be typecast from the VertexBase pointer held in 
0029    * GeneralTwoBodyDecayer. It implents the virtual functions me2() and
0030    * partialWidth(). 
0031    *
0032    * @see GeneralTwoBodyDecayer
0033    */
0034 class SFFDecayer: public GeneralTwoBodyDecayer {
0035 
0036 public:
0037   
0038   /**
0039    * Return the matrix element squared for a given mode and phase-space channel.
0040    * @param ichan The channel we are calculating the matrix element for. 
0041    * @param part The decaying Particle.
0042    * @param outgoing The particles produced in the decay
0043    * @param momenta  The momenta of the particles produced in the decay
0044    * @param meopt Option for the calculation of the matrix element
0045    * @return The matrix element squared for the phase-space configuration.
0046    */
0047   double me2(const int ichan,const Particle & part,
0048          const tPDVector & outgoing,
0049          const vector<Lorentz5Momentum> & momenta,
0050          MEOption meopt) const;
0051 
0052   /**
0053    *   Construct the SpinInfos for the particles produced in the decay
0054    */
0055   virtual void constructSpinInfo(const Particle & part,
0056                  ParticleVector outgoing) const;
0057   
0058   /**
0059    * Function to return partial Width
0060    * @param inpart The decaying particle.
0061    * @param outa One of the decay products.
0062    * @param outb The other decay product.
0063    */
0064   virtual Energy partialWidth(PMPair inpart, PMPair outa, 
0065                   PMPair outb) const;
0066 
0067   /**
0068    *  Has a POWHEG style correction
0069    */
0070   virtual POWHEGType hasPOWHEGCorrection()  {
0071     POWHEGType output = FSR;
0072     for(auto vertex : vertex_) {
0073       if(vertex->orderInAllCouplings()!=1) {
0074     output = No;
0075     break;
0076       }
0077     }
0078     return output;
0079   }
0080 
0081   /**
0082    *  Three-body matrix element including additional QCD radiation
0083    */
0084   virtual double threeBodyME(const int , const Particle & inpart,
0085                  const ParticleVector & decay,
0086                  ShowerInteraction inter,
0087                  MEOption meopt);
0088 
0089   /**
0090    * Indentify outgoing vertices for the fermion and antifermion
0091    */
0092   void identifyVertices(const int iferm, const int ianti,
0093             const Particle & inpart, const ParticleVector & decay,
0094             AbstractFFVVertexPtr & outgoingVertexF, 
0095             AbstractFFVVertexPtr & outgoingVertexA,
0096             ShowerInteraction inter);
0097 
0098   /**
0099    *  Set the information on the decay
0100    */
0101   virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
0102                 vector<VertexBasePtr>,
0103                 map<ShowerInteraction,VertexBasePtr> &,
0104                 const vector<map<ShowerInteraction,VertexBasePtr> > &,
0105                 map<ShowerInteraction,VertexBasePtr>);
0106   //@}
0107 
0108 public:
0109 
0110   /** @name Functions used by the persistent I/O system. */
0111   //@{
0112   /**
0113    * Function used to write out object persistently.
0114    * @param os the persistent output stream written to.
0115    */
0116   void persistentOutput(PersistentOStream & os) const;
0117 
0118   /**
0119    * Function used to read in object persistently.
0120    * @param is the persistent input stream read from.
0121    * @param version the version number of the object when written.
0122    */
0123   void persistentInput(PersistentIStream & is, int version);
0124   //@}
0125 
0126   /**
0127    * The standard Init function used to initialize the interfaces.
0128    * Called exactly once for each class by the class description system
0129    * before the main function starts or
0130    * when this class is dynamically loaded.
0131    */
0132   static void Init();
0133 
0134 protected:
0135 
0136   /** @name Clone Methods. */
0137   //@{
0138   /**
0139    * Make a simple clone of this object.
0140    * @return a pointer to the new object.
0141    */
0142   virtual IBPtr clone() const;
0143 
0144   /** Make a clone of this object, possibly modifying the cloned object
0145    * to make it sane.
0146    * @return a pointer to the new object.
0147    */
0148   virtual IBPtr fullclone() const;
0149   //@}
0150 
0151 private:
0152 
0153   /**
0154    * The assignment operator is private and must never be called.
0155    * In fact, it should not even be implemented.
0156    */
0157   SFFDecayer & operator=(const SFFDecayer &) = delete;
0158 
0159 private:
0160 
0161   /**
0162    *  Abstract pointer to AbstractFFSVertex
0163    */
0164   vector<AbstractFFSVertexPtr> vertex_;
0165 
0166   /**
0167    * Pointer to the perturbative vertex
0168    */
0169   vector<FFSVertexPtr> perturbativeVertex_;
0170 
0171   /**
0172    *  Abstract pointer to AbstractVSSVertex for QCD radiation from incoming scalar
0173    */
0174   map<ShowerInteraction,AbstractVSSVertexPtr> incomingVertex_;
0175 
0176   /**
0177    *  Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
0178    */
0179   map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertex1_;
0180 
0181   /**
0182    *  Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
0183    */
0184   map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertex2_;
0185 
0186   /**
0187    *  Spin density matrix
0188    */
0189   mutable RhoDMatrix rho_;
0190 
0191   /**
0192    *  Scalar wavefunction
0193    */
0194   mutable ScalarWaveFunction swave_;
0195 
0196   /**
0197    *  Spinor wavefunction
0198    */
0199   mutable vector<SpinorWaveFunction> wave_;
0200 
0201   /**
0202    *  Barred spinor wavefunction
0203    */
0204   mutable vector<SpinorBarWaveFunction> wavebar_;
0205 
0206  /**
0207    *  Spin density matrix for 3 body decay
0208    */
0209   mutable RhoDMatrix rho3_;
0210 
0211   /**
0212    *  Scalar wavefunction for 3 body decay
0213    */
0214   mutable ScalarWaveFunction swave3_;
0215 
0216   /**
0217    *  Spinor wavefunction for 3 body decay
0218    */
0219   mutable vector<SpinorWaveFunction> wave3_;
0220 
0221   /**
0222    *  Barred spinor wavefunction for 3 body decay
0223    */
0224   mutable vector<SpinorBarWaveFunction> wavebar3_;
0225 
0226     /**
0227    *  Vector wavefunction for 3 body decay
0228    */
0229   mutable vector<VectorWaveFunction> gluon_;
0230 
0231   
0232 };
0233 
0234 }
0235 
0236 #endif /* HERWIG_SFFDecayer_H */