Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:23:59

0001 // -*- C++ -*-
0002 #ifndef Herwig_DalitzBase_H
0003 #define Herwig_DalitzBase_H
0004 //
0005 // This is the declaration of the DalitzBase class.
0006 //
0007 
0008 #include "Herwig/Decay/DecayIntegrator.h"
0009 #include "Herwig/Decay/FormFactors/KMatrix.h"
0010 #include "DalitzResonance.h"
0011 
0012 namespace Herwig {
0013 
0014 using namespace ThePEG;
0015 
0016 /**
0017  * The DalitzBase class provides a base class for the implementation of three-body Dalitz decays.
0018  *
0019  * @see \ref DalitzBaseInterfaces "The interfaces"
0020  * defined for DalitzBase.
0021  */
0022 class DalitzBase: public DecayIntegrator {
0023 
0024 public:
0025 
0026   /**
0027    * The default constructor.
0028    */
0029   DalitzBase() : rParent_(5./GeV), useAllK0_(false),
0030          maxWgt_(1.), channel1_(-1), channel2_(-1),
0031          incoming_(0), outgoing_({0,0,0}) {
0032     // intermediates
0033     generateIntermediates(true);
0034   }
0035 
0036   /**
0037    * Which of the possible decays is required
0038    * @param cc Is this mode the charge conjugate
0039    * @param parent The decaying particle
0040    * @param children The decay products
0041    */
0042   virtual int modeNumber(bool & cc, tcPDPtr parent, 
0043              const tPDVector & children) const;
0044 
0045   /**
0046    * Output the setup information for the particle database
0047    * @param os The stream to output the information to
0048    * @param header Whether or not to output the information for MySQL
0049    */
0050   virtual void dataBaseOutput(ofstream & os,bool header) const;
0051 
0052   /**
0053    *   Set the parameters for a decay mode
0054    */
0055   string addChannel(string arg);
0056 
0057   /**
0058    *   Set the parameters for a decay mode
0059    */
0060   string setExternal(string arg);
0061 
0062 public:
0063 
0064   /** @name Functions used by the persistent I/O system. */
0065   //@{
0066   /**
0067    * Function used to write out object persistently.
0068    * @param os the persistent output stream written to.
0069    */
0070   void persistentOutput(PersistentOStream & os) const;
0071 
0072   /**
0073    * Function used to read in object persistently.
0074    * @param is the persistent input stream read from.
0075    * @param version the version number of the object when written.
0076    */
0077   void persistentInput(PersistentIStream & is, int version);
0078   //@}
0079 
0080   /**
0081    * The standard Init function used to initialize the interfaces.
0082    * Called exactly once for each class by the class description system
0083    * before the main function starts or
0084    * when this class is dynamically loaded.
0085    */
0086   static void Init();
0087 
0088 protected:
0089 
0090   /**
0091    *  Add a new resonance
0092    */
0093   void addResonance(const DalitzResonancePtr & R) {resonances_.push_back(R);}
0094 
0095   /**
0096    *  Set up the phase-space
0097    */
0098   void createMode(tPDPtr in, tPDVector out);
0099 
0100   /**
0101    *  Access to the resonances
0102    */
0103   const vector<DalitzResonancePtr> & resonances() const {return resonances_;}
0104 
0105   /**
0106    *   Access to the first channel
0107    */
0108   const int & channel1() const {
0109     return channel1_;
0110   }
0111     
0112   /**
0113    *   Access to the second channel
0114    */
0115   const int & channel2() const {
0116     return channel2_;
0117   }
0118 
0119   /**
0120    *  Radius of the parent
0121    */
0122   const InvEnergy & parentRadius() const {
0123     return rParent_;
0124   }
0125 
0126   /**
0127    *  Weights for the phase-space channels
0128    */
0129   const vector<double> & weights() const {return weights_;}
0130       
0131 protected:
0132 
0133   /** @name Standard Interfaced functions. */
0134   //@{
0135   /**
0136    * Initialize this object after the setup phase before saving an
0137    * EventGenerator to disk.
0138    * @throws InitException if object could not be initialized properly.
0139    */
0140   virtual void doinit();
0141 
0142   /**
0143    * Initialize this object. Called in the run phase just before
0144    * a run begins.
0145    */
0146   virtual void doinitrun();
0147   //@}
0148 
0149 private:
0150 
0151   /**
0152    * The assignment operator is private and must never be called.
0153    * In fact, it should not even be implemented.
0154    */
0155   DalitzBase & operator=(const DalitzBase &) = delete;
0156 
0157 private:
0158 
0159   /**
0160    *   The radii for the Blatt-Weisskopf form factors
0161    */
0162   //@{
0163   /**
0164    *   For the decaying particles
0165    */
0166   InvEnergy rParent_;
0167   //@}
0168 
0169   /**
0170    *  Take all \f$K_0\f$ mesnos to be the same
0171    */
0172   bool useAllK0_;
0173 
0174   /**
0175    *  Vector containing the intermediate resonances
0176    */
0177   vector<DalitzResonancePtr> resonances_;
0178   
0179   /**
0180    *  Any \f$K\f$-matrices for the decay
0181    */
0182   vector<KMatrixPtr> kMatrix_;
0183   
0184   /**
0185    *   Parameters for the phase-space sampling
0186    */
0187   //@{
0188   /**
0189    *  Maximum weight for the decay
0190    */
0191   double maxWgt_;
0192 
0193   /**
0194    *  Weights for the phase-space channels
0195    */
0196   vector<double> weights_;
0197   
0198 private:
0199 
0200   /**
0201    *  Control over channels to check fit fractions
0202    */
0203   int channel1_, channel2_;
0204 
0205   /**
0206    *  The incoming particle
0207    */
0208   long incoming_;
0209 
0210   /**
0211    *  The outgoing pairtcles
0212    */
0213   array<long,3> outgoing_;
0214 
0215 };
0216 
0217 }
0218 
0219 #endif /* Herwig_DalitzBase_H */