diff --git a/Contrib/LeptonME/MEee2Z.cc b/Contrib/LeptonME/MEee2Z.cc deleted file mode 100644 --- a/Contrib/LeptonME/MEee2Z.cc +++ /dev/null @@ -1,197 +0,0 @@ -// -*- C++ -*- -// -// MEee2Z.cc is a part of Herwig - A multi-purpose Monte Carlo event generator -// Copyright (C) 2002-2017 The Herwig Collaboration -// -// Herwig 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 MEee2Z class. -// - -#include "MEee2Z.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/MatrixElement/Tree2toNDiagram.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Interface/Switch.h" -#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" -#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" -#include "ThePEG/Handlers/StandardXComb.h" -#include "ThePEG/Helicity/FermionSpinInfo.h" -#include "ThePEG/Helicity/VectorSpinInfo.h" -#include "Herwig/MatrixElement/HardVertex.h" -#include "ThePEG/Persistency/PersistentOStream.h" -#include "ThePEG/Persistency/PersistentIStream.h" -#include "ThePEG/Cuts/Cuts.h" - -using namespace Herwig; -using namespace ThePEG; -using namespace ThePEG::Helicity; - -void MEee2Z::getDiagrams() const { - tcPDPtr Z0 = getParticleData(ParticleID::Z0); - tcPDPtr em = getParticleData(ParticleID::eminus); - tcPDPtr ep = getParticleData(ParticleID::eplus); - add(new_ptr((Tree2toNDiagram(2), em, ep, 1, Z0,-1))); -} - -Energy2 MEee2Z::scale() const { - return sHat(); -} - -int MEee2Z::nDim() const { - return 1; -} - -bool MEee2Z::generateKinematics(const double *) { - // Here you can use nDim() random numbers in the vector provided - // to generate the internal kinematics. Note that sHat() has - // already been given from the outside. - meMomenta()[2]=meMomenta()[0]+meMomenta()[1]; - meMomenta()[2].rescaleMass(); - jacobian(1.0); - // check passes all the cuts - vector out(1,meMomenta()[2]); - tcPDVector tout(1,mePartonData()[2]); - // return true if passes the cuts - return lastCuts().passCuts(tout, out, mePartonData()[0], mePartonData()[1]); -} - -double MEee2Z::me2() const { - double aver=0.; - // the arrays for the wavefunction to be passed to the matrix element - vector fin; - vector ain; - vector vin; - SpinorWaveFunction fwave(meMomenta()[0],mePartonData()[0],incoming); - SpinorBarWaveFunction awave(meMomenta()[1],mePartonData()[1],incoming); - for(unsigned int ihel=0;ihel<2;++ihel) { - fwave.reset(ihel);fin.push_back(fwave); - awave.reset(ihel);ain.push_back(awave); - } - VectorWaveFunction vwave(meMomenta()[2],mePartonData()[2],outgoing); - for(unsigned int ihel=0;ihel<3;++ihel) { - vwave.reset(ihel); vin.push_back(vwave); - } - ProductionMatrixElement temp=HelicityME(fin,ain,vin,aver); - // add the Breit-Wigner factors - Energy width=mePartonData()[2]->width(); - Energy mass =mePartonData()[2]->mass(); - InvEnergy2 fact = width*mass/(sqr(sHat()-mass*mass)+sqr(mass*width)); - return aver*fact*sHat(); -} - -CrossSection MEee2Z::dSigHatDR() const { - return (me2()*jacobian()/sHat())*sqr(hbarc); -} - -unsigned int MEee2Z::orderInAlphaS() const { - return 0; -} - -unsigned int MEee2Z::orderInAlphaEW() const { - return 1; -} - -Selector -MEee2Z::diagrams(const DiagramVector &) const { - Selector sel; - sel.insert(1.0, 0); - return sel; -} - -Selector -MEee2Z::colourGeometries(tcDiagPtr) const { - static const ColourLines neutral ( " " ); - Selector sel; - sel.insert(1.,&neutral); - return sel; -} - - -void MEee2Z::persistentOutput(PersistentOStream & os) const { - os << _theFFZVertex; -} - -void MEee2Z::persistentInput(PersistentIStream & is, int) { - is >> _theFFZVertex; -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeClass -describeHerwigMEee2Z("Herwig::MEee2Z", "LeptonME.so"); - -void MEee2Z::Init() { - - static ClassDocumentation documentation - ("The MEee2Z class implements the e+e- -> Z as a 1->2 process for testing" - " of spin correlations etc.."); - -} - -void MEee2Z::constructVertex(tSubProPtr sub) { - // extract the particles in the hard process - ParticleVector hard; - hard.push_back(sub->incoming().first);hard.push_back(sub->incoming().second); - hard.push_back(sub->outgoing()[0]); - if(hard[0]->id()id()) swap(hard[0],hard[1]); - vector fin; - vector ain; - vector vin; - SpinorWaveFunction( fin,hard[0],incoming,false,true); - SpinorBarWaveFunction(ain,hard[1],incoming,false,true); - VectorWaveFunction (vin,hard[2],outgoing,true,false,true); - double dummy; - ProductionMatrixElement prodme=HelicityME(fin,ain,vin,dummy); - // construct the vertex - HardVertexPtr hardvertex=new_ptr(HardVertex()); - // set the matrix element for the vertex - hardvertex->ME(prodme); - // set the pointers to and from the vertex - for(unsigned int ix=0;ix<3;++ix) { - (hard[ix]->spinInfo())-> - productionVertex(hardvertex); - } -} - -// the helicity amplitude matrix element -ProductionMatrixElement MEee2Z::HelicityME(vector fin, - vector ain, - vector vout, - double & aver) const -{ - ProductionMatrixElement output(PDT::Spin1Half,PDT::Spin1Half,PDT::Spin1); - Complex product; - // sum over helicities to get the matrix element - unsigned int inhel1,inhel2,outhel1; - double me(0.); - LorentzPolarizationVector vec; - Complex ii(0.,1.); - for(inhel1=0;inhel1<2;++inhel1) { - for(inhel2=0;inhel2<2;++inhel2) { - for(outhel1=0;outhel1<3;++outhel1) { - product=_theFFZVertex->evaluate(sHat(),fin[inhel1],ain[inhel2], - vout[outhel1]); - output(inhel1,inhel2,outhel1)=product; - me+=real(product*conj(product)); - } - } - } - aver=me/4.; - return output; -} - -void MEee2Z::doinit() { - MEBase::doinit(); - tcHwSMPtr hwsm=ThePEG::dynamic_ptr_cast(standardModel()); - // do the initialisation - if(hwsm) - { _theFFZVertex = hwsm->vertexFFZ();} - else - {throw InitException();} -} diff --git a/Contrib/LeptonME/MEee2Z.h b/Contrib/LeptonME/MEee2Z.h deleted file mode 100644 --- a/Contrib/LeptonME/MEee2Z.h +++ /dev/null @@ -1,208 +0,0 @@ -// -*- C++ -*- -// -// MEee2Z.h is a part of Herwig - A multi-purpose Monte Carlo event generator -// Copyright (C) 2002-2017 The Herwig Collaboration -// -// Herwig is licenced under version 3 of the GPL, see COPYING for details. -// Please respect the MCnet academic guidelines, see GUIDELINES for details. -// -#ifndef HERWIG_MEee2Z_H -#define HERWIG_MEee2Z_H -// -// This is the declaration of the MEee2Z class. -// - -#include "ThePEG/MatrixElement/ME2to2Base.h" -#include "ThePEG/MatrixElement/MEBase.h" -#include "Herwig/Models/RSModel/RSModel.h" -#include "ThePEG/Repository/EventGenerator.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Utilities/Rebinder.h" -#include "Herwig/MatrixElement/ProductionMatrixElement.h" -#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" -#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" -#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" - -namespace Herwig { -using namespace ThePEG; -using Helicity::SpinorWaveFunction; -using Helicity::SpinorBarWaveFunction; -using Helicity::VectorWaveFunction; - -/** - * The MEee2Z class implements the matrix element for \f$e^+e^-\to Z\f$ for - * the testing of spin correlations - */ -class MEee2Z: public MEBase { - -public: - - /** @name Virtual functions required by the MEBase class. */ - //@{ - /** - * Return the order in \f$\alpha_S\f$ in which this matrix - * element is given. - */ - virtual unsigned int orderInAlphaS() const; - - /** - * Return the order in \f$\alpha_{EW}\f$ in which this matrix - * element is given. - */ - virtual unsigned int orderInAlphaEW() const; - - /** - * The matrix element for the kinematical configuration - * previously provided by the last call to setKinematics(), suitably - * scaled by sHat() to give a dimension-less number. - * @return the matrix element scaled with sHat() to give a - * dimensionless number. - */ - virtual double me2() const; - - /** - * Return the scale associated with the last set phase space point. - */ - virtual Energy2 scale() const; - - /** - * Add all possible diagrams with the add() function. - */ - virtual void getDiagrams() const; - - /** - * Get diagram selector. With the information previously supplied with the - * setKinematics method, a derived class may optionally - * override this method to weight the given diagrams with their - * (although certainly not physical) relative probabilities. - * @param dv the diagrams to be weighted. - * @return a Selector relating the given diagrams to their weights. - */ - virtual Selector diagrams(const DiagramVector & dv) const; - - /** - * Return a Selector with possible colour geometries for the selected - * diagram weighted by their relative probabilities. - * @param diag the diagram chosen. - * @return the possible colour geometries weighted by their - * relative probabilities. - */ - virtual Selector - colourGeometries(tcDiagPtr diag) const; - - /** - * Construct the vertex of spin correlations. - */ - virtual void constructVertex(tSubProPtr); - /** - * The number of internal degreed of freedom used in the matrix - * element. - */ - virtual int nDim() const; - - /** - * Generate internal degrees of freedom given 'nDim()' uniform - * random numbers in the interval ]0,1[. To help the phase space - * generator, the 'dSigHatDR()' should be a smooth function of these - * numbers, although this is not strictly necessary. Return - * false if the chosen points failed the kinematical cuts. - */ - virtual bool generateKinematics(const double * r); - - /** - * Return the matrix element for the kinematical configuation - * previously provided by the last call to setKinematics(). Uses - * me(). - */ - virtual CrossSection dSigHatDR() const; - //@} - -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. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** Make a clone of this object, possibly modifying the cloned object - * to make it sane. - * @return a pointer to the new object. - */ - inline virtual IBPtr fullclone() const {return new_ptr(*this);} - //@} - -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 matrix element - * @param fin The spinors for the incoming fermion - * @param ain The spinors for the incoming antifermion - * @param vout The polarization vectors for the outgoing Z - * @param me The spin averaged matrix element - */ - ProductionMatrixElement HelicityME(vector fin, - vector ain, - vector vout,double& me) const; - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - MEee2Z & operator=(const MEee2Z &) = delete; - -private: - - /** - * Pointer to the Z vertex - */ - AbstractFFVVertexPtr _theFFZVertex; - -}; - -} - - -#endif /* HERWIG_MEee2Z_H */ diff --git a/Contrib/LeptonME/Makefile.in b/Contrib/LeptonME/Makefile.in deleted file mode 100644 --- a/Contrib/LeptonME/Makefile.in +++ /dev/null @@ -1,36 +0,0 @@ -# -*- Makefile -*- (for emacs) - -# -# This Makefile is intended for compiling Herwig++ plugins -# You can find plugins here: INSERT URL -# -# This Makefile received very little testing, -# any bug reports are very welcome! -# - -# location of include files -THEPEGINCLUDE= -HERWIGINCLUDE= -GSLINCLUDE= -LDFLAGS = -SHARED_FLAG = -INCLUDE = $(THEPEGINCLUDE) $(HERWIGINCLUDE) $(GSLINCLUDE) -# -# C++ flags -# -CXX = -CXXFLAGS = - -ALLCCFILES=$(shell echo *.cc) - -default : LeptonME.so - -%.o : %.cc %.h - $(CXX) -fPIC $(CPPFLAGS) $(INCLUDE) $(CXXFLAGS) -c -shared $< -o $@ - -LeptonME.so: MEee2Z.o - $(CXX) -fPIC $(CPPFLAGS) $(INCLUDE) $(CXXFLAGS) \ - MEee2Z.o $(SHARED_FLAG) $(LDFLAGS) -o LeptonME.so - -clean: - rm -f $(ALLCCFILES:.cc=.o) LeptonME.so