diff --git a/Models/DarkMatter/DMDMMediatorVertex.cc b/Models/DarkMatter/DMDMMediatorVertex.cc new file mode 100644 --- /dev/null +++ b/Models/DarkMatter/DMDMMediatorVertex.cc @@ -0,0 +1,62 @@ +// -*- C++ -*- +// +// This is the implementation of the non-inlined, non-templated member +// functions of the DMDMMediatorVertex class. +// + +#include "DMDMMediatorVertex.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" +#include "ThePEG/Persistency/PersistentOStream.h" +#include "ThePEG/Persistency/PersistentIStream.h" +#include "DMModel.h" + +using namespace Herwig; + +DMDMMediatorVertex::DMDMMediatorVertex() : cDMmed_(0.) {} + +IBPtr DMDMMediatorVertex::clone() const { + return new_ptr(*this); +} + +IBPtr DMDMMediatorVertex::fullclone() const { + return new_ptr(*this); +} + +void DMDMMediatorVertex::persistentOutput(PersistentOStream & os) const { + os << cDMmed_; +} + +void DMDMMediatorVertex::persistentInput(PersistentIStream & is, int) { + is >> cDMmed_; +} + +// The following static variable is needed for the type +// description system in ThePEG. +DescribeClass +describeHerwigDMDMMediatorVertex("Herwig::DMDMMediatorVertex", "HwDMModel.so"); + +void DMDMMediatorVertex::Init() { + + static ClassDocumentation documentation + ("The DMDMMediatorVertex class implements the couplnig of dark matter to the mediator."); + +} + +void DMDMMediatorVertex::setCoupling(Energy2 ,tcPDPtr aa,tcPDPtr,tcPDPtr) { + int iferm=abs(aa->id()); + assert(iferm==52); + norm(cDMmed_); + left(1.); + right(1.); +} + +void DMDMMediatorVertex::doinit() { + FFVVertex::doinit(); + cDMModelPtr model = dynamic_ptr_cast(generator()->standardModel()); + cDMmed_ = model->cDMmed(); + addToList(52, 52, 32); +} diff --git a/Models/DarkMatter/DMDMMediatorVertex.h b/Models/DarkMatter/DMDMMediatorVertex.h new file mode 100644 --- /dev/null +++ b/Models/DarkMatter/DMDMMediatorVertex.h @@ -0,0 +1,113 @@ +// -*- C++ -*- +#ifndef Herwig_DMDMMediatorVertex_H +#define Herwig_DMDMMediatorVertex_H +// +// This is the declaration of the DMDMMediatorVertex class. +// + +#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h" + +namespace Herwig { + +using namespace ThePEG; + +/** + * The DMDMMediatorVertex class implements the coupling of the dark matter to the mediator + * + * @see \ref DMDMMediatorVertexInterfaces "The interfaces" + * defined for DMDMMediatorVertex. + */ +class DMDMMediatorVertex: public FFVVertex { + +public: + + /** + * The default constructor. + */ + DMDMMediatorVertex(); + + /** + * Calculate the couplings. + * @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); + +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 Clone Methods. */ + //@{ + /** + * Make a simple clone of this object. + * @return a pointer to the new object. + */ + virtual IBPtr clone() const; + + /** Make a clone of this object, possibly modifying the cloned object + * to make it sane. + * @return a pointer to the new object. + */ + virtual IBPtr fullclone() const; + //@} + + +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. + */ + DMDMMediatorVertex & operator=(const DMDMMediatorVertex &); + +private: + + /** + * DM coupling to the dark mediator + */ + double cDMmed_; + +}; + +} + +#endif /* Herwig_DMDMMediatorVertex_H */ diff --git a/Models/DarkMatter/DMMediatorQuarksVertex.cc b/Models/DarkMatter/DMMediatorQuarksVertex.cc new file mode 100644 --- /dev/null +++ b/Models/DarkMatter/DMMediatorQuarksVertex.cc @@ -0,0 +1,64 @@ +// -*- C++ -*- +// +// This is the implementation of the non-inlined, non-templated member +// functions of the DMMediatorQuarksVertex class. +// + +#include "DMMediatorQuarksVertex.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" +#include "ThePEG/Persistency/PersistentOStream.h" +#include "ThePEG/Persistency/PersistentIStream.h" +#include "DMModel.h" + +using namespace Herwig; + +DMMediatorQuarksVertex::DMMediatorQuarksVertex() {} + +IBPtr DMMediatorQuarksVertex::clone() const { + return new_ptr(*this); +} + +IBPtr DMMediatorQuarksVertex::fullclone() const { + return new_ptr(*this); +} + +void DMMediatorQuarksVertex::persistentOutput(PersistentOStream & os) const { + os << cSMmed_; +} + +void DMMediatorQuarksVertex::persistentInput(PersistentIStream & is, int) { + is >> cSMmed_; +} + +void DMMediatorQuarksVertex::setCoupling(Energy2 ,tcPDPtr aa,tcPDPtr,tcPDPtr) { + int iferm=abs(aa->id()); + assert(iferm>0 && iferm<4); + norm(cSMmed_[iferm]); + left(1.); + right(1.); +} + +// The following static variable is needed for the type +// description system in ThePEG. +DescribeClass + describeHerwigDMMediatorQuarksVertex("Herwig::DMMediatorQuarksVertex", "HwDMModel.so"); + +void DMMediatorQuarksVertex::Init() { + + static ClassDocumentation documentation + ("The DMMediatorQuarksVertex class implements the coupling of the quarks to the mediator."); + +} + +void DMMediatorQuarksVertex::doinit() { + FFVVertex::doinit(); + cDMModelPtr model = dynamic_ptr_cast(generator()->standardModel()); + cSMmed_ = model->cSMmed(); + for(int ix=1;ix<4;++ix) { + addToList(-ix, ix, 32); + } +} diff --git a/Models/DarkMatter/DMMediatorQuarksVertex.h b/Models/DarkMatter/DMMediatorQuarksVertex.h new file mode 100644 --- /dev/null +++ b/Models/DarkMatter/DMMediatorQuarksVertex.h @@ -0,0 +1,111 @@ +// -*- C++ -*- +#ifndef Herwig_DMMediatorQuarksVertex_H +#define Herwig_DMMediatorQuarksVertex_H +// +// This is the declaration of the DMMediatorQuarksVertex class. +// + +#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h" + +namespace Herwig { + +using namespace ThePEG; + +/** + * The DMMediatorQuarksVertex class implements the couplings of the quarks to the mediator + * + * @see \ref DMMediatorQuarksVertexInterfaces "The interfaces" + * defined for DMMediatorQuarksVertex. + */ +class DMMediatorQuarksVertex: public FFVVertex { + +public: + + /** + * The default constructor. + */ + DMMediatorQuarksVertex(); + + /** + * Calculate the couplings. + * @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); + +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(); + //@} + +protected: + + /** @name Clone Methods. */ + //@{ + /** + * Make a simple clone of this object. + * @return a pointer to the new object. + */ + virtual IBPtr clone() const; + + /** Make a clone of this object, possibly modifying the cloned object + * to make it sane. + * @return a pointer to the new object. + */ + virtual IBPtr fullclone() const; + //@} + +private: + + /** + * The assignment operator is private and must never be called. + * In fact, it should not even be implemented. + */ + DMMediatorQuarksVertex & operator=(const DMMediatorQuarksVertex &); + + /** + * SM couplings to the dark mediator + */ + vector cSMmed_; + //@} + +}; + +} + +#endif /* Herwig_DMMediatorQuarksVertex_H */ diff --git a/Models/DarkMatter/DMModel.cc b/Models/DarkMatter/DMModel.cc --- a/Models/DarkMatter/DMModel.cc +++ b/Models/DarkMatter/DMModel.cc @@ -1,56 +1,70 @@ // -*- C++ -*- // // This is the implementation of the non-inlined, non-templated member // functions of the DMModel class. // #include "DMModel.h" #include "ThePEG/Interface/ClassDocumentation.h" +#include "ThePEG/Interface/Parameter.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" using namespace Herwig; -DMModel::DMModel() {} +DMModel::DMModel() : cDMmed_(0.), cSMmed_({1.0,1.0,1.0}) {} IBPtr DMModel::clone() const { return new_ptr(*this); } IBPtr DMModel::fullclone() const { return new_ptr(*this); } void DMModel::persistentOutput(PersistentOStream & os) const { + os << cDMmed_ << cSMmed_; } void DMModel::persistentInput(PersistentIStream & is, int) { + is >> cDMmed_ >> cSMmed_; } // The following static variable is needed for the type // description system in ThePEG. DescribeClass describeHerwigDMModel("Herwig::DMModel", "HwDMModel.so"); void DMModel::Init() { static ClassDocumentation documentation ("The DMModel class is designed to implement a simple dark matter model" " with fermionic dark matter and a vector mediator, " "as described in arXiv:1911.11147", "The DMModel class is designed to implement a simple dark matter model" " with fermionic dark matter and a vector mediator, " "as described in \\cite{Plehn:2019jeo}", "\\bibitem{Plehn:2019jeo}" "T.~Plehn, P.~Reimitz and P.~Richardson," "%``Hadronic Footprint of GeV-Mass Dark Matter,''" "arXiv:1911.11147 [hep-ph]." "%%CITATION = ARXIV:1911.11147;%%"); + static Parameter interfacecDMmed + ("cDMmed", + "coupling of DM to dark mediator", + &DMModel::cDMmed_, 1.0, 0., 10., false, false, Interface::limited); + + static ParVector interfacecSMmed + ("cSMmed", + "coupling of SM to dark mediator", + &DMModel::cSMmed_, -1 , 1.0 , -10. , 10. , false, false, Interface::limited); + } diff --git a/Models/DarkMatter/DMModel.h b/Models/DarkMatter/DMModel.h --- a/Models/DarkMatter/DMModel.h +++ b/Models/DarkMatter/DMModel.h @@ -1,85 +1,116 @@ // -*- C++ -*- #ifndef Herwig_DMModel_H #define Herwig_DMModel_H // // This is the declaration of the DMModel class. // #include "Herwig/Models/General/BSMModel.h" +#include "DMModel.fh" namespace Herwig { using namespace ThePEG; /** * The DMModel class is designed to implement a simple dark matter mode * with fermionic dark matter and a vector mediator, as described in arXiv:1911.11147 * * @see \ref DMModelInterfaces "The interfaces" * defined for DMModel. */ class DMModel: public BSMModel { public: /** * The default constructor. */ DMModel(); 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(); +public: + + /** + * Access to the couplings + */ + //@{ + + /** + * DM coupling to the mediator + */ + const double & cDMmed() const {return cDMmed_;} + + /** + * The couplings of the quarks to the mediators + */ + const vector & cSMmed() const {return cSMmed_;} + //@} + protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const; //@} private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ DMModel & operator=(const DMModel &) = delete; +private: + + /** + * DM coupling to the dark mediator + */ + double cDMmed_; + + /** + * SM couplings to the dark mediator + */ + vector cSMmed_; + }; } #endif /* Herwig_DMModel_H */ diff --git a/Models/DarkMatter/Makefile.am b/Models/DarkMatter/Makefile.am --- a/Models/DarkMatter/Makefile.am +++ b/Models/DarkMatter/Makefile.am @@ -1,16 +1,20 @@ BUILT_SOURCES = DM__all.cc CLEANFILES = DM__all.cc DM__all.cc : $(DIR_H_FILES) $(DIR_CC_FILES) Makefile @echo "Concatenating .cc files into $@" @$(top_srcdir)/cat_with_cpplines $(DIR_CC_FILES) > $@ EXTRA_DIST = $(ALL_H_FILES) $(ALL_CC_FILES) DIR_H_FILES = $(addprefix $(srcdir)/,$(ALL_H_FILES)) ALL_H_FILES = \ -DMModel.h DMModel.fh +DMModel.h DMModel.fh \ +DMMediatorQuarksVertex.h \ +DMDMMediatorVertex.h DIR_CC_FILES = $(addprefix $(srcdir)/,$(ALL_CC_FILES)) ALL_CC_FILES = \ -DMModel.cc +DMModel.cc \ +DMMediatorQuarksVertex.cc \ +DMDMMediatorVertex.cc