diff --git a/Helicity/Vertex/Scalar/GeneralVSSVertex.cc b/Helicity/Vertex/Scalar/GeneralVSSVertex.cc new file mode 100644 --- /dev/null +++ b/Helicity/Vertex/Scalar/GeneralVSSVertex.cc @@ -0,0 +1,90 @@ +// -*- C++ -*- +// +// This is the implementation of the non-inlined, non-templated member +// functions of the GeneralVSSVertex class. +// + +#include "GeneralVSSVertex.h" +#include "ThePEG/Interface/ClassDocumentation.h" +#include "ThePEG/EventRecord/Particle.h" +#include "ThePEG/Repository/UseRandom.h" +#include "ThePEG/Repository/EventGenerator.h" +#include "ThePEG/Utilities/DescribeClass.h" + +using namespace ThePEG; +using namespace Helicity; + +// The following static variable is needed for the type +// description system in ThePEG. +DescribeAbstractNoPIOClass +describeHelicityGeneralVSSVertex("ThePEG::GeneralVSSVertex", "libThePEG.so"); + +void GeneralVSSVertex::Init() { + + static ClassDocumentation documentation + ("The GeneralVSSVertex class implements a general form of the vector-scalar-scalar interaction"); + +} + +// evaluate the vertex +Complex GeneralVSSVertex::evaluate(Energy2 q2, const VectorWaveFunction & vec, + const ScalarWaveFunction & sca1, + const ScalarWaveFunction & sca2) { + // calculate the coupling + setCoupling(q2,vec.particle(),sca1.particle(),sca2.particle()); + // calculate the vertex + return UnitRemoval::InvE * -Complex(0.,1.) * norm() * sca1.wave()*sca2.wave()* + vec.wave().dot(a_*sca1.momentum()+b_*sca2.momentum()); +} + +// off-shell vector +VectorWaveFunction GeneralVSSVertex::evaluate(Energy2 q2, int iopt, tcPDPtr out, + const ScalarWaveFunction & sca1, + const ScalarWaveFunction & sca2, + complex mass, + complex width) { + // outgoing momentum + Lorentz5Momentum pout(sca1.momentum()+sca2.momentum()); + // calculate the coupling + setCoupling(q2,out,sca1.particle(),sca2.particle()); + // mass and width + if(mass.real() < ZERO) mass = out->mass(); + complex mass2 = sqr(mass); + // calculate the prefactor + Energy2 p2 = pout.m2(); + Complex fact = norm()*sca1.wave()*sca2.wave()*propagator(iopt,p2,out,mass,width); + // compute the vector + LorentzPolarizationVector vec; + // massless outgoing vector + if(mass.real()==ZERO) { + vec = -UnitRemoval::InvE * fact * (b_*sca2.momentum()+a_*sca1.momentum()); + } + // massive outgoing vector + else { + // first the dot product for the second term + Complex dot = (sca1.m2()-sca2.m2())/mass2; + // compute the vector + vec = -fact * + (LorentzPolarizationVector(UnitRemoval::InvE * (b_*sca2.momentum()+a_*sca1.momentum())) + +dot*UnitRemoval::InvE * pout); + } + return VectorWaveFunction(pout,out,vec); +} + +// return an off-shell scalar +ScalarWaveFunction GeneralVSSVertex::evaluate(Energy2 q2, int iopt, tcPDPtr out, + const VectorWaveFunction & vec, + const ScalarWaveFunction & sca, + complex mass, + complex width ) { + // momentum of the particle + Lorentz5Momentum pout = sca.momentum()+vec.momentum(); + // calculate the coupling + setCoupling(q2,vec.particle(),sca.particle(),out); + // calculate the prefactor + Energy2 p2 = pout.m2(); + Complex fact = norm()*sca.wave()*propagator(iopt,p2,out,mass,width); + // compute the wavefunction + fact = UnitRemoval::InvE * fact*vec.wave().dot(a_*sca.momentum()-b_*pout); + return ScalarWaveFunction(pout,out,fact); +} diff --git a/Helicity/Vertex/Scalar/VSSVertex.fh b/Helicity/Vertex/Scalar/GeneralVSSVertex.fh copy from Helicity/Vertex/Scalar/VSSVertex.fh copy to Helicity/Vertex/Scalar/GeneralVSSVertex.fh --- a/Helicity/Vertex/Scalar/VSSVertex.fh +++ b/Helicity/Vertex/Scalar/GeneralVSSVertex.fh @@ -1,18 +1,18 @@ // -*- C++ -*- // -// This is the forward declaration of the VSSVertex class. +// This is the forward declaration of the GeneralVSSVertex class. // -#ifndef ThePEG_VSSVertex_FH -#define ThePEG_VSSVertex_FH +#ifndef ThePEG_GeneralVSSVertex_FH +#define ThePEG_GeneralVSSVertex_FH #include "ThePEG/Config/Pointers.h" namespace ThePEG { namespace Helicity { -class VSSVertex; -ThePEG_DECLARE_POINTERS(VSSVertex,VSSVertexPtr); +class GeneralVSSVertex; +ThePEG_DECLARE_POINTERS(GeneralVSSVertex,GeneralVSSVertexPtr); } } #endif diff --git a/Helicity/Vertex/Scalar/GeneralVSSVertex.h b/Helicity/Vertex/Scalar/GeneralVSSVertex.h new file mode 100644 --- /dev/null +++ b/Helicity/Vertex/Scalar/GeneralVSSVertex.h @@ -0,0 +1,169 @@ +// -*- C++ -*- +#ifndef Helicity_GeneralVSSVertex_H +#define Helicity_GeneralVSSVertex_H +// +// This is the declaration of the GeneralVSSVertex class. +// + +#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h" +#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" +#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" +#include "GeneralVSSVertex.fh" + +namespace ThePEG { +namespace Helicity { + +using namespace ThePEG; + +/** + * Here is the documentation of the GeneralVSSVertex class. + * + * @see \ref GeneralVSSVertexInterfaces "The interfaces" + * defined for GeneralVSSVertex. + */ +class GeneralVSSVertex: public AbstractVSSVertex { + +public: + + /** + * The default constructor. + */ + GeneralVSSVertex() : a_(1.), b_(-1.) + {} + + /** + * 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(); + + /** + * Members to calculate the helicity amplitude expressions for vertices + * and off-shell particles. + */ + //@{ + /** + * Evaluate the vertex. + * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. + * @param vec1 The wavefunction for the vector. + * @param sca2 The wavefunction for the first scalar. + * @param sca3 The wavefunction for the second scalar. + */ + Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, + const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3); + + /** + * Evaluate the off-shell vector coming from the vertex. + * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. + * @param iopt Option of the shape of the Breit-Wigner for the off-shell vector. + * @param out The ParticleData pointer for the off-shell vector. + * @param sca2 The wavefunction for the first scalar. + * @param sca3 The wavefunction for the second scalar. + * @param mass The mass of the off-shell particle if not taken from the ParticleData + * object + * @param width The width of the off-shell particle if not taken from the ParticleData + * object + */ + VectorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, + const ScalarWaveFunction & sca2, + const ScalarWaveFunction & sca3, + complex mass=-GeV, complex width=-GeV); + + /** + * Evaluate the off-shell scalar coming from the vertex. + * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. + * @param iopt Option of the shape of the Breit-Wigner for the off-shell scalar. + * @param out The ParticleData pointer for the off-shell scalar. + * @param vec1 The wavefunction for the vector. + * @param sca2 The wavefunction for the scalar. + * @param mass The mass of the off-shell particle if not taken from the ParticleData + * object + * @param width The width of the off-shell particle if not taken from the ParticleData + * object + */ + ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, + const VectorWaveFunction & vec1, + const ScalarWaveFunction & sca2, + complex mass=-GeV, complex width=-GeV); + + /** + * Set coupling methods + */ + //@{ + /** + * Calculate the couplings for a three point interaction. + * This method is virtual and must be implemented in + * classes inheriting from this. + * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. + * @param part1 The ParticleData pointer for the first particle. + * @param part2 The ParticleData pointer for the second particle. + * @param part3 The ParticleData pointer for the third particle. + */ + virtual void setCoupling(Energy2 q2,tcPDPtr part1, + tcPDPtr part2,tcPDPtr part3)=0; + + /** + * Dummy setCouplings for a four point interaction + * This method is virtual and must be implemented in + * classes inheriting from this. + */ + virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr,tcPDPtr) { + assert(false); + } + //@} + +protected: + + /** + * Member functions top set/get the coefficents + */ + //@{ + /** + * Access coefficient of \f$p_2\f$ + */ + Complex a() const {return a_;} + + /** + * Access coefficient of \f$p_3\f$ + */ + Complex b() const {return b_;} + + /** + * Set coefficient of \f$p_2\f$ + */ + void a(Complex in) {a_=in;} + + /** + * Set coefficient of \f$p_3\f$ + */ + void b(Complex in) {b_=in;} + //@} + +private: + + /** + * The assignment operator is private and must never be called. + * In fact, it should not even be implemented. + */ + GeneralVSSVertex & operator=(const GeneralVSSVertex &); + +private: + + /** + * The coefficent of \f$p_2\f$ + */ + Complex a_; + + /** + * The coefficent of \f$p_3\f$ + */ + Complex b_; + +}; + +} +} + +#endif /* Helicity_GeneralVSSVertex_H */ diff --git a/Helicity/Vertex/Scalar/Makefile.am b/Helicity/Vertex/Scalar/Makefile.am --- a/Helicity/Vertex/Scalar/Makefile.am +++ b/Helicity/Vertex/Scalar/Makefile.am @@ -1,12 +1,13 @@ noinst_LTLIBRARIES = libThePEGSVertex.la libThePEGSVertex_la_SOURCES = \ FFSVertex.cc FFSVertex.h FFSVertex.fh \ SSSSVertex.cc SSSSVertex.h SSSSVertex.fh \ SSSVertex.cc SSSVertex.h SSSVertex.fh \ +GeneralVSSVertex.cc GeneralVSSVertex.h GeneralVSSVertex.fh \ VSSVertex.cc VSSVertex.h VSSVertex.fh \ VVSSVertex.cc VVSSVertex.h VVSSVertex.fh \ VVSVertex.cc VVSVertex.h VVSVertex.fh \ VVVSVertex.cc VVVSVertex.h VVVSVertex.fh \ GeneralVVSVertex.cc GeneralVVSVertex.h \ GeneralVVSVertex.fh \ RFSVertex.cc RFSVertex.h RFSVertex.fh diff --git a/Helicity/Vertex/Scalar/VSSVertex.cc b/Helicity/Vertex/Scalar/VSSVertex.cc --- a/Helicity/Vertex/Scalar/VSSVertex.cc +++ b/Helicity/Vertex/Scalar/VSSVertex.cc @@ -1,96 +1,32 @@ // -*- C++ -*- // // VSSVertex.cc is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, Leif Lonnblad // // ThePEG is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // // // This is the implementation of the non-inlined, non-templated member // functions of the VSSVertex class. // #include "VSSVertex.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Interface/ClassDocumentation.h" using namespace ThePEG; using namespace Helicity; // The following static variable is needed for the type // description system in ThePEG. -DescribeAbstractNoPIOClass +DescribeAbstractNoPIOClass describeThePEGVSSVertex("ThePEG::VSSVertex", "libThePEG.so"); void VSSVertex::Init() { static ClassDocumentation documentation ("The VSSVertex class is hte implementation of the" "vector-scalar-scalar vertex for helicity amplitude calculations." - " all such vertices should inherit from it"); - + " all such vertices should inherit from it"); } - -// evaluate the vertex -Complex VSSVertex::evaluate(Energy2 q2, const VectorWaveFunction & vec, - const ScalarWaveFunction & sca1, - const ScalarWaveFunction & sca2) { - // calculate the coupling - setCoupling(q2,vec.particle(),sca1.particle(),sca2.particle()); - // calculate the vertex - return UnitRemoval::InvE * -Complex(0.,1.) * norm() * sca1.wave()*sca2.wave()* - vec.wave().dot(sca1.momentum()-sca2.momentum()); -} - -// off-shell vector -VectorWaveFunction VSSVertex::evaluate(Energy2 q2, int iopt, tcPDPtr out, - const ScalarWaveFunction & sca1, - const ScalarWaveFunction & sca2, - complex mass, - complex width) { - // outgoing momentum - Lorentz5Momentum pout(sca1.momentum()+sca2.momentum()); - // calculate the coupling - setCoupling(q2,out,sca1.particle(),sca2.particle()); - // mass and width - if(mass.real() < ZERO) mass = out->mass(); - complex mass2 = sqr(mass); - // calculate the prefactor - Energy2 p2 = pout.m2(); - Complex fact = norm()*sca1.wave()*sca2.wave()*propagator(iopt,p2,out,mass,width); - // compute the vector - LorentzPolarizationVector vec; - // massless outgoing vector - if(mass.real()==ZERO) { - vec = UnitRemoval::InvE * fact * (sca2.momentum()-sca1.momentum()); - } - // massive outgoing vector - else { - // first the dot product for the second term - Complex dot = (sca1.m2()-sca2.m2())/mass2; - // compute the vector - vec = fact * - (LorentzPolarizationVector(UnitRemoval::InvE * (sca2.momentum()-sca1.momentum())) - +dot*UnitRemoval::InvE * pout); - } - return VectorWaveFunction(pout,out,vec); -} - -// return an off-shell scalar -ScalarWaveFunction VSSVertex::evaluate(Energy2 q2, int iopt, tcPDPtr out, - const VectorWaveFunction & vec, - const ScalarWaveFunction & sca, - complex mass, - complex width ) { - // momentum of the particle - Lorentz5Momentum pout = sca.momentum()+vec.momentum(); - // calculate the coupling - setCoupling(q2,vec.particle(),sca.particle(),out); - // calculate the prefactor - Energy2 p2 = pout.m2(); - Complex fact = norm()*sca.wave()*propagator(iopt,p2,out,mass,width); - // compute the wavefunction - fact = UnitRemoval::InvE * fact*vec.wave().dot(sca.momentum()+pout); - return ScalarWaveFunction(pout,out,fact); -} diff --git a/Helicity/Vertex/Scalar/VSSVertex.h b/Helicity/Vertex/Scalar/VSSVertex.h --- a/Helicity/Vertex/Scalar/VSSVertex.h +++ b/Helicity/Vertex/Scalar/VSSVertex.h @@ -1,134 +1,55 @@ // -*- C++ -*- // // VSSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, Leif Lonnblad // // ThePEG is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef ThePEG_VSSVertex_H #define ThePEG_VSSVertex_H // // This is the declaration of the VSSVertex class. // -#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h" -#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" -#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" +#include "GeneralVSSVertex.h" #include "VSSVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The VSSVertex class is the implementation of the vector-scalar-scalar * vertex. It inherits from the AbstractVSSVertex class for storage of the particles * and implements the helicity calculations. * * All such vertices should inherit from this class and implement the virtual * setCoupling member * * The form of the vertex is * \f[-ic\left(p_2-p_3\right)\cdot\epsilon_1\phi_2\phi_3\f] * - * @see AbstractVSSVertex + * @see GeneralVSSVertex */ -class VSSVertex: public AbstractVSSVertex { +class VSSVertex: public GeneralVSSVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); - -public: - - /** - * Members to calculate the helicity amplitude expressions for vertices - * and off-shell particles. - */ - //@{ - /** - * Evaluate the vertex. - * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. - * @param vec1 The wavefunction for the vector. - * @param sca2 The wavefunction for the first scalar. - * @param sca3 The wavefunction for the second scalar. - */ - Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, - const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3); - - /** - * Evaluate the off-shell vector coming from the vertex. - * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. - * @param iopt Option of the shape of the Breit-Wigner for the off-shell vector. - * @param out The ParticleData pointer for the off-shell vector. - * @param sca2 The wavefunction for the first scalar. - * @param sca3 The wavefunction for the second scalar. - * @param mass The mass of the off-shell particle if not taken from the ParticleData - * object - * @param width The width of the off-shell particle if not taken from the ParticleData - * object - */ - VectorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, - const ScalarWaveFunction & sca2, - const ScalarWaveFunction & sca3, - complex mass=-GeV, complex width=-GeV); - - /** - * Evaluate the off-shell scalar coming from the vertex. - * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. - * @param iopt Option of the shape of the Breit-Wigner for the off-shell scalar. - * @param out The ParticleData pointer for the off-shell scalar. - * @param vec1 The wavefunction for the vector. - * @param sca2 The wavefunction for the scalar. - * @param mass The mass of the off-shell particle if not taken from the ParticleData - * object - * @param width The width of the off-shell particle if not taken from the ParticleData - * object - */ - ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, - const VectorWaveFunction & vec1, - const ScalarWaveFunction & sca2, - complex mass=-GeV, complex width=-GeV); - - /** - * Set coupling methods - */ - //@{ - /** - * Calculate the couplings for a three point interaction. - * This method is virtual and must be implemented in - * classes inheriting from this. - * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. - * @param part1 The ParticleData pointer for the first particle. - * @param part2 The ParticleData pointer for the second particle. - * @param part3 The ParticleData pointer for the third particle. - */ - virtual void setCoupling(Energy2 q2,tcPDPtr part1, - tcPDPtr part2,tcPDPtr part3)=0; - - /** - * Dummy setCouplings for a four point interaction - * This method is virtual and must be implemented in - * classes inheriting from this. - */ - virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr,tcPDPtr) { - assert(false); - } - //@} private: /** * Private and non-existent assignment operator. */ VSSVertex & operator=(const VSSVertex &); }; } } #endif /* ThePEG_VSSVertex_H */