Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef Herwig_DalitzKMatrix_H
0003 #define Herwig_DalitzKMatrix_H
0004 //
0005 // This is the declaration of the DalitzKMatrix class.
0006 //
0007 
0008 #include "DalitzResonance.h"
0009 #include "Herwig/Decay/FormFactors/KMatrix.h"
0010 
0011 namespace Herwig {
0012 
0013 using namespace ThePEG;
0014 
0015 /**
0016  * The DalitzKMatrix class allows the use of \f$K\f$-matrices in Dalitz decays
0017  */
0018 class DalitzKMatrix: public DalitzResonance {
0019 
0020 public:
0021 
0022   /**
0023    * The default constructor.
0024    */
0025   DalitzKMatrix()
0026   {}
0027 
0028   /**
0029    *  Constructor specifiying the parameters
0030    */
0031   DalitzKMatrix(long pid, ResonanceType::Type rtype, Energy m, Energy w,
0032         unsigned int d1, unsigned int d2, unsigned int s,
0033         double mag, double phi, InvEnergy rr,
0034         unsigned int imat, unsigned int chan,
0035         Energy2 sc, unsigned int itype,
0036         vector<pair<double,double> > beta,
0037         vector<pair<double,vector<double > > > coeffs)
0038     : DalitzResonance(pid,rtype,m,w,d1,d2,s,mag,phi,rr),
0039       imat_(imat), channel_(chan), sc_(sc), expType_(itype), coeffs_(coeffs) {
0040     beta_.clear();
0041     for(unsigned int ix=0;ix<beta.size();++ix) {
0042       beta_.push_back(beta[ix].first*exp(Complex(0.,beta[ix].second)));
0043     }
0044   }
0045 
0046 public:
0047 
0048   /**
0049    *  Return the Breit-Wigner times the form factor
0050    */
0051   virtual Complex BreitWigner(const Energy & mAB, const Energy & mA, const Energy & mB) const;
0052 
0053   /**
0054    *  Output the parameters
0055    */
0056   virtual void dataBaseOutput(ofstream & output);
0057 
0058 public:
0059 
0060   /**
0061    *  Set the K-matrix
0062    */
0063   void setKMatrix(KMatrixPtr mat) {kMatrix_ = mat;}
0064 
0065   /**
0066    *  Location of the matrix
0067    */
0068   unsigned int imatrix() const {return imat_;}
0069 
0070 public:
0071 
0072   /** @name Functions used by the persistent I/O system. */
0073   //@{
0074   /**
0075    * Function used to write out object persistently.
0076    * @param os the persistent output stream written to.
0077    */
0078   void persistentOutput(PersistentOStream & os) const;
0079 
0080   /**
0081    * Function used to read in object persistently.
0082    * @param is the persistent input stream read from.
0083    * @param version the version number of the object when written.
0084    */
0085   void persistentInput(PersistentIStream & is, int version);
0086   //@}
0087 
0088   /**
0089    * The standard Init function used to initialize the interfaces.
0090    * Called exactly once for each class by the class description system
0091    * before the main function starts or
0092    * when this class is dynamically loaded.
0093    */
0094   static void Init();
0095 
0096 private:
0097 
0098   /**
0099    * The assignment operator is private and must never be called.
0100    * In fact, it should not even be implemented.
0101    */
0102   DalitzKMatrix & operator=(const DalitzKMatrix &) = delete;
0103 
0104 private:
0105 
0106   /**
0107    *   The K-matrix for the channel
0108    */
0109   KMatrixPtr kMatrix_;
0110 
0111   /**
0112    *  Which \f$K-matrix\f$ to do
0113    */
0114   unsigned int imat_;
0115 
0116   /**
0117    *  Which channel to use from the K-matrix
0118    */
0119   unsigned int channel_;
0120 
0121   /**
0122    *  Expansion point for the constant terms
0123    */
0124   Energy2 sc_;
0125 
0126   /**
0127    *  Coefficients of the poles
0128    */
0129   vector<Complex> beta_;
0130 
0131   /**
0132    *  Type of expansion
0133    */
0134   unsigned int expType_;
0135 
0136   /**
0137    *  Coefficients for the series expansion
0138    */
0139   vector<pair<double,vector<double > > > coeffs_;
0140 
0141 };
0142 
0143 }
0144 
0145 #endif /* Herwig_DalitzKMatrix_H */