Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7879340
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Subscribers
None
View Options
diff --git a/Decay/FormFactors/KMatrix.cc b/Decay/FormFactors/KMatrix.cc
--- a/Decay/FormFactors/KMatrix.cc
+++ b/Decay/FormFactors/KMatrix.cc
@@ -1,46 +1,100 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the KMatrix class.
//
#include "KMatrix.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
-
-
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
+#include <boost/numeric/ublas/banded.hpp>
using namespace Herwig;
KMatrix::KMatrix(FlavourInfo flavour, vector<Channels> channels,
vector<Energy2> poles) : flavour_(flavour), channels_(channels), poles_(poles)
{}
void KMatrix::persistentOutput(PersistentOStream & os) const {
- os << ounit(poles_,GeV2);
+ os << ounit(poles_,GeV2) << ounit(mPiPlus_,GeV) << ounit(mPi0_,GeV)
+ << ounit(mKPlus_,GeV) << ounit(mK0_,GeV) << ounit(mEta_,GeV)
+ << ounit(mEtaPrime_,GeV);
}
void KMatrix::persistentInput(PersistentIStream & is, int) {
- is >> iunit(poles_,GeV2);
+ is >> iunit(poles_,GeV2) >> iunit(mPiPlus_,GeV) >> iunit(mPi0_,GeV)
+ >> iunit(mKPlus_,GeV) >> iunit(mK0_,GeV) >> iunit(mEta_,GeV)
+ >> iunit(mEtaPrime_,GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeAbstractClass<KMatrix,Interfaced>
describeHerwigKMatrix("Herwig::KMatrix", "Herwig.so");
void KMatrix::Init() {
static ClassDocumentation<KMatrix> documentation
("The KMatrix class provides a base class for the implementation of "
"K-matrix parameterizations in Herwig");
}
+void KMatrix::doinit() {
+ Interfaced::doinit();
+ // The charged pion mass
+ mPiPlus_=getParticleData(ParticleID::piplus)->mass();
+ // The neutral pion mass
+ mPi0_=getParticleData(ParticleID::pi0)->mass();
+ // The charged kaon mass
+ mKPlus_=getParticleData(ParticleID::Kplus)->mass();
+ // The neutral kaon mass
+ mK0_=getParticleData(ParticleID::K0)->mass();
+ // The eta mass
+ mEta_=getParticleData(ParticleID::eta)->mass();
+ // The eta' mass
+ mEtaPrime_=getParticleData(ParticleID::etaprime)->mass();
+}
+
+namespace {
+
+ double kallen(const Energy2 &s, const Energy &m1, const Energy & m2) {
+ return (1.-sqr(m1+m2)/s)*(1.-sqr(m1-m2)/s);
+ }
+}
+
+boost::numeric::ublas::matrix<Complex> KMatrix::rho(Energy2 s) {
+ size_t msize = channels_.size();
+ boost::numeric::ublas::diagonal_matrix<Complex> rho(msize,msize);
+ for(unsigned int iChan=0;iChan<msize;++iChan) {
+ double val(0);
+ switch (channels_[iChan]) {
+ case PiPi:
+ val=kallen(s,mPiPlus_,mPiPlus_);
+ break;
+ case KPi:
+ val=kallen(s,mKPlus_,mPiPlus_);
+ break;
+ case KEta:
+ val=kallen(s,mKPlus_,mEta_);
+ break;
+ case KEtaPrime:
+ val=kallen(s,mKPlus_,mEtaPrime_);
+ break;
+ default:
+ assert(false);
+ }
+ if(val>=0)
+ rho(iChan,iChan) = sqrt(val);
+ else
+ rho(iChan,iChan) = Complex(0.,1.)*sqrt(-val);
+ }
+ return rho;
+}
diff --git a/Decay/FormFactors/KMatrix.h b/Decay/FormFactors/KMatrix.h
--- a/Decay/FormFactors/KMatrix.h
+++ b/Decay/FormFactors/KMatrix.h
@@ -1,115 +1,169 @@
// -*- C++ -*-
#ifndef Herwig_KMatrix_H
#define Herwig_KMatrix_H
//
// This is the declaration of the KMatrix class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "Herwig/Decay/IsoSpin.h"
#include "KMatrix.fh"
#include <boost/numeric/ublas/matrix.hpp>
namespace Herwig {
using namespace ThePEG;
/**
* The KMatrix class is a base class for the implementation of
* K-matrix parameterizations in Herwig
*
* @see \ref KMatrixInterfaces "The interfaces"
* defined for KMatrix.
*/
class KMatrix: public Interfaced {
public:
/**
* Enum for the possible channels
*/
enum Channels { PiPi, KPi, KEta, KEtaPrime};
public:
/**
* The default constructor.
*/
KMatrix(FlavourInfo flavour=FlavourInfo(),
vector<Channels> channels=vector<Channels>(),
vector<Energy2> poles=vector<Energy2>());
/**
* The quantum numbers of the K-matrix
*/
FlavourInfo flavourInfo() const {
return flavour_;
};
/**
* Compute the K-matrix for a given scale
* @param s The scale
* @param Whether ot not to multiply by \f$\prod_i(1-s/m^2_i\f$ to regularise the poles
*/
virtual boost::numeric::ublas::matrix<double> K(Energy2 s, bool multiplyByPoles=false) = 0;
/**
+ * The \f$\rho\f$ matrix
+ */
+ virtual boost::numeric::ublas::matrix<Complex> rho(Energy2 s);
+
+ /**
* Vector containing the locations of the poles
*/
const vector<Energy2> & poles() const {return poles_;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
+protected:
+
+ /** @name Standard Interfaced functions. */
+ //@{
+ /**
+ * Initialize this object after the setup phase before saving an
+ * EventGenerator to disk.
+ * @throws InitException if object could not be initialized properly.
+ */
+ virtual void doinit();
+ //@}
+
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
KMatrix & operator=(const KMatrix &);
private:
/**
* The quantum numbers for the K-matrix
*/
FlavourInfo flavour_;
/**
* The mesons in the various channels
*/
vector<Channels> channels_;
/**
* The positions of the poles
*/
vector<Energy2> poles_;
+
+private:
+
+ /**
+ * Common masses for the \f$\rho\f$ matrix
+ */
+ //@{
+ /**
+ * The charged pion mass
+ */
+ Energy mPiPlus_;
+
+ /**
+ * The neutra; pion mass
+ */
+ Energy mPi0_;
+
+ /**
+ * The charged kaon mass
+ */
+ Energy mKPlus_;
+
+ /**
+ * The neutral kaon mass
+ */
+ Energy mK0_;
+
+ /**
+ * The \f$\eta\f$ mass
+ */
+ Energy mEta_;
+
+ /**
+ * The \f$\eta^\prime\f$ mass
+ */
+ Energy mEtaPrime_;
+ //@}
};
}
#endif /* Herwig_KMatrix_H */
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 19, 8:00 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3805953
Default Alt Text
(6 KB)
Attached To
R563 testingHerwigHG
Event Timeline
Log In to Comment