diff --git a/PDF/BudnevPDF.cc b/PDF/BudnevPDF.cc --- a/PDF/BudnevPDF.cc +++ b/PDF/BudnevPDF.cc @@ -1,121 +1,122 @@ // -*- C++ -*- // // This is the implementation of the non-inlined, non-templated member // functions of the BudnevPDF class. // #include "BudnevPDF.h" #include "ThePEG/Utilities/Maths.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" #include "ThePEG/Interface/Parameter.h" #include "ThePEG/PDT/ParticleData.h" #include "ThePEG/PDT/EnumParticles.h" #include "ThePEG/StandardModel/StandardModelBase.h" #include "ThePEG/Repository/EventGenerator.h" +#include "ThePEG/Utilities/DescribeClass.h" using namespace ThePEG; BudnevPDF::BudnevPDF() : _q2min(ZERO), _q2max(2.*GeV2),_q02(0.71*GeV2),_mup2(7.78) {} bool BudnevPDF::canHandleParticle(tcPDPtr particle) const { return ( abs(particle->id()) == ParticleID::pplus ); } cPDVector BudnevPDF::partons(tcPDPtr) const { // only photon return cPDVector(1,getParticleData(ParticleID::gamma)); } double BudnevPDF::xfl(tcPDPtr proton, tcPDPtr gamma, Energy2 qq, double l, Energy2 ) const { if(gamma->id()!=ParticleID::gamma) return 0.; double x(exp(-l)); // photon virtuality allowed by kinematics Energy2 qqkinmin = sqr(proton->mass()*x)/(1-x); //electric form factor for proton double fe = (4*sqr(proton->mass())*ge2(qq) + qq*gm2(qq))/(4*sqr(proton->mass()) + qq); //magnetic form factor double fm = gm2(qq); return SM().alphaEM()/Constants::pi*((1.-x)*(1-qqkinmin/qq)*fe + 0.5*sqr(x)*fm); } double BudnevPDF::xfvl(tcPDPtr, tcPDPtr, Energy2, double, Energy2) const { // valence density is zero return 0.0; } -ClassDescription -BudnevPDF::initBudnevPDF; -// Definition of the static class description member. + +// The following static variable is needed for the type +// description system in ThePEG. +DescribeClass +describeBudnevPDF("ThePEG::BudnevPDF", "BudnevPDF.so"); void BudnevPDF::Init() { static ClassDocumentation documentation ("The BudnevPDF provides the PDF for a photon inside" - " an incoming lepton in the Weisszacker-Williams approximation"); - + " an incoming photon using the results of Phys. Rept. 15 (1975) 181.", + "The BudnevPDF provides the PDF for a photon inside" + " an incoming photon based on the results of \\cite{Budnev:1974de} was used.", + "\\bibitem{Budnev:1974de}" + "V.~M.~Budnev, I.~F.~Ginzburg, G.~V.~Meledin and V.~G.~Serbo," + "%``The Two photon particle production mechanism. Physical problems. Applications. Equivalent photon approximation,''" + "Phys.\\ Rept.\\ {\\bf 15} (1975) 181." + "doi:10.1016/0370-1573(75)90009-5" + "%%CITATION = doi:10.1016/0370-1573(75)90009-5;%%" + "%1212 citations counted in INSPIRE as of 27 Nov 2019"); + static Parameter interfaceQ2Min ("Q2Min", "Minimum value of the magnitude of Q^2 for the photon", &BudnevPDF::_q2min, GeV2, ZERO, ZERO, 100.0*GeV2, false, false, Interface::limited); static Parameter interfaceQ2Max ("Q2Max", "Maximum value of the magnitude of Q^2 for the photon", &BudnevPDF::_q2max, GeV2, 4.0*GeV2, ZERO, 100.0*GeV2, false, false, Interface::limited); } - double BudnevPDF:: flattenScale(tcPDPtr proton, tcPDPtr, const PDFCuts & c, double l, double z, double & jacobian) const { double x = exp(-l); Energy2 qqmax = min(_q2max,0.25*sqr(x)*c.sMax()); Energy2 qqmin = max(_q2min, sqr(proton->mass()*x)/(1-x)); if(qqmin>=qqmax) { jacobian = 0.; return 0.; } double low(log(qqmin/c.scaleMaxL(l))),upp(log(qqmax/c.scaleMaxL(l))); // jacobian factor jacobian *= log(qqmax/qqmin); return exp(low+z*(upp-low)); } double BudnevPDF::flattenL(tcPDPtr, tcPDPtr, const PDFCuts & c, double z, double & jacobian) const { jacobian *= c.lMax() - c.lMin(); return c.lMin() + z*(c.lMax() - c.lMin()); } void BudnevPDF::persistentOutput(PersistentOStream & os) const { os << ounit(_q2min,GeV2) << ounit(_q2max,GeV2); } void BudnevPDF::persistentInput(PersistentIStream & is, int) { is >> iunit(_q2min,GeV2) >> iunit(_q2max,GeV2); } - -double BudnevPDF::gm2(Energy2 q2) const -{ - return ge2(q2)*_mup2; -} - -double BudnevPDF::ge2(Energy2 q2) const -{ - return Math::powi((1 + q2/_q02),-4); -} diff --git a/PDF/BudnevPDF.h b/PDF/BudnevPDF.h --- a/PDF/BudnevPDF.h +++ b/PDF/BudnevPDF.h @@ -1,228 +1,190 @@ // -*- C++ -*- #ifndef THEPEG_BudnevPDF_H #define THEPEG_BudnevPDF_H // // This is the declaration of the BudnevPDF class. // #include "ThePEG/PDF/PDFBase.h" +#include "ThePEG/Utilities/Maths.h" namespace ThePEG { using namespace ThePEG; /** - * Here is the documentation of the BudnevPDF class. + * The BudnevPDF class implements the PDF for the radiation of a photon from the proton. * * @see \ref BudnevPDFInterfaces "The interfaces" * defined for BudnevPDF. */ class BudnevPDF: public PDFBase { public: /** * Default constructor */ BudnevPDF(); /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Return true if this PDF can handle the extraction of partons from * the given \a particle. */ virtual bool canHandleParticle(tcPDPtr particle) const; /** * Return the partons which this PDF may extract from the given * \a particle. */ virtual cPDVector partons(tcPDPtr particle) const; /** * The density. Return the pdf for the given \a parton inside the * given \a particle for the virtuality \a partonScale and * logarithmic momentum fraction \a l \f$(l=\log(1/x)\f$. The \a * particle is assumed to have a virtuality \a particleScale. */ virtual double xfl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale = ZERO) const; /** * The valence density. Return the pdf for the given cvalence \a * parton inside the given \a particle for the virtuality \a * partonScale and logarithmic momentum fraction \a l * \f$(l=\log(1/x)\f$. The \a particle is assumed to have a * virtuality \a particleScale. If not overidden by a sub class this * will return zero. */ virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale = ZERO) const; /** * Generate scale (as a fraction of the maximum scale). If the PDF * contains strange peaks which can be difficult to handle, this * function may be overwritten to return an appropriate scale * \f$Q^2/Q^2_{\max}\f$ for a \a z uniformly distributed in * ]0,1[. Also the jacobobian of the \f$Q^2/Q^2_{\max}\rightarrow * z\f$ variable transformation must multiply the \a jacobian * argument. The default version will simply use the function * \f$Q^2/Q^2_{\max} = (Q^2_{\max}/Q^2_{\min})^(z-1)\f$ or, if * \f$Q^2_{\min}\f$ is zero, \f$Q^2/Q^2_{\max} = z\f$ (where the * limits are set by \a cut). */ virtual double flattenScale(tcPDPtr particle, tcPDPtr parton, const PDFCuts & cut, double l, double z, double & jacobian) const; /** * Generate a momentum fraction. If the PDF contains strange peaks * which can be difficult to handle, this function may be * overwritten to return an appropriate \f$l=\log(1/x)\f$ for a \a z * uniformly distributed in ]0,1[. Also the jacobobian of the * \f$l\rightarrow z\f$ variable transformation must in the function * multiply the \a jacobian argument. The default version will * simply use the function \f$l(z) = l_{\min} + * z*(l_{\max}-l_{\min})\f$ (where the limits are set by \a cut). */ virtual double flattenL(tcPDPtr particle, tcPDPtr parton, const PDFCuts &cut, double z, double & jacobian) 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. */ 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. */ virtual IBPtr fullclone() const {return new_ptr(*this);} //@} private: /** - * The static object used to initialize the description of this class. - * Indicates that this is an concrete class without persistent data. - */ - static ClassDescription initBudnevPDF; - - /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ BudnevPDF & operator=(const BudnevPDF &) = delete; private: /** * Minimum \f$Q^2\f$ for the photon */ Energy2 _q2min; /** * Maximum \f$Q^2\f$ for the photon */ Energy2 _q2max; /** * Fitted scale \f$Q{_0}{^2}=0.71GeV^2\f$ */ const Energy2 _q02; /** * Magenetic moment of the proton \f$ \mu_{p}^2 = 7.78\f$ */ const double _mup2; /** * Helper function for magnetic a electric form factors in Budnev flux */ - double gm2(Energy2 q2) const; + double gm2(Energy2 q2) const { + return ge2(q2)*_mup2; + } - /** * Helper function for magnetic a electric form factors in Budnev flux */ - double ge2(Energy2 q2) const; - + double ge2(Energy2 q2) const { + return Math::powi((1 + q2/_q02),-4); + } }; } -#include "ThePEG/Utilities/ClassTraits.h" - -namespace ThePEG { - -/** @cond TRAITSPECIALIZATIONS */ - -/** This template specialization informs ThePEG about the - * base classes of BudnevPDF. */ -template <> -struct BaseClassTrait { - /** Typedef of the first base class of BudnevPDF. */ - typedef PDFBase NthBase; -}; - -/** This template specialization informs ThePEG about the name of - * the BudnevPDF class and the shared object where it is defined. */ -template <> -struct ClassTraits - : public ClassTraitsBase { - /** Return a platform-independent class name */ - static string className() { return "ThePEG::BudnevPDF"; } - /** - * The name of a file containing the dynamic library where the class - * BudnevPDF is implemented. It may also include several, space-separated, - * libraries if the class BudnevPDF depends on other classes (base classes - * excepted). In this case the listed libraries will be dynamically - * linked in the order they are specified. - */ - static string library() { return "BudnevPDF.so"; } -}; - -/** @endcond */ - -} - #endif /* THEPEG_BudnevPDF_H */