Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef HERWIG_ThreeBodyDecayConstructor_H
0003 #define HERWIG_ThreeBodyDecayConstructor_H
0004 //
0005 // This is the declaration of the ThreeBodyDecayConstructor class.
0006 //
0007 
0008 #include "NBodyDecayConstructorBase.h"
0009 #include "ThePEG/Helicity/Vertex/VertexBase.h"
0010 #include "TBDiagram.h"
0011 #include "PrototypeVertex.h"
0012 #include "Herwig/Decay/General/GeneralThreeBodyDecayer.fh"
0013 
0014 namespace Herwig {
0015 using namespace ThePEG;
0016 
0017 using Helicity::VertexBasePtr;
0018 
0019 /**
0020  * The ThreeBodyDecayConstructor class inherits from the dummy base class
0021  * NBodyDecayConstructorBase and implements the necessary functions in
0022  * order to create the 3 body decaymodes for a given set of vertices
0023  * stored in a Model class.
0024  *
0025  * @see \ref ThreeBodyDecayConstructorInterfaces "The interfaces"
0026  * defined for ThreeBodyDecayConstructor.
0027  * @see NBodyDecayConstructor
0028  */
0029 class ThreeBodyDecayConstructor: public NBodyDecayConstructorBase {
0030 
0031 public:
0032 
0033   /**
0034    * The default constructor.
0035    */
0036   ThreeBodyDecayConstructor() : 
0037     includeIntermediatePhotons_(false),
0038     interOpt_(0), widthOpt_(1), weakMassCut_(-GeV),
0039     intOpt_(1), relErr_(1e-2) {}
0040 
0041   /**
0042    * Function used to determine allowed decaymodes, to be implemented
0043    * in derived class.
0044    *@param part vector of ParticleData pointers containing particles in model
0045    */
0046   virtual void DecayList(const set<PDPtr,MassOrdering> & part);
0047 
0048   /**
0049    * Number of outgoing lines. Required for correct ordering.
0050    */
0051   virtual unsigned int numBodies() const { return 3; }
0052 
0053 protected:
0054 
0055   /**
0056    * Create the decayer
0057    * @param diagrams The diagrams for the decay
0058    * @param inter Option for intermediates
0059    */
0060   GeneralThreeBodyDecayerPtr createDecayer(vector<TBDiagram> & diagrams, 
0061                        bool inter,double symfac) const;
0062 
0063   /**
0064    * Contruct the classname and object name for the Decayer
0065    * @param incoming The incoming particle
0066    * @param outgoing The decay products
0067    * @param objname a string containing the default path of the Decayer object
0068    */  
0069   string DecayerClassName(tcPDPtr incoming, const OrderedParticles & outgoing, 
0070               string & objname) const;
0071 
0072   /**
0073    *  Create the DecayMode from the diagrams
0074    * @param diagrams The diagrams
0075    * @param inter Option for intermediates
0076    */
0077   virtual void createDecayMode(vector<NBDiagram> & mode,
0078                    bool possibleOnShell,
0079                    double symfac);
0080 
0081 public:
0082 
0083   /** @name Functions used by the persistent I/O system. */
0084   //@{
0085   /**
0086    * Function used to write out object persistently.
0087    * @param os the persistent output stream written to.
0088    */
0089   void persistentOutput(PersistentOStream & os) const;
0090 
0091   /**
0092    * Function used to read in object persistently.
0093    * @param is the persistent input stream read from.
0094    * @param version the version number of the object when written.
0095    */
0096   void persistentInput(PersistentIStream & is, int version);
0097   //@}
0098 
0099   /**
0100    * The standard Init function used to initialize the interfaces.
0101    * Called exactly once for each class by the class description system
0102    * before the main function starts or
0103    * when this class is dynamically loaded.
0104    */
0105   static void Init();
0106 
0107 protected:
0108 
0109   /** @name Clone Methods. */
0110   //@{
0111   /**
0112    * Make a simple clone of this object.
0113    * @return a pointer to the new object.
0114    */
0115   virtual IBPtr clone() const;
0116 
0117   /** Make a clone of this object, possibly modifying the cloned object
0118    * to make it sane.
0119    * @return a pointer to the new object.
0120    */
0121   virtual IBPtr fullclone() const;
0122   //@}
0123 
0124 private:
0125 
0126   /**
0127    * The assignment operator is private and must never be called.
0128    * In fact, it should not even be implemented.
0129    */
0130   ThreeBodyDecayConstructor & operator=(const ThreeBodyDecayConstructor &) = delete;
0131 
0132 private:
0133 
0134   /**
0135    *  Option for intermediate photons
0136    */
0137   bool includeIntermediatePhotons_;
0138 
0139   /**
0140    *  Option for the inclusion of intermediates
0141    */
0142   unsigned int interOpt_;
0143 
0144   /**
0145    *  How to treat the widths of the intermediate particles
0146    */
0147   unsigned int widthOpt_;
0148 
0149   /**
0150    *  Cut off or decays via the weak current
0151    */
0152   Energy weakMassCut_;
0153 
0154   /**
0155    *  Option for the integration to get the partial width
0156    */
0157   unsigned int intOpt_;
0158 
0159   /**
0160    *  Relative error for partial width integration
0161    */
0162   double relErr_;
0163 };
0164 
0165 }
0166 
0167 #endif /* HERWIG_ThreeBodyDecayConstructor_H */