Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // DecayConstructor.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_DecayConstructor_H
0010 #define HERWIG_DecayConstructor_H
0011 //
0012 // This is the declaration of the DecayConstructor class.
0013 //
0014 
0015 #include "ThePEG/Interface/Interfaced.h"
0016 #include "NBodyDecayConstructorBase.h"
0017 #include "Herwig/Decay/Radiation/DecayRadiationGenerator.h"
0018 #include "DecayConstructor.fh"
0019 
0020 namespace Herwig {
0021 using namespace ThePEG;
0022   
0023 /** 
0024  * The DecayConstructor class is an interfaced class that stores a 
0025  * vector of NBodyDecayConstructor objects and calls the appropriate 
0026  * function to create the decayers and decaymodes. There is also an interface
0027  * to add decay mode tags of the form a->b,c,...; which will not
0028  * be created.
0029  * 
0030  * @see \ref DecayConstructorInterfaces "The interfaces"
0031  * defined for DecayConstructor. 
0032  * @see Interfaced
0033  */
0034 class DecayConstructor: public Interfaced {
0035 
0036 public:
0037 
0038   /**
0039    * The default constructor.
0040    */
0041   DecayConstructor() : NBodyDecayConstructors_(0), 
0042                _disableDMTags(0), _minBR(0.) {}
0043 
0044 public:
0045 
0046   /** @name Functions used by the persistent I/O system. */
0047   //@{
0048   /**
0049    * Function used to write out object persistently.
0050    * @param os the persistent output stream written to.
0051    */
0052   void persistentOutput(PersistentOStream & os) const;
0053 
0054   /**
0055    * Function used to read in object persistently.
0056    * @param is the persistent input stream read from.
0057    * @param version the version number of the object when written.
0058    */
0059   void persistentInput(PersistentIStream & is, int version);
0060   //@}
0061 
0062   /**
0063    * The standard Init function used to initialize the interfaces.
0064    * Called exactly once for each class by the class description system
0065    * before the main function starts or
0066    * when this class is dynamically loaded.
0067    */
0068   static void Init();
0069 
0070   /**
0071    * Function to create decayers
0072    * @param particles vector of ParticleData pointers to particles contained
0073    * in model
0074    * @param minBR minimum branching ratio for modes
0075    */
0076   void createDecayers(const vector<PDPtr> & particles, double minBR);
0077 
0078   /**
0079    * Check whether the decay mode given is one that should not be
0080    * created
0081    * @param tag The decay mode tag, a->b,c,d,...;
0082    */
0083   bool disableDecayMode(string tag) const;
0084 
0085   /**
0086    *  QED Generator
0087    */
0088   DecayRadiationGeneratorPtr QEDGenerator() {return QEDGenerator_;}
0089 
0090   /**
0091    * Vector of references to the objects that will construct the N-Body
0092    * decays.
0093    */
0094   const vector<NBodyDecayConstructorBasePtr> & decayConstructors() {
0095     return NBodyDecayConstructors_;
0096   }
0097 
0098   /**
0099    *  Get minimum branching ratio
0100    */
0101   double minimumBR() const { return _minBR;}
0102 
0103 protected:
0104 
0105   /** @name Standard Interfaced functions. */
0106   //@{
0107   /**
0108    * Initialize this object after the setup phase before saving an
0109    * EventGenerator to disk.
0110    * @throws InitException if object could not be initialized properly.
0111    */
0112   virtual void doinit();
0113   //@}
0114 
0115 protected:
0116 
0117   /** @name Clone Methods. */
0118   //@{
0119   /**
0120    * Make a simple clone of this object.
0121    * @return a pointer to the new object.
0122    */
0123   virtual IBPtr clone() const;
0124 
0125   /** Make a clone of this object, possibly modifying the cloned object
0126    * to make it sane.
0127    * @return a pointer to the new object.
0128    */
0129   virtual IBPtr fullclone() const;
0130   //@}
0131 
0132 private:
0133 
0134   /**
0135    * The assignment operator is private and must never be called.
0136    * In fact, it should not even be implemented.
0137    */
0138   DecayConstructor & operator=(const DecayConstructor &) = delete;
0139 
0140 private:
0141 
0142   /**
0143    * Vector of references to the objects that will construct the N-Body
0144    * decays.
0145    */
0146    vector<NBodyDecayConstructorBasePtr> NBodyDecayConstructors_;
0147 
0148   /**
0149    * A list of DecayMode tags that are not to be created 
0150    */
0151   vector<string> _disableDMTags;
0152 
0153   /**
0154    *  The decay radiation generator to use for QED radiation
0155    */
0156   DecayRadiationGeneratorPtr QEDGenerator_;
0157 
0158   /**
0159    *  Minimum allowed branching ratio
0160    */
0161   double _minBR;
0162 };
0163 
0164 }
0165 
0166 
0167 #endif /* HERWIG_DecayConstructor_H */