Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // WeakCurrentDecayConstructor.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_WeakCurrentDecayConstructor_H
0010 #define HERWIG_WeakCurrentDecayConstructor_H
0011 //
0012 // This is the declaration of the WeakCurrentDecayConstructor class.
0013 //
0014 
0015 #include "NBodyDecayConstructorBase.h"
0016 #include "ThePEG/Helicity/Vertex/VertexBase.h"
0017 #include "Herwig/Decay/General/GeneralCurrentDecayer.fh"
0018 #include "Herwig/Models/StandardModel/StandardModel.h"
0019 #include "Herwig/Decay/WeakCurrents/WeakCurrent.h"
0020 #include "Herwig/Decay/General/GeneralCurrentDecayer.h"
0021 #include "TwoBodyDecay.h"
0022 
0023 namespace Herwig {
0024 
0025 using namespace ThePEG;
0026 
0027 /**
0028  * Here is the documentation of the WeakCurrentDecayConstructor class.
0029  *
0030  * @see \ref WeakCurrentDecayConstructorInterfaces "The interfaces"
0031  * defined for WeakCurrentDecayConstructor.
0032  */
0033 class WeakCurrentDecayConstructor: public NBodyDecayConstructorBase {
0034 
0035 public:
0036 
0037   /**
0038    * The default constructor.
0039    */
0040   WeakCurrentDecayConstructor() : massCut_(5.*GeV) {}
0041   
0042   /**
0043    * Function used to determine allowed decaymodes, to be implemented
0044    * in derived class.
0045    *@param part vector of ParticleData pointers containing particles in model
0046    */
0047   virtual void DecayList(const set<PDPtr,MassOrdering> & part);
0048 
0049   /**
0050    * Number of outgoing lines. Required for correct ordering (do this one last)
0051    */
0052   virtual unsigned int numBodies() const { return 1000; }
0053 
0054   /**
0055    *  Cut off
0056    */
0057   Energy massCut() const { return massCut_;}
0058 
0059 public:
0060 
0061   /** @name Functions used by the persistent I/O system. */
0062   //@{
0063   /**
0064    * Function used to write out object persistently.
0065    * @param os the persistent output stream written to.
0066    */
0067   void persistentOutput(PersistentOStream & os) const;
0068 
0069   /**
0070    * Function used to read in object persistently.
0071    * @param is the persistent input stream read from.
0072    * @param version the version number of the object when written.
0073    */
0074   void persistentInput(PersistentIStream & is, int version);
0075   //@}
0076 
0077   /**
0078    * The standard Init function used to initialize the interfaces.
0079    * Called exactly once for each class by the class description system
0080    * before the main function starts or
0081    * when this class is dynamically loaded.
0082    */
0083   static void Init();
0084 
0085 protected:
0086 
0087   /** @name Clone Methods. */
0088   //@{
0089   /**
0090    * Make a simple clone of this object.
0091    * @return a pointer to the new object.
0092    */
0093   virtual IBPtr clone() const;
0094 
0095   /** Make a clone of this object, possibly modifying the cloned object
0096    * to make it sane.
0097    * @return a pointer to the new object.
0098    */
0099   virtual IBPtr fullclone() const;
0100   //@}
0101 
0102 protected:
0103 
0104   /** @name Standard Interfaced functions. */
0105   //@{
0106   /**
0107    * Initialize this object after the setup phase before saving an
0108    * EventGenerator to disk.
0109    * @throws InitException if object could not be initialized properly.
0110    */
0111   virtual void doinit();
0112   //@}
0113 
0114 private:
0115 
0116   /** @name Functions to create decayers and decaymodes. */
0117   //@{
0118   /**
0119    * Function to create decays
0120    * @param inpart Incoming particle 
0121    * @param vert The vertex to create decays for
0122    * @param ilist Which list to search
0123    * @param iv Row number in _theExistingDecayers member
0124    * @return vector of ParticleData ptrs
0125    */
0126   vector<TwoBodyDecay>
0127   createModes(const PDPtr inpart,const VertexBasePtr vert,
0128           unsigned int ilist);
0129 
0130   /**
0131    * Function to create decayer for specific vertex
0132    * @param vert Pointer to vertex 
0133    * @param icol Integer referring to the colmun in _theExistingDecayers
0134    * @param ivert Integer referring to the row in _theExistingDecayers
0135    * member variable
0136    */
0137   GeneralCurrentDecayerPtr createDecayer(PDPtr in, PDPtr out1,
0138                      vector<tPDPtr> outCurrent,
0139                      VertexBasePtr vertex,
0140                      WeakCurrentPtr current);
0141 
0142   /**
0143    * Create decay mode(s) from given part and decay modes
0144    * @param inpart pointer to incoming particle
0145    * @param decays list of allowed interactions
0146    * @param decayer The decayer responsible for this decay
0147    */
0148   void createDecayMode(vector<TwoBodyDecay> & decays);
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   WeakCurrentDecayConstructor & operator=(const WeakCurrentDecayConstructor &) = delete;
0158 
0159 private:
0160 
0161   /**
0162    * Model Pointer
0163    */
0164   Ptr<Herwig::StandardModel>::pointer model_;
0165 
0166   /**
0167    *  Cut-off on the mass difference
0168    */
0169   Energy massCut_;
0170 
0171   /**
0172    *  Tags for the modes
0173    */
0174   vector<string> decayTags_;
0175 
0176   /**
0177    *  Particles for the mode
0178    */
0179   vector<vector<tPDPtr> > particles_;
0180 
0181   /**
0182    *  Normalisation
0183    */
0184   vector<double> _norm;
0185 
0186   /**
0187    *  The current for the mode
0188    */
0189   vector<WeakCurrentPtr> _current;
0190 };
0191 
0192 }
0193 
0194 #endif /* HERWIG_WeakCurrentDecayConstructor_H */