Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // TwoBodyDecayConstructor.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_TwoBodyDecayConstructor_H
0010 #define HERWIG_TwoBodyDecayConstructor_H
0011 //
0012 // This is the declaration of the TwoBodyDecayConstructor class.
0013 //
0014 
0015 #include "NBodyDecayConstructorBase.h"
0016 #include "ThePEG/Helicity/Vertex/VertexBase.h"
0017 #include "Herwig/Decay/General/GeneralTwoBodyDecayer.fh"
0018 #include "Herwig/Shower/ShowerAlpha.h"
0019 #include "TwoBodyDecay.h"
0020 
0021 namespace Herwig {
0022 using namespace ThePEG;
0023 
0024 using Helicity::VertexBasePtr;
0025 using Helicity::tVertexBasePtr;
0026 
0027 /**
0028  * The TwoBodyDecayConstructor class inherits from the dummy base class
0029  * NBodyDecayConstructorBase and implements the necessary functions in
0030  * order to create the 2 body decay modes for a given set of vertices
0031  * stored in a Model class.
0032  *
0033  * @see \ref TwoBodyDecayConstructorInterfaces "The interfaces"
0034  * defined for TwoBodyDecayConstructor.
0035  * @see NBodyDecayConstructor
0036  **/
0037 class TwoBodyDecayConstructor: public NBodyDecayConstructorBase {
0038 
0039 public:
0040 
0041   /**
0042    * The default constructor.
0043    */
0044   TwoBodyDecayConstructor() : inter_(ShowerInteraction::QEDQCD), weakMassCut_(-GeV) {
0045     radiationVertices_[ShowerInteraction::QCD] = map<tPDPtr,VertexBasePtr>();
0046     radiationVertices_[ShowerInteraction::QED] = map<tPDPtr,VertexBasePtr>();
0047   }
0048 
0049   /**
0050    * Function used to determine allowed decaymodes
0051    *@param part vector of ParticleData pointers containing particles in model
0052    */
0053   virtual void DecayList(const set<PDPtr,MassOrdering> & particles);
0054 
0055   /**
0056    * Number of outgoing lines. Required for correct ordering.
0057    */
0058   virtual unsigned int numBodies() const { return 2; }
0059 
0060 
0061 public:
0062 
0063   /** @name Functions used by the persistent I/O system. */
0064   //@{
0065   /**
0066    * Function used to write out object persistently.
0067    * @param os the persistent output stream written to.
0068    */
0069   void persistentOutput(PersistentOStream & os) const;
0070 
0071   /**
0072    * Function used to read in object persistently.
0073    * @param is the persistent input stream read from.
0074    * @param version the version number of the object when written.
0075    */
0076   void persistentInput(PersistentIStream & is, int version);
0077   //@}
0078 
0079   /**
0080    * The standard Init function used to initialize the interfaces.
0081    * Called exactly once for each class by the class description system
0082    * before the main function starts or
0083    * when this class is dynamically loaded.
0084    */
0085   static void Init();
0086 
0087 protected:
0088 
0089   /** @name Clone Methods. */
0090   //@{
0091   /**
0092    * Make a simple clone of this object.
0093    * @return a pointer to the new object.
0094    */
0095   virtual IBPtr clone() const;
0096 
0097   /** Make a clone of this object, possibly modifying the cloned object
0098    * to make it sane.
0099    * @return a pointer to the new object.
0100    */
0101   virtual IBPtr fullclone() const;
0102   //@}
0103 
0104 private:
0105 
0106   /**
0107    * The assignment operator is private and must never be called.
0108    * In fact, it should not even be implemented.
0109    */
0110   TwoBodyDecayConstructor & operator=(const TwoBodyDecayConstructor &) = delete;
0111 
0112 private:
0113 
0114   /** @name Functions to create decayers and decaymodes. */
0115   //@{
0116   /**
0117    * Function to create decays
0118    * @param inpart Incoming particle
0119    * @param vert The vertex to create decays for
0120    * @param ilist Which list to search
0121    * @param iv Row number in _theExistingDecayers member
0122    * @return A vector a decay modes
0123    */
0124   void createModes(tPDPtr inpart, VertexBasePtr vert,
0125            unsigned int ilist,
0126            multiset<TwoBodyDecay> & modes);
0127 
0128   /**
0129    * Function to create decayer for specific vertex
0130    * @param decay decay mode for this decay
0131    * member variable
0132    */
0133   GeneralTwoBodyDecayerPtr createDecayer(TwoBodyDecay decay,
0134                      vector<VertexBasePtr> );
0135 
0136   /**
0137    * Create decay mode(s) from given part and decay modes
0138    * @param decays The vector of decay modes
0139    * @param decayer The decayer responsible for this decay
0140    */
0141   void createDecayMode(multiset<TwoBodyDecay> & decays);
0142   //@}
0143 
0144   /**
0145    * Get the vertex for QED/QCD radiation
0146    */
0147   VertexBasePtr radiationVertex(tPDPtr particle,ShowerInteraction inter,
0148                 tPDPair children = tPDPair ());
0149 
0150 private:
0151 
0152   /**
0153    *  Map of particles and the vertices which generate their QCD
0154    *  radiation
0155    */
0156   map<ShowerInteraction,map<tPDPtr,VertexBasePtr> > radiationVertices_;
0157 
0158   /**
0159    *  Default choice for the strong coupling object for hard QCD radiation
0160    */
0161   ShowerAlphaPtr  alphaQCD_;
0162 
0163   /**
0164    *  Default choice for the strong coupling object for hard QED radiation
0165    */
0166   ShowerAlphaPtr  alphaQED_;
0167 
0168   /**
0169    *  Which type of corrections to the decays to include
0170    */
0171   ShowerInteraction inter_;
0172 
0173   /**
0174    *  Cut off or decays via the weak current
0175    */
0176   Energy weakMassCut_;
0177 
0178 };
0179 
0180 }
0181 
0182 #endif /* HERWIG_TwoBodyDecayConstructor_H */