Page MenuHomeHEPForge

No OneTemporary

diff --git a/PDF/DipoleFormFactor.cc b/PDF/DipoleFormFactor.cc
new file mode 100644
--- /dev/null
+++ b/PDF/DipoleFormFactor.cc
@@ -0,0 +1,52 @@
+// -*- C++ -*-
+//
+// This is the implementation of the non-inlined, non-templated member
+// functions of the DipoleFormFactor class.
+//
+
+#include "DipoleFormFactor.h"
+#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/Interface/Parameter.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 ThePEG;
+
+IBPtr DipoleFormFactor::clone() const {
+ return new_ptr(*this);
+}
+
+IBPtr DipoleFormFactor::fullclone() const {
+ return new_ptr(*this);
+}
+
+void DipoleFormFactor::persistentOutput(PersistentOStream & os) const {
+ os << ounit(q02_,GeV2);
+}
+
+void DipoleFormFactor::persistentInput(PersistentIStream & is, int) {
+ is >> iunit(q02_,GeV2);
+}
+
+// The following static variable is needed for the type
+// description system in ThePEG.
+DescribeClass<DipoleFormFactor,NucleonFormFactor>
+describeThePEGDipoleFormFactor("ThePEG::DipoleFormFactor", "NucleonFormFactor.so");
+
+void DipoleFormFactor::Init() {
+
+ static ClassDocumentation<DipoleFormFactor> documentation
+ ("The DipoleFormFactor class implements a dipole form for the nucleon form factor");
+
+ static Parameter<DipoleFormFactor,Energy2> interfaceDipoleScale
+ ("DipoleScale",
+ "The scale for the dipole form factor",
+ &DipoleFormFactor::q02_, GeV2, 0.71*GeV2, 0.0*GeV2, 10.0*GeV2,
+ false, false, Interface::limited);
+
+}
+
diff --git a/PDF/DipoleFormFactor.h b/PDF/DipoleFormFactor.h
new file mode 100644
--- /dev/null
+++ b/PDF/DipoleFormFactor.h
@@ -0,0 +1,99 @@
+// -*- C++ -*-
+#ifndef ThePEG_DipoleFormFactor_H
+#define ThePEG_DipoleFormFactor_H
+//
+// This is the declaration of the DipoleFormFactor class.
+//
+
+#include "NucleonFormFactor.h"
+#include "ThePEG/Utilities/Maths.h"
+
+namespace ThePEG {
+
+/**
+ * Here is the documentation of the DipoleFormFactor class.
+ *
+ * @see \ref DipoleFormFactorInterfaces "The interfaces"
+ * defined for DipoleFormFactor.
+ */
+class DipoleFormFactor: public NucleonFormFactor {
+
+public:
+
+ /**
+ * The default constructor.
+ */
+ DipoleFormFactor() : q02_(0.71*GeV2)
+ {}
+
+ /**
+ * Return the form factor
+ * @param q2 the scale
+ */
+ Complex formFactor(tcPDPtr , Energy2 q2) const {
+ return Math::powi((1 + q2/q02_),-2);
+ }
+
+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;
+ //@}
+
+private:
+
+ /**
+ * The assignment operator is private and must never be called.
+ * In fact, it should not even be implemented.
+ */
+ DipoleFormFactor & operator=(const DipoleFormFactor &) = delete;
+
+private:
+
+ /**
+ * Fitted scale \f$Q{_0}{^2}=0.71GeV^2\f$ for the dipole form factor
+ */
+ Energy2 q02_;
+
+};
+
+}
+
+#endif /* ThePEG_DipoleFormFactor_H */
diff --git a/PDF/HardSphereYukawaFormFactor.cc b/PDF/HardSphereYukawaFormFactor.cc
new file mode 100644
--- /dev/null
+++ b/PDF/HardSphereYukawaFormFactor.cc
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// This is the implementation of the non-inlined, non-templated member
+// functions of the HardSphereYukawaFormFactor class.
+//
+
+#include "HardSphereYukawaFormFactor.h"
+#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/Interface/Parameter.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 ThePEG;
+
+IBPtr HardSphereYukawaFormFactor::clone() const {
+ return new_ptr(*this);
+}
+
+IBPtr HardSphereYukawaFormFactor::fullclone() const {
+ return new_ptr(*this);
+}
+
+void HardSphereYukawaFormFactor::persistentOutput(PersistentOStream & os) const {
+ os<< ounit(aFact_,femtometer) << ounit(yukawaRange_,femtometer);
+}
+
+void HardSphereYukawaFormFactor::persistentInput(PersistentIStream & is, int) {
+ is >> iunit(aFact_,femtometer) >> iunit(yukawaRange_,femtometer);
+}
+
+// The following static variable is needed for the type
+// description system in ThePEG.
+DescribeClass<HardSphereYukawaFormFactor,NucleonFormFactor>
+describeThePEGHardSphereYukawaFormFactor("ThePEG::HardSphereYukawaFormFactor", "NucleonFormFactor.so");
+
+void HardSphereYukawaFormFactor::Init() {
+
+ static ClassDocumentation<HardSphereYukawaFormFactor> documentation
+ ("The HardSphereYukawaFormFactor class implements a hard sphere + yukwaw form for the nucelon form factor");
+
+ static Parameter<HardSphereYukawaFormFactor,Length> interfaceYukawaRange
+ ("YukawaRange",
+ "The range of the Yukawa potential",
+ &HardSphereYukawaFormFactor::yukawaRange_, femtometer, 0.7*femtometer, 0.0*femtometer, 10.0*femtometer,
+ false, false, Interface::limited);
+
+ static Parameter<HardSphereYukawaFormFactor,Length> interfaceaParameter
+ ("aParameter",
+ "The parameter for the relationship between the nuclear mass number and radius",
+ &HardSphereYukawaFormFactor::aFact_, femtometer, 1.2*femtometer, 0.0*femtometer, 10.0*femtometer,
+ false, false, Interface::limited);
+
+}
diff --git a/PDF/HardSphereYukawaFormFactor.h b/PDF/HardSphereYukawaFormFactor.h
new file mode 100644
--- /dev/null
+++ b/PDF/HardSphereYukawaFormFactor.h
@@ -0,0 +1,119 @@
+// -*- C++ -*-
+#ifndef ThePEG_HardSphereYukawaFormFactor_H
+#define ThePEG_HardSphereYukawaFormFactor_H
+//
+// This is the declaration of the HardSphereYukawaFormFactor class.
+//
+
+#include "NucleonFormFactor.h"
+#include "ThePEG/PDT/ParticleData.h"
+
+namespace ThePEG {
+
+/**
+ * The HardSphereYukawaFormFactor class implements a form factor model using a hard space + yukawaw interaction.
+ *
+ * @see \ref HardSphereYukawaFormFactorInterfaces "The interfaces"
+ * defined for HardSphereYukawaFormFactor.
+ */
+class HardSphereYukawaFormFactor: public NucleonFormFactor {
+
+public:
+
+ /**
+ * The default constructor.
+ */
+ HardSphereYukawaFormFactor() : yukawaRange_(0.7*femtometer), aFact_(1.2*femtometer)
+ {}
+
+ /**
+ * Convolution of hard sphere and Yukawa for heavy nuclei
+ */
+ Complex formFactor(tcPDPtr nucleon, Energy2 q2) const {
+ pair<int,int> AZ = massAndZ(nucleon->id());
+ Length R = aFact_*pow(AZ.first,1./3.);
+ double Rq = sqrt(q2)*R/hbarc;
+ return 3./pow(Rq,3)*(sin(Rq)-Rq*cos(Rq))/(1.+sqr(yukawaRange_/hbarc)*q2);
+ }
+
+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.xs
+ */
+ static void Init();
+
+protected:
+
+ /**
+ * Extract the mass and atomic number for the nuclear PDG code
+ */
+ pair<int,int> massAndZ(long pid) const {
+ pair<int,int> output;
+ output.first = (abs(pid)%10000)/10;
+ output.second = (abs(pid)%10000000)/10000;
+ return output;
+ }
+
+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.
+ */
+ HardSphereYukawaFormFactor & operator=(const HardSphereYukawaFormFactor &) = delete;
+
+private :
+
+ /**
+ * Range of the Yukawa potential
+ */
+ Length yukawaRange_;
+
+ /**
+ * Prefactor for the nucleur radius \f$R_A=aA^{\frac13}\f$
+ */
+ Length aFact_;
+
+
+};
+
+}
+
+#endif /* ThePEG_HardSphereYukawaFormFactor_H */
diff --git a/PDF/Makefile.am b/PDF/Makefile.am
--- a/PDF/Makefile.am
+++ b/PDF/Makefile.am
@@ -1,94 +1,101 @@
mySOURCES = PartonExtractor.cc PDFBase.cc RemnantHandler.cc \
BeamParticleData.cc PolarizedBeamParticleData.cc \
PartonBin.cc NoPDF.cc NoRemnants.cc PDFCuts.cc \
PartonBinInstance.cc SoftRemnantHandler.cc
DOCFILES = BeamParticleData.h PolarizedBeamParticleData.h \
NoPDF.h NoRemnants.h PDFBase.h PDFCuts.h \
PartonBin.h PartonExtractor.h RemnantHandler.h \
PDF.h PartonBinInstance.h SoftRemnantHandler.h
INCLUDEFILES = $(DOCFILES) BeamParticleData.xh \
PDFBase.xh PartonExtractor.fh \
PartonExtractor.xh RemnantHandler.xh \
PDF.fh PartonBin.fh PolarizedBeamParticleData.fh
INPUTFILES = PDFsets.index
CLEANFILES = .done-all-links
noinst_LTLIBRARIES = libThePEGPDF.la
pkglib_LTLIBRARIES = LeptonLeptonPDF.la UnResolvedRemnant.la \
GRVBase.la GRV94L.la GRV94M.la WeizsackerWilliamsPDF.la \
- BudnevPDF.la NuclearPhotonPDF.la
+ BudnevPDF.la NuclearPhotonPDF.la NucleonFormFactor.la
if USELHAPDF
pkglib_LTLIBRARIES += ThePEGLHAPDF.la
LHAPDF_SOURCES = LHAPDF6.cc LHAPDF6.h
ThePEGLHAPDF_la_LDFLAGS = $(AM_LDFLAGS) $(LHAPDF_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
ThePEGLHAPDF_la_LIBADD = $(LHAPDF_LIBS)
ThePEGLHAPDF_la_SOURCES = $(LHAPDF_SOURCES)
ThePEGLHAPDF_la_CPPFLAGS = $(AM_CPPFLAGS) $(LHAPDF_CPPFLAGS)
endif
libThePEGPDF_la_SOURCES = $(mySOURCES) $(INCLUDEFILES)
libThePEGPDF_la_CPPFLAGS = $(AM_CPPFLAGS)
# Version info should be updated if any interface or persistent I/O
# function is changed
LeptonLeptonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
LeptonLeptonPDF_la_SOURCES = LeptonLeptonPDF.cc LeptonLeptonPDF.h
# Version info should be updated if any interface or persistent I/O
# function is changed
WeizsackerWilliamsPDF_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
WeizsackerWilliamsPDF_la_SOURCES = WeizsackerWilliamsPDF.cc WeizsackerWilliamsPDF.h
# Version info should be updated if any interface or persistent I/O
# function is changed
BudnevPDF_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
BudnevPDF_la_SOURCES = BudnevPDF.cc BudnevPDF.h
# Version info should be updated if any interface or persistent I/O
# function is changed
+NucleonFormFactor_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
+NucleonFormFactor_la_SOURCES = NucleonFormFactor.cc NucleonFormFactor.h NucleonFormFactor.fh \
+DipoleFormFactor.h DipoleFormFactor.cc \
+HardSphereYukawaFormFactor.h HardSphereYukawaFormFactor.cc
+
+# Version info should be updated if any interface or persistent I/O
+# function is changed
NuclearPhotonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
NuclearPhotonPDF_la_SOURCES = NuclearPhotonPDF.cc NuclearPhotonPDF.h
# Version info should be updated if any interface or persistent I/O
# function is changed
UnResolvedRemnant_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
UnResolvedRemnant_la_SOURCES = UnResolvedRemnant.cc UnResolvedRemnant.h
# Version info should be updated if any interface or persistent I/O
# function is changed
GRVBase_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
GRVBase_la_SOURCES = GRVBase.cc GRVBase.h
# Version info should be updated if any interface or persistent I/O
# function is changed
GRV94L_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
GRV94L_la_SOURCES = GRV94L.cc GRV94L.h
# Version info should be updated if any interface or persistent I/O
# function is changed
GRV94M_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO)
GRV94M_la_SOURCES = GRV94M.cc GRV94M.h
dist_pkgdata_DATA = PDFsets.index
all-local: .done-all-links
.done-all-links:
@EMPTY@ifdef SHOWCOMMAND
for file in $(INPUTFILES); do \
if test ! -f $$file; then $(LN_S) $(srcdir)/$$file $$file; fi; done
echo "stamp" > .done-all-links
@EMPTY@else
@echo "sym-linking input files files..."
@for file in $(INPUTFILES); do \
if test ! -f $$file; then $(LN_S) $(srcdir)/$$file $$file; fi; done
@echo "stamp" > .done-all-links
@EMPTY@endif
include $(top_srcdir)/Config/Makefile.aminclude
diff --git a/PDF/NuclearPhotonPDF.cc b/PDF/NuclearPhotonPDF.cc
--- a/PDF/NuclearPhotonPDF.cc
+++ b/PDF/NuclearPhotonPDF.cc
@@ -1,145 +1,122 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the NuclearPhotonPDF class.
//
#include "NuclearPhotonPDF.h"
#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/Parameter.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 "ThePEG/PDT/ParticleData.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
using namespace ThePEG;
-NuclearPhotonPDF::NuclearPhotonPDF()
- : q2Min_(ZERO), q2Max_(2.*GeV2), yukawaRange_(0.7*femtometer), aFact_(1.2*femtometer), q02_(0.71*GeV2)
+NuclearPhotonPDF::NuclearPhotonPDF() : q2Min_(ZERO), q2Max_(2.*GeV2)
{}
bool NuclearPhotonPDF::canHandleParticle(tcPDPtr particle) const {
// all nucleons above the proton
return abs(particle->iCharge())>4 && abs(particle->id()) > 1000000000;
}
cPDVector NuclearPhotonPDF::partons(tcPDPtr ) const {
// only photon
return cPDVector(1,getParticleData(ParticleID::gamma));
}
double NuclearPhotonPDF::xfl(tcPDPtr ion, 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(ion->mass()*x)/(1-x);
-
-
- double form;
- if(abs(ion->iCharge())<=18) {
- form = dipoleFormFactor(qq);
- }
- else {
- pair<int,int> AZ = massAndZ(ion->id());
- Length R = aFact_*pow(AZ.first,1./3.);
- form = heavyFormFactor(qq,R);
- }
- return SM().alphaEM()/Constants::pi*(1.-x)*(1-qqkinmin/qq)*sqr(form);
+ Complex form = form_->formFactor(ion,qq);
+ return SM().alphaEM()/Constants::pi*(1.-x)*(1-qqkinmin/qq)*norm(form);
}
double NuclearPhotonPDF::xfvl(tcPDPtr , tcPDPtr , Energy2 ,
double , Energy2 ) const {
// valence density is zero
return 0.0;
}
double NuclearPhotonPDF::
flattenScale(tcPDPtr ion, tcPDPtr, const PDFCuts & c,
double l, double z, double & jacobian) const {
double x = exp(-l);
- pair<int,int> AZ = massAndZ(ion->id());
- Energy2 qqmax = min(min(q2Max_,sqr(hbarc/(aFact_*pow(AZ.first,1./3.)))),0.25*sqr(x)*c.sMax());
+ // pair<int,int> AZ = massAndZ(ion->id());
+ // Energy2 qqmax = min(min(q2Max_,sqr(hbarc/(aFact_*pow(AZ.first,1./3.)))),0.25*sqr(x)*c.sMax());
+ Energy2 qqmax = min(q2Max_,0.25*sqr(x)*c.sMax());
Energy2 qqmin = max(q2Min_, sqr(ion->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 NuclearPhotonPDF::flattenL(tcPDPtr, tcPDPtr, const PDFCuts & c,
double z, double & jacobian) const {
jacobian *= c.lMax() - c.lMin();
return c.lMin() + z*(c.lMax() - c.lMin());
}
IBPtr NuclearPhotonPDF::clone() const {
return new_ptr(*this);
}
IBPtr NuclearPhotonPDF::fullclone() const {
return new_ptr(*this);
}
void NuclearPhotonPDF::persistentOutput(PersistentOStream & os) const {
- os << ounit(q2Min_,GeV2) << ounit(q2Max_,GeV2) << ounit(aFact_,femtometer) << ounit(yukawaRange_,femtometer);
+ os << ounit(q2Min_,GeV2) << ounit(q2Max_,GeV2) << form_;
}
void NuclearPhotonPDF::persistentInput(PersistentIStream & is, int) {
- is >> iunit(q2Min_,GeV2) >> iunit(q2Max_,GeV2) >> iunit(aFact_,femtometer) >> iunit(yukawaRange_,femtometer);
+ is >> iunit(q2Min_,GeV2) >> iunit(q2Max_,GeV2) >> form_;
}
-
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<NuclearPhotonPDF,PDFBase>
-describeThePEGNuclearPhotonPDF("ThePEG::NuclearPhotonPDF", "NuclearPhotonPDF.so");
+describeThePEGNuclearPhotonPDF("ThePEG::NuclearPhotonPDF", "NucleonFormFactor.so NuclearPhotonPDF.so");
void NuclearPhotonPDF::Init() {
static ClassDocumentation<NuclearPhotonPDF> documentation
("The NuclearPhotonPDF class implements the PDf for the radiation of a photon from a heavy ion.");
static Parameter<NuclearPhotonPDF,Energy2> interfaceQ2Min
("Q2Min",
"Minimum value of the magnitude of Q^2 for the photon",
&NuclearPhotonPDF::q2Min_, GeV2, ZERO, ZERO, 100.0*GeV2,
false, false, Interface::limited);
static Parameter<NuclearPhotonPDF,Energy2> interfaceQ2Max
("Q2Max",
"Maximum value of the magnitude of Q^2 for the photon",
&NuclearPhotonPDF::q2Max_, GeV2, 4.0*GeV2, ZERO, 100.0*GeV2,
false, false, Interface::limited);
-
- static Parameter<NuclearPhotonPDF,Length> interfaceYukawaRange
- ("YukawaRange",
- "The range of the Yukawa potential",
- &NuclearPhotonPDF::yukawaRange_, femtometer, 0.7*femtometer, 0.0*femtometer, 10.0*femtometer,
- false, false, Interface::limited);
-
- static Parameter<NuclearPhotonPDF,Length> interfaceaParameter
- ("aParameter",
- "The parameter for the relationship between the nuclear mass number and radius",
- &NuclearPhotonPDF::aFact_, femtometer, 1.2*femtometer, 0.0*femtometer, 10.0*femtometer,
- false, false, Interface::limited);
-
- static Parameter<NuclearPhotonPDF,Energy2> interfaceDipoleScale
- ("DipoleScale",
- "The scale for the dipole form factor",
- &NuclearPhotonPDF::q02_, GeV2, 0.71*GeV2, 0.0*GeV2, 10.0*GeV2,
- false, false, Interface::limited);
+
+ static Reference<NuclearPhotonPDF,NucleonFormFactor> interfaceFormFactor
+ ("FormFactor",
+ "The form factor",
+ &NuclearPhotonPDF::form_, false, false, true, false, false);
}
diff --git a/PDF/NuclearPhotonPDF.h b/PDF/NuclearPhotonPDF.h
--- a/PDF/NuclearPhotonPDF.h
+++ b/PDF/NuclearPhotonPDF.h
@@ -1,206 +1,169 @@
// -*- C++ -*-
#ifndef ThePEG_NuclearPhotonPDF_H
#define ThePEG_NuclearPhotonPDF_H
//
// This is the declaration of the NuclearPhotonPDF class.
//
#include "ThePEG/PDF/PDFBase.h"
#include "ThePEG/Utilities/Maths.h"
+#include "NucleonFormFactor.h"
namespace ThePEG {
/**
* The NuclearPhotonPDF class implements the PDF for the radiation of a photon from a heavy ion.
*
* @see \ref NuclearPhotonPDFInterfaces "The interfaces"
* defined for NuclearPhotonPDF.
*/
class NuclearPhotonPDF: public PDFBase {
public:
/**
* The default constructor.
*/
NuclearPhotonPDF();
public:
/** @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 = 0.0*GeV2) 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 = 0.0*GeV2) 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:
-
- /**
- * Extract the mass and atomic number for the nuclear PDG code
- */
- pair<int,int> massAndZ(long pid) const {
- pair<int,int> output;
- output.first = (abs(pid)%10000)/10;
- output.second = (abs(pid)%10000000)/10000;
- return output;
- }
-
- /**
- * Dipole form factor
- */
- double dipoleFormFactor(Energy2 q2) const {
- return Math::powi((1 + q2/q02_),-2);
- }
-
- /**
- * Convolution of hard sphere and Yukaw for heavy nuclei
- */
- double heavyFormFactor(Energy2 q2, Length R) const {
- double Rq = sqrt(q2)*R/hbarc;
- return 3./pow(Rq,3)*(sin(Rq)-Rq*cos(Rq))/(1.+sqr(yukawaRange_/hbarc)*q2);
- }
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.
*/
NuclearPhotonPDF & operator=(const NuclearPhotonPDF &) = delete;
private:
/**
* Minimum \f$Q^2\f$ for the photon
*/
Energy2 q2Min_;
/**
* Maximum \f$Q^2\f$ for the photon
*/
Energy2 q2Max_;
/**
- * Range of the Yukawa potential
+ * The form factor
*/
- Length yukawaRange_;
-
- /**
- * Prefactor for the nucleur radius \f$R_A=aA^{\frac13}\f$
- */
- Length aFact_;
-
- /**
- * Fitted scale \f$Q{_0}{^2}=0.71GeV^2\f$ for the dipole form factor
- */
- Energy2 q02_;
-
+ NucleonFormFactorPtr form_;
};
}
#endif /* ThePEG_NuclearPhotonPDF_H */
diff --git a/PDF/NucleonFormFactor.cc b/PDF/NucleonFormFactor.cc
new file mode 100644
--- /dev/null
+++ b/PDF/NucleonFormFactor.cc
@@ -0,0 +1,25 @@
+// -*- C++ -*-
+//
+// This is the implementation of the non-inlined, non-templated member
+// functions of the NucleonFormFactor class.
+//
+
+#include "NucleonFormFactor.h"
+#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/Repository/EventGenerator.h"
+#include "ThePEG/Utilities/DescribeClass.h"
+
+using namespace ThePEG;
+
+// The following static variable is needed for the type
+// description system in ThePEG.
+DescribeAbstractNoPIOClass<NucleonFormFactor,Interfaced>
+describeThePEGNucleonFormFactor("ThePEG::NucleonFormFactor", "NucleonFormFactor.so");
+
+void NucleonFormFactor::Init() {
+
+ static ClassDocumentation<NucleonFormFactor> documentation
+ ("The NucleonFormFactor class provides a base class for the impelmentation of nucleon form-factors");
+
+}
+
diff --git a/PDF/NucleonFormFactor.fh b/PDF/NucleonFormFactor.fh
new file mode 100644
--- /dev/null
+++ b/PDF/NucleonFormFactor.fh
@@ -0,0 +1,18 @@
+// -*- C++ -*-
+//
+// This is the forward declaration of the NucleonFormFactor class.
+//
+#ifndef ThePEG_NucleonFormFactor_FH
+#define ThePEG_NucleonFormFactor_FH
+
+#include "ThePEG/Config/ThePEG.h"
+
+namespace ThePEG {
+
+class NucleonFormFactor;
+
+ThePEG_DECLARE_POINTERS(ThePEG::NucleonFormFactor,NucleonFormFactorPtr);
+
+}
+
+#endif
diff --git a/PDF/NucleonFormFactor.h b/PDF/NucleonFormFactor.h
new file mode 100644
--- /dev/null
+++ b/PDF/NucleonFormFactor.h
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+#ifndef ThePEG_NucleonFormFactor_H
+#define ThePEG_NucleonFormFactor_H
+//
+// This is the declaration of the NucleonFormFactor class.
+//
+
+#include "ThePEG/Interface/Interfaced.h"
+#include "NucleonFormFactor.fh"
+
+namespace ThePEG {
+
+/**
+ * The documentation of the NucleonFormFactor class provides a base class for the implementation of nucleon form factors,
+ * for use in the calculation of exclusive processes
+ *
+ * @see \ref NucleonFormFactorInterfaces "The interfaces"
+ * defined for NucleonFormFactor.
+ */
+class NucleonFormFactor: public Interfaced {
+
+public :
+
+ /**
+ * Return the form factor
+ * @param q2 the scale
+ * @param nucleon The nucleon
+ */
+ virtual Complex formFactor(tcPDPtr nucleon, Energy2 q2) const = 0;
+
+public:
+
+ /**
+ * 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();
+
+private:
+
+ /**
+ * The assignment operator is private and must never be called.
+ * In fact, it should not even be implemented.
+ */
+ NucleonFormFactor & operator=(const NucleonFormFactor &) = delete;
+
+};
+
+}
+
+#endif /* ThePEG_NucleonFormFactor_H */

File Metadata

Mime Type
text/x-diff
Expires
Sat, May 3, 6:46 AM (22 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4983132
Default Alt Text
(28 KB)

Event Timeline