Page MenuHomeHEPForge

No OneTemporary

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: dynnlo-v1.5-applgrid/makefile
===================================================================
--- dynnlo-v1.5-applgrid/makefile (revision 0)
+++ dynnlo-v1.5-applgrid/makefile (revision 1338)
@@ -0,0 +1,200 @@
+#-----------------------------------------------------------------------------
+# Replace this with the location of LHAPDF on your system (if desired)
+##LHAPDFLIB = /home/ferrera/lhapdf-5.8.5/lib/
+LHAPDFLIB = $(shell lhapdf-config --libdir)
+#/Users/grazzini/lhapdf/lib
+
+DYNNLOHOME = $(PWD)
+SOURCEDIR = $(PWD)/src
+VPATH = $(DIRS)
+BIN = $(DYNNLOHOME)/bin
+INCPATH = $(SOURCEDIR)/Inc
+OUTPUT_OPTION = -o $(DYNNLOHOME)/obj/$@
+
+# NATIVE -- DYNNLO internal routines
+# LHAPDF -- Les Houches library
+PDFROUTINES = LHAPDF
+
+#FC = ifort -O3 -I$(INCPATH)
+FC = gfortran -fno-automatic -fno-f2c -O1 -I$(INCPATH)
+
+#P.S. applgrid interface
+CXX=g++
+CXXFLAGS=-O1
+
+
+DIRS = $(DYNNLOHOME):\
+ $(DYNNLOHOME)/obj:\
+ $(SOURCEDIR)/User:$(SOURCEDIR)/Matrix:\
+ $(SOURCEDIR)/Need:$(SOURCEDIR)/Phase:\
+ $(SOURCEDIR)/Integrate:\
+
+# -----------------------------------------------------------------------------
+# Specify the object files.
+
+
+MATRIXFILES = \
+hjetfill.o \
+qqb_w.o \
+qqb_w_g.o \
+qqb_z.o \
+qqb_z_g.o \
+qqb_w2jet.o \
+qqb_w1jet_gs.o \
+qqb_w_gvec.o \
+qqb_z2jet.o \
+qqb_z1jet_gs.o \
+qqb_z1jet.o \
+qqb_z_gvec.o \
+aqqb_zbb.o \
+ampqqb_qqb.o \
+w2jetsq.o \
+z2jetsq.o \
+subqcd.o \
+storecsz.o \
+qqb_w1jet_v.o \
+qqb_z1jet_z.o \
+qqb_z1jet_v.o \
+qqb_w1jet_z.o \
+virt5.o \
+A5NLO.o \
+A51.o \
+A52.o \
+i3m.o \
+
+
+
+INTEGRATEFILES = \
+vegas.o \
+mbook.o \
+ran0.o \
+ran1.o \
+
+
+
+
+NEEDFILES = \
+boost.o \
+branch.o \
+ckmfill.o \
+coupling.o \
+couplz.o \
+dipoles.o \
+dipoles_fac.o \
+dipolesub.o \
+dot.o \
+dotem.o \
+getptildejet.o \
+gtperp.o \
+higgsp.o \
+higgsw.o \
+histofinLH.o \
+includedipole.o \
+lowintHst.o \
+lowint_incldip.o \
+masscuts.o \
+dynnlo.o \
+dyinit.o \
+hexit.o \
+integrate.o \
+ptyrap.o \
+r.o \
+setup.o \
+realint.o \
+realvirt2.o \
+countDYnew.o \
+myli2.o \
+myli3new.o \
+sethparams.o \
+smalls.o \
+spinork.o \
+spinoru.o \
+storedip.o \
+storeptilde.o \
+strcat.o \
+swapjet.o \
+transform.o \
+virtint.o \
+writeinfo.o \
+zeromsq.o \
+besselkfast.o \
+integration.o \
+isolation.o \
+ddilog.o \
+alfamz.o \
+newton1.o \
+lnrat.o \
+lfunctions.o \
+dclaus.o \
+a06.o \
+a09.o \
+scaleset.o \
+
+PHASEFILES = \
+gen2.o \
+gen3.o \
+gen4MIO.o \
+gen4h.o \
+genBORN2.o \
+genBORN4.o \
+phase3.o \
+phase4.o \
+phi1_2new.o \
+phi1_2m.o \
+phi3m0.o \
+breitw.o \
+gen6hp.o \
+phase6h.o \
+phi1_2h.o \
+
+
+
+USERFILES = \
+deltarj.o \
+genclust2.o \
+genclust_kt.o \
+genclust_cone.o \
+cuts.o \
+getet.o \
+mdata.o \
+miscclust.o \
+plotter.o \
+
+# P.S. applgrid interface
+USERFILES += gridwrap.o
+
+LIBDIR=.
+LIBFLAGS=
+
+ifeq ($(PDFROUTINES),LHAPDF)
+ PDFFILES += \
+ pdf_lhapdf.o \
+ pdfset_lhapdf.o
+ LIBDIR += -L$(LHAPDFLIB)
+ LIBFLAGS += -lLHAPDF
+ PDFMSG=' ----> DYNNLO compiled with LHAPDF routines <----'
+else
+ifeq ($(PDFROUTINES),NATIVE)
+ PDFFILES += \
+ pdf.o \
+ pdfset.o
+ PDFMSG=' ----> DYNNLO compiled with its own PDFs <----'
+endif
+endif
+
+CODE = $(NEEDFILES) $(PHASEFILES) \
+ $(USERFILES) $(MATRIXFILES) $(INTEGRATEFILES) $(PDFFILES) \
+
+%.o: %.cxx
+ $(CXX) -c $(CXXFLAGS) -o obj/$@ $<
+
+
+dynnlo: $(CODE)
+ $(FC) $(FFLAGS) $(LDFLAGS) -L$(LIBDIR) -o $@ \
+ $(patsubst %,obj/%,$(CODE)) $(LIBFLAGS)
+ mv dynnlo bin/
+ @echo $(PDFMSG)
+
+# -----------------------------------------------------------------------------
+
+
Index: dynnlo-v1.5-applgrid/doc/dynnlo-v1.3.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: dynnlo-v1.5-applgrid/doc/dynnlo-v1.3.pdf
===================================================================
--- dynnlo-v1.5-applgrid/doc/dynnlo-v1.3.pdf (revision 1337)
+++ dynnlo-v1.5-applgrid/doc/dynnlo-v1.3.pdf (revision 1338)
Property changes on: dynnlo-v1.5-applgrid/doc/dynnlo-v1.3.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: dynnlo-v1.5-applgrid/doc/dynnlo-v1.4.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: dynnlo-v1.5-applgrid/doc/dynnlo-v1.4.pdf
===================================================================
--- dynnlo-v1.5-applgrid/doc/dynnlo-v1.4.pdf (revision 1337)
+++ dynnlo-v1.5-applgrid/doc/dynnlo-v1.4.pdf (revision 1338)
Property changes on: dynnlo-v1.5-applgrid/doc/dynnlo-v1.4.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: dynnlo-v1.5-applgrid/doc/dynnlo-v1.4.tex
===================================================================
--- dynnlo-v1.5-applgrid/doc/dynnlo-v1.4.tex (revision 0)
+++ dynnlo-v1.5-applgrid/doc/dynnlo-v1.4.tex (revision 1338)
@@ -0,0 +1,398 @@
+\documentclass[12pt]{article}
+\usepackage{latexsym}
+\usepackage{amssymb}
+
+\textwidth=6.25in
+\textheight=10.1in
+\voffset=-1in
+\hoffset=-0.5in
+\oddsidemargin=0.5in
+
+\def\ltap{\raisebox{-.6ex}{\rlap{$\,\sim\,$}} \raisebox{.4ex}{$\,<\,$}}
+\def\gtap{\raisebox{-.6ex}{\rlap{$\,\sim\,$}} \raisebox{.4ex}{$\,>\,$}}
+\newcommand\as{\alpha_{\mathrm{S}}}
+
+\begin{document}
+
+\vspace{35mm}~\\
+\begin{center}
+{\Large \bf { DYNNLO} version 1.4}
+\end{center}
+\par \vspace{2mm}
+\begin{center}
+
+
+\vspace{12mm}
+
+
+
+\begin{quote}
+\pretolerance 10000
+
+This is a note about the {\tt DYNNLO} program.
+{\tt DYNNLO} is a parton level Monte Carlo program
+that computes the cross section for
+vector-boson production in $pp$ and $p{\bar p}$ collisions.
+The calculation is performed
+up to NNLO in QCD perturbation theory.
+The program includes $\gamma-Z$ interference, finite-width effects, the
+leptonic decay of the vector boson and the corresponding spin correlations.
+The user is allowed to apply arbitrary (though infrared safe) cuts on the final state and to plot the corresponding distributions in the form of bin histograms.
+If you use this program, please quote
+Ref.~\cite{Catani:2009sm}.
+
+
+\end{quote}
+\end{center}
+
+\vspace{7mm}
+
+\section{Introduction}
+
+The {\tt DYNNLO}
+program is based on an extension of the subtraction formalism to NNLO,
+as described in Ref.~\cite{Catani:2009sm}.
+
+The calculation is organized in two parts. In the first part (virtual), the contribution of the regularized virtual corrections (up to two-loop order) is computed.
+In the second part (real), the cross section for the production of
+the vector boson in association with (at least) one jet is first evaluated up to NLO (i.e. up to ${\cal O}(\as^2)$).
+This step of the calculation can be performed with any available version of the subtraction method.
+Here we use the dipole formalism \cite{Catani:1996jh}, as implemented in the MCFM Monte Carlo program \cite{mcfm}.
+Since the $V+{\rm jet}$ cross section is divergent when the transverse momentum $q_T$ of
+the vector boson becomes small, a suitable counterterm must be subtracted
+to make the result finite as $q_T\to 0$.
+The program uses the counterterm introduced in
+the second paper of Ref.~\cite{Catani:2009sm},
+and thus it completes the evaluation of the real part.
+Finally, the two contributions (virtual and real) are combined to obtain the full cross section.
+
+In the present version of the code, the evaluation of the subtraction counterterm is made substantially faster than before.
+
+The program can be downloaded from {\tt http://theory.fi.infn.it/grazzini}.
+To extract it, simply use {\tt tar -xzvf dynnlo-v1.3.tgz} and the
+{\tt dynnlo-v1.3} directory will be created.
+The structure of the directory is
+\begin{itemize}
+\item {\tt bin}: The directory containing the executable {\tt dynnlo} and the input and output files.
+\item {\tt doc}: The directory containing this note.
+\item {\tt obj}: The directory containing the object files.
+\item {\tt src}: The directory containing the source of the code.
+\end{itemize}
+
+\section{Input parameters}
+
+
+In our calculation, the $W$ and $Z$ bosons are
+treated off shell, thus including
+finite-width effects, and their leptonic decay retains the corresponding spin
+correlations. The mass and total width of the $W$ boson
+are $m_W = 80.385$~GeV and $\Gamma_W=2.085$~GeV.
+The mass and total width of the $Z$ boson are $m_Z=91.1876$~GeV
+and $\Gamma_Z=2.4952$~GeV.
+As for the electroweak couplings, we use the so
+called $G_\mu$ scheme, where the input parameters are $G_F$ , $m_Z$, $m_W$.
+The Fermi constant is set
+to the value $G_F = 1.1663787\times 10^{-5}$~GeV$^{-2}$, and we use the following
+(unitarity constrained) values of the CKM matrix elements:
+$V_{ud}=0.97427$, $V_{us}=0.2253$, $V_{ub}=0.00351$,
+$V_{cd}=0.2252$, $V_{cs}=0.97344$, $V_{cb}=0.0412$. All these values of
+EW parameters are taken from the PDG 2012
+\cite{Beringer:1900zz}. The EW couplings of the $W$ and $Z$ bosons
+to quarks and leptons
+are treated at the tree level, so that the above parameters are sufficient to
+fully specify the EW content of our calculation.
+
+\section{Implementation of cuts}
+
+Before compiling the program, the user must choose the cuts
+to apply on the final state.
+This is done through the {\tt cuts} and {\tt isolation} functions.
+The default version of the function {\tt cuts} contains selection cuts that are typically used
+in the experimental analysis.
+In the default version, the lines of the code implementing the various cuts
+are all commented, thus the program will return the total cross section for
+the selected process
+in the narrow width approximation.
+To take into account finite width effect the logical variable {\tt zerowidth}
+should be set to {\tt false} in the input file
+\footnote{Note that with {\tt zerowidth=.false.} a hard scale must be
+set, to have a cross
+section that is computable in QCD perturbation theory.
+The hard scale is set by applying cuts on the leptons. These cuts must
+necessarily enforce a lower limit on the invariant mass of the vector boson
+(lepton pair), and
+the mass scale of this lower limit
+%this lower limit
+must be in the perturbative region.}.
+To activate the various cuts the user must uncomment the corresponding lines in {\tt cuts.f}.
+Lepton isolation can be implemented by switching to {\tt true}
+the logical variable {\tt isol}.
+The parameters to define the isolation procedure are set in the {\tt isolation} function.
+The program makes possible the identification of final-state jets, in addition
+to the leptons.
+Jets \cite{ktalg} are reconstructed according to the $k_T$ algorithm with $R=0.4$.
+Different jet algorithms (as the $anti$-$k_T$ or the $cone$) and different
+values of $R$ can be implemented by modifying the {\tt setup} subroutine.
+
+The files {\tt cuts.f} and {\tt isolation.f} can be found in
+the {\tt /src/User} directory. The {\tt setup.f} source file can be found in the {\tt /src/Need} directory.
+
+
+\section{Compilation}
+
+The program is self-contained and it has been successfully
+tested on Linux and Mac-OS X environments.
+To compile the code, descend in the {\tt dynnlo} directory and simply type
+\begin{itemize}
+\item {\tt make}
+\end{itemize}
+To run it go in the {\tt bin} directory and type:
+\begin{itemize}
+\item {\tt dynnlo < infile}
+\end{itemize}
+
+\section{The input file}
+
+This is a typical example of input file:
+\vspace*{.2cm}\\
+\begin{tt}
+\noindent
+\phantom{~}8d3~~~~~~~~~~~~~~~! sroot\\
+\phantom{~}1 1~~~~~~~~~~~~~~~! ih1, ih2 \\
+\phantom{~}1~~~~~~~~~~~~~~~~~! nproc \\
+\phantom{~}80.385d0 80.385d0 ! mur, muf\\
+\phantom{~}2~~~~~~~~~~~~~~~~~! order\\
+\phantom{~}'tota'~~~~~~~~~~~~! part\\
+\phantom{~}.false.~~~~~~~~~~~! zerowidth\\
+\phantom{~}50d0 7d3~~~~~~~~~~! mwmin, mwmax\\
+\phantom{~}15 8000000~~~~~~~~! itmx1, ncall1\\
+\phantom{~}30 8000000~~~~~~~~! itmx2, ncall2\\
+\phantom{~}617~~~~~~~~~~~~~~~! rseed\\
+\phantom{~}92 0~~~~~~~~~~~~~~! set, member (native PDFs)\\
+\phantom{~}'MSTW2008lo68cl.LHgrid' 0 ! set, member (LHAPDFs) \\
+\phantom{~}'nnlo'~~~~~~~~~~~~! runstring\\
+\end{tt}
+\vspace*{-.2cm}
+\begin{itemize}
+\item {\tt sroot}: Double precision variable for centre--of--mass energy (GeV).
+\item {\tt ih1,ih2}: Integers identifying the beam (proton=1, antiproton=-1).
+\item {\tt nproc}: Integer identifying the process: $W^+\to l^+\nu$ ({\tt nproc=1}), $W^-\to l^- {\bar \nu}$ ({\tt nproc=2}), $Z/\gamma^*\to l^+ l^-$ ({\tt nproc=3}).
+\item {\tt mur, muf}: Renormalization ($\mu_R$)
+and factorization ($\mu_F$)
+scales (GeV): can be be different from each other but always of the order
+of $m_W$ or $m_Z$
+(or $m_{l\nu}$ and $m_{ll}$ if these invariant masses are very different from
+$m_W$ and $m_Z$). By switching to {\tt true} the logical variable
+{\tt dynamicscale} in the {\tt setup} subroutine, $\mu_R$ and $\mu_F$ are
+set equal to $m_{l\nu}$ or $m_{ll}$.
+
+\item {\tt order}: Integer setting the order of the calculation: LO (0), NLO (1), NNLO (2).
+\item {\tt part}: String identifying the part of the calculation to be performed: {\tt virt} for virtual contribution, {\tt real} for real contribution, {\tt tota} for the complete calculation.
+\item {\tt itmx1, ncall1}: Number of iterations and calls to VEGAS for setting the grid.
+\item {\tt zerowidth}: When this logical variable is set to {\tt true} the vector bosons are produced on-shell.
+To take into account finite width effect this variable should be set to {\tt false}.
+\item {\tt mwmin, mwmax}: Lower and higher limit on the vector boson (lepton pair) invariant mass.
+\item {\tt itmx2, ncall2}: Number of iterations and calls to VEGAS for the main run.
+\item {\tt rseed}: Random number seed.
+\item {\tt iset, nset}: Integers identifying respectively the PDF set chosen and the member for PDF errors
+(if the native PDF interface is used). A list of available PDFs is given below.
+\item {\tt PDFname, PDFmember}: String identifying the PDF set chosen and integer identifying the member for PDF
+errors (if the LHAPDF interface is used).
+\item {\tt runstring}: String for grid and output files.
+\end{itemize}
+
+
+
+\section{Output}
+
+At the end of the run, the program returns the cross section and its error.
+The program also writes an output file in the topdrawer format
+containing the required histograms with an estimate of the corresponding
+statistical errors. During the run, the user can control
+the intermediate results.
+The plots are defined in the file {\tt /src/User/plotter.f}.
+The user can easily modify this subroutine according to his/her needs.
+
+The NLO computation of a cross section with accuracy at the percent level typically
+requires a few hours of run on a standard PC (say a Pentium 4 at 3 GHz).
+At NNLO the required run time is between one and two days.
+To obtain smooth distributions, this estimated run time
+should be multiplied by a factor of two.
+
+
+\section{Parton distributions}
+
+The {\tt DYNNLO} program can be compiled with its own Parton Distribution
+Functions (PDF) interface (set {\tt PDFROUTINES = NATIVE}~ in the
+{\tt makefile})
+or with the LHAPDF interface
+(set {\tt PDFROUTINES = LHAPDF} ~in the {\tt makefile}).
+We point out that the value of $\alpha_S(m_Z)$ is not adjustable; it is hard-wired with the
+value of $\alpha_S(m_Z)$ in the parton distributions.
+Moreover, the choice of the parton distributions also specifies
+the number of loops that should be used in the running of $\alpha_S$.
+A list of available parton densities for the native PDF interface is given
+in Table 1.
+
+When dealing with PDF uncertainties,
+the {\tt nset} variable is used to distinguish the PDF grids corresponding
+to different eigenvectors.
+When CTEQ6.6M partons are used, {\tt nset} varies in the range {\tt nset=0,44}.
+When NNPDF2.0\_100 partons are used, {\tt nset} varies in the range {\tt nset=0,100}.
+When MSTW2008 partons are used, {\tt nset} varies in the range {\tt nset=0,40} and the uncertainties we consider are those at 68\% CL.
+When GJR08VF NLO or JR09VF NNLO partons are used, the {\tt nset} variable should
+be in the range {\tt nset=-13,13}.
+For A06 (ABKM09) NNLO partons, the variable {\tt nset}
+should vary in the range {\tt nset=0,23} ({\tt nset=0,25}).
+The default choice is {\tt nset=0}, corresponding to the central set.
+The variable {\tt nset} is dummy when other PDF sets are used.
+
+\section{From version 1.1 to version 1.2}
+
+The main change done in version 1.2 with respect to version 1.1 is that the evaluation of the subtraction counterterm is made substantially faster. As a consequence, the speed of the code improves by at least a factor $1.5$. A minor bug has been corrected in the dynamic scale settings, whose effect is however negligible.
+
+\section{From version 1.2 to version 1.3}
+
+The only change done in version 1.3 with respect to version 1.2 is that a bug affecting the program when running with {\tt dynamicscale=.false.} has been fixed.
+
+
+\section{From version 1.3 to version 1.4}
+
+In version 1.4 some refinements in the subtraction procedure have been
+implemented and two bugs affecting the real and the virtual contribution has been fixed.
+
+
+\begin{table}[h]
+\begin{center}
+\begin{tabular}{|c|l|c|}
+\hline
+{\tt iset} & Pdf set &$\as(M_Z)$\\
+\hline
+\hline
+1 & CTEQ4 LO & 0.132\\
+2 &CTEQ4 Standard NLO & 0.116\\
+\hline
+11 & MRST98 NLO central gluon & 0.1175\\
+12 & MRST98 NLO higher gluon & 0.1175\\
+13 & MRST98 NLO lower gluon & 0.1175\\
+14 & MRST98 NLO lower $\as$ & 0.1125\\
+15 & MRST98 NLO higher $\as$ & 0.1225\\
+16 & MRST98 LO & 0.125\\
+\hline
+21 & CTEQ5M NLO Standard Msbar & 0.118\\
+22 & CTEQ5D NLO DIS & 0.118\\
+23 & CTEQ5L LO & 0.127\\
+24 & CTEQ5HJ NLO Large-x gluon enhanced& 0.118\\
+25 & CTEQ5HQ NLO Heavy Quark & 0.118\\
+28 & CTEQ5M1 NLO Improved & 0.118\\
+29 & CTEQ5HQ1 NLO Improved & 0.118\\
+\hline
+30 & MRST99 NLO & 0.1175\\
+31 & MRST99 higher gluon & 0.1175 \\
+32 & MRST99 lower gluon & 0.1175 \\
+33 & MRST99 lower $\as$ & 0.1125 \\
+34 & MRST99 higher $\as$ & 0.1225 \\
+\hline
+41 & MRST2001 NLO central gluon & 0.119\\
+42 & MRST2001 NLO lower $\as$ & 0.117\\
+43 & MRST2001 NLO higher $\as$ & 0.121\\
+44 & MRST2001 NLO better fit to jet data & 0.121\\
+45 & MRST2001 NNLO & 0.1155\\
+46 & MRST2001 NNLO fast evolution & 0.1155\\
+47 & MRST2001 NNLO slow evolution & 0.1155\\
+48 & MRST2001 NNLO better fit to jet data & 0.1180\\
+\hline
+51 & CTEQ6L LO & 0.118 \\
+52 & CTEQ6L1 LO & 0.130 \\
+53 & CTEQ6M NLO & 0.118 \\
+\hline
+55 & CTEQ6.6M NLO & 0.118 \\
+\hline
+49 & MRST2002 LO & 0.130 \\
+61 & MRST2002 NLO & 0.1197 \\
+62 &MRST2002 NNLO & 0.1154 \\
+\hline
+65 & GJR08VF LO & 0.1263 \\
+66 & GJR08VF NLO & 0.1145 \\
+67 & JR09VF NNLO & 0.1124 \\
+\hline
+71 & MRST2004 NLO & 0.1205 \\
+72 & MRST2004 NNLO & 0.1167 \\
+\hline
+75 & A06 NNLO & 0.1128 \\
+\hline
+80 & NNPDF2.0\_100 NLO & 0.1190 \\
+\hline
+85 & ABKM09 NNLO & 0.1129 \\
+\hline
+90 & MSTW2008 LO & 0.13939 \\
+91 & MSTW2008 NLO & 0.12018 \\
+92 & MSTW2008 NNLO & 0.11707 \\
+\hline
+\end{tabular}
+\end{center}
+\caption{Available pdf sets and their corresponding {\tt iset} and values of
+$\alpha_S(M_Z)$.}
+\label{pdlabel}
+\end{table}
+
+\begin{thebibliography}{99}
+
+%\cite{Catani:2009sm}
+\bibitem{Catani:2009sm}
+ S.~Catani, L.~Cieri, G.~Ferrera, D.~de Florian and M.~Grazzini,
+ %``Vector boson production at hadron colliders: a fully exclusive QCD
+ %calculation at NNLO,''
+ Phys.\ Rev.\ Lett.\ {\bf 103} (2009) 082001;
+%[arXiv:0903.2120 [hep-ph]].
+%%CITATION = PRLTA,103,082001;%%
+%\cite{Catani:2007vq}
+%\bibitem{Catani:2007vq}
+ S.~Catani and M.~Grazzini,
+ %``An NNLO subtraction formalism in hadron collisions and its application to
+ %Higgs boson production at the LHC,''
+ Phys.\ Rev.\ Lett.\ {\bf 98} (2007) 222002.
+%[arXiv:hep-ph/0703012].
+%%CITATION = PRLTA,98,222002;%%
+
+%\cite{Beringer:1900zz}
+\bibitem{Beringer:1900zz}
+ J.~Beringer {\it et al.} [Particle Data Group Collaboration],
+ %``Review of Particle Physics (RPP),''
+ Phys.\ Rev.\ D {\bf 86} (2012) 010001.
+ %%CITATION = PHRVA,D86,010001;%%
+ %2030 citations counted in INSPIRE as of 22 Aug 2013
+
+
+
+\bibitem{Catani:1996jh}
+ S.~Catani and M.~H.~Seymour,
+ %``The Dipole Formalism for the Calculation of QCD Jet Cross Sections at
+ %Next-to-Leading Order,''
+ Phys.\ Lett.\ B {\bf 378} (1996) 287,
+%[arXiv:hep-ph/9602277].
+%%CITATION = PHLTA,B378,287;%%
+Nucl.\ Phys.\ B {\bf 485} (1997) 291
+[Erratum-ibid.\ B {\bf 510} (1998) 503].
+%%CITATION = NUPHA,B485,291;%%
+\bibitem{mcfm}
+J.~Campbell, R.K.~Ellis, {\em MCFM - Monte Carlo for FeMtobarn processes}, {\tt http://mcfm.fnal.gov}
+
+\bibitem{ktalg}
+%\cite{Catani:1993hr}
+%\bibitem{Catani:1993hr}
+ S.~Catani, Y.~L.~Dokshitzer, M.~H.~Seymour and B.~R.~Webber,
+ %``Longitudinally invariant $K_t$ clustering algorithms for hadron hadron
+ %collisions,''
+ Nucl.\ Phys.\ B {\bf 406} (1993) 187;
+ %%CITATION = NUPHA,B406,187;%%
+%\cite{Ellis:1993tq}
+%\bibitem{Ellis:1993tq}
+ S.~D.~Ellis and D.~E.~Soper,
+ %``Successive combination jet algorithm for hadron collisions,''
+ Phys.\ Rev.\ D {\bf 48} (1993) 3160.
+ %[arXiv:hep-ph/9305266].
+ %%CITATION = PHRVA,D48,3160;%%
+
+\end{thebibliography}
+\end{document}
Index: dynnlo-v1.5-applgrid/src/Integrate/ebook.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Integrate/ebook.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Integrate/ebook.f (revision 1338)
@@ -0,0 +1,239 @@
+c--- MBOOK-style routines that are supposed to create corresponding
+c--- histograms for each of the error PDF's, when requested in nplotter
+
+c--- These are the MBOOK common blocks
+c DOUBLE PRECISION HIST(100,100),XHIS(100,100),HDEL(100),HMIN(100)
+c &,HMAX(100),HAVG(100),HINT(100),HSIG(100)
+c COMMON/HISTOR/HIST,XHIS,HDEL,HMIN,HMAX,HAVG,HINT,HSIG
+c CHARACTER TITLE*100,BOOK*3
+c COMMON/HISTOC/BOOK(100),TITLE(100)
+c INTEGER NBIN(100),IHIS(100,100),IUSCORE(100),IOSCORE(100),
+c & IENT(100),NHIST
+c COMMON/HISTOI/NBIN,IHIS,IUSCORE,IOSCORE,IENT,NHIST
+
+
+c--- This is the EBOOK common block - note that most entries are not
+c--- present here, to save on storage space. The maximum number of
+c--- histograms that may be calculated with errors is 4 and the
+c--- maximum number of PDF error sets is 40
+c COMMON/EHISTO/HIST(4,40,100),HISTOMATCH(100),COUNTHISTO
+
+ block data einitialize
+ COMMON/EHISTO/EHIST,IHISTOMATCH,ICOUNTHISTO
+ double precision EHIST(4,40,100)
+ integer IHISTOMATCH(100),ICOUNTHISTO
+ data IHISTOMATCH/100*0/,ICOUNTHISTO/0/
+ end
+
+c--- sets up the histogram
+ subroutine ebook(N)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ double precision EHIST(4,40,100)
+ integer IHISTOMATCH(100),ICOUNTHISTO
+c--- This is the MBOOK common block
+ include 'histo.f'
+c--- This is the EBOOK common block - note that most entries are not
+c--- present here, to save on storage space. The maximum number of
+c--- histograms that may be calculated with errors is 4 and the
+c--- maximum number of PDF error sets is 40
+ COMMON/EHISTO/EHIST,IHISTOMATCH,ICOUNTHISTO
+
+ ICOUNTHISTO=ICOUNTHISTO+1
+
+ if (ICOUNTHISTO .GT. 4) then
+ write(6,*) 'Only 4 histograms with errors allowed!'
+ stop
+ endif
+
+ IHISTOMATCH(N)=ICOUNTHISTO
+
+ DO I=1,NBIN(N)
+ DO J=1,40
+ EHIST(ICOUNTHISTO,J,I)=0d0
+ ENDDO
+ ENDDO
+
+ return
+ end
+
+ SUBROUTINE efill(N,X,Y)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'PDFerrors.f'
+ double precision EHIST(4,40,100)
+ integer IHISTOMATCH(100),ICOUNTHISTO
+c--- This is the MBOOK common block
+ include 'histo.f'
+c--- This is the EBOOK common block - note that most entries are not
+c--- present here, to save on storage space. The maximum number of
+c--- histograms that may be calculated with errors is 4 and the
+c--- maximum number of PDF error sets is 40
+ COMMON/EHISTO/EHIST,IHISTOMATCH,ICOUNTHISTO
+ I=INT((X-HMIN(N))/HDEL(N)+1D0)
+ IF(I.GT.0.AND.I.LE.NBIN(N)) THEN
+ NMATCH=IHISTOMATCH(N)
+
+ DO J=1,maxPDFsets
+ EHIST(NMATCH,J,I)=EHIST(NMATCH,J,I)
+ . +PDFwgt(J)/hdel(n)
+ ENDDO
+c we are renormalising the weights by the bin width
+ ENDIF
+
+ return
+ end
+
+
+ SUBROUTINE etop(N,M,BTIT,LTIT,SCALE)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'PDFerrors.f'
+ double precision EHIST(4,40,100)
+ integer IHISTOMATCH(100),ICOUNTHISTO
+ CHARACTER*(*) LTIT,BTIT,SCALE
+c--- This is the MBOOK common block
+ include 'histo.f'
+c--- This is the EBOOK common block - note that most entries are not
+c--- present here, to save on storage space. The maximum number of
+c--- histograms that may be calculated with errors is 4 and the
+c--- maximum number of PDF error sets is 40
+ COMMON/EHISTO/EHIST,IHISTOMATCH,ICOUNTHISTO
+
+ IF(BOOK(N).NE.'YES') RETURN
+
+ NMATCH=IHISTOMATCH(N)
+
+c--- loop over all PDF sets
+ DO K=1,maxPDFsets
+
+ WRITE(97,100) TITLE(N),BTIT,LTIT,SCALE,HMIN(N),HMAX(N)
+ 100 FORMAT( /1x,
+ &' SET WINDOW Y 2.5 TO 7.'/,1X,
+ &' SET WINDOW X 2.5 TO 10.'/,1X,
+ &' SET SYMBOL 5O SIZE 1.8'/,1X,
+ &' TITLE TOP ','"',A50,'"',/1X,
+ &' TITLE BOTTOM ','"',A50,'"',/1X,
+ &' TITLE LEFT ','"',A50,'"',/1X,
+ &' SET SCALE Y ',A5,/1X,
+ &' (SET TICKS TOP OFF) '/1x,
+ &' SET LIMITS X ',F10.5,' ',F10.5,/1X,
+ &' SET ORDER X Y DY ')
+ DO 1 J=1,NBIN(N)
+ IF(EHIST(NMATCH,K,J).EQ.0.) GO TO 1
+ WRITE(97,'(3X,G13.6,2(2X,G13.6))')
+ & XHIS(N,J),EHIST(NMATCH,K,J),0d0
+ 1 CONTINUE
+ WRITE(97,200)
+ 200 FORMAT(' PLOT')
+ WRITE(97,400)
+ 400 FORMAT(' NEW PLOT')
+
+ enddo
+
+ return
+ end
+
+ SUBROUTINE emtop(N,M,BTIT,LTIT,SCALE)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'PDFerrors.f'
+ double precision EHIST(4,40,100),maxhist(100),minhist(100)
+ integer IHISTOMATCH(100),ICOUNTHISTO
+ CHARACTER*(*) LTIT,BTIT,SCALE
+c--- This is the MBOOK common block
+ include 'histo.f'
+c--- This is the EBOOK common block - note that most entries are not
+c--- present here, to save on storage space. The maximum number of
+c--- histograms that may be calculated with errors is 4 and the
+c--- maximum number of PDF error sets is 40
+ COMMON/EHISTO/EHIST,IHISTOMATCH,ICOUNTHISTO
+
+ IF(BOOK(N).NE.'YES') RETURN
+
+c--- this bit writes out the normal plot
+ WRITE(99,100) 'Errors: '//TITLE(N)(1:92),
+ . BTIT,LTIT,SCALE,HMIN(N),HMAX(N)
+ 100 FORMAT( /1x,
+ &' SET WINDOW Y 2.5 TO 7.'/,1X,
+ &' SET WINDOW X 2.5 TO 10.'/,1X,
+ &' SET SYMBOL 5O SIZE 1.8'/,1X,
+ &' TITLE TOP ','"',A50,'"',/1X,
+ &' TITLE BOTTOM ','"',A50,'"',/1X,
+ &' TITLE LEFT ','"',A50,'"',/1X,
+ &' SET SCALE Y ',A5,/1X,
+ &' (SET TICKS TOP OFF) '/1x,
+ &' SET LIMITS X ',F10.5,' ',F10.5,/1X,
+ &' SET ORDER X Y DY ')
+ WRITE(99,200)
+ write(99,*) 'SET COLOR RED'
+ DO J=1,NBIN(N)
+ IF(HIST(N,J).EQ.0.) GO TO 99
+ WRITE(99,'(3X,G13.6,2(2X,G13.6))')
+ & XHIS(N,J),HIST(N,J),HIST(M,J)
+ 99 continue
+ ENDDO
+
+ WRITE(99,200)
+ 200 FORMAT(' PLOT')
+
+c--- this bit writes out the error bounds
+ NMATCH=IHISTOMATCH(N)
+
+c--- loop over all PDF sets
+ DO J=1,NBIN(N)
+ maxhist(J)=HIST(N,J)
+ minhist(J)=HIST(N,J)
+ DO K=1,maxPDFsets
+ IF(EHIST(NMATCH,K,J).ne.0.) then
+ if (EHIST(NMATCH,K,J) .gt. maxhist(j))
+ . maxhist(j)=EHIST(NMATCH,K,J)
+ if (EHIST(NMATCH,K,J) .lt. minhist(j))
+ . minhist(j)=EHIST(NMATCH,K,J)
+ ENDIF
+ ENDDO
+ ENDDO
+
+ 201 FORMAT(' SET ORDER X Y DY')
+
+ write(99,201)
+ write(99,*) 'SET COLOR BLUE'
+ DO J=1,NBIN(N)
+ if (minhist(J) .ne. 0.) then
+ WRITE(99,'(3X,G13.6,2(2X,G13.6))')
+ & XHIS(N,J),minhist(J),0d0
+ endif
+ ENDDO
+ write(99,200)
+
+ write(99,201)
+ DO J=1,NBIN(N)
+ if (maxhist(J) .ne. 0.) then
+ WRITE(99,'(3X,G13.6,2(2X,G13.6))')
+ & XHIS(N,J),maxhist(J),0d0
+ endif
+ ENDDO
+ write(99,200)
+ write(99,*) 'SET COLOR WHITE'
+
+c--- plot statistics, as normal
+ WRITE(99,300) HINT(N),HAVG(N),HSIG(N),IENT(N),IUSCORE(N)
+ & ,IOSCORE(N)
+ 300 FORMAT( /1x,
+ &' BOX 7. 0.75 SIZE 9. 1.5'/,1X,
+ &' SET WINDOW Y 0. TO 2.'/,1X,
+ &' SET TITLE SIZE -1.5'/1X,
+ &' TITLE 2.8 1.2 "INTGRL =',E12.5,' AVGE =',E12.5,
+ & ' RMS =',E12.5,'"',/1X,
+ &' TITLE 2.8 0.8 "Entries =',I9,2x,'U`flow =',I9,2X
+ & ,'O`flow =',I9,'"',/1X,
+ &' SET TITLE SIZE -2')
+
+ WRITE(99,400)
+
+ 400 FORMAT(' NEW PLOT')
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Integrate/rn.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Integrate/rn.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Integrate/rn.f (revision 1338)
@@ -0,0 +1,81 @@
+ function rn(idummy)
+ real*8 rn,ran
+ common/seed/ij,kl
+ save init
+ data init /1/
+
+ if (init.eq.1) then
+ init=0
+ if (ij .eq. 0) then
+ ij=1802
+ kl=9373
+ endif
+ call rmarin(ij,kl)
+ end if
+*
+ 10 call ranmar(ran)
+ if (ran.lt.1d-16) goto 10
+ rn=ran
+*
+ end
+*
+ subroutine ranmar(rvec)
+* -----------------
+* universal random number generator proposed by marsaglia and zaman
+* in report fsu-scri-87-50
+* in this version rvec is a double precision variable.
+ implicit real*8(a-h,o-z)
+ common/ raset1 / ranu(97),ranc,rancd,rancm
+ common/ raset2 / iranmr,jranmr
+ save /raset1/,/raset2/
+ uni = ranu(iranmr) - ranu(jranmr)
+ if(uni .lt. 0d0) uni = uni + 1d0
+ ranu(iranmr) = uni
+ iranmr = iranmr - 1
+ jranmr = jranmr - 1
+ if(iranmr .eq. 0) iranmr = 97
+ if(jranmr .eq. 0) jranmr = 97
+ ranc = ranc - rancd
+ if(ranc .lt. 0d0) ranc = ranc + rancm
+ uni = uni - ranc
+ if(uni .lt. 0d0) uni = uni + 1d0
+ rvec = uni
+ end
+
+ subroutine rmarin(ij,kl)
+* -----------------
+* initializing routine for ranmar, must be called before generating
+* any pseudorandom numbers with ranmar. the input values should be in
+* the ranges 0<=ij<=31328 ; 0<=kl<=30081
+ implicit real*8(a-h,o-z)
+ common/ raset1 / ranu(97),ranc,rancd,rancm
+ common/ raset2 / iranmr,jranmr
+ save /raset1/,/raset2/
+* this shows correspondence between the simplified input seeds ij, kl
+* and the original marsaglia-zaman seeds i,j,k,l.
+* to get the standard values in the marsaglia-zaman paper (i=12,j=34
+* k=56,l=78) put ij=1802, kl=9373
+ i = mod( ij/177 , 177 ) + 2
+ j = mod( ij , 177 ) + 2
+ k = mod( kl/169 , 178 ) + 1
+ l = mod( kl , 169 )
+ do 300 ii = 1 , 97
+ s = 0d0
+ t = .5d0
+ do 200 jj = 1 , 24
+ m = mod( mod(i*j,179)*k , 179 )
+ i = j
+ j = k
+ k = m
+ l = mod( 53*l+1 , 169 )
+ if(mod(l*m,64) .ge. 32) s = s + t
+ t = .5d0*t
+ 200 continue
+ ranu(ii) = s
+ 300 continue
+ ranc = 362436d0 / 16777216d0
+ rancd = 7654321d0 / 16777216d0
+ rancm = 16777213d0 / 16777216d0
+ iranmr = 97
+ jranmr = 33
+ end
Index: dynnlo-v1.5-applgrid/src/Integrate/ran0.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Integrate/ran0.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Integrate/ran0.f (revision 1338)
@@ -0,0 +1,16 @@
+C (C) Copr. 1986-92 Numerical Recipes Software ]2w.1,r1..
+
+ FUNCTION ran0(idum)
+ INTEGER idum,IA,IM,IQ,IR,MASK
+ REAL*8 ran0,AM
+ PARAMETER (IA=16807,IM=2147483647,AM=1d0/IM,IQ=127773,IR=2836,
+ *MASK=123459876)
+ INTEGER k
+ idum=ieor(idum,MASK)
+ k=idum/IQ
+ idum=IA*(idum-k*IQ)-IR*k
+ if (idum.lt.0) idum=idum+IM
+ ran0=AM*idum
+ idum=ieor(idum,MASK)
+ return
+ END
Index: dynnlo-v1.5-applgrid/src/Integrate/ran1.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Integrate/ran1.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Integrate/ran1.f (revision 1338)
@@ -0,0 +1,80 @@
+C (C) Copr. 1986-92 Numerical Recipes Software ]2w.1,r1..
+
+C--- Version where idum is passed as an argument
+ double precision FUNCTION ran1(idum)
+ implicit none
+ INTEGER idum,IA,IM,IQ,IR,NTAB,NDIV
+ double precision AM,EPS,RNMX
+ PARAMETER (IA=16807,IM=2147483647,AM=1d0/IM,IQ=127773,
+ .IR=2836,NTAB=32,NDIV=1+(IM-1)/NTAB,EPS=3d-16,RNMX=1d0-EPS)
+ INTEGER j,k,iv(NTAB),iy
+ DATA iv /NTAB*0/, iy /0/
+ SAVE iv,iy
+
+ if (idum.le.0.or.iy.eq.0) then
+ idum=max(-idum,1)
+ do 11 j=NTAB+8,1,-1
+ k=idum/IQ
+ idum=IA*(idum-k*IQ)-IR*k
+ if (idum.lt.0) idum=idum+IM
+ if (j.le.NTAB) iv(j)=idum
+11 continue
+ iy=iv(1)
+ endif
+ k=idum/IQ
+ idum=IA*(idum-k*IQ)-IR*k
+ if (idum.lt.0) idum=idum+IM
+ j=1+iy/NDIV
+ iy=iv(j)
+ iv(j)=idum
+ ran1=min(AM*dble(iy),RNMX)
+
+c write(6,*) 'idum',idum
+c write(6,*) 'AM=',AM
+c write(6,*) 'iy=',iy
+c write(6,*) 'AM*dble(iy)',AM*dble(iy)
+c write(6,*) 'ran1',ran1
+
+ return
+ end
+
+C (C) Copr. 1986-92 Numerical Recipes Software ]2w.1,r1..
+
+C--- Version where idum is passed via common block
+ double precision FUNCTION ran2()
+ implicit none
+ INTEGER idum,IA,IM,IQ,IR,NTAB,NDIV
+ double precision AM,EPS,RNMX
+ PARAMETER (IA=16807,IM=2147483647,AM=1d0/IM,IQ=127773,
+ .IR=2836,NTAB=32,NDIV=1+(IM-1)/NTAB,EPS=3d-16,RNMX=1d0-EPS)
+ INTEGER j,k,iv(NTAB),iy
+ COMMON /ranno/ idum
+ DATA iv /NTAB*0/, iy /0/
+ SAVE iv,iy
+
+ if (idum.le.0.or.iy.eq.0) then
+ idum=max(-idum,1)
+ do 11 j=NTAB+8,1,-1
+ k=idum/IQ
+ idum=IA*(idum-k*IQ)-IR*k
+ if (idum.lt.0) idum=idum+IM
+ if (j.le.NTAB) iv(j)=idum
+11 continue
+ iy=iv(1)
+ endif
+ k=idum/IQ
+ idum=IA*(idum-k*IQ)-IR*k
+ if (idum.lt.0) idum=idum+IM
+ j=1+iy/NDIV
+ iy=iv(j)
+ iv(j)=idum
+ ran2=min(AM*dble(iy),RNMX)
+
+c write(6,*) 'idum',idum
+c write(6,*) 'AM=',AM
+c write(6,*) 'iy=',iy
+c write(6,*) 'AM*dble(iy)',AM*dble(iy)
+c write(6,*) 'ran2',ran2
+
+ return
+ END
Index: dynnlo-v1.5-applgrid/src/Integrate/lenocc.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Integrate/lenocc.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Integrate/lenocc.f (revision 1338)
@@ -0,0 +1,19 @@
+ FUNCTION LENOCC (CHV)
+C
+C CERN PROGLIB# M507 LENOCC .VERSION KERNFOR 4.21 890323
+C ORIG. March 85, A.Petrilli, re-write 21/02/89, JZ
+C
+C- Find last non-blank character in CHV
+
+ CHARACTER CHV*(*)
+
+ N = LEN(CHV)
+
+ DO 17 JJ= N,1,-1
+ IF (CHV(JJ:JJ).NE.' ') GO TO 99
+ 17 CONTINUE
+ JJ = 0
+
+ 99 LENOCC = JJ
+ RETURN
+ END
Index: dynnlo-v1.5-applgrid/src/Integrate/vegas.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Integrate/vegas.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Integrate/vegas.f (revision 1338)
@@ -0,0 +1,285 @@
+ SUBROUTINE vegasnr(region,ndim,fxn,init,ncall,itmx,nprn,tgral,sd,
+ *chi2a)
+ implicit none
+ include 'mxdim.f'
+ include 'gridinfo.f'
+ include 'maxwt.f'
+ INTEGER init,itmx,ncall,ndim,nprn,NDMX
+ DOUBLE PRECISION tgral,chi2a,sd,region(2*mxdim),fxn,ALPH,TINY
+ PARAMETER (ALPH=1.5d0,NDMX=50,TINY=1d-30)
+ EXTERNAL fxn
+C USES fxn,ran2,rebin
+ INTEGER i,idum,it,j,k,jj,mds,nd,ndo,ng,npg,ia(MXDIM),kg(MXDIM)
+ DOUBLE PRECISION calls,dv2g,dxg,f,f2,f2b,fb,rc,ti,tsi,wgt,xjac,xn,
+ *xnd,xo,
+ *d(NDMX,MXDIM),di(NDMX,MXDIM),dt(MXDIM),dx(MXDIM),r(NDMX),x(MXDIM),
+ *xi(NDMX,MXDIM),xin(NDMX),ran2
+ DOUBLE PRECISION schi,si,swgt
+ character*72 runname
+ integer nlength
+ logical bin,dorebin
+ common/dorebin/dorebin
+C ADDED
+ integer order
+ common/nnlo/order
+ character*4 part,mypart
+ common/mypart/mypart
+ common/part/part
+ logical fin
+ common/fin/fin
+C
+ common/bin/bin
+ common/runname/runname
+ common/nlength/nlength
+ COMMON /ranno/ idum
+ SAVE
+
+ if(init.le.0)then
+ mds=1
+ ndo=1
+ do 11 j=1,ndim
+ xi(1,j)=1d0
+11 continue
+ endif
+ if (init.le.1)then
+ si=0d0
+ swgt=0d0
+ schi=0d0
+ endif
+ if (init.le.2)then
+ nd=NDMX
+ ng=1
+ if(mds.ne.0)then
+ ng=(ncall/2d0+0.25d0)**(1d0/ndim)
+ mds=1
+ if((2*ng-NDMX).ge.0)then
+ mds=-1
+ npg=ng/NDMX+1
+ nd=ng/npg
+ ng=npg*nd
+ endif
+ endif
+ k=ng**ndim
+ npg=max(ncall/k,2)
+ calls=npg*k
+ dxg=1d0/ng
+ dv2g=(calls*dxg**ndim)**2/npg/npg/(npg-1d0)
+ xnd=nd
+ dxg=dxg*xnd
+ xjac=1d0/calls
+ do 12 j=1,ndim
+ dx(j)=region(j+ndim)-region(j)
+ xjac=xjac*dx(j)
+12 continue
+
+c--- read-in grid if necessary
+ if (readin) then
+ open(unit=11,file=ingridfile,status='unknown')
+ write(6,*)'****************************************************'
+ write(6,*)'* Reading in vegas grid from ',ingridfile,' *'
+ write(6,*)'****************************************************'
+ call flush(6)
+ do j=1,ndim
+ read(11,203) jj,(xi(i,j),i=1,nd)
+ enddo
+ close(11)
+ ndo=nd
+ readin=.false.
+ endif
+
+ if(nd.ne.ndo)then
+ do 13 i=1,nd
+ r(i)=1d0
+13 continue
+ do 14 j=1,ndim
+ call rebin(ndo/xnd,nd,r,xin,xi(1,j))
+14 continue
+ ndo=nd
+ endif
+ if(nprn.ge.0) write(6,200) ndim,calls,it,itmx,nprn,ALPH,mds,nd,
+ *(j,region(j),j,region(j+ndim),j=1,ndim)
+ call flush(6)
+ endif
+
+ do 28 it=1,itmx
+CC ADDED
+
+C Part is what it is computing
+C mypart is what is set at the beginning
+
+C Fin is true at the very last iteration
+C Snd is true when computing real after virt
+
+ fin=.false.
+
+ if(it.eq.itmx) then
+ if((part.eq.'real').or.(part.eq.mypart)
+ # .or.(order.eq.0)) fin=.true.
+ endif
+
+CC
+ ti=0d0
+ tsi=0d0
+ do 16 j=1,ndim
+ kg(j)=1
+ do 15 i=1,nd
+ d(i,j)=0d0
+ di(i,j)=0d0
+15 continue
+16 continue
+10 continue
+ fb=0d0
+ f2b=0d0
+ do 19 k=1,npg
+ wgt=xjac
+ do 17 j=1,ndim
+ xn=(kg(j)-ran2())*dxg+1d0
+ ia(j)=max(min(int(xn),NDMX),1)
+ if(ia(j).gt.1)then
+ xo=xi(ia(j),j)-xi(ia(j)-1,j)
+ rc=xi(ia(j)-1,j)+(xn-ia(j))*xo
+ else
+ xo=xi(ia(j),j)
+ rc=(xn-ia(j))*xo
+ endif
+ x(j)=region(j)+rc*dx(j)
+ wgt=wgt*xo*xnd
+17 continue
+ f=wgt*fxn(x,wgt)
+ f2=f*f
+ fb=fb+f
+ f2b=f2b+f2
+ do 18 j=1,ndim
+ di(ia(j),j)=di(ia(j),j)+f
+ if(mds.ge.0) d(ia(j),j)=d(ia(j),j)+f2
+18 continue
+19 continue
+ f2b=dsqrt(f2b*npg)
+ f2b=(f2b-fb)*(f2b+fb)
+ if (f2b.le.0d0) f2b=TINY
+ ti=ti+fb
+ tsi=tsi+f2b
+ if(mds.lt.0)then
+ do 21 j=1,ndim
+ d(ia(j),j)=d(ia(j),j)+f2b
+21 continue
+ endif
+ do 22 k=ndim,1,-1
+ kg(k)=mod(kg(k),ng)+1
+ if(kg(k).ne.1) goto 10
+22 continue
+ tsi=tsi*dv2g
+ wgt=1d0/tsi
+ si=si+dble(wgt)*dble(ti)
+ schi=schi+dble(wgt)*dble(ti)**2
+ swgt=swgt+dble(wgt)
+ tgral=si/swgt
+ chi2a=max((schi-si*tgral)/(it-.99d0),0d0)
+ sd=dsqrt(1d0/swgt)
+ tsi=dsqrt(tsi)
+ if(nprn.ge.0)then
+c write(6,201) it,ti,tsi,tgral,sd,chi2a
+ write(6,201) it,ti,tgral,tsi,sd,wtmax,chi2a
+ call flush(6)
+ if(nprn.ne.0)then
+ do 23 j=1,ndim
+ write(6,202) j,(xi(i,j),di(i,j),i=1+nprn/2,nd,nprn)
+23 continue
+ endif
+ endif
+ do 25 j=1,ndim
+ xo=d(1,j)
+ xn=d(2,j)
+ d(1,j)=(xo+xn)/2d0
+ dt(j)=d(1,j)
+ do 24 i=2,nd-1
+ rc=xo+xn
+ xo=xn
+ xn=d(i+1,j)
+ d(i,j)=(rc+xn)/3d0
+ dt(j)=dt(j)+d(i,j)
+24 continue
+ d(nd,j)=(xo+xn)/2d0
+ dt(j)=dt(j)+d(nd,j)
+25 continue
+ do 27 j=1,ndim
+ rc=0d0
+ do 26 i=1,nd
+ if(d(i,j).lt.TINY) d(i,j)=TINY
+ r(i)=((1d0-d(i,j)/dt(j))/(dlog(dt(j))-dlog(d(i,j))))**ALPH
+ rc=rc+r(i)
+26 continue
+ if (dorebin) call rebin(rc/xnd,nd,r,xin,xi(1,j))
+27 continue
+C write intermediate results
+ if ((bin).and.(fin.eqv..false.)) then
+ call histofin(tgral,sd,it,itmx)
+ endif
+28 continue
+
+c--- write-out grid if necessary
+ if (writeout) then
+ open(unit=11,file=outgridfile,status='unknown')
+ write(6,*)'****************************************************'
+ write(6,*)'* Writing out vegas grid to',outgridfile,' *'
+ write(6,*)'****************************************************'
+ call flush(6)
+ do j=1,ndim
+ write(11,203) jj,(xi(i,j),i=1,nd)
+ enddo
+ close(11)
+ endif
+
+ return
+
+200 FORMAT(/' input parameters for vegas: ndim=',i3,' ncall=',
+ *f8.0/28x,' it=',i5,' itmx=',i5/28x,' nprn=',i3,' alph=',
+ *f5.2/28x,' mds=',i3,' nd=',i4/(30x,'xl(',i2,')= ',g11.4,' xu(',
+ *i2,')= ',g11.4))
+c201 FORMAT(/' iteration no.',I3,': ','integral =',g14.7,'+/- ',g9.2/
+c *' all iterations: integral =',g14.7,'+/- ',g9.2,' chi**2/iter',
+c * g9.2)
+ 201 format(/'************* Integration by Vegas (iteration ',i3,
+ . ') **************' / '*',63x,'*'/,
+ . '* integral = ',g14.8,2x,
+ . ' accum. integral = ',g14.8,'*'/,
+ . '* std. dev. = ',g14.8,2x,
+ . ' accum. std. dev = ',g14.8,'*'/,
+ . '* max. wt. = ',g14.6,35x,'*'/,'*',63x,'*'/,
+ . '************** chi**2/iteration = ',
+ . g10.4,' ****************' /)
+202 FORMAT(/' data for axis ',I2/' X delta i ',
+ *' x delta i ',' x delta i ',/(1x,
+ *f7.5,1x,g11.4,5x,f7.5,1x,g11.4,5x,f7.5,1x,g11.4))
+203 FORMAT(/(5z16))
+ END
+C (C) Copr. 1986-92 Numerical Recipes Software =v1.9"217..
+
+
+ SUBROUTINE rebin(rc,nd,r,xin,xi)
+ implicit none
+ INTEGER nd
+ DOUBLE PRECISION rc,r(*),xi(*),xin(*)
+ INTEGER i,k
+ DOUBLE PRECISION dr,xn,xo
+ k=0
+ xn=0d0
+ dr=0d0
+ do 11 i=1,nd-1
+1 if(rc.gt.dr)then
+ k=k+1
+ dr=dr+r(k)
+ xo=xn
+ xn=xi(k)
+ goto 1
+ endif
+ dr=dr-rc
+ xin(i)=xn-(xn-xo)*dr/r(k)
+11 continue
+ do 12 i=1,nd-1
+ xi(i)=xin(i)
+12 continue
+ xi(nd)=1d0
+ return
+ END
+C (C) Copr. 1986-92 Numerical Recipes Software =v1.9"217..
Index: dynnlo-v1.5-applgrid/src/Integrate/mbook.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Integrate/mbook.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Integrate/mbook.f (revision 1338)
@@ -0,0 +1,391 @@
+**********************************************************************
+C SIMPLE HISTOGRAMMING PACKAGE -- SIMPLIFIED VERSION OF HBOOK
+C BY Michelangelo Mangano NOVEMBER 1988
+C LAST REVISED NOVEMBER 9, 1988
+c (minor modifications by I Hinchliffe 1 May, 89)
+C**********************************************************************
+C
+C Fills up to 100 histograms with up to 100 bins.
+C Gives a data file (to be specified in the calling program by assigning
+C a file name to unit 98) and a topdrawer file (to be specified in the
+C calling program by assigning a file name to unit 99).
+C
+C INITIALIZATION:
+C Call once INIHIST; this just resets a few counters and logicals
+C Call MBOOK(N,'TITLE',DEL,XMIN,XMAX) for each histogram to be booked.
+C N (an integer) is the label of the histogram;
+C 'TITLE' is the name of the histogram (no more then 100 characters);
+C DEL (real*8) is the bin size;
+C XMIN (real*8) is the lower limit of the first bin;
+C XMAX (real*8)is the upper limit of the last bin
+C Example:
+C call mbook(2,'pt distribution',1.,10.,70.)
+C This call initializes histogram number 2, called 'pt distribution';
+C The bin size will be 1. (possibly GeV, if that's what you want), the
+C first bin being 10.<x<11. and the last one being 69.<x<70.
+C
+C FILLING:
+C When it's time, call MFILL(N,X,Y); this will add Y (real*8) to the bin
+C in which X (real*8) happens to be, within histogram N.
+C
+C PLAYING AROUND:
+C At the end of the day you may want to sum, divide, cancel, etc.etc.
+C various histograms (bin by bin). Then you call MOPERA(I,'O',J,K,X,Y).
+C The 1-character string O can take the following values:
+C + : sums X*(hist I) with Y*(hist J) and puts the result in hist K;
+C - : subtracts X*(hist I) with Y*(hist J) and puts the result in hist K;
+C * : multiplies X*(hist I) with Y*(hist J) and puts the result in hist K;
+C / : divides X*(hist I) with Y*(hist J) and puts the result in hist K;
+C F : multiplies hist I by the factor X, and puts the result in hist K;
+C R : takes the square root of hist I, and puts the result in hist K;if
+C the value at a given bin is less than or equal to 0., puts 0. in K
+C S : takes the square of hist I, and puts the result in hist K;
+C L : takes the log_10 of hist I, and puts the result in hist K; if the
+C value at a given bin is less than or equal to 0., puts 0. in K
+C M : statistical analysis; if I contains the weights (let's say WGT),
+C J contains variable times weight (F*WGT) and K contains the
+C variable squared times the weight (F**2*WGT), then, after using 'M',
+C J will contain the average value of the variable <F> and K will
+C contain the sigma of the average: sigma=sqrt(<F**2>-<F>**2).
+C If WGT=1. for all the entries, then it is enough to put I=J, and
+C it is not necessary to book a hist with the weights.
+C V : estimates errors for vegas evaluation of differential distributions.
+C Fill I with the values of
+C the functions do integrate times the Vegas weight (fun*wgt); fill
+C J with fun**2*wgt; then K will contain an estimate of the error
+C of the integration. Putting X=1/(#of iterations) performs the
+C average over the iterations, and gives the right normalization to
+C the differential distribution, I, and to the errors, K. J stays the same.
+C
+C FINAL ACCOUNTING:
+C Now we can finalize our histograms; MFINAL(N) will calculate the integral
+C of the histogram N, the mean value of the X variable and its RMS.
+C If we now want to renormalize the hist's, we can call MNORM(N,X), which
+C will normalize the integral to X -- CAUTION: do not call MNORM before
+C MFINAL, it will blow up.
+C
+C OUTPUT:
+C To get a .dat file containing the values of the histograms, together with
+C some information (like integral, mean values, etc.etc.) call MPRINT(N),
+C for each hist N that you want in the .dat file. Before the call to MPRINT
+C you want to open unit 98 and give it a name:
+C OPEN(UNIT=98,NAME='NAME.DAT',STATUS='NEW')
+C If you want a topdrawer file with a plot of the hist values, call
+C MTOP(N,M,'X','Y','SCALE'). The points of the plot will be taken from histogram
+C N, the error bars from histogram M. 'SCALE', character*(*), determines
+C the scale for y, logarithmic or linear (SCALE=LOG,LIN).
+C If you do not want error bars, keep
+C a histogram of zeros, or just call a hist that had not been booked.
+C X will appear as a 'bottom title', and Y will appear as a 'left title'.
+C The top title is by default the name of the histogram itself.
+C A little box below the plot will contain some information on the plot
+C itself. Before calling MTOP,
+C OPEN(UNIT=99,NAME='NAME.TOP',STATUS='NEW')
+c Empty histograms are not put out by MTOP.
+C--------------------------------------------------------------------------
+ BLOCK DATA HISTOSET
+ include 'histo.f'
+ data book/
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO',
+ & ' NO','NO',' NO','NO',' NO','NO',' NO','NO',' NO','NO'/
+ END
+
+ SUBROUTINE MBOOK(N,TIT,DEL,XMIN,XMAX)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ CHARACTER*(*) TIT
+ include 'histo.f'
+ NHIST=MAX(N,NHIST)
+ TITLE(N)=TIT
+ BOOK(N)='YES'
+ HDEL(N)=DEL
+ HMIN(N)=XMIN
+ HMAX(N)=XMAX
+ NNBIN=INT((XMAX-XMIN)/DEL)
+ IF (NNBIN .GT. 150) THEN
+ WRITE(6,*) XMAX,XMIN,DEL,NNBIN,' BIN SIZE TOO LARGE'
+ DEL=(XMAX-XMIN)/99.d0
+ NNBIN=INT((XMAX-XMIN)/DEL)
+ ENDIF
+ NBIN(N)=NNBIN
+ IENT(N)=0
+ IUSCORE(N)=0
+ IOSCORE(N)=0
+ HAVG(N)=0.d0
+ HINT(N)=0.d0
+ DO 1 I=1,NBIN(N)
+ XHIS(N,I)=HMIN(N)+HDEL(N)*(DFLOAT(I)-0.5d0)
+ 1 HIST(N,I)=0.d0
+ END
+
+ SUBROUTINE MFILL(N,X,Y)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'histo.f'
+ I=INT((X-HMIN(N))/HDEL(N)+1)
+ IF(I.GT.0.AND.I.LE.NBIN(N)) THEN
+ IENT(N)=IENT(N)+1
+ IHIS(N,I)=IHIS(N,I)+1
+ HIST(N,I)=HIST(N,I)+Y/hdel(n)
+c we are renormalising the weights by the bin width
+ ELSEIF(I.LE.0) THEN
+ IUSCORE(N)=IUSCORE(N)+1
+ ELSEIF(I.GT.NBIN(N)) THEN
+ IOSCORE(N)=IOSCORE(N)+1
+ ENDIF
+ END
+
+ SUBROUTINE MOPERA(I,OPER,J,K,X,Y)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ CHARACTER OPER*1
+ include 'histo.f'
+ IF(NBIN(I).NE.NBIN(J).AND.(OPER.EQ.'+'.OR.OPER.EQ.'-'.OR.OPER.EQ.
+ &'*'.OR.OPER.EQ.'/'.OR.OPER.EQ.'M')) GO TO 10
+ DO L=1,NBIN(I)
+ IF(OPER.EQ.'+') THEN
+ HIST(K,L)=X*HIST(I,L) + Y*HIST(J,L)
+ ELSEIF(OPER.EQ.'-') THEN
+ HIST(K,L)=X*HIST(I,L) - Y*HIST(J,L)
+ ELSEIF(OPER.EQ.'*') THEN
+ HIST(K,L)=X*HIST(I,L) * Y*HIST(J,L)
+ ELSEIF(OPER.EQ.'/') THEN
+ IF(Y.EQ.0.d0.OR.HIST(J,L).EQ.0.d0) THEN
+ HIST(K,L)=0.d0
+ ELSE
+ HIST(K,L)=X*HIST(I,L) / (Y*HIST(J,L))
+ ENDIF
+ ELSEIF(OPER.EQ.'F') THEN
+ HIST(K,L)=X*HIST(I,L)
+ ELSEIF(OPER.EQ.'R') THEN
+ IF(HIST(I,L).GT.0.d0) THEN
+ HIST(K,L)=X*SQRT(HIST(I,L))
+ ELSE
+ HIST(K,L)=0.d0
+ ENDIF
+ ELSEIF(OPER.EQ.'S') THEN
+ HIST(K,L)=X*HIST(I,L)**2
+ ELSEIF(OPER.EQ.'l') THEN
+ IF(HIST(I,L).EQ.0.d0.OR.J.EQ.0) THEN
+ HIST(K,L)=0.d0
+ ELSE
+ HIST(K,L)=X*LOG10(Y*HIST(I,L))
+ ENDIF
+ ELSEIF(OPER.EQ.'M') THEN
+ IF(I.NE.J) XNORM=HIST(I,L)
+ IF(I.EQ.J) XNORM=DFLOAT(IHIS(J,L))
+ IF(XNORM.NE.0.d0) THEN
+ XAVG=HIST(J,L)/XNORM
+ HIST(K,L)=SQRT(ABS(-XAVG**2+HIST(K,L)/XNORM)/DFLOAT(IHIS(I,L)))
+ HIST(J,L)=XAVG
+ ELSE
+ HIST(K,L)=0.d0
+ HIST(J,L)=0.d0
+ ENDIF
+ ELSEIF(OPER.EQ.'V') THEN
+ XAVG=HIST(I,L)*X
+ XSQAVG=HIST(J,L)*X
+ XNORM=DFLOAT(IHIS(I,L))*X
+ IF(XNORM.NE.0.d0) THEN
+ HIST(K,L)=SQRT(ABS(XSQAVG-XAVG**2)/XNORM)
+ HIST(I,L)=XAVG
+ ELSE
+ HIST(K,L)=0.d0
+ ENDIF
+C
+ ELSEIF(OPER.EQ.'A') THEN
+ HIST(J,L) = HIST(J,L) + HIST(I,L)
+ IHIS(J,L) = IHIS(J,L) + IHIS(I,L)
+ HIST(K,L) = HIST(K,L) + HIST(I,L)**2
+ IHIS(K,L) = IHIS(K,L) + 1
+ IENT(K) = IENT(K)+1
+ HIST(I,L) = 0
+ IHIS(I,L) = 0
+ IENT(J) = IENT(J)+IENT(I)
+ IUSCORE(J) = IUSCORE(J) + IUSCORE(I)
+ IOSCORE(J) = IOSCORE(J) + IOSCORE(I)
+ IUSCORE(K) = IUSCORE(K) + 1
+ IOSCORE(K) = IOSCORE(K) + 1
+ IENT(I) = 0
+ IUSCORE(I) = 0
+ IOSCORE(I) = 0
+ ELSEIF(OPER.EQ.'E') THEN
+c If I contains the accumulated weights, J the accumulated squares of the
+c weights and IHIS(J,1) the number of accumulated entries, 'E' will add
+c the average value of I to K and will put in J the quadratic dispersion.
+ IF(IHIS(J,1).NE.0) THEN
+ XXX = 1./IHIS(J,1)
+ ELSE
+ XXX = 0
+ ENDIF
+ XSUM = HIST(I,L)
+ XSUMSQ = HIST(J,L)
+ HIST(K,L)=HIST(K,L) + XXX*XSUM
+ IHIS(K,L)=IHIS(K,L) + IHIS(I,L)
+ HIST(J,L)=XXX*dSQRT(dABS(XSUMSQ-XSUM**2*XXX))
+ IENT(K)=IENT(K)+IENT(I)
+ IUSCORE(K) = IUSCORE(K)+IUSCORE(I)
+ IOSCORE(K) = IOSCORE(K)+IOSCORE(I)
+ ELSEIF(OPER.EQ.'Q') THEN
+ HIST(K,L) = dSQRT(HIST(J,L)**2+HIST(I,L)**2)
+C
+ ELSE
+ WRITE(98,5) OPER
+ 5 FORMAT(' ****** OPERATION ="',A1,'" UNKNOWN ********'/)
+ RETURN
+ ENDIF
+ END DO
+ RETURN
+ 10 WRITE(98,20) I,J
+ 20 FORMAT(' ****** INCOMPATIBLE OPERATION HIST ',I2,' &',I2,
+ & '*******'/)
+ END
+
+ SUBROUTINE MZERO(N)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'histo.f'
+ BOOK(N)='RES'
+ IENT(N)=0
+ IUSCORE(N)=0
+ IOSCORE(N)=0
+ HAVG(N)=0.d0
+ HINT(N)=0.d0
+ DO 1 I=1,NBIN(N)
+ 1 HIST(N,I)=0.d0
+ END
+
+ SUBROUTINE MRESET(N)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'histo.f'
+ BOOK(N)='RES'
+ END
+
+ SUBROUTINE MFINAL(N)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'histo.f'
+ IF(BOOK(N).NE.'YES') RETURN
+ AVG=0.d0
+ XIN=0.d0
+c SIG=0.d0
+ DO 1, J=1,NBIN(N)
+ AVG=AVG+HIST(N,J)*XHIS(N,J)
+ 1 XIN=XIN+HIST(N,J)
+ IF(XIN.EQ.0.d0) GO TO 10
+ HAVG(N)=AVG/XIN
+c DO 2, J=1,NBIN(N)
+c 2 SIG=HIST(N,J)*(XHIS(N,J)-HAVG(N))**2+SIG
+c IF(SIG.GE.0.)HSIG(N)=SQRT(SIG/XIN)
+ HINT(N)=XIN*hdel(n)
+ RETURN
+ 10 BOOK(N)=' NO'
+ END
+
+ SUBROUTINE MNORM(N,X)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'histo.f'
+ IF(BOOK(N).NE.'YES')RETURN
+ DO 1, I=1,NBIN(N)
+ 1 HIST(N,I)=HIST(N,I)/HINT(N)*X
+ HINT(N)=X
+ END
+
+ SUBROUTINE MPRINT(N)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ include 'histo.f'
+c DATA INI/0/
+c IF(INI.EQ.0) THEN
+c CALL IDATE(IMON,IDAY,IYEAR)
+c CALL TIME(CTIME)
+c INI=1
+c ENDIF
+ IF(BOOK(N).NE.'YES') then
+ write(98,21) n
+ RETURN
+ end if
+c WRITE(98,7) N,IYEAR,IMON,IDAY,CTIME(1:5)
+ WRITE(98,8) N
+ WRITE(98,*) TITLE(N)
+ WRITE(98,10) (XHIS(N,I),HIST(N,I),I=1,NBIN(N))
+ WRITE(98,15) HAVG(N),HSIG(N),HINT(N)
+ WRITE(98,20) IENT(N),IUSCORE(N),IOSCORE(N)
+c 7 FORMAT(4X,'HIST = ',I3,' 19',I2,'-',I2,'-',I2,1X,A5/)
+ 8 FORMAT(4X,'HIST = ',I3)
+ 10 FORMAT(4X,2G13.6)
+ 15 FORMAT(/' AVG =',E10.3,4X,' RMS =',E10.3,' INTEGRAL =',E10.3,/)
+ 20 FORMAT('ENTRIES=',I10,1X,'U`FLOW=',I10,1X,'O`FLOW=',I10,//)
+ 21 FORMAT(' HISTOGRAM ',I3,' IS EMPTY')
+ END
+
+ SUBROUTINE MTOP(N,M,BTIT,LTIT,SCALE)
+ IMPLICIT REAL*8 (A-H,O-Z)
+ IMPLICIT INTEGER (I-N)
+ CHARACTER*(*) LTIT,BTIT,SCALE
+ include 'histo.f'
+
+ IF(BOOK(N).NE.'YES') RETURN
+ WRITE(99,101) TITLE(N),TITLE(N),TITLE(N),SCALE,HMIN(N),HMAX(N)
+ 100 FORMAT( /1x,
+ &' SET WINDOW Y 2.5 TO 7.'/,1X,
+ &' SET WINDOW X 2.5 TO 10.'/,1X,
+ &' SET SYMBOL 5O SIZE 1.8'/,1X,
+ &' TITLE TOP ','"',A50,'"',/1X,
+ &' TITLE BOTTOM ','"',A50,'"',/1X,
+ &' TITLE LEFT ','"',A50,'"',/1X,
+ &' SET SCALE Y ',A5,/1X,
+ &' (SET TICKS TOP OFF) '/1x,
+ &' SET LIMITS X ',F10.5,' ',F10.5,/1X,
+ &' SET ORDER X Y DY ')
+ 101 FORMAT( /1x,
+ &' SET WINDOW Y 2.5 TO 7.'/,1X,
+ &' SET WINDOW X 2.5 TO 10.'/,1X,
+ &' SET SYMBOL 5O SIZE 1.8'/,1X,
+ &' TITLE TOP ','"',A,' distribution"',/1X,
+ &' TITLE BOTTOM ','"',A,'"',/1X,
+ &' TITLE LEFT ','"dS/d',A,' [fb]"',/1X,
+ &' CASE ','" G"',/1X,
+ &' SET SCALE Y ',A5,/1X,
+ &' (SET TICKS TOP OFF) '/1x,
+ &' SET LIMITS X ',F10.5,' ',F10.5,/1X,
+ &' SET ORDER X Y DY ')
+ DO 1 J=1,NBIN(N)
+ IF(HIST(N,J).EQ.0.) GO TO 1
+ WRITE(99,'(3X,G13.6,2(2X,G13.6))')
+ & XHIS(N,J),HIST(N,J),HIST(M,J)
+ 1 CONTINUE
+ WRITE(99,200)
+ 200 FORMAT(' PLOT')
+ WRITE(99,300) HINT(N),HAVG(N),HSIG(N),IENT(N),IUSCORE(N)
+ & ,IOSCORE(N)
+ 300 FORMAT( /1x,
+ &' BOX 7. 0.75 SIZE 9. 1.5'/,1X,
+ &' SET WINDOW Y 0. TO 2.'/,1X,
+ &' SET TITLE SIZE -1.5'/1X,
+ &' TITLE 2.8 1.2 "INTGRL =',E12.5,' AVGE =',E12.5,
+ & ' RMS =',E12.5,'"',/1X,
+ &' TITLE 2.8 0.8 "Entries =',I9,2x,'U`flow =',I9,2X
+ & ,'O`flow =',I9,'"',/1X,
+ &' SET TITLE SIZE -2')
+ WRITE(99,400)
+ 400 FORMAT(' NEW PLOT')
+ END
+C*******************************************************************
+C END OF THE HISTOGRAMMING PACKAGE
+C*******************************************************************
Index: dynnlo-v1.5-applgrid/src/Integrate/dvegas.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Integrate/dvegas.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Integrate/dvegas.f (revision 1338)
@@ -0,0 +1,316 @@
+ block data vegas_data
+ implicit double precision (a-h,o-z)
+ implicit integer (i-n)
+ include 'vegas_common.f'
+ include 'maxwt.f'
+ parameter(mprod=50*mxdim)
+ common/bveg2/xi(50,mxdim),si,si2,swgt,schi,ndo,it
+c
+ data ncall/10000/,itmx/15/,nprn/1000/,acc/-1d0/,
+ 1 xl/mxdim*0d0/
+ 2 xu/mxdim*1d0/
+c
+ data XI/mprod*1d0/
+c
+ data wtmax/0d0/
+c
+ end
+
+C
+C
+C NCALL IS THE NUMBER OF CALLS TO VEGAS.
+C NPRN > 0 VEGAS PRINTS THE RESULTS OF EACH ITERATION.
+C NPRN <= 0 VEGAS PRINTS NOTHING.
+C XL(I) IS LOWER INTEGRATION LIMIT ON I TH AXIS.
+C XU(I) IS UPPER INTEGRATION LIMIT ON I THE AXIS.
+c
+ subroutine vegas(fxn,avgi,sd,chi2a)
+c
+c routine performs n dim Monte Carlo Integration
+c written by G. P. Lepage
+c
+ implicit double precision (a-h,o-z)
+ implicit integer (i-n)
+ include 'vegas_common.f'
+ include 'gridinfo.f'
+ include 'maxwt.f'
+ parameter(mprod=50*mxdim)
+ common/bveg2/xi(50,mxdim),si,si2,swgt,schi,ndo,it
+ COMMON/ranno/idum
+ dimension d(50,mxdim),di(50,mxdim),xin(50),r(50),
+ 1 dx(mxdim),dt(mxdim),x(mxdim),kg(mxdim),ia(mxdim)
+ data ndmx/50/,alph/1.5d0/,one/1d0/,mds/1/
+
+ if(ndim .gt. mxdim) then
+ write(6,*) 'ndim',ndim
+ write(6,*) 'mxdim',mxdim
+ write(6,*) 'ndim .gt. mxdim'
+ stop
+ endif
+
+ ndo=1
+ do 1 j=1,ndim
+ 1 xi(1,j)=one
+c
+ entry vegas1(fxn,avgi,sd,chi2a)
+c initialises cumulative variables but not grid
+ it=0
+ si=0d0
+ si2=si
+ swgt=si
+ schi=si
+c
+ entry vegas2(fxn,avgi,sd,chi2a)
+c no initialisation
+ nd=ndmx
+ ng=1
+ if(mds.eq.0)go to 2
+ ng=int((dble(ncall)/2d0)**(1d0/dble(ndim)))
+ mds=1
+ if((2*ng-ndmx).lt.0)go to 2
+ mds=-1
+ npg=ng/ndmx+1
+ nd=ng/npg
+ ng=npg*nd
+ 2 k=ng**ndim
+ npg=ncall/k
+ if(npg.lt.2)npg=2
+ calls=dble(npg*k)
+ dxg=one/ng
+ dv2g=(calls*dxg**ndim)**2/dble(npg)/dble(npg)/dble(npg-one)
+ xnd=dble(nd)
+ ndm=nd-1
+ dxg=dxg*xnd
+ xjac=one/calls
+ do 3 j=1,ndim
+ dx(j)=xu(j)-xl(j)
+ 3 xjac=xjac*dx(j)
+c
+c rebin preserving bin density
+c
+
+c--- read-in grid if necessary
+ if (readin) then
+ open(unit=11,file=ingridfile//'.grid',status='unknown')
+ write(6,*)'****************************************************'
+ write(6,*)'* Reading in vegas grid from ',ingridfile,'.grid *'
+ write(6,*)'****************************************************'
+ call flush(6)
+ do j=1,ndim
+ read(11,203) jj,(xi(i,j),i=1,nd)
+ enddo
+ close(11)
+ ndo=nd
+ readin=.false.
+ endif
+
+ if(nd.eq.ndo)go to 8
+ rc=ndo/xnd
+ do 7 j=1,ndim
+ k=0
+ xn=0d0
+ dr=xn
+ i=k
+ 4 k=k+1
+ dr=dr+one
+ xo=xn
+ xn=xi(k,j)
+ 5 if(rc.gt.dr)go to 4
+ i=i+1
+ dr=dr-rc
+ xin(i)=xn-(xn-xo)*dr
+ if(i.lt.ndm)go to 5
+ do 6 i=1,ndm
+ 6 xi(i,j)=xin(i)
+ 7 xi(nd,j)=one
+ ndo=nd
+c
+ 8 if(nprn.ge.0)write(6,200)ndim,calls,it,itmx,acc
+ 1 ,mds,nd,(xl(j),xu(j),j=1,ndim)
+ call flush(6)
+c
+ entry vegas3(fxn,avgi,sd,chi2a)
+c main integration loop
+ 9 it=it+1
+ ti=0d0
+ tsi=ti
+ do 10 j=1,ndim
+ kg(j)=1
+ do 10 i=1,nd
+ d(i,j)=ti
+ 10 di(i,j)=ti
+c
+ 11 fb=0d0
+ f2b=fb
+ k=0
+ 12 k=k+1
+ wgt=xjac
+ do 15 j=1,ndim
+ xn=(dble(kg(j))-ran1(idum))*dxg+one
+ ia(j)=int(xn)
+ if(ia(j).gt.1)go to 13
+ xo=xi(ia(j),j)
+ rc=(xn-dble(ia(j)))*xo
+ go to 14
+13 xO=xi(ia(j),j)-xi(ia(j)-1,j)
+ rc=xi(ia(j)-1,j)+(xn-dble(ia(j)))*xo
+ 14 x(j)=xl(j)+rc*dx(j)
+ 15 wgt=wgt*xo*xnd
+c
+ f=wgt
+c write(6,FMT='(a20,2F20.16)') 'xo,xnd in dvegas: ',xo,xnd
+ f=f*fxn(x,wgt)
+ f2=f*f
+ fb=fb+f
+ f2b=f2b+f2
+ do 16 j=1,ndim
+ di(ia(j),j)=di(ia(j),j)+f
+ 16 if(mds.ge.0)d(ia(j),J)=d(ia(j),J)+f2
+ if(k.lt.npg) go to 12
+c
+888 FORMAT(1X,'F',G14.6,'F2',G14.6,'FB',G14.6,'F2B',G14.6)
+ f2b= sqrt(f2b* NPG)
+ f2b=(f2b-fb)*(f2b+fb)
+1661 FORMAT(1X,'F2B',G14.6,'NPG', I10)
+ ti=ti+fb
+ tsi=tsi+f2b
+33 FORMAT(1X,'TSI',G14.6,'F2B',G14.6)
+ if(mds.ge.0)go to 18
+ do 17 j=1,ndim
+ 17 d(ia(j),j)=d(ia(j),j)+f2b
+ 18 k=ndim
+ 19 kg(k)=mod(kg(k),ng)+1
+ if(kg(k).ne.1)go to 11
+ k=k-1
+ if(k.gt.0)go to 19
+c
+c final results for this iteration
+c
+ tsi=tsi*dv2g
+ ti2=ti*ti
+88 format(1x,'tsi',g14.6)
+ wgt=ti2/tsi
+ si=si+ti*wgt
+ si2=si2+ti2
+ swgt=swgt+wgt
+ schi=schi+ti2*wgt
+995 FORMAT(1X,'SWGT',G14.6,'SI2',G14.6)
+ avgi=si/swgt
+ sd=swgt*dble(it)/si2
+ chi2a=sd*(schi/swgt-avgi*avgi)/(dble(it)-.999d0)
+ sd=dsqrt(one/sd)
+c
+ if(nprn.eq.0)go to 21
+ tsi=dsqrt(tsi)
+c write(6,201)it,ti,tsi,avgi,sd,chi2a
+ write(6,201)it,ti,avgi,tsi,sd,wtmax,chi2a
+ call flush(6)
+ if(nprn.ge.0)go to 21
+ do 20 j=1,ndim
+ 20 write(6,202) j,(xi(i,j),di(i,j),d(i,j),i=1,nd)
+c
+c refine grid
+c
+ 21 do 23 j=1,ndim
+ xo=d(1,j)
+ xn=d(2,j)
+ d(1,j)=(xo+xn)/2d0
+ dt(j)=d(1,j)
+ do 22 i=2,ndm
+ d(i,j)=xo+xn
+ xo=xn
+ xn=d(i+1,j)
+ d(i,j)=(d(i,j)+xn)/3d0
+ 22 dt(j)=dt(j)+d(i,j)
+ d(nd,j)=(xn+xo)/2d0
+ 23 dt(j)=dt(j)+d(nd,j)
+c
+ do 28 j=1,ndim
+ rc=0d0
+ do 24 i=1,nd
+ r(i)=0d0
+ if(d(i,j).le.0d0)go to 24
+ xo=dt(j)/d(i,j)
+ r(i)=((xo-one)/xo/dlog(xo))**alph
+ 24 rc=rc+r(i)
+ rc=rc/xnd
+ k=0
+ xn=0d0
+ dr=xn
+ i=k
+ 25 k=k+1
+ dr=dr+r(k)
+ xo=xn
+ xn=xi(k,j)
+ 26 if(rc.gt.dr)go to 25
+ i=i+1
+ dr=dr-rc
+ xin(i)=xn-(xn-xo)*dr/r(k)
+ if(i.lt.ndm)go to 26
+ do 27 i=1,ndm
+ 27 xi(i,j)=xin(i)
+ 28 xi(nd,j)=one
+c
+ if(it.lt.itmx.and.acc*dabs(avgi).lt.sd)go to 9
+
+c--- write-out grid if necessary
+ if (writeout) then
+ open(unit=11,file=outgridfile//'.grid',status='unknown')
+ write(6,*)'****************************************************'
+ write(6,*)'* Writing out vegas grid to ',outgridfile,'.grid *'
+ write(6,*)'****************************************************'
+ call flush(6)
+ do j=1,ndim
+ write(11,203) jj,(xi(i,j),i=1,nd)
+ enddo
+ close(11)
+ endif
+
+ 200 format(/ 1X,' Input parameters for vegas: ndim=',i3,
+ 1 ' ncall=',f8.0/28x,' it=',i5,' itmx=',i5/28x,
+ 2 ' acc=',g9.3/28x,' mds=',i3,' nd=',i4/28x,
+ 3 ' (xl,xu)=',(t40,'( ',g12.6,' , ',g12.6,' )'))
+c 201 format(///' Integration by vegas' / ' iteration no.',i3,
+c 1 ': integral=',g14.8/21x,'std dev =',g14.8 /
+c 2 ' accumulated results: integral=',g14.8/
+c 3 24x,'std dev =',g14.8 / 24x,'chi**2 per it''n =',g10.4)
+ 201 format(/'************* Integration by Vegas (iteration ',i3,
+ . ') **************' / '*',63x,'*'/,
+ . '* integral = ',g14.8,2x,
+ . ' accum. integral = ',g14.8,'*'/,
+ . '* std. dev. = ',g14.8,2x,
+ . ' accum. std. dev = ',g14.8,'*'/,
+ . '* max. wt. = ',g14.6,35x,'*'/,'*',63x,'*'/,
+ . '************** chi**2/iteration = ',
+ . g10.4,' ****************' /)
+ 202 format(1X,' data for axis',i2,/,' ',6x,'x',7x,' delt i ',
+ 1 2x,'conv','ce ',11x,'x',7x,' delt i ',2x,'conv','ce '
+ 2 ,11x,'x',7x,' delt i ',2x,'conv','CE ',/,
+ 3 (1X,' ',3g12.4,5x,3g12.4,5x,3g12.4))
+ 203 format(/(5z16))
+ return
+ end
+
+ subroutine save(ndim)
+ implicit double precision (a-h,o-z)
+ implicit integer (i-n)
+ include 'mxdim.f'
+ common/bveg2/xi(50,mxdim),si,si2,swgt,schi,ndo,it
+c
+c stores vegas data (unit 7) for later initialisation
+c
+ write(7,200) ndo,it,si,si2,swgt,schi,
+ 1 ((xi(i,j),i=1,ndo),j=1,ndim)
+ return
+ entry restr(ndim)
+c
+c enters initialisation data for vegas
+c
+ read(7,200) ndo,it,si,si2,swgt,schi,
+ 1 ((xi(i,j),i= 1,ndo),j=1,ndim)
+ 200 format(2i8,4z16/(5z16))
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_w_g.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_w_g.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_w_g.f (revision 1338)
@@ -0,0 +1,77 @@
+ subroutine qqb_w_g(p,msq)
+ implicit none
+c----Matrix element for W production
+C----averaged over initial colours and spins
+C for nwz=+1
+c u(-p1)+dbar(-p2)--> W^+(n(p3)+e^+(p4)) + g(p5)
+C For nwz=-1
+c d(-p1)+ubar(-p2)--> W^-(e^-(p3)+nbar(p4))+ g(p5)
+c---
+ include 'constants.f'
+ include 'ckm.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'sprods_com.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),fac
+ double precision qqbWg,qbqWg,qgWq,qbgWqb,gqbWqb,gqWq,w1jet
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ call dotem(5,p,s)
+c---calculate the propagator
+ fac=gwsq**2*gsq*V
+
+ qqbWg= +aveqq*fac*w1jet(1,2,3,4,5)
+ gqbWqb=-aveqg*fac*w1jet(5,2,3,4,1)
+ qgWq= -aveqg*fac*w1jet(1,5,3,4,2)
+
+ qbqWg= +aveqq*fac*w1jet(2,1,3,4,5)
+ qbgWqb=-aveqg*fac*w1jet(5,1,3,4,2)
+ gqWq= -aveqg*fac*w1jet(2,5,3,4,1)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=Vsq(j,k)*qqbWg
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=Vsq(j,k)*qbqWg
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & (Vsq(j,-1)+Vsq(j,-2)+Vsq(j,-3)+Vsq(j,-4)+Vsq(j,-5))*qgWq
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & (Vsq(j,+1)+Vsq(j,+2)+Vsq(j,+3)+Vsq(j,+4)+Vsq(j,+5))*qbgWqb
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=
+ & (Vsq(-1,k)+Vsq(-2,k)+Vsq(-3,k)+Vsq(-4,k)+Vsq(-5,k))*gqWq
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=
+ & (Vsq(+1,k)+Vsq(+2,k)+Vsq(+3,k)+Vsq(+4,k)+Vsq(+5,k))*gqbWqb
+ endif
+
+ enddo
+ enddo
+ return
+ end
+
+ double precision function w1jet(j1,j2,j3,j4,j5)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'sprods_com.f'
+ integer j1,j2,j3,j4,j5
+ double precision prop
+
+ prop=((s(3,4)-wmass**2)**2+(wmass*wwidth)**2)
+
+ w1jet=(s(j1,j4)**2+s(j2,j3)**2)*s(j3,j4)/(s(j1,j5)*s(j2,j5)*prop)
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_z_gvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_z_gvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_z_gvec.f (revision 1338)
@@ -0,0 +1,144 @@
+ subroutine qqb_z_gvec(p,n,in,msq)
+C***********************************************************************
+c Author: R.K. Ellis *
+c September, 1999. *
+c Matrix element for Z production *
+c averaged over initial colours and spins *
+c contracted with the vector n(mu) (orthogonal to p5) *
+c u(-p1)+dbar(-p2)--> g(p5)+ Z^+(l(p3)+a(p4)) *
+C***********************************************************************
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+ include 'ewcharge.f'
+ include 'sprods_com.f'
+ integer j,k,in
+C--in is the label of the parton dotted with n
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4)
+ double precision z1jetn,fac,p1p2(-1:1,-1:1),n(4)
+ double complex prop
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ call dotem(5,p,s)
+
+C-----Protect from photon pole by cutting off at some value about 10 GeV
+c if (s(3,4) .lt. 4d0*mbsq) return
+
+ fac=16d0*cf*xn*esq**2*gsq
+ prop=s(3,4)/dcmplx((s(3,4)-zmass**2),zmass*zwidth)
+
+ do j=-1,1
+ do k=-1,1
+ p1p2(j,k)=0d0
+ enddo
+ enddo
+
+ if (in .eq. 1) then
+ p1p2(0,-1)=-aveqg*fac*z1jetn(5,2,1,p,n)
+ p1p2(0,+1)=-aveqg*fac*z1jetn(2,5,1,p,n)
+ elseif (in .eq. 2) then
+ p1p2(+1,0)=-aveqg*fac*z1jetn(1,5,2,p,n)
+ p1p2(-1,0)=-aveqg*fac*z1jetn(5,1,2,p,n)
+ elseif (in .eq. 5) then
+ p1p2(-1,1)=+aveqq*fac*z1jetn(2,1,5,p,n)
+ p1p2(1,-1)=+aveqq*fac*z1jetn(1,2,5,p,n)
+ endif
+
+ do j=-nf,nf
+ do k=-nf,nf
+ if( j .ne. 0 .and. k .ne. 0 .and. j .ne. -k) goto 19
+
+ if ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(j,k)=0d0
+ elseif ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=+(cdabs(Q(j)*q1+L(j)*l1*prop)**2
+ . +cdabs(Q(j)*q1+R(j)*r1*prop)**2)*p1p2(1,-1)
+ . +(cdabs(Q(j)*q1+L(j)*r1*prop)**2
+ . +cdabs(Q(j)*q1+R(j)*l1*prop)**2)*p1p2(-1,1)
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=+(cdabs(Q(k)*q1+L(k)*l1*prop)**2
+ . +cdabs(Q(k)*q1+R(k)*r1*prop)**2)*p1p2(-1,1)
+ . +(cdabs(Q(k)*q1+L(k)*r1*prop)**2
+ . +cdabs(Q(k)*q1+R(k)*l1*prop)**2)*p1p2(1,-1)
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=+(cdabs(Q(j)*q1+L(j)*l1*prop)**2
+ . +cdabs(Q(j)*q1+R(j)*r1*prop)**2)*p1p2(+1,0)
+ . +(cdabs(Q(j)*q1+L(j)*r1*prop)**2
+ . +cdabs(Q(j)*q1+R(j)*l1*prop)**2)*p1p2(-1,0)
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=+(cdabs(Q(-j)*q1+L(-j)*l1*prop)**2
+ . +cdabs(Q(-j)*q1+R(-j)*r1*prop)**2)*p1p2(-1,0)
+ . +(cdabs(Q(-j)*q1+L(-j)*r1*prop)**2
+ . +cdabs(Q(-j)*q1+R(-j)*l1*prop)**2)*p1p2(+1,0)
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=+(cdabs(Q(k)*q1+L(k)*l1*prop)**2
+ . +cdabs(Q(k)*q1+R(k)*r1*prop)**2)*p1p2(0,+1)
+ . +(cdabs(Q(k)*q1+L(k)*r1*prop)**2
+ . +cdabs(Q(k)*q1+R(k)*l1*prop)**2)*p1p2(0,-1)
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=+(cdabs(Q(-k)*q1+L(-k)*l1*prop)**2
+ . +cdabs(Q(-k)*q1+R(-k)*r1*prop)**2)*p1p2(0,-1)
+ . +(cdabs(Q(-k)*q1+L(-k)*r1*prop)**2
+ . +cdabs(Q(-k)*q1+R(-k)*l1*prop)**2)*p1p2(0,+1)
+ endif
+
+ 19 continue
+ enddo
+ enddo
+
+ return
+ end
+
+ double precision function z1jetn(j1,j2,j5,p,n)
+ implicit none
+C---calculates the amplitude squared for the process
+c q(p1)+qbar(p2) --> Z(l(p3)+a(p4))+g(p5)
+c contracted with the vector n(mu)
+c before spin/color average
+c---overall factor of 16 gs**2*gw**4*xw**2*CF*xn removed
+c--note QED propagator included.
+ include 'constants.f'
+ include 'sprods_com.f'
+
+ integer j1,j2,j3,j4,j5
+ double precision n(4),p(mxpart,4),nDn,nDp1,nDp2,nDp3,nDp5
+ j3=3
+ j4=4
+
+ nDp1=n(4)*p(j1,4)-n(3)*p(j1,3)-n(2)*p(j1,2)-n(1)*p(j1,1)
+ nDp2=n(4)*p(j2,4)-n(3)*p(j2,3)-n(2)*p(j2,2)-n(1)*p(j2,1)
+ nDp3=n(4)*p(j3,4)-n(3)*p(j3,3)-n(2)*p(j3,2)-n(1)*p(j3,1)
+ nDn=n(4)**2-n(3)**2-n(2)**2-n(1)**2
+
+ nDp5=n(4)*p(j5,4)-n(3)*p(j5,3)-n(2)*p(j5,2)-n(1)*p(j5,1)
+
+c--- appropriate scale is approx 1d-3*energy(incoming)
+c--- so of order(1) for the Tevatron
+C if (abs(nDp5).gt.1d-2*abs(p(j1,4))) then
+C write(*,*) 'Error for :',j1,j2,j3,j4,j5
+C write(*,*) 'cutoff',1d-3*abs(p(j1,4))
+C write(6,*) 'nDp5',nDp5
+C call flush(6)
+C stop
+C endif
+
+ z1jetn=((nDp1*s(j2,j3)/s(j1,j5)-nDp2*s(j1,j4)/s(j2,j5))**2
+ . +two*(s(j2,j3)*nDp1/s(j1,j5)-s(j1,j4)*nDp2/s(j2,j5))*(nDp2+nDp3)
+ . -(s(j1,4)-s(j2,3))**2*s(j3,j4)*nDn/(four*s(j1,j5)*s(j2,j5))
+ . +(nDp2+nDp3)**2)/s(j3,j4)**2
+
+ return
+ end
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/subqcd.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/subqcd.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/subqcd.f (revision 1338)
@@ -0,0 +1,52 @@
+ subroutine subqcd(i1,i2,i3,i4,i5,i6,za,zb,amp)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ include 'sprods_com.f'
+c*******************************************************************
+c the matrix elements of the
+C helicity amplitudes for the QCD process
+c q(-p1)+qbar(-p2) --> l(p3)+abar(p4)+g(p5)+g(p6)
+c multiplied by ((a+l)^2-M**2)/(a+l)^2/g^4
+c one colour ordering only
+c left-on quark line only
+c*******************************************************************
+ integer i1,i2,i3,i4,i5,i6
+ double precision s156,s56,s256,s34
+ double complex amp(-1:1,-1:1)
+ double complex p1,p2,p3,b1,b2
+
+ s156=s(i1,i5)+s(i1,i6)+s(i5,i6)
+ s256=s(i2,i5)+s(i2,i6)+s(i5,i6)
+ s56=s(i5,i6)
+ s34=s(i3,i4)
+
+ amp(1,1)=four*za(i2,i3)**2
+ & /(za(i5,i6)*za(i2,i6)*za(i1,i5)*za(i4,i3))
+
+ b1=za(i2,i3)*zb(i2,i5)+za(i6,i3)*zb(i6,i5)
+ b2=za(i1,i6)*zb(i1,i4)+za(i5,i6)*zb(i5,i4)
+ p1=four*za(i2,i6)*zb(i2,i5)*zb(i1,i4)*b1
+ & /(zb(i2,i6)*s256*s56*s34)
+ p2=four*za(i1,i6)*zb(i1,i5)*za(i2,i3)*b2
+ & /(za(i1,i5)*s156*s56*s34)
+ p3=four*b1*b2/(zb(i2,i6)*za(i1,i5)*s56*s34)
+ amp(1,-1)=p1+p2+p3
+
+ b1=za(i1,i5)*zb(i1,i4)+za(i6,i5)*zb(i6,i4)
+ b2=za(i2,i3)*zb(i2,i6)+za(i3,i5)*zb(i6,i5)
+ p1=-four*zb(i1,i6)**2*za(i3,i2)*b1
+ . /(zb(i1,i5)*s156*s56*s34)
+ p2=+four*za(i2,i5)**2*zb(i1,i4)*b2
+ . /(za(i2,i6)*s256*s56*s34)
+ p3=four*zb(i1,i6)*za(i2,i5)*zb(i1,i4)*za(i2,i3)
+ & /(za(i2,i6)*zb(i1,i5)*s56*s34)
+ amp(-1,1)=p1+p2+p3
+
+ amp(-1,-1)=four*zb(i4,i1)**2
+ & /(zb(i5,i6)*zb(i2,i6)*zb(i1,i5)*zb(i4,i3))
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_z_g.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_z_g.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_z_g.f (revision 1338)
@@ -0,0 +1,179 @@
+ subroutine qqb_z_g(p,msq)
+ implicit none
+C-----Author John Campbell
+C-----June 2000
+c----Matrix element for Z production
+C----averaged over initial colours and spins
+c q(-p1)+qbar(-p2)-->(e^-(p3)+e^+(p4))+g(p5)
+c---
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+ include 'ewcharge.f'
+ include 'sprods_com.f'
+ include 'zprods_decl.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),fac
+ double complex AqqbZg(2,2,2),AqbqZg(2,2,2),AqgZq(2,2,2),
+ . AqbgZqb(2,2,2),AgqbZqb(2,2,2),AgqZq(2,2,2),prop
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ call dotem(5,p,s)
+ call spinoru(5,p,za,zb)
+
+c---protect from soft and collinear singularities
+c if ((-s(1,5) .lt. cutoff) .or. (-s(2,5) .lt. cutoff)) return
+
+C-----Protect from photon pole by cutting off at some value about 10 GeV
+c if (s(3,4) .lt. 4d0*mbsq) return
+
+ prop=s(3,4)/Dcmplx((s(3,4)-zmass**2),zmass*zwidth)
+ fac=4d0*V*esq**2*gsq
+
+c qqbZg= +aveqq*s(3,4)**2*fac*z1jet(1,2,3,4,5)
+c gqbZqb=-aveqg*s(3,4)**2*fac*z1jet(5,2,3,4,1)
+c qgZq= -aveqg*s(3,4)**2*fac*z1jet(1,5,3,4,2)
+c qbqZg= +aveqq*s(3,4)**2*fac*z1jet(2,1,3,4,5)
+c qbgZqb=-aveqg*s(3,4)**2*fac*z1jet(5,1,3,4,2)
+c gqZq= -aveqg*s(3,4)**2*fac*z1jet(2,5,3,4,1)
+
+ call zgamps(1,2,3,4,5,za,zb,AqqbZg)
+ call zgamps(5,2,3,4,1,za,zb,AgqbZqb)
+ call zgamps(1,5,3,4,2,za,zb,AqgZq)
+ call zgamps(2,1,3,4,5,za,zb,AqbqZg)
+ call zgamps(5,1,3,4,2,za,zb,AqbgZqb)
+ call zgamps(2,5,3,4,1,za,zb,AgqZq)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ if( j .ne. 0 .and. k .ne. 0 .and. j .ne. -k) goto 19
+
+ if ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(j,k)=0d0
+ elseif ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=cdabs((Q(j)*q1+L(j)*l1*prop)*AqqbZg(1,1,1))**2
+ . +cdabs((Q(j)*q1+L(j)*l1*prop)*AqqbZg(1,1,2))**2
+ . +cdabs((Q(j)*q1+L(j)*r1*prop)*AqqbZg(1,2,1))**2
+ . +cdabs((Q(j)*q1+L(j)*r1*prop)*AqqbZg(1,2,2))**2
+ . +cdabs((Q(j)*q1+R(j)*l1*prop)*AqqbZg(2,1,1))**2
+ . +cdabs((Q(j)*q1+R(j)*l1*prop)*AqqbZg(2,1,2))**2
+ . +cdabs((Q(j)*q1+R(j)*r1*prop)*AqqbZg(2,2,1))**2
+ . +cdabs((Q(j)*q1+R(j)*r1*prop)*AqqbZg(2,2,2))**2
+ msq(j,k)=msq(j,k)*aveqq*fac/s(3,4)**2
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=cdabs((Q(k)*q1+L(k)*l1*prop)*AqbqZg(1,1,1))**2
+ . +cdabs((Q(k)*q1+L(k)*l1*prop)*AqbqZg(1,1,2))**2
+ . +cdabs((Q(k)*q1+L(k)*r1*prop)*AqbqZg(1,2,1))**2
+ . +cdabs((Q(k)*q1+L(k)*r1*prop)*AqbqZg(1,2,2))**2
+ . +cdabs((Q(k)*q1+R(k)*l1*prop)*AqbqZg(2,1,1))**2
+ . +cdabs((Q(k)*q1+R(k)*l1*prop)*AqbqZg(2,1,2))**2
+ . +cdabs((Q(k)*q1+R(k)*r1*prop)*AqbqZg(2,2,1))**2
+ . +cdabs((Q(k)*q1+R(k)*r1*prop)*AqbqZg(2,2,2))**2
+ msq(j,k)=msq(j,k)*aveqq*fac/s(3,4)**2
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=cdabs((Q(j)*q1+L(j)*l1*prop)*AqgZq(1,1,1))**2
+ . +cdabs((Q(j)*q1+L(j)*l1*prop)*AqgZq(1,1,2))**2
+ . +cdabs((Q(j)*q1+L(j)*r1*prop)*AqgZq(1,2,1))**2
+ . +cdabs((Q(j)*q1+L(j)*r1*prop)*AqgZq(1,2,2))**2
+ . +cdabs((Q(j)*q1+R(j)*l1*prop)*AqgZq(2,1,1))**2
+ . +cdabs((Q(j)*q1+R(j)*l1*prop)*AqgZq(2,1,2))**2
+ . +cdabs((Q(j)*q1+R(j)*r1*prop)*AqgZq(2,2,1))**2
+ . +cdabs((Q(j)*q1+R(j)*r1*prop)*AqgZq(2,2,2))**2
+ msq(j,k)=msq(j,k)*aveqg*fac/s(3,4)**2
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=cdabs((Q(-j)*q1+L(-j)*l1*prop)*AqbgZqb(1,1,1))**2
+ . +cdabs((Q(-j)*q1+L(-j)*l1*prop)*AqbgZqb(1,1,2))**2
+ . +cdabs((Q(-j)*q1+L(-j)*r1*prop)*AqbgZqb(1,2,1))**2
+ . +cdabs((Q(-j)*q1+L(-j)*r1*prop)*AqbgZqb(1,2,2))**2
+ . +cdabs((Q(-j)*q1+R(-j)*l1*prop)*AqbgZqb(2,1,1))**2
+ . +cdabs((Q(-j)*q1+R(-j)*l1*prop)*AqbgZqb(2,1,2))**2
+ . +cdabs((Q(-j)*q1+R(-j)*r1*prop)*AqbgZqb(2,2,1))**2
+ . +cdabs((Q(-j)*q1+R(-j)*r1*prop)*AqbgZqb(2,2,2))**2
+ msq(j,k)=msq(j,k)*aveqg*fac/s(3,4)**2
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=cdabs((Q(k)*q1+L(k)*l1*prop)*AgqZq(1,1,1))**2
+ . +cdabs((Q(k)*q1+L(k)*l1*prop)*AgqZq(1,1,2))**2
+ . +cdabs((Q(k)*q1+L(k)*r1*prop)*AgqZq(1,2,1))**2
+ . +cdabs((Q(k)*q1+L(k)*r1*prop)*AgqZq(1,2,2))**2
+ . +cdabs((Q(k)*q1+R(k)*l1*prop)*AgqZq(2,1,1))**2
+ . +cdabs((Q(k)*q1+R(k)*l1*prop)*AgqZq(2,1,2))**2
+ . +cdabs((Q(k)*q1+R(k)*r1*prop)*AgqZq(2,2,1))**2
+ . +cdabs((Q(k)*q1+R(k)*r1*prop)*AgqZq(2,2,2))**2
+ msq(j,k)=msq(j,k)*aveqg*fac/s(3,4)**2
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=cdabs((Q(-k)*q1+L(-k)*l1*prop)*AgqbZqb(1,1,1))**2
+ . +cdabs((Q(-k)*q1+L(-k)*l1*prop)*AgqbZqb(1,1,2))**2
+ . +cdabs((Q(-k)*q1+L(-k)*r1*prop)*AgqbZqb(1,2,1))**2
+ . +cdabs((Q(-k)*q1+L(-k)*r1*prop)*AgqbZqb(1,2,2))**2
+ . +cdabs((Q(-k)*q1+R(-k)*l1*prop)*AgqbZqb(2,1,1))**2
+ . +cdabs((Q(-k)*q1+R(-k)*l1*prop)*AgqbZqb(2,1,2))**2
+ . +cdabs((Q(-k)*q1+R(-k)*r1*prop)*AgqbZqb(2,2,1))**2
+ . +cdabs((Q(-k)*q1+R(-k)*r1*prop)*AgqbZqb(2,2,2))**2
+ msq(j,k)=msq(j,k)*aveqg*fac/s(3,4)**2
+ endif
+
+ 19 continue
+ enddo
+ enddo
+ return
+ end
+
+
+c double precision function z1jet(j1,j2,j3,j4,j5)
+c implicit none
+c include 'constants.f'
+c include 'sprods_com.f'
+c integer j1,j2,j3,j4,j5
+c double precision s12,s15,s25
+
+c s12=s(j1,j2)
+c s15=s(j1,j5)
+c s25=s(j2,j5)
+c---calculate the propagator
+c z1jet=(s(j1,j4)**2+s(j2,j3)**2)/(s25*s15*s(j3,j4))
+cc z1jet=
+cc . (s12*(2d0*s(j1,j4)*s(j2,j3)+s(j1,j4)*s(j3,j5)+s(j2,j3)*s(j4,j5))
+cc . +s15*(s(j1,j4)*s(j2,j3)+s(j1,j4)*s(j3,j5)-s(j2,j3)*s(j2,j4))
+cc . +s25*(s(j1,j4)*s(j2,j3)+s(j2,j3)*s(j4,j5)-s(j1,j3)*s(j1,j4)))
+cc . /(s15*s25*s(j3,j4)**2)
+c return
+c end
+
+
+ subroutine zgamps(j1,j2,j3,j4,j5,za,zb,amps)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ double complex amps(2,2,2)
+ integer h1,h2,j1,j2,j3,j4,j5
+c-- amplitude helicities are amps(quark,lepton,gluon)
+
+ amps(1,1,1)=za(j2,j3)/za(j1,j5)/za(j2,j5)
+ . *(za(j2,j1)*zb(j4,j1)+za(j2,j5)*zb(j4,j5))
+
+ amps(1,1,2)=zb(j4,j1)/zb(j1,j5)/zb(j2,j5)
+ . *(za(j2,j3)*zb(j2,j1)+za(j3,j5)*zb(j1,j5))
+
+ amps(1,2,1)=za(j2,j4)/za(j1,j5)/za(j2,j5)
+ . *(za(j2,j1)*zb(j3,j1)+za(j2,j5)*zb(j3,j5))
+
+ amps(1,2,2)=zb(j3,j1)/zb(j1,j5)/zb(j2,j5)
+ . *(za(j2,j4)*zb(j2,j1)+za(j4,j5)*zb(j1,j5))
+
+ do h1=1,2
+ do h2=1,2
+ amps(2,h1,h2)=-dconjg(amps(1,3-h1,3-h2))
+ enddo
+ enddo
+
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_v.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_v.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_v.f (revision 1338)
@@ -0,0 +1,107 @@
+CCCC P.S. subroutine qqb_w1jet_v(p,msq) modification to catch alphas^2 contrib
+ subroutine qqb_w1jet_v(p,msq,msq0ps)
+ implicit none
+c----Matrix element for W + jet production
+c----in order alpha_s^2
+C----averaged over initial colours and spins
+c q(-p1)+qbar(-p2)-->W^+(nu(p3)+e^+(p4))+g(p5)
+c---
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'ckm.f'
+ include 'sprods_com.f'
+ include 'zprods_com.f'
+ include 'epinv.f'
+ include 'scheme.f'
+ integer j,k,iqqbg(5),iqbqg(5),iqgq(5),igqq(5),
+ . igqbqb(5),iqbgqb(5)
+ double precision msq(-nf:nf,-nf:nf),msq0(-nf:nf,-nf:nf),
+ . p(mxpart,4),fac,sw,prop,virt5,subuv,
+ . qqbWg,qbqWg,qgWq,gqWq,qbgWqb,gqbWqb
+c P.S..
+ double precision msq0ps(-nf:nf,-nf:nf)
+c P.S. end
+ data iqqbg/1,2,3,4,5/
+ data iqgq/1,5,3,4,2/
+ data igqq/2,5,3,4,1/
+
+ data iqbqg/2,1,3,4,5/
+ data iqbgqb/5,1,3,4,2/
+ data igqbqb/5,2,3,4,1/
+
+c--set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+c P.S..
+ msq0ps(j,k) = 0d0
+c P.S. end
+ enddo
+ enddo
+ scheme='dred'
+
+c-- if Gflag=.false. then only the endpoint contributions from the
+c-- 4-quark diagrams are included, ie. no pole subtraction for this
+c-- piece. Therefore return 0.
+c if (Gflag .eqv. .false.) return
+
+c--calculate spinor and dot-products (using BDK type notation)
+ call spinoru(5,p,za,zb)
+
+c---protect from soft and collinear singularities
+c if ((abs(s(1,5)) .lt. cutoff).or.(abs(s(2,5)) .lt. cutoff)) return
+
+c--- calculate lowest order
+ call qqb_w_g(p,msq0)
+
+c--- UV counterterm contains the finite renormalization to arrive
+c--- at MS bar scheme.
+ subuv=ason2pi*xn*(epinv*(11d0-2d0*dble(nf)/xn)-1d0)/6d0
+
+c--- calculate propagator
+ sw=s(3,4)
+ prop=sw**2/((sw-wmass**2)**2+(wmass*wwidth)**2)
+
+ fac=2d0*cf*xnsq*gwsq**2*gsq*prop
+
+ qqbWg=aveqq*fac*virt5(iqqbg,za,zb)
+ qbqWg=aveqq*fac*virt5(iqbqg,za,zb)
+ gqWq=aveqg*fac*virt5(igqq,za,zb)
+ qgWq=aveqg*fac*virt5(iqgq,za,zb)
+ gqbWqb=aveqg*fac*virt5(igqbqb,za,zb)
+ qbgWqb=aveqg*fac*virt5(iqbgqb,za,zb)
+
+ do j=-nf,nf
+ do k=-nf,nf
+c P.S.
+ msq0ps(j,k) = -subuv*msq0(j,k)
+c P.S. end
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=Vsq(j,k)*qqbWg-subuv*msq0(j,k)
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=Vsq(j,k)*qbqWg-subuv*msq0(j,k)
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & (Vsq(j,-1)+Vsq(j,-2)+Vsq(j,-3)+Vsq(j,-4)+Vsq(j,-5))*qgWq
+ & -subuv*msq0(j,k)
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & (Vsq(j,+1)+Vsq(j,+2)+Vsq(j,+3)+Vsq(j,+4)+Vsq(j,+5))*qbgWqb
+ & -subuv*msq0(j,k)
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=
+ & (Vsq(-1,k)+Vsq(-2,k)+Vsq(-3,k)+Vsq(-4,k)+Vsq(-5,k))*gqWq
+ & -subuv*msq0(j,k)
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=
+ & (Vsq(+1,k)+Vsq(+2,k)+Vsq(+3,k)+Vsq(+4,k)+Vsq(+5,k))*gqbWqb
+ & -subuv*msq0(j,k)
+ endif
+
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/h4g.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/h4g.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/h4g.f (revision 1338)
@@ -0,0 +1,316 @@
+ subroutine h4g(p1,p2,p3,p4,Hgggg)
+ implicit none
+ include 'constants.f'
+ include 'zprods_com.f'
+ integer j,p1,p2,p3,p4,h1,h2,h3,h4
+ double precision Hgggg
+ double complex amp(3,2,2,2,2),
+ . amppp(3),apmpp(3),appmp(3),apppm(3),
+ . apppp(3),
+ . ammpp(3),ampmp(3),amppm(3),apmmp(3),apmpm(3),appmm(3)
+
+ do h1=1,2
+ do h2=1,2
+ do h3=1,2
+ do h4=1,2
+ do j=1,3
+ amp(j,h1,h2,h3,h4)=czip
+ enddo
+ enddo
+ enddo
+ enddo
+ enddo
+
+ call makepppp(p1,p2,p3,p4,za,apppp)
+ call makemppp(p1,p2,p3,p4,za,zb,amppp,apmpp,appmp,apppm)
+ call makemmpp(p1,p2,p3,p4,za,zb,
+ . ammpp,ampmp,amppm,apmmp,apmpm,appmm)
+
+
+
+ do j=1,3
+ amp(j,2,2,2,2)=apppp(j)
+ amp(j,1,2,2,2)=amppp(j)
+ amp(j,2,1,2,2)=apmpp(j)
+ amp(j,2,2,1,2)=appmp(j)
+ amp(j,2,2,2,1)=apppm(j)
+
+ amp(j,1,1,2,2)=ammpp(j)
+ amp(j,1,2,1,2)=ampmp(j)
+ amp(j,1,2,2,1)=amppm(j)
+ amp(j,2,1,1,2)=apmmp(j)
+ amp(j,2,1,2,1)=apmpm(j)
+ amp(j,2,2,1,1)=appmm(j)
+ enddo
+
+
+c call makepppp(p1,p2,p3,p4,zb,apppp)
+c call makemppp(p1,p2,p3,p4,zb,za,amppp,apmpp,appmp,apppm)
+c call makemmpp(p1,p2,p3,p4,zb,za,
+c . ammpp,ampmp,amppm,apmmp,apmpm,appmm)
+
+c do j=1,3
+c amp(j,1,1,1,1)=apppp(j)
+c amp(j,2,1,1,1)=amppp(j)
+c amp(j,1,2,1,1)=apmpp(j)
+c amp(j,1,1,2,1)=appmp(j)
+c amp(j,1,1,1,2)=apppm(j)
+
+c amp(j,1,1,2,2)=ammpp(j)
+c amp(j,1,2,1,2)=ampmp(j)
+c amp(j,1,2,2,1)=amppm(j)
+c amp(j,2,1,1,2)=apmmp(j)
+c amp(j,2,1,2,1)=apmpm(j)
+c amp(j,2,2,1,1)=appmm(j)
+
+c enddo
+
+ do j=1,3
+ amp(j,1,1,1,1)=dconjg(amp(j,2,2,2,2))
+ amp(j,2,1,1,1)=dconjg(amp(j,1,2,2,2))
+ amp(j,1,2,1,1)=dconjg(amp(j,2,1,2,2))
+ amp(j,1,1,2,1)=dconjg(amp(j,2,2,1,2))
+ amp(j,1,1,1,2)=dconjg(amp(j,2,2,2,1))
+
+ amp(j,1,1,2,2)=dconjg(amp(j,2,2,1,1))
+ amp(j,1,2,1,2)=dconjg(amp(j,2,1,2,1))
+ amp(j,1,2,2,1)=dconjg(amp(j,2,1,1,2))
+ amp(j,2,1,1,2)=dconjg(amp(j,1,2,2,1))
+ amp(j,2,1,2,1)=dconjg(amp(j,1,2,1,2))
+ amp(j,2,2,1,1)=dconjg(amp(j,1,1,2,2))
+ enddo
+
+
+ Hgggg=0d0
+
+ do h1=1,2
+ do h2=1,2
+ do h3=1,2
+ do h4=1,2
+ do j=1,3
+ Hgggg=Hgggg+cdabs(amp(j,h1,h2,h3,h4))**2
+ enddo
+ enddo
+ enddo
+ enddo
+ enddo
+
+C=== (1/4 ---> 1/2) because only three orderings)
+ Hgggg=xn**2*V/2d0*Hgggg
+
+ return
+ end
+
+
+ subroutine makepppp(p1,p2,p3,p4,za,apppp)
+ implicit none
+C Taken from Kauffman hep-ph/9903330
+C and (older formula)
+C %\cite{Kauffman:1996ix}
+C \bibitem{Kauffman:1996ix}
+C R.~P.~Kauffman, S.~V.~Desai and D.~Risal,
+C %``Production of a Higgs boson plus two jets in hadronic collisions,''
+C Phys.\ Rev.\ D {\bf 55}, 4005 (1997)
+C [Erratum-ibid.\ D {\bf 58}, 119901 (1998)]
+C [arXiv:hep-ph/9610541].
+C %%CITATION = HEP-PH 9610541;%%
+ include 'constants.f'
+ include 'masses.f'
+ include 'zprods_decl.f'
+ integer j,p1,p2,p3,p4,i1(4),i2(4),i3(4),i4(4)
+ double complex apppp(3)
+ do j=1,2
+ i1(j)=p1
+ if (j.eq.1) then
+ i2(j)=p2
+ i3(j)=p3
+ i4(j)=p4
+ elseif (j.eq.2) then
+ i2(j)=p2
+ i3(j)=p4
+ i4(j)=p3
+c elseif (j.eq.3) then
+c i2(j)=p4
+c i3(j)=p2
+c i4(j)=p3
+ endif
+C---PRD55 Eq(21)
+ apppp(j)=hmass**4/(za(i1(j),i2(j))*za(i2(j),i3(j))
+ . *za(i3(j),i4(j))*za(i4(j),i1(j)))
+ enddo
+C---determine apppp(3) using sub-cyclic identity
+ apppp(3)=-apppp(1)-apppp(2)
+ return
+ end
+
+
+ subroutine makemppp(p1,p2,p3,p4,za,zb,amppp,apmpp,appmp,apppm)
+ implicit none
+C Taken from Kauffman hep-ph/9903330
+C and (older formula)
+C %\cite{Kauffman:1996ix}
+C \bibitem{Kauffman:1996ix}
+C R.~P.~Kauffman, S.~V.~Desai and D.~Risal,
+C %``Production of a Higgs boson plus two jets in hadronic collisions,''
+C Phys.\ Rev.\ D {\bf 55}, 4005 (1997)
+C [Erratum-ibid.\ D {\bf 58}, 119901 (1998)]
+C [arXiv:hep-ph/9610541].
+C %%CITATION = HEP-PH 9610541;%%
+
+ integer j,k,p1,p2,p3,p4,j1,j2,jk(4),
+ . i1(4),i2(4),i3(4),i4(4),k1(4),k2(4),k3(4),k4(4)
+ double precision s123,s124,s134,s234
+ double complex z2,amppp(3),apmpp(3),appmp(3),apppm(3),temp
+ include 'constants.f'
+ include 'zprods_decl.f'
+ include 'sprods_com.f'
+ data k1/1,2,3,4/
+ data k2/2,3,4,1/
+ data k3/3,4,1,2/
+ data k4/4,1,2,3/
+C---statement function
+ z2(j1,j2)=-za(j1,p1)*zb(p1,j2)-za(j1,p2)*zb(p2,j2)
+ . -za(j1,p3)*zb(p3,j2)-za(j1,p4)*zb(p4,j2)
+C---statement function
+ jk(1)=p1
+ jk(2)=p2
+ jk(3)=p3
+ jk(4)=p4
+ do k=1,4
+ do j=1,2
+ i1(j)=jk(k1(k))
+ if (j.eq.1) then
+ i2(j)=jk(k2(k))
+ i3(j)=jk(k3(k))
+ i4(j)=jk(k4(k))
+ elseif (j.eq.2) then
+ i2(j)=jk(k2(k))
+ i3(j)=jk(k4(k))
+ i4(j)=jk(k3(k))
+c elseif (j.eq.3) then
+c i2(j)=jk(k4(k))
+c i3(j)=jk(k2(k))
+c i4(j)=jk(k3(k))
+ endif
+ s124=s(i1(j),i2(j))+s(i1(j),i4(j))+s(i2(j),i4(j))
+ s123=s(i1(j),i2(j))+s(i1(j),i3(j))+s(i2(j),i3(j))
+ s134=s(i1(j),i3(j))+s(i1(j),i4(j))+s(i3(j),i4(j))
+ s234=s(i2(j),i3(j))+s(i2(j),i4(j))+s(i3(j),i4(j))
+C---PRD55 Eq(22)
+c amppp=
+c . -(z2(p1,p3)*zb(p2,p4))**2
+c . /((s(p1,p2)+s(p1,p4)+s(p2,p4))*s(p1,p2)*s(p1,p4))
+c . -(z2(p1,p4)*zb(p2,p3))**2/((s(p1,p2)+s(p1,p3)+s(p2,p3))*s(p1,p2)*s(p2,p3))
+c . -(z2(p1,p2)*zb(p3,p4))**2/((s(p1,p3)+s(p1,p4)+s(p3,p4))*s(p1,p4)*s(p3,p4))
+c . +zb(p2,p4)/(zb(p1,p2)*za(p2,p3)*za(p3,p4)*zb(p4,p1))
+c . *(+s(p2,p3)*z2(p1,p2)/za(p4,p1)
+c . +s(p3,p4)*z2(p1,p4)/za(p1,p2)-zb(p2,p4)*(s(p2,p3)+s(p2,p4)+s(p3,p4)))
+C---PRD55 Eq(A8+erratum)
+c amppp=
+c . -(z2(p1,p3)*zb(p2,p4))**2/((s(p1,p2)+s(p1,p4)+s(p2,p4))*s(p1,p2)*s(p1,p4))
+c . -(z2(p1,p4)*zb(p2,p3))**2/((s(p1,p2)+s(p1,p3)+s(p2,p3))*s(p1,p2)*s(p2,p3))
+c . -(z2(p1,p2)*zb(p3,p4))**2/((s(p1,p3)+s(p1,p4)+s(p3,p4))*s(p1,p4)*s(p3,p4))
+c . -zb(p2,p4)/(zb(p1,p2)*zb(p1,p4)*za(p1,p3))
+c . *(z2(p1,p2)**2/(za(p1,p4)*za(p3,p4))
+c . +z2(p1,p4)**2/(za(p1,p2)*za(p2,p3)))
+
+C---hep-ph/9903330 Eq(11)
+ temp=
+ . -(z2(i1(j),i3(j))*zb(i2(j),i4(j)))**2
+ . /(s124*s(i1(j),i2(j))*s(i1(j),i4(j)))
+ . -(z2(i1(j),i4(j))*zb(i2(j),i3(j)))**2
+ . /(s123*s(i1(j),i2(j))*s(i2(j),i3(j)))
+ . -(z2(i1(j),i2(j))*zb(i3(j),i4(j)))**2
+ . /(s134*s(i1(j),i4(j))*s(i3(j),i4(j)))
+ . +zb(i2(j),i4(j))/
+ . (zb(i1(j),i2(j))*za(i2(j),i3(j))*za(i3(j),i4(j))*zb(i4(j),i1(j)))
+ . *(s(i2(j),i3(j))*z2(i1(j),i2(j))/za(i4(j),i1(j))
+ . +s(i3(j),i4(j))*z2(i1(j),i4(j))/za(i1(j),i2(j))
+ . -zb(i2(j),i4(j))*s234)
+ if (k.eq.1) amppp(j)=temp
+ if (k.eq.2) apmpp(j)=temp
+ if (k.eq.3) appmp(j)=temp
+ if (k.eq.4) apppm(j)=temp
+ enddo
+ enddo
+C---determine axxxx(3) using sub-cyclic identity
+ amppp(3)=-amppp(1)-amppp(2)
+ apmpp(3)=-apmpp(1)-apmpp(2)
+ appmp(3)=-appmp(1)-appmp(2)
+ apppm(3)=-apppm(1)-apppm(2)
+ return
+ end
+
+
+
+ subroutine makemmpp(p1,p2,p3,p4,za,zb,
+ . ammpp,ampmp,amppm,apmmp,apmpm,appmm)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+C Taken from Kauffman hep-ph/9903330
+C and (older formula)
+C %\cite{Kauffman:1996ix}
+C \bibitem{Kauffman:1996ix}
+C R.~P.~Kauffman, S.~V.~Desai and D.~Risal,
+C %``Production of a Higgs boson plus two jets in hadronic collisions,''
+C Phys.\ Rev.\ D {\bf 55}, 4005 (1997)
+C [Erratum-ibid.\ D {\bf 58}, 119901 (1998)]
+C [arXiv:hep-ph/9610541].
+C %%CITATION = HEP-PH 9610541;%%
+ integer j,k,p1,p2,p3,p4,jk(4),
+ . i1(6),i2(6),i3(6),i4(6),k1(6),k2(6),k3(6),k4(6)
+ double complex temp,
+ . ammpp(3),ampmp(3),amppm(3),apmmp(3),apmpm(3),appmm(3)
+ data k1/1,1,1,2,2,3/
+ data k2/2,3,4,3,4,4/
+ data k3/3,2,2,1,1,1/
+ data k4/4,4,3,4,3,2/
+
+
+ jk(1)=p1
+ jk(2)=p2
+ jk(3)=p3
+ jk(4)=p4
+ do k=1,6
+ do j=1,2
+ if (j.eq.1) then
+ i1(j)=jk(k1(k))
+ i2(j)=jk(k2(k))
+ i3(j)=jk(k3(k))
+ i4(j)=jk(k4(k))
+ elseif (j.eq.2) then
+ i1(j)=jk(k2(k))
+ i2(j)=jk(k1(k))
+ i3(j)=jk(k3(k))
+ i4(j)=jk(k4(k))
+c elseif (j.eq.3) then
+c i1(j)=jk(k2(k))
+c i2(j)=jk(k3(k))
+c i3(j)=jk(k1(k))
+c i4(j)=jk(k4(k))
+ endif
+ temp=
+ . -za(jk(k1(k)),jk(k2(k)))**4/(za(i1(j),i2(j))*za(i2(j),i3(j))
+ . *za(i3(j),i4(j))*za(i4(j),i1(j)))
+ . -zb(jk(k3(k)),jk(k4(k)))**4/(zb(i1(j),i2(j))*zb(i2(j),i3(j))
+ . *zb(i3(j),i4(j))*zb(i4(j),i1(j)))
+ if (k.eq.1) ammpp(j)=temp
+ if (k.eq.2) ampmp(j)=temp
+ if (k.eq.3) amppm(j)=temp
+ if (k.eq.4) apmmp(j)=temp
+ if (k.eq.5) apmpm(j)=temp
+ if (k.eq.6) appmm(j)=temp
+ enddo
+ enddo
+
+C---determine axxxx(3) using sub-cyclic identity
+ ammpp(3)=-ammpp(1)-ammpp(2)
+ ampmp(3)=-ampmp(1)-ampmp(2)
+ amppm(3)=-amppm(1)-amppm(2)
+ apmmp(3)=-apmmp(1)-apmmp(2)
+ apmpm(3)=-apmpm(1)-apmpm(2)
+ appmm(3)=-appmm(1)-appmm(2)
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hgg.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hgg.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hgg.f (revision 1338)
@@ -0,0 +1,127 @@
+ subroutine gg_hgg(p,msq)
+ implicit none
+c---Matrix element squared averaged over initial colors and spins
+c
+c g(-p1)+g(-p2) --> H(p3)+g(p_iglue1=5)+g(p_iglue2=6)
+
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'sprods_com.f'
+ include 'zprods_com.f'
+ integer j,k,iglue1,iglue2
+ double precision p(mxpart,4),Asq,fac
+ double precision Hgggg,Hqagg,Haqgg,Hgqgq,Hgaga,Hqgqg,Hagag,Hggqa
+ double precision
+ . Hqrqr,Hqqqq,
+ . Habab,Haaaa,
+ . Hqarb,Hqaqa,Hqbqb,
+ . Haqbr,Haqaq,Hbqbq
+ double precision msq(-nf:nf,-nf:nf),hdecay,s34
+
+ parameter(iglue1=5,iglue2=6)
+
+
+C---fill spinor products upto maximum number
+ call spinoru(iglue2,p,za,zb)
+
+C Deal with Higgs decay to b-bbar
+ s34=s(3,4)+2d0*mb**2
+ hdecay=xn*gwsq*mbsq/(4d0*wmass**2)*2d0*(s34-4d0*mb**2)
+ hdecay=hdecay/((s34-hmass**2)**2+(hmass*hwidth)**2)
+ Asq=(as/(3d0*pi))**2/vevsq
+ fac=gsq**2*Asq*hdecay
+C--four gluon terms
+ call h4g(1,2,iglue1,iglue2,Hgggg)
+
+C--two quark two gluon terms
+ call hqqgg(1,2,iglue1,iglue2,Hqagg)
+c call hqqgg(2,1,iglue1,iglue2,Haqgg)
+C====symmetric in first two arguments
+ Haqgg=Hqagg
+
+ call hqqgg(1,iglue1,2,iglue2,Hqgqg)
+c call hqqgg(iglue1,1,2,iglue2,Hagag)
+C====symmetric in first two arguments
+ Hagag=Hqgqg
+
+ call hqqgg(2,iglue1,1,iglue2,Hgqgq)
+c call hqqgg(iglue1,2,1,iglue2,Hgaga)
+C====symmetric in first two arguments
+ Hgaga=Hgqgq
+
+ call hqqgg(iglue2,iglue1,1,2,Hggqa)
+
+C---four quark terms
+ call H4qn(1,2,iglue1,iglue2,Hqrqr)
+ call H4qi(1,2,iglue1,iglue2,Hqqqq)
+C---four anti-quark terms
+c call H4qn(iglue1,iglue2,1,2,Habab)
+c call H4qi(iglue1,iglue2,1,2,Haaaa)
+ Habab=Hqrqr
+ Haaaa=Hqqqq
+
+C-qqb
+ call H4qn(1,iglue2,2,iglue1,Hqarb)
+ call H4qi(1,iglue2,2,iglue1,Hqaqa)
+
+ call H4qn(1,iglue2,iglue1,2,Hqbqb)
+
+
+C-qbq
+ Haqbr=Hqarb
+ call H4qi(2,iglue2,1,iglue1,Haqaq)
+ call H4qn(2,iglue2,iglue1,1,Hbqbq)
+
+ do j=fn,nf
+ do k=fn,nf
+ msq(j,k)=0d0
+ if ((j.gt.0).and.(k.gt.0)) then
+ if (j.eq.k) then
+ msq(j,k)=0.5d0*aveqq*fac*Hqqqq
+ else
+ msq(j,k)=aveqq*fac*Hqrqr
+ endif
+ endif
+ if ((j.lt.0).and.(k.lt.0)) then
+ if (j.eq.k) then
+ msq(j,k)=0.5d0*aveqq*fac*Haaaa
+ else
+ msq(j,k)=aveqq*fac*Habab
+ endif
+ endif
+
+ if ((j.gt.0).and.(k.lt.0)) then
+ if (j.eq.-k) then
+ msq(j,k)=aveqq*fac*(0.5d0*Hqagg+Hqaqa+(nf-1)*Hqarb)
+ else
+ msq(j,k)=aveqq*fac*Hqbqb
+ endif
+ endif
+
+ if ((j.lt.0).and.(k.gt.0)) then
+ if (j.eq.-k) then
+ msq(j,k)=aveqq*fac*(0.5d0*Haqgg+Haqaq+dfloat(nf-1)*Haqbr)
+ else
+ msq(j,k)=aveqq*fac*Hbqbq
+ endif
+ endif
+
+ if ((j.gt.0).and.(k.eq.0)) msq(j,0)=aveqg*fac*Hqgqg
+ if ((j.lt.0).and.(k.eq.0)) msq(j,0)=aveqg*fac*Hagag
+
+ if ((j.eq.0).and.(k.gt.0)) msq(0,k)=aveqg*fac*Hgqgq
+ if ((j.eq.0).and.(k.lt.0)) msq(0,k)=aveqg*fac*Hgaga
+
+ if ((j.eq.0).and.(k.eq.0)) then
+ msq(0,0)=avegg*fac*(0.5d0*Hgggg+dfloat(nf)*Hggqa)
+ endif
+
+ enddo
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gs.f (revision 1338)
@@ -0,0 +1,249 @@
+ subroutine gg_hwwg_gs(p,msq)
+
+C NEW: Same as gg_hg_gs but with H->WW
+
+C 5->7, 6->8 in calls to dips for ip,jp,kp
+
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c g(-p1)+g(-p2) --> H(->p3+p4+p5+p6) + parton(p7) + parton(p8)
+
+
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+c --- remember: nd will count the dipoles
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision
+ & msq15_2(-nf:nf,-nf:nf),msq25_1(-nf:nf,-nf:nf),
+ & msq16_2(-nf:nf,-nf:nf),msq26_1(-nf:nf,-nf:nf),
+ & msq15_6(-nf:nf,-nf:nf),msq26_5(-nf:nf,-nf:nf),
+ & msq16_5(-nf:nf,-nf:nf),msq25_6(-nf:nf,-nf:nf),
+ & msq56_1v(-nf:nf,-nf:nf),msq56_2v(-nf:nf,-nf:nf),
+ & msq26_5v(-nf:nf,-nf:nf),msq26_1v(-nf:nf,-nf:nf),
+ & msq15_6v(-nf:nf,-nf:nf),msq16_2v(-nf:nf,-nf:nf),
+ & msq16_5v(-nf:nf,-nf:nf),msq25_6v(-nf:nf,-nf:nf),
+ & msq15_2v(-nf:nf,-nf:nf),msq25_1v(-nf:nf,-nf:nf),
+ & dummy(-nf:nf,-nf:nf),
+ & sub15_2(4),sub25_1(4),sub16_2(4),sub26_1(4),
+ & sub15_6(4),sub16_5(4),sub25_6(4),sub26_5(4),
+ & sub56_1(4),sub56_2(4),sub56_1v,sub56_2v,
+ & sub26_5v,sub26_1v,sub16_5v,sub16_2v,sub15_2v,sub15_6v,sub25_6v,
+ & sub25_1v
+ external qqb_hww_g,gg_hwwg_gvec
+ ndmax=6
+
+c--- calculate all the initial-initial dipoles
+ call dips(1,p,1,7,2,sub15_2,sub15_2v,msq15_2,msq15_2v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(2,p,2,7,1,sub25_1,sub25_1v,msq25_1,msq25_1v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(3,p,1,8,2,sub16_2,sub16_2v,msq16_2,msq16_2v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(4,p,2,8,1,sub26_1,sub26_1v,msq26_1,msq26_1v,
+ . qqb_hww_g,gg_hwwg_gvec)
+
+c--- now the basic initial final ones
+ call dips(5,p,1,7,8,sub15_6,sub15_6v,msq15_6,msq15_6v,
+ . qqb_hww_g,gg_hwwg_gvec)
+c--- called for final initial the routine only supplies new values for
+c--- sub... and sub...v and msqv
+ call dips(5,p,7,8,1,sub56_1,sub56_1v,dummy,msq56_1v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(5,p,1,8,7,sub16_5,sub16_5v,msq16_5,msq16_5v,
+ . qqb_hww_g,gg_hwwg_gvec)
+
+ call dips(6,p,2,8,7,sub26_5,sub26_5v,msq26_5,msq26_5v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(6,p,7,8,2,sub56_2,sub56_2v,dummy,msq56_2v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(6,p,2,7,8,sub25_6,sub25_6v,msq25_6,msq25_6v,
+ . qqb_hww_g,gg_hwwg_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+ enddo
+ enddo
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+c--- do only q-qb and qb-q cases
+ if ( ((j .gt. 0).and.(k .lt. 0))
+ . .or. ((j .lt. 0).and.(k .gt. 0))) then
+ msq(1,j,k)=-msq15_2(j,k)*sub15_2(qq)/xn
+ msq(2,j,k)=-msq25_1(j,k)*sub25_1(qq)/xn
+ msq(3,j,k)=-msq16_2(j,k)*sub16_2(qq)/xn
+ msq(4,j,k)=-msq26_1(j,k)*sub26_1(qq)/xn
+ msq(5,j,k)=xn*(
+ . +msq15_6(j,k)*(sub15_6(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v
+ . +msq16_5(j,k)*(sub16_5(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=xn*(
+ . (msq26_5(j,k)*(sub26_5(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v)
+ . +(msq25_6(j,k)*(sub25_6(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v))
+
+c--- note statistical factor of one half for two gluons in the final state
+ do nd=1,ndmax
+ msq(nd,j,k)=half*msq(nd,j,k)
+ enddo
+
+ elseif ((k .eq. 0).and. (j .ne. 0)) then
+c--- q-g and qb-g cases
+ msq(1,j,k)=(aveqg/avegg)*(
+ . msq15_2(0,0)*sub15_2(gq)+msq15_2v(0,0)*sub15_2v)
+ msq(2,j,k)=2d0*tr*(msq25_1(j,-5)+msq25_1(j,-4)+msq25_1(j,-3)
+ . +msq25_1(j,-2)+msq25_1(j,-1)+msq25_1(j,+1)
+ . +msq25_1(j,+2)+msq25_1(j,+3)+msq25_1(j,+4)
+ . +msq25_1(j,+5))*sub25_1(qg)
+ msq(3,j,k)=xn*msq16_2(j,k)*sub16_2(qq)
+ msq(4,j,k)=xn*(msq26_1(j,k)*sub26_1(gg)+msq26_1v(j,k)*sub26_1v)
+ msq(5,j,k)=-msq16_5(j,k)*(sub16_5(qq)+sub56_1(qq))/xn
+ msq(6,j,k)=xn*(msq26_5(j,k)*sub26_5(gg)+msq26_5v(j,k)*sub26_5v
+ . +msq26_5(j,k)*sub56_2(qq))
+
+ elseif ((j .eq. 0).and.(k.ne.0)) then
+c--- g-q and g-qb cases
+ msq(1,j,k)=2d0*tr*(msq15_2(-5,k)+msq15_2(-4,k)+msq15_2(-3,k)
+ . +msq15_2(-2,k)+msq15_2(-1,k)+msq15_2(+1,k)
+ . +msq15_2(+2,k)+msq15_2(+3,k)+msq15_2(+4,k)
+ . +msq15_2(+5,k))*sub15_2(qg)
+ msq(2,j,k)=(aveqg/avegg)*(
+ . msq25_1(0,0)*sub25_1(gq)+msq25_1v(0,0)*sub25_1v)
+ msq(3,j,k)=xn*(msq16_2(j,k)*sub16_2(gg)+msq16_2v(j,k)*sub16_2v)
+ msq(4,j,k)=xn*msq26_1(j,k)*sub26_1(qq)
+ msq(5,j,k)=xn*(msq16_5(j,k)*sub16_5(gg)+msq16_5v(j,k)*sub16_5v
+ . +msq16_5(j,k)*sub56_1(qq))
+ msq(6,j,k)=-msq26_5(j,k)*(sub26_5(qq)+sub56_2(qq))/xn
+
+ elseif ((j .eq. 0).and.(k .eq. 0)) then
+c--- g-g case
+c--- first set of subtractions take care of gg->qbq, second set gg->gg;
+c--- note g,g = 1,2 and qb=5, q=6 so (15),(25)-->q and (16),(26)-->qb
+ msq(1,j,k)=(msq15_2(+1,k)+msq15_2(+2,k)+msq15_2(+3,k)
+ . +msq15_2(+4,k)+msq15_2(+5,k))*sub15_2(qg)*2d0*tr
+ msq(2,j,k)=(msq25_1(k,+1)+msq25_1(k,+2)+msq25_1(k,+3)
+ . +msq25_1(k,+4)+msq25_1(k,+5))*sub25_1(qg)*2d0*tr
+ msq(3,j,k)=(msq16_2(-5,k)+msq16_2(-4,k)+msq16_2(-3,k)
+ . +msq16_2(-2,k)+msq16_2(-1,k))*sub16_2(qg)*2d0*tr
+ msq(4,j,k)=(msq26_1(k,-5)+msq26_1(k,-4)+msq26_1(k,-3)
+ . +msq26_1(k,-2)+msq26_1(k,-1))*sub26_1(qg)*2d0*tr
+ msq(5,j,k)=dfloat(nf)*half*(
+ .+msq16_5(j,k)*sub56_1(gq)-msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=dfloat(nf)*half*(
+ .+msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ msq(1,j,k)=msq(1,j,k)+half*xn*(
+ . msq15_2(j,k)*sub15_2(gg)+msq15_2v(j,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*xn*(
+ . msq25_1(j,k)*sub25_1(gg)+msq25_1v(j,k)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*xn*(
+ . msq16_2(j,k)*sub16_2(gg)+msq16_2v(j,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*xn*(
+ . msq26_1(j,k)*sub26_1(gg)+msq26_1v(j,k)*sub26_1v)
+ msq(5,j,k)=msq(5,j,k)+half*xn*(
+ . msq15_6(j,k)*sub15_6(gg)+msq15_6v(j,k)*sub15_6v
+ .+msq16_5(j,k)*sub16_5(gg)+msq16_5v(j,k)*sub16_5v
+ .+msq16_5(j,k)*sub56_1(gg)+msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=msq(6,j,k)+half*xn*(
+ . msq25_6(j,k)*sub25_6(gg)+msq25_6v(j,k)*sub25_6v
+ .+msq26_5(j,k)*sub26_5(gg)+msq26_5v(j,k)*sub26_5v
+ .+msq26_5(j,k)*sub56_2(gg)+msq56_2v(j,k)*sub56_2v)
+ endif
+
+
+ enddo
+ enddo
+c endif
+
+c return
+c--- Start of the 4Q contribution
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if ((j .gt. 0) .and. (k .gt. 0)) then
+c--- Q Q - different flavours
+ if (j .ne. k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+c--- Q Q - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+
+ elseif ((j .lt. 0).and.(k .lt. 0)) then
+ if (j .ne. k) then
+c--- QBAR QBAR - different flavours
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+c--- QBAR QBAR - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+
+ elseif ((j .gt. 0).and.(k .lt. 0)) then
+c--- Q QBAR
+ if (j .eq. -k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+c--- QBAR Q
+ elseif ((j .lt. 0).and.(k .gt. 0)) then
+ if (j .eq. -k) then
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+
+ endif
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_v.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_v.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_v.f (revision 1338)
@@ -0,0 +1,102 @@
+CC NEW: gg->Hg virtual contribution with H->ZZ decay
+
+
+ subroutine gg_hzzg_v(p,msq)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'sprods_com.f'
+ include 'scheme.f'
+ include 'zcouple.f'
+
+C (Taken from Ravindran, Smith, van Neerven hep-ph/0201114)
+C Modified by overall factors
+ integer iglue,j,k
+ double precision p(4,mxpart),msq(fn:nf,fn:nf)
+ double precision ss,tt,uu,s34,
+ . virtgg,virtqa,virtaq,virtqg,virtgq,hdecay,Asq,fac,shiggs
+ double precision dec,decay,interf,num,den
+
+ parameter(iglue=7) ! gluon label
+
+ logical int
+ common/int/int
+
+ scheme='tH-V'
+
+ call dotem(iglue,p,s)
+ ss=s(1,2)
+ tt=s(1,iglue)
+ uu=s(2,iglue)
+
+ Asq=(as/(3d0*pi))**2/vevsq
+
+
+
+ shiggs=s(3,4)+s(3,5)+s(3,6)+s(4,5)+s(4,6)+s(5,6)
+ interf=0d0
+
+
+
+ decay=(((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+ . +((r1*l2)**2+(r2*l1)**2)*s(3,6)*s(4,5))
+
+
+ decay=decay/((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)
+ decay=decay/((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+C Here only H->ZZ->(34)(56): diagram with (1<->3) accounted for
+C by adding a factor 2
+
+ if(int.eqv..false.)goto 39
+
+ decay=2*decay
+
+
+C Interference contribution (check if factor 2 is there !)
+
+ interf=2*((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+
+ num=((s(3,4)-zmass**2)*(s(5,6)-zmass**2)*(s(4,5)-zmass**2)*
+ . (s(3,6)-zmass**2)+(zmass*zwidth)**4+
+ . (zmass*zwidth)**2*(2*zmass**4-zmass**2*
+ . (s(3,4)+s(5,6)+s(4,5)+s(3,6))+s(3,4)*s(3,6)+s(3,4)*s(4,5)+
+ . s(3,6)*s(5,6)+s(4,5)*s(5,6)-s(3,6)*s(4,5)-s(3,4)*s(5,6)))
+
+ den=((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(4,5)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(3,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+
+ interf=interf*num/den
+
+ 39 continue
+
+ dec=gwsq**3*zmass**2*4d0*xw**2/(one-xw)*
+ . (decay+interf)/((shiggs-hmass**2)**2+(hmass*hwidth)**2)
+
+
+C In case of identical particles add 1/4 symmetry factor
+
+ if(int) dec=dec/4
+
+
+ fac=ason2pi*Asq*gsq*dec
+ call hjetfill(ss,tt,uu,virtgg,virtqa,virtaq,virtqg,virtgq)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ if ((j.eq.0).and.(k.eq.0)) msq(j,k)=avegg*fac*virtgg
+ if ((j.gt.0).and.(k.eq.-j)) msq(j,k)=aveqq*fac*virtqa
+ if ((j.lt.0).and.(k.eq.-j)) msq(j,k)=aveqq*fac*virtaq
+ if ((j.eq.0).and.(k.ne.0)) msq(j,k)=aveqg*fac*virtgq
+ if ((j.ne.0).and.(k.eq.0)) msq(j,k)=aveqg*fac*virtqg
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_v.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_v.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_v.f (revision 1338)
@@ -0,0 +1,162 @@
+CCCC P.S. subroutine qqb_z1jet_v(p,msq) modification to catch alphas^2 contrib
+ subroutine qqb_z1jet_v(p,msq,msq0ps)
+ implicit none
+************************************************************************
+* Authors: R.K. Ellis and John Campbell *
+* May, 2001. *
+* Matrix element for Z + jet production *
+* in order alpha_s^2 *
+* averaged over initial colours and spins *
+* q(-p1)+qbar(-p2)-->Z^+(l(p3)+a(p4))+g(p5) *
+************************************************************************
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcharge.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+ include 'sprods_com.f'
+ include 'zprods_com.f'
+ include 'epinv.f'
+ include 'scheme.f'
+ integer j,k,
+ . iqqbgLL(5),iqqbgLR(5),iqqbgRL(5),iqqbgRR(5),
+ . iqgqLL(5),iqgqLR(5),iqgqRL(5),iqgqRR(5),
+ . igqqLL(5),igqqLR(5),igqqRL(5),igqqRR(5)
+ double precision msq(-nf:nf,-nf:nf),msq0(-nf:nf,-nf:nf),
+ . p(mxpart,4),fac,sz,virt5,subuv
+ double precision qqbZgLL,qqbZgRR,qqbZgLR,qqbZgRL
+ double precision gqZqLL,gqZqRR,gqZqLR,gqZqRL
+ double precision qgZqLL,qgZqRR,qgZqLR,qgZqRL
+ double precision qbqZgLL,qbqZgRR,qbqZgLR,qbqZgRL
+ double precision gqbZqbLL,gqbZqbRR,gqbZqbLR,gqbZqbRL
+ double precision qbgZqbLL,qbgZqbRR,qbgZqbLR,qbgZqbRL
+ double complex prop
+c P.S..
+ double precision msq0ps(-nf:nf,-nf:nf)
+c P.S. end
+
+ data iqqbgLL/1,2,3,4,5/,iqqbgRR/2,1,4,3,5/
+ data iqqbgRL/2,1,3,4,5/,iqqbgLR/1,2,4,3,5/
+
+ data iqgqLL/1,5,3,4,2/,iqgqRR/5,1,4,3,2/
+ data iqgqRL/5,1,3,4,2/,iqgqLR/1,5,4,3,2/
+
+ data igqqLL/2,5,3,4,1/,igqqRR/5,2,4,3,1/
+ data igqqRL/5,2,3,4,1/,igqqLR/2,5,4,3,1/
+
+ scheme='dred'
+c--set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+c P.S..
+ msq0ps(j,k) = 0d0
+c P.S. end
+ enddo
+ enddo
+
+c--calculate spinor and dot-products (using BDK type notation)
+ call spinoru(5,p,za,zb)
+
+c---protect from soft and collinear singularities
+c if ((abs(s(1,5)).lt.cutoff) .or. (abs(s(2,5)).lt.cutoff)) return
+
+c--- calculate lowest order
+ call qqb_z1jet(p,msq0)
+
+c----UV counterterm contains the finite renormalization to arrive
+c----at MS bar scheme.
+ subuv=ason2pi*xn*(epinv*(11d0-2d0*dble(nf)/xn)-1d0)/6d0
+
+c-- calculate propagator
+ sz=s(3,4)
+ prop=sz/dcmplx((sz-zmass**2),zmass*zwidth)
+
+ fac=8d0*cf*xnsq*esq**2*gsq
+
+ qqbZgLL=aveqq*fac*virt5(iqqbgLL,za,zb)
+ qqbZgLR=aveqq*fac*virt5(iqqbgLR,za,zb)
+ qqbZgRL=aveqq*fac*virt5(iqqbgRL,za,zb)
+ qqbZgRR=aveqq*fac*virt5(iqqbgRR,za,zb)
+
+ qbqZgLL=qqbZgRL
+ qbqZgLR=qqbZgRR
+ qbqZgRL=qqbZgLL
+ qbqZgRR=qqbZgLR
+
+ gqZqLL=aveqg*fac*virt5(igqqLL,za,zb)
+ gqZqLR=aveqg*fac*virt5(igqqLR,za,zb)
+ gqZqRL=aveqg*fac*virt5(igqqRL,za,zb)
+ gqZqRR=aveqg*fac*virt5(igqqRR,za,zb)
+
+ gqbZqbRL=gqZqLL
+ gqbZqbRR=gqZqLR
+ gqbZqbLL=gqZqRL
+ gqbZqbLR=gqZqRR
+
+ qgZqLL=aveqg*fac*virt5(iqgqLL,za,zb)
+ qgZqLR=aveqg*fac*virt5(iqgqLR,za,zb)
+ qgZqRL=aveqg*fac*virt5(iqgqRL,za,zb)
+ qgZqRR=aveqg*fac*virt5(iqgqRR,za,zb)
+
+ qbgZqbRL=qgZqLL
+ qbgZqbRR=qgZqLR
+ qbgZqbLL=qgZqRL
+ qbgZqbLR=qgZqRR
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+c P.S.
+ msq0ps(j,k) = msq0ps(j,k) + ( -subuv*msq0(j,k) )
+c P.S. end
+
+ if( j .ne. 0 .and. k .ne. 0 .and. j .ne. -k) goto 19
+
+ if ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(j,k)=0d0
+ elseif ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=+cdabs(Q(j)*q1+L(j)*l1*prop)**2*qqbZgLL
+ . +cdabs(Q(j)*q1+R(j)*r1*prop)**2*qqbZgRR
+ . +cdabs(Q(j)*q1+L(j)*r1*prop)**2*qqbZgLR
+ . +cdabs(Q(j)*q1+R(j)*l1*prop)**2*qqbZgRL
+ . -subuv*msq0(j,k)
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=+cdabs(Q(k)*q1+L(k)*l1*prop)**2*qbqZgLL
+ . +cdabs(Q(k)*q1+R(k)*r1*prop)**2*qbqZgRR
+ . +cdabs(Q(k)*q1+L(k)*r1*prop)**2*qbqZgLR
+ . +cdabs(Q(k)*q1+R(k)*l1*prop)**2*qbqZgRL
+ . -subuv*msq0(j,k)
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=+cdabs(Q(j)*q1+L(j)*l1*prop)**2*qgZqLL
+ . +cdabs(Q(j)*q1+R(j)*r1*prop)**2*qgZqRR
+ . +cdabs(Q(j)*q1+L(j)*r1*prop)**2*qgZqLR
+ . +cdabs(Q(j)*q1+R(j)*l1*prop)**2*qgZqRL
+ . -subuv*msq0(j,k)
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=+cdabs(Q(-j)*q1+L(-j)*l1*prop)**2*qbgZqbLL
+ . +cdabs(Q(-j)*q1+R(-j)*r1*prop)**2*qbgZqbRR
+ . +cdabs(Q(-j)*q1+L(-j)*r1*prop)**2*qbgZqbLR
+ . +cdabs(Q(-j)*q1+R(-j)*l1*prop)**2*qbgZqbRL
+ . -subuv*msq0(j,k)
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=+cdabs(Q(k)*q1+L(k)*l1*prop)**2*gqZqLL
+ . +cdabs(Q(k)*q1+R(k)*r1*prop)**2*gqZqRR
+ . +cdabs(Q(k)*q1+L(k)*r1*prop)**2*gqZqLR
+ . +cdabs(Q(k)*q1+R(k)*l1*prop)**2*gqZqRL
+ . -subuv*msq0(j,k)
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=+cdabs(Q(-k)*q1+L(-k)*l1*prop)**2*gqbZqbLL
+ . +cdabs(Q(-k)*q1+R(-k)*r1*prop)**2*gqbZqbRR
+ . +cdabs(Q(-k)*q1+L(-k)*r1*prop)**2*gqbZqbLR
+ . +cdabs(Q(-k)*q1+R(-k)*l1*prop)**2*gqbZqbRL
+ . -subuv*msq0(j,k)
+ endif
+
+ 19 continue
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/A51.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/A51.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/A51.f (revision 1338)
@@ -0,0 +1,37 @@
+ double complex function A51(j1,j2,j3,j4,j5,za,zb)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ include 'sprods_com.f'
+ include 'scale.f'
+ include 'epinv.f'
+ integer j1,j2,j3,j4,j5
+ double complex Vcc,Fcc,Vsc,Fsc,l12,l23,L0,L1,Lsm1,A5lom
+ double complex lnrat
+
+C -i * A5tree
+ A5lom =-za(j3,j4)**2/(za(j1,j2)*za(j2,j3)*za(j4,j5))
+ l12=lnrat(musq,-s(j1,j2))
+ l23=lnrat(musq,-s(j2,j3))
+
+C--leading N
+ Vcc=
+ . -(epinv**2+epinv*l12+0.5d0*l12**2)
+ . -(epinv**2+epinv*l23+0.5d0*l23**2)
+ . -2d0*(epinv+l23)-4d0
+
+ Fcc=za(j3,j4)**2/(za(j1,j2)*za(j2,j3)*za(j4,j5))
+ . *(Lsm1(-s(j1,j2),-s(j4,j5),-s(j2,j3),-s(j4,j5))
+ . -2d0*za(j3,j1)*zb(j1,j5)*za(j5,j4)/za(j3,j4)
+ . *L0(-s(j2,j3),-s(j4,j5))/s(j4,j5))
+
+ Vsc =0.5d0*(epinv+l23)+1d0
+ Fsc =za(j3,j4)*za(j3,j1)*zb(j1,j5)*za(j5,j4)
+ . /(za(j1,j2)*za(j2,j3)*za(j4,j5))*L0(-s(j2,j3),-s(j4,j5))/s(j4,j5)
+ . +0.5d0*(za(j3,j1)*zb(j1,j5))**2*za(j4,j5)
+ . /(za(j1,j2)*za(j2,j3))*L1(-s(j2,j3),-s(j4,j5))/s(j4,j5)**2
+
+ A51=(Vcc+Vsc)*A5Lom+Fcc+Fsc
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_z.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_z.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_z.f (revision 1338)
@@ -0,0 +1,79 @@
+ subroutine qqb_w1jet_z(p,z)
+************************************************************************
+* Authors: R.K. Ellis and John M. Campbell *
+* November, 2001. *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'PR_new.f'
+ include 'agq.f'
+ integer is
+ double precision z,xl12,xl15,xl25,p(mxpart,4),dot
+ double precision ii_qq,ii_qg,ii_gq,ii_gg,
+ . if_qq,if_gg,
+ . fi_qq,fi_gg
+
+ xl12=dlog(+two*dot(p,1,2)/musq)
+ xl15=dlog(-two*dot(p,1,5)/musq)
+ xl25=dlog(-two*dot(p,2,5)/musq)
+
+c if (Gflag) then
+c--- sum over regular and plus terms
+ do is=1,3
+c--- (q,qb) terms
+ Q1(q,q,a,is) =ason4pi*xn*(if_qq(z,xl15,is)+0.5d0*fi_gg(z,xl15,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q1(a,a,q,is)=Q1(q,q,a,is)
+ Q2(a,a,q,is) =ason4pi*xn*(if_qq(z,xl25,is)+0.5d0*fi_gg(z,xl25,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q2(q,q,a,is) =Q2(a,a,q,is)
+
+c--- (q,g)
+ Q2(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl25,is)+fi_qq(z,xl25,is))
+ Q1(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl15,is)+fi_qq(z,xl15,is))/xnsq)
+ Q2(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (qb,g)
+ Q2(g,g,a,is)=Q2(g,g,q,is)
+ Q1(a,a,g,is)=Q1(q,q,g,is)
+ Q2(q,g,a,is)=Q2(a,g,q,is)
+
+c--- (g,q)
+ Q1(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl15,is)+fi_qq(z,xl15,is))
+ Q2(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl25,is)+fi_qq(z,xl25,is))/xnsq)
+ Q1(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (g,qb)
+ Q1(g,g,a,is)=Q1(g,g,q,is)
+ Q2(a,a,g,is)=Q2(q,q,g,is)
+ Q1(q,g,a,is)=Q1(a,g,q,is)
+
+c--- (g,g)
+ Q1(q,g,g,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+ Q1(a,g,g,is)=Q1(q,g,g,is)
+ Q2(q,g,g,is)=Q1(q,g,g,is)
+ Q2(a,g,g,is)=Q1(q,g,g,is)
+
+ enddo
+c endif
+
+c if (Qflag) then
+ do is=1,3
+ Q1(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q2(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q1(g,a,a,is)=Q1(g,q,q,is)
+ Q2(g,a,a,is)=Q2(g,q,q,is)
+ Q1(g,a,q,is)=Q1(g,q,q,is)
+ Q2(g,a,q,is)=Q2(g,q,q,is)
+ Q1(g,q,a,is)=Q1(g,q,q,is)
+ Q2(g,q,a,is)=Q2(g,q,q,is)
+
+ enddo
+c endif
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/A52.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/A52.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/A52.f (revision 1338)
@@ -0,0 +1,47 @@
+ double complex function A52(j1,j2,j3,j4,j5,za,zb)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ include 'sprods_com.f'
+ include 'scale.f'
+ include 'epinv.f'
+ integer j1,j2,j3,j4,j5
+ double complex Vcc,Fcc,Vsc,Fsc,l12,l45,L0,L1,Lsm1,A5lom
+ double complex lnrat
+
+ l12=lnrat(musq,-s(j1,j2))
+ l45=lnrat(musq,-s(j4,j5))
+C -i * A5tree
+ A5lom=za(j2,j4)**2/(za(j2,j3)*za(j3,j1)*za(j4,j5))
+ Vcc=-(epinv**2+epinv*l12+0.5d0*l12**2)
+ . -2d0*(epinv+l45)-4d0
+
+C--subleading N
+ Fcc=-za(j2,j4)**2/(za(j2,j3)*za(j3,j1)*za(j4,j5))
+ . *Lsm1(-s(j1,j2),-s(j4,j5),-s(j1,j3), -s(j4,j5))
+ . +za(j2,j4)*(za(j1,j2)*za(j3,j4)-za(j1,j4)*za(j2,j3))
+ . /(za(j2,j3)*za(j1,j3)**2*za(j4,j5))
+ . *Lsm1(-s(j1,j2),-s(j4,j5),-s(j2,j3),-s(j4,j5))
+ . +2d0*zb(j1,j3)*za(j1,j4)*za(j2,j4)/(za(j1,j3)*za(j4,j5))
+ . *L0(-s(j2,j3),-s(j4,j5))/s(j4,j5)
+
+ Vsc=0.5d0*(epinv+l45)+0.5d0
+ Fsc=za(j1,j4)**2*za(j2,j3)/(za(j1,j3)**3*za(j4,j5))
+ . *Lsm1(-s(j1,j2),-s(j4,j5),-s(j2,j3),-s(j4,j5))
+ . -0.5d0*(za(j4,j1)*zb(j1,j3))**2*za(j2,j3)/(za(j1,j3)*za(j4,j5))
+ . *L1(-s(j4,j5),-s(j2,j3))/s(j2,j3)**2
+ . +za(j1,j4)**2*za(j2,j3)*zb(j3,j1)/(za(j1,j3)**2*za(j4,j5))
+ . *L0(-s(j4,j5),-s(j2,j3))/s(j2,j3)
+ . -za(j2,j1)*zb(j1,j3)*za(j4,j3)*zb(j3,j5)/za(j1,j3)
+ . *L1(-s(j4,j5),-s(j1,j2))/s(j1,j2)**2
+ . -za(j2,j1)*zb(j1,j3)*za(j3,j4)*za(j1,j4)/(za(j1,j3)**2*za(j4,j5))
+ . *L0(-s(j4,j5),-s(j1,j2))/s(j1,j2)
+ . -0.5d0*zb(j3,j5)*(zb(j1,j3)*zb(j2,j5)+zb(j2,j3)*zb(j1,j5))
+ . /(zb(j1,j2)*zb(j2,j3)*za(j1,j3)*zb(j4,j5))
+
+ A52=(Vcc+Vsc)*A5lom+Fcc+Fsc
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_z.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_z.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_z.f (revision 1338)
@@ -0,0 +1,84 @@
+ subroutine gg_hzzg_z(p,z)
+************************************************************************
+* Authors: R.K. Ellis and John M. Campbell *
+* November, 2001. *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'PR_new.f'
+ include 'agq.f'
+ integer is
+ double precision z,xl12,xl17,xl27,p(mxpart,4),dot
+ double precision ii_qq,ii_qg,ii_gq,ii_gg,
+ . if_qq,if_gg,
+ . fi_qq,fi_gg
+
+ xl12=dlog(+two*dot(p,1,2)/musq)
+ xl17=dlog(-two*dot(p,1,7)/musq)
+ xl27=dlog(-two*dot(p,2,7)/musq)
+
+c--- sum over regular and plus terms
+ do is=1,3
+c--- (q,qb) terms
+ Q1(q,q,a,is) =ason4pi*xn*(if_qq(z,xl17,is)+0.5d0*fi_gg(z,xl17,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q1(a,a,q,is)=Q1(q,q,a,is)
+ Q2(a,a,q,is) =ason4pi*xn*(if_qq(z,xl27,is)+0.5d0*fi_gg(z,xl27,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q2(q,q,a,is) =Q2(a,a,q,is)
+
+c--- (q,g)
+ Q1(g,q,g,is)=ason4pi*two*cf*ii_gq(z,xl12,is)
+ Q2(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl27,is)+fi_qq(z,xl27,is))
+ Q1(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl17,is)+fi_qq(z,xl17,is))/xnsq)
+ Q2(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (qb,g)
+ Q1(g,a,g,is)=Q1(g,q,g,is)
+ Q2(g,g,a,is)=Q2(g,g,q,is)
+ Q1(a,a,g,is)=Q1(q,q,g,is)
+ Q2(q,g,a,is)=Q2(a,g,q,is)
+
+c--- (g,q)
+ Q2(g,q,g,is)=ason4pi*two*cf*ii_gq(z,xl12,is)
+ Q1(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl17,is)+fi_qq(z,xl17,is))
+ Q2(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl27,is)+fi_qq(z,xl27,is))/xnsq)
+ Q1(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (g,qb)
+ Q2(g,a,g,is)=Q2(g,q,g,is)
+ Q1(g,g,a,is)=Q1(g,g,q,is)
+ Q2(a,a,g,is)=Q2(q,q,g,is)
+ Q1(q,g,a,is)=Q1(a,g,q,is)
+
+c--- (g,g)
+ Q1(q,g,g,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+ Q1(a,g,g,is)=Q1(q,g,g,is)
+ Q2(q,g,g,is)=Q1(q,g,g,is)
+ Q2(a,g,g,is)=Q1(q,g,g,is)
+
+ Q1(g,g,g,is)=ason4pi*(
+ . +xn*(ii_gg(z,xl12,is)+if_gg(z,xl17,is)+half*fi_gg(z,xl17,is)))
+ Q2(g,g,g,is)=ason4pi*(
+ . +xn*(ii_gg(z,xl12,is)+if_gg(z,xl27,is)+half*fi_gg(z,xl27,is)))
+
+ enddo
+
+ do is=1,3
+ Q1(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q2(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q1(g,a,a,is)=Q1(g,q,q,is)
+ Q2(g,a,a,is)=Q2(g,q,q,is)
+ Q1(g,a,q,is)=Q1(g,q,q,is)
+ Q2(g,a,q,is)=Q2(g,q,q,is)
+ Q1(g,q,a,is)=Q1(g,q,q,is)
+ Q2(g,q,a,is)=Q2(g,q,q,is)
+
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_h_v.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_h_v.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_h_v.f (revision 1338)
@@ -0,0 +1,32 @@
+ subroutine gg_h_v(p,msqv)
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'scale.f'
+ double precision msq(-nf:nf,-nf:nf),msqv(-nf:nf,-nf:nf),
+ . p(mxpart,4),dot,xl12
+ integer j,k
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msqv(j,k)=0d0
+ enddo
+ enddo
+
+ call gg_h(p,msq)
+ xl12=log(two*dot(p,1,2)/musq)
+
+c--sum of virtual diagram in DRED and UV counterterm including
+C--term required to bring into the MSbar scheme
+ scheme='dred'
+
+ msqv(0,0)=ason2pi*xn*2d0*(
+ . -epinv*(epinv2-xl12)-0.5d0*xl12**2+11d0/6d0+0.5d0*pisq
+ . -((11d0-two*dble(nf)/xn)*epinv-1d0)/6d0)*msq(0,0)
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_gs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_gs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_gs.f (revision 1338)
@@ -0,0 +1,197 @@
+ subroutine qqb_z1jet_gs(p,msq)
+************************************************************************
+* Author: R.K. Ellis *
+* September, 1999. *
+* Matrix element SUBTRACTION squared averag'd over init'l colors *
+* and spins *
+c q(-p1)+qbar(-p2) --> Z + parton(p5) + parton(p6) *
+c | *
+c -->l(p3)+a(p4) *
+************************************************************************
+
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+c --- remember: nd will count the dipoles
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision
+ & msq15_2(-nf:nf,-nf:nf),msq25_1(-nf:nf,-nf:nf),
+ & msq16_2(-nf:nf,-nf:nf),msq26_1(-nf:nf,-nf:nf),
+ & msq15_6(-nf:nf,-nf:nf),msq26_5(-nf:nf,-nf:nf),
+ & msq16_5(-nf:nf,-nf:nf),msq25_6(-nf:nf,-nf:nf),
+ & msq56_1v(-nf:nf,-nf:nf),msq56_2v(-nf:nf,-nf:nf),
+ & msq26_5v(-nf:nf,-nf:nf),msq26_1v(-nf:nf,-nf:nf),
+ & msq15_6v(-nf:nf,-nf:nf),msq16_2v(-nf:nf,-nf:nf),
+ & msq16_5v(-nf:nf,-nf:nf),msq25_6v(-nf:nf,-nf:nf),
+ & msq25_1v(-nf:nf,-nf:nf),
+ & msq15_2v(-nf:nf,-nf:nf),
+ & dummy(-nf:nf,-nf:nf),
+ & sub15_2(4),sub25_1(4),sub16_2(4),sub26_1(4),
+ & sub15_6(4),sub16_5(4),sub25_6(4),sub26_5(4),
+ & sub56_1(4),sub56_2(4),sub56_1v,sub56_2v,
+ & sub26_5v,sub25_1v,sub26_1v,sub16_5v,sub16_2v,sub15_2v,sub15_6v,
+ & sub25_6v
+ external qqb_z1jet,qqb_z_gvec
+ ndmax=6
+
+c--- calculate all the initial-initial dipoles
+ call dips(1,p,1,5,2,sub15_2,sub15_2v,msq15_2,msq15_2v,
+ . qqb_z1jet,qqb_z_gvec)
+ call dips(2,p,2,5,1,sub25_1,sub25_1v,msq25_1,msq25_1v,
+ . qqb_z1jet,qqb_z_gvec)
+ call dips(3,p,1,6,2,sub16_2,sub16_2v,msq16_2,msq16_2v,
+ . qqb_z1jet,qqb_z_gvec)
+ call dips(4,p,2,6,1,sub26_1,sub26_1v,msq26_1,msq26_1v,
+ . qqb_z1jet,qqb_z_gvec)
+
+c--- now the basic initial final ones
+ call dips(5,p,1,5,6,sub15_6,sub15_6v,msq15_6,msq15_6v,
+ . qqb_z1jet,qqb_z_gvec)
+c--- called for final initial the routine only supplies new values for
+c--- sub... and sub...v and msqv
+ call dips(5,p,5,6,1,sub56_1,sub56_1v,dummy,msq56_1v,
+ . qqb_z1jet,qqb_z_gvec)
+ call dips(5,p,1,6,5,sub16_5,sub16_5v,msq16_5,msq16_5v,
+ . qqb_z1jet,qqb_z_gvec)
+
+ call dips(6,p,2,6,5,sub26_5,sub26_5v,msq26_5,msq26_5v,
+ . qqb_z1jet,qqb_z_gvec)
+ call dips(6,p,5,6,2,sub56_2,sub56_2v,dummy,msq56_2v,
+ . qqb_z1jet,qqb_z_gvec)
+ call dips(6,p,2,5,6,sub25_6,sub25_6v,msq25_6,msq25_6v,
+ . qqb_z1jet,qqb_z_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+ enddo
+ enddo
+
+c--- Gflag subtraction pieces
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if ((j .ne. 0) .and. (k .ne. 0) .and. (j.ne.-k)) goto 19
+
+c--- do only q-qb and qb-q cases
+ if ( ((j .gt. 0).and.(k .lt. 0))
+ . .or. ((j .lt. 0).and.(k .gt. 0))) then
+C-----half=statistical factor
+ msq(1,j,k)=-half*msq15_2(j,k)*sub15_2(qq)/xn
+ msq(2,j,k)=-half*msq25_1(j,k)*sub25_1(qq)/xn
+ msq(3,j,k)=-half*msq16_2(j,k)*sub16_2(qq)/xn
+ msq(4,j,k)=-half*msq26_1(j,k)*sub26_1(qq)/xn
+ msq(5,j,k)=half*xn*(
+ . msq15_6(j,k)*(sub15_6(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v
+ . +msq16_5(j,k)*(sub16_5(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=half*xn*(
+ . msq26_5(j,k)*(sub26_5(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v
+ . +msq25_6(j,k)*(sub25_6(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v)
+ elseif ((k .eq. 0).and.(j.ne.0)) then
+c--- q-g and qb-g cases
+ msq(2,j,k)=2d0*tr*msq25_1(j,-j)*sub25_1(qg)
+ msq(3,j,k)=xn*msq16_2(j,k)*sub16_2(qq)
+ msq(4,j,k)=xn*(msq26_1(j,k)*sub26_1(gg)+msq26_1v(j,k)*sub26_1v)
+ msq(5,j,k)=-(msq16_5(j,k)*sub16_5(qq)+msq16_5(j,k)*sub56_1(qq))/xn
+ msq(6,j,k)=xn*(msq26_5(j,k)*sub26_5(gg)+msq26_5v(j,k)*sub26_5v
+ . +msq26_5(j,k)*sub56_2(qq))
+
+ elseif ((j .eq. 0).and.(k.ne.0)) then
+c--- g-q and g-qb cases
+ msq(1,j,k)=2d0*tr*msq15_2(-k,k)*sub15_2(qg)
+ msq(3,j,k)=xn*(msq16_2(j,k)*sub16_2(gg)+msq16_2v(j,k)*sub16_2v)
+ msq(4,j,k)=xn*msq26_1(j,k)*sub26_1(qq)
+ msq(5,j,k)=xn*(msq16_5(j,k)*sub16_5(gg)+msq16_5v(j,k)*sub16_5v
+ . +msq15_6(j,k)*sub56_1(qq))
+ msq(6,j,k)=-(msq26_5(j,k)*sub26_5(qq)+msq26_5(j,k)*sub56_2(qq))/xn
+
+ elseif ((j .eq. 0).and.(k .eq. 0)) then
+c--- g-g case (real process is g(p1)+g(p2) --> qb(p5)+q(p6)
+c---Hence 15 split multiplies q(15)+g(p2)-->Z+q(p6)
+c---Hence 25 split multiplies g(p1)+q(p25)-->Z+q(p6)
+ msq(1,j,k)=(msq15_2(+1,k)+msq15_2(+2,k)+msq15_2(+3,k)
+ . +msq15_2(+4,k)+msq15_2(+5,k))*sub15_2(qg)*2d0*tr
+ msq(2,j,k)=(msq25_1(k,+1)+msq25_1(k,+2)+msq25_1(k,+3)
+ . +msq25_1(k,+4)+msq25_1(k,+5))*sub25_1(qg)*2d0*tr
+ msq(3,j,k)=(msq16_2(-5,k)+msq16_2(-4,k)+msq16_2(-3,k)
+ . +msq16_2(-2,k)+msq16_2(-1,k))*sub16_2(qg)*2d0*tr
+ msq(4,j,k)=(msq26_1(k,-5)+msq26_1(k,-4)+msq26_1(k,-3)
+ . +msq26_1(k,-2)+msq26_1(k,-1))*sub26_1(qg)*2d0*tr
+
+ endif
+
+ 19 continue
+ enddo
+ enddo
+
+c--- Qflag subtraction pieces
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if (((j .gt. 0).and.(k .gt. 0)) .or.
+ . ((j .lt. 0).and.(k .lt. 0))) then
+c--q-q or qb-qb
+ if (j.eq.k) then
+ msq(1,j,k)=msq(1,j,k)+0.5d0*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+0.5d0*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+0.5d0*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+0.5d0*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+ elseif ((j .gt. 0).and.(k .lt. 0)) then
+c q-qbar
+ if (j.eq.-k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+c--qbar-q
+ elseif ((j .lt. 0).and.(k .gt. 0)) then
+ if (j.eq.-k) then
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+
+ endif
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_z.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_z.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet_z.f (revision 1338)
@@ -0,0 +1,76 @@
+ subroutine qqb_z1jet_z(p,z)
+************************************************************************
+* Authors: R.K. Ellis and John M. Campbell *
+* November, 2001. *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'PR_new.f'
+ include 'agq.f'
+ integer is
+ double precision z,xl12,xl15,xl25,p(mxpart,4),dot
+ double precision ii_qq,ii_qg,ii_gq,ii_gg,
+ . if_qq,if_gg,
+ . fi_qq,fi_gg
+
+ xl12=dlog(+two*dot(p,1,2)/musq)
+ xl15=dlog(-two*dot(p,1,5)/musq)
+ xl25=dlog(-two*dot(p,2,5)/musq)
+
+c--- sum over regular and plus terms
+ do is=1,3
+c--- (q,qb) terms
+ Q1(q,q,a,is) =ason4pi*xn*(if_qq(z,xl15,is)+0.5d0*fi_gg(z,xl15,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q1(a,a,q,is)=Q1(q,q,a,is)
+ Q2(a,a,q,is)=ason4pi*xn*(if_qq(z,xl25,is)+0.5d0*fi_gg(z,xl25,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q2(q,q,a,is) =Q2(a,a,q,is)
+
+c--- (q,g)
+ Q2(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl25,is)+fi_qq(z,xl25,is))
+ Q1(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl15,is)+fi_qq(z,xl15,is))/xnsq)
+ Q2(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (qb,g)
+ Q2(g,g,a,is)=Q2(g,g,q,is)
+ Q1(a,a,g,is)=Q1(q,q,g,is)
+ Q2(q,g,a,is)=Q2(a,g,q,is)
+
+c--- (g,q)
+ Q1(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl15,is)+fi_qq(z,xl15,is))
+ Q2(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl25,is)+fi_qq(z,xl25,is))/xnsq)
+ Q1(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (g,qb)
+ Q1(g,g,a,is)=Q1(g,g,q,is)
+ Q2(a,a,g,is)=Q2(q,q,g,is)
+ Q1(q,g,a,is)=Q1(a,g,q,is)
+
+c--- (g,g)
+ Q1(q,g,g,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+ Q1(a,g,g,is)=Q1(q,g,g,is)
+ Q2(q,g,g,is)=Q1(q,g,g,is)
+ Q2(a,g,g,is)=Q1(q,g,g,is)
+
+ enddo
+
+ do is=1,3
+ Q1(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q2(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q1(g,a,a,is)=Q1(g,q,q,is)
+ Q2(g,a,a,is)=Q2(g,q,q,is)
+ Q1(g,a,q,is)=Q1(g,q,q,is)
+ Q2(g,a,q,is)=Q2(g,q,q,is)
+ Q1(g,q,a,is)=Q1(g,q,q,is)
+ Q2(g,q,a,is)=Q2(g,q,q,is)
+
+ enddo
+
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/h4q.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/h4q.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/h4q.f (revision 1338)
@@ -0,0 +1,73 @@
+ subroutine h4qn(p1,p2,p3,p4,ampsq)
+ implicit none
+C Taken from Kauffman,Desai,Risal
+C PRD 55 1997 (4009)
+c q(-p1)+qp(-p2)--> h --> q(p3)+qp(p4)
+C returns overall matrix element squared
+C summed over colors and spins with factor of g^4*A^2 removed
+ include 'constants.f'
+ include 'sprods_com.f'
+ double precision ampsq,ammsq
+ integer p1,p2,p3,p4
+c include 'zprods_com.f'
+c integer j1,j2
+c double complex a(2,2),b(2,2),amm
+C Eq 29 (suitably modified for my momentum configuration)
+C====statement function
+C--left-left amplitude
+c amm(p1,p2,p3,p4)=
+c . +za(p3,p4)**2/(za(p1,p3)*za(p2,p4))
+c . +zb(p1,p2)**2/(zb(p1,p3)*zb(p2,p4))
+C--The above amplitude squared + color factor
+ ammsq(p1,p2,p3,p4)=V/4d0
+ . *((s(p1,p2)-s(p3,p4))**2+
+ . (s(p1,p3)*s(p2,p4)+s(p3,p4)*s(p1,p2)-s(p1,p4)*s(p2,p3))**2
+ . /(s(p1,p3)*s(p2,p4)))/(s(p1,p3)*s(p2,p4))
+ ampsq=ammsq(p1,p2,p3,p4)+ammsq(p3,p2,p1,p4)
+ . +ammsq(p1,p4,p3,p2)+ammsq(p3,p4,p1,p2)
+
+ return
+ end
+
+ subroutine h4qi(p1,p2,p3,p4,ampsqid)
+ implicit none
+C Taken from Kauffman,Desai,Risal
+C PRD 55 1997 (4009)
+c q(-p1)+qp(-p2)--> h --> q(p3)+qp(p4)
+C returns overall matrix element squared
+C summed over colors and spins with factor of g^4*A^2 removed
+ include 'constants.f'
+ include 'sprods_com.f'
+ double precision ampsqid,ammsq,ammsqi
+ integer p1,p2,p3,p4
+c include 'zprods_com.f'
+c integer j1,j2
+c double complex a(2,2),b(2,2),amm
+C Eq 29 (suitably modified for my momentum configuration)
+C====statement function
+C--left-left amplitude
+c amm(p1,p2,p3,p4)=
+c . +za(p3,p4)**2/(za(p1,p3)*za(p2,p4))
+c . +zb(p1,p2)**2/(zb(p1,p3)*zb(p2,p4))
+C--The above amplitude squared + color factor
+ ammsq(p1,p2,p3,p4)=V/4d0
+ . *((s(p1,p2)-s(p3,p4))**2+
+ . (s(p1,p3)*s(p2,p4)+s(p3,p4)*s(p1,p2)-s(p1,p4)*s(p2,p3))**2
+ . /(s(p1,p3)*s(p2,p4)))/(s(p1,p3)*s(p2,p4))
+C--The interference with color factor Eq.(A20)
+ ammsqi(p1,p2,p3,p4)=-cf/2d0
+ . *((s(p1,p2)-s(p3,p4))**2
+ . *(s(p1,p3)*s(p2,p4)+s(p1,p4)*s(p2,p3)-s(p1,p2)*s(p3,p4))
+ . -2d0*(s(p1,p2)*s(p3,p4)+s(p2,p3)*s(p1,p4)-s(p1,p3)*s(p2,p4))
+ . *(s(p3,p4)*s(p1,p2)+s(p1,p3)*s(p2,p4)-s(p1,p4)*s(p2,p3))
+ . )/(s(p1,p3)*s(p2,p3)*s(p1,p4)*s(p2,p4))
+
+
+ ampsqid=ammsq(p1,p2,p3,p4)+ammsq(p3,p2,p1,p4)
+ . +ammsq(p1,p4,p3,p2)+ammsq(p3,p4,p1,p2)
+ . +ammsq(p1,p2,p4,p3)+ammsq(p4,p2,p1,p3)
+ . +ammsq(p1,p3,p4,p2)+ammsq(p4,p3,p1,p2)
+ . +ammsqi(p1,p2,p3,p4)+ammsqi(p3,p4,p1,p2)
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gsnew.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gsnew.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gsnew.f (revision 1338)
@@ -0,0 +1,250 @@
+ subroutine gg_hwwg_gs(p,msq)
+
+C NEW: Same as gg_hg_gs but with H->WW
+
+C 5->7 6->8
+
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c g(-p1)+g(-p2) --> g+ parton(p5) + parton(p6)
+c |
+c -->b(p3)+bbar(p4)
+
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+c --- remember: nd will count the dipoles
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision
+ & msq17_2(-nf:nf,-nf:nf),msq27_1(-nf:nf,-nf:nf),
+ & msq18_2(-nf:nf,-nf:nf),msq28_1(-nf:nf,-nf:nf),
+ & msq17_8(-nf:nf,-nf:nf),msq28_7(-nf:nf,-nf:nf),
+ & msq18_7(-nf:nf,-nf:nf),msq27_8(-nf:nf,-nf:nf),
+ & msq78_1v(-nf:nf,-nf:nf),msq78_2v(-nf:nf,-nf:nf),
+ & msq28_7v(-nf:nf,-nf:nf),msq28_1v(-nf:nf,-nf:nf),
+ & msq17_8v(-nf:nf,-nf:nf),msq18_2v(-nf:nf,-nf:nf),
+ & msq18_7v(-nf:nf,-nf:nf),msq27_8v(-nf:nf,-nf:nf),
+ & msq17_2v(-nf:nf,-nf:nf),msq27_1v(-nf:nf,-nf:nf),
+ & dummy(-nf:nf,-nf:nf),
+ & sub17_2(4),sub27_1(4),sub18_2(4),sub28_1(4),
+ & sub17_8(4),sub18_7(4),sub27_8(4),sub28_7(4),
+ & sub78_1(4),sub78_2(4),sub78_1v,sub78_2v,
+ & sub28_7v,sub28_1v,sub18_7v,sub18_2v,sub17_2v,sub17_8v,sub27_8v,
+ & sub27_1v
+ external qqb_hww_g,gg_hwwg_gvec
+ ndmax=6
+
+c--- calculate all the initial-initial dipoles
+ call dips(1,p,1,7,2,sub17_2,sub17_2v,msq17_2,msq17_2v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(2,p,2,7,1,sub27_1,sub27_1v,msq27_1,msq27_1v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(3,p,1,8,2,sub18_2,sub18_2v,msq18_2,msq18_2v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(4,p,2,8,1,sub28_1,sub28_1v,msq28_1,msq28_1v,
+ . qqb_hww_g,gg_hwwg_gvec)
+
+c--- now the basic initial final ones
+ call dips(5,p,1,7,8,sub17_8,sub17_8v,msq17_8,msq17_8v,
+ . qqb_hww_g,gg_hwwg_gvec)
+c--- called for final initial the routine only supplies new values for
+c--- sub... and sub...v and msqv
+ call dips(5,p,7,8,1,sub78_1,sub78_1v,dummy,msq78_1v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(5,p,1,8,7,sub18_7,sub18_7v,msq18_7,msq18_7v,
+ . qqb_hww_g,gg_hwwg_gvec)
+
+ call dips(6,p,2,8,7,sub28_7,sub28_7v,msq28_7,msq28_7v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(6,p,7,8,2,sub78_2,sub78_2v,dummy,msq78_2v,
+ . qqb_hww_g,gg_hwwg_gvec)
+ call dips(6,p,2,7,8,sub27_8,sub27_8v,msq27_8,msq27_8v,
+ . qqb_hww_g,gg_hwwg_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+ enddo
+ enddo
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+c--- do only q-qb and qb-q cases
+ if ( ((j .gt. 0).and.(k .lt. 0))
+ . .or. ((j .lt. 0).and.(k .gt. 0))) then
+ msq(1,j,k)=-msq17_2(j,k)*sub17_2(qq)/xn
+ msq(2,j,k)=-msq27_1(j,k)*sub27_1(qq)/xn
+ msq(3,j,k)=-msq18_2(j,k)*sub18_2(qq)/xn
+ msq(4,j,k)=-msq28_1(j,k)*sub28_1(qq)/xn
+ msq(5,j,k)=xn*(
+ . +msq17_8(j,k)*(sub17_8(qq)+0.5d0*sub78_1(gg))
+ . +0.5d0*msq78_1v(j,k)*sub78_1v
+ . +msq18_7(j,k)*(sub18_7(qq)+0.5d0*sub78_1(gg))
+ . +0.5d0*msq78_1v(j,k)*sub78_1v)
+ msq(6,j,k)=xn*(
+ . (msq28_7(j,k)*(sub28_7(qq)+0.5d0*sub78_2(gg))
+ . +0.5d0*msq78_2v(j,k)*sub78_2v)
+ . +(msq27_8(j,k)*(sub27_8(qq)+0.5d0*sub78_2(gg))
+ . +0.5d0*msq78_2v(j,k)*sub78_2v))
+
+c--- note statistical factor of one half for two gluons in the final state
+ do nd=1,ndmax
+ msq(nd,j,k)=half*msq(nd,j,k)
+ enddo
+
+ elseif ((k .eq. 0).and. (j .ne. 0)) then
+c--- q-g and qb-g cases
+ msq(1,j,k)=(aveqg/avegg)*(
+ . msq17_2(0,0)*sub17_2(gq)+msq17_2v(0,0)*sub17_2v)
+ msq(2,j,k)=2d0*tr*(msq27_1(j,-5)+msq27_1(j,-4)+msq27_1(j,-3)
+ . +msq27_1(j,-2)+msq27_1(j,-1)+msq27_1(j,+1)
+ . +msq27_1(j,+2)+msq27_1(j,+3)+msq27_1(j,+4)
+ . +msq27_1(j,+5))*sub27_1(qg)
+ msq(3,j,k)=xn*msq18_2(j,k)*sub18_2(qq)
+ msq(4,j,k)=xn*(msq28_1(j,k)*sub28_1(gg)+msq28_1v(j,k)*sub28_1v)
+ msq(5,j,k)=-msq18_7(j,k)*(sub18_7(qq)+sub78_1(qq))/xn
+ msq(6,j,k)=xn*(msq28_7(j,k)*sub28_7(gg)+msq28_7v(j,k)*sub28_7v
+ . +msq28_7(j,k)*sub78_2(qq))
+
+ elseif ((j .eq. 0).and.(k.ne.0)) then
+c--- g-q and g-qb cases
+ msq(1,j,k)=2d0*tr*(msq17_2(-5,k)+msq17_2(-4,k)+msq17_2(-3,k)
+ . +msq17_2(-2,k)+msq17_2(-1,k)+msq17_2(+1,k)
+ . +msq17_2(+2,k)+msq17_2(+3,k)+msq17_2(+4,k)
+ . +msq17_2(+5,k))*sub17_2(qg)
+ msq(2,j,k)=(aveqg/avegg)*(
+ . msq27_1(0,0)*sub27_1(gq)+msq27_1v(0,0)*sub27_1v)
+ msq(3,j,k)=xn*(msq18_2(j,k)*sub18_2(gg)+msq18_2v(j,k)*sub18_2v)
+ msq(4,j,k)=xn*msq28_1(j,k)*sub28_1(qq)
+ msq(5,j,k)=xn*(msq18_7(j,k)*sub18_7(gg)+msq18_7v(j,k)*sub18_7v
+ . +msq18_7(j,k)*sub78_1(qq))
+ msq(6,j,k)=-msq28_7(j,k)*(sub28_7(qq)+sub78_2(qq))/xn
+
+ elseif ((j .eq. 0).and.(k .eq. 0)) then
+c--- g-g case
+c--- first set of subtractions take care of gg->qbq, second set gg->gg;
+c--- note g,g = 1,2 and qb=5, q=6 so (15),(25)-->q and (16),(26)-->qb
+ msq(1,j,k)=(msq17_2(+1,k)+msq17_2(+2,k)+msq17_2(+3,k)
+ . +msq17_2(+4,k)+msq17_2(+5,k))*sub17_2(qg)*2d0*tr
+ msq(2,j,k)=(msq27_1(k,+1)+msq27_1(k,+2)+msq27_1(k,+3)
+ . +msq27_1(k,+4)+msq27_1(k,+5))*sub27_1(qg)*2d0*tr
+ msq(3,j,k)=(msq18_2(-5,k)+msq18_2(-4,k)+msq18_2(-3,k)
+ . +msq18_2(-2,k)+msq18_2(-1,k))*sub18_2(qg)*2d0*tr
+ msq(4,j,k)=(msq28_1(k,-5)+msq28_1(k,-4)+msq28_1(k,-3)
+ . +msq28_1(k,-2)+msq28_1(k,-1))*sub28_1(qg)*2d0*tr
+ msq(5,j,k)=dfloat(nf)*half*(
+ .+msq18_7(j,k)*sub78_1(gq)-msq78_1v(j,k)*sub78_1v)
+ msq(6,j,k)=dfloat(nf)*half*(
+ .+msq28_7(j,k)*sub78_2(gq)-msq78_2v(j,k)*sub78_2v)
+ msq(1,j,k)=msq(1,j,k)+half*xn*(
+ . msq17_2(j,k)*sub17_2(gg)+msq17_2v(j,k)*sub17_2v)
+ msq(2,j,k)=msq(2,j,k)+half*xn*(
+ . msq27_1(j,k)*sub27_1(gg)+msq27_1v(j,k)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+half*xn*(
+ . msq18_2(j,k)*sub18_2(gg)+msq18_2v(j,k)*sub18_2v)
+ msq(4,j,k)=msq(4,j,k)+half*xn*(
+ . msq28_1(j,k)*sub28_1(gg)+msq28_1v(j,k)*sub28_1v)
+ msq(5,j,k)=msq(5,j,k)+half*xn*(
+ . msq17_8(j,k)*sub17_8(gg)+msq17_8v(j,k)*sub17_8v
+ .+msq18_7(j,k)*sub18_7(gg)+msq18_7v(j,k)*sub18_7v
+ .+msq18_7(j,k)*sub78_1(gg)+msq78_1v(j,k)*sub78_1v)
+ msq(6,j,k)=msq(6,j,k)+half*xn*(
+ . msq27_8(j,k)*sub27_8(gg)+msq27_8v(j,k)*sub27_8v
+ .+msq28_7(j,k)*sub28_7(gg)+msq28_7v(j,k)*sub28_7v
+ .+msq28_7(j,k)*sub78_2(gg)+msq78_2v(j,k)*sub78_2v)
+ endif
+
+
+ enddo
+ enddo
+c endif
+
+c return
+c--- Start of the 4Q contribution
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if ((j .gt. 0) .and. (k .gt. 0)) then
+c--- Q Q - different flavours
+ if (j .ne. k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ else
+c--- Q Q - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq27_1(j,0)*sub27_1(gq)+msq27_1v(j,0)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq18_2(0,k)*sub18_2(gq)+msq18_2v(0,k)*sub18_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ endif
+
+ elseif ((j .lt. 0).and.(k .lt. 0)) then
+ if (j .ne. k) then
+c--- QBAR QBAR - different flavours
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ else
+c--- QBAR QBAR - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq27_1(j,0)*sub27_1(gq)+msq27_1v(j,0)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq18_2(0,k)*sub18_2(gq)+msq18_2v(0,k)*sub18_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ endif
+
+ elseif ((j .gt. 0).and.(k .lt. 0)) then
+c--- Q QBAR
+ if (j .eq. -k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq28_7(j,k)*sub78_2(gq)-msq78_2v(j,k)*sub78_2v)
+ else
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ endif
+c--- QBAR Q
+ elseif ((j .lt. 0).and.(k .gt. 0)) then
+ if (j .eq. -k) then
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq27_1(j,0)*sub27_1(gq)+msq27_1v(j,0)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq18_2(0,k)*sub18_2(gq)+msq18_2v(0,k)*sub18_2v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq28_7(j,k)*sub78_2(gq)-msq78_2v(j,k)*sub78_2v)
+ else
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq27_1(j,0)*sub27_1(gq)+msq27_1v(j,0)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq18_2(0,k)*sub18_2(gq)+msq18_2v(0,k)*sub18_2v)
+
+ endif
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_h_z.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_h_z.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_h_z.f (revision 1338)
@@ -0,0 +1,28 @@
+ subroutine gg_h_z(p,z)
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'PR_new.f'
+ include 'agq.f'
+ integer is
+ double precision z,p(mxpart,4),xl12,dot,ii_gg,ii_gq,tempgg,tempgq
+
+ xl12=log(two*dot(p,1,2)/musq)
+
+ do is=1,3
+ tempgg=ason4pi*2d0*xn*ii_gg(z,xl12,is)
+ tempgq=ason4pi*2d0*cf*ii_gq(z,xl12,is)
+ Q1(g,g,g,is)=tempgg
+ Q2(g,g,g,is)=tempgg
+
+ Q1(g,q,g,is)=tempgq
+ Q1(g,a,g,is)=tempgq
+
+ Q2(g,q,g,is)=tempgq
+ Q2(g,a,g,is)=tempgq
+ enddo
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_h_gs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_h_gs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_h_gs.f (revision 1338)
@@ -0,0 +1,58 @@
+ subroutine gg_h_gs(p,msq)
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c----for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> (b(p3)+b~(p4))+g(p5)
+c---
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision msq17_2(-nf:nf,-nf:nf),msq27_1(-nf:nf,-nf:nf),
+ . msq17_2v(-nf:nf,-nf:nf),msq27_1v(-nf:nf,-nf:nf),
+ . sub17_2(4),sub27_1(4),sub17_2v,sub27_1v
+ external gg_h,gg_h_gvec
+ integer iglue
+ parameter(iglue=5)
+ ndmax=2
+
+c---- calculate both initial-initial dipoles
+c---- note that we do not require the gg dipoles, so the v-type
+c---- entries are left as dummies
+ call dips(1,p,1,iglue,2,sub17_2,sub17_2v,msq17_2,msq17_2v,
+ . gg_h,gg_h_gvec)
+ call dips(2,p,2,iglue,1,sub27_1,sub27_1v,msq27_1,msq27_1v,
+ . gg_h,gg_h_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+
+
+ if ((j .ne. 0) .and. (k .eq. 0)) then
+ msq(1,j,k)=2d0*cf
+ . *(msq17_2(0,0)*sub17_2(gq)+msq17_2v(0,0)*sub17_2v)
+ elseif ((j .eq. 0) .and. (k .ne. 0)) then
+ msq(2,j,k)=2d0*cf
+ . *(msq27_1(0,0)*sub27_1(gq)+msq27_1v(0,0)*sub27_1v)
+ elseif ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(1,j,k)=2d0*xn
+ . *(msq17_2(j,k)*sub17_2(gg)+msq17_2v(j,k)*sub17_2v)
+ msq(2,j,k)=2d0*xn
+ . *(msq27_1(j,k)*sub27_1(gg)+msq27_1v(j,k)*sub27_1v)
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_v.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_v.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_v.f (revision 1338)
@@ -0,0 +1,32 @@
+ subroutine qqb_hww_v(p,msqv)
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'scale.f'
+ double precision msq(-nf:nf,-nf:nf),msqv(-nf:nf,-nf:nf),
+ . p(mxpart,4),dot,xl12
+ integer j,k
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msqv(j,k)=0d0
+ enddo
+ enddo
+
+ call qqb_hww(p,msq)
+ xl12=log(two*dot(p,1,2)/musq)
+
+c--sum of virtual diagram in DRED and UV counterterm including
+C--term required to bring into the MSbar scheme
+ scheme='dred'
+
+ msqv(0,0)=ason2pi*xn*2d0*(
+ . -epinv*(epinv2-xl12)-0.5d0*xl12**2+11d0/6d0+0.5d0*pisq
+ . -((11d0-two*dble(nf)/xn)*epinv-1d0)/6d0)*msq(0,0)
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/w2jetsq.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/w2jetsq.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/w2jetsq.f (revision 1338)
@@ -0,0 +1,43 @@
+ subroutine w2jetsq(i1,i2,i3,i4,i5,i6,za,zb,msq)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ include 'lc.f'
+ include 'mmsq_cs.f'
+ double complex qcd1(-1:1,-1:1),qcd2(-1:1,-1:1),qed(-1:1,-1:1)
+ double precision msq1,msq2,msqq,msq
+ integer i1,i2,i3,i4,i5,i6
+
+ call subqcd(i1,i2,i3,i4,i5,i6,za,zb,qcd1)
+ call subqcd(i1,i2,i3,i4,i6,i5,za,zb,qcd2)
+
+ qed(+1,+1)=qcd1(+1,+1)+qcd2(+1,+1)
+ qed(+1,-1)=qcd1(+1,-1)+qcd2(-1,+1)
+ qed(-1,+1)=qcd1(-1,+1)+qcd2(+1,-1)
+ qed(-1,-1)=qcd1(-1,-1)+qcd2(-1,-1)
+
+ msq1= abs(qcd1(+1,+1))**2+abs(qcd1(+1,-1))**2
+ . +abs(qcd1(-1,+1))**2+abs(qcd1(-1,-1))**2
+
+ msq2= abs(qcd2(+1,+1))**2+abs(qcd2(+1,-1))**2
+ . +abs(qcd2(-1,+1))**2+abs(qcd2(-1,-1))**2
+
+ msqq= abs( qed(+1,+1))**2+abs( qed(+1,-1))**2
+ . +abs( qed(-1,+1))**2+abs( qed(-1,-1))**2
+
+ mmsq_cs(0,+1,+1)=0d0
+ mmsq_cs(1,+1,+1)=0d0
+ mmsq_cs(2,+1,+1)=0d0
+
+ if ((colourchoice .eq. 1) .or. (colourchoice .eq. 0)) then
+ mmsq_cs(1,+1,+1)=msq1
+ mmsq_cs(2,+1,+1)=msq2
+ endif
+ if ((colourchoice .eq. 2) .or. (colourchoice .eq. 0)) then
+ mmsq_cs(0,+1,+1)=-ninth*msqq
+ endif
+
+ msq=mmsq_cs(0,+1,+1)+mmsq_cs(1,+1,+1)+mmsq_cs(2,+1,+1)
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hwwgg.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hwwgg.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hwwgg.f (revision 1338)
@@ -0,0 +1,145 @@
+ subroutine gg_hwwgg(p,msq)
+ implicit none
+
+CC NEW from gg_hgg: replace H->bbar into H->WW
+
+c---Matrix element squared averaged over initial colors and spins
+c
+c g(-p1)+g(-p2) --> H(nu(p3)+e^+(p4)+e^-(p5)+nubar(p6))+g(p7)+g(p8)
+
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'sprods_com.f'
+ include 'zprods_com.f'
+ integer j,k,iglue1,iglue2
+ double precision p(mxpart,4),Asq,fac,sh
+ double precision Hgggg,Hqagg,Haqgg,Hgqgq,Hgaga,Hqgqg,Hagag,Hggqa
+ double precision
+ . Hqrqr,Hqqqq,
+ . Habab,Haaaa,
+ . Hqarb,Hqaqa,Hqbqb,
+ . Haqbr,Haqaq,Hbqbq
+ double precision msq(-nf:nf,-nf:nf),hdecay,s34
+
+ parameter(iglue1=7,iglue2=8)
+
+
+C---fill spinor products upto maximum number
+ call spinoru(iglue2,p,za,zb)
+
+C Deal with Higgs decay to b-bbar
+
+c s34=s(3,4)+2d0*mb**2
+c hdecay=xn*gwsq*mbsq/(4d0*wmass**2)*2d0*(s34-4d0*mb**2)
+c hdecay=hdecay/((s34-hmass**2)**2+(hmass*hwidth)**2)
+c Asq=(as/(3d0*pi))**2/vevsq
+c fac=gsq**2*Asq*hdecay
+
+C Higgs virtuality
+
+ sh=s(3,4)+s(3,5)+s(3,6)+s(4,5)+s(4,6)+s(5,6)
+
+ hdecay=gwsq**3*wmass**2*s(3,5)*s(4,6)
+ hdecay=hdecay/((s(3,4)-wmass**2)**2+(wmass*wwidth)**2)
+ hdecay=hdecay/((s(5,6)-wmass**2)**2+(wmass*wwidth)**2)
+ hdecay=hdecay/((sh-hmass**2)**2+(hmass*hwidth)**2)
+
+
+ Asq=(as/(3d0*pi))**2/vevsq
+ fac=gsq**2*Asq*hdecay
+
+C--four gluon terms
+ call h4g(1,2,iglue1,iglue2,Hgggg)
+
+C--two quark two gluon terms
+ call hqqgg(1,2,iglue1,iglue2,Hqagg)
+c call hqqgg(2,1,iglue1,iglue2,Haqgg)
+C====symmetric in first two arguments
+ Haqgg=Hqagg
+
+ call hqqgg(1,iglue1,2,iglue2,Hqgqg)
+c call hqqgg(iglue1,1,2,iglue2,Hagag)
+C====symmetric in first two arguments
+ Hagag=Hqgqg
+
+ call hqqgg(2,iglue1,1,iglue2,Hgqgq)
+c call hqqgg(iglue1,2,1,iglue2,Hgaga)
+C====symmetric in first two arguments
+ Hgaga=Hgqgq
+
+ call hqqgg(iglue2,iglue1,1,2,Hggqa)
+
+C---four quark terms
+ call H4qn(1,2,iglue1,iglue2,Hqrqr)
+ call H4qi(1,2,iglue1,iglue2,Hqqqq)
+C---four anti-quark terms
+c call H4qn(iglue1,iglue2,1,2,Habab)
+c call H4qi(iglue1,iglue2,1,2,Haaaa)
+ Habab=Hqrqr
+ Haaaa=Hqqqq
+
+C-qqb
+ call H4qn(1,iglue2,2,iglue1,Hqarb)
+ call H4qi(1,iglue2,2,iglue1,Hqaqa)
+
+ call H4qn(1,iglue2,iglue1,2,Hqbqb)
+
+
+C-qbq
+ Haqbr=Hqarb
+ call H4qi(2,iglue2,1,iglue1,Haqaq)
+ call H4qn(2,iglue2,iglue1,1,Hbqbq)
+
+ do j=fn,nf
+ do k=fn,nf
+ msq(j,k)=0d0
+ if ((j.gt.0).and.(k.gt.0)) then
+ if (j.eq.k) then
+ msq(j,k)=0.5d0*aveqq*fac*Hqqqq
+ else
+ msq(j,k)=aveqq*fac*Hqrqr
+ endif
+ endif
+ if ((j.lt.0).and.(k.lt.0)) then
+ if (j.eq.k) then
+ msq(j,k)=0.5d0*aveqq*fac*Haaaa
+ else
+ msq(j,k)=aveqq*fac*Habab
+ endif
+ endif
+
+ if ((j.gt.0).and.(k.lt.0)) then
+ if (j.eq.-k) then
+ msq(j,k)=aveqq*fac*(0.5d0*Hqagg+Hqaqa+(nf-1)*Hqarb)
+ else
+ msq(j,k)=aveqq*fac*Hqbqb
+ endif
+ endif
+
+ if ((j.lt.0).and.(k.gt.0)) then
+ if (j.eq.-k) then
+ msq(j,k)=aveqq*fac*(0.5d0*Haqgg+Haqaq+dfloat(nf-1)*Haqbr)
+ else
+ msq(j,k)=aveqq*fac*Hbqbq
+ endif
+ endif
+
+ if ((j.gt.0).and.(k.eq.0)) msq(j,0)=aveqg*fac*Hqgqg
+ if ((j.lt.0).and.(k.eq.0)) msq(j,0)=aveqg*fac*Hagag
+
+ if ((j.eq.0).and.(k.gt.0)) msq(0,k)=aveqg*fac*Hgqgq
+ if ((j.eq.0).and.(k.lt.0)) msq(0,k)=aveqg*fac*Hgaga
+
+ if ((j.eq.0).and.(k.eq.0)) then
+ msq(0,0)=avegg*fac*(0.5d0*Hgggg+dfloat(nf)*Hggqa)
+ endif
+
+ enddo
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hg_v.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hg_v.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hg_v.f (revision 1338)
@@ -0,0 +1,46 @@
+ subroutine gg_hg_v(p,msq)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'sprods_com.f'
+ include 'scheme.f'
+C (Taken from Ravindran, Smith, van Neerven hep-ph/0201114)
+C Modified by overall factors
+ integer iglue,j,k
+ double precision p(4,mxpart),msq(fn:nf,fn:nf)
+ double precision ss,tt,uu,s34,
+ . virtgg,virtqa,virtaq,virtqg,virtgq,hdecay,Asq,fac
+ parameter(iglue=5)
+
+ scheme='tH-V'
+
+ call dotem(iglue,p,s)
+ ss=s(1,2)
+ tt=s(1,iglue)
+ uu=s(2,iglue)
+
+ Asq=(as/(3d0*pi))**2/vevsq
+
+C Deal with Higgs decay to b-bbar
+ s34=s(3,4)+2d0*mb**2
+ hdecay=xn*gwsq*mbsq/(4d0*wmass**2)*2d0*(s34-4d0*mb**2)
+ hdecay=hdecay/((s34-hmass**2)**2+(hmass*hwidth)**2)
+
+ fac=ason2pi*Asq*gsq*hdecay
+ call hjetfill(ss,tt,uu,virtgg,virtqa,virtaq,virtqg,virtgq)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ if ((j.eq.0).and.(k.eq.0)) msq(j,k)=avegg*fac*virtgg
+ if ((j.gt.0).and.(k.eq.-j)) msq(j,k)=aveqq*fac*virtqa
+ if ((j.lt.0).and.(k.eq.-j)) msq(j,k)=aveqq*fac*virtaq
+ if ((j.eq.0).and.(k.ne.0)) msq(j,k)=aveqg*fac*virtgq
+ if ((j.ne.0).and.(k.eq.0)) msq(j,k)=aveqg*fac*virtqg
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_z1jet.f (revision 1338)
@@ -0,0 +1,152 @@
+ subroutine qqb_z1jet(p,msq)
+ implicit none
+C-----Authors: John Campbell, Keith Ellis
+C-----June 2000 and December 2001
+c----Matrix element for Z production
+C----averaged over initial colours and spins
+c q(-p1)+qbar(-p2)-->(e^-(p3)+e^+(p4))+g(p5)
+c---
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+ include 'ewcharge.f'
+ include 'sprods_com.f'
+ include 'zprods_decl.f'
+ integer j,k,hq,hl,swap(2)
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),fac
+ double complex prop
+ double precision AqqbZg2(2,2),AqbqZg2(2,2),AqgZq2(2,2),
+ . AqbgZqb2(2,2),AgqbZqb2(2,2),AgqZq2(2,2)
+ data swap/2,1/
+ save swap
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ call spinoru(5,p,za,zb)
+
+c---protect from soft and collinear singularities
+c if ((-s(1,5) .lt. cutoff) .or. (-s(2,5) .lt. cutoff)) return
+
+C-----Protect from photon pole by cutting off at some value about 10 GeV
+c if (s(3,4) .lt. 4d0*mbsq) return
+
+ prop=s(3,4)/Dcmplx((s(3,4)-zmass**2),zmass*zwidth)
+ fac=4d0*V*esq**2*gsq
+
+c qqbZg= +aveqq*s(3,4)**2*fac*z1jet(1,2,3,4,5)
+c gqbZqb=-aveqg*s(3,4)**2*fac*z1jet(5,2,3,4,1)
+c qgZq= -aveqg*s(3,4)**2*fac*z1jet(1,5,3,4,2)
+c qbqZg= +aveqq*s(3,4)**2*fac*z1jet(2,1,3,4,5)
+c qbgZqb=-aveqg*s(3,4)**2*fac*z1jet(5,1,3,4,2)
+c gqZq= -aveqg*s(3,4)**2*fac*z1jet(2,5,3,4,1)
+
+ call zgamps2(1,2,3,4,5,za,zb,AqqbZg2)
+ call zgamps2(1,5,3,4,2,za,zb,AqgZq2)
+ call zgamps2(2,5,3,4,1,za,zb,AgqZq2)
+ do hq=1,2
+ do hl=1,2
+ AqbqZg2(hq,hl)=AqqbZg2(hq,swap(hl))
+ AqbgZqb2(hq,hl)=AqgZq2(hq,swap(hl))
+ AgqbZqb2(hq,hl)=AgqZq2(hq,swap(hl))
+ enddo
+ enddo
+
+c call zgamps2(2,1,3,4,5,za,zb,AqbqZg2)
+c call zgamps2(5,1,3,4,2,za,zb,AqbgZqb2)
+c call zgamps2(5,2,3,4,1,za,zb,AgqbZqb2)
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if( (j .ne. 0) .and. (k .ne. 0) .and. (j .ne. -k)) goto 20
+
+ if ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(j,k)=0d0
+ elseif ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=cdabs(Q(j)*q1+L(j)*l1*prop)**2*AqqbZg2(1,1)
+ . +cdabs(Q(j)*q1+L(j)*r1*prop)**2*AqqbZg2(1,2)
+ . +cdabs(Q(j)*q1+R(j)*l1*prop)**2*AqqbZg2(2,1)
+ . +cdabs(Q(j)*q1+R(j)*r1*prop)**2*AqqbZg2(2,2)
+ msq(j,k)=msq(j,k)*aveqq*fac/s(3,4)**2
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=cdabs(Q(k)*q1+L(k)*l1*prop)**2*AqbqZg2(1,1)
+ . +cdabs(Q(k)*q1+L(k)*r1*prop)**2*AqbqZg2(1,2)
+ . +cdabs(Q(k)*q1+R(k)*l1*prop)**2*AqbqZg2(2,1)
+ . +cdabs(Q(k)*q1+R(k)*r1*prop)**2*AqbqZg2(2,2)
+ msq(j,k)=msq(j,k)*aveqq*fac/s(3,4)**2
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=cdabs(Q(j)*q1+L(j)*l1*prop)**2*AqgZq2(1,1)
+ . +cdabs(Q(j)*q1+L(j)*r1*prop)**2*AqgZq2(1,2)
+ . +cdabs(Q(j)*q1+R(j)*l1*prop)**2*AqgZq2(2,1)
+ . +cdabs(Q(j)*q1+R(j)*r1*prop)**2*AqgZq2(2,2)
+ msq(j,k)=msq(j,k)*aveqg*fac/s(3,4)**2
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=cdabs(Q(-j)*q1+L(-j)*l1*prop)**2*AqbgZqb2(1,1)
+ . +cdabs(Q(-j)*q1+L(-j)*r1*prop)**2*AqbgZqb2(1,2)
+ . +cdabs(Q(-j)*q1+R(-j)*l1*prop)**2*AqbgZqb2(2,1)
+ . +cdabs(Q(-j)*q1+R(-j)*r1*prop)**2*AqbgZqb2(2,2)
+ msq(j,k)=msq(j,k)*aveqg*fac/s(3,4)**2
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=cdabs(Q(k)*q1+L(k)*l1*prop)**2*AgqZq2(1,1)
+ . +cdabs(Q(k)*q1+L(k)*r1*prop)**2*AgqZq2(1,2)
+ . +cdabs(Q(k)*q1+R(k)*l1*prop)**2*AgqZq2(2,1)
+ . +cdabs(Q(k)*q1+R(k)*r1*prop)**2*AgqZq2(2,2)
+ msq(j,k)=msq(j,k)*aveqg*fac/s(3,4)**2
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=cdabs(Q(-k)*q1+L(-k)*l1*prop)**2*AgqbZqb2(1,1)
+ . +cdabs(Q(-k)*q1+L(-k)*r1*prop)**2*AgqbZqb2(1,2)
+ . +cdabs(Q(-k)*q1+R(-k)*l1*prop)**2*AgqbZqb2(2,1)
+ . +cdabs(Q(-k)*q1+R(-k)*r1*prop)**2*AgqbZqb2(2,2)
+ msq(j,k)=msq(j,k)*aveqg*fac/s(3,4)**2
+ endif
+
+ 20 continue
+ enddo
+ enddo
+ return
+ end
+
+
+ subroutine zgamps2(j1,j2,j3,j4,j5,za,zb,amps2)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ double complex amps(2,2,2)
+ double precision amps2(2,2)
+ integer hq,hl,hg,j1,j2,j3,j4,j5
+c-- amplitude helicities are amps(quark,lepton,gluon)
+
+ amps(1,1,1)=za(j2,j3)/za(j1,j5)/za(j2,j5)
+ . *(za(j2,j1)*zb(j4,j1)+za(j2,j5)*zb(j4,j5))
+
+ amps(1,1,2)=zb(j4,j1)/zb(j1,j5)/zb(j2,j5)
+ . *(za(j2,j3)*zb(j2,j1)+za(j3,j5)*zb(j1,j5))
+
+ amps(1,2,1)=za(j2,j4)/za(j1,j5)/za(j2,j5)
+ . *(za(j2,j1)*zb(j3,j1)+za(j2,j5)*zb(j3,j5))
+
+ amps(1,2,2)=zb(j3,j1)/zb(j1,j5)/zb(j2,j5)
+ . *(za(j2,j4)*zb(j2,j1)+za(j4,j5)*zb(j1,j5))
+
+ do hl=1,2
+ do hg=1,2
+ amps(2,hl,hg)=-dconjg(amps(1,3-hl,3-hg))
+ enddo
+ enddo
+
+ do hq=1,2
+ do hl=1,2
+ amps2(hq,hl)=cdabs(amps(hq,hl,1))**2+cdabs(amps(hq,hl,2))**2
+ enddo
+ enddo
+
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_gs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_gs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_gs.f (revision 1338)
@@ -0,0 +1,58 @@
+ subroutine qqb_hww_gs(p,msq)
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c----for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> W^- (e^-(p5)+nubar(p6)) + W^+ (nu(p3)+e^+(p4))
+c +g(p7)
+c---
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision msq17_2(-nf:nf,-nf:nf),msq27_1(-nf:nf,-nf:nf),
+ . msq17_2v(-nf:nf,-nf:nf),msq27_1v(-nf:nf,-nf:nf),
+ . sub17_2(4),sub27_1(4),sub17_2v,sub27_1v
+ external qqb_hww,qqb_hww_gvec
+
+ ndmax=2
+
+c---- calculate both initial-initial dipoles
+c---- note that we do not require the gg dipoles, so the v-type
+c---- entries are left as dummies
+ call dips(1,p,1,7,2,sub17_2,sub17_2v,msq17_2,msq17_2v,
+ . qqb_hww,qqb_hww_gvec)
+ call dips(2,p,2,7,1,sub27_1,sub27_1v,msq27_1,msq27_1v,
+ . qqb_hww,qqb_hww_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+
+
+ if ((j .ne. 0) .and. (k .eq. 0)) then
+ msq(1,j,k)=two*cf
+ . *(msq17_2(0,0)*sub17_2(gq)+msq17_2v(0,0)*sub17_2v)
+ elseif ((j .eq. 0) .and. (k .ne. 0)) then
+ msq(2,j,k)=two*cf
+ . *(msq27_1(0,0)*sub27_1(gq)+msq27_1v(0,0)*sub27_1v)
+ elseif ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(1,j,k)=two*xn
+ . *(msq17_2(j,k)*sub17_2(gg)+msq17_2v(j,k)*sub17_2v)
+ msq(2,j,k)=two*xn
+ . *(msq27_1(j,k)*sub27_1(gg)+msq27_1v(j,k)*sub27_1v)
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_z.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_z.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_z.f (revision 1338)
@@ -0,0 +1,28 @@
+ subroutine qqb_hww_z(p,z)
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'PR_new.f'
+ include 'agq.f'
+ integer is
+ double precision z,p(mxpart,4),xl12,dot,ii_gg,ii_gq,tempgg,tempgq
+
+ xl12=log(two*dot(p,1,2)/musq)
+
+ do is=1,3
+ tempgg=ason2pi*xn*ii_gg(z,xl12,is)
+ tempgq=ason2pi*cf*ii_gq(z,xl12,is)
+ Q1(g,g,g,is)=tempgg
+ Q2(g,g,g,is)=tempgg
+
+ Q1(g,q,g,is)=tempgq
+ Q1(g,a,g,is)=tempgq
+
+ Q2(g,q,g,is)=tempgq
+ Q2(g,a,g,is)=tempgq
+ enddo
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/z2jetsq.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/z2jetsq.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/z2jetsq.f (revision 1338)
@@ -0,0 +1,96 @@
+ subroutine z2jetsq(i1,i2,i3,i4,i5,i6,za,zb,msq)
+c-----Author R.K. Ellis
+c---Matrix element squared averaged over initial colors and spins
+c q(-p1)+qbar(-p2) --> Gamma^* +g(p5) +g(p6)
+c |
+c --> l(p3)+a(p4)
+c
+c--all momenta incoming
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ include 'mmsq_cs.f'
+ double complex qcd1LL(-1:1,-1:1),qcd2LL(-1:1,-1:1)
+ double complex qcd1LR(-1:1,-1:1),qcd2LR(-1:1,-1:1)
+c double complex qcd1RL(-1:1,-1:1),qcd2RL(-1:1,-1:1)
+c double complex qcd1RR(-1:1,-1:1),qcd2RR(-1:1,-1:1)
+ double complex qedLL(-1:1,-1:1),qedLR(-1:1,-1:1)
+c double complex qedRL(-1:1,-1:1),qedRR(-1:1,-1:1)
+ double precision msq1(2,2),msq2(2,2),msqq(2,2),msq(2,2)
+ integer i1,i2,i3,i4,i5,i6,j,k,pol(2),pq,pl
+ data pol/-1,1/
+ save pol
+
+ call subqcd(i1,i2,i3,i4,i5,i6,za,zb,qcd1LL)
+ call subqcd(i1,i2,i3,i4,i6,i5,za,zb,qcd2LL)
+
+
+c call subqcd(i2,i1,i4,i3,i5,i6,za,zb,qcd1RR)
+c call subqcd(i2,i1,i4,i3,i6,i5,za,zb,qcd2RR)
+
+ call subqcd(i1,i2,i4,i3,i5,i6,za,zb,qcd1LR)
+ call subqcd(i1,i2,i4,i3,i6,i5,za,zb,qcd2LR)
+
+c call subqcd(i2,i1,i3,i4,i5,i6,za,zb,qcd1RL)
+c call subqcd(i2,i1,i3,i4,i6,i5,za,zb,qcd2RL)
+
+
+ do j=1,2
+ do k=1,2
+ qedLL(pol(j),pol(k))=qcd1LL(pol(j),pol(k))+qcd2LL(pol(k),pol(j))
+ qedLR(pol(j),pol(k))=qcd1LR(pol(j),pol(k))+qcd2LR(pol(k),pol(j))
+c qedRL(pol(j),pol(k))=qcd1RL(pol(j),pol(k))+qcd2RL(pol(k),pol(j))
+c qedRR(pol(j),pol(k))=qcd1RR(pol(j),pol(k))+qcd2RR(pol(k),pol(j))
+ enddo
+ enddo
+
+ do pq=1,1
+ do pl=1,2
+ msq1(pq,pl)=0d0
+ msq2(pq,pl)=0d0
+ msqq(pq,pl)=0d0
+ enddo
+ enddo
+
+C---sum over gluon polarizations
+ do j=1,2
+ do k=1,2
+ msq1(1,1)=msq1(1,1)+abs(qcd1LL(pol(j),pol(k)))**2
+ msq2(1,1)=msq2(1,1)+abs(qcd2LL(pol(j),pol(k)))**2
+ msqq(1,1)=msqq(1,1)+abs(qedLL(pol(j),pol(k)))**2
+
+ msq1(1,2)=msq1(1,2)+abs(qcd1LR(pol(j),pol(k)))**2
+ msq2(1,2)=msq2(1,2)+abs(qcd2LR(pol(j),pol(k)))**2
+ msqq(1,2)=msqq(1,2)+abs(qedLR(pol(j),pol(k)))**2
+
+c msq1(2,1)=msq1(2,1)+abs(qcd1RL(pol(j),pol(k)))**2
+c msq2(2,1)=msq2(2,1)+abs(qcd2RL(pol(j),pol(k)))**2
+c msqq(2,1)=msqq(2,1)+abs(qedRL(pol(j),pol(k)))**2
+
+c msq1(2,2)=msq1(2,2)+abs(qcd1RR(pol(j),pol(k)))**2
+c msq2(2,2)=msq2(2,2)+abs(qcd2RR(pol(j),pol(k)))**2
+c msqq(2,2)=msqq(2,2)+abs(qedRR(pol(j),pol(k)))**2
+
+ enddo
+ enddo
+
+
+ msq1(2,2)=msq1(1,1)
+ msq1(2,1)=msq1(1,2)
+
+ msq2(2,2)=msq2(1,1)
+ msq2(2,1)=msq2(1,2)
+
+ msqq(2,2)=msqq(1,1)
+ msqq(2,1)=msqq(1,2)
+
+ do pq=1,2
+ do pl=1,2
+ mmsq_cs(0,pq,pl)=-ninth*msqq(pq,pl)
+ mmsq_cs(1,pq,pl)=msq1(pq,pl)
+ mmsq_cs(2,pq,pl)=msq2(pq,pl)
+ msq(pq,pl)=mmsq_cs(2,pq,pl)+mmsq_cs(1,pq,pl)+mmsq_cs(0,pq,pl)
+ enddo
+ enddo
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gvec.f (revision 1338)
@@ -0,0 +1,121 @@
+ subroutine gg_hzzg_gvec(p,n,in,msq)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+C in is the label of the momentum contracted with n
+ integer j,k,in,iglue
+ double precision msq(-nf:nf,-nf:nf),s,shiggs,interf,num,den
+ double precision n(4),p(mxpart,4),dot,decay,dec,fac,
+ . qqghn,ggghn,p1p2(-1:1,-1:1)
+ parameter(iglue=7)
+
+ logical int
+ common/int/int
+
+ s(j,k)=2*(p(j,4)*p(k,4)-p(j,1)*p(k,1)-p(j,2)*p(k,2)-p(j,3)*p(k,3))
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ shiggs=s(3,4)+s(3,5)+s(3,6)+s(4,5)+s(4,6)+s(5,6)
+ interf=0d0
+
+
+ decay=(((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+ . +((r1*l2)**2+(r2*l1)**2)*s(3,6)*s(4,5))
+
+
+ decay=decay/((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)
+ decay=decay/((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+C Here only H->ZZ->(34)(56): diagram with (1<->3) accounted for
+C by adding a factor 2
+
+ if(int.eqv..false.)goto 39
+
+ decay=2*decay
+
+
+C Interference contribution
+
+ interf=2*((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+
+ num=((s(3,4)-zmass**2)*(s(5,6)-zmass**2)*(s(4,5)-zmass**2)*
+ . (s(3,6)-zmass**2)+(zmass*zwidth)**4+
+ . (zmass*zwidth)**2*(2*zmass**4-zmass**2*
+ . (s(3,4)+s(5,6)+s(4,5)+s(3,6))+s(3,4)*s(3,6)+s(3,4)*s(4,5)+
+ . s(3,6)*s(5,6)+s(4,5)*s(5,6)-s(3,6)*s(4,5)-s(3,4)*s(5,6)))
+
+ den=((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(4,5)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(3,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+
+ interf=interf*num/den
+
+ 39 continue
+
+ dec=gwsq**3*zmass**2*4d0*xw**2/(one-xw)*
+ . (decay+interf)/((shiggs-hmass**2)**2+(hmass*hwidth)**2)
+
+
+C In case of identical particles add 1/4 symmetry factor
+
+ if(int) dec=dec/4
+
+
+ fac=dec
+
+ do j=-1,+1
+ do k=-1,+1
+ p1p2(j,k)=0d0
+ enddo
+ enddo
+
+ if (in .eq. 1) then
+ p1p2(0,-1)=-aveqg*fac*qqghn(2,iglue,1,p,n)
+ p1p2(0,+1)=-aveqg*fac*qqghn(2,iglue,1,p,n)
+ p1p2(0,0)=+avegg*fac*ggghn(iglue,2,1,p,n)
+ elseif (in .eq. 2) then
+ p1p2(+1,0)=-aveqg*fac*qqghn(1,iglue,2,p,n)
+ p1p2(-1,0)=-aveqg*fac*qqghn(iglue,1,2,p,n)
+ p1p2(0,0)=+avegg*fac*ggghn(1,iglue,2,p,n)
+ elseif (in .eq. 7) then
+ p1p2(1,-1)=+aveqq*fac*qqghn(1,2,iglue,p,n)
+ p1p2(-1,1)=+aveqq*fac*qqghn(2,1,iglue,p,n)
+ p1p2(0,0)=+avegg*fac*ggghn(1,2,iglue,p,n)
+ endif
+
+ do j=-nf,nf
+ do k=-nf,nf
+ if ((j .gt. 0) .and. (k .eq. -j)) then
+ msq(j,k)=p1p2(1,-1)
+ elseif ((j .lt. 0) .and. (k .eq. -j)) then
+ msq(j,k)=p1p2(-1,1)
+ elseif ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(j,k)=p1p2(0,0)
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & p1p2(+1,0)
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & p1p2(-1,0)
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=
+ & p1p2(0,+1)
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=
+ & p1p2(0,-1)
+ endif
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/h4qg.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/h4qg.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/h4qg.f (revision 1338)
@@ -0,0 +1,5862 @@
+ subroutine h4qg(P1,P2,P3,P4,P5,za,zb,msq)
+ implicit none
+c---Matrix element squared for
+c q(-p1)+q(-p2) --> +H+q(p3)+q(p4)+g(p5)
+C
+ include 'constants.f'
+ include 'sprods_com.f'
+ include 'zprods_decl.f'
+
+ integer P1,P2,P3,P4,P5,h1,h2,h5
+ double precision s123,s124,s135,s134,s245,s234,S1234,msq
+ double precision s12,s14,s15,s23,s25,s34,s35,s45
+ double complex XTOTAL,HDPART,TLPART
+ double complex a31(2,2,2),a32(2,2,2),a41(2,2,2),a42(2,2,2)
+
+ S123=s(p1,p2)+s(p1,p3)+s(p2,p3)
+ S124=s(p1,p2)+s(p1,p4)+s(p2,p4)
+ S134=s(p1,p3)+s(p3,p4)+s(p1,p4)
+ S135=s(p1,p3)+s(p3,p5)+s(p1,p5)
+ S234=s(p2,p3)+s(p2,p4)+s(p3,p4)
+ S245=s(p2,p4)+s(p2,p5)+s(p4,p5)
+
+ S1234=s(p1,p2)+s(p1,p3)+s(p1,p4)+s(p2,p3)+s(p2,p4)+s(p3,p4)
+ s12=s(p1,p2)
+ s14=s(p1,p4)
+ s15=s(p1,p5)
+ s23=s(p2,p3)
+ s25=s(p2,p5)
+ s34=s(p3,p4)
+ s35=s(p3,p5)
+ s45=s(p4,p5)
+C Expression ppp31
+ XTOTAL=0.
+ HDPART=za(P1,P2)*za(P1,P2)*za(P1,P3)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P2,P5)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P3,P5)/za(P1,P5)/za(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P3)*za(P1,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P3)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P3)*za(P2,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P3)*za(P2,P5)*zb(P3,P5)*zb(P3,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P3)*zb(P1,P4)*zb(P3,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P3)*zb(P3,P4)/za(P1,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P2,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P2,P5)*zb(P3,P4)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P2,P5)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*zb(P2,P5)*zb(P3,P4)*zb(P4,P5)/zb(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P4,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)
+ 1 *S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P3)*za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P1,P4)*za(P2,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)/zb(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P4,P5)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*zb(P3,P4)*zb(P4,P5)*zb(P4,P5)/zb(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a31(2,2,2)=XTOTAL
+C Punched 40 terms out of 40.
+C Expression ppm31
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P3)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P3)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P3,P5)*zb(P1,P3)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P4,P5)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P3)*zb(P1,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P3)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*za(P3,P5)*zb(P1,P3)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*za(P4,P5)*zb(P1,P4)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*zb(P1,P3)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P3)/za(P2,P4)/zb(P1,P5)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P2,P5)*zb(P1,P4)*zb(P2,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P1,P3)*zb(P3,P4)/za(P2,P4)/zb(P1,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P1,P3)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P1,P3)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P3,P5)*zb(P1,P3)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*zb(P1,P3)*zb(P3,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)*zb(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P3,P5)*zb(P1,P3)*zb(P3,P4)*zb(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)*zb(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*zb(P1,P4)*zb(P3,P4)/zb(P1,P5)/zb(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*za(P2,P5)*zb(P2,P3)*zb(P3,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P4,P5)*zb(P3,P4)*zb(P3,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P5)*za(P2,P5)*zb(P2,P3)*zb(P4,P5)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P4,P5)*zb(P3,P4)*zb(P4,P5)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*zb(P3,P4)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)
+ 1 *S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a31(2,2,1)=XTOTAL
+C Punched 52 terms out of 52.
+C Expression ppp32
+ XTOTAL=0.
+ HDPART=za(P1,P2)*za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P3)
+ 1 *zb(P2,P5)/za(P1,P3)/za(P1,P5)/za(P2,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P1,P5)/za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P1,P3)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P1,P5)/za(P2,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P2,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P1,P5)/za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P2,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P1,P5)/za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P2,P5)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P3)*zb(P3,P5)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P2,P3)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P2,P3)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P2,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P2,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P3,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P3,P5)/za(P1,P5)/za(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P1,P3)*za(P1,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P3)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P3)*za(P2,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P3)*za(P2,P5)*zb(P3,P5)*zb(P3,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P3)*zb(P1,P4)*zb(P3,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P3)*zb(P3,P4)/za(P1,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P1,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P1,P5)/za(P2,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P1,P5)/za(P2,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P2,P5)*zb(P3,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P1,P5)/za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P1,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P2,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P3,P4)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P3,P4)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P1,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P5)*zb(P3,P4)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*zb(P2,P3)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*zb(P2,P3)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*zb(P2,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*zb(P2,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*zb(P2,P5)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P3,P4)*zb(P3,P5)/za(P1,P5)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P3,P4)*zb(P3,P5)/za(P1,P5)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P3,P4)*zb(P3,P5)/za(P1,P5)/zb(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*zb(P3,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P3,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P3,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P4,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)
+ 1 *S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P3)*za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P1,P4)*za(P2,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P2,P5)*zb(P3,P4)*zb(P3,P5)*zb(P3,P5)
+ 1 /za(P1,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P1,P5)/za(P2,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*za(P2,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P1,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-2*za(P1,P4)*za(P2,P5)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*zb(P3,P5)*zb(P4,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*zb(P4,P5)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*zb(P3,P5)*zb(P3,P5)*zb(P4,P5)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a32(2,2,2)=XTOTAL
+C Punched 118 terms out of 118.
+C Expression ppm32
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P2,P5)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P2,P3)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P3,P5)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P4,P5)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P2,P3)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P2)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P1,P5)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P3)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P2,P5)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P3,P5)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P4,P5)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P2)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P1,P5)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P3)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P3,P5)*zb(P1,P3)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P4,P5)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P4,P5)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P4,P5)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P2)*zb(P1,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P1,P5)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P3)*zb(P1,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P5)*zb(P1,P4)*zb(P2,P3)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= S25 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P4,P5)*zb(P1,P4)*zb(P2,P3)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P2)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P1,P5)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P1,P3)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*za(P3,P5)*zb(P1,P3)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*za(P4,P5)*zb(P1,P4)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P3)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P3)/za(P2,P4)/zb(P1,P5)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P4)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P4)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P5)*zb(P3,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P5)*zb(P3,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P1,P2)*zb(P3,P4)/za(P1,P3)/zb(P1,P3)
+ 1 /zb(P1,P5)/zb(P2,P5)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P1,P3)*zb(P3,P4)/za(P2,P4)/zb(P1,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P1,P5)*zb(P1,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P3,P5)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P1,P5)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P1,P3)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P1,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*za(P3,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*za(P3,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P3,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P1,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*zb(P1,P3)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*zb(P1,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P1,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P1,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P1,P5)*S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P3,P5)*zb(P3,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P1,P5)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P1,P5)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*zb(P3,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*zb(P3,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P5)*za(P3,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*za(P4,P5)*zb(P1,P4)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P5)*za(P2,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P3,P5)*zb(P3,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*zb(P3,P4)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)
+ 1 *S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)*zb(P3,P5)
+ 1 /zb(P1,P3)/zb(P1,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P3,P5)*zb(P3,P4)*zb(P3,P5)/zb(P1,P5)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)*zb(P3,P5)
+ 1 /zb(P1,P3)/zb(P1,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*zb(P3,P4)/zb(P1,P5)*S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a32(2,2,1)=XTOTAL
+C Punched 146 terms out of 146.
+
+*end
+C Expression pmp31
+ XTOTAL=0.
+ HDPART=za(P1,P2)*za(P1,P3)*za(P1,P4)*zb(P1,P2)*zb(P2,P3)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P3)*za(P3,P4)*zb(P2,P3)*zb(P2,P3)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P3)*za(P4,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P2)*zb(P2,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P4,P5)*zb(P2,P5)*zb(P2,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P1,P4)*za(P1,P5)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P1,P4)*za(P4,P5)*zb(P1,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P1,P4)*za(P4,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P1,P4)*zb(P1,P2)*zb(P3,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P3)*za(P1,P4)*zb(P2,P3)/za(P1,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P3)*za(P1,P5)*za(P3,P4)*zb(P1,P5)*zb(P2,P3)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P1,P5)*zb(P1,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P3,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P3)*zb(P2,P3)*zb(P2,P5)/za(P3,P5)/zb(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P2,P5)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P3,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P4,P5)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*za(P4,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P4,P5)*zb(P2,P5)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P2,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)
+ 1 *S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*zb(P2,P3)*zb(P2,P5)*zb(P2,P5)
+ 1 /za(P3,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P3,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P4,P5)
+ 1 /za(P3,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a31(2,1,2)=XTOTAL
+C Punched 52 terms out of 52.
+C Expression mpp31
+ XTOTAL=0.
+ HDPART=za(P1,P2)*za(P1,P3)*za(P2,P3)*zb(P1,P2)*zb(P1,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P3)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P3)*zb(P1,P4)*zb(P1,P5)*zb(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P4)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P4)*zb(P2,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P2,P3)*za(P2,P5)*zb(P1,P5)*zb(P1,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P2,P3)*zb(P1,P4)/za(P1,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P3)*za(P2,P3)*zb(P1,P5)*zb(P1,P5)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)/zb(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*za(P2,P5)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*zb(P1,P5)/za(P2,P4)/za(P3,P5)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P3)*za(P2,P3)*zb(P2,P5)*zb(P3,P4)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P5)*za(P3,P4)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P5)*zb(P2,P5)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P3,P4)*zb(P1,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P3,P4)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*zb(P1,P4)*zb(P2,P5)*zb(P4,P5)/zb(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P4,P5)/za(P1,P5)/za(P2,P4)/zb(P2,P4)
+ 1 *S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P5)*za(P3,P4)*zb(P4,P5)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P3,P4)*zb(P1,P4)*zb(P4,P5)*zb(P4,P5)/zb(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a31(1,2,2)=XTOTAL
+C Punched 40 terms out of 40.
+C Expression pmp32
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P2,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P1,P2)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P3,P4)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P2)*zb(P1,P5)*zb(P2,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P2)*zb(P2,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P3,P4)*zb(P2,P3)*zb(P2,P3)
+ 1 *zb(P2,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P3,P4)*zb(P2,P3)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*za(P3,P4)*zb(P2,P3)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P5)*zb(P2,P3)*zb(P2,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P4,P5)*zb(P1,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P4,P5)*zb(P1,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P4,P5)*zb(P2,P5)*zb(P2,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P1,P4)*za(P1,P5)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P1,P4)*za(P4,P5)*zb(P1,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*za(P1,P4)*zb(P1,P2)*zb(P3,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P1,P4)*za(P2,P3)*zb(P1,P2)*zb(P2,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*za(P3,P4)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P1,P5)*zb(P3,P4)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P2,P5)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P2,P5)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P2,P5)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P2,P3)*zb(P2,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P3,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P3,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P3,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P3,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P3,P4)*zb(P2,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P3,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*zb(P1,P5)*zb(P2,P5)/za(P3,P5)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*zb(P1,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P3,P4)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P4,P5)*zb(P2,P5)*zb(P2,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P3,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P4,P5)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P2,P3)*zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P2,P3)*zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P2,P3)/za(P1,P3)/za(P2,P5)
+ 1 /za(P3,P5)/zb(P1,P3)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P3,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P3,P4)*za(P4,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P3,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P3,P4)*za(P4,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P1,P5)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P3,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P4)*za(P3,P4)*zb(P3,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P4)*za(P4,P5)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P4,P5)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P4,P5)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P3,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P4,P5)*zb(P2,P5)*zb(P4,P5)/za(P2,P4)
+ 1 /za(P3,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P1,P2)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P1,P2)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S25 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*zb(P1,P5)*zb(P2,P3)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P1,P5)*zb(P2,P3)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*zb(P2,P5)/za(P2,P4)/za(P3,P5)/zb(P2,P4)
+ 1 *S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*zb(P2,P5)/za(P3,P5)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*zb(P3,P5)/za(P1,P3)/za(P2,P5)/zb(P1,P3)
+ 1 *S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P4,P5)*zb(P2,P5)*zb(P2,P5)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P3,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P3,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P3,P4)*za(P4,P5)*zb(P2,P5)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P3,P4)*zb(P2,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P3,P4)*zb(P2,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P3,P4)*zb(P2,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P5)*za(P3,P4)*zb(P3,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P4,P5)*zb(P1,P5)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P3,P4)*zb(P2,P3)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P3,P4)*zb(P2,P3)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P4,P5)*zb(P2,P5)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P4,P5)*zb(P2,P5)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P4,P5)*zb(P2,P5)*zb(P3,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a32(2,1,2)=XTOTAL
+C Punched 146 terms out of 146.
+C Expression mpp32
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P3)*zb(P1,P4)*zb(P1,P5)*zb(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P2,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P1,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P3,P4)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P2,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P2)*zb(P1,P4)*zb(P1,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P4)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P4)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P1,P4)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P4)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)*zb(P1,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P3)*za(P2,P5)*zb(P1,P4)*zb(P1,P5)*zb(P1,P5)
+ 1 /za(P3,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P3)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)/zb(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P2,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*za(P3,P4)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P2,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P3,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P1,P5)*zb(P3,P4)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P3)*za(P2,P3)*zb(P1,P4)*zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*zb(P1,P4)*zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*za(P2,P3)*zb(P1,P4)/za(P1,P3)/za(P2,P5)
+ 1 /za(P3,P5)/zb(P1,P3)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P3)*za(P2,P3)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P2,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P3,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P5)*zb(P1,P4)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P3,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P5)*zb(P1,P5)*zb(P2,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*za(P3,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P3,P4)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P3,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P1,P4)*zb(P1,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P1,P4)*zb(P1,P5)/za(P2,P4)/za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*zb(P1,P4)*zb(P1,P5)/za(P3,P5)/zb(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*zb(P1,P4)*zb(P2,P5)*zb(P4,P5)/zb(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P5)*za(P3,P4)*za(P3,P4)*zb(P1,P4)*zb(P4,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P3,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P2,P4)/za(P3,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=2*za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P3,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P5)*za(P3,P4)*zb(P1,P5)*zb(P4,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P5)*zb(P1,P5)*zb(P1,P5)*zb(P4,P5)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P3,P4)*zb(P1,P4)*zb(P4,P5)*zb(P4,P5)/zb(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a32(1,2,2)=XTOTAL
+C Punched 90 terms out of 90.
+
+*end
+C Expression ppp42
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P1,P5)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P2,P4)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P5)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P4,P5)/za(P1,P3)/za(P2,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P3)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P2,P4)*zb(P1,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P4)*zb(P4,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*zb(P1,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*za(P2,P4)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P4)*zb(P2,P3)*zb(P4,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P4)*zb(P3,P4)/za(P1,P3)/za(P2,P5)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*zb(P1,P5)*zb(P3,P4)*zb(P3,P5)/zb(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P3,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)
+ 1 *S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P2,P4)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P4)*zb(P3,P4)*zb(P4,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P2,P4)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*zb(P3,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P3,P5)/zb(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P4)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)/zb(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a42(2,2,2)=XTOTAL
+C Punched 40 terms out of 40.
+C Expression ppm42
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P3)*zb(P2,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P2,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P1,P5)*zb(P1,P2)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P3,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P4,P5)*zb(P2,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P4)*zb(P2,P3)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P4)*zb(P2,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P2,P4)/za(P1,P3)/zb(P2,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P2,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*za(P4,P5)*zb(P2,P3)*zb(P2,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P2,P3)*zb(P2,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P2,P4)*zb(P3,P4)/za(P1,P3)/zb(P1,P3)
+ 1 /zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*zb(P1,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P2,P4)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*za(P4,P5)*zb(P2,P4)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P2,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P4)*za(P3,P5)*zb(P3,P4)*zb(P3,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P1,P5)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*zb(P2,P4)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)*zb(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P3,P5)*zb(P3,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*zb(P3,P4)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)
+ 1 *S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)*zb(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P5)*za(P4,P5)*zb(P2,P4)*zb(P3,P4)*zb(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*zb(P2,P3)*zb(P3,P4)/zb(P1,P3)/zb(P2,P5)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a42(2,2,1)=XTOTAL
+C Punched 52 terms out of 52.
+C Expression ppp41
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P1,P5)
+ 1 *zb(P2,P3)/za(P1,P3)/za(P2,P4)/za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P5)/za(P2,P4)/za(P2,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P1,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P2,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P1,P5)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P2,P3)*zb(P1,P4)*zb(P2,P3)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P2,P3)*zb(P1,P5)*zb(P2,P3)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P2,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P2,P4)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P1,P5)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P2)*zb(P2,P3)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P3,P4)/za(P1,P5)/za(P2,P4)
+ 1 /za(P2,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P4,P5)/za(P1,P3)/za(P2,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P1,P5)*zb(P3,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P2,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P2,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P3,P4)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P2,P3)*zb(P1,P5)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P2,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P2,P3)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P4)*zb(P1,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P2,P4)*zb(P4,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*zb(P1,P5)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P2,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P2,P4)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)/za(P2,P4)
+ 1 /za(P2,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P2,P4)*zb(P2,P3)*zb(P4,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P4)*zb(P3,P4)/za(P1,P3)/za(P2,P5)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P3,P4)*zb(P4,P5)/za(P1,P3)/za(P2,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P3,P4)*zb(P4,P5)/za(P1,P3)/za(P2,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P3,P4)*zb(P4,P5)/za(P2,P5)/zb(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P3,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*zb(P3,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P3,P5)*zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P3,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)
+ 1 *S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P2,P3)*zb(P3,P4)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P2,P4)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P2,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P2,P4)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=2*za(P1,P5)*za(P2,P3)*zb(P3,P4)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P2,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*zb(P3,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*zb(P3,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P4)*zb(P3,P4)*zb(P4,P5)*zb(P4,P5)
+ 1 /za(P2,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*zb(P3,P5)*zb(P4,P5)*zb(P4,P5)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a41(2,2,2)=XTOTAL
+C Punched 118 terms out of 118.
+C Expression ppm41
+ XTOTAL=0.
+ HDPART=za(P1,P2)*za(P1,P2)*za(P1,P5)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P2,P3)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P2)*za(P3,P5)*zb(P1,P4)*zb(P2,P3)
+ 1 *zb(P2,P3)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*za(P4,P5)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P2)*zb(P1,P4)*zb(P2,P3)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P2)*zb(P1,P4)*zb(P2,P3)*zb(P2,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P1,P5)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P3,P5)*zb(P1,P4)*zb(P2,P3)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P2)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P4)*zb(P2,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P1,P5)*zb(P1,P2)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P3,P5)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P4,P5)*zb(P1,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*za(P4,P5)*zb(P1,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*za(P4,P5)*zb(P2,P4)*zb(P4,P5)
+ 1 /za(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P5)*zb(P1,P2)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P2)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P5)*zb(P1,P4)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P1,P4)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P1,P5)*zb(P1,P4)*zb(P2,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P5)*zb(P2,P4)/za(P1,P3)/zb(P2,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P2,P3)*za(P3,P5)*zb(P2,P3)*zb(P2,P3)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*za(P4,P5)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P1,P2)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P2,P3)*zb(P2,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P2,P3)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*za(P4,P5)*zb(P2,P3)*zb(P2,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/zb(P1,P3)/zb(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P2)*zb(P2,P3)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P1,P4)*zb(P2,P3)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P2,P3)*zb(P2,P4)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P2,P5)*zb(P2,P3)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P5)*zb(P2,P3)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P2)*za(P4,P5)*zb(P1,P4)*zb(P3,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P4,P5)*zb(P3,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P4,P5)*zb(P3,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P1,P2)*zb(P3,P4)/za(P2,P4)/zb(P1,P5)
+ 1 /zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*zb(P2,P4)*zb(P3,P4)/za(P1,P3)/zb(P1,P3)
+ 1 /zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P4,P5)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P2,P4)*zb(P3,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*zb(P1,P2)*zb(P3,P4)*zb(P4,P5)
+ 1 /za(P2,P4)/zb(P1,P5)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P3,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P3,P4)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P1,P5)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P2,P4)/zb(P2,P5)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P1,P5)*za(P2,P5)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P1,P5)*zb(P1,P2)*zb(P3,P4)*zb(P4,P5)
+ 1 /zb(P2,P4)/zb(P2,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/zb(P2,P4)/zb(P2,P5)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P4,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*za(P4,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P3)*za(P4,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P2,P4)/zb(P2,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ TLPART= S25 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P3)*zb(P2,P3)*zb(P3,P4)/za(P2,P4)
+ 1 /zb(P2,P4)/zb(P2,P5)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P3)*zb(P2,P4)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)/zb(P2,P5)/zb(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*za(P3,P5)*zb(P2,P3)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /zb(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P2,P5)*za(P4,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P2,P3)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P2,P3)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P2,P3)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P5)*za(P2,P5)*zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P5)*zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P5)*za(P3,P5)*zb(P2,P3)*zb(P3,P4)*zb(P4,P5)
+ 1 /zb(P2,P4)/zb(P2,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P4,P5)*zb(P3,P4)*zb(P4,P5)/zb(P2,P5)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*zb(P3,P4)/zb(P2,P5)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P3)*za(P2,P5)*zb(P2,P3)*zb(P3,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P4,P5)*zb(P3,P4)*zb(P3,P4)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P2,P5)*zb(P2,P3)*zb(P4,P5)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P5)*za(P4,P5)*zb(P3,P4)*zb(P4,P5)/za(P2,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*zb(P3,P4)/za(P2,P4)/zb(P1,P5)/zb(P2,P4)
+ 1 *S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a41(2,2,1)=XTOTAL
+C Punched 146 terms out of 146.
+
+*end
+C Expression pmp42
+ XTOTAL=0.
+ HDPART=za(P1,P2)*za(P1,P4)*za(P2,P4)*zb(P1,P2)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P4)*za(P3,P4)*zb(P2,P3)*zb(P2,P3)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P4)*zb(P2,P3)*zb(P2,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*za(P1,P5)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*za(P2,P4)*zb(P1,P2)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P2,P5)/za(P1,P3)/za(P4,P5)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P2,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P2,P4)*zb(P2,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*za(P3,P4)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*zb(P1,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P4)*zb(P2,P3)/za(P1,P3)/za(P2,P5)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P4)*za(P2,P4)*zb(P2,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P3,P4)*zb(P2,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P3,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*zb(P1,P5)*zb(P2,P3)*zb(P3,P5)/zb(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P3,P5)/za(P1,P3)/za(P2,P5)/zb(P1,P3)
+ 1 *S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P5)*za(P2,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P3,P4)*zb(P3,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)/zb(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P3,P4)*zb(P2,P3)*zb(P3,P5)*zb(P3,P5)/zb(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a42(2,1,2)=XTOTAL
+C Punched 40 terms out of 40.
+C Expression mpp42
+ XTOTAL=0.
+ HDPART=za(P1,P2)*za(P2,P3)*za(P2,P4)*zb(P1,P2)*zb(P1,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P2)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P4)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P4)*za(P3,P5)*zb(P1,P4)*zb(P1,P5)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P5)*zb(P1,P5)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P3,P5)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*zb(P1,P4)*zb(P1,P5)*zb(P1,P5)
+ 1 /za(P4,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*za(P2,P4)*zb(P1,P2)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P4)*za(P2,P5)*zb(P1,P2)*zb(P2,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P4)*za(P3,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P4)*za(P3,P5)*zb(P1,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P5)/za(P4,P5)/zb(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P4)*za(P3,P5)*zb(P2,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P4)*zb(P1,P2)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*za(P2,P4)*zb(P1,P4)/za(P1,P3)/za(P2,P5)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P3)*za(P2,P5)*za(P3,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P3,P4)*za(P3,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*za(P3,P5)*zb(P1,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P1,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)
+ 1 *S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P4)*za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P2,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P4)*za(P2,P5)*zb(P1,P4)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P4,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P4)*za(P3,P4)*zb(P1,P4)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P4)*zb(P1,P4)*zb(P1,P5)/za(P4,P5)/zb(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P5)*za(P3,P4)*za(P3,P4)*zb(P1,P4)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)*zb(P3,P5)
+ 1 /za(P4,P5)/zb(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a42(1,2,2)=XTOTAL
+C Punched 52 terms out of 52.
+C Expression pmp41
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P2,P3)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P2,P3)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P3,P4)*zb(P1,P2)*zb(P2,P3)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P3,P4)*zb(P1,P5)*zb(P2,P3)
+ 1 *zb(P2,P3)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P2,P3)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P2)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*zb(P1,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*zb(P2,P3)*zb(P2,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P4)*zb(P2,P3)*zb(P2,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P4)*za(P3,P4)*zb(P2,P3)*zb(P2,P3)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*za(P3,P4)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*za(P3,P4)*zb(P1,P5)*zb(P2,P3)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P1,P2)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P4)*za(P1,P4)*zb(P1,P5)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P1,P5)*zb(P2,P3)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P2,P3)/za(P1,P5)/za(P2,P4)
+ 1 /za(P4,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P1,P4)*zb(P2,P5)*zb(P3,P4)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*za(P3,P4)*zb(P1,P5)*zb(P2,P3)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*zb(P1,P2)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*zb(P1,P2)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P1,P5)*zb(P1,P5)*zb(P2,P3)*zb(P2,P5)
+ 1 /za(P4,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P1,P5)*zb(P1,P5)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P3,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)/za(P2,P4)
+ 1 /za(P4,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P3,P4)*zb(P2,P5)*zb(P3,P4)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P1,P5)*zb(P2,P3)*zb(P3,P5)/zb(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P2,P3)*zb(P2,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P2,P3)*zb(P2,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*zb(P2,P3)*zb(P2,P5)/za(P4,P5)/zb(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*zb(P2,P5)*zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*zb(P2,P5)*zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*zb(P2,P5)*zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P1,P5)*za(P2,P4)*zb(P2,P3)*zb(P2,P5)*zb(P2,P5)
+ 1 /za(P4,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*za(P3,P4)*za(P3,P4)*zb(P2,P3)*zb(P3,P5)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-2*za(P1,P5)*za(P3,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)
+ 1 /za(P4,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P5)*za(P3,P4)*zb(P2,P5)*zb(P3,P5)*zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P5)*zb(P2,P5)*zb(P2,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P4)*zb(P2,P3)*zb(P2,P5)*zb(P3,P5)/zb(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P3,P4)*zb(P2,P3)*zb(P3,P5)*zb(P3,P5)/zb(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a41(2,1,2)=XTOTAL
+C Punched 90 terms out of 90.
+C Expression mpp41
+ XTOTAL=0.
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P1,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P1,P4)*za(P2,P3)*zb(P1,P2)*zb(P1,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P1,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P1,P4)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*za(P3,P4)*zb(P1,P2)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P2,P3)*zb(P1,P2)*zb(P1,P4)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P1,P2)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P2,P3)*zb(P1,P4)*zb(P2,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P4)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P4)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P4)*zb(P1,P4)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P5)*zb(P1,P4)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P2)*za(P3,P5)*zb(P1,P4)*zb(P1,P5)*zb(P2,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P2)*za(P3,P5)*zb(P1,P5)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P1,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P2,P5)*zb(P1,P2)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P2,P5)*zb(P1,P5)*zb(P1,P5)
+ 1 /za(P2,P4)/za(P4,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)
+ 1 *zb(P3,P4)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*za(P3,P5)*zb(P1,P5)*zb(P1,P5)
+ 1 *zb(P3,P4)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*za(P3,P5)*zb(P1,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P1,P4)*za(P2,P3)*zb(P1,P4)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P1,P4)*zb(P1,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P2,P3)*zb(P1,P4)/za(P1,P5)/za(P2,P4)
+ 1 /za(P4,P5)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P1,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P3,P4)*zb(P1,P4)*zb(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P1,P4)*za(P2,P5)*za(P3,P5)*zb(P1,P5)*zb(P1,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*za(P3,P4)*zb(P1,P2)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*zb(P1,P2)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P3)*zb(P2,P5)*zb(P3,P4)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P4)*za(P2,P5)*zb(P1,P2)*zb(P2,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P4)*za(P3,P5)*zb(P2,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P4)*zb(P1,P2)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P3)*za(P2,P5)*za(P3,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P5)*za(P3,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P2,P5)*za(P3,P4)*zb(P1,P2)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P5)*za(P3,P4)*zb(P1,P5)*zb(P3,P5)
+ 1 /za(P2,P4)/za(P4,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P5)*zb(P1,P5)*zb(P2,P5)/za(P4,P5)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P2,P5)*zb(P2,P5)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P3,P4)*za(P3,P4)*zb(P1,P4)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P3,P4)*za(P3,P5)*zb(P1,P5)*zb(P3,P4)
+ 1 *zb(P3,P5)/za(P2,P4)/za(P4,P5)/zb(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*za(P3,P5)*zb(P3,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P3)*za(P3,P4)*zb(P1,P4)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P5)*zb(P3,P4)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S25 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P1,P5)*zb(P3,P4)/za(P2,P4)
+ 1 /za(P4,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P2,P3)*za(P3,P4)*zb(P3,P4)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P4)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*za(P3,P5)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*za(P3,P5)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P3,P5)*zb(P1,P5)*zb(P2,P5)*zb(P3,P4)
+ 1 /za(P4,P5)/zb(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*za(P3,P5)*zb(P1,P5)*zb(P3,P5)/za(P1,P3)
+ 1 /za(P4,P5)/zb(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P3)*zb(P1,P2)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P1,P2)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*zb(P1,P4)*zb(P2,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P3)*zb(P1,P4)*zb(P2,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*zb(P1,P5)/za(P1,P3)/za(P4,P5)/zb(P1,P3)
+ 1 *S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*zb(P1,P5)/za(P4,P5)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P3)*zb(P4,P5)/za(P1,P5)/za(P2,P4)/zb(P2,P4)
+ 1 *S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P5)*za(P3,P4)*za(P3,P4)*zb(P1,P4)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P3,P4)*za(P3,P4)*zb(P1,P4)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P3,P4)*za(P3,P5)*zb(P1,P5)*zb(P3,P5)
+ 1 *zb(P4,P5)/za(P1,P3)/za(P2,P4)/za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P3,P4)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P2,P5)*za(P3,P4)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P5)*za(P3,P4)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P2,P5)*za(P3,P4)*zb(P4,P5)*zb(P4,P5)/za(P1,P5)
+ 1 /za(P2,P4)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-za(P2,P5)*za(P3,P5)*zb(P1,P5)*zb(P2,P5)*zb(P4,P5)
+ 1 /za(P1,P3)/za(P4,P5)/zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P3,P4)*zb(P1,P4)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P3,P4)*zb(P1,P4)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-za(P3,P5)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=za(P3,P5)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=za(P3,P5)*zb(P1,P5)*zb(P4,P5)/za(P1,P3)/za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a41(1,2,2)=XTOTAL
+C Punched 146 terms out of 146.
+
+*end
+
+ write(6,*)
+ write(6,*) 'ppp31',a31(2,2,2)
+ write(6,*) 'ppm31',a31(2,2,1)
+ write(6,*) 'ppp32',a32(2,2,2)
+ write(6,*) 'ppm32',a32(2,2,1)
+
+ write(6,*)
+ write(6,*) 'pmp31',a31(2,1,2)
+ write(6,*) 'mpp31',a31(1,2,2)
+ write(6,*) 'pmp32',a32(2,1,2)
+ write(6,*) 'mpp32',a32(1,2,2)
+
+ write(6,*)
+ write(6,*) 'ppp42',a42(2,2,2)
+ write(6,*) 'ppm42',a42(2,2,1)
+ write(6,*) 'ppp41',a41(2,2,2)
+ write(6,*) 'ppm41',a41(2,2,1)
+
+ write(6,*)
+ write(6,*) 'pmp42',a42(2,1,2)
+ write(6,*) 'mpp42',a42(1,2,2)
+ write(6,*) 'pmp41',a41(2,1,2)
+ write(6,*) 'mpp41',a41(1,2,2)
+
+C Expression ppp31
+ XTOTAL=0.
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P1,P3)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P2,P5)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P3,P5)/zb(P1,P5)/zb(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P3)*zb(P1,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P3)*zb(P2,P3)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*zb(P2,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P3)*zb(P2,P5)*za(P3,P5)*za(P3,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P3)*za(P1,P4)*za(P3,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*za(P3,P4)/zb(P1,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P2,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P2,P5)*za(P3,P4)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P2,P5)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*za(P2,P5)*za(P3,P4)*za(P4,P5)/za(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P4,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)
+ 1 *S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P3)*zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P1,P4)*zb(P2,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)/za(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P4,P5)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*za(P3,P4)*za(P4,P5)*za(P4,P5)/za(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a31(1,1,1)=XTOTAL
+C Punched 40 terms out of 40.
+C Expression ppm31
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P3)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P3)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P3,P5)*za(P1,P3)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P4,P5)*za(P1,P4)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P3)*za(P1,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P3)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*zb(P3,P5)*za(P1,P3)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*zb(P4,P5)*za(P1,P4)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*za(P1,P3)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P3)/zb(P2,P4)/za(P1,P5)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*za(P1,P4)*za(P2,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P4,P5)*za(P1,P4)*za(P3,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P1,P3)*za(P3,P4)/zb(P2,P4)/za(P1,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P1,P3)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P1,P3)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P3,P5)*za(P1,P3)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P4,P5)*za(P1,P4)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*za(P1,P3)*za(P3,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P4)*za(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P3,P5)*za(P1,P3)*za(P3,P4)*za(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P4,P5)*za(P1,P4)*za(P3,P4)*za(P4,P5)
+ 1 /za(P1,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*za(P1,P4)*za(P3,P4)/za(P1,P5)/za(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*zb(P2,P5)*za(P2,P3)*za(P3,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P4,P5)*za(P3,P4)*za(P3,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P5)*zb(P2,P5)*za(P2,P3)*za(P4,P5)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P4,P5)*za(P3,P4)*za(P4,P5)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*za(P3,P4)/zb(P2,P4)/za(P1,P5)/za(P2,P4)
+ 1 *S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a31(1,1,2)=XTOTAL
+C Punched 52 terms out of 52.
+C Expression ppp32
+ XTOTAL=0.
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P3)
+ 1 *za(P2,P5)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P1,P5)/zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P1,P3)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P2,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P1,P5)/zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P2,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P1,P5)/zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P2,P5)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P3)*za(P3,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P2,P3)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P2,P3)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P2,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P2,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P3,P4)/zb(P1,P3)/zb(P1,P5)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P3,P5)/zb(P1,P5)/zb(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*zb(P1,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*zb(P2,P3)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P3)*zb(P2,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*zb(P2,P5)*za(P3,P5)*za(P3,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*za(P1,P4)*za(P3,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*za(P3,P4)/zb(P1,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P1,P4)*za(P1,P4)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P2,P3)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P2,P5)*za(P3,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P1,P5)/zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P5)*za(P2,P5)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P1,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P2,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P3,P4)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P3,P4)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P1,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P5)*za(P3,P4)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P3,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*za(P2,P3)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*za(P2,P3)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*za(P2,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*za(P2,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*za(P2,P5)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P3,P4)*za(P3,P5)/zb(P1,P5)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P3,P4)*za(P3,P5)/zb(P1,P5)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P3,P4)*za(P3,P5)/zb(P1,P5)/za(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*za(P3,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P3,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P3,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P4,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)
+ 1 *S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P3)*zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P1,P4)*zb(P2,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P2,P5)*za(P3,P4)*za(P3,P5)*za(P3,P5)
+ 1 /zb(P1,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P1,P5)/zb(P2,P4)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*zb(P2,P5)*za(P3,P4)*za(P4,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P1,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-2*zb(P1,P4)*zb(P2,P5)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*za(P3,P5)*za(P4,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*za(P4,P5)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*za(P3,P5)*za(P3,P5)*za(P4,P5)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a32(1,1,1)=XTOTAL
+C Punched 118 terms out of 118.
+C Expression ppm32
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P2,P5)*za(P1,P2)*za(P1,P4)
+ 1 *za(P2,P3)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P3,P5)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P4,P5)*za(P1,P4)*za(P1,P4)
+ 1 *za(P2,P3)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P2)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P1,P5)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P3)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P2,P5)*za(P1,P2)*za(P1,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P3,P5)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P4,P5)*za(P1,P4)*za(P1,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P2)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P1,P5)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P3)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P3,P5)*za(P1,P3)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P4,P5)*za(P1,P4)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P4,P5)*za(P1,P4)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P4,P5)*za(P1,P4)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P2)*za(P1,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P1,P5)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P3)*za(P1,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*za(P1,P4)*za(P2,P3)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ TLPART= S25 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P2,P3)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*zb(P3,P5)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P4,P5)*za(P1,P4)*za(P2,P3)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P2)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P1,P5)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P1,P3)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*zb(P3,P5)*za(P1,P3)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*zb(P4,P5)*za(P1,P4)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P1,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P2)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P2)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P3)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P3)/zb(P2,P4)/za(P1,P5)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P4)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P4)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P3,P5)*za(P2,P3)*za(P3,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P5)*za(P3,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P5)*za(P3,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P4,P5)*za(P1,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P4,P5)*za(P1,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P1,P2)*za(P3,P4)/zb(P1,P3)/za(P1,P3)
+ 1 /za(P1,P5)/za(P2,P5)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P1,P3)*za(P3,P4)/zb(P2,P4)/za(P1,P5)
+ 1 /za(P2,P4)/za(P3,P5)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*za(P1,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P3,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P3,P5)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P4,P5)*za(P1,P4)*za(P3,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P1,P2)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P1,P5)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P1,P3)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P1,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*zb(P3,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*zb(P3,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P3,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P4,P5)*za(P1,P4)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P1,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*za(P1,P3)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P3,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*za(P1,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P1,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P1,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P1,P5)*S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P3,P5)*za(P3,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P1,P5)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P4,P5)*za(P1,P4)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P4,P5)*za(P1,P4)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P1,P5)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*za(P3,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*za(P3,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P5)*zb(P3,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P5)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*zb(P4,P5)*za(P1,P4)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P1,P5)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P1,P5)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P5)*zb(P2,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P3,P5)*za(P3,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*za(P3,P4)/zb(P1,P3)/za(P1,P3)/za(P2,P5)
+ 1 *S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P4)*za(P3,P5)
+ 1 /za(P1,P3)/za(P1,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P3,P5)*za(P3,P4)*za(P3,P5)/za(P1,P5)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P4,P5)*za(P1,P4)*za(P3,P4)*za(P3,P5)
+ 1 /za(P1,P3)/za(P1,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*za(P3,P4)/za(P1,P5)*S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a32(1,1,2)=XTOTAL
+C Punched 146 terms out of 146.
+
+*end
+C Expression pmp31
+ XTOTAL=0.
+ HDPART=zb(P1,P2)*zb(P1,P3)*zb(P1,P4)*za(P1,P2)*za(P2,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P3)*zb(P3,P4)*za(P2,P3)*za(P2,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*zb(P4,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P2)*za(P2,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P4,P5)*za(P2,P5)*za(P2,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P1,P4)*zb(P1,P5)*za(P1,P2)*za(P1,P5)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P1,P4)*zb(P4,P5)*za(P1,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P1,P4)*zb(P4,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P1,P4)*za(P1,P2)*za(P3,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P3)*zb(P1,P4)*za(P2,P3)/zb(P1,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P3)*zb(P1,P5)*zb(P3,P4)*za(P1,P5)*za(P2,P3)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P1,P5)*za(P1,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P3,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P3,P4)*za(P2,P3)*za(P3,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P3)*za(P2,P3)*za(P2,P5)/zb(P3,P5)/za(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P2,P5)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P3,P4)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P4,P5)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*zb(P4,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P4,P5)*za(P2,P5)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P2,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)
+ 1 *S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P3,P4)*za(P2,P3)*za(P2,P5)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*za(P2,P3)*za(P2,P5)*za(P2,P5)
+ 1 /zb(P3,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P3,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P4,P5)
+ 1 /zb(P3,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a31(1,2,1)=XTOTAL
+C Punched 52 terms out of 52.
+C Expression mpp31
+ XTOTAL=0.
+ HDPART=zb(P1,P2)*zb(P1,P3)*zb(P2,P3)*za(P1,P2)*za(P1,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P3)*zb(P3,P4)*za(P1,P4)*za(P1,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P3)*za(P1,P4)*za(P1,P5)*za(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P4)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P4)*za(P2,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P2,P3)*zb(P2,P5)*za(P1,P5)*za(P1,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P2,P3)*za(P1,P4)/zb(P1,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P3)*zb(P2,P3)*za(P1,P5)*za(P1,P5)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S135**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*za(P1,P4)*za(P1,P5)*za(P4,P5)/za(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*zb(P2,P5)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*za(P1,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*za(P2,P5)*za(P3,P4)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*zb(P3,P4)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P5)*za(P2,P5)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P3,P4)*za(P1,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P3,P4)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*za(P1,P4)*za(P2,P5)*za(P4,P5)/za(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P4,P5)/zb(P1,P5)/zb(P2,P4)/za(P2,P4)
+ 1 *S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P5)*zb(P3,P4)*za(P4,P5)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P3,P4)*za(P1,P4)*za(P4,P5)*za(P4,P5)/za(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a31(2,1,1)=XTOTAL
+C Punched 40 terms out of 40.
+C Expression pmp32
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P1,P2)*za(P2,P3)
+ 1 *za(P2,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P1,P2)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P3,P4)*za(P1,P2)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P2)*za(P1,P5)*za(P2,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P2)*za(P2,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P3,P4)*za(P2,P3)*za(P2,P3)
+ 1 *za(P2,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P3,P4)*za(P2,P3)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*zb(P3,P4)*za(P2,P3)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P5)*za(P2,P3)*za(P2,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P4,P5)*za(P1,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P4,P5)*za(P1,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P4,P5)*za(P2,P5)*za(P2,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P1,P4)*zb(P1,P5)*za(P1,P2)*za(P1,P5)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P1,P4)*zb(P4,P5)*za(P1,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*zb(P1,P4)*za(P1,P2)*za(P3,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*zb(P2,P3)*za(P1,P2)*za(P2,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*zb(P2,P3)*za(P1,P2)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*zb(P3,P4)*za(P1,P2)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P1,P5)*za(P3,P4)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P2,P5)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P2,P5)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P2,P5)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P2,P3)*za(P2,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P3,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P3,P4)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P3,P4)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P3,P4)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)*S124**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P3,P4)*za(P2,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P3,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*za(P1,P5)*za(P2,P5)/zb(P3,P5)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*za(P1,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P3,P4)*za(P2,P3)*za(P2,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P3,P4)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P4,P5)*za(P2,P5)*za(P2,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P3,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P4,P5)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P2,P3)*za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P2,P3)*za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P2,P3)/zb(P1,P3)/zb(P2,P5)
+ 1 /zb(P3,P5)/za(P1,P3)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P3,P4)*zb(P4,P5)*za(P2,P5)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P3,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P3,P4)*zb(P4,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P1,P5)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P3,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P4)*zb(P3,P4)*za(P3,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 *S124**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P4)*zb(P4,P5)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P4,P5)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P4,P5)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P3,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P4,P5)*za(P2,P5)*za(P4,P5)/zb(P2,P4)
+ 1 /zb(P3,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P1,P2)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P1,P2)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S25 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*za(P1,P5)*za(P2,P3)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P1,P5)*za(P2,P3)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*za(P2,P5)/zb(P2,P4)/zb(P3,P5)/za(P2,P4)
+ 1 *S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*za(P2,P5)/zb(P3,P5)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*za(P3,P5)/zb(P1,P3)/zb(P2,P5)/za(P1,P3)
+ 1 *S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P3,P4)*za(P2,P3)*za(P2,P5)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P3,P4)*za(P2,P3)*za(P2,P5)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P3,P4)*za(P2,P3)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P4,P5)*za(P2,P5)*za(P2,P5)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P3,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P3,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P3,P4)*zb(P4,P5)*za(P2,P5)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P3,P4)*za(P2,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P3,P4)*za(P2,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P3,P4)*za(P2,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P5)*zb(P3,P4)*za(P3,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P4,P5)*za(P1,P5)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P3,P4)*za(P2,P3)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P3,P4)*za(P2,P3)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P4,P5)*za(P2,P5)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P4,P5)*za(P2,P5)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P4,P5)*za(P2,P5)*za(P3,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a32(1,2,1)=XTOTAL
+C Punched 146 terms out of 146.
+C Expression mpp32
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P3)*za(P1,P4)*za(P1,P5)*za(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P1,P4)
+ 1 *za(P2,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P1,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P3,P4)*za(P1,P2)*za(P1,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P1,P4)
+ 1 *za(P2,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P1,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P2)*za(P1,P4)*za(P1,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P4)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P4)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P1,P4)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P4)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*zb(P3,P4)*za(P1,P4)*za(P1,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P4)*za(P1,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P3)*zb(P2,P5)*za(P1,P4)*za(P1,P5)*za(P1,P5)
+ 1 /zb(P3,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P3)*za(P1,P4)*za(P1,P5)*za(P4,P5)/za(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P2,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*zb(P3,P4)*za(P1,P2)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P2,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P3,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P1,P5)*za(P3,P4)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*za(P1,P4)*za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*za(P1,P4)*za(P2,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*za(P1,P4)/zb(P1,P3)/zb(P2,P5)
+ 1 /zb(P3,P5)/za(P1,P3)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P2,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P3,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*za(P1,P4)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P3,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P5)*za(P1,P5)*za(P2,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*zb(P3,P4)*za(P1,P4)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P3,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P3,P4)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P3,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P1,P4)*za(P1,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P1,P4)*za(P1,P5)/zb(P2,P4)/zb(P3,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*za(P1,P4)*za(P1,P5)/zb(P3,P5)/za(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*za(P1,P4)*za(P2,P5)*za(P4,P5)/za(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P1,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P1,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*za(P1,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P5)*zb(P3,P4)*zb(P3,P4)*za(P1,P4)*za(P4,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P3,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P2,P4)/zb(P3,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=2*zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P3,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P5)*zb(P3,P4)*za(P1,P5)*za(P4,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P5)*za(P1,P5)*za(P1,P5)*za(P4,P5)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P3,P4)*za(P1,P4)*za(P4,P5)*za(P4,P5)/za(P2,P4)
+ 1 *S124**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a32(2,1,1)=XTOTAL
+C Punched 90 terms out of 90.
+
+*end
+C Expression ppp42
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P1,P5)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P2,P4)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P5)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P4,P5)/zb(P1,P3)/zb(P2,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P3)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P2,P4)*za(P1,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P4)*za(P4,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*za(P1,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*zb(P2,P4)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P4)*za(P2,P3)*za(P4,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P4)*za(P3,P4)/zb(P1,P3)/zb(P2,P5)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*za(P1,P5)*za(P3,P4)*za(P3,P5)/za(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P3,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)
+ 1 *S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P2,P4)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P4)*za(P3,P4)*za(P4,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P2,P4)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*za(P3,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P3,P5)/za(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P4)*za(P3,P4)*za(P3,P5)*za(P4,P5)/za(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a42(1,1,1)=XTOTAL
+C Punched 40 terms out of 40.
+C Expression ppm42
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P3)*za(P2,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P2,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P1,P5)*za(P1,P2)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P3,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P4,P5)*za(P2,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P4)*za(P2,P3)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P4)*za(P2,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P2,P4)/zb(P1,P3)/za(P2,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P2,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*zb(P4,P5)*za(P2,P3)*za(P2,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P2,P3)*za(P2,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P3,P5)*za(P2,P3)*za(P3,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P2,P4)*za(P3,P4)/zb(P1,P3)/za(P1,P3)
+ 1 /za(P2,P5)/za(P4,P5)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*za(P1,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P2,P4)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*zb(P4,P5)*za(P2,P4)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P2,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P4)*zb(P3,P5)*za(P3,P4)*za(P3,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P1,P5)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*za(P2,P4)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P4)*za(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P3,P5)*za(P3,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*za(P3,P4)/zb(P1,P3)/za(P1,P3)/za(P2,P5)
+ 1 *S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P3,P4)*za(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P5)*zb(P4,P5)*za(P2,P4)*za(P3,P4)*za(P3,P5)
+ 1 /za(P1,P3)/za(P2,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*za(P2,P3)*za(P3,P4)/za(P1,P3)/za(P2,P5)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a42(1,1,2)=XTOTAL
+C Punched 52 terms out of 52.
+C Expression ppp41
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P1,P5)
+ 1 *za(P2,P3)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P2,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P1,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P2,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P1,P5)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P2,P3)*za(P1,P4)*za(P2,P3)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P2,P3)*za(P1,P5)*za(P2,P3)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P2,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P2,P4)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P2,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P1,P5)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P2,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*za(P2,P3)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P3,P4)/zb(P1,P5)/zb(P2,P4)
+ 1 /zb(P2,P5)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P4,P5)/zb(P1,P3)/zb(P2,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P1,P4)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P1,P5)*za(P3,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P2,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P2,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P3,P4)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P2,P3)*za(P1,P5)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P2,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P2,P3)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P4)*za(P1,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P2,P4)*za(P4,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*za(P1,P5)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P2,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*zb(P2,P3)*za(P2,P3)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P2,P4)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P3,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P3,P4)*za(P3,P5)/zb(P2,P4)
+ 1 /zb(P2,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P2,P4)*za(P2,P3)*za(P4,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P4)*za(P3,P4)/zb(P1,P3)/zb(P2,P5)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P3,P4)*za(P4,P5)/zb(P1,P3)/zb(P2,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P3,P4)*za(P4,P5)/zb(P1,P3)/zb(P2,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P3,P4)*za(P4,P5)/zb(P2,P5)/za(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P3,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*za(P3,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P3,P5)*za(P4,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P3,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)
+ 1 *S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P2,P3)*za(P3,P4)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P2,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P2,P4)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P3,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P2,P3)*za(P3,P4)*za(P3,P5)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P2,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P2,P4)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=2*zb(P1,P5)*zb(P2,P3)*za(P3,P4)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P2,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*za(P3,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*za(P3,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P4)*za(P3,P4)*za(P4,P5)*za(P4,P5)
+ 1 /zb(P2,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*za(P3,P5)*za(P4,P5)*za(P4,P5)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a41(1,1,1)=XTOTAL
+C Punched 118 terms out of 118.
+C Expression ppm41
+ XTOTAL=0.
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P1,P5)*za(P1,P2)*za(P1,P4)
+ 1 *za(P2,P3)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P2)*zb(P3,P5)*za(P1,P4)*za(P2,P3)
+ 1 *za(P2,P3)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*zb(P4,P5)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P2)*za(P1,P4)*za(P2,P3)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P2)*za(P1,P4)*za(P2,P3)*za(P2,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P1,P5)*za(P1,P2)*za(P1,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P3,P5)*za(P1,P4)*za(P2,P3)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P4,P5)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P2)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P4)*za(P2,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P1,P5)*za(P1,P2)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P2,P3)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P3,P5)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P4,P5)*za(P1,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*zb(P4,P5)*za(P1,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*zb(P4,P5)*za(P2,P4)*za(P4,P5)
+ 1 /zb(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*za(P1,P2)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P2)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*za(P1,P4)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P1,P4)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P1,P5)*za(P1,P4)*za(P2,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P5)*za(P2,P4)/zb(P1,P3)/za(P2,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P3,P5)*za(P2,P3)*za(P2,P3)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*zb(P4,P5)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P1,P2)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P2,P3)*za(P2,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P2,P3)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*zb(P4,P5)*za(P2,P3)*za(P2,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/za(P1,P3)/za(P2,P5)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P2)*za(P2,P3)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P1,P4)*za(P2,P3)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P2,P3)*za(P2,P4)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P5)*S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P2,P5)*za(P2,P3)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P5)*za(P2,P3)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P3,P5)*za(P2,P3)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P5)*za(P2,P3)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S25 +S34 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P2)*zb(P4,P5)*za(P1,P4)*za(P3,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P4,P5)*za(P3,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P4,P5)*za(P3,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P1,P2)*za(P3,P4)/zb(P2,P4)/za(P1,P5)
+ 1 /za(P2,P4)/za(P2,P5)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*za(P2,P4)*za(P3,P4)/zb(P1,P3)/za(P1,P3)
+ 1 /za(P2,P5)/za(P4,P5)*S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P3,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P3,P5)*za(P2,P3)*za(P3,P4)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P4,P5)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P1,P2)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P2,P4)*za(P3,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P3,P4)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*za(P1,P2)*za(P3,P4)*za(P4,P5)
+ 1 /zb(P2,P4)/za(P1,P5)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P3,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P3,P4)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P1,P5)*zb(P2,P3)*za(P1,P2)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P2,P4)/za(P2,P5)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P1,P5)*zb(P2,P5)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P1,P5)*za(P1,P2)*za(P3,P4)*za(P4,P5)
+ 1 /za(P2,P4)/za(P2,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P3,P5)*za(P2,P3)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/za(P2,P4)/za(P2,P5)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P4,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*zb(P4,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P3)*zb(P4,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P2,P4)/za(P2,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*za(P2,P3)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*za(P2,P3)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ TLPART= S25 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*za(P2,P3)*za(P3,P4)/zb(P2,P4)
+ 1 /za(P2,P4)/za(P2,P5)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P3)*za(P2,P4)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)/za(P2,P5)/za(P4,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*zb(P3,P5)*za(P2,P3)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)
+ 1 /za(P2,P5)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P2,P5)*zb(P4,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P5)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P2,P3)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P2,P3)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P2,P3)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/za(P1,P3)/za(P2,P4)/za(P2,P5)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P5)*zb(P2,P5)*za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P5)*za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P5)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P5)*zb(P3,P5)*za(P2,P3)*za(P3,P4)*za(P4,P5)
+ 1 /za(P2,P4)/za(P2,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P4,P5)*za(P3,P4)*za(P4,P5)/za(P2,P5)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*za(P3,P4)/za(P2,P5)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*za(P2,P3)*za(P3,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P4,P5)*za(P3,P4)*za(P3,P4)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P2,P5)*za(P2,P3)*za(P4,P5)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P5)*zb(P4,P5)*za(P3,P4)*za(P4,P5)/zb(P2,P4)
+ 1 /za(P1,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*za(P3,P4)/zb(P2,P4)/za(P1,P5)/za(P2,P4)
+ 1 *S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a41(1,1,2)=XTOTAL
+C Punched 146 terms out of 146.
+
+*end
+C Expression pmp42
+ XTOTAL=0.
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P2,P4)*za(P1,P2)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P4)*zb(P3,P4)*za(P2,P3)*za(P2,P3)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P4)*za(P2,P3)*za(P2,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*zb(P1,P5)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*zb(P2,P4)*za(P1,P2)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P2,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P2,P4)*za(P1,P2)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P2,P4)*za(P2,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*zb(P3,P4)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*za(P1,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P4)*za(P2,P3)/zb(P1,P3)/zb(P2,P5)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P4)*zb(P2,P4)*za(P2,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P3,P4)*za(P2,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P3,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*za(P1,P5)*za(P2,P3)*za(P3,P5)/za(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P3,P5)/zb(P1,P3)/zb(P2,P5)/za(P1,P3)
+ 1 *S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P5)*zb(P2,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P3,P4)*za(P3,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)/za(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P3,P4)*za(P2,P3)*za(P3,P5)*za(P3,P5)/za(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a42(1,2,1)=XTOTAL
+C Punched 40 terms out of 40.
+C Expression mpp42
+ XTOTAL=0.
+ HDPART=zb(P1,P2)*zb(P2,P3)*zb(P2,P4)*za(P1,P2)*za(P1,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P2)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P4)*zb(P3,P4)*za(P1,P4)*za(P1,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P4)*zb(P3,P5)*za(P1,P4)*za(P1,P5)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P5)*za(P1,P5)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P1,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P3,P5)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P1,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*za(P1,P4)*za(P1,P5)*za(P1,P5)
+ 1 /zb(P4,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*zb(P2,P4)*za(P1,P2)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P4)*zb(P2,P5)*za(P1,P2)*za(P2,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P4)*zb(P3,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P4)*zb(P3,P5)*za(P1,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P5)/zb(P4,P5)/za(P1,P3)*S245**(-1)
+ 1
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P4)*zb(P3,P5)*za(P2,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P4)*za(P1,P2)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*zb(P2,P4)*za(P1,P4)/zb(P1,P3)/zb(P2,P5)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*zb(P3,P4)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P3,P4)*zb(P3,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*zb(P3,P5)*za(P1,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P1,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)
+ 1 *S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P4)*zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P2,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P4)*zb(P2,P5)*za(P1,P4)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P4,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P4)*zb(P3,P4)*za(P1,P4)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P4)*za(P1,P4)*za(P1,P5)/zb(P4,P5)/za(P1,P3)
+ 1 *S134**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P5)*zb(P3,P4)*zb(P3,P4)*za(P1,P4)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S134**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P1,P5)*za(P3,P5)
+ 1 /zb(P4,P5)/za(P1,P3)*S134**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a42(2,1,1)=XTOTAL
+C Punched 52 terms out of 52.
+C Expression pmp41
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P1,P5)
+ 1 *za(P2,P3)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P2,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P3,P4)*za(P1,P2)*za(P2,P3)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P3,P4)*za(P1,P5)*za(P2,P3)
+ 1 *za(P2,P3)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P2,P3)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P2)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*za(P1,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*za(P2,P3)*za(P2,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P4)*za(P2,P3)*za(P2,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*zb(P3,P4)*za(P2,P3)*za(P2,P3)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P1,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*zb(P3,P4)*za(P1,P2)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*zb(P3,P4)*za(P1,P5)*za(P2,P3)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P1,P2)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P4)*zb(P1,P4)*za(P1,P5)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P1,P5)*za(P2,P3)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P2,P3)/zb(P1,P5)/zb(P2,P4)
+ 1 /zb(P4,P5)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P1,P4)*za(P2,P5)*za(P3,P4)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*zb(P3,P4)*za(P1,P5)*za(P2,P3)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*za(P1,P2)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*za(P1,P2)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P1,P5)*za(P1,P5)*za(P2,P3)*za(P2,P5)
+ 1 /zb(P4,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P1,P5)*za(P1,P5)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P3,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P5)/zb(P2,P4)
+ 1 /zb(P4,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P3,P4)*za(P2,P5)*za(P3,P4)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P1,P5)*za(P2,P3)*za(P3,P5)/za(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P2,P3)*za(P2,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P2,P3)*za(P2,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*za(P2,P3)*za(P2,P5)/zb(P4,P5)/za(P2,P4)
+ 1 *S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*za(P2,P5)*za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*za(P2,P5)*za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*za(P2,P5)*za(P3,P5)/zb(P1,P3)/zb(P2,P4)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P1,P5)*zb(P2,P4)*za(P2,P3)*za(P2,P5)*za(P2,P5)
+ 1 /zb(P4,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*zb(P3,P4)*zb(P3,P4)*za(P2,P3)*za(P3,P5)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-2*zb(P1,P5)*zb(P3,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)
+ 1 /zb(P4,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P5)*zb(P3,P4)*za(P2,P5)*za(P3,P5)*za(P3,P5)
+ 1 /zb(P1,P3)/zb(P2,P4)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P5)*za(P2,P5)*za(P2,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P4)*za(P2,P3)*za(P2,P5)*za(P3,P5)/za(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P3,P4)*za(P2,P3)*za(P3,P5)*za(P3,P5)/za(P1,P3)
+ 1 *S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ a41(1,2,1)=XTOTAL
+C Punched 90 terms out of 90.
+C Expression mpp41
+ XTOTAL=0.
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P1,P2)*za(P1,P4)
+ 1 *za(P1,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P1,P4)*zb(P2,P3)*za(P1,P2)*za(P1,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P3,P4)*za(P1,P4)*za(P1,P4)
+ 1 *za(P1,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P1,P4)*zb(P3,P4)*za(P1,P4)*za(P1,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*zb(P3,P4)*za(P1,P2)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P2,P3)*za(P1,P2)*za(P1,P4)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P1,P2)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P2,P3)*za(P1,P4)*za(P2,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*zb(P3,P4)*za(P1,P4)*za(P1,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P4)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S25 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P4)*za(P1,P4)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P5)*za(P1,P4)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P2)*zb(P3,P5)*za(P1,P4)*za(P1,P5)*za(P2,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P2)*zb(P3,P5)*za(P1,P5)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P1,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P1,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P1,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P1,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P2,P5)*za(P1,P2)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P2,P5)*za(P1,P5)*za(P1,P5)
+ 1 /zb(P2,P4)/zb(P4,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P1,P5)
+ 1 *za(P3,P4)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P3,P4)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*zb(P3,P5)*za(P1,P5)*za(P1,P5)
+ 1 *za(P3,P4)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*zb(P3,P5)*za(P1,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P1,P4)*zb(P2,P3)*za(P1,P4)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P1,P4)*za(P1,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P2,P3)*za(P1,P4)/zb(P1,P5)/zb(P2,P4)
+ 1 /zb(P4,P5)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P1,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P1,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P3,P4)*za(P1,P4)*za(P4,P5)
+ 1 /zb(P1,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P1,P4)*zb(P2,P5)*zb(P3,P5)*za(P1,P5)*za(P1,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*zb(P3,P4)*za(P1,P2)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*za(P1,P2)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P3)*za(P2,P5)*za(P3,P4)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P4)*zb(P2,P5)*za(P1,P2)*za(P2,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P4)*zb(P3,P5)*za(P2,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P4)*za(P1,P2)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*zb(P3,P4)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*zb(P3,P4)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P2,P5)*zb(P3,P4)*za(P1,P2)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)*S123**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*zb(P3,P4)*za(P1,P5)*za(P3,P5)
+ 1 /zb(P2,P4)/zb(P4,P5)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*za(P1,P5)*za(P2,P5)/zb(P4,P5)
+ 1 *S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P2,P5)*za(P2,P5)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P3,P4)*zb(P3,P4)*za(P1,P4)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P3,P4)*zb(P3,P5)*za(P1,P5)*za(P3,P4)
+ 1 *za(P3,P5)/zb(P2,P4)/zb(P4,P5)/za(P2,P4)*S234**(-1)
+ 1 *S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*zb(P3,P5)*za(P3,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)*S123**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P3)*zb(P3,P4)*za(P1,P4)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P5)*za(P3,P4)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S25 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P1,P5)*za(P3,P4)/zb(P2,P4)
+ 1 /zb(P4,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P2,P3)*zb(P3,P4)*za(P3,P4)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P4)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 *S123**(-1)*S1234**(-1)
+ TLPART= S15 +S25 +S35 +S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*zb(P3,P5)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*zb(P3,P5)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P3,P5)*za(P1,P5)*za(P2,P5)*za(P3,P4)
+ 1 /zb(P4,P5)/za(P2,P4)*S234**(-1)*S1234**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*zb(P3,P5)*za(P1,P5)*za(P3,P5)/zb(P1,P3)
+ 1 /zb(P4,P5)/za(P1,P3)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P3)*za(P1,P2)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P1,P2)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S15 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*za(P1,P4)*za(P2,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P3)*za(P1,P4)*za(P2,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*za(P1,P5)/zb(P1,P3)/zb(P4,P5)/za(P1,P3)
+ 1 *S245**(-1)
+ TLPART= -S12 -S14 -S15 -S23 -S34 -S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*za(P1,P5)/zb(P4,P5)*S234**(-1)*S1234**(-1)
+ TLPART= -S15 -S25 -S35 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P3)*za(P4,P5)/zb(P1,P5)/zb(P2,P4)/za(P2,P4)
+ 1 *S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P5)*zb(P3,P4)*zb(P3,P4)*za(P1,P4)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P3,P4)*zb(P3,P4)*za(P1,P4)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P3,P4)*zb(P3,P5)*za(P1,P5)*za(P3,P5)
+ 1 *za(P4,P5)/zb(P1,P3)/zb(P2,P4)/zb(P4,P5)/za(P1,P3)
+ 1 /za(P2,P4)*S245**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P3,P4)*za(P1,P5)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P2,P5)*zb(P3,P4)*za(P1,P5)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S12 +S14 +S15 +S23 +S34 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P5)*zb(P3,P4)*za(P1,P5)*za(P4,P5)/zb(P1,P3)
+ 1 /zb(P2,P4)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= S12 +S14 +S23 +S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P2,P5)*zb(P3,P4)*za(P4,P5)*za(P4,P5)/zb(P1,P5)
+ 1 /zb(P2,P4)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=-zb(P2,P5)*zb(P3,P5)*za(P1,P5)*za(P2,P5)*za(P4,P5)
+ 1 /zb(P1,P3)/zb(P4,P5)/za(P1,P3)/za(P2,P4)*S135**(-1)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P3,P4)*za(P1,P4)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P3,P4)*za(P1,P4)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= S15 +S35
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=-zb(P3,P5)*za(P1,P5)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)
+ XTOTAL=XTOTAL+HDPART
+ HDPART=zb(P3,P5)*za(P1,P5)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S245**(-1)
+ TLPART= -S12 -S14 -S23 -S34
+ XTOTAL=XTOTAL+HDPART*TLPART
+ HDPART=zb(P3,P5)*za(P1,P5)*za(P4,P5)/zb(P1,P3)/zb(P4,P5)
+ 1 /za(P1,P3)/za(P2,P4)*S135**(-1)
+ TLPART= -S12 -S14 -S23 -S25 -S34 -S45
+ XTOTAL=XTOTAL+HDPART*TLPART
+ a41(2,1,1)=XTOTAL
+C Punched 146 terms out of 146.
+*end
+
+ write(6,*)
+ write(6,*) 'mmm31',a31(1,1,1)
+ write(6,*) 'mmp31',a31(1,1,2)
+ write(6,*) 'mmm32',a32(1,1,1)
+ write(6,*) 'mmp32',a32(1,1,2)
+
+ write(6,*)
+ write(6,*) 'mpm31',a31(1,2,1)
+ write(6,*) 'pmm31',a31(2,1,1)
+ write(6,*) 'mpm32',a32(1,2,1)
+ write(6,*) 'pmm32',a32(2,1,1)
+
+ write(6,*)
+ write(6,*) 'mmm42',a42(1,1,1)
+ write(6,*) 'mmp42',a42(1,1,2)
+ write(6,*) 'mmm41',a41(1,1,1)
+ write(6,*) 'mmp41',a41(1,1,2)
+
+ write(6,*)
+ write(6,*) 'mpm42',a42(1,2,1)
+ write(6,*) 'pmm42',a42(2,1,1)
+ write(6,*) 'mpm41',a41(1,2,1)
+ write(6,*) 'pmm41',a41(2,1,1)
+ msq=0d0
+ do h1=1,2
+ do h2=1,2
+ do h5=1,2
+ msq=msq+0.5d0*V*(
+ . +(abs(a32(h1,h2,h5))**2+abs(a41(h1,h2,h5))**2)*xn
+ . +(abs(a31(h1,h2,h5))**2+abs(a42(h1,h2,h5))**2)/xn
+ . +two*(
+ . +dble(a31(h1,h2,h5)*Dconjg(a32(h1,h2,h5)))
+ . +dble(a31(h1,h2,h5)*Dconjg(a41(h1,h2,h5)))
+ . +dble(a32(h1,h2,h5)*Dconjg(a42(h1,h2,h5)))
+ . +dble(a41(h1,h2,h5)*Dconjg(a42(h1,h2,h5))))/xn)
+ enddo
+ enddo
+ enddo
+C full matrix element is given by the above multiplied by
+C g^6*A^2/2d0
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_h.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_h.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_h.f (revision 1338)
@@ -0,0 +1,35 @@
+ subroutine gg_h(p,msq)
+ implicit none
+c----Lowest order matrix element for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> b(p3)+b(p4))
+c---
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),s,s12
+ double precision hdecay,gg,Asq
+ s(j,k)=2d0*(p(j,4)*p(k,4)-p(j,1)*p(k,1)
+ . -p(j,2)*p(k,2)-p(j,3)*p(k,3))
+
+c---set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+
+C Deal with Higgs decay to b-bbar
+ s12=s(1,2)
+ hdecay=xn*gwsq*mbsq/(4d0*wmass**2)*2d0*(s12-4d0*mb**2)
+ hdecay=hdecay/((s12-hmass**2)**2+(hmass*hwidth)**2)
+
+ Asq=(as/(3d0*pi))**2/vevsq
+ gg=0.5d0*Asq*V*s12**2
+ msq(0,0)=avegg*gg*hdecay
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hg_z.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hg_z.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hg_z.f (revision 1338)
@@ -0,0 +1,84 @@
+ subroutine qqb_z1jet_z(p,z)
+************************************************************************
+* Authors: R.K. Ellis and John M. Campbell *
+* November, 2001. *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'PR_new.f'
+ include 'agq.f'
+ integer is
+ double precision z,xl12,xl15,xl25,p(mxpart,4),dot
+ double precision ii_qq,ii_qg,ii_gq,ii_gg,
+ . if_qq,if_gg,
+ . fi_qq,fi_gg
+
+ xl12=dlog(+two*dot(p,1,2)/musq)
+ xl15=dlog(-two*dot(p,1,5)/musq)
+ xl25=dlog(-two*dot(p,2,5)/musq)
+
+c--- sum over regular and plus terms
+ do is=1,3
+c--- (q,qb) terms
+ Q1(q,q,a,is) =ason4pi*xn*(if_qq(z,xl15,is)+0.5d0*fi_gg(z,xl15,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q1(a,a,q,is)=Q1(q,q,a,is)
+ Q2(a,a,q,is) =ason4pi*xn*(if_qq(z,xl25,is)+0.5d0*fi_gg(z,xl25,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q2(q,q,a,is) =Q2(a,a,q,is)
+
+c--- (q,g)
+ Q1(g,q,g,is)=ason4pi*two*cf*ii_gq(z,xl12,is)
+ Q2(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl25,is)+fi_qq(z,xl25,is))
+ Q1(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl15,is)+fi_qq(z,xl15,is))/xnsq)
+ Q2(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (qb,g)
+ Q1(g,a,g,is)=Q1(g,q,g,is)
+ Q2(g,g,a,is)=Q2(g,g,q,is)
+ Q1(a,a,g,is)=Q1(q,q,g,is)
+ Q2(q,g,a,is)=Q2(a,g,q,is)
+
+c--- (g,q)
+ Q2(g,q,g,is)=ason4pi*two*cf*ii_gq(z,xl12,is)
+ Q1(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl15,is)+fi_qq(z,xl15,is))
+ Q2(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl25,is)+fi_qq(z,xl25,is))/xnsq)
+ Q1(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (g,qb)
+ Q2(g,a,g,is)=Q2(g,q,g,is)
+ Q1(g,g,a,is)=Q1(g,g,q,is)
+ Q2(a,a,g,is)=Q2(q,q,g,is)
+ Q1(q,g,a,is)=Q1(a,g,q,is)
+
+c--- (g,g)
+ Q1(q,g,g,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+ Q1(a,g,g,is)=Q1(q,g,g,is)
+ Q2(q,g,g,is)=Q1(q,g,g,is)
+ Q2(a,g,g,is)=Q1(q,g,g,is)
+
+ Q1(g,g,g,is)=ason4pi*(
+ . +xn*(ii_gg(z,xl12,is)+if_gg(z,xl15,is)+half*fi_gg(z,xl15,is)))
+ Q2(g,g,g,is)=ason4pi*(
+ . +xn*(ii_gg(z,xl12,is)+if_gg(z,xl25,is)+half*fi_gg(z,xl25,is)))
+
+ enddo
+
+ do is=1,3
+ Q1(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q2(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q1(g,a,a,is)=Q1(g,q,q,is)
+ Q2(g,a,a,is)=Q2(g,q,q,is)
+ Q1(g,a,q,is)=Q1(g,q,q,is)
+ Q2(g,a,q,is)=Q2(g,q,q,is)
+ Q1(g,q,a,is)=Q1(g,q,q,is)
+ Q2(g,q,a,is)=Q2(g,q,q,is)
+
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/hqqgg.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/hqqgg.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/hqqgg.f (revision 1338)
@@ -0,0 +1,100 @@
+ subroutine hqqgg(p1,p2,p3,p4,ampsq)
+ implicit none
+C Taken from Kauffman,Desai,Risal
+C PRD 55 1997 (4009)
+C and checked with hep-ph/9903330
+ include 'constants.f'
+ include 'zprods_com.f'
+ include 'sprods_com.f'
+ integer p1,p2,p3,p4,j1,j2,j3
+ double complex ab(2,2,2),ba(2,2,2),abppp,abppm,bappm
+c double complex abmmm,abmmp,bammp
+ double precision ampsq
+C====statement functions
+C Eq 25
+ abppp(p1,p2,p3,p4)=
+ . +(za(p2,p1)*zb(p1,p3)+za(p2,p4)*zb(p4,p3))**2*zb(p1,p4)
+ . /((s(p1,p2)+s(p1,p4)+s(p2,p4))*za(p2,p4))
+ . *(1d0/s(p1,p2)+1d0/s(p1,p4))
+ . -(za(p2,p1)*zb(p1,p4)+za(p2,p3)*zb(p3,p4))**2
+ . *zb(p1,p3)/((s(p1,p2)+s(p1,p3)+s(p2,p3))*s(p1,p2)*za(p2,p3))
+ . +(+za(p2,p3)*zb(p3,p1)+za(p2,p4)*zb(p4,p1))**2
+ . /(zb(p1,p2)*za(p2,p3)*za(p2,p4)*za(p3,p4))
+
+c abmmm(p1,p2,p3,p4)=
+c . +(zb(p2,p1)*za(p1,p3)+zb(p2,p4)*za(p4,p3))**2
+c . *za(p1,p4)/((s(p1,p2)+s(p1,p4)+s(p2,p4))
+c . *zb(p2,p4))*(1d0/s(p1,p2)+1d0/s(p1,p4))
+c . -(+zb(p2,p1)*za(p1,p4)+zb(p2,p3)*za(p3,p4))**2
+c . *za(p1,p3)/((s(p1,p2)+s(p1,p3)+s(p2,p3))*s(p1,p2)*zb(p2,p3))
+c . +(+zb(p2,p3)*za(p3,p1)+zb(p2,p4)*za(p4,p1))**2
+c . /(za(p1,p2)*zb(p2,p3)*zb(p2,p4)*zb(p3,p4))
+C--Eq 26
+ abppm(p1,p2,p3,p4)=
+ . -za(p2,p4)**3/(za(p1,p2)*za(p2,p3)*za(p3,p4))
+ . +zb(p1,p3)**3/(zb(p1,p2)*zb(p1,p4)*zb(p3,p4))
+c abmmp(p1,p2,p3,p4)=
+c . -zb(p2,p4)**3/(zb(p1,p2)*zb(p2,p3)*zb(p3,p4))
+c . +za(p1,p3)**3/(za(p1,p2)*za(p1,p4)*za(p3,p4))
+
+C--Eq 27
+ bappm(p1,p2,p3,p4)=
+ . -zb(p1,p3)**2*zb(p2,p3)/(zb(p1,p2)*zb(p2,p4)*zb(p3,p4))
+ . +za(p1,p4)*za(p2,p4)**2/(za(p1,p2)*za(p1,p3)*za(p3,p4))
+
+c bammp(p1,p2,p3,p4)=
+c . -za(p1,p3)**2*za(p2,p3)/(za(p1,p2)*za(p2,p4)*za(p3,p4))
+c . +zb(p1,p4)*zb(p2,p4)**2/(zb(p1,p2)*zb(p1,p3)*zb(p3,p4))
+C====end statement functions
+
+C====It has been checked that taking the complex conjugate
+C====only gets the answer different by an overall (and hence irrelevant)
+C====phase (in some crossings).
+
+ ab(2,2,2)=abppp(p1,p2,p3,p4)
+c ab(1,1,1)=abmmm(p1,p2,p3,p4)
+ ab(1,1,1)=dconjg(ab(2,2,2))
+
+
+ ba(2,2,2)=abppp(p1,p2,p4,p3)
+c ba(1,1,1)=abmmm(p1,p2,p4,p3)
+ ba(1,1,1)=dconjg(ba(2,2,2))
+
+ ab(1,2,2)=abppp(p2,p1,p3,p4)
+c ab(2,1,1)=abmmm(p2,p1,p3,p4)
+ ab(2,1,1)=dconjg(ab(1,2,2))
+
+ ba(1,2,2)=abppp(p2,p1,p4,p3)
+c ba(2,1,1)=abmmm(p2,p1,p4,p3)
+ ba(2,1,1)=dconjg(ba(1,2,2))
+
+ ab(2,2,1)=abppm(p1,p2,p3,p4)
+c ab(1,1,2)=abmmp(p1,p2,p3,p4)
+ ab(1,1,2)=dconjg(ab(2,2,1))
+
+ ba(2,1,2)=abppm(p1,p2,p4,p3)
+c ba(1,2,1)=abmmp(p1,p2,p4,p3)
+ ba(1,2,1)=dconjg(ba(2,1,2))
+
+ ba(2,2,1)=bappm(p1,p2,p3,p4)
+c ba(1,1,2)=bammp(p1,p2,p3,p4)
+ ba(1,1,2)=dconjg(ba(2,2,1))
+
+ ab(2,1,2)=bappm(p1,p2,p4,p3)
+c ab(1,2,1)=bammp(p1,p2,p4,p3)
+ ab(1,2,1)=dconjg(ab(2,1,2))
+
+
+ ampsq=0d0
+ do j1=1,2
+ do j2=1,2
+ do j3=1,2
+ ampsq=ampsq
+ . +cf**2*xn*(cdabs(ab(j1,j2,j3))**2+cdabs(ba(j1,j2,j3))**2)
+ . -cf*dble(ab(j1,j2,j3)*Dconjg(ba(j1,j2,j3)))
+ enddo
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hww.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hww.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hww.f (revision 1338)
@@ -0,0 +1,38 @@
+ subroutine qqb_hww(p,msq)
+ implicit none
+c----Lowest order matrix element for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> W^+ (nu(p3)+e^+(p4))+W^- (e^-(p5)+nubar(p6))
+c---
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),s,s12
+ double precision decay,gg,Asq
+ s(j,k)=2*(p(j,4)*p(k,4)-p(j,1)*p(k,1)-p(j,2)*p(k,2)-p(j,3)*p(k,3))
+
+c---set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ s12=s(1,2)
+
+ decay=gwsq**3*wmass**2*s(3,5)*s(4,6)
+ decay=decay/((s(3,4)-wmass**2)**2+(wmass*wwidth)**2)
+ decay=decay/((s(5,6)-wmass**2)**2+(wmass*wwidth)**2)
+ decay=decay/((s12-hmass**2)**2+(hmass*hwidth)**2)
+
+ Asq=(as/(3d0*pi))**2/vevsq
+ gg=0.5d0*V*Asq*s12**2
+
+c---calculate propagators
+ msq(0,0)=avegg*gg*decay
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_w.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_w.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_w.f (revision 1338)
@@ -0,0 +1,41 @@
+ subroutine qqb_w(p,msq)
+ implicit none
+c----Matrix element for W production
+C----averaged over initial colours and spins
+C For nwz=+1
+c u(-p1)+dbar(-p2)-->W^+(n(p3)+e^+(p4))
+C For nwz=-1
+c d(-p1)+ubar(-p2)-->W^-(e^-(p3)+nbar(p4))
+c---
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'ckm.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),fac,qqb,qbq,s
+
+c--statement function
+ s(j,k)=2d0*(p(j,4)*p(k,4)-p(j,1)*p(k,1)
+ . -p(j,2)*p(k,2)-p(j,3)*p(k,3))
+
+
+ fac=gw**4*xn
+c-- calculate propagator
+ fac=aveqq*fac/((s(3,4)-wmass**2)**2+(wmass*wwidth)**2)
+c---case dbar-u or ubar-d
+ qqb=fac*s(1,4)**2
+ qbq=fac*s(2,4)**2
+
+ do j=-nf,nf
+ do k=-nf,nf
+c--set msq=0 to initalize
+ msq(j,k)=0d0
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=Vsq(j,k)*qqb
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=Vsq(j,k)*qbq
+ endif
+ enddo
+ enddo
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/virt5.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/virt5.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/virt5.f (revision 1338)
@@ -0,0 +1,30 @@
+ double precision function virt5(ip,za,zb)
+ implicit none
+************************************************************************
+* Author: R.K. Ellis *
+* July, 1999. *
+* Given za and zb calculate the *
+* the interference of the amplitude for the process *
+* 0--> qb_R(1)+q_L(2)+l_L(3)+a_R(4)+g_L/R(5) *
+* at one loop with the corresponding lowest order amplitude *
+* summed over the polarizations of the emitted gluon *
+* Virtual terms are in units of
+* (as/4/pi) (4 pi)^ep Gamma(1+ep)*Gamma(1-ep)^2/Gamma(1-2*ep)
+************************************************************************
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'zprods_decl.f'
+ integer ip(5)
+ double complex A5LOm,A5NLOm,A5LOp,A5NLOp
+
+c 0--> qb_R(1)+q_L(2)+l_L(3)+a_R(4)+g_L(5)
+ call A5NLO(ip(1),ip(2),ip(3),ip(4),ip(5),za,zb,A5LOm,A5NLOm)
+c 0--> qb_R(1)+q_L(2)+l_L(3)+a_R(4)+g_R(5)
+ call A5NLO(ip(2),ip(1),ip(4),ip(3),ip(5),zb,za,A5LOp,A5NLOp)
+
+ virt5=
+ . +ason2pi*(Dble(Dconjg(A5LOp)*A5NLOp)+Dble(Dconjg(A5LOm)*A5NLOm))
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_z.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_z.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_z.f (revision 1338)
@@ -0,0 +1,63 @@
+ subroutine qqb_z(p,msq)
+ implicit none
+C-----Author John Campbell
+C-----June 2000
+c----Matrix element for Z production
+C----averaged over initial colours and spins
+c q(-p1)+qbar(-p2)-->(e^-(p3)+e^+(p4))
+c---
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+ include 'ewcharge.f'
+ include 'zprods_decl.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),s,fac,s34
+ double complex prop,qqb,qbq
+
+
+c---statement function
+ s(j,k)=2*(p(j,4)*p(k,4)-p(j,1)*p(k,1)-p(j,2)*p(k,2)-p(j,3)*p(k,3))
+
+c--set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+ s34=s(3,4)
+c if (s34 .lt. 4d0*mbsq) return
+
+ fac=4d0*esq**2*xn
+
+c-- calculate propagators
+ fac=aveqq*fac/s34**2
+ prop=s34/Dcmplx((s34-zmass**2),zmass*zwidth)
+
+ call spinoru(4,p,za,zb)
+
+c---case qbar-q or q-qbar
+c qqb=fac*s(1,4)**2
+c qbq=fac*s(2,4)**2
+ qqb=za(2,3)*zb(4,1)
+ qbq=za(1,3)*zb(4,2)
+ do j=-nf,nf
+ k=-j
+ if ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(j,k)=0d0
+ elseif ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=+cdabs((Q(j)*q1+L(j)*l1*prop)*qqb)**2
+ . +cdabs((Q(j)*q1+R(j)*r1*prop)*qqb)**2
+ . +cdabs((Q(j)*q1+L(j)*r1*prop)*qbq)**2
+ . +cdabs((Q(j)*q1+R(j)*l1*prop)*qbq)**2
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=+cdabs((Q(k)*q1+L(k)*l1*prop)*qbq)**2
+ . +cdabs((Q(k)*q1+R(k)*r1*prop)*qbq)**2
+ . +cdabs((Q(k)*q1+L(k)*r1*prop)*qqb)**2
+ . +cdabs((Q(k)*q1+R(k)*l1*prop)*qqb)**2
+ endif
+ msq(j,k)=msq(j,k)*fac
+ enddo
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_w_gvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_w_gvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_w_gvec.f (revision 1338)
@@ -0,0 +1,120 @@
+ subroutine qqb_w_gvec(p,n,in,msq)
+ implicit none
+c----Matrix element for W production
+C----averaged over initial colours and spins
+c contracted with the vector v(mu)
+C For nwz=+1
+c u(-p1)+dbar(-p2)--> g(p5)+ W^+(n(p3)+e^+(p4))
+C For nwz=-1
+c d(-p1)+ubar(-p2)--> g(p5)+ W^-(e^-(p3)+nbar(p4))
+c---
+c---ip emitter
+c---kp spectator
+c---in label of gluon which is contracted with n
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ include 'sprods_com.f'
+ include 'ckm.f'
+ integer j,k,in
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4)
+ double precision w1jetn,p1p2(-1:1,-1:1),n(4)
+
+ double precision FAC
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ do j=-1,+1
+ do k=-1,+1
+ p1p2(j,k)=0d0
+ enddo
+ enddo
+
+ fac=2d0*gsq*V*gwsq**2
+ call dotem(5,p,s)
+
+ if (in .eq. 1) then
+ p1p2(0,-1)=-aveqg*fac*w1jetn(5,2,1,p,n)
+ p1p2(0,+1)=-aveqg*fac*w1jetn(2,5,1,p,n)
+ elseif (in .eq. 2) then
+ p1p2(+1,0)=-aveqg*fac*w1jetn(1,5,2,p,n)
+ p1p2(-1,0)=-aveqg*fac*w1jetn(5,1,2,p,n)
+ elseif (in .eq. 5) then
+ p1p2(1,-1)=+aveqq*fac*w1jetn(1,2,5,p,n)
+ p1p2(-1,1)=+aveqq*fac*w1jetn(2,1,5,p,n)
+ endif
+
+ do j=-nf,nf
+ do k=-nf,nf
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=Vsq(j,k)*p1p2(1,-1)
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=Vsq(j,k)*p1p2(-1,1)
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & (Vsq(j,-1)+Vsq(j,-2)+Vsq(j,-3)+Vsq(j,-4)+Vsq(j,-5))*p1p2(+1,0)
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & (Vsq(j,+1)+Vsq(j,+2)+Vsq(j,+3)+Vsq(j,+4)+Vsq(j,+5))*p1p2(-1,0)
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=
+ & (Vsq(-1,k)+Vsq(-2,k)+Vsq(-3,k)+Vsq(-4,k)+Vsq(-5,k))*p1p2(0,+1)
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=
+ & (Vsq(+1,k)+Vsq(+2,k)+Vsq(+3,k)+Vsq(+4,k)+Vsq(+5,k))*p1p2(0,-1)
+ endif
+
+ enddo
+ enddo
+ return
+ end
+
+ double precision function w1jetn(j1,j2,j5,p,n)
+ implicit none
+C---calculates the amplitude squared for the process
+c q(p1)+qbar(p2) --> W(l(p3)+a(p4)+g(p5)
+c contracted with the vector n(mu)
+ include 'constants.f'
+ include 'masses.f'
+ include 'sprods_com.f'
+ integer j1,j2,j3,j4,j5
+ double precision p(mxpart,4),n(4),nDn,prop,
+ . nDp1,nDp2,nDp3,nDp4,nDp5
+ j3=3
+ j4=4
+ nDp1=n(4)*p(j1,4)-n(3)*p(j1,3)-n(2)*p(j1,2)-n(1)*p(j1,1)
+ nDp2=n(4)*p(j2,4)-n(3)*p(j2,3)-n(2)*p(j2,2)-n(1)*p(j2,1)
+ nDp3=n(4)*p(j3,4)-n(3)*p(j3,3)-n(2)*p(j3,2)-n(1)*p(j3,1)
+ nDp4=n(4)*p(j4,4)-n(3)*p(j4,3)-n(2)*p(j4,2)-n(1)*p(j4,1)
+ nDn=n(4)**2-n(3)**2-n(2)**2-n(1)**2
+
+ nDp5=n(4)*p(j5,4)-n(3)*p(j5,3)-n(2)*p(j5,2)-n(1)*p(j5,1)
+
+c--- appropriate scale is approx 1d-3*energy(incoming)
+c--- so of order(1) for the Tevatron
+C if (abs(nDp5).gt.1d-2*abs(p(j1,4))) then
+C write(*,*) 'Error for :',j1,j2,j3,j4,j5
+C write(*,*) 'cutoff',1d-3*abs(p(j1,4))
+C write(6,*) 'nDp5',nDp5
+C call flush(6)
+C stop
+C endif
+
+c---calculate the propagator
+ prop=((s(j3,j4)-wmass**2)**2+(wmass*wwidth)**2)
+
+ w1jetn=(nDp1*s(j2,j3)/s(j1,j5)-nDp2*s(j1,j4)/s(j2,j5))**2
+ . +(s(j2,j3)*nDp1/s(j1,j5)-s(j1,j4)*nDp2/s(j2,j5))
+ . *(nDp2+nDp3-nDp4-nDp1)
+ . -(s(j1,j4)-s(j2,j3))**2*s(j3,j4)*nDn/4d0/s(j1,j5)/s(j2,j5)
+ . -(nDp1+nDp4)*(nDp2+nDp3)
+
+ w1jetn=w1jetn/prop
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_v.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_v.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_v.f (revision 1338)
@@ -0,0 +1,59 @@
+CC NEW: gg->Hg virtual contribution with H->WW decay
+
+
+ subroutine gg_hwwg_v(p,msq)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'sprods_com.f'
+ include 'scheme.f'
+C (Taken from Ravindran, Smith, van Neerven hep-ph/0201114)
+C Modified by overall factors
+ integer iglue,j,k
+ double precision p(4,mxpart),msq(fn:nf,fn:nf)
+ double precision ss,tt,uu,s34,
+ . virtgg,virtqa,virtaq,virtqg,virtgq,hdecay,Asq,fac,sh
+c parameter(iglue=5)
+ parameter(iglue=7) ! gluon label
+
+ scheme='tH-V'
+
+ call dotem(iglue,p,s)
+ ss=s(1,2)
+ tt=s(1,iglue)
+ uu=s(2,iglue)
+
+ Asq=(as/(3d0*pi))**2/vevsq
+
+C Deal with Higgs decay to b-bbar
+c s34=s(3,4)+2d0*mb**2
+c hdecay=xn*gwsq*mbsq/(4d0*wmass**2)*2d0*(s34-4d0*mb**2)
+c hdecay=hdecay/((s34-hmass**2)**2+(hmass*hwidth)**2)
+
+C Higgs virtuality
+
+ sh=s(3,4)+s(3,5)+s(3,6)+s(4,5)+s(4,6)+s(5,6)
+
+ hdecay=gwsq**3*wmass**2*s(3,5)*s(4,6)
+ hdecay=hdecay/((s(3,4)-wmass**2)**2+(wmass*wwidth)**2)
+ hdecay=hdecay/((s(5,6)-wmass**2)**2+(wmass*wwidth)**2)
+ hdecay=hdecay/((sh-hmass**2)**2+(hmass*hwidth)**2)
+
+ fac=ason2pi*Asq*gsq*hdecay
+ call hjetfill(ss,tt,uu,virtgg,virtqa,virtaq,virtqg,virtgq)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ if ((j.eq.0).and.(k.eq.0)) msq(j,k)=avegg*fac*virtgg
+ if ((j.gt.0).and.(k.eq.-j)) msq(j,k)=aveqq*fac*virtqa
+ if ((j.lt.0).and.(k.eq.-j)) msq(j,k)=aveqq*fac*virtaq
+ if ((j.eq.0).and.(k.ne.0)) msq(j,k)=aveqg*fac*virtgq
+ if ((j.ne.0).and.(k.eq.0)) msq(j,k)=aveqg*fac*virtqg
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/aqqb_zbb.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/aqqb_zbb.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/aqqb_zbb.f (revision 1338)
@@ -0,0 +1,62 @@
+c double complex function aqqb_zbb(i1,i2,i3,i4,i5,i6)
+c--- Note that this is the amplitude for particle labels
+c--- q1, qb2, Q5, Qb6, l3, lb4
+c--- This corresponds to A++(1,6,5,2) of eq. (12.3) in BDK
+c--- and we note that A++(1,6,5,2) = A++(1,4,3,2)
+c implicit none
+c include 'constants.f'
+c include 'sprods_com.f'
+c include 'zprods_com.f'
+c integer i1,i2,i3,i4,i5,i6
+c double complex t2a
+c double precision s234,s256,prop
+c--- statement function
+c t2a(i1,i2,i3,i4)=za(i1,i2)*zb(i2,i4)+za(i1,i3)*zb(i3,i4)
+c
+c s234=s(i2,i3)+s(i2,i4)+s(i3,i4)
+c s256=s(i2,i6)+s(i2,i5)+s(i5,i6)
+c prop=s(i5,i6)*s(i3,i4)
+c aqqb_zbb=
+c & +zb(i1,i4)*za(i5,i2)*t2a(i3,i1,i4,i6)/(prop*s256)
+c & +za(i3,i2)*zb(i6,i1)*t2a(i5,i2,i3,i4)/(prop*s234)
+
+c return
+c end
+
+ double complex function aqqb_zbb_new(i1,i2,i3,i4,i5,i6)
+c--- This corresponds to A++(1,2,3,4) of eq. (12.3) in BDK
+c The notation of BDK calculates the following amplitude
+c
+c q3(L)----<----------q2 q3(L)------<--------q2
+c 0 0
+c 0 0
+c 0 0
+c q1(R)------<--------q4 q1(R)------<--------q4
+c ) )
+c ( (
+c ) )
+c l5(L)-------<-------l6 l5(L)-------<-------l6
+c
+c Note that this function has the property
+c Conjg(aqqb_zbb_new(i1,i2,i3,i4,i5,i6))=
+C -aqqb_zbb_new(i4,i3,i2,i1,i6,i5)
+ implicit none
+ include 'constants.f'
+ include 'sprods_com.f'
+ include 'zprods_com.f'
+ integer i1,i2,i3,i4,i5,i6
+ double complex t2a
+ double precision s123,s234,prop
+c--- statement function
+ t2a(i1,i2,i3,i4)=za(i1,i2)*zb(i2,i4)+za(i1,i3)*zb(i3,i4)
+
+ s123=s(i1,i2)+s(i1,i3)+s(i2,i3)
+ s234=s(i2,i3)+s(i2,i4)+s(i3,i4)
+ prop=s(i2,i3)*s(i5,i6)
+
+ aqqb_zbb_new=
+ & +zb(i1,i2)*za(i5,i4)*t2a(i3,i1,i2,i6)/(prop*s123)
+ & +za(i3,i4)*zb(i6,i1)*t2a(i5,i3,i4,i2)/(prop*s234)
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_gvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_gvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_gvec.f (revision 1338)
@@ -0,0 +1,23 @@
+ subroutine qqb_hzz_gvec(p,n,in,msq)
+ implicit none
+ include 'constants.f'
+C ip is the label of the emitting parton
+C kp is the label of the spectator parton
+ integer j,k,in
+ double precision msq(-nf:nf,-nf:nf),msqt(-nf:nf,-nf:nf)
+ double precision n(4),nDn,p(mxpart,4)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ nDn=n(4)**2-n(3)**2-n(2)**2-n(1)**2
+ call qqb_hzz(p,msqt)
+
+ msq(0,0)=-0.5d0*nDn*msqt(0,0)
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_z.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_z.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_z.f (revision 1338)
@@ -0,0 +1,84 @@
+ subroutine gg_hwwg_z(p,z)
+************************************************************************
+* Authors: R.K. Ellis and John M. Campbell *
+* November, 2001. *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'PR_new.f'
+ include 'agq.f'
+ integer is
+ double precision z,xl12,xl17,xl27,p(mxpart,4),dot
+ double precision ii_qq,ii_qg,ii_gq,ii_gg,
+ . if_qq,if_gg,
+ . fi_qq,fi_gg
+
+ xl12=dlog(+two*dot(p,1,2)/musq)
+ xl17=dlog(-two*dot(p,1,7)/musq)
+ xl27=dlog(-two*dot(p,2,7)/musq)
+
+c--- sum over regular and plus terms
+ do is=1,3
+c--- (q,qb) terms
+ Q1(q,q,a,is) =ason4pi*xn*(if_qq(z,xl17,is)+0.5d0*fi_gg(z,xl17,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q1(a,a,q,is)=Q1(q,q,a,is)
+ Q2(a,a,q,is) =ason4pi*xn*(if_qq(z,xl27,is)+0.5d0*fi_gg(z,xl27,is)
+ & -ii_qq(z,xl12,is)/xnsq)
+ Q2(q,q,a,is) =Q2(a,a,q,is)
+
+c--- (q,g)
+ Q1(g,q,g,is)=ason4pi*two*cf*ii_gq(z,xl12,is)
+ Q2(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl27,is)+fi_qq(z,xl27,is))
+ Q1(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl17,is)+fi_qq(z,xl17,is))/xnsq)
+ Q2(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (qb,g)
+ Q1(g,a,g,is)=Q1(g,q,g,is)
+ Q2(g,g,a,is)=Q2(g,g,q,is)
+ Q1(a,a,g,is)=Q1(q,q,g,is)
+ Q2(q,g,a,is)=Q2(a,g,q,is)
+
+c--- (g,q)
+ Q2(g,q,g,is)=ason4pi*two*cf*ii_gq(z,xl12,is)
+ Q1(g,g,q,is)=ason4pi*xn
+ & *(ii_gg(z,xl12,is)+if_gg(z,xl17,is)+fi_qq(z,xl17,is))
+ Q2(q,q,g,is)=ason4pi*xn*(ii_qq(z,xl12,is)
+ & -(if_qq(z,xl27,is)+fi_qq(z,xl27,is))/xnsq)
+ Q1(a,g,q,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+c--- (g,qb)
+ Q2(g,a,g,is)=Q2(g,q,g,is)
+ Q1(g,g,a,is)=Q1(g,g,q,is)
+ Q2(a,a,g,is)=Q2(q,q,g,is)
+ Q1(q,g,a,is)=Q1(a,g,q,is)
+
+c--- (g,g)
+ Q1(q,g,g,is)=ason4pi*2d0*tr*ii_qg(z,xl12,is)
+ Q1(a,g,g,is)=Q1(q,g,g,is)
+ Q2(q,g,g,is)=Q1(q,g,g,is)
+ Q2(a,g,g,is)=Q1(q,g,g,is)
+
+ Q1(g,g,g,is)=ason4pi*(
+ . +xn*(ii_gg(z,xl12,is)+if_gg(z,xl17,is)+half*fi_gg(z,xl17,is)))
+ Q2(g,g,g,is)=ason4pi*(
+ . +xn*(ii_gg(z,xl12,is)+if_gg(z,xl27,is)+half*fi_gg(z,xl27,is)))
+
+ enddo
+
+ do is=1,3
+ Q1(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q2(g,q,q,is)=ason4pi*(xn-1d0/xn)*ii_gq(z,xl12,is)
+ Q1(g,a,a,is)=Q1(g,q,q,is)
+ Q2(g,a,a,is)=Q2(g,q,q,is)
+ Q1(g,a,q,is)=Q1(g,q,q,is)
+ Q2(g,a,q,is)=Q2(g,q,q,is)
+ Q1(g,q,a,is)=Q1(g,q,q,is)
+ Q2(g,q,a,is)=Q2(g,q,q,is)
+
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/ampqqb_qqb.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/ampqqb_qqb.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/ampqqb_qqb.f (revision 1338)
@@ -0,0 +1,39 @@
+ subroutine ampqqb_qqb(i1,i2,i5,i6,qqbA,qqbB)
+ implicit none
+ integer i1,i2,i5,i6,swap(2),j,k
+ double complex aqqb_zbb_new
+ double complex qqbA(2,2,2),qqbB(2,2,2)
+ data swap/2,1/
+c--- also include diagrams where the Z is attached to b-bbar line
+c--- notation: (qqb hel, bbb hel, outgoing lepton helicity is left-handed
+
+c--- Z to qqb, L L L
+ qqbA(1,1,1)=+aqqb_zbb_new(i1,i6,i5,i2,3,4)
+c--- Z to bbb, L L
+ qqbB(1,1,1)=+aqqb_zbb_new(i6,i1,i2,i5,3,4)
+
+c--- Z to qqb, R R
+ qqbA(2,2,1)=-aqqb_zbb_new(i2,i5,i6,i1,3,4)
+c--- Z to bbb, R R
+ qqbB(2,2,1)=-aqqb_zbb_new(i5,i2,i1,i6,3,4)
+
+c--- Z to qqb, L R
+ qqbA(1,2,1)=+aqqb_zbb_new(i1,i5,i6,i2,3,4)
+c--- Z to bbb, L R
+ qqbB(1,2,1)=-aqqb_zbb_new(i5,i1,i2,i6,3,4)
+
+c--- Z to qqb, R L
+ qqbA(2,1,1)=-aqqb_zbb_new(i2,i6,i5,i1,3,4)
+c--- Z to bbb, R L
+ qqbB(2,1,1)=+aqqb_zbb_new(i6,i2,i1,i5,3,4)
+
+ do j=1,2
+ do k=1,2
+ qqbA(j,k,2)=Dconjg(qqbA(swap(j),swap(k),1))
+ qqbB(j,k,2)=Dconjg(qqbB(swap(j),swap(k),1))
+ enddo
+ enddo
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_g.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_g.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_g.f (revision 1338)
@@ -0,0 +1,112 @@
+ subroutine qqb_hzz_g(p,msq)
+ implicit none
+c----NLO matrix element for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> Z(e^-(p3)+e^+(p4)) + Z(mu^-(p5)+mu^+(p6))
+c +g(p7)
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4)
+ double precision dec,interf,num,den,shiggs
+ double precision sh,ss,tt,uu,decay,s(mxpart,mxpart)
+ double precision aw,qqb,qg,gq,gg
+
+ logical int
+ common/int/int
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ aw=gwsq/(4d0*pi)
+ call dotem(7,p,s)
+
+
+ shiggs=s(3,4)+s(3,5)+s(3,6)+s(4,5)+s(4,6)+s(5,6)
+
+ interf=0d0
+
+
+ decay=(((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+ . +((r1*l2)**2+(r2*l1)**2)*s(3,6)*s(4,5))
+
+
+ decay=decay/((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)
+ decay=decay/((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+C Here only H->ZZ->(34)(56): diagram with (1<->3) accounted for
+C by adding a factor 2
+
+ if(int.eqv..false.)goto 39
+
+ decay=2*decay
+
+C Interference contribution
+
+ interf=2*((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+
+ num=((s(3,4)-zmass**2)*(s(5,6)-zmass**2)*(s(4,5)-zmass**2)*
+ . (s(3,6)-zmass**2)+(zmass*zwidth)**4+
+ . (zmass*zwidth)**2*(2*zmass**4-zmass**2*
+ . (s(3,4)+s(5,6)+s(4,5)+s(3,6))+s(3,4)*s(3,6)+s(3,4)*s(4,5)+
+ . s(3,6)*s(5,6)+s(4,5)*s(5,6)-s(3,6)*s(4,5)-s(3,4)*s(5,6)))
+
+ den=((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(4,5)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(3,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+
+ interf=interf*num/den
+
+ 39 continue
+
+ dec=gwsq**3*zmass**2*4d0*xw**2/(one-xw)*
+ . (decay+interf)/((shiggs-hmass**2)**2+(hmass*hwidth)**2)
+
+C In case of identical particles add 1/4 symmetry factor
+
+ if(int) dec=dec/4
+
+c-- calculate propagators
+ ss=s(1,2)
+ tt=s(1,7)
+ uu=s(2,7)
+ sh=s(1,2)+s(1,7)+s(2,7)
+
+ gg=aw*as**3*4d0*V/9d0*xn*(sh**4+ss**4+tt**4+uu**4)
+ . /(ss*tt*uu*wmass**2)
+ qqb=aw*as**3*2d0*V/9d0*(tt**2+uu**2)/(ss*wmass**2)
+ gq=-aw*as**3*2d0*V/9d0*(ss**2+tt**2)/(uu*wmass**2)
+ qg=-aw*as**3*2d0*V/9d0*(ss**2+uu**2)/(tt*wmass**2)
+
+
+ gg=avegg*gg*dec
+ gq=aveqg*gq*dec
+ qg=aveqg*qg*dec
+ qqb=aveqq*qqb*dec
+
+
+c--set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ if ((k .eq. -j) .and. (j .ne. 0)) then
+ msq(j,k)=qqb
+ elseif ((j .eq. 0) .and. (k .ne. 0)) then
+ msq(j,k)=gq
+ elseif ((j .ne. 0) .and. (k .eq. 0)) then
+ msq(j,k)=qg
+ elseif ((k .eq. 0) .and. (j .eq. 0)) then
+ msq(j,k)=gg
+ endif
+ enddo
+ enddo
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_gs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_gs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_w1jet_gs.f (revision 1338)
@@ -0,0 +1,235 @@
+ subroutine qqb_w1jet_gs(p,msq)
+************************************************************************
+* Author: J.M. Campbell *
+* July, 1999. *
+************************************************************************
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c q(-p1)+qbar(-p2) --> W + parton(p5) + parton(p6)
+c |
+c -->l(p3)+a(p4)
+c positively charged W only
+
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ include 'ckm.f'
+ integer j,k,nd
+c --- remember: nd will count the dipoles
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision
+ & msq15_2(-nf:nf,-nf:nf),msq25_1(-nf:nf,-nf:nf),
+ & msq16_2(-nf:nf,-nf:nf),msq26_1(-nf:nf,-nf:nf),
+ & msq15_6(-nf:nf,-nf:nf),msq26_5(-nf:nf,-nf:nf),
+ & msq16_5(-nf:nf,-nf:nf),msq25_6(-nf:nf,-nf:nf),
+ & msq56_1v(-nf:nf,-nf:nf),msq56_2v(-nf:nf,-nf:nf),
+ & msq26_5v(-nf:nf,-nf:nf),msq26_1v(-nf:nf,-nf:nf),
+ & msq15_6v(-nf:nf,-nf:nf),msq16_2v(-nf:nf,-nf:nf),
+ & msq16_5v(-nf:nf,-nf:nf),msq25_6v(-nf:nf,-nf:nf),
+ & msq15_2v(-nf:nf,-nf:nf),msq25_1v(-nf:nf,-nf:nf),
+ & dummy(-nf:nf,-nf:nf),
+ & sub15_2(4),sub25_1(4),sub16_2(4),sub26_1(4),
+ & sub15_6(4),sub16_5(4),sub25_6(4),sub26_5(4),
+ & sub56_1(4),sub56_2(4),sub56_1v,sub56_2v,
+ & sub26_5v,sub26_1v,sub16_5v,sub16_2v,sub15_2v,sub15_6v,sub25_6v,
+ & sub25_1v
+ external qqb_w_g,qqb_w_gvec
+ ndmax=6
+
+c--- calculate all the initial-initial dipoles
+ call dips(1,p,1,5,2,sub15_2,sub15_2v,msq15_2,msq15_2v,
+ . qqb_w_g,qqb_w_gvec)
+ call dips(2,p,2,5,1,sub25_1,sub25_1v,msq25_1,msq25_1v,
+ . qqb_w_g,qqb_w_gvec)
+ call dips(3,p,1,6,2,sub16_2,sub16_2v,msq16_2,msq16_2v,
+ . qqb_w_g,qqb_w_gvec)
+ call dips(4,p,2,6,1,sub26_1,sub26_1v,msq26_1,msq26_1v,
+ . qqb_w_g,qqb_w_gvec)
+
+c--- now the basic initial final ones
+ call dips(5,p,1,5,6,sub15_6,sub15_6v,msq15_6,msq15_6v,
+ . qqb_w_g,qqb_w_gvec)
+c--- called for final initial the routine only supplies new values for
+c--- sub... and sub...v and msqv
+ call dips(5,p,5,6,1,sub56_1,sub56_1v,dummy,msq56_1v,
+ . qqb_w_g,qqb_w_gvec)
+ call dips(5,p,1,6,5,sub16_5,sub16_5v,msq16_5,msq16_5v,
+ . qqb_w_g,qqb_w_gvec)
+
+ call dips(6,p,2,6,5,sub26_5,sub26_5v,msq26_5,msq26_5v,
+ . qqb_w_g,qqb_w_gvec)
+ call dips(6,p,5,6,2,sub56_2,sub56_2v,dummy,msq56_2v,
+ . qqb_w_g,qqb_w_gvec)
+ call dips(6,p,2,5,6,sub25_6,sub25_6v,msq25_6,msq25_6v,
+ . qqb_w_g,qqb_w_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+ enddo
+ enddo
+
+c if (Gflag) then
+ do j=-nf,nf
+ do k=-nf,nf
+c--- do only q-qb and qb-q cases
+ if ( ((j .gt. 0).and.(k .lt. 0))
+ . .or. ((j .lt. 0).and.(k .gt. 0))) then
+ msq(1,j,k)=-msq15_2(j,k)*sub15_2(qq)/xn
+ msq(2,j,k)=-msq25_1(j,k)*sub25_1(qq)/xn
+ msq(3,j,k)=-msq16_2(j,k)*sub16_2(qq)/xn
+ msq(4,j,k)=-msq26_1(j,k)*sub26_1(qq)/xn
+ msq(5,j,k)=xn*(
+ . +msq15_6(j,k)*(sub15_6(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v
+ . +msq16_5(j,k)*(sub16_5(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=xn*(
+ . (msq26_5(j,k)*(sub26_5(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v)
+ . +(msq25_6(j,k)*(sub25_6(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v))
+
+c--- note statistical factor of one half for two gluons in the final state
+ do nd=1,ndmax
+ msq(nd,j,k)=half*msq(nd,j,k)
+ enddo
+
+ elseif ((k .eq. 0).and. (j .ne. 0)) then
+c--- q-g and qb-g cases
+ msq(2,j,k)=2d0*tr*(msq25_1(j,-5)+msq25_1(j,-4)+msq25_1(j,-3)
+ . +msq25_1(j,-2)+msq25_1(j,-1)+msq25_1(j,+1)
+ . +msq25_1(j,+2)+msq25_1(j,+3)+msq25_1(j,+4)
+ . +msq25_1(j,+5))*sub25_1(qg)
+ msq(3,j,k)=xn*msq16_2(j,k)*sub16_2(qq)
+ msq(4,j,k)=xn*(msq26_1(j,k)*sub26_1(gg)+msq26_1v(j,k)*sub26_1v)
+ msq(5,j,k)=-msq16_5(j,k)*(sub16_5(qq)+sub56_1(qq))/xn
+ msq(6,j,k)=xn*(msq26_5(j,k)*sub26_5(gg)+msq26_5v(j,k)*sub26_5v
+ . +msq26_5(j,k)*sub56_2(qq))
+
+ elseif ((j .eq. 0).and.(k.ne.0)) then
+c--- g-q and g-qb cases
+ msq(1,j,k)=2d0*tr*(msq15_2(-5,k)+msq15_2(-4,k)+msq15_2(-3,k)
+ . +msq15_2(-2,k)+msq15_2(-1,k)+msq15_2(+1,k)
+ . +msq15_2(+2,k)+msq15_2(+3,k)+msq15_2(+4,k)
+ . +msq15_2(+5,k))*sub15_2(qg)
+ msq(3,j,k)=xn*(msq16_2(j,k)*sub16_2(gg)+msq16_2v(j,k)*sub16_2v)
+ msq(4,j,k)=xn*msq26_1(j,k)*sub26_1(qq)
+ msq(5,j,k)=xn*(msq16_5(j,k)*sub16_5(gg)+msq16_5v(j,k)*sub16_5v
+ . +msq16_5(j,k)*sub56_1(qq))
+ msq(6,j,k)=-msq26_5(j,k)*(sub26_5(qq)+sub56_2(qq))/xn
+
+ elseif ((j .eq. 0).and.(k .eq. 0)) then
+c--- g-g case
+c--- note g,g = 1,2 and qb=5, q=6 so (15),(25)-->q and (16),(26)-->qb
+ msq(1,j,k)=(msq15_2(+1,k)+msq15_2(+2,k)+msq15_2(+3,k)
+ . +msq15_2(+4,k)+msq15_2(+5,k))*sub15_2(qg)*2d0*tr
+ msq(2,j,k)=(msq25_1(k,+1)+msq25_1(k,+2)+msq25_1(k,+3)
+ . +msq25_1(k,+4)+msq25_1(k,+5))*sub25_1(qg)*2d0*tr
+ msq(3,j,k)=(msq16_2(-5,k)+msq16_2(-4,k)+msq16_2(-3,k)
+ . +msq16_2(-2,k)+msq16_2(-1,k))*sub16_2(qg)*2d0*tr
+ msq(4,j,k)=(msq26_1(k,-5)+msq26_1(k,-4)+msq26_1(k,-3)
+ . +msq26_1(k,-2)+msq26_1(k,-1))*sub26_1(qg)*2d0*tr
+
+ endif
+
+
+ enddo
+ enddo
+c endif
+
+c if (Qflag) then
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if ((j .gt. 0) .and. (k .gt. 0)) then
+ if (j .ne. k) then
+c--- Q Q - different flavours
+ msq(1,j,k)=msq(1,j,k)+(Vsum(k)-half*Vsq(k,-j))*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+0.5d0*Vsq(j,-k)*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+0.5d0*Vsq(k,-j)*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+(Vsum(j)-half*Vsq(j,-k))*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+c--- Q Q - same flavours
+c--- note: W+2 jet qq piece only includes W radiation off
+c--- the 15 line, hence these are the only contributions
+c--- (we could include 15,25 subtractions if W+2jet had
+c--- radiation off the 26 line also)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+
+ elseif ((j .lt. 0).and.(k .lt. 0)) then
+ if (j .ne. k) then
+c--- QBAR QBAR - different flavours
+ msq(1,j,k)=msq(1,j,k)+(Vsum(k)-half*Vsq(k,-j))*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+0.5d0*Vsq(j,-k)*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+0.5d0*Vsq(k,-j)*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+(Vsum(j)-half*Vsq(j,-k))*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+c--- QBAR QBAR - same flavours
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+
+ elseif ((j .gt. 0).and.(k .lt. 0)) then
+c--- Q QBAR
+ if (j .eq. -k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ endif
+c--QBAR Q
+ elseif ((j .lt. 0).and.(k .gt. 0)) then
+ if (j .eq. -k) then
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+
+ endif
+ endif
+
+
+ enddo
+ enddo
+c endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/i3m.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/i3m.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/i3m.f (revision 1338)
@@ -0,0 +1,125 @@
+ double complex function I3m(s1,s2,s3)
+C This is the function I3m, a massless triangle with all three external
+C lines offshell defined in BDK
+C %\cite{Bern:1997sc}
+C \bibitem{Bern:1997sc}
+C Z.~Bern, L.~J.~Dixon and D.~A.~Kosower,
+C %``One-loop amplitudes for e+ e- to four partons,''
+C Nucl.\ Phys.\ B {\bf 513}, 3 (1998)
+C [arXiv:hep-ph/9708239].
+C %%CITATION = HEP-PH 9708239;%%
+C defined in their equation II.9
+C \int da_1 da_2 da_3 /(-a_1*a_2*s1-a_2*a_3*s2-a_3*a_1*s3)
+ implicit none
+ include 'constants.f'
+ double precision s1,s2,s3,smax,smid,smin,del3,rtdel3
+ double precision i3m1a,flag
+ double complex i3m1b
+
+ smax=max(s1,s2,s3)
+ smin=min(s1,s2,s3)
+ smid=s1+s2+s3-smax-smin
+ del3=s1**2+s2**2+s3**2-two*(s1*s2+s2*s3+s3*s1)
+
+ if (del3 .gt. 0) then
+ rtdel3=sqrt(del3)
+ if (smax .lt. 0) then
+c---case all negative
+ flag=0d0
+ i3m=i3m1b(smax,smid,smin,rtdel3,flag)
+ elseif (smin .gt. 0) then
+c---case all positive
+ flag=0d0
+ i3m=-i3m1b(-smin,-smid,-smax,rtdel3,flag)
+ elseif ((smid .lt. 0) .and. (smin .lt. 0)) then
+c---case two negative and one positive
+ flag=+1d0
+ i3m=i3m1b(smin,smid,smax,rtdel3,flag)
+ elseif ((smax .gt. 0).and.(smid .gt. 0)) then
+c---case two positive and one negative
+ flag=-1d0
+ i3m=-i3m1b(-smax,-smid,-smin,rtdel3,flag)
+ endif
+ elseif (del3 .lt. 0) then
+ rtdel3=sqrt(-del3)
+ if (smax .lt. 0) then
+c---case all negative
+ i3m=+dcmplx(i3m1a(+s1,+s2,+s3,rtdel3))
+ elseif (smin .gt. 0) then
+c---case all positive
+ i3m=-dcmplx(i3m1a(-s1,-s2,-s3,rtdel3))
+ endif
+ endif
+
+ return
+ end
+
+
+ double precision function I3m1a(s1,s2,s3,rtmdel)
+ implicit none
+C symmetric form of Lu and Perez
+C %\cite{Lu:1992ny}
+c \bibitem{Lu:1992ny}
+c H.~J.~Lu and C.~A.~Perez,
+c %``Massless one loop scalar three point integral and associated Clausen,
+c %Glaisher and L functions,''
+c SLAC-PUB-5809
+ include 'constants.f'
+ double precision s1,s2,s3,d1,d2,d3,rtmdel,arg1,arg2,arg3,dclaus
+
+ d1=s1-s2-s3
+ d2=s2-s3-s1
+ d3=s3-s1-s2
+
+ arg1=two*datan(rtmdel/d1)
+ arg2=two*datan(rtmdel/d2)
+ arg3=two*datan(rtmdel/d3)
+ i3m1a=two/rtmdel*(Dclaus(arg1)+Dclaus(arg2)+Dclaus(arg3))
+
+ end
+
+
+ double complex function I3m1b(s1,s2,s3,rtdel,flag)
+ implicit none
+C form of Ussyukina and Davydychev
+C %\cite{Usyukina:1994iw}
+C \bibitem{Usyukina:1994iw}
+C N.~I.~Usyukina and A.~I.~Davydychev,
+C %``New results for two loop off-shell three point diagrams,''
+C Phys.\ Lett.\ B {\bf 332}, 159 (1994)
+C [arXiv:hep-ph/9402223].
+C %%CITATION = HEP-PH 9402223;%%
+
+ include 'constants.f'
+ double precision s1,s2,s3,d3,temp,ddilog,xlog,ylog,rat
+ double precision x,y,rho,rtdel,argx,argy,argdlx,argdly,flag
+ d3=s3-s1-s2
+ x=s1/s3
+ y=s2/s3
+ rat=0.5d0*(d3+rtdel)/s3
+ if (abs(rat) .lt. 1d-3) rat=2d0*s1*s2/(s3*(d3-rtdel))
+ rho=1d0/rat
+ argx=rho*x
+ argy=rho*y
+ argdlx=-argx
+ argdly=-argy
+
+ if ((argdlx .gt. 1d0) .or. (argdly .gt. 1d0)) then
+ write(6,*) 'problems with call of I3m1b'
+ write(6,*) 'argdlx',argdlx
+ write(6,*) 'argdly',argdly
+ stop
+ endif
+
+ xlog=log(abs(argx))
+ ylog=log(abs(argy))
+ temp=xlog*ylog+pisq/3d0+(ylog-xlog)*log((one+argy)/(one+argx))
+ & +two*(ddilog(argdlx)+ddilog(argdly))
+ I3m1b=Dcmplx(temp-abs(flag)*pisq)+impi*Dcmplx(flag*(xlog+ylog))
+ I3m1b=-I3m1b/Dcmplx(rtdel)
+ end
+
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gs.f (revision 1338)
@@ -0,0 +1,249 @@
+ subroutine gg_hwwg_gs(p,msq)
+
+C NEW: Same as gg_hg_gs but with H->ZZ
+
+C 5->7, 6->8 in calls to dips for ip,jp,kp
+
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c g(-p1)+g(-p2) --> H(->p3+p4+p5+p6) + parton(p7) + parton(p8)
+
+
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+c --- remember: nd will count the dipoles
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision
+ & msq15_2(-nf:nf,-nf:nf),msq25_1(-nf:nf,-nf:nf),
+ & msq16_2(-nf:nf,-nf:nf),msq26_1(-nf:nf,-nf:nf),
+ & msq15_6(-nf:nf,-nf:nf),msq26_5(-nf:nf,-nf:nf),
+ & msq16_5(-nf:nf,-nf:nf),msq25_6(-nf:nf,-nf:nf),
+ & msq56_1v(-nf:nf,-nf:nf),msq56_2v(-nf:nf,-nf:nf),
+ & msq26_5v(-nf:nf,-nf:nf),msq26_1v(-nf:nf,-nf:nf),
+ & msq15_6v(-nf:nf,-nf:nf),msq16_2v(-nf:nf,-nf:nf),
+ & msq16_5v(-nf:nf,-nf:nf),msq25_6v(-nf:nf,-nf:nf),
+ & msq15_2v(-nf:nf,-nf:nf),msq25_1v(-nf:nf,-nf:nf),
+ & dummy(-nf:nf,-nf:nf),
+ & sub15_2(4),sub25_1(4),sub16_2(4),sub26_1(4),
+ & sub15_6(4),sub16_5(4),sub25_6(4),sub26_5(4),
+ & sub56_1(4),sub56_2(4),sub56_1v,sub56_2v,
+ & sub26_5v,sub26_1v,sub16_5v,sub16_2v,sub15_2v,sub15_6v,sub25_6v,
+ & sub25_1v
+ external qqb_hzz_g,gg_hzzg_gvec
+ ndmax=6
+
+c--- calculate all the initial-initial dipoles
+ call dips(1,p,1,7,2,sub15_2,sub15_2v,msq15_2,msq15_2v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(2,p,2,7,1,sub25_1,sub25_1v,msq25_1,msq25_1v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(3,p,1,8,2,sub16_2,sub16_2v,msq16_2,msq16_2v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(4,p,2,8,1,sub26_1,sub26_1v,msq26_1,msq26_1v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+
+c--- now the basic initial final ones
+ call dips(5,p,1,7,8,sub15_6,sub15_6v,msq15_6,msq15_6v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+c--- called for final initial the routine only supplies new values for
+c--- sub... and sub...v and msqv
+ call dips(5,p,7,8,1,sub56_1,sub56_1v,dummy,msq56_1v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(5,p,1,8,7,sub16_5,sub16_5v,msq16_5,msq16_5v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+
+ call dips(6,p,2,8,7,sub26_5,sub26_5v,msq26_5,msq26_5v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(6,p,7,8,2,sub56_2,sub56_2v,dummy,msq56_2v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(6,p,2,7,8,sub25_6,sub25_6v,msq25_6,msq25_6v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+ enddo
+ enddo
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+c--- do only q-qb and qb-q cases
+ if ( ((j .gt. 0).and.(k .lt. 0))
+ . .or. ((j .lt. 0).and.(k .gt. 0))) then
+ msq(1,j,k)=-msq15_2(j,k)*sub15_2(qq)/xn
+ msq(2,j,k)=-msq25_1(j,k)*sub25_1(qq)/xn
+ msq(3,j,k)=-msq16_2(j,k)*sub16_2(qq)/xn
+ msq(4,j,k)=-msq26_1(j,k)*sub26_1(qq)/xn
+ msq(5,j,k)=xn*(
+ . +msq15_6(j,k)*(sub15_6(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v
+ . +msq16_5(j,k)*(sub16_5(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=xn*(
+ . (msq26_5(j,k)*(sub26_5(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v)
+ . +(msq25_6(j,k)*(sub25_6(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v))
+
+c--- note statistical factor of one half for two gluons in the final state
+ do nd=1,ndmax
+ msq(nd,j,k)=half*msq(nd,j,k)
+ enddo
+
+ elseif ((k .eq. 0).and. (j .ne. 0)) then
+c--- q-g and qb-g cases
+ msq(1,j,k)=(aveqg/avegg)*(
+ . msq15_2(0,0)*sub15_2(gq)+msq15_2v(0,0)*sub15_2v)
+ msq(2,j,k)=2d0*tr*(msq25_1(j,-5)+msq25_1(j,-4)+msq25_1(j,-3)
+ . +msq25_1(j,-2)+msq25_1(j,-1)+msq25_1(j,+1)
+ . +msq25_1(j,+2)+msq25_1(j,+3)+msq25_1(j,+4)
+ . +msq25_1(j,+5))*sub25_1(qg)
+ msq(3,j,k)=xn*msq16_2(j,k)*sub16_2(qq)
+ msq(4,j,k)=xn*(msq26_1(j,k)*sub26_1(gg)+msq26_1v(j,k)*sub26_1v)
+ msq(5,j,k)=-msq16_5(j,k)*(sub16_5(qq)+sub56_1(qq))/xn
+ msq(6,j,k)=xn*(msq26_5(j,k)*sub26_5(gg)+msq26_5v(j,k)*sub26_5v
+ . +msq26_5(j,k)*sub56_2(qq))
+
+ elseif ((j .eq. 0).and.(k.ne.0)) then
+c--- g-q and g-qb cases
+ msq(1,j,k)=2d0*tr*(msq15_2(-5,k)+msq15_2(-4,k)+msq15_2(-3,k)
+ . +msq15_2(-2,k)+msq15_2(-1,k)+msq15_2(+1,k)
+ . +msq15_2(+2,k)+msq15_2(+3,k)+msq15_2(+4,k)
+ . +msq15_2(+5,k))*sub15_2(qg)
+ msq(2,j,k)=(aveqg/avegg)*(
+ . msq25_1(0,0)*sub25_1(gq)+msq25_1v(0,0)*sub25_1v)
+ msq(3,j,k)=xn*(msq16_2(j,k)*sub16_2(gg)+msq16_2v(j,k)*sub16_2v)
+ msq(4,j,k)=xn*msq26_1(j,k)*sub26_1(qq)
+ msq(5,j,k)=xn*(msq16_5(j,k)*sub16_5(gg)+msq16_5v(j,k)*sub16_5v
+ . +msq16_5(j,k)*sub56_1(qq))
+ msq(6,j,k)=-msq26_5(j,k)*(sub26_5(qq)+sub56_2(qq))/xn
+
+ elseif ((j .eq. 0).and.(k .eq. 0)) then
+c--- g-g case
+c--- first set of subtractions take care of gg->qbq, second set gg->gg;
+c--- note g,g = 1,2 and qb=5, q=6 so (15),(25)-->q and (16),(26)-->qb
+ msq(1,j,k)=(msq15_2(+1,k)+msq15_2(+2,k)+msq15_2(+3,k)
+ . +msq15_2(+4,k)+msq15_2(+5,k))*sub15_2(qg)*2d0*tr
+ msq(2,j,k)=(msq25_1(k,+1)+msq25_1(k,+2)+msq25_1(k,+3)
+ . +msq25_1(k,+4)+msq25_1(k,+5))*sub25_1(qg)*2d0*tr
+ msq(3,j,k)=(msq16_2(-5,k)+msq16_2(-4,k)+msq16_2(-3,k)
+ . +msq16_2(-2,k)+msq16_2(-1,k))*sub16_2(qg)*2d0*tr
+ msq(4,j,k)=(msq26_1(k,-5)+msq26_1(k,-4)+msq26_1(k,-3)
+ . +msq26_1(k,-2)+msq26_1(k,-1))*sub26_1(qg)*2d0*tr
+ msq(5,j,k)=dfloat(nf)*half*(
+ .+msq16_5(j,k)*sub56_1(gq)-msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=dfloat(nf)*half*(
+ .+msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ msq(1,j,k)=msq(1,j,k)+half*xn*(
+ . msq15_2(j,k)*sub15_2(gg)+msq15_2v(j,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*xn*(
+ . msq25_1(j,k)*sub25_1(gg)+msq25_1v(j,k)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*xn*(
+ . msq16_2(j,k)*sub16_2(gg)+msq16_2v(j,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*xn*(
+ . msq26_1(j,k)*sub26_1(gg)+msq26_1v(j,k)*sub26_1v)
+ msq(5,j,k)=msq(5,j,k)+half*xn*(
+ . msq15_6(j,k)*sub15_6(gg)+msq15_6v(j,k)*sub15_6v
+ .+msq16_5(j,k)*sub16_5(gg)+msq16_5v(j,k)*sub16_5v
+ .+msq16_5(j,k)*sub56_1(gg)+msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=msq(6,j,k)+half*xn*(
+ . msq25_6(j,k)*sub25_6(gg)+msq25_6v(j,k)*sub25_6v
+ .+msq26_5(j,k)*sub26_5(gg)+msq26_5v(j,k)*sub26_5v
+ .+msq26_5(j,k)*sub56_2(gg)+msq56_2v(j,k)*sub56_2v)
+ endif
+
+
+ enddo
+ enddo
+c endif
+
+c return
+c--- Start of the 4Q contribution
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if ((j .gt. 0) .and. (k .gt. 0)) then
+c--- Q Q - different flavours
+ if (j .ne. k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+c--- Q Q - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+
+ elseif ((j .lt. 0).and.(k .lt. 0)) then
+ if (j .ne. k) then
+c--- QBAR QBAR - different flavours
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+c--- QBAR QBAR - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+
+ elseif ((j .gt. 0).and.(k .lt. 0)) then
+c--- Q QBAR
+ if (j .eq. -k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+c--- QBAR Q
+ elseif ((j .lt. 0).and.(k .gt. 0)) then
+ if (j .eq. -k) then
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+
+ endif
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hwwg_gvec.f (revision 1338)
@@ -0,0 +1,87 @@
+ subroutine gg_hwwg_gvec(p,n,in,msq)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+C in is the label of the momentum contracted with n
+ integer j,k,in
+ double precision msq(-nf:nf,-nf:nf)
+ double precision n(4),p(mxpart,4),dot,hdecay,sh,fac,
+ . qqghn,ggghn,p1p2(-1:1,-1:1)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+C Deal with Higgs decay to b-bbar
+c s34=2d0*Dot(p,3,4)+2d0*mb**2
+c hdecay=xn*gwsq*mbsq/(4d0*wmass**2)*2d0*(s34-4d0*mb**2)
+c hdecay=hdecay/((s34-hmass**2)**2+(hmass*hwidth)**2)
+
+
+C Higgs virtuality
+
+c sh=s(3,4)+s(3,5)+s(3,6)+s(4,5)+s(4,6)+s(5,6)
+
+ sh=2*(Dot(p,3,4)+Dot(p,3,5)+Dot(p,3,6)
+ & +Dot(p,4,5)+Dot(p,4,6)+Dot(p,5,6))
+
+ hdecay=gwsq**3*wmass**2*(4*Dot(p,3,5)*Dot(p,4,6))
+ hdecay=hdecay/((2*Dot(p,3,4)-wmass**2)**2+(wmass*wwidth)**2)
+ hdecay=hdecay/((2*Dot(p,5,6)-wmass**2)**2+(wmass*wwidth)**2)
+ hdecay=hdecay/((sh-hmass**2)**2+(hmass*hwidth)**2)
+
+
+
+ fac=hdecay
+
+ do j=-1,+1
+ do k=-1,+1
+ p1p2(j,k)=0d0
+ enddo
+ enddo
+
+ if (in .eq. 1) then
+ p1p2(0,-1)=-aveqg*fac*qqghn(2,7,1,p,n)
+ p1p2(0,+1)=-aveqg*fac*qqghn(2,7,1,p,n)
+ p1p2(0,0)=+avegg*fac*ggghn(7,2,1,p,n)
+ elseif (in .eq. 2) then
+ p1p2(+1,0)=-aveqg*fac*qqghn(1,7,2,p,n)
+ p1p2(-1,0)=-aveqg*fac*qqghn(7,1,2,p,n)
+ p1p2(0,0)=+avegg*fac*ggghn(1,7,2,p,n)
+ elseif (in .eq. 7) then
+ p1p2(1,-1)=+aveqq*fac*qqghn(1,2,7,p,n)
+ p1p2(-1,1)=+aveqq*fac*qqghn(2,1,7,p,n)
+ p1p2(0,0)=+avegg*fac*ggghn(1,2,7,p,n)
+ endif
+
+ do j=-nf,nf
+ do k=-nf,nf
+ if ((j .gt. 0) .and. (k .eq. -j)) then
+ msq(j,k)=p1p2(1,-1)
+ elseif ((j .lt. 0) .and. (k .eq. -j)) then
+ msq(j,k)=p1p2(-1,1)
+ elseif ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(j,k)=p1p2(0,0)
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & p1p2(+1,0)
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=
+ & p1p2(-1,0)
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=
+ & p1p2(0,+1)
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=
+ & p1p2(0,-1)
+ endif
+ enddo
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_w2jet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_w2jet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_w2jet.f (revision 1338)
@@ -0,0 +1,514 @@
+ subroutine qqb_w2jet(p,msq)
+ implicit none
+c--- matrix element squared and averaged over initial colours and spins
+c q(-p1) + qbar(-p2) --> W + f(p5) + f(p6)
+c |
+c --> nu(p3) + e^+(p4)
+c where the fermions are either q(p5) and qbar(p6) [Qflag = .true.]
+c or g(p5) and g(p6) [Gflag = .true.]
+c--- all momenta are incoming
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'ckm.f'
+ include 'sprods_com.f'
+ include 'zprods_com.f'
+ include 'flags.f'
+ include 'msq_cs.f'
+ include 'lc.f'
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),
+ . facgg,facqq,prop,Vfac
+ double precision qqbWgg2,qbqWgg2,qgWqg2,qbgWqbg2,
+ . gqbWqbg2,gqWqg2,ggWqbq2
+ double precision qqbWgg2_cs(0:2),qbqWgg2_cs(0:2),qgWqg2_cs(0:2),
+ . qbgWqbg2_cs(0:2),gqbWqbg2_cs(0:2),
+ . gqWqg2_cs(0:2),ggWqbq2_cs(0:2)
+ double precision
+ . qqb_ijkk(0:2),qqb_ijii(0:2),qqb_ijjj(0:2),qqb_ijkj(0:2),
+ . qqb_ijik(0:2),qqb_ijkl(0:2),qqb_iiij(0:2),qqb_iiji(0:2),
+ . qbq_ijkk(0:2),qbq_ijii(0:2),qbq_ijjj(0:2),qbq_ijkj(0:2),
+ . qbq_ijik(0:2),qbq_ijkl(0:2),qbq_iiij(0:2),qbq_iiji(0:2),
+ . qq_iiji(0:2),qq_ijkj(0:2),qq_ijik(0:2),
+ . qq_ijjj(0:2),qq_ijii(0:2),
+ . qbqb_iiji(0:2),qbqb_ijkj(0:2),qbqb_ijik(0:2),
+ . qbqb_ijjj(0:2),qbqb_ijii(0:2)
+ double precision mqq(0:2,fn:nf,fn:nf)
+ double complex qqb1(3),qqb2(3),qqb3(3),qqb4(3),
+ . qq1(4),qq2(4),qq3(4),qq4(4),
+ . qbq1(3),qbq2(3),qbq3(3),qbq4(3),
+ . qbqb1(4),qbqb2(4),qbqb3(4),qbqb4(4)
+ integer rcolourchoice
+ character*4 part
+ common/part/part
+ common/mqq/mqq
+c--- we label the amplitudes by helicity (qqb1 ... qqb4)
+c--- and by type of contribution qqb(1) ... qqb(n)
+ integer i,j,k,n1,n2
+ logical first
+ data first/.true./
+ save first
+
+ if (first) then
+ first=.false.
+ if (Gflag) then
+ write(*,*) 'Using QQGG matrix elements'
+ write(*,*) '[LC is N ]'
+ write(*,*) '[SLC is 1/N]'
+ endif
+ if (Qflag) then
+ write(*,*) 'Using QQBQQB matrix elements'
+ write(*,*) '[LC is 1 ]'
+ write(*,*) '[SLC is 1/N]'
+ endif
+ if (part .eq. 'lord') then
+ if (colourchoice .eq. 1) then
+ write(*,*) 'Leading colour only'
+ elseif (colourchoice .eq. 2) then
+ write(*,*) 'Sub-leading colour only'
+ elseif (colourchoice .eq. 0) then
+ write(*,*) 'Total of both colour structures'
+ else
+ write(*,*) 'Bad colourchoice'
+ stop
+ endif
+ else
+ write(*,*) 'Calculating all colour structures in LO'
+ endif
+ endif
+
+c--- if we're calculating the REAL or VIRT matrix elements, we
+c--- need all the colour structures, but want to preserve
+c--- the actual value of colourchoice
+ if ((part .eq. 'real') .or. (part .eq. 'virt')) then
+ rcolourchoice=colourchoice
+ colourchoice=0
+ endif
+
+c--- initialize matrix elements
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+c--- set up spinors
+ call spinoru(6,p,za,zb)
+ prop=s(3,4)**2/((s(3,4)-wmass**2)**2+wmass**2*wwidth**2)
+ facqq=4d0*V*gsq**2*(gwsq/2d0)**2*aveqq*prop
+ facgg=V*xn/four*(gwsq/2d0)**2*gsq**2*prop
+
+
+c--- calculate 2-quark, 2-gluon amplitudes
+ if (Gflag) then
+ call w2jetsq(1,2,3,4,5,6,za,zb,qqbWgg2)
+ call storecs(qqbWgg2_cs)
+ call w2jetsq(2,1,3,4,5,6,za,zb,qbqWgg2)
+ call storecs(qbqWgg2_cs)
+ call w2jetsq(1,5,3,4,2,6,za,zb,qgWqg2)
+ call storecs(qgWqg2_cs)
+ call w2jetsq(2,5,3,4,1,6,za,zb,gqWqg2)
+ call storecs(gqWqg2_cs)
+ call w2jetsq(5,1,3,4,2,6,za,zb,qbgWqbg2)
+ call storecs(qbgWqbg2_cs)
+ call w2jetsq(5,2,3,4,1,6,za,zb,gqbWqbg2)
+ call storecs(gqbWqbg2_cs)
+ call w2jetsq(5,6,3,4,1,2,za,zb,ggWqbq2)
+ call storecs(ggWqbq2_cs)
+ do i=0,2
+ qqbWgg2_cs(i) = half*aveqq*facgg*qqbWgg2_cs(i)
+ qbqWgg2_cs(i) = half*aveqq*facgg*qbqWgg2_cs(i)
+ gqWqg2_cs(i) = aveqg*facgg*gqWqg2_cs(i)
+ qgWqg2_cs(i) = aveqg*facgg*qgWqg2_cs(i)
+ gqbWqbg2_cs(i)= aveqg*facgg*gqbWqbg2_cs(i)
+ qbgWqbg2_cs(i)= aveqg*facgg*qbgWqbg2_cs(i)
+ ggWqbq2_cs(i) = avegg*facgg*ggWqbq2_cs(i)
+ enddo
+ qqbWgg2 = qqbWgg2_cs(1) +qqbWgg2_cs(2) +qqbWgg2_cs(0)
+ qbqWgg2 = qbqWgg2_cs(1) +qbqWgg2_cs(2) +qbqWgg2_cs(0)
+ gqWqg2 = gqWqg2_cs(1) +gqWqg2_cs(2) +gqWqg2_cs(0)
+ qgWqg2 = qgWqg2_cs(1) +qgWqg2_cs(2) +qgWqg2_cs(0)
+ gqbWqbg2= gqbWqbg2_cs(1)+gqbWqbg2_cs(2)+gqbWqbg2_cs(0)
+ qbgWqbg2= qbgWqbg2_cs(1)+qbgWqbg2_cs(2)+qbgWqbg2_cs(0)
+ ggWqbq2 = ggWqbq2_cs(1) +ggWqbq2_cs(2) +ggWqbq2_cs(0)
+ endif
+
+c--- calculate four-quark amplitudes
+ if (Qflag) then
+c--- basic amplitudes - q qb --> W + g* (--> q qb) (amps 1 and 3)
+c--- and q qb --> g* --> q (--> W q) qb (amps 2 and 4)
+ call amp_q_QbQ_qb(1,2,5,6,qqb1(1),qqb2(1),qqb3(1),qqb4(1))
+c--- crossed - q qb --> q qb ( --> W qb)
+ call amp_q_QbQ_qb(1,5,2,6,qqb1(2),qqb2(2),qqb3(2),qqb4(2))
+c--- crossed - q qb --> q ( --> W q) qb
+ call amp_q_QbQ_qb(6,2,5,1,qqb1(3),qqb2(3),qqb3(3),qqb4(3))
+
+c--- now the qb q amplitudes
+ call amp_q_QbQ_qb(2,1,5,6,qbq1(1),qbq2(1),qbq3(1),qbq4(1))
+c--- crossed - qb q --> qb q ( --> W q)
+ call amp_q_QbQ_qb(2,5,1,6,qbq1(2),qbq2(2),qbq3(2),qbq4(2))
+c--- crossed - qb q --> qb ( --> W qb) q
+ call amp_q_QbQ_qb(6,1,5,2,qbq1(3),qbq2(3),qbq3(3),qbq4(3))
+
+c--- crossed q q --> q ( --> W q) q
+ call amp_q_QbQ_qb(1,5,6,2,qq1(1),qq2(1),qq3(1),qq4(1))
+c--- crossed q q --> q q ( --> W q)
+ call amp_q_QbQ_qb(2,5,6,1,qq1(2),qq2(2),qq3(2),qq4(2))
+c--- crossed q q --> q q ( --> W q)
+ call amp_q_QbQ_qb(2,6,5,1,qq1(3),qq2(3),qq3(3),qq4(3))
+c--- crossed q q --> q ( --> W q) q
+ call amp_q_QbQ_qb(1,6,5,2,qq1(4),qq2(4),qq3(4),qq4(4))
+
+c--- crossed qb qb --> qb ( --> W qb) qb
+ call amp_q_QbQ_qb(5,1,2,6,qbqb1(1),qbqb2(1),qbqb3(1),qbqb4(1))
+c--- crossed qb qb --> qb qb ( --> W qb)
+ call amp_q_QbQ_qb(5,2,1,6,qbqb1(2),qbqb2(2),qbqb3(2),qbqb4(2))
+c--- crossed qb qb --> qb ( --> W qb) qb
+ call amp_q_QbQ_qb(6,2,1,5,qbqb1(3),qbqb2(3),qbqb3(3),qbqb4(3))
+c--- crossed qb qb --> qb qb ( --> W qb)
+ call amp_q_QbQ_qb(6,1,2,5,qbqb1(4),qbqb2(4),qbqb3(4),qbqb4(4))
+
+c--- now square these amplitudes separating into color structures
+c 1) Amplitude
+c 2) Amplitude with (5<-->6)
+c 0) Interference between above
+c
+c--- q(i) qb(j) --> W + g* (--> q(k) qb(k)) with k != i,j
+ qqb_ijkk(1)=abs(qqb1(1))**2+abs(qqb3(1))**2
+ qqb_ijkk(2)=zip
+ qqb_ijkk(0)=zip
+
+ qbq_ijkk(1)=abs(qbq1(1))**2+abs(qbq3(1))**2
+ qbq_ijkk(2)=zip
+ qbq_ijkk(0)=zip
+c--- q(i) qb(j) --> W + g* (--> q(i) qb(i)) i.e. k = i
+ qqb_ijii(1)=abs(qqb1(1))**2+abs(qqb3(1))**2
+ qqb_ijii(2)=abs(qqb2(2))**2+abs(qqb4(2))**2
+ qqb_ijii(0)=+2d0/xn*dble(qqb1(1)*Dconjg(qqb2(2)))
+
+ qbq_ijii(1)=abs(qbq1(1))**2+abs(qbq3(1))**2
+ qbq_ijii(2)=abs(qbq2(2))**2+abs(qbq4(2))**2
+ qbq_ijii(0)=+2d0/xn*dble(qbq1(1)*Dconjg(qbq2(2)))
+c--- q(i) qb(j) --> W + g* (--> q(j) qb(j)) i.e. k = j
+ qqb_ijjj(1)=abs(qqb1(1))**2+abs(qqb3(1))**2
+ qqb_ijjj(2)=abs(qqb2(3))**2+abs(qqb4(3))**2
+ qqb_ijjj(0)=2d0/xn*dble(qqb1(1)*Dconjg(qqb2(3)))
+
+ qbq_ijjj(1)=abs(qbq1(1))**2+abs(qbq3(1))**2
+ qbq_ijjj(2)=abs(qbq2(3))**2+abs(qbq4(3))**2
+ qbq_ijjj(0)=2d0/xn*dble(qbq1(1)*Dconjg(qbq2(3)))
+c--- q (i) qb(j) --> q(i) qb(j) ( --> W qb(k)) with k != i,j
+ qqb_ijik(1)=zip
+ qqb_ijik(2)=abs(qqb2(2))**2+abs(qqb4(2))**2
+ qqb_ijik(0)=zip
+
+ qbq_ijik(2)=abs(qbq2(2))**2+abs(qbq4(2))**2
+ qbq_ijik(1)=zip
+ qbq_ijik(0)=zip
+c--- q (i) qb(j) --> q(i) ( --> W q(k)) qb(j) with k != i,j
+ qqb_ijkj(1)=zip
+ qqb_ijkj(2)=abs(qqb2(3))**2+abs(qqb4(3))**2
+ qqb_ijkj(0)=zip
+
+ qbq_ijkj(2)=abs(qbq2(3))**2+abs(qbq4(3))**2
+ qbq_ijkj(1)=zip
+ qbq_ijkj(0)=zip
+c--- q(i) qb(j) --> g* --> q(l) (--> W q(k)) qb(l)
+ qqb_ijkl(1)=abs(qqb2(1))**2+abs(qqb4(1))**2
+ qqb_ijkl(2)=zip
+ qqb_ijkl(0)=zip
+
+ qbq_ijkl(1)=abs(qbq2(1))**2+abs(qbq4(1))**2
+ qbq_ijkl(2)=zip
+ qbq_ijkl(0)=zip
+c--- q(i) qb(i) --> g* --> q(j) (--> W q(i)) qb(j)
+ qqb_iiij(1)=abs(qqb2(1))**2+abs(qqb4(1))**2
+ qqb_iiij(2)=abs(qqb1(3))**2+abs(qqb3(3))**2
+ qqb_iiij(0)=2d0/xn*dble(qqb2(1)*Dconjg(qqb1(3)))
+
+ qbq_iiij(1)=abs(qbq2(1))**2+abs(qbq4(1))**2
+ qbq_iiij(2)=abs(qbq1(3))**2+abs(qbq3(3))**2
+ qbq_iiij(0)=2d0/xn*dble(qbq2(1)*Dconjg(qbq1(3)))
+c--- q(i) qb(i) --> g* --> q(j) qb(j) (--> W qb(i))
+ qqb_iiji(1)=abs(qqb2(1))**2+abs(qqb4(1))**2
+ qqb_iiji(2)=abs(qqb1(2))**2+abs(qqb3(2))**2
+ qqb_iiji(0)=2d0/xn*dble(qqb2(1)*Dconjg(qqb1(2)))
+
+ qbq_iiji(1)=abs(qbq2(1))**2+abs(qbq4(1))**2
+ qbq_iiji(2)=abs(qbq1(2))**2+abs(qbq3(2))**2
+ qbq_iiji(0)=2d0/xn*dble(qbq2(1)*Dconjg(qbq1(2)))
+
+c--- q(i) q(i) --> q(i) ( --> W q(j) ) q(i)
+ qq_iiji(1)=abs(qq1(1))**2+abs(qq3(1))**2
+ qq_iiji(2)=abs(qq1(2))**2+abs(qq3(2))**2
+ qq_iiji(0)=2d0/xn*dble(qq1(1)*Dconjg(qq1(2)))
+c--- q(i) q(j) --> q(i) ( --> W q(k) ) q(j)
+ qq_ijkj(1)=abs(qq1(1))**2+abs(qq3(1))**2
+ qq_ijkj(2)=zip
+ qq_ijkj(0)=zip
+c--- q(i) q(j) --> q(i) q(j) ( --> W q(k) )
+ qq_ijik(1)=abs(qq1(3))**2+abs(qq3(3))**2
+ qq_ijik(2)=zip
+ qq_ijik(0)=zip
+c--- q(i) q(j) --> q(i) ( --> W q(j) ) q(j)
+ qq_ijjj(1)=abs(qq1(1))**2+abs(qq3(1))**2
+ qq_ijjj(2)=abs(qq1(4))**2+abs(qq3(4))**2
+ qq_ijjj(0)=2d0/xn*dble(qq1(1)*Dconjg(qq1(4)))
+c--- q(i) q(j) --> q(i) q(j) ( --> W q(i) )
+ qq_ijii(1)=abs(qq1(3))**2+abs(qq3(3))**2
+ qq_ijii(2)=abs(qq1(2))**2+abs(qq3(2))**2
+ qq_ijii(0)=2d0/xn*dble(qq1(3)*Dconjg(qq1(2)))
+
+c--- qb(i) qb(i) --> qb(i) ( --> W qb(j) ) qb(i)
+ qbqb_iiji(1)=abs(qbqb1(1))**2+abs(qbqb3(1))**2
+ qbqb_iiji(2)=abs(qbqb1(2))**2+abs(qbqb3(2))**2
+ qbqb_iiji(0)=2d0/xn*dble(qbqb1(1)*Dconjg(qbqb1(2)))
+c--- qb(i) qb(j) --> qb(i) ( --> W qb(k) ) qb(j)
+ qbqb_ijkj(1)=abs(qbqb1(1))**2+abs(qbqb3(1))**2
+ qbqb_ijkj(2)=zip
+ qbqb_ijkj(0)=zip
+c--- qb(i) qb(j) --> qb(i) qb(j) ( --> W qb(k) )
+ qbqb_ijik(1)=abs(qbqb1(3))**2+abs(qbqb3(3))**2
+ qbqb_ijik(2)=zip
+ qbqb_ijik(0)=zip
+c--- qb(i) qb(j) --> qb(i) ( --> W qb(j) ) qb(j)
+ qbqb_ijjj(1)=abs(qbqb1(1))**2+abs(qbqb3(1))**2
+ qbqb_ijjj(2)=abs(qbqb1(4))**2+abs(qbqb3(4))**2
+ qbqb_ijjj(0)=2d0/xn*dble(qbqb1(1)*Dconjg(qbqb1(4)))
+c--- qb(i) qb(j) --> qb(i) qb(j) ( --> W qb(i) )
+ qbqb_ijii(2)=abs(qbqb1(2))**2+abs(qbqb3(2))**2
+ qbqb_ijii(1)=abs(qbqb1(3))**2+abs(qbqb3(3))**2
+ qbqb_ijii(0)=2d0/xn*dble(qbqb1(2)*Dconjg(qbqb1(3)))
+ endif
+
+
+c--- 4-quark contribution to matrix elements
+ if (Qflag) then
+
+ do j=-nf,nf
+ do k=-nf,nf
+ mqq(0,j,k)=0d0
+ mqq(1,j,k)=0d0
+ mqq(2,j,k)=0d0
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ if (j .ne. -k) then
+c--- Q QBAR - different flavours
+ mqq(0,j,k)=facqq*Vsq(j,k)*(qqb_ijii(0)+qqb_ijjj(0))
+ mqq(1,j,k)=facqq*Vsq(j,k)*(
+ . (nf-2)*qqb_ijkk(1)+qqb_ijii(1)+qqb_ijjj(1))
+ mqq(2,j,k)=facqq*Vsq(j,k)*(qqb_ijii(2)+qqb_ijjj(2))
+ . +facqq*(Vsum(j)-Vsq(j,k))*qqb_ijkj(2)
+ . +facqq*(Vsum(k)-Vsq(j,k))*qqb_ijik(2)
+ else
+c--- Q QBAR - same flavours
+ Vfac=0d0
+ do n1=1,nf
+ do n2=-nf,-1
+ if ((n1 .ne. j) .and. (n2 .ne. k)) then
+ Vfac=Vfac+Vsq(n1,n2)
+ endif
+ enddo
+ enddo
+ mqq(0,j,k)=
+ . +facqq*Vsum(k)*qqb_iiij(0)
+ . +facqq*Vsum(j)*qqb_iiji(0)
+ mqq(1,j,k)=
+ . +facqq*Vsum(k)*qqb_iiij(1)
+ . +facqq*Vsum(j)*qqb_iiji(1)
+ . +facqq*Vfac*qqb_ijkl(1)
+ mqq(2,j,k)=
+ . +facqq*Vsum(k)*qqb_iiij(2)
+ . +facqq*Vsum(j)*qqb_iiji(2)
+ endif
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ if (j .ne. -k) then
+c--- QBAR Q - different flavours
+ mqq(0,j,k)=facqq*Vsq(j,k)*(
+ . +qbq_ijii(0)+qbq_ijjj(0))
+ mqq(1,j,k)=facqq*Vsq(j,k)*(
+ . (nf-2)*qbq_ijkk(1)
+ . +qbq_ijii(1)+qbq_ijjj(1))
+ mqq(2,j,k)=facqq*Vsq(j,k)*(qbq_ijii(2)+qbq_ijjj(2))
+ . +facqq*(Vsum(k)-Vsq(j,k))*qbq_ijkj(2)
+ . +facqq*(Vsum(j)-Vsq(j,k))*qbq_ijik(2)
+ else
+c--- QBAR Q - same flavours
+ Vfac=0d0
+ do n1=-nf,-1
+ do n2=1,nf
+ if ((n1 .ne. j) .and. (n2 .ne. k)) then
+ Vfac=Vfac+Vsq(n1,n2)
+ endif
+ enddo
+ enddo
+ mqq(0,j,k)=
+ . +facqq*Vsum(j)*qbq_iiij(0)
+ . +facqq*Vsum(k)*qbq_iiji(0)
+ mqq(1,j,k)=
+ . +facqq*Vsum(j)*qbq_iiij(1)
+ . +facqq*Vsum(k)*qbq_iiji(1)
+ . +facqq*Vfac*qbq_ijkl(1)
+ mqq(2,j,k)=
+ . +facqq*Vsum(j)*qbq_iiij(2)
+ . +facqq*Vsum(k)*qbq_iiji(2)
+ endif
+ elseif ((j .gt. 0) .and. (k .gt. 0)) then
+ if (j .ne. k) then
+c--- Q Q - different flavours
+ mqq(0,j,k)=
+ . +facqq*half*Vsq(j,-k)*qq_ijjj(0)
+ . +facqq*half*Vsq(k,-j)*qq_ijii(0)
+ mqq(1,j,k)=
+ . +facqq*(Vsum(j)-Vsq(j,-k))*qq_ijkj(1)
+ . +facqq*(Vsum(k)-Vsq(k,-j))*qq_ijik(1)
+ . +facqq*half*Vsq(j,-k)*qq_ijjj(1)
+ . +facqq*half*Vsq(k,-j)*qq_ijii(1)
+ mqq(2,j,k)=
+ . +facqq*half*Vsq(j,-k)*qq_ijjj(2)
+ . +facqq*half*Vsq(k,-j)*qq_ijii(2)
+ else
+c--- Q Q - same flavours
+ mqq(0,j,k)=facqq*Vsum(j)*qq_iiji(0)
+ mqq(1,j,k)=facqq*Vsum(j)*qq_iiji(1)
+ mqq(2,j,k)=facqq*Vsum(j)*qq_iiji(2)
+ endif
+ elseif ((j .lt. 0) .and. (k .lt. 0)) then
+ if (j .ne. k) then
+c--- QBAR QBAR - different flavours
+ mqq(0,j,k)=
+ .+facqq*half*Vsq(j,-k)*qbqb_ijjj(0)
+ .+facqq*half*Vsq(k,-j)*qbqb_ijii(0)
+ mqq(1,j,k)=facqq*(Vsum(j)-Vsq(j,-k))*qbqb_ijkj(1)
+ . +facqq*(Vsum(k)-Vsq(k,-j))*qbqb_ijik(1)
+ .+facqq*half*Vsq(j,-k)*qbqb_ijjj(1)
+ .+facqq*half*Vsq(k,-j)*qbqb_ijii(1)
+ mqq(2,j,k)=
+ .+facqq*half*Vsq(j,-k)*qbqb_ijjj(2)
+ .+facqq*half*Vsq(k,-j)*qbqb_ijii(2)
+ else
+c--- QBAR QBAR - same flavours
+ mqq(0,j,k)=facqq*Vsum(j)*qbqb_iiji(0)
+ mqq(1,j,k)=facqq*Vsum(j)*qbqb_iiji(1)
+ mqq(2,j,k)=facqq*Vsum(j)*qbqb_iiji(2)
+ endif
+ endif
+ if (colourchoice .eq. 1) then
+ mqq(0,j,k)=0d0
+ elseif (colourchoice .eq. 2) then
+ mqq(1,j,k)=0d0
+ mqq(2,j,k)=0d0
+ endif
+ msq(j,k)=mqq(0,j,k)+mqq(1,j,k)+mqq(2,j,k)
+ enddo
+ enddo
+
+ endif
+
+c--- 2-quark, 2-gluon contribution to matrix elements
+ if (Gflag) then
+
+ do j=-nf,nf
+ do k=-nf,nf
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=msq(j,k)+Vsq(j,k)*qqbWgg2
+ do i=0,2
+ msq_cs(i,j,k)=Vsq(j,k)*qqbWgg2_cs(i)
+ enddo
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=msq(j,k)+Vsq(j,k)*qbqWgg2
+ do i=0,2
+ msq_cs(i,j,k)=Vsq(j,k)*qbqWgg2_cs(i)
+ enddo
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=msq(j,k)+
+ &(Vsq(j,-1)+Vsq(j,-2)+Vsq(j,-3)+Vsq(j,-4)+Vsq(j,-5))*qgWqg2
+ do i=0,2
+ msq_cs(i,j,k)=
+ &(Vsq(j,-1)+Vsq(j,-2)+Vsq(j,-3)+Vsq(j,-4)+Vsq(j,-5))*qgWqg2_cs(i)
+ enddo
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ msq(j,k)=msq(j,k)+
+ &(Vsq(j,+1)+Vsq(j,+2)+Vsq(j,+3)+Vsq(j,+4)+Vsq(j,+5))*qbgWqbg2
+ do i=0,2
+ msq_cs(i,j,k)=
+ &(Vsq(j,+1)+Vsq(j,+2)+Vsq(j,+3)+Vsq(j,+4)+Vsq(j,+5))*qbgWqbg2_cs(i)
+ enddo
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=msq(j,k)+
+ &(Vsq(-1,k)+Vsq(-2,k)+Vsq(-3,k)+Vsq(-4,k)+Vsq(-5,k))*gqWqg2
+ do i=0,2
+ msq_cs(i,j,k)=
+ &(Vsq(-1,k)+Vsq(-2,k)+Vsq(-3,k)+Vsq(-4,k)+Vsq(-5,k))*gqWqg2_cs(i)
+ enddo
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=msq(j,k)+
+ &(Vsq(+1,k)+Vsq(+2,k)+Vsq(+3,k)+Vsq(+4,k)+Vsq(+5,k))*gqbWqbg2
+ do i=0,2
+ msq_cs(i,j,k)=
+ &(Vsq(+1,k)+Vsq(+2,k)+Vsq(+3,k)+Vsq(+4,k)+Vsq(+5,k))*gqbWqbg2_cs(i)
+ enddo
+ elseif ((j .eq. 0) .and. (k .eq. 0)) then
+ Vfac=0d0
+ do n1=1,nf
+ do n2=-nf,-1
+ Vfac=Vfac+Vsq(n1,n2)
+ enddo
+ enddo
+ msq(j,k)=msq(j,k)+Vfac*ggWqbq2
+ do i=0,2
+ msq_cs(i,j,k)=Vfac*ggWqbq2_cs(i)
+ enddo
+ endif
+
+ enddo
+ enddo
+
+ endif
+
+c--- restore proper colourchoice if necessary
+ if ((part .eq. 'real') .or. (part .eq. 'virt')) then
+ colourchoice=rcolourchoice
+ endif
+
+ return
+ end
+
+ subroutine amp_q_QbQ_qb(i1,i2,i5,i6,amp1,amp2,amp3,amp4)
+ implicit none
+ integer i1,i2,i5,i6
+ double complex aqqb_zbb_new,amp1,amp2,amp3,amp4
+c--- Amplitudes for q(i1) + qb(i2) --> qb(i6) + q(i5) + W (-> 3+4)
+c
+c--- the form of this function is taken from the subroutine msqzbb
+c--- in qqb_zbb.f. See there for comments.
+c--- We return four amplitudes, in pairs corresponding to diagrams
+c--- where the W couples to both quark lines
+
+c--- quark i5 is left-handed
+ amp1=+aqqb_zbb_new(i1,i6,i5,i2,3,4)
+ amp2=-Dconjg(aqqb_zbb_new(i5,i2,i1,i6,4,3))
+
+c--- quark i5 is right-handed
+ amp3=-aqqb_zbb_new(i1,i5,i6,i2,3,4)
+ amp4=-Dconjg(aqqb_zbb_new(i5,i1,i2,i6,4,3))
+
+ return
+ end
+
+ subroutine storecs(mcs)
+c-- this routine transfers the information on the colour structure
+c-- for the W2jet matrix elements into separate arrays for each
+c-- incoming parton case
+ implicit none
+ include 'mmsq_cs.f'
+ integer i
+ double precision mcs(0:2)
+
+ do i=0,2
+ mcs(i)=mmsq_cs(i,+1,+1)
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_z2jet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_z2jet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_z2jet.f (revision 1338)
@@ -0,0 +1,648 @@
+ subroutine qqb_z2jet(p,msq)
+ implicit none
+c---Matrix element squared averaged over initial colors and spins
+c q(-p1)+qbar(-p2) --> Z +g(p5) +g(p6)
+c |
+c --> l(p3)+a(p4)
+c
+c--all momenta incoming
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'zcouple.f'
+ include 'ewcharge.f'
+ include 'sprods_com.f'
+ include 'zprods_com.f'
+ include 'msq_cs.f'
+ include 'flags.f'
+ integer i,j,k,pq,pl,nquark,swap(2),swap1(0:2),nup,ndo,
+ . j1,j2,j3,icol
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),fac,faclo,
+ . qqbZgg2(2,2),qgZqg2(2,2),
+c . qbqZgg2(2,2),qbgZqbg2(2,2),gqbZqbg2(2,2),
+ . gqZqg2(2,2),ggZqbq2(2,2),
+ . qqbZgg2_cs(0:2,2,2),qbqZgg2_cs(0:2,2,2),
+ . qgZqg2_cs(0:2,2,2),gqZqg2_cs(0:2,2,2),
+ . qbgZqbg2_cs(0:2,2,2),gqbZqbg2_cs(0:2,2,2),
+ . ggZqbq2_cs(0:2,2,2),ggtemp(0:2)
+ double precision tup,tdo
+ double complex a111,a112,a121,a211,a122,a212,a221,a222
+ double complex b111,b112,b121,b211,b122,b212,b221,b222
+
+ double complex qRb_a(2,2,2),qRb_b(2,2,2)
+ double complex qqb_a(2,2,2),qqb_b(2,2,2),prop
+
+ double complex qbq_a(2,2,2),qbq_b(2,2,2)
+ double complex qbR_a(2,2,2),qbR_b(2,2,2)
+
+ double complex qq_a(2,2,2),qq_b(2,2,2)
+ double complex qR_a(2,2,2),qR_b(2,2,2)
+
+ double complex qbRb_a(2,2,2),qbRb_b(2,2,2)
+ double complex qbqb_a(2,2,2),qbqb_b(2,2,2)
+
+ double precision mqq(0:2,fn:nf,fn:nf)
+ common/mqq/mqq
+
+ data swap/2,1/
+ save swap
+ data swap1/0,2,1/
+ save swap1
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+
+ call spinoru(6,p,za,zb)
+
+ prop=s(3,4)/dcmplx((s(3,4)-zmass**2),zmass*zwidth)
+
+c--- calculate 2-quark, 2-gluon amplitudes
+ if (Gflag) then
+ call z2jetsq(1,2,3,4,5,6,za,zb,qqbZgg2)
+ call storecsz(qqbZgg2_cs)
+ call z2jetsq(1,5,3,4,2,6,za,zb,qgZqg2)
+ call storecsz(qgZqg2_cs)
+ call z2jetsq(2,5,3,4,1,6,za,zb,gqZqg2)
+ call storecsz(gqZqg2_cs)
+
+ do j=1,2
+ do k=1,2
+c qbqZgg2(j,k)=qqbZgg2(swap(j),k)
+c qbgZqbg2(j,k)=qgZqg2(swap(j),k)
+c gqbZqbg2(j,k)=gqZqg2(swap(j),k)
+ do i=0,2
+ qbqZgg2_cs(i,j,k)=qqbZgg2_cs(swap1(i),swap(j),k)
+ qbgZqbg2_cs(i,j,k)=qgZqg2_cs(swap1(i),swap(j),k)
+ gqbZqbg2_cs(i,j,k)=gqZqg2_cs(swap1(i),swap(j),k)
+ enddo
+ enddo
+ enddo
+
+c call z2jetsq(2,1,3,4,5,6,za,zb,qbqZgg2)
+c call storecsz(qbqZgg2_cs)
+c call z2jetsq(5,1,3,4,2,6,za,zb,qbgZqbg2)
+c call storecsz(qbgZqbg2_cs)
+c call z2jetsq(5,2,3,4,1,6,za,zb,gqbZqbg2)
+c call storecsz(gqbZqbg2_cs)
+
+C --NB this is the matrix element for gg->Z qb(5) q(6)
+ call z2jetsq(5,6,3,4,1,2,za,zb,ggZqbq2)
+ call storecsz(ggZqbq2_cs)
+
+ fac=v*xn/four*(esq*gsq)**2
+ do pq=1,2
+ do pl=1,2
+ do i=0,2
+ qqbZgg2_cs(i,pq,pl) = half*aveqq*fac*qqbZgg2_cs(i,pq,pl)
+ qbqZgg2_cs(i,pq,pl) = half*aveqq*fac*qbqZgg2_cs(i,pq,pl)
+ gqZqg2_cs(i,pq,pl) = aveqg*fac*gqZqg2_cs(i,pq,pl)
+ qgZqg2_cs(i,pq,pl) = aveqg*fac*qgZqg2_cs(i,pq,pl)
+ gqbZqbg2_cs(i,pq,pl)= aveqg*fac*gqbZqbg2_cs(i,pq,pl)
+ qbgZqbg2_cs(i,pq,pl)= aveqg*fac*qbgZqbg2_cs(i,pq,pl)
+ ggZqbq2_cs(i,pq,pl) = avegg*fac*ggZqbq2_cs(i,pq,pl)
+ enddo
+
+ qqbZgg2(pq,pl) = qqbZgg2_cs(1,pq,pl)+qqbZgg2_cs(2,pq,pl)
+ . +qqbZgg2_cs(0,pq,pl)
+ gqZqg2(pq,pl) = gqZqg2_cs(1,pq,pl) +gqZqg2_cs(2,pq,pl)
+ . +gqZqg2_cs(0,pq,pl)
+ qgZqg2(pq,pl) = qgZqg2_cs(1,pq,pl) +qgZqg2_cs(2,pq,pl)
+ . +qgZqg2_cs(0,pq,pl)
+c qbqZgg2(pq,pl) = qbqZgg2_cs(1,pq,pl)+qbqZgg2_cs(2,pq,pl)
+c . +qbqZgg2_cs(0,pq,pl)
+c gqbZqbg2(pq,pl)= gqbZqbg2_cs(1,pq,pl)+gqbZqbg2_cs(2,pq,pl)
+c . +gqbZqbg2_cs(0,pq,pl)
+c qbgZqbg2(pq,pl)= qbgZqbg2_cs(1,pq,pl)+qbgZqbg2_cs(2,pq,pl)
+c . +qbgZqbg2_cs(0,pq,pl)
+ ggZqbq2(pq,pl) = ggZqbq2_cs(1,pq,pl) +ggZqbq2_cs(2,pq,pl)
+ . +ggZqbq2_cs(0,pq,pl)
+ enddo
+ enddo
+ endif
+
+
+ if (Qflag) then
+ call spinoru(6,p,za,zb)
+
+c--- qRb->qRb
+ call ampqqb_qqb(1,5,2,6,qRb_a,qRb_b)
+c--- qR->qR
+c instead of calling ampqqb_qqb(1,5,6,2,qR_a,qR_b)
+ do j1=1,2
+ do j2=1,2
+ do j3=1,2
+ qR_a(j1,j2,j3)=+qRb_a(j1,swap(j2),j3)
+ qR_b(j1,j2,j3)=-qRb_b(j1,swap(j2),j3)
+ enddo
+ enddo
+ enddo
+c--- qbR->qbR
+ call ampqqb_qqb(6,1,5,2,qbR_a,qbR_b)
+
+c--- qbRb->qbRb
+c instead of calling ampqqb_qqb(5,1,2,6,qbRb_a,qbRb_b)
+ do j1=1,2
+ do j2=1,2
+ do j3=1,2
+ qbRb_a(j1,j2,j3)=-qRb_a(swap(j1),j2,j3)
+ qbRb_b(j1,j2,j3)=+qRb_b(swap(j1),j2,j3)
+ enddo
+ enddo
+ enddo
+
+c--- qqb->qqb
+ call ampqqb_qqb(1,2,5,6,qqb_a,qqb_b)
+c--- qbq->qqb
+c instead of calling ampqqb_qqb(2,1,5,6,qbq_a,qbq_b)
+ do j1=1,2
+ do j2=1,2
+ do j3=1,2
+ qbq_a(j1,j2,j3)=-qqb_a(swap(j1),j2,j3)
+ qbq_b(j1,j2,j3)=+qqb_b(swap(j1),j2,j3)
+ enddo
+ enddo
+ enddo
+
+c--- qq->qq
+ call ampqqb_qqb(1,6,5,2,qq_a,qq_b)
+c--- qbqb->qbqb
+c instead of calling ampqqb_qqb(6,1,2,5,qbqb_a,qbqb_b)
+ do j1=1,2
+ do j2=1,2
+ do j3=1,2
+ qbqb_a(j1,j2,j3)=-qq_a(swap(j1),swap(j2),j3)
+ qbqb_b(j1,j2,j3)=-qq_b(swap(j1),swap(j2),j3)
+ enddo
+ enddo
+ enddo
+
+ faclo=4d0*V*gsq**2*esq**2*aveqq
+ endif
+
+
+
+ if (Gflag) then
+ do j=-nf,nf
+ do k=-nf,nf
+ if( j .ne. 0 .and. k .ne. 0 .and. j .ne. -k) goto 19
+
+ if ((j .eq. 0) .and. (k .eq. 0)) then
+
+ do icol=0,2
+ ggtemp(icol)=0d0
+ do nquark=1,nf
+ ggtemp(icol)=ggtemp(icol)
+ . +abs(Q(nquark)*q1+L(nquark)*l1*prop)**2*ggZqbq2_cs(icol,1,1)
+ . +abs(Q(nquark)*q1+R(nquark)*r1*prop)**2*ggZqbq2_cs(icol,2,2)
+ . +abs(Q(nquark)*q1+L(nquark)*r1*prop)**2*ggZqbq2_cs(icol,1,2)
+ . +abs(Q(nquark)*q1+R(nquark)*l1*prop)**2*ggZqbq2_cs(icol,2,1)
+ enddo
+ msq_cs(icol,j,k)=ggtemp(icol)
+ enddo
+ elseif ((j .gt. 0) .and. (k .lt. 0)) then
+ do icol=0,2
+ msq_cs(icol,j,k)=
+ . +abs(Q(j)*q1+L(j)*l1*prop)**2*qqbZgg2_cs(icol,1,1)
+ . +abs(Q(j)*q1+R(j)*r1*prop)**2*qqbZgg2_cs(icol,2,2)
+ . +abs(Q(j)*q1+L(j)*r1*prop)**2*qqbZgg2_cs(icol,1,2)
+ . +abs(Q(j)*q1+R(j)*l1*prop)**2*qqbZgg2_cs(icol,2,1)
+ enddo
+c---Statistical factor already included above
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ do icol=0,2
+ msq_cs(icol,j,k)=
+ . +abs(Q(k)*q1+L(k)*l1*prop)**2*qbqZgg2_cs(icol,1,1)
+ . +abs(Q(k)*q1+R(k)*r1*prop)**2*qbqZgg2_cs(icol,2,2)
+ . +abs(Q(k)*q1+L(k)*r1*prop)**2*qbqZgg2_cs(icol,1,2)
+ . +abs(Q(k)*q1+R(k)*l1*prop)**2*qbqZgg2_cs(icol,2,1)
+ enddo
+ elseif ((j .gt. 0) .and. (k .eq. 0)) then
+ do icol=0,2
+ msq_cs(icol,j,k)=
+ . +abs(Q(j)*q1+L(j)*l1*prop)**2*qgZqg2_cs(icol,1,1)
+ . +abs(Q(j)*q1+R(j)*r1*prop)**2*qgZqg2_cs(icol,2,2)
+ . +abs(Q(j)*q1+L(j)*r1*prop)**2*qgZqg2_cs(icol,1,2)
+ . +abs(Q(j)*q1+R(j)*l1*prop)**2*qgZqg2_cs(icol,2,1)
+ enddo
+ elseif ((j .lt. 0) .and. (k .eq. 0)) then
+ do icol=0,2
+ msq_cs(icol,j,k)=
+ . +abs(Q(-j)*q1+L(-j)*l1*prop)**2*qbgZqbg2_cs(icol,1,1)
+ . +abs(Q(-j)*q1+R(-j)*r1*prop)**2*qbgZqbg2_cs(icol,2,2)
+ . +abs(Q(-j)*q1+L(-j)*r1*prop)**2*qbgZqbg2_cs(icol,1,2)
+ . +abs(Q(-j)*q1+R(-j)*l1*prop)**2*qbgZqbg2_cs(icol,2,1)
+ enddo
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ do icol=0,2
+ msq_cs(icol,j,k)=
+ . +abs(Q(k)*q1+L(k)*l1*prop)**2*gqZqg2_cs(icol,1,1)
+ . +abs(Q(k)*q1+R(k)*r1*prop)**2*gqZqg2_cs(icol,2,2)
+ . +abs(Q(k)*q1+L(k)*r1*prop)**2*gqZqg2_cs(icol,1,2)
+ . +abs(Q(k)*q1+R(k)*l1*prop)**2*gqZqg2_cs(icol,2,1)
+ enddo
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ do icol=0,2
+ msq_cs(icol,j,k)=
+ . +abs(Q(-k)*q1+L(-k)*l1*prop)**2*gqbZqbg2_cs(icol,1,1)
+ . +abs(Q(-k)*q1+R(-k)*r1*prop)**2*gqbZqbg2_cs(icol,2,2)
+ . +abs(Q(-k)*q1+L(-k)*r1*prop)**2*gqbZqbg2_cs(icol,1,2)
+ . +abs(Q(-k)*q1+R(-k)*l1*prop)**2*gqbZqbg2_cs(icol,2,1)
+ enddo
+ endif
+ msq(j,k)=msq_cs(0,j,k)+msq_cs(1,j,k)+msq_cs(2,j,k)
+
+ 19 continue
+ enddo
+ enddo
+ endif
+
+ if (Qflag) then
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ do icol=0,2
+ mqq(icol,j,k)=zip
+ enddo
+
+ if ((j .gt. 0) .and. (k .gt. 0)) then
+c----QQ case
+ if (j .ne. k) then
+ a111=(Q(j)*q1+L(j)*l1*prop)*qR_a(1,1,1)
+ . +(Q(k)*q1+L(k)*l1*prop)*qR_b(1,1,1)
+ a121=(Q(j)*q1+L(j)*l1*prop)*qR_a(1,2,1)
+ . +(Q(k)*q1+R(k)*l1*prop)*qR_b(1,2,1)
+ a112=(Q(j)*q1+L(j)*r1*prop)*qR_a(1,1,2)
+ . +(Q(k)*q1+L(k)*r1*prop)*qR_b(1,1,2)
+ a122=(Q(j)*q1+L(j)*r1*prop)*qR_a(1,2,2)
+ . +(Q(k)*q1+R(k)*r1*prop)*qR_b(1,2,2)
+ a211=(Q(j)*q1+R(j)*l1*prop)*qR_a(2,1,1)
+ . +(Q(k)*q1+L(k)*l1*prop)*qR_b(2,1,1)
+ a221=(Q(j)*q1+R(j)*l1*prop)*qR_a(2,2,1)
+ . +(Q(k)*q1+R(k)*l1*prop)*qR_b(2,2,1)
+ a212=(Q(j)*q1+R(j)*r1*prop)*qR_a(2,1,2)
+ . +(Q(k)*q1+L(k)*r1*prop)*qR_b(2,1,2)
+ a222=(Q(j)*q1+R(j)*r1*prop)*qR_a(2,2,2)
+ . +(Q(k)*q1+R(k)*r1*prop)*qR_b(2,2,2)
+ mqq(0,j,k)=zip
+ mqq(1,j,k)=
+ . +faclo*(abs(a111)**2+abs(a112)**2+abs(a221)**2+abs(a222)**2
+ . +abs(a122)**2+abs(a212)**2+abs(a121)**2+abs(a211)**2)
+ mqq(2,j,k)=zip
+ elseif (j .eq. k) then
+ a111=(Q(j)*q1+L(j)*l1*prop)*(qR_a(1,1,1)+qR_b(1,1,1))
+ b111=(Q(j)*q1+L(j)*l1*prop)*(qq_a(1,1,1)+qq_b(1,1,1))
+ a112=(Q(j)*q1+L(j)*r1*prop)*(qR_a(1,1,2)+qR_b(1,1,2))
+ b112=(Q(j)*q1+L(j)*r1*prop)*(qq_a(1,1,2)+qq_b(1,1,2))
+ a221=(Q(j)*q1+R(j)*l1*prop)*(qR_a(2,2,1)+qR_b(2,2,1))
+ b221=(Q(j)*q1+R(j)*l1*prop)*(qq_a(2,2,1)+qq_b(2,2,1))
+ a222=(Q(j)*q1+R(j)*r1*prop)*(qR_a(2,2,2)+qR_b(2,2,2))
+ b222=(Q(j)*q1+R(j)*r1*prop)*(qq_a(2,2,2)+qq_b(2,2,2))
+
+ a121=(Q(j)*q1+L(j)*l1*prop)*qR_a(1,2,1)
+ . +(Q(k)*q1+R(k)*l1*prop)*qR_b(1,2,1)
+ b121=(Q(j)*q1+L(j)*l1*prop)*qq_a(1,2,1)
+ . +(Q(k)*q1+R(k)*l1*prop)*qq_b(1,2,1)
+ a122=(Q(j)*q1+L(j)*r1*prop)*qR_a(1,2,2)
+ . +(Q(k)*q1+R(k)*r1*prop)*qR_b(1,2,2)
+ b122=(Q(j)*q1+L(j)*r1*prop)*qq_a(1,2,2)
+ . +(Q(k)*q1+R(k)*r1*prop)*qq_b(1,2,2)
+ a211=(Q(j)*q1+R(j)*l1*prop)*qR_a(2,1,1)
+ . +(Q(k)*q1+L(k)*l1*prop)*qR_b(2,1,1)
+ b211=(Q(j)*q1+R(j)*l1*prop)*qq_a(2,1,1)
+ . +(Q(k)*q1+L(k)*l1*prop)*qq_b(2,1,1)
+ a212=(Q(j)*q1+R(j)*r1*prop)*qR_a(2,1,2)
+ . +(Q(k)*q1+L(k)*r1*prop)*qR_b(2,1,2)
+ b212=(Q(j)*q1+R(j)*r1*prop)*qq_a(2,1,2)
+ . +(Q(k)*q1+L(k)*r1*prop)*qq_b(2,1,2)
+
+ mqq(0,j,k)=half*faclo*(
+ . +Dble(a111*Dconjg(b111))+Dble(a112*Dconjg(b112))
+ . +Dble(a221*Dconjg(b221))+Dble(a222*Dconjg(b222)))*two/xn
+ mqq(1,j,k)=half*faclo*
+ . (abs(a111)**2+abs(a112)**2+abs(a221)**2+abs(a222)**2
+ . +abs(a122)**2+abs(a212)**2+abs(a121)**2+abs(a211)**2)
+ mqq(2,j,k)=half*faclo*(
+ . +abs(b111)**2+abs(b112)**2+abs(b221)**2+abs(b222)**2
+ . +abs(b122)**2+abs(b212)**2+abs(b121)**2+abs(b211)**2)
+ endif
+ elseif ((j .lt. 0) .and. (k .lt. 0)) then
+c----QbQb case
+ if (j .ne. k) then
+ a111=(Q(-j)*q1+L(-j)*l1*prop)*qbRb_a(1,1,1)
+ . +(Q(-k)*q1+L(-k)*l1*prop)*qbRb_b(1,1,1)
+ a121=(Q(-j)*q1+L(-j)*l1*prop)*qbRb_a(1,2,1)
+ . +(Q(-k)*q1+R(-k)*l1*prop)*qbRb_b(1,2,1)
+
+ a112=(Q(-j)*q1+L(-j)*r1*prop)*qbRb_a(1,1,2)
+ . +(Q(-k)*q1+L(-k)*r1*prop)*qbRb_b(1,1,2)
+ a122=(Q(-j)*q1+L(-j)*r1*prop)*qbRb_a(1,2,2)
+ . +(Q(-k)*q1+R(-k)*r1*prop)*qbRb_b(1,2,2)
+
+ a211=(Q(-j)*q1+R(-j)*l1*prop)*qbRb_a(2,1,1)
+ . +(Q(-k)*q1+L(-k)*l1*prop)*qbRb_b(2,1,1)
+ a221=(Q(-j)*q1+R(-j)*l1*prop)*qbRb_a(2,2,1)
+ . +(Q(-k)*q1+R(-k)*l1*prop)*qbRb_b(2,2,1)
+
+ a212=(Q(-j)*q1+R(-j)*r1*prop)*qbRb_a(2,1,2)
+ . +(Q(-k)*q1+L(-k)*r1*prop)*qbRb_b(2,1,2)
+ a222=(Q(-j)*q1+R(-j)*r1*prop)*qbRb_a(2,2,2)
+ . +(Q(-k)*q1+R(-k)*r1*prop)*qbRb_b(2,2,2)
+ mqq(0,j,k)=zip
+ mqq(1,j,k)=
+ . +faclo*(abs(a111)**2+abs(a112)**2+abs(a221)**2+abs(a222)**2
+ . +abs(a122)**2+abs(a212)**2+abs(a121)**2+abs(a211)**2)
+ mqq(2,j,k)=zip
+ elseif (j .eq. k) then
+
+ a111=(Q(-j)*q1+L(-j)*l1*prop)*(qbRb_a(1,1,1)+qbRb_b(1,1,1))
+ b111=(Q(-j)*q1+L(-j)*l1*prop)*(qbqb_a(1,1,1)+qbqb_b(1,1,1))
+ a112=(Q(-j)*q1+L(-j)*r1*prop)*(qbRb_a(1,1,2)+qbRb_b(1,1,2))
+ b112=(Q(-j)*q1+L(-j)*r1*prop)*(qbqb_a(1,1,2)+qbqb_b(1,1,2))
+ a221=(Q(-j)*q1+R(-j)*l1*prop)*(qbRb_a(2,2,1)+qbRb_b(2,2,1))
+ b221=(Q(-j)*q1+R(-j)*l1*prop)*(qbqb_a(2,2,1)+qbqb_b(2,2,1))
+ a222=(Q(-j)*q1+R(-j)*r1*prop)*(qbRb_a(2,2,2)+qbRb_b(2,2,2))
+ b222=(Q(-j)*q1+R(-j)*r1*prop)*(qbqb_a(2,2,2)+qbqb_b(2,2,2))
+
+
+ a121=(Q(-j)*q1+L(-j)*l1*prop)*qbRb_a(1,2,1)
+ . +(Q(-k)*q1+R(-k)*l1*prop)*qbRb_b(1,2,1)
+ a122=(Q(-j)*q1+L(-j)*r1*prop)*qbRb_a(1,2,2)
+ . +(Q(-k)*q1+R(-k)*r1*prop)*qbRb_b(1,2,2)
+ a211=(Q(-j)*q1+R(-j)*l1*prop)*qbRb_a(2,1,1)
+ . +(Q(-k)*q1+L(-k)*l1*prop)*qbRb_b(2,1,1)
+ a212=(Q(-j)*q1+R(-j)*r1*prop)*qbRb_a(2,1,2)
+ . +(Q(-k)*q1+L(-k)*r1*prop)*qbRb_b(2,1,2)
+
+ b121=(Q(-j)*q1+L(-j)*l1*prop)*qbqb_a(1,2,1)
+ . +(Q(-k)*q1+R(-k)*l1*prop)*qbqb_b(1,2,1)
+ b122=(Q(-j)*q1+L(-j)*r1*prop)*qbqb_a(1,2,2)
+ . +(Q(-k)*q1+R(-k)*r1*prop)*qbqb_b(1,2,2)
+ b211=(Q(-j)*q1+R(-j)*l1*prop)*qbqb_a(2,1,1)
+ . +(Q(-k)*q1+L(-k)*l1*prop)*qbqb_b(2,1,1)
+ b212=(Q(-j)*q1+R(-j)*r1*prop)*qbqb_a(2,1,2)
+ . +(Q(-k)*q1+L(-k)*r1*prop)*qbqb_b(2,1,2)
+
+
+ mqq(0,j,k)=half*faclo*(
+ . +Dble(a111*Dconjg(b111))+Dble(a112*Dconjg(b112))
+ . +Dble(a221*Dconjg(b221))+Dble(a222*Dconjg(b222)))*two/xn
+ mqq(1,j,k)=half*faclo*
+ . (abs(a111)**2+abs(a112)**2+abs(a221)**2+abs(a222)**2
+ . +abs(a122)**2+abs(a212)**2+abs(a121)**2+abs(a211)**2)
+ mqq(2,j,k)=half*faclo*(
+ . +abs(b111)**2+abs(b112)**2+abs(b221)**2+abs(b222)**2
+ . +abs(b122)**2+abs(b212)**2+abs(b121)**2+abs(b211)**2)
+ endif
+C---q-qb case
+ elseif ((j .gt. 0) .and. (k .lt. 0)) then
+ if (j .ne. -k) then
+ a111=(Q(+j)*q1+L(+j)*l1*prop)*qRb_a(1,1,1)
+ . +(Q(-k)*q1+L(-k)*l1*prop)*qRb_b(1,1,1)
+ a112=(Q(+j)*q1+L(+j)*r1*prop)*qRb_a(1,1,2)
+ . +(Q(-k)*q1+L(-k)*r1*prop)*qRb_b(1,1,2)
+ a221=(Q(+j)*q1+R(+j)*l1*prop)*qRb_a(2,2,1)
+ . +(Q(-k)*q1+R(-k)*l1*prop)*qRb_b(2,2,1)
+ a222=(Q(+j)*q1+R(+j)*r1*prop)*qRb_a(2,2,2)
+ . +(Q(-k)*q1+R(-k)*r1*prop)*qRb_b(2,2,2)
+
+ a121=(Q(+j)*q1+L(+j)*l1*prop)*qRb_a(1,2,1)
+ . +(Q(-k)*q1+R(-k)*l1*prop)*qRb_b(1,2,1)
+ a122=(Q(+j)*q1+L(+j)*r1*prop)*qRb_a(1,2,2)
+ . +(Q(-k)*q1+R(-k)*r1*prop)*qRb_b(1,2,2)
+ a211=(Q(+j)*q1+R(+j)*l1*prop)*qRb_a(2,1,1)
+ . +(Q(-k)*q1+L(-k)*l1*prop)*qRb_b(2,1,1)
+ a212=(Q(+j)*q1+R(+j)*r1*prop)*qRb_a(2,1,2)
+ . +(Q(-k)*q1+L(-k)*r1*prop)*qRb_b(2,1,2)
+ mqq(0,j,k)=zip
+ mqq(1,j,k)=zip
+ mqq(2,j,k)=
+ . +faclo*(abs(a111)**2+abs(a112)**2+abs(a221)**2+abs(a222)**2
+ . +abs(a122)**2+abs(a212)**2+abs(a121)**2+abs(a211)**2)
+
+ elseif (j .eq. -k) then
+c--case where final state from annihilation diagrams is the same quark
+ a111=(Q(j)*q1+L(j)*l1*prop)*(qRb_a(1,1,1)+qRb_b(1,1,1))
+ b111=(Q(j)*q1+L(j)*l1*prop)*(qqb_a(1,1,1)+qqb_b(1,1,1))
+
+ a112=(Q(j)*q1+L(j)*r1*prop)*(qRb_a(1,1,2)+qRb_b(1,1,2))
+ b112=(Q(j)*q1+L(j)*r1*prop)*(qqb_a(1,1,2)+qqb_b(1,1,2))
+
+ a221=(Q(j)*q1+R(j)*l1*prop)*(qRb_a(2,2,1)+qRb_b(2,2,1))
+ b221=(Q(j)*q1+R(j)*l1*prop)*(qqb_a(2,2,1)+qqb_b(2,2,1))
+
+ a222=(Q(j)*q1+R(j)*r1*prop)*(qRb_a(2,2,2)+qRb_b(2,2,2))
+ b222=(Q(j)*q1+R(j)*r1*prop)*(qqb_a(2,2,2)+qqb_b(2,2,2))
+
+ a121=(Q(+j)*q1+L(+j)*l1*prop)*qRb_a(1,2,1)
+ . +(Q(-k)*q1+R(-k)*l1*prop)*qRb_b(1,2,1)
+ a122=(Q(+j)*q1+L(+j)*r1*prop)*qRb_a(1,2,2)
+ . +(Q(-k)*q1+R(-k)*r1*prop)*qRb_b(1,2,2)
+ a211=(Q(+j)*q1+R(+j)*l1*prop)*qRb_a(2,1,1)
+ . +(Q(-k)*q1+L(-k)*l1*prop)*qRb_b(2,1,1)
+ a212=(Q(+j)*q1+R(+j)*r1*prop)*qRb_a(2,1,2)
+ . +(Q(-k)*q1+L(-k)*r1*prop)*qRb_b(2,1,2)
+
+ b121=(Q(+j)*q1+L(+j)*l1*prop)*qqb_a(1,2,1)
+ . +(Q(-k)*q1+R(-k)*l1*prop)*qqb_b(1,2,1)
+ b122=(Q(+j)*q1+L(+j)*r1*prop)*qqb_a(1,2,2)
+ . +(Q(-k)*q1+R(-k)*r1*prop)*qqb_b(1,2,2)
+ b211=(Q(+j)*q1+R(+j)*l1*prop)*qqb_a(2,1,1)
+ . +(Q(-k)*q1+L(-k)*l1*prop)*qqb_b(2,1,1)
+ b212=(Q(+j)*q1+R(+j)*r1*prop)*qqb_a(2,1,2)
+ . +(Q(-k)*q1+L(-k)*r1*prop)*qqb_b(2,1,2)
+
+ mqq(0,j,k)=faclo*(
+ . +Dble(a111*Dconjg(b111))+Dble(a112*Dconjg(b112))
+ . +Dble(a221*Dconjg(b221))+Dble(a222*Dconjg(b222)))*two/xn
+ mqq(1,j,k)=faclo*(
+ . +abs(b111)**2+abs(b112)**2+abs(b221)**2+abs(b222)**2
+ . +abs(b122)**2+abs(b212)**2+abs(b121)**2+abs(b211)**2)
+ mqq(2,j,k)=faclo*
+ . (abs(a111)**2+abs(a112)**2+abs(a221)**2+abs(a222)**2
+ . +abs(a122)**2+abs(a212)**2+abs(a121)**2+abs(a211)**2)
+
+ if ((j.eq.1).or.(j.eq.3).or.(j.eq.5)) then
+ nup=2
+ ndo=nf-3
+ else
+ nup=1
+ ndo=nf-2
+ endif
+ if (nf.le. 4) ndo=ndo-1
+ if (nf.le. 3) nup=nup-1
+ b111=(Q(+j)*q1+L(+j)*l1*prop)*qqb_a(1,1,1)
+ . +(Q(+1)*q1+L(+1)*l1*prop)*qqb_b(1,1,1)
+ b112=(Q(+j)*q1+L(+j)*r1*prop)*qqb_a(1,1,2)
+ . +(Q(+1)*q1+L(+1)*r1*prop)*qqb_b(1,1,2)
+ b221=(Q(+j)*q1+R(+j)*l1*prop)*qqb_a(2,2,1)
+ . +(Q(+1)*q1+R(+1)*l1*prop)*qqb_b(2,2,1)
+ b222=(Q(+j)*q1+R(+j)*r1*prop)*qqb_a(2,2,2)
+ . +(Q(+1)*q1+R(+1)*r1*prop)*qqb_b(2,2,2)
+ b121=(Q(+j)*q1+L(+j)*l1*prop)*qqb_a(1,2,1)
+ . +(Q(+1)*q1+R(+1)*l1*prop)*qqb_b(1,2,1)
+ b122=(Q(+j)*q1+L(+j)*r1*prop)*qqb_a(1,2,2)
+ . +(Q(+1)*q1+R(+1)*r1*prop)*qqb_b(1,2,2)
+ b211=(Q(+j)*q1+R(+j)*l1*prop)*qqb_a(2,1,1)
+ . +(Q(+1)*q1+L(+1)*l1*prop)*qqb_b(2,1,1)
+ b212=(Q(+j)*q1+R(+j)*r1*prop)*qqb_a(2,1,2)
+ . +(Q(+1)*q1+L(+1)*r1*prop)*qqb_b(2,1,2)
+
+ tdo=faclo*(abs(b111)**2+abs(b112)**2+abs(b221)**2+abs(b222)**2
+ . +abs(b122)**2+abs(b212)**2+abs(b121)**2+abs(b211)**2)
+
+ b111=(Q(+j)*q1+L(+j)*l1*prop)*qqb_a(1,1,1)
+ . +(Q(+2)*q1+L(+2)*l1*prop)*qqb_b(1,1,1)
+ b112=(Q(+j)*q1+L(+j)*r1*prop)*qqb_a(1,1,2)
+ . +(Q(+2)*q1+L(+2)*r1*prop)*qqb_b(1,1,2)
+ b221=(Q(+j)*q1+R(+j)*l1*prop)*qqb_a(2,2,1)
+ . +(Q(+2)*q1+R(+2)*l1*prop)*qqb_b(2,2,1)
+ b222=(Q(+j)*q1+R(+j)*r1*prop)*qqb_a(2,2,2)
+ . +(Q(+2)*q1+R(+2)*r1*prop)*qqb_b(2,2,2)
+ b121=(Q(+j)*q1+L(+j)*l1*prop)*qqb_a(1,2,1)
+ . +(Q(+2)*q1+R(+2)*l1*prop)*qqb_b(1,2,1)
+ b122=(Q(+j)*q1+L(+j)*r1*prop)*qqb_a(1,2,2)
+ . +(Q(+2)*q1+R(+2)*r1*prop)*qqb_b(1,2,2)
+ b211=(Q(+j)*q1+R(+j)*l1*prop)*qqb_a(2,1,1)
+ . +(Q(+2)*q1+L(+2)*l1*prop)*qqb_b(2,1,1)
+ b212=(Q(+j)*q1+R(+j)*r1*prop)*qqb_a(2,1,2)
+ . +(Q(+2)*q1+L(+2)*r1*prop)*qqb_b(2,1,2)
+
+ tup=faclo*(abs(b111)**2+abs(b112)**2+abs(b221)**2+abs(b222)**2
+ . +abs(b122)**2+abs(b212)**2+abs(b121)**2+abs(b211)**2)
+
+ mqq(1,j,k)=mqq(1,j,k)+dfloat(nup)*tup+dfloat(ndo)*tdo
+ endif
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+C---Qb-q case
+ if (j .ne. -k) then
+ a111=(Q(-j)*q1+L(-j)*l1*prop)*qbR_a(1,1,1)
+ . +(Q(+k)*q1+L(+k)*l1*prop)*qbR_b(1,1,1)
+ a121=(Q(-j)*q1+L(-j)*l1*prop)*qbR_a(1,2,1)
+ . +(Q(+k)*q1+R(+k)*l1*prop)*qbR_b(1,2,1)
+ a112=(Q(-j)*q1+L(-j)*r1*prop)*qbR_a(1,1,2)
+ . +(Q(+k)*q1+L(+k)*r1*prop)*qbR_b(1,1,2)
+ a122=(Q(-j)*q1+L(-j)*r1*prop)*qbR_a(1,2,2)
+ . +(Q(+k)*q1+R(+k)*r1*prop)*qbR_b(1,2,2)
+ a211=(Q(-j)*q1+R(-j)*l1*prop)*qbR_a(2,1,1)
+ . +(Q(+k)*q1+L(+k)*l1*prop)*qbR_b(2,1,1)
+ a221=(Q(-j)*q1+R(-j)*l1*prop)*qbR_a(2,2,1)
+ . +(Q(+k)*q1+R(+k)*l1*prop)*qbR_b(2,2,1)
+ a212=(Q(-j)*q1+R(-j)*r1*prop)*qbR_a(2,1,2)
+ . +(Q(+k)*q1+L(+k)*r1*prop)*qbR_b(2,1,2)
+ a222=(Q(-j)*q1+R(-j)*r1*prop)*qbR_a(2,2,2)
+ . +(Q(+k)*q1+R(+k)*r1*prop)*qbR_b(2,2,2)
+
+ mqq(0,j,k)=zip
+ mqq(1,j,k)=zip
+ mqq(2,j,k)=
+ . +faclo*(abs(a111)**2+abs(a112)**2+abs(a221)**2+abs(a222)**2
+ . +abs(a122)**2+abs(a212)**2+abs(a121)**2+abs(a211)**2)
+ elseif (j .eq. -k) then
+
+ a111=(Q(-j)*q1+L(-j)*l1*prop)*(qbR_a(1,1,1)+qbR_b(1,1,1))
+ b111=(Q(-j)*q1+L(-j)*l1*prop)*(qbq_a(1,1,1)+qbq_b(1,1,1))
+ a112=(Q(-j)*q1+L(-j)*r1*prop)*(qbR_a(1,1,2)+qbR_b(1,1,2))
+ b112=(Q(-j)*q1+L(-j)*r1*prop)*(qbq_a(1,1,2)+qbq_b(1,1,2))
+ a221=(Q(-j)*q1+R(-j)*l1*prop)*(qbR_a(2,2,1)+qbR_b(2,2,1))
+ b221=(Q(-j)*q1+R(-j)*l1*prop)*(qbq_a(2,2,1)+qbq_b(2,2,1))
+ a222=(Q(-j)*q1+R(-j)*r1*prop)*(qbR_a(2,2,2)+qbR_b(2,2,2))
+ b222=(Q(-j)*q1+R(-j)*r1*prop)*(qbq_a(2,2,2)+qbq_b(2,2,2))
+
+ a121=(Q(-j)*q1+L(-j)*l1*prop)*qbR_a(1,2,1)
+ . +(Q(+k)*q1+R(+k)*l1*prop)*qbR_b(1,2,1)
+ a122=(Q(-j)*q1+L(-j)*r1*prop)*qbR_a(1,2,2)
+ . +(Q(+k)*q1+R(+k)*r1*prop)*qbR_b(1,2,2)
+ a211=(Q(-j)*q1+R(-j)*l1*prop)*qbR_a(2,1,1)
+ . +(Q(+k)*q1+L(+k)*l1*prop)*qbR_b(2,1,1)
+ a212=(Q(-j)*q1+R(-j)*r1*prop)*qbR_a(2,1,2)
+ . +(Q(+k)*q1+L(+k)*r1*prop)*qbR_b(2,1,2)
+
+ b121=(Q(-j)*q1+L(-j)*l1*prop)*qbq_a(1,2,1)
+ . +(Q(+k)*q1+R(+k)*l1*prop)*qbq_b(1,2,1)
+ b122=(Q(-j)*q1+L(-j)*r1*prop)*qbq_a(1,2,2)
+ . +(Q(+k)*q1+R(+k)*r1*prop)*qbq_b(1,2,2)
+ b211=(Q(-j)*q1+R(-j)*l1*prop)*qbq_a(2,1,1)
+ . +(Q(+k)*q1+L(+k)*l1*prop)*qbq_b(2,1,1)
+ b212=(Q(-j)*q1+R(-j)*r1*prop)*qbq_a(2,1,2)
+ . +(Q(+k)*q1+L(+k)*r1*prop)*qbq_b(2,1,2)
+
+ mqq(0,j,k)=faclo*(
+ . +Dble(a111*Dconjg(b111))+Dble(a112*Dconjg(b112))
+ . +Dble(a221*Dconjg(b221))+Dble(a222*Dconjg(b222)))*two/xn
+ mqq(2,j,k)=faclo*
+ . (abs(a111)**2+abs(a112)**2+abs(a221)**2+abs(a222)**2
+ . +abs(a122)**2+abs(a212)**2+abs(a121)**2+abs(a211)**2)
+ mqq(1,j,k)=faclo*(
+ . +abs(b111)**2+abs(b112)**2+abs(b221)**2+abs(b222)**2
+ . +abs(b122)**2+abs(b212)**2+abs(b121)**2+abs(b211)**2)
+
+c--Here we must also add the contribution of other final state quarks
+c unequal to initial annihilating quarks
+ if ((k.eq.1).or.(k.eq.3).or.(k.eq.5)) then
+ nup=2
+ ndo=nf-3
+ else
+ nup=1
+ ndo=nf-2
+ endif
+ if (nf.le. 4) ndo=ndo-1
+ if (nf.le. 3) nup=nup-1
+ b111=(Q(-j)*q1+L(-j)*l1*prop)*qbq_a(1,1,1)
+ . +(Q(+3)*q1+L(+3)*l1*prop)*qbq_b(1,1,1)
+ b112=(Q(-j)*q1+L(-j)*r1*prop)*qbq_a(1,1,2)
+ . +(Q(+3)*q1+L(+3)*r1*prop)*qbq_b(1,1,2)
+ b221=(Q(-j)*q1+R(-j)*l1*prop)*qbq_a(2,2,1)
+ . +(Q(+3)*q1+R(+3)*l1*prop)*qbq_b(2,2,1)
+ b222=(Q(-j)*q1+R(-j)*r1*prop)*qbq_a(2,2,2)
+ . +(Q(+3)*q1+R(+3)*r1*prop)*qbq_b(2,2,2)
+ b121=(Q(-j)*q1+L(-j)*l1*prop)*qbq_a(1,2,1)
+ . +(Q(+3)*q1+R(+3)*l1*prop)*qbq_b(1,2,1)
+ b122=(Q(-j)*q1+L(-j)*r1*prop)*qbq_a(1,2,2)
+ . +(Q(+3)*q1+R(+3)*r1*prop)*qbq_b(1,2,2)
+ b211=(Q(-j)*q1+R(-j)*l1*prop)*qbq_a(2,1,1)
+ . +(Q(+3)*q1+L(+3)*l1*prop)*qbq_b(2,1,1)
+ b212=(Q(-j)*q1+R(-j)*r1*prop)*qbq_a(2,1,2)
+ . +(Q(+3)*q1+L(+3)*r1*prop)*qbq_b(2,1,2)
+ tdo=faclo*(abs(b111)**2+abs(b112)**2+abs(b221)**2+abs(b222)**2
+ . +abs(b122)**2+abs(b212)**2+abs(b121)**2+abs(b211)**2)
+
+ b111=(Q(-j)*q1+L(-j)*l1*prop)*qbq_a(1,1,1)
+ . +(Q(+2)*q1+L(+2)*l1*prop)*qbq_b(1,1,1)
+ b112=(Q(-j)*q1+L(-j)*r1*prop)*qbq_a(1,1,2)
+ . +(Q(+2)*q1+L(+2)*r1*prop)*qbq_b(1,1,2)
+ b221=(Q(-j)*q1+R(-j)*l1*prop)*qbq_a(2,2,1)
+ . +(Q(+2)*q1+R(+2)*l1*prop)*qbq_b(2,2,1)
+ b222=(Q(-j)*q1+R(-j)*r1*prop)*qbq_a(2,2,2)
+ . +(Q(+2)*q1+R(+2)*r1*prop)*qbq_b(2,2,2)
+ b121=(Q(-j)*q1+L(-j)*l1*prop)*qbq_a(1,2,1)
+ . +(Q(+2)*q1+R(+2)*l1*prop)*qbq_b(1,2,1)
+ b122=(Q(-j)*q1+L(-j)*r1*prop)*qbq_a(1,2,2)
+ . +(Q(+2)*q1+R(+2)*r1*prop)*qbq_b(1,2,2)
+ b211=(Q(-j)*q1+R(-j)*l1*prop)*qbq_a(2,1,1)
+ . +(Q(+2)*q1+L(+2)*l1*prop)*qbq_b(2,1,1)
+ b212=(Q(-j)*q1+R(-j)*r1*prop)*qbq_a(2,1,2)
+ . +(Q(+2)*q1+L(+2)*r1*prop)*qbq_b(2,1,2)
+ tup=faclo*(abs(b111)**2+abs(b112)**2+abs(b221)**2+abs(b222)**2
+ . +abs(b122)**2+abs(b212)**2+abs(b121)**2+abs(b211)**2)
+
+ mqq(1,j,k)=mqq(1,j,k)+dfloat(nup)*tup+dfloat(ndo)*tdo
+
+ endif
+ endif
+ msq(j,k)=msq(j,k)+mqq(0,j,k)+mqq(1,j,k)+mqq(2,j,k)
+ enddo
+ enddo
+ endif
+ return
+ end
+
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/hjetfill.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/hjetfill.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/hjetfill.f (revision 1338)
@@ -0,0 +1,110 @@
+ subroutine hjetfill(s,t,u,virtgg,virtqa,virtaq,virtqg,virtgq)
+ implicit none
+ include 'constants.f'
+ include 'epinv.f'
+ include 'scale.f'
+ include 'b0.f'
+ double precision virtgg,virtqa,virtaq,virtqg,virtgq,
+ . logg,loqa,loaq,loqg,logq,ddilog,Li2s,Li2t,Li2u,
+ . lnm,lns,lnt,lnu,ln2t,ln2u,mhsq,s,t,u,xlf,subuv,Delta
+
+ mhsq=s+t+u
+
+ xlf=dfloat(nf)
+ Li2t=ddilog(t/mhsq)
+ Li2u=ddilog(u/mhsq)
+ Li2s=ddilog((s-mhsq)/s)
+ lns=dlog(s/mhsq)
+ lnt=dlog(-t/mhsq)
+ lnu=dlog(-u/mhsq)
+ lnm=dlog(musq/mhsq)
+ ln2t=dlog((mhsq-t)/mhsq)
+ ln2u=dlog((mhsq-u)/mhsq)
+
+ logg=+V*xn*(mhsq**4+s**4+t**4+u**4)/(s*t*u)
+ loqa=xn*cf/s*(t**2+u**2)
+ loaq=loqa
+ logq=-xn*cf/u*(s**2+t**2)
+ loqg=-xn*cf/t*(s**2+u**2)
+
+c--- UV counterterm in MS bar scheme.
+ subuv=-epinv*b0
+ Delta=11d0
+c--- See C.R.Schmidt, PLB (413) 391, eq. (16),(17)
+c--- Factor of ason2pi included in gg_hg_v.f
+C--- Three powers of as in Born --> 3
+ subuv=3d0*subuv+Delta
+
+ virtgg=-3d0*epinv**2*xn*logg
+ . +epinv*xn*logg*(lns+lnt+lnu-3d0*lnm )
+ . +xn*logg
+ . *(2d0*(Li2t+Li2u+Li2s)
+ . +lnm*(lns+lnt+lnu)-lns*lnt-lns*lnu-lnt*lnu
+ . +0.5d0*(lns**2-lnt**2-lnu**2)-1.5d0*lnm**2
+ . +2d0*(lnu*ln2u+lnt*ln2t)+4d0/3d0*pisq)
+ . +V*xn*(xn-xlf)/3d0*mhsq*(1d0+mhsq/s+mhsq/t+mhsq/u)
+ . +subuv*logg
+
+ virtqa=+(-2d0*xn+1d0/xn)*loqa*epinv**2
+ . -2d0/3d0*xlf*epinv*loqa
+ . +epinv*xn*loqa*(13d0/6d0-2d0*lnm+lnt+lnu)
+ . +epinv/xn*loqa*(1.5d0-lns+lnm)
+ . +loqa*xlf*(-10d0/9d0+2d0/3d0*lns-2d0/3d0*lnm)
+ . +xn*loqa* (40d0/9d0+Li2t+Li2u+2d0*Li2s-13d0/6d0*(lns-lnm)
+ . +(lnm-lns)*(lnt+lnu)+lns**2-lnm**2-0.5d0*lnt**2-0.5d0*lnu**2
+ . +lnt*ln2t+lnu*ln2u)
+ . +loqa/xn
+ . *(4d0-Li2t-Li2u-1.5d0*(lns-lnm)+0.5d0*(lns-lnm)**2
+ . +lnt*lnu-lnt*ln2t-lnu*ln2u)
+ . -4d0/3d0*pi**2/xn*loqa
+ . -0.25d0*(xn**3-1d0/xn)*(t+u)
+ . +subuv*loqa
+
+ virtaq=(-2d0*xn+1d0/xn)*loaq*epinv**2
+ . -2d0/3d0*xlf*epinv*loaq
+ . +epinv*xn*loaq*(13d0/6d0-2d0*lnm+lnu+lnt)
+ . +epinv/xn*loaq*(1.5d0-lns+lnm)
+ . +loaq*xlf*(-10d0/9d0+2d0/3d0*lns-2d0/3d0*lnm)
+ . +xn*loaq* (40d0/9d0+Li2u+Li2t+2d0*Li2s-13d0/6d0*(lns-lnm)
+ . +(lnm-lns)*(lnu+lnt)+lns**2-lnm**2-0.5d0*lnu**2-0.5d0*lnt**2
+ . +lnu*ln2u+lnt*ln2t)
+ . +loaq/xn
+ . *(4d0-Li2u-Li2t-1.5d0*(lns-lnm)+0.5d0*(lns-lnm)**2
+ . +lnu*lnt-lnu*ln2u-lnt*ln2t)
+ . -4d0/3d0*pi**2/xn*loaq
+ . -0.25d0*(xn**3-1d0/xn)*(u+t)
+ . +subuv*loaq
+
+
+ virtgq=(-2d0*xn+1d0/xn)*epinv**2*logq
+ . -2d0/3d0*xlf*epinv*logq
+ . +epinv*xn*logq*(13d0/6d0+lns-2d0*lnm+lnt)
+ . +epinv/xn*logq*(3d0/2d0+lnm-lnu)
+ . +logq*xlf*(-10d0/9d0-2d0/3d0*lnm+2d0/3d0*lnu)
+ . +xn*logq*(40d0/9d0+Li2t+2d0*Li2u+Li2s
+ . +lns*lnm-lns*lnu-13d0/6d0*(lnu-lnm)
+ . +lnm*lnt-lnm**2-lnt*lnu-0.5d0*lnt**2
+ . +2d0*lnu*ln2u+lnt*ln2t)
+ . +logq/xn*(4d0-Li2t-Li2s+lns*lnt+0.5d0*lnu**2-0.5d0*lns**2
+ . -lnm*lnu+0.5d0*lnm**2-lnt*ln2t-1.5d0*(lnu-lnm))
+ . +4d0/3d0*pi**2*xn*logq
+ . +0.25d0*(xn**3-1d0/xn)*(t+s)
+ . +subuv*logq
+
+ virtqg=(-2d0*xn+1d0/xn)*epinv**2*loqg
+ . -2d0/3d0*xlf*epinv*loqg
+ . +epinv*xn*loqg*(13d0/6d0+lns-2d0*lnm+lnu)
+ . +epinv/xn*loqg*(3d0/2d0+lnm-lnt)
+ . +loqg*xlf*(-10d0/9d0-2d0/3d0*lnm+2d0/3d0*lnt)
+ . +xn*loqg*(40d0/9d0+Li2u+2d0*Li2t+Li2s
+ . +lns*lnm-lns*lnt-13d0/6d0*(lnt-lnm)
+ . +lnm*lnu-lnm**2-lnu*lnt-0.5d0*lnu**2
+ . +2d0*lnt*ln2t+lnu*ln2u)
+ . +loqg/xn*(4d0-Li2u-Li2s+lns*lnu+0.5d0*lnt**2-0.5d0*lns**2
+ . -lnm*lnt+0.5d0*lnm**2-lnu*ln2u-1.5d0*(lnt-lnm))
+ . +4d0/3d0*pi**2*xn*loqg
+ . +0.25d0*(xn**3-1d0/xn)*(u+s)
+ . +subuv*loqg
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gsnew.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gsnew.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hzzg_gsnew.f (revision 1338)
@@ -0,0 +1,250 @@
+ subroutine gg_hzzg_gs(p,msq)
+
+C NEW: Same as gg_hg_gs but with H->ZZ
+
+C 5->7 6->8
+
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c g(-p1)+g(-p2) --> g+ parton(p5) + parton(p6)
+c |
+c -->b(p3)+bbar(p4)
+
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+c --- remember: nd will count the dipoles
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision
+ & msq17_2(-nf:nf,-nf:nf),msq27_1(-nf:nf,-nf:nf),
+ & msq18_2(-nf:nf,-nf:nf),msq28_1(-nf:nf,-nf:nf),
+ & msq17_8(-nf:nf,-nf:nf),msq28_7(-nf:nf,-nf:nf),
+ & msq18_7(-nf:nf,-nf:nf),msq27_8(-nf:nf,-nf:nf),
+ & msq78_1v(-nf:nf,-nf:nf),msq78_2v(-nf:nf,-nf:nf),
+ & msq28_7v(-nf:nf,-nf:nf),msq28_1v(-nf:nf,-nf:nf),
+ & msq17_8v(-nf:nf,-nf:nf),msq18_2v(-nf:nf,-nf:nf),
+ & msq18_7v(-nf:nf,-nf:nf),msq27_8v(-nf:nf,-nf:nf),
+ & msq17_2v(-nf:nf,-nf:nf),msq27_1v(-nf:nf,-nf:nf),
+ & dummy(-nf:nf,-nf:nf),
+ & sub17_2(4),sub27_1(4),sub18_2(4),sub28_1(4),
+ & sub17_8(4),sub18_7(4),sub27_8(4),sub28_7(4),
+ & sub78_1(4),sub78_2(4),sub78_1v,sub78_2v,
+ & sub28_7v,sub28_1v,sub18_7v,sub18_2v,sub17_2v,sub17_8v,sub27_8v,
+ & sub27_1v
+ external qqb_hzz_g,gg_hzzg_gvec
+ ndmax=6
+
+c--- calculate all the initial-initial dipoles
+ call dips(1,p,1,7,2,sub17_2,sub17_2v,msq17_2,msq17_2v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(2,p,2,7,1,sub27_1,sub27_1v,msq27_1,msq27_1v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(3,p,1,8,2,sub18_2,sub18_2v,msq18_2,msq18_2v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(4,p,2,8,1,sub28_1,sub28_1v,msq28_1,msq28_1v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+
+c--- now the basic initial final ones
+ call dips(5,p,1,7,8,sub17_8,sub17_8v,msq17_8,msq17_8v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+c--- called for final initial the routine only supplies new values for
+c--- sub... and sub...v and msqv
+ call dips(5,p,7,8,1,sub78_1,sub78_1v,dummy,msq78_1v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(5,p,1,8,7,sub18_7,sub18_7v,msq18_7,msq18_7v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+
+ call dips(6,p,2,8,7,sub28_7,sub28_7v,msq28_7,msq28_7v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(6,p,7,8,2,sub78_2,sub78_2v,dummy,msq78_2v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+ call dips(6,p,2,7,8,sub27_8,sub27_8v,msq27_8,msq27_8v,
+ . qqb_hzz_g,gg_hzzg_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+ enddo
+ enddo
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+c--- do only q-qb and qb-q cases
+ if ( ((j .gt. 0).and.(k .lt. 0))
+ . .or. ((j .lt. 0).and.(k .gt. 0))) then
+ msq(1,j,k)=-msq17_2(j,k)*sub17_2(qq)/xn
+ msq(2,j,k)=-msq27_1(j,k)*sub27_1(qq)/xn
+ msq(3,j,k)=-msq18_2(j,k)*sub18_2(qq)/xn
+ msq(4,j,k)=-msq28_1(j,k)*sub28_1(qq)/xn
+ msq(5,j,k)=xn*(
+ . +msq17_8(j,k)*(sub17_8(qq)+0.5d0*sub78_1(gg))
+ . +0.5d0*msq78_1v(j,k)*sub78_1v
+ . +msq18_7(j,k)*(sub18_7(qq)+0.5d0*sub78_1(gg))
+ . +0.5d0*msq78_1v(j,k)*sub78_1v)
+ msq(6,j,k)=xn*(
+ . (msq28_7(j,k)*(sub28_7(qq)+0.5d0*sub78_2(gg))
+ . +0.5d0*msq78_2v(j,k)*sub78_2v)
+ . +(msq27_8(j,k)*(sub27_8(qq)+0.5d0*sub78_2(gg))
+ . +0.5d0*msq78_2v(j,k)*sub78_2v))
+
+c--- note statistical factor of one half for two gluons in the final state
+ do nd=1,ndmax
+ msq(nd,j,k)=half*msq(nd,j,k)
+ enddo
+
+ elseif ((k .eq. 0).and. (j .ne. 0)) then
+c--- q-g and qb-g cases
+ msq(1,j,k)=(aveqg/avegg)*(
+ . msq17_2(0,0)*sub17_2(gq)+msq17_2v(0,0)*sub17_2v)
+ msq(2,j,k)=2d0*tr*(msq27_1(j,-5)+msq27_1(j,-4)+msq27_1(j,-3)
+ . +msq27_1(j,-2)+msq27_1(j,-1)+msq27_1(j,+1)
+ . +msq27_1(j,+2)+msq27_1(j,+3)+msq27_1(j,+4)
+ . +msq27_1(j,+5))*sub27_1(qg)
+ msq(3,j,k)=xn*msq18_2(j,k)*sub18_2(qq)
+ msq(4,j,k)=xn*(msq28_1(j,k)*sub28_1(gg)+msq28_1v(j,k)*sub28_1v)
+ msq(5,j,k)=-msq18_7(j,k)*(sub18_7(qq)+sub78_1(qq))/xn
+ msq(6,j,k)=xn*(msq28_7(j,k)*sub28_7(gg)+msq28_7v(j,k)*sub28_7v
+ . +msq28_7(j,k)*sub78_2(qq))
+
+ elseif ((j .eq. 0).and.(k.ne.0)) then
+c--- g-q and g-qb cases
+ msq(1,j,k)=2d0*tr*(msq17_2(-5,k)+msq17_2(-4,k)+msq17_2(-3,k)
+ . +msq17_2(-2,k)+msq17_2(-1,k)+msq17_2(+1,k)
+ . +msq17_2(+2,k)+msq17_2(+3,k)+msq17_2(+4,k)
+ . +msq17_2(+5,k))*sub17_2(qg)
+ msq(2,j,k)=(aveqg/avegg)*(
+ . msq27_1(0,0)*sub27_1(gq)+msq27_1v(0,0)*sub27_1v)
+ msq(3,j,k)=xn*(msq18_2(j,k)*sub18_2(gg)+msq18_2v(j,k)*sub18_2v)
+ msq(4,j,k)=xn*msq28_1(j,k)*sub28_1(qq)
+ msq(5,j,k)=xn*(msq18_7(j,k)*sub18_7(gg)+msq18_7v(j,k)*sub18_7v
+ . +msq18_7(j,k)*sub78_1(qq))
+ msq(6,j,k)=-msq28_7(j,k)*(sub28_7(qq)+sub78_2(qq))/xn
+
+ elseif ((j .eq. 0).and.(k .eq. 0)) then
+c--- g-g case
+c--- first set of subtractions take care of gg->qbq, second set gg->gg;
+c--- note g,g = 1,2 and qb=5, q=6 so (15),(25)-->q and (16),(26)-->qb
+ msq(1,j,k)=(msq17_2(+1,k)+msq17_2(+2,k)+msq17_2(+3,k)
+ . +msq17_2(+4,k)+msq17_2(+5,k))*sub17_2(qg)*2d0*tr
+ msq(2,j,k)=(msq27_1(k,+1)+msq27_1(k,+2)+msq27_1(k,+3)
+ . +msq27_1(k,+4)+msq27_1(k,+5))*sub27_1(qg)*2d0*tr
+ msq(3,j,k)=(msq18_2(-5,k)+msq18_2(-4,k)+msq18_2(-3,k)
+ . +msq18_2(-2,k)+msq18_2(-1,k))*sub18_2(qg)*2d0*tr
+ msq(4,j,k)=(msq28_1(k,-5)+msq28_1(k,-4)+msq28_1(k,-3)
+ . +msq28_1(k,-2)+msq28_1(k,-1))*sub28_1(qg)*2d0*tr
+ msq(5,j,k)=dfloat(nf)*half*(
+ .+msq18_7(j,k)*sub78_1(gq)-msq78_1v(j,k)*sub78_1v)
+ msq(6,j,k)=dfloat(nf)*half*(
+ .+msq28_7(j,k)*sub78_2(gq)-msq78_2v(j,k)*sub78_2v)
+ msq(1,j,k)=msq(1,j,k)+half*xn*(
+ . msq17_2(j,k)*sub17_2(gg)+msq17_2v(j,k)*sub17_2v)
+ msq(2,j,k)=msq(2,j,k)+half*xn*(
+ . msq27_1(j,k)*sub27_1(gg)+msq27_1v(j,k)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+half*xn*(
+ . msq18_2(j,k)*sub18_2(gg)+msq18_2v(j,k)*sub18_2v)
+ msq(4,j,k)=msq(4,j,k)+half*xn*(
+ . msq28_1(j,k)*sub28_1(gg)+msq28_1v(j,k)*sub28_1v)
+ msq(5,j,k)=msq(5,j,k)+half*xn*(
+ . msq17_8(j,k)*sub17_8(gg)+msq17_8v(j,k)*sub17_8v
+ .+msq18_7(j,k)*sub18_7(gg)+msq18_7v(j,k)*sub18_7v
+ .+msq18_7(j,k)*sub78_1(gg)+msq78_1v(j,k)*sub78_1v)
+ msq(6,j,k)=msq(6,j,k)+half*xn*(
+ . msq27_8(j,k)*sub27_8(gg)+msq27_8v(j,k)*sub27_8v
+ .+msq28_7(j,k)*sub28_7(gg)+msq28_7v(j,k)*sub28_7v
+ .+msq28_7(j,k)*sub78_2(gg)+msq78_2v(j,k)*sub78_2v)
+ endif
+
+
+ enddo
+ enddo
+c endif
+
+c return
+c--- Start of the 4Q contribution
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if ((j .gt. 0) .and. (k .gt. 0)) then
+c--- Q Q - different flavours
+ if (j .ne. k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ else
+c--- Q Q - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq27_1(j,0)*sub27_1(gq)+msq27_1v(j,0)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq18_2(0,k)*sub18_2(gq)+msq18_2v(0,k)*sub18_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ endif
+
+ elseif ((j .lt. 0).and.(k .lt. 0)) then
+ if (j .ne. k) then
+c--- QBAR QBAR - different flavours
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ else
+c--- QBAR QBAR - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq27_1(j,0)*sub27_1(gq)+msq27_1v(j,0)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq18_2(0,k)*sub18_2(gq)+msq18_2v(0,k)*sub18_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ endif
+
+ elseif ((j .gt. 0).and.(k .lt. 0)) then
+c--- Q QBAR
+ if (j .eq. -k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq28_7(j,k)*sub78_2(gq)-msq78_2v(j,k)*sub78_2v)
+ else
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq17_2(0,k)*sub17_2(gq)+msq17_2v(0,k)*sub17_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq28_1(j,0)*sub28_1(gq)+msq28_1v(j,0)*sub28_1v)
+ endif
+c--- QBAR Q
+ elseif ((j .lt. 0).and.(k .gt. 0)) then
+ if (j .eq. -k) then
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq27_1(j,0)*sub27_1(gq)+msq27_1v(j,0)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq18_2(0,k)*sub18_2(gq)+msq18_2v(0,k)*sub18_2v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq28_7(j,k)*sub78_2(gq)-msq78_2v(j,k)*sub78_2v)
+ else
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq27_1(j,0)*sub27_1(gq)+msq27_1v(j,0)*sub27_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq18_2(0,k)*sub18_2(gq)+msq18_2v(0,k)*sub18_2v)
+
+ endif
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hg_gs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hg_gs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hg_gs.f (revision 1338)
@@ -0,0 +1,249 @@
+ subroutine gg_hg_gs(p,msq)
+************************************************************************
+* Author: J.M. Campbell *
+* March, 2003. *
+************************************************************************
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c g(-p1)+g(-p2) --> g+ parton(p5) + parton(p6)
+c |
+c -->b(p3)+bbar(p4)
+
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+c --- remember: nd will count the dipoles
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision
+ & msq15_2(-nf:nf,-nf:nf),msq25_1(-nf:nf,-nf:nf),
+ & msq16_2(-nf:nf,-nf:nf),msq26_1(-nf:nf,-nf:nf),
+ & msq15_6(-nf:nf,-nf:nf),msq26_5(-nf:nf,-nf:nf),
+ & msq16_5(-nf:nf,-nf:nf),msq25_6(-nf:nf,-nf:nf),
+ & msq56_1v(-nf:nf,-nf:nf),msq56_2v(-nf:nf,-nf:nf),
+ & msq26_5v(-nf:nf,-nf:nf),msq26_1v(-nf:nf,-nf:nf),
+ & msq15_6v(-nf:nf,-nf:nf),msq16_2v(-nf:nf,-nf:nf),
+ & msq16_5v(-nf:nf,-nf:nf),msq25_6v(-nf:nf,-nf:nf),
+ & msq15_2v(-nf:nf,-nf:nf),msq25_1v(-nf:nf,-nf:nf),
+ & dummy(-nf:nf,-nf:nf),
+ & sub15_2(4),sub25_1(4),sub16_2(4),sub26_1(4),
+ & sub15_6(4),sub16_5(4),sub25_6(4),sub26_5(4),
+ & sub56_1(4),sub56_2(4),sub56_1v,sub56_2v,
+ & sub26_5v,sub26_1v,sub16_5v,sub16_2v,sub15_2v,sub15_6v,sub25_6v,
+ & sub25_1v
+ external gg_hg,gg_hg_gvec
+ ndmax=6
+
+c--- calculate all the initial-initial dipoles
+ call dips(1,p,1,5,2,sub15_2,sub15_2v,msq15_2,msq15_2v,
+ . gg_hg,gg_hg_gvec)
+ call dips(2,p,2,5,1,sub25_1,sub25_1v,msq25_1,msq25_1v,
+ . gg_hg,gg_hg_gvec)
+ call dips(3,p,1,6,2,sub16_2,sub16_2v,msq16_2,msq16_2v,
+ . gg_hg,gg_hg_gvec)
+ call dips(4,p,2,6,1,sub26_1,sub26_1v,msq26_1,msq26_1v,
+ . gg_hg,gg_hg_gvec)
+
+c--- now the basic initial final ones
+ call dips(5,p,1,5,6,sub15_6,sub15_6v,msq15_6,msq15_6v,
+ . gg_hg,gg_hg_gvec)
+c--- called for final initial the routine only supplies new values for
+c--- sub... and sub...v and msqv
+ call dips(5,p,5,6,1,sub56_1,sub56_1v,dummy,msq56_1v,
+ . gg_hg,gg_hg_gvec)
+ call dips(5,p,1,6,5,sub16_5,sub16_5v,msq16_5,msq16_5v,
+ . gg_hg,gg_hg_gvec)
+
+ call dips(6,p,2,6,5,sub26_5,sub26_5v,msq26_5,msq26_5v,
+ . gg_hg,gg_hg_gvec)
+ call dips(6,p,5,6,2,sub56_2,sub56_2v,dummy,msq56_2v,
+ . gg_hg,gg_hg_gvec)
+ call dips(6,p,2,5,6,sub25_6,sub25_6v,msq25_6,msq25_6v,
+ . gg_hg,gg_hg_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+ enddo
+ enddo
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+c--- do only q-qb and qb-q cases
+ if ( ((j .gt. 0).and.(k .lt. 0))
+ . .or. ((j .lt. 0).and.(k .gt. 0))) then
+ msq(1,j,k)=-msq15_2(j,k)*sub15_2(qq)/xn
+ msq(2,j,k)=-msq25_1(j,k)*sub25_1(qq)/xn
+ msq(3,j,k)=-msq16_2(j,k)*sub16_2(qq)/xn
+ msq(4,j,k)=-msq26_1(j,k)*sub26_1(qq)/xn
+ msq(5,j,k)=xn*(
+ . +msq15_6(j,k)*(sub15_6(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v
+ . +msq16_5(j,k)*(sub16_5(qq)+0.5d0*sub56_1(gg))
+ . +0.5d0*msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=xn*(
+ . (msq26_5(j,k)*(sub26_5(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v)
+ . +(msq25_6(j,k)*(sub25_6(qq)+0.5d0*sub56_2(gg))
+ . +0.5d0*msq56_2v(j,k)*sub56_2v))
+
+c--- note statistical factor of one half for two gluons in the final state
+ do nd=1,ndmax
+ msq(nd,j,k)=half*msq(nd,j,k)
+ enddo
+
+ elseif ((k .eq. 0).and. (j .ne. 0)) then
+c--- q-g and qb-g cases
+ msq(1,j,k)=(aveqg/avegg)*(
+ . msq15_2(0,0)*sub15_2(gq)+msq15_2v(0,0)*sub15_2v)
+ msq(2,j,k)=2d0*tr*(msq25_1(j,-5)+msq25_1(j,-4)+msq25_1(j,-3)
+ . +msq25_1(j,-2)+msq25_1(j,-1)+msq25_1(j,+1)
+ . +msq25_1(j,+2)+msq25_1(j,+3)+msq25_1(j,+4)
+ . +msq25_1(j,+5))*sub25_1(qg)
+ msq(3,j,k)=xn*msq16_2(j,k)*sub16_2(qq)
+ msq(4,j,k)=xn*(msq26_1(j,k)*sub26_1(gg)+msq26_1v(j,k)*sub26_1v)
+ msq(5,j,k)=-msq16_5(j,k)*(sub16_5(qq)+sub56_1(qq))/xn
+ msq(6,j,k)=xn*(msq26_5(j,k)*sub26_5(gg)+msq26_5v(j,k)*sub26_5v
+ . +msq26_5(j,k)*sub56_2(qq))
+
+ elseif ((j .eq. 0).and.(k.ne.0)) then
+c--- g-q and g-qb cases
+ msq(1,j,k)=2d0*tr*(msq15_2(-5,k)+msq15_2(-4,k)+msq15_2(-3,k)
+ . +msq15_2(-2,k)+msq15_2(-1,k)+msq15_2(+1,k)
+ . +msq15_2(+2,k)+msq15_2(+3,k)+msq15_2(+4,k)
+ . +msq15_2(+5,k))*sub15_2(qg)
+ msq(2,j,k)=(aveqg/avegg)*(
+ . msq25_1(0,0)*sub25_1(gq)+msq25_1v(0,0)*sub25_1v)
+ msq(3,j,k)=xn*(msq16_2(j,k)*sub16_2(gg)+msq16_2v(j,k)*sub16_2v)
+ msq(4,j,k)=xn*msq26_1(j,k)*sub26_1(qq)
+ msq(5,j,k)=xn*(msq16_5(j,k)*sub16_5(gg)+msq16_5v(j,k)*sub16_5v
+ . +msq16_5(j,k)*sub56_1(qq))
+ msq(6,j,k)=-msq26_5(j,k)*(sub26_5(qq)+sub56_2(qq))/xn
+
+ elseif ((j .eq. 0).and.(k .eq. 0)) then
+c--- g-g case
+c--- first set of subtractions take care of gg->qbq, second set gg->gg;
+c--- note g,g = 1,2 and qb=5, q=6 so (15),(25)-->q and (16),(26)-->qb
+ msq(1,j,k)=(msq15_2(+1,k)+msq15_2(+2,k)+msq15_2(+3,k)
+ . +msq15_2(+4,k)+msq15_2(+5,k))*sub15_2(qg)*2d0*tr
+ msq(2,j,k)=(msq25_1(k,+1)+msq25_1(k,+2)+msq25_1(k,+3)
+ . +msq25_1(k,+4)+msq25_1(k,+5))*sub25_1(qg)*2d0*tr
+ msq(3,j,k)=(msq16_2(-5,k)+msq16_2(-4,k)+msq16_2(-3,k)
+ . +msq16_2(-2,k)+msq16_2(-1,k))*sub16_2(qg)*2d0*tr
+ msq(4,j,k)=(msq26_1(k,-5)+msq26_1(k,-4)+msq26_1(k,-3)
+ . +msq26_1(k,-2)+msq26_1(k,-1))*sub26_1(qg)*2d0*tr
+ msq(5,j,k)=dfloat(nf)*half*(
+ .+msq16_5(j,k)*sub56_1(gq)-msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=dfloat(nf)*half*(
+ .+msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ msq(1,j,k)=msq(1,j,k)+half*xn*(
+ . msq15_2(j,k)*sub15_2(gg)+msq15_2v(j,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*xn*(
+ . msq25_1(j,k)*sub25_1(gg)+msq25_1v(j,k)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*xn*(
+ . msq16_2(j,k)*sub16_2(gg)+msq16_2v(j,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*xn*(
+ . msq26_1(j,k)*sub26_1(gg)+msq26_1v(j,k)*sub26_1v)
+ msq(5,j,k)=msq(5,j,k)+half*xn*(
+ . msq15_6(j,k)*sub15_6(gg)+msq15_6v(j,k)*sub15_6v
+ .+msq16_5(j,k)*sub16_5(gg)+msq16_5v(j,k)*sub16_5v
+ .+msq16_5(j,k)*sub56_1(gg)+msq56_1v(j,k)*sub56_1v)
+ msq(6,j,k)=msq(6,j,k)+half*xn*(
+ . msq25_6(j,k)*sub25_6(gg)+msq25_6v(j,k)*sub25_6v
+ .+msq26_5(j,k)*sub26_5(gg)+msq26_5v(j,k)*sub26_5v
+ .+msq26_5(j,k)*sub56_2(gg)+msq56_2v(j,k)*sub56_2v)
+ endif
+
+
+ enddo
+ enddo
+c endif
+
+c return
+c--- Start of the 4Q contribution
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if ((j .gt. 0) .and. (k .gt. 0)) then
+c--- Q Q - different flavours
+ if (j .ne. k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+c--- Q Q - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+
+ elseif ((j .lt. 0).and.(k .lt. 0)) then
+ if (j .ne. k) then
+c--- QBAR QBAR - different flavours
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ else
+c--- QBAR QBAR - same flavours
+ msq(1,j,k)=msq(1,j,k)+half*(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(2,j,k)=msq(2,j,k)+half*(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+half*(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(4,j,k)=msq(4,j,k)+half*(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+
+ elseif ((j .gt. 0).and.(k .lt. 0)) then
+c--- Q QBAR
+ if (j .eq. -k) then
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(1,j,k)=msq(1,j,k)+(xn-1d0/xn)
+ . *(msq15_2(0,k)*sub15_2(gq)+msq15_2v(0,k)*sub15_2v)
+ msq(4,j,k)=msq(4,j,k)+(xn-1d0/xn)
+ . *(msq26_1(j,0)*sub26_1(gq)+msq26_1v(j,0)*sub26_1v)
+ endif
+c--- QBAR Q
+ elseif ((j .lt. 0).and.(k .gt. 0)) then
+ if (j .eq. -k) then
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+ msq(6,j,k)=msq(6,j,k)+2d0*tr*dfloat(nf)
+ . *(msq26_5(j,k)*sub56_2(gq)-msq56_2v(j,k)*sub56_2v)
+ else
+ msq(2,j,k)=msq(2,j,k)+(xn-1d0/xn)
+ . *(msq25_1(j,0)*sub25_1(gq)+msq25_1v(j,0)*sub25_1v)
+ msq(3,j,k)=msq(3,j,k)+(xn-1d0/xn)
+ . *(msq16_2(0,k)*sub16_2(gq)+msq16_2v(0,k)*sub16_2v)
+
+ endif
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_hzzgg.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_hzzgg.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_hzzgg.f (revision 1338)
@@ -0,0 +1,184 @@
+ subroutine gg_hzzgg(p,msq)
+ implicit none
+
+CC NEW from gg_hgg: replace H->bbar into H->ZZ
+
+c---Matrix element squared averaged over initial colors and spins
+c
+c g(-p1)+g(-p2) --> H+g(p7)+g(p8)
+c --> ZZ+g(p7)+g(p8)
+c -->(mu-(p3)+mu+(p4)+e-(p5)+e+(p6))+g(p7)+g(p8)
+
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'sprods_com.f'
+ include 'zprods_com.f'
+ include 'zcouple.f'
+ integer j,k,iglue1,iglue2
+ double precision p(mxpart,4),Asq,fac,shiggs,interf,num,den
+ double precision Hgggg,Hqagg,Haqgg,Hgqgq,Hgaga,Hqgqg,Hagag,Hggqa
+ double precision
+ . Hqrqr,Hqqqq,
+ . Habab,Haaaa,
+ . Hqarb,Hqaqa,Hqbqb,
+ . Haqbr,Haqaq,Hbqbq
+ double precision msq(-nf:nf,-nf:nf),dec,decay
+
+ parameter(iglue1=7,iglue2=8)
+
+ logical int
+ common/int/int
+
+
+C---fill spinor products upto maximum number
+ call spinoru(iglue2,p,za,zb)
+
+
+
+C Higgs virtuality
+
+ shiggs=s(3,4)+s(3,5)+s(3,6)+s(4,5)+s(4,6)+s(5,6)
+
+ interf=0d0
+
+
+ decay=(((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+ . +((r1*l2)**2+(r2*l1)**2)*s(3,6)*s(4,5))
+
+
+ decay=decay/((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)
+ decay=decay/((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+C Here only H->ZZ->(34)(56): diagram with (1<->3) accounted for
+C by adding a factor 2
+
+ if(int.eqv..false.)goto 39
+
+ decay=2*decay
+
+C Interference contribution
+
+ interf=2*((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+
+ num=((s(3,4)-zmass**2)*(s(5,6)-zmass**2)*(s(4,5)-zmass**2)*
+ . (s(3,6)-zmass**2)+(zmass*zwidth)**4+
+ . (zmass*zwidth)**2*(2*zmass**4-zmass**2*
+ . (s(3,4)+s(5,6)+s(4,5)+s(3,6))+s(3,4)*s(3,6)+s(3,4)*s(4,5)+
+ . s(3,6)*s(5,6)+s(4,5)*s(5,6)-s(3,6)*s(4,5)-s(3,4)*s(5,6)))
+
+ den=((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(4,5)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(3,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+
+ interf=interf*num/den
+
+ 39 continue
+
+ dec=gwsq**3*zmass**2*4d0*xw**2/(one-xw)*
+ . (decay+interf)/((shiggs-hmass**2)**2+(hmass*hwidth)**2)
+
+C In case of identical particles add 1/4 symmetry factor
+
+ if(int) dec=dec/4
+
+
+ Asq=(as/(3d0*pi))**2/vevsq
+ fac=gsq**2*Asq*dec
+
+C--four gluon terms
+ call h4g(1,2,iglue1,iglue2,Hgggg)
+
+C--two quark two gluon terms
+ call hqqgg(1,2,iglue1,iglue2,Hqagg)
+c call hqqgg(2,1,iglue1,iglue2,Haqgg)
+C====symmetric in first two arguments
+ Haqgg=Hqagg
+
+ call hqqgg(1,iglue1,2,iglue2,Hqgqg)
+c call hqqgg(iglue1,1,2,iglue2,Hagag)
+C====symmetric in first two arguments
+ Hagag=Hqgqg
+
+ call hqqgg(2,iglue1,1,iglue2,Hgqgq)
+c call hqqgg(iglue1,2,1,iglue2,Hgaga)
+C====symmetric in first two arguments
+ Hgaga=Hgqgq
+
+ call hqqgg(iglue2,iglue1,1,2,Hggqa)
+
+C---four quark terms
+ call H4qn(1,2,iglue1,iglue2,Hqrqr)
+ call H4qi(1,2,iglue1,iglue2,Hqqqq)
+C---four anti-quark terms
+c call H4qn(iglue1,iglue2,1,2,Habab)
+c call H4qi(iglue1,iglue2,1,2,Haaaa)
+ Habab=Hqrqr
+ Haaaa=Hqqqq
+
+C-qqb
+ call H4qn(1,iglue2,2,iglue1,Hqarb)
+ call H4qi(1,iglue2,2,iglue1,Hqaqa)
+
+ call H4qn(1,iglue2,iglue1,2,Hqbqb)
+
+
+C-qbq
+ Haqbr=Hqarb
+ call H4qi(2,iglue2,1,iglue1,Haqaq)
+ call H4qn(2,iglue2,iglue1,1,Hbqbq)
+
+ do j=fn,nf
+ do k=fn,nf
+ msq(j,k)=0d0
+ if ((j.gt.0).and.(k.gt.0)) then
+ if (j.eq.k) then
+ msq(j,k)=0.5d0*aveqq*fac*Hqqqq
+ else
+ msq(j,k)=aveqq*fac*Hqrqr
+ endif
+ endif
+ if ((j.lt.0).and.(k.lt.0)) then
+ if (j.eq.k) then
+ msq(j,k)=0.5d0*aveqq*fac*Haaaa
+ else
+ msq(j,k)=aveqq*fac*Habab
+ endif
+ endif
+
+ if ((j.gt.0).and.(k.lt.0)) then
+ if (j.eq.-k) then
+ msq(j,k)=aveqq*fac*(0.5d0*Hqagg+Hqaqa+(nf-1)*Hqarb)
+ else
+ msq(j,k)=aveqq*fac*Hqbqb
+ endif
+ endif
+
+ if ((j.lt.0).and.(k.gt.0)) then
+ if (j.eq.-k) then
+ msq(j,k)=aveqq*fac*(0.5d0*Haqgg+Haqaq+dfloat(nf-1)*Haqbr)
+ else
+ msq(j,k)=aveqq*fac*Hbqbq
+ endif
+ endif
+
+ if ((j.gt.0).and.(k.eq.0)) msq(j,0)=aveqg*fac*Hqgqg
+ if ((j.lt.0).and.(k.eq.0)) msq(j,0)=aveqg*fac*Hagag
+
+ if ((j.eq.0).and.(k.gt.0)) msq(0,k)=aveqg*fac*Hgqgq
+ if ((j.eq.0).and.(k.lt.0)) msq(0,k)=aveqg*fac*Hgaga
+
+ if ((j.eq.0).and.(k.eq.0)) then
+ msq(0,0)=avegg*fac*(0.5d0*Hgggg+dfloat(nf)*Hggqa)
+ endif
+
+ enddo
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_gs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_gs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz_gs.f (revision 1338)
@@ -0,0 +1,58 @@
+ subroutine qqb_hzz_gs(p,msq)
+c---Matrix element SUBTRACTION squared averaged over initial colors and spins
+c----for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> Z- (mu^-(p5)+mu^+(p6)) + Z (e^-(p3)+e^+(p4))
+c +g(p7)
+c---
+ implicit none
+ include 'constants.f'
+ include 'ptilde.f'
+ include 'qqgg.f'
+ integer j,k,nd
+
+ double precision p(mxpart,4),msq(maxd,-nf:nf,-nf:nf)
+ double precision msq17_2(-nf:nf,-nf:nf),msq27_1(-nf:nf,-nf:nf),
+ . msq17_2v(-nf:nf,-nf:nf),msq27_1v(-nf:nf,-nf:nf),
+ . sub17_2(4),sub27_1(4),sub17_2v,sub27_1v
+ external qqb_hzz,qqb_hzz_gvec
+
+ ndmax=2
+
+c---- calculate both initial-initial dipoles
+c---- note that we do not require the gg dipoles, so the v-type
+c---- entries are left as dummies
+ call dips(1,p,1,7,2,sub17_2,sub17_2v,msq17_2,msq17_2v,
+ . qqb_hzz,qqb_hzz_gvec)
+ call dips(2,p,2,7,1,sub27_1,sub27_1v,msq27_1,msq27_1v,
+ . qqb_hzz,qqb_hzz_gvec)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=1,ndmax
+ msq(nd,j,k)=0d0
+ enddo
+
+
+ if ((j .ne. 0) .and. (k .eq. 0)) then
+ msq(1,j,k)=two*cf
+ . *(msq17_2(0,0)*sub17_2(gq)+msq17_2v(0,0)*sub17_2v)
+ elseif ((j .eq. 0) .and. (k .ne. 0)) then
+ msq(2,j,k)=two*cf
+ . *(msq27_1(0,0)*sub27_1(gq)+msq27_1v(0,0)*sub27_1v)
+ elseif ((j .eq. 0) .and. (k .eq. 0)) then
+ msq(1,j,k)=two*xn
+ . *(msq17_2(j,k)*sub17_2(gg)+msq17_2v(j,k)*sub17_2v)
+ msq(2,j,k)=two*xn
+ . *(msq27_1(j,k)*sub27_1(gg)+msq27_1v(j,k)*sub27_1v)
+ endif
+
+
+ enddo
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/gg_h_gvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/gg_h_gvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/gg_h_gvec.f (revision 1338)
@@ -0,0 +1,23 @@
+ subroutine gg_h_gvec(p,n,in,msq)
+ implicit none
+ include 'constants.f'
+C in is the label of the momentum contracted with n
+ integer j,k,in
+ double precision msq(-nf:nf,-nf:nf),msqt(-nf:nf,-nf:nf)
+ double precision n(4),nDn,p(mxpart,4)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ nDn=n(4)**2-n(3)**2-n(2)**2-n(1)**2
+ call gg_h(p,msqt)
+
+ msq(0,0)=-0.5d0*nDn*msqt(0,0)
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/hqqgg_sq.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/hqqgg_sq.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/hqqgg_sq.f (revision 1338)
@@ -0,0 +1,123 @@
+ subroutine hqqgg_sq(p1,p2,p3,p4,ampsq)
+ implicit none
+C Taken from Kauffman
+C PRD 55 1997 (4009)
+C and checked with hep-ph/9903330
+ include 'constants.f'
+ include 'sprods_com.f'
+ integer p1,p2,p3,p4,j,j1,j2,j3
+ integer i1,i2,i3,i4,i5,i6,k1,k2
+ double precision ampsq
+ double precision sq(2,2,2),Trace4,Trace6,mssq,masq,m34sq,m43sq
+ double precision n11,n12,n22,n33,n13,n23,d1,d2,d3,d4,d5,c1,c2
+ double precision m34int
+ parameter(c1=cf**2*xn,c2=-0.5d0*cf)
+
+ Trace4(i1,i2,i3,i4)=
+ . +s(i1,i2)*s(i3,i4)+s(i2,i3)*s(i1,i4)-s(i1,i3)*s(i2,i4)
+ Trace6(i1,i2,i3,i4,i5,i6)=
+ . +0.5d0*s(i1,i2)*Trace4(i3,i4,i5,i6)
+ . -0.5d0*s(i1,i3)*Trace4(i2,i4,i5,i6)
+ . +0.5d0*s(i1,i4)*Trace4(i2,i3,i5,i6)
+ . -0.5d0*s(i1,i5)*Trace4(i2,i3,i4,i6)
+ . +0.5d0*s(i1,i6)*Trace4(i2,i3,i4,i5)
+ n11(i1,i2,i3,i4)=
+ . 0.25d0*s(i1,i4)*s(i2,i4)
+ . *(+Trace4(i2,i1,i3,i1)+Trace4(i2,i1,i3,i4)
+ . +Trace4(i2,i4,i3,i1)+Trace4(i2,i4,i3,i4))**2
+ n22(i1,i2,i3,i4)=n11(i1,i2,i4,i3)
+ n33(i1,i2,i3,i4)=
+ . 0.25d0*s(i1,i2)*s(i2,i3)*s(i2,i4)*s(i3,i4)
+ . *(+Trace4(i1,i3,i2,i3)+Trace4(i1,i3,i2,i4)
+ . +Trace4(i1,i4,i2,i3)+Trace4(i1,i4,i2,i4))**2
+ n12(i1,i2,i3,i4)=
+ . (+Trace6(i2,i1,i3,i1,i4,i1)+Trace6(i2,i1,i3,i1,i4,i3)
+ . +Trace6(i2,i4,i3,i1,i4,i1)+Trace6(i2,i4,i3,i1,i4,i3))
+ .*(+Trace6(i2,i1,i3,i2,i4,i1)+Trace6(i2,i1,i3,i2,i4,i3)
+ . +Trace6(i2,i4,i3,i2,i4,i1)+Trace6(i2,i4,i3,i2,i4,i3))
+ . -Trace4(i1,i3,i2,i4)
+ . *(s(i1,i2)*s(i1,i3)+s(i2,i4)*s(i3,i4)+Trace4(i1,i2,i4,i3))
+ . *(s(i1,i2)*s(i1,i4)+s(i2,i3)*s(i3,i4)+Trace4(i1,i2,i3,i4))
+ n13(i1,i2,i3,i4)=-s(i2,i4)*n12(i4,i2,i3,i1)
+ n23(i1,i2,i3,i4)=n13(i1,i2,i4,i3)
+ do j=1,2
+ if (j.eq.1) then
+ k1=p1
+ k2=p2
+ elseif (j.eq.2) then
+ k1=p2
+ k2=p1
+ endif
+
+ d1=s(k1,p4)*s(k2,p4)*(s(k1,p4)+s(k2,p4)+s(k1,k2))
+ d2=s(k1,p3)*s(k2,p3)*(s(k1,p3)+s(k2,p3)+s(k1,k2))
+ d3=s(k2,p4)*(s(k1,p4)+s(k2,p4)+s(k1,k2))
+ . /(1d0/s(k1,k2)+0.5d0/s(k1,p4))
+ d4=s(k2,p3)*(s(k1,p3)+s(k2,p3)+s(k1,k2))
+ . /(1d0/s(k1,k2)+0.5d0/s(k1,p3))
+ d5=s(k1,k2)*s(k2,p3)*s(k2,p4)*s(p3,p4)
+
+ mssq=0.25d0*(n11(k1,k2,p3,p4)/d1**2+n22(k1,k2,p3,p4)/d2**2
+ . + n12(k1,k2,p3,p4)/(d1*d2))
+
+ masq=
+ . +n11(k1,k2,p3,p4)/d3**2
+ . +n22(k1,k2,p3,p4)/d4**2
+ . +n33(k1,k2,p3,p4)/d5**2
+ . -n12(k1,k2,p3,p4)/(d3*d4)
+ . +n13(k1,k2,p3,p4)/(d3*d5)
+ . +n23(k1,k2,p3,p4)/(d4*d5)
+
+
+ m34sq=c1*(
+ . +s(k1,p3)**3/(s(k1,k2)*s(k1,p4)*s(p3,p4))
+ . +s(k2,p4)**3/(s(k1,k2)*s(k2,p3)*s(p3,p4))
+ . +1d0/(s(k1,p4)*s(k2,p3)*(s(k1,k2)*s(p3,p4))**2)
+ . *(-Trace4(k1,k2,p4,p3)**2*Trace4(k1,p3,k2,p4)
+ . -s(k1,p3)*s(k2,p4)*Trace4(k1,k2,p3,p4)*Trace4(k1,k2,p4,p3)
+ . +s(k1,k2)*s(k1,p3)*s(k2,p4)*s(p3,p4)*Trace4(k1,p3,k2,p4)))
+
+ m43sq=c1*(
+ . +s(k1,p3)**2*s(k2,p3)/(s(k1,k2)*s(k2,p4)*s(p3,p4))
+ . +s(k1,p4)*s(k2,p4)**2/(s(k1,k2)*s(k1,p3)*s(p3,p4))
+ . +(Trace4(k1,k2,p4,p3)*Trace4(k1,k2,p3,p4)
+ . +s(k1,k2)*s(p3,p4)*Trace4(k1,p3,k2,p4))
+ . /(s(k1,k2)*s(p3,p4))**2)
+
+ m34int=c2*(-Trace4(k1,p3,k2,p4)/(s(k1,k2)*s(p3,p4))
+ . *(s(k1,p3)**2/s(k1,p4)/s(k2,p4)+s(k2,p4)**2/s(k1,p3)/s(k2,p3))
+ . +2d0/(s(k1,k2)*s(p3,p4))**2
+ .*(Trace4(k1,k2,p4,p3)**2-2d0*s(k1,k2)*s(k1,p3)*s(k2,p4)*s(p3,p4)))
+
+c m34inta=c2*(+2d0
+c . +s(k1,p3)**2/s(k1,p4)/s(k2,p4)+s(k2,p4)**2/s(k1,p3)/s(k2,p3)
+c . + 2d0/s(k1,k2)**2/s(p3,p4)**2
+c . *(s(k1,p3)*s(k2,p4)-s(k1,p4)*s(k2,p3))**2
+c . -((s(k2,p3)*s(k1,p4)+s(k1,p3)*s(k2,p4))
+c . *(s(k1,p3)**2/s(k1,p4)/s(k2,p4)+s(k2,p4)**2/s(k1,p3)/s(k2,p3))
+c . +4d0*s(k1,p4)*s(k2,p3))/s(k1,k2)/s(p3,p4))
+
+ if (j .eq. 1) then
+ sq(2,2,2) = 2d0*(C1*(mssq+masq)+C2*(mssq-masq))
+ sq(2,2,1) = m34sq+m43sq+m34int
+ sq(1,1,1)=sq(2,2,2)
+ sq(1,1,2)=sq(2,2,1)
+ elseif (j .eq. 2) then
+ sq(1,2,2) = 2d0*(C1*(mssq+masq)+C2*(mssq-masq))
+ sq(1,2,1) = m34sq+m43sq+m34int
+ sq(2,1,1)=sq(1,2,2)
+ sq(2,1,2)=sq(1,2,1)
+ endif
+ enddo
+
+ ampsq=0d0
+ do j1=1,2
+ do j2=1,2
+ do j3=1,2
+ ampsq=ampsq+sq(j1,j2,j3)
+ enddo
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_gvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_gvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_gvec.f (revision 1338)
@@ -0,0 +1,24 @@
+ subroutine qqb_hww_gvec(p,n,in,msq)
+ implicit none
+ include 'constants.f'
+C ip is the label of the emitting parton
+C kp is the label of the spectator parton
+ integer j,k,in
+ double precision msq(-nf:nf,-nf:nf),msqt(-nf:nf,-nf:nf)
+ double precision n(4),nDn,p(mxpart,4)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ nDn=n(4)**2-n(3)**2-n(2)**2-n(1)**2
+ call qqb_hww(p,msqt)
+
+ msq(0,0)=-0.5d0*nDn*msqt(0,0)
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Matrix/storecsz.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/storecsz.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/storecsz.f (revision 1338)
@@ -0,0 +1,18 @@
+ subroutine storecsz(mcs)
+c-- this routine transfers the information on the colour structure
+c-- for the Z2jet matrix elements into separate arrays for each
+c-- incoming parton case
+ implicit none
+ include 'mmsq_cs.f'
+ integer i,j,k
+ double precision mcs(0:2,2,2)
+
+ do i=0,2
+ do j=1,2
+ do k=1,2
+ mcs(i,j,k)=mmsq_cs(i,j,k)
+ enddo
+ enddo
+ enddo
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hzz.f (revision 1338)
@@ -0,0 +1,87 @@
+ subroutine qqb_hzz(p,msq)
+ implicit none
+C----Lowest order matrix element for H production
+C----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+C g(-p1)+g(-p2)->H->ZZ->(mu-(p3)+mu+(p4)+e-(p5)+e+(p6))
+
+C Includes interference contribution in case mu->e
+
+
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),s,shiggs
+ double precision dec,decay,gg,Asq,interf,num,den
+ logical int
+ common/int/int
+
+ s(j,k)=2*(p(j,4)*p(k,4)-p(j,1)*p(k,1)-p(j,2)*p(k,2)-p(j,3)*p(k,3))
+
+c---set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ shiggs=s(3,4)+s(3,5)+s(3,6)+s(4,5)+s(4,6)+s(5,6)
+ interf=0d0
+
+
+ decay=(((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+ . +((r1*l2)**2+(r2*l1)**2)*s(3,6)*s(4,5))
+
+
+ decay=decay/((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)
+ decay=decay/((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+C Here only H->ZZ->(34)(56): diagram with (1<->3) accounted for
+C by adding a factor 2
+
+ if(int.eqv..false.)goto 39
+
+ decay=2*decay
+
+
+C Interference contribution (check if factor 2 is there !)
+
+ interf=2*((l1*l2)**2+(r1*r2)**2)*s(3,5)*s(4,6)
+
+ num=((s(3,4)-zmass**2)*(s(5,6)-zmass**2)*(s(4,5)-zmass**2)*
+ . (s(3,6)-zmass**2)+(zmass*zwidth)**4+
+ . (zmass*zwidth)**2*(2*zmass**4-zmass**2*
+ . (s(3,4)+s(5,6)+s(4,5)+s(3,6))+s(3,4)*s(3,6)+s(3,4)*s(4,5)+
+ . s(3,6)*s(5,6)+s(4,5)*s(5,6)-s(3,6)*s(4,5)-s(3,4)*s(5,6)))
+
+ den=((s(3,4)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(5,6)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(4,5)-zmass**2)**2+(zmass*zwidth)**2)*
+ . ((s(3,6)-zmass**2)**2+(zmass*zwidth)**2)
+
+
+ interf=interf*num/den
+
+ 39 continue
+
+ dec=gwsq**3*zmass**2*4d0*xw**2/(one-xw)*
+ . (decay+interf)/((shiggs-hmass**2)**2+(hmass*hwidth)**2)
+
+
+C In case of identical particles add 1/4 symmetry factor
+
+ if(int) dec=dec/4
+
+
+ Asq=(as/(3d0*pi))**2/vevsq
+ gg=0.5d0*V*Asq*shiggs**2
+
+c---calculate propagators
+ msq(0,0)=avegg*gg*dec
+
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_g.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_g.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/qqb_hww_g.f (revision 1338)
@@ -0,0 +1,64 @@
+ subroutine qqb_hww_g(p,msq)
+ implicit none
+c----NLO matrix element for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> W^- (e^-(p5)+nubar(p6))
+c + W^+ (nu(p3)+e^+(p4))+g(p7)
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),fac
+ double precision sh,ss,tt,uu,decay,s(mxpart,mxpart)
+ double precision aw,qqb,qg,gq,gg
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ aw=gwsq/(4d0*pi)
+ call dotem(7,p,s)
+ decay=gwsq**3*wmass**2*s(5,3)*s(6,4)
+
+c-- calculate propagators
+ ss=s(1,2)
+ tt=s(1,7)
+ uu=s(2,7)
+ sh=s(1,2)+s(1,7)+s(2,7)
+
+ gg=aw*as**3*4d0*V/9d0*xn*(sh**4+ss**4+tt**4+uu**4)
+ . /(ss*tt*uu*wmass**2)
+ qqb=aw*as**3*2d0*V/9d0*(tt**2+uu**2)/(ss*wmass**2)
+ gq=-aw*as**3*2d0*V/9d0*(ss**2+tt**2)/(uu*wmass**2)
+ qg=-aw*as**3*2d0*V/9d0*(ss**2+uu**2)/(tt*wmass**2)
+
+ fac=one/((s(3,4)-wmass**2)**2+(wmass*wwidth)**2)
+ fac=fac/((s(5,6)-wmass**2)**2+(wmass*wwidth)**2)
+ fac=fac/((sh-hmass**2)**2+(hmass*hwidth)**2)
+
+
+ gg=avegg*fac*gg*decay
+ gq=aveqg*fac*gq*decay
+ qg=aveqg*fac*qg*decay
+ qqb=aveqq*fac*qqb*decay
+
+c--set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ if ((k .eq. -j) .and. (j .ne. 0)) then
+ msq(j,k)=qqb
+ elseif ((j .eq. 0) .and. (k .ne. 0)) then
+ msq(j,k)=gq
+ elseif ((j .ne. 0) .and. (k .eq. 0)) then
+ msq(j,k)=qg
+ elseif ((k .eq. 0) .and. (j .eq. 0)) then
+ msq(j,k)=gg
+ endif
+ enddo
+ enddo
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Matrix/A5NLO.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Matrix/A5NLO.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Matrix/A5NLO.f (revision 1338)
@@ -0,0 +1,39 @@
+ subroutine A5NLO(j1,j2,j3,j4,j5,za,zb,A5LOm,A5NLOm)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ integer j1,j2,j3,j4,j5
+ double complex A51,A52,A5NLOm,A5LOm
+
+* As originally written, the functions A51, A52 correspond to
+* 0 --> q_R(1)+qb_L(3)+g_R(2)+ebar_L(4)+e_R(5)
+* with all RH couplings
+* However we want it in our
+* standard form
+* 0--> qb_R(1)+q_L(2)++e_L(3)+ebar_R(4)+g_L(5)
+* with all LH couplings
+
+* so we have made the changes
+*
+* 'q+g+qb-' (A51)
+* (1 ---> 2)
+* (2 ---> 5)
+* (3 ---> 1)
+* (4 ---> 4)
+* (5 ---> 3)
+
+* 'q+qb-g+' (A52)
+* (1 ---> 2)
+* (2 ---> 1)
+* (3 ---> 5)
+* (4 ---> 4)
+* (5 ---> 3)
+
+* and also exchanged za and zb.
+
+C--- corresponds to (1V.1) times minus i, with the (A51) change
+ A5LOm=-zb(j1,j4)**2/(zb(j2,j5)*zb(j5,j1)*zb(j4,j3))
+ A5NLOm=A51(j2,j5,j1,j4,j3,zb,za)+A52(j2,j1,j5,j4,j3,zb,za)/xnsq
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Inc/agq.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/agq.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/agq.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer a,b,g,q
+ parameter(a=-1,g=0,q=+1,b=2)
Index: dynnlo-v1.5-applgrid/src/Inc/ckm.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/ckm.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/ckm.f (revision 1338)
@@ -0,0 +1,3 @@
+ double precision Vsq(-nf:nf,-nf:nf),Vsum(-nf:nf)
+ common/CKM/Vsq,Vsum
+
Index: dynnlo-v1.5-applgrid/src/Inc/nlooprun.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/nlooprun.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/nlooprun.f (revision 1338)
@@ -0,0 +1,3 @@
+ integer nlooprun
+ common/nlooprun/nlooprun
+
Index: dynnlo-v1.5-applgrid/src/Inc/PR_twojet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/PR_twojet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/PR_twojet.f (revision 1338)
@@ -0,0 +1,23 @@
+c--- The variables R and P provide the Regular and Plus pieces associated
+c--- with radiation from leg 1 (Q1(a,b,c,is) and leg 2 (Q2(a,b,c,is)
+c--- In each case the parton labelling is Using the normal QM notation of putting
+c--- everything backward
+c--- emitted line after emission = a
+c--- emitter before emission = b
+c--- spectator = c
+c--- There is no label for he or she who is emitted.
+c--- Note that in general each piece will be composed of many different
+c--- dipole contributions
+
+c--- Additional label (1-8) in this array, to represent the partons
+c--- in the final state, according to the look-up parameters
+c--- that are also defined here
+
+c--- code is as follows:
+c--- g=0, q=1, a=-1, r=2, b=-2 --- "f" for final
+ integer gf_gf,qf_af,qf_qf,qf_rf,bf_rf,rf_bf,qf_gf,af_gf
+ parameter (gf_gf=1,qf_af=2,qf_qf=3,qf_rf=4,
+ . bf_rf=5,rf_bf=6,qf_gf=7,af_gf=8)
+ double precision
+ . S1(-1:1,-1:1,-1:1,8,0:2,3),S2(-1:1,-1:1,-1:1,8,0:2,3)
+ common/SP_twojet/S1,S2
Index: dynnlo-v1.5-applgrid/src/Inc/zprods_com.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/zprods_com.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/zprods_com.f (revision 1338)
@@ -0,0 +1,3 @@
+ double complex za(mxpart,mxpart),zb(mxpart,mxpart)
+ common/zprods/za,zb
+
Index: dynnlo-v1.5-applgrid/src/Inc/mb_msbar.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/mb_msbar.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/mb_msbar.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision mb_msbar
+ common/mb_msbar/mb_msbar
Index: dynnlo-v1.5-applgrid/src/Inc/jetlabel.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/jetlabel.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/jetlabel.f (revision 1338)
@@ -0,0 +1,5 @@
+ integer jets
+ character*2 jetlabel(mxpart)
+ common/parts_int/jets
+ common/parts_char/jetlabel
+
Index: dynnlo-v1.5-applgrid/src/Inc/qmass.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/qmass.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/qmass.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision md,mu,ms,mc,mb,mt
+ common/qmass/md,mu,ms,mc,mb,mt
Index: dynnlo-v1.5-applgrid/src/Inc/npart.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/npart.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/npart.f (revision 1338)
@@ -0,0 +1,3 @@
+c----Number of partons in final state
+ integer npart
+ common/npart/npart
Index: dynnlo-v1.5-applgrid/src/Inc/ewcharge.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/ewcharge.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/ewcharge.f (revision 1338)
@@ -0,0 +1,3 @@
+ double precision Q(-nf:nf),tau(-nf:nf)
+ common/ewcharge/Q,tau
+ save /ewcharge/
Index: dynnlo-v1.5-applgrid/src/Inc/scale.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/scale.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/scale.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision scale,musq
+ common/scale/scale,musq
Index: dynnlo-v1.5-applgrid/src/Inc/impsample.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/impsample.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/impsample.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical impsample
+ common/impsample/impsample
Index: dynnlo-v1.5-applgrid/src/Inc/mmsqv_cs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/mmsqv_cs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/mmsqv_cs.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision mmsqv_cs(0:2,2,2)
+ common/mmsqv_cs/mmsqv_cs
Index: dynnlo-v1.5-applgrid/src/Inc/susycoup.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/susycoup.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/susycoup.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision susycoup
+ common/susycoup/susycoup
Index: dynnlo-v1.5-applgrid/src/Inc/PR_new.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/PR_new.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/PR_new.f (revision 1338)
@@ -0,0 +1,14 @@
+c--- The variables R and P provide the Regular and Plus pieces associated
+c--- with radiation from leg 1 (Q1(a,b,c,is) and leg 2 (Q2(a,b,c,is)
+c--- In each case the parton labelling is Using the normal QM notation of putting
+c--- everything backward
+c--- emitted line after emission = a
+c--- emitter before emission = b
+c--- spectator = c
+c--- There is no label for he or she who is emitted.
+c--- Note that in general each piece will be composed of many different
+c--- dipole contributions
+
+ double precision
+ . Q1(-1:1,-1:1,-1:1,3),Q2(-1:1,-1:1,-1:1,3)
+ common/RP_new/Q1,Q2
Index: dynnlo-v1.5-applgrid/src/Inc/nvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/nvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/nvec.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer nvec
+ parameter(nvec=6)
Index: dynnlo-v1.5-applgrid/src/Inc/flags.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/flags.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/flags.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical Qflag,Gflag
+ common/flags/Qflag,Gflag
Index: dynnlo-v1.5-applgrid/src/Inc/dynamicscale.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/dynamicscale.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/dynamicscale.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical dynamicscale
+ common/dynamicscale/dynamicscale
Index: dynnlo-v1.5-applgrid/src/Inc/rescoeff.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/rescoeff.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/rescoeff.f (revision 1338)
@@ -0,0 +1,7 @@
+CC Resummation coefficients needed both in the counterterm and in
+CC the Hst term
+
+ double precision A1q,B1q,A2q,B2q,Kappa,beta0,C1qqdelta,Delta2qq,
+ & deltaqqqq,D0qqqq,D1qqqq
+ common/rescoeff/A1q,B1q,A2q,B2q,Kappa,beta0,C1qqdelta,Delta2qq,
+ & deltaqqqq,D0qqqq,D1qqqq
Index: dynnlo-v1.5-applgrid/src/Inc/realwt.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/realwt.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/realwt.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical realwt
+ common/realwt/realwt
Index: dynnlo-v1.5-applgrid/src/Inc/b0.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/b0.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/b0.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision b0
+ common/b0/b0
Index: dynnlo-v1.5-applgrid/src/Inc/xmin.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/xmin.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/xmin.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision xmin
+ common/xmin/xmin
Index: dynnlo-v1.5-applgrid/src/Inc/constants.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/constants.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/constants.f (revision 1338)
@@ -0,0 +1,44 @@
+ double precision pi,pisq,pisqo6
+ parameter(pi=3.14159265358979d0,pisq=pi*pi,pisqo6=pisq/6d0)
+ double precision twopi,fourpi,pion4,pion10,pisqm8,rt2onpi
+C
+ double precision Z3
+C
+ parameter(twopi=2d0*pi)
+ parameter(fourpi=4d0*pi)
+ parameter(pion4=7.853981633974483d-1)
+ parameter(pion10=pi/10d0)
+ parameter(pisqm8=pisq-8d0)
+ parameter(Z3=1.20205690315959429d0)
+c sqrt(2d0/pi)
+ parameter(rt2onpi=0.797884560802865d0)
+c-----------------------------------------------------
+ double precision cf,ca,xn,xnsq,xn4,v,tr,qu,qd,qe,aem,Von4,ninth
+ parameter(cf=4d0/3d0,ca=3d0,xn=3d0,xnsq=9d0,v=8d0,tr=0.5d0)
+ parameter(Von4=2d0,ninth=1d0/9d0,xn4=xnsq-4d0)
+ parameter(qu=2d0/3d0,qd=-1d0/3d0,qe=-1d0)
+ parameter(aem=1d0/137.035989d0)
+ double precision spinave,aveqq,aveqg,avegg
+ parameter(spinave=0.25d0)
+ parameter(aveqq=0.25d0/xnsq,aveqg=0.25d0/xn/v,avegg=0.25d0/v**2)
+c-----------------------------------------------------
+ double precision zip,half,one,two,three,four,eight
+ parameter(zip=0d0,half=0.5d0,one=1d0,two=2d0)
+ parameter(three=3d0,four=4d0,eight=8d0)
+ double precision rt2,twort2,fourrt2
+ parameter(rt2=1.4142135624d0,twort2=two*rt2,fourrt2=four*rt2)
+ double precision dfbGeV2,fbGeV2,pbGeV2,nbGeV2,overa
+ parameter(nbGeV2=0.389379d6)
+ parameter(pbGeV2=0.389379d9)
+ parameter(fbGeV2=0.389379d12)
+c----decifemtobarns
+ parameter(dfbGeV2=0.389379d13)
+ parameter(overa=pbGeV2/xn/256d0/pi)
+c-----------------------------------------------------
+ double complex im,impi,czip,cone
+ parameter(im=(0d0,1d0),impi=(0d0,3.14159265358979d0),
+ . czip=(0d0,0d0),cone=(1d0,0d0))
+c-----------------------------------------------------
+ integer nloop,nf,fn,mxpart
+ parameter(nf=5,fn=-5,nloop=2,mxpart=12)
+
Index: dynnlo-v1.5-applgrid/src/Inc/vegas_common.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/vegas_common.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/vegas_common.f (revision 1338)
@@ -0,0 +1,4 @@
+ include 'mxdim.f'
+ integer ndim,ncall,itmx,nprn
+ double precision xl(mxdim),xu(mxdim),acc
+ common/bveg1/xl,xu,acc,ndim,ncall,itmx,nprn
Index: dynnlo-v1.5-applgrid/src/Inc/process.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/process.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/process.f (revision 1338)
@@ -0,0 +1,2 @@
+ character*6 case
+ common/process/case
Index: dynnlo-v1.5-applgrid/src/Inc/mxdim.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/mxdim.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/mxdim.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer mxdim
+ parameter(mxdim=22)
Index: dynnlo-v1.5-applgrid/src/Inc/zerowidth.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/zerowidth.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/zerowidth.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical zerowidth
+ common/zerowidth/zerowidth
Index: dynnlo-v1.5-applgrid/src/Inc/codeversion.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/codeversion.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/codeversion.f (revision 1338)
@@ -0,0 +1,2 @@
+ character*6 codeversion
+ common/versionnumber/codeversion
Index: dynnlo-v1.5-applgrid/src/Inc/msq_struc.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/msq_struc.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/msq_struc.f (revision 1338)
@@ -0,0 +1,17 @@
+c--- contains the common block and definitions necessary to
+c--- separate matrix elements into their constituent parts - for
+c--- example, by species of parton in the final state or by
+c--- colour orderings (or both)
+ double precision msq_struc(8,-nf:nf,-nf:nf),
+ . msq_strucv(8,-nf:nf,-nf:nf)
+ integer igg_ab,igg_ba,igg_sym,iqq_a,iqq_b,iqq_i,
+ . igggg_a,igggg_b,igggg_c,iqr
+ common/msq_struc/msq_struc,msq_strucv
+ parameter(igg_ab=4,igg_ba=5,igg_sym=6)
+c--- Note that the 4-quark and 4-gluon pieces are never needed simultaneously,
+c--- so we can reuse the same indices to save memory
+ parameter(iqq_a=1,iqq_b=2,iqq_i=3)
+ parameter(igggg_a=1,igggg_b=2,igggg_c=3)
+c--- One extra parameter needed for non-identical quark pieces
+ parameter(iqr=7)
+
Index: dynnlo-v1.5-applgrid/src/Inc/anomcoup.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/anomcoup.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/anomcoup.f (revision 1338)
@@ -0,0 +1,6 @@
+ double precision delg1_z,delg1_g,lambda_g,lambda_z,
+ . delk_g,delk_z,tevscale
+ double precision xdelg1_z,xdelg1_g,xlambda_g,xlambda_z,
+ . xdelk_g,xdelk_z
+ common/anomcoup/delg1_z,delg1_g,lambda_g,lambda_z,delk_g,delk_z,
+ . tevscale
Index: dynnlo-v1.5-applgrid/src/Inc/ptilde.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/ptilde.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/ptilde.f (revision 1338)
@@ -0,0 +1,6 @@
+ integer maxd,ndmax
+C----maxd=The maximum possible number of dipoles
+C----ndmax=The maximum number of dipoles for the problem at hand
+ parameter (maxd=40)
+ double precision ptilde(maxd,mxpart,4),ptildejet(0:maxd,mxpart,4)
+ common/ptildes/ptilde,ptildejet,ndmax
Index: dynnlo-v1.5-applgrid/src/Inc/zcouple.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/zcouple.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/zcouple.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision l(nf),r(nf),le,ln,re,rn,sin2w,q1,l1,r1,q2,l2,r2
+ common/zcouple/l,r,q1,l1,r1,q2,l2,r2,le,ln,re,rn,sin2w
Index: dynnlo-v1.5-applgrid/src/Inc/realonly.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/realonly.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/realonly.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical realonly
+ common/realonly/realonly
Index: dynnlo-v1.5-applgrid/src/Inc/heavyflav.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/heavyflav.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/heavyflav.f (revision 1338)
@@ -0,0 +1,4 @@
+c--- Common block that identifies the heavy flavour being used
+c--- in the current process
+ integer flav
+ common/heavyflav/flav
Index: dynnlo-v1.5-applgrid/src/Inc/virtonly.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/virtonly.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/virtonly.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical virtonly
+ common/virtonly/virtonly
Index: dynnlo-v1.5-applgrid/src/Inc/PR_stop.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/PR_stop.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/PR_stop.f (revision 1338)
@@ -0,0 +1,18 @@
+c--- The variables R and P provide the Regular and Plus pieces associated
+c--- with radiation from leg 1 (B1(a,b,c,is) and leg 2 (B2(a,b,c,is)
+c--- In each case the parton labelling is Using the normal QM notation of putting
+c--- everything backward
+c--- emitted line after emission = a
+c--- emitter before emission = b
+c--- spectator = c
+c--- There is no label for he or she who is emitted.
+c--- Note that in general each piece will be composed of many different
+c--- dipole contributions
+
+c--- NOTE: this is just an extension to PR_new which includes the
+c--- possibility of distinguishing a heavy quark from a light quark
+c--- (b=2, rather than the usual q=1)
+
+ double precision
+ . B1(-1:2,-1:2,-1:2,3),B2(-1:2,-1:2,-1:2,3)
+ common/RP_stop/B1,B2
Index: dynnlo-v1.5-applgrid/src/Inc/histo.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/histo.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/histo.f (revision 1338)
@@ -0,0 +1,9 @@
+ DOUBLE PRECISION HIST(150,100),XHIS(150,100),HDEL(150),HMIN(150)
+ &,HMAX(150),HAVG(150),HINT(150),HSIG(150)
+ COMMON/HISTOR/HIST,XHIS,HDEL,HMIN,HMAX,HAVG,HINT,HSIG
+
+ CHARACTER TITLE*100,BOOK*3
+ COMMON/HISTOC/BOOK(150),TITLE(150)
+ INTEGER NBIN(150),IHIS(150,100),IUSCORE(150),IOSCORE(150),
+ & IENT(150),NHIST
+ COMMON/HISTOI/NBIN,IHIS,IUSCORE,IOSCORE,IENT,NHIST
Index: dynnlo-v1.5-applgrid/src/Inc/qqgg.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/qqgg.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/qqgg.f (revision 1338)
@@ -0,0 +1,4 @@
+ integer qq,qg,gq,gg
+ parameter (qq=1,qg=2,gq=3,gg=4)
+ logical qqproc,qgproc,gqproc,ggproc
+ common/dipproc/qqproc,qgproc,gqproc,ggproc
Index: dynnlo-v1.5-applgrid/src/Inc/APPLinclude.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/APPLinclude.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/APPLinclude.f (revision 1338)
@@ -0,0 +1,29 @@
+ logical creategrid
+ integer nSubProcess
+ common/grid/creategrid,nSubProcess
+
+ double precision weightb( -nf:nf, -nf:nf)
+ double precision weightv( -nf:nf, -nf:nf)
+ double precision weightv1( -nf:nf, -nf:nf)
+ double precision weightv2( -nf:nf, -nf:nf)
+ double precision weightvv( -nf:nf, -nf:nf)
+ double precision weightvv1( -nf:nf, -nf:nf)
+ double precision weightvv2( -nf:nf, -nf:nf)
+ double precision weightvv12( -nf:nf, -nf:nf)
+ double precision weightr ( 0:maxd , -nf:nf, -nf:nf)
+ double precision weightfactor
+ common/gridweight/
+ . weightfactor,
+ . weightb,
+ . weightv,weightv1,weightv2,
+ . weightvv,weightvv1,weightvv2,
+ . weightvv12,
+ . weightr
+
+ integer contrib,dipole
+ double precision ag_xx1,ag_xx2,ag_x1z,ag_x2z,ag_scale,refwt,refwt2
+ common/gridevent/
+ . ag_xx1,ag_xx2,ag_x1z,ag_x2z,
+ . ag_scale,refwt,refwt2,
+ . contrib,dipole
+
Index: dynnlo-v1.5-applgrid/src/Inc/gridinfo.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/gridinfo.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/gridinfo.f (revision 1338)
@@ -0,0 +1,5 @@
+ logical readin,writeout
+ character*72 ingridfile,outgridfile
+ common/gridinfo_logic/readin,writeout
+ common/gridinfo_char/ingridfile,outgridfile
+
Index: dynnlo-v1.5-applgrid/src/Inc/pdlabel.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/pdlabel.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/pdlabel.f (revision 1338)
@@ -0,0 +1,2 @@
+ character*7 pdlabel
+ common/pdlabel/pdlabel
Index: dynnlo-v1.5-applgrid/src/Inc/scheme.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/scheme.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/scheme.f (revision 1338)
@@ -0,0 +1,2 @@
+ character*4 scheme
+ common/scheme/scheme
Index: dynnlo-v1.5-applgrid/src/Inc/PDFerrors.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/PDFerrors.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/PDFerrors.f (revision 1338)
@@ -0,0 +1,7 @@
+ logical PDFerrors
+ integer maxPDFsets,currentPDF
+c--- 40 is my choice for the maximum number of PDF error sets
+c--- 50 is my choice for the maximum number of dipoles
+ double precision PDFxsec(0:40),PDFxsec_nd(0:40,0:50),
+ . PDFwgt(0:40)
+ common/PDFerrors/PDFerrors,maxPDFsets,PDFxsec,PDFwgt
Index: dynnlo-v1.5-applgrid/src/Inc/hmass.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/hmass.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/hmass.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision hmass,hwidth
+ common/hmass/hmass,hwidth
Index: dynnlo-v1.5-applgrid/src/Inc/alfacut.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/alfacut.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/alfacut.f (revision 1338)
@@ -0,0 +1,3 @@
+ double precision aii,aif,afi,aff,alfa
+ common/alfacut/aii,aif,afi,aff
+ parameter(alfa=1d0)
Index: dynnlo-v1.5-applgrid/src/Inc/clustering.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/clustering.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/clustering.f (revision 1338)
@@ -0,0 +1,4 @@
+ logical clustering,inclusive
+ character*4 algorithm
+ common/clustering/clustering,inclusive
+ common/algorithm/algorithm
Index: dynnlo-v1.5-applgrid/src/Inc/qcdcouple.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/qcdcouple.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/qcdcouple.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision gsq,as,ason2pi,ason4pi
+ common/qcdcouple/gsq,as,ason2pi,ason4pi
Index: dynnlo-v1.5-applgrid/src/Inc/PR_cs_new.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/PR_cs_new.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/PR_cs_new.f (revision 1338)
@@ -0,0 +1,14 @@
+c--- The variables R and P provide the Regular and Plus pieces associated
+c--- with radiation from leg 1 (Q1(a,b,c,is) and leg 2 (Q2(a,b,c,is)
+c--- In each case the parton labelling is using the normal QM notation
+c--- of putting everything backwards
+c--- emitted line after emission = a
+c--- emitter before emission = b
+c--- spectator = c
+c--- There is no label for he or she who is emitted.
+c--- Note that in general each piece will be composed of many different
+c--- dipole contributions
+
+ double precision
+ . R1(-1:1,-1:1,-1:1,0:2,3),R2(-1:1,-1:1,-1:1,0:2,3)
+ common/RP_col_new/R1,R2
Index: dynnlo-v1.5-applgrid/src/Inc/workdir.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/workdir.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/workdir.f (revision 1338)
@@ -0,0 +1,2 @@
+ character*72 workdir
+ common/workdir/workdir
Index: dynnlo-v1.5-applgrid/src/Inc/epinv.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/epinv.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/epinv.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision epinv
+ common/epinv/epinv
Index: dynnlo-v1.5-applgrid/src/Inc/removebr.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/removebr.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/removebr.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical removebr
+ common/removebr/removebr
Index: dynnlo-v1.5-applgrid/src/Inc/ewcouple.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/ewcouple.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/ewcouple.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision Gf,gw,xw,gwsq,esq,vevsq
+ common/ewcouple/Gf,gw,xw,gwsq,esq,vevsq
Index: dynnlo-v1.5-applgrid/src/Inc/stdhep.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/stdhep.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/stdhep.f (revision 1338)
@@ -0,0 +1,9 @@
+************************************************************************
+* Implementation of STDHEP v4.09 common block *
+************************************************************************
+ integer nmxhep
+ parameter (nmxhep=4000)
+ integer nevhep,nhep,isthep,idhep,jmohep,jdahep
+ double precision phep,vhep
+ common /hepevt/ nevhep, nhep, isthep(nmxhep), idhep(nmxhep),
+ &jmohep(2,nmxhep), jdahep(2,nmxhep), phep(5,nmxhep), vhep(4,nmxhep)
Index: dynnlo-v1.5-applgrid/src/Inc/noglue.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/noglue.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/noglue.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical noglue,ggonly,gqonly
+ common/noglue/noglue,ggonly,gqonly
Index: dynnlo-v1.5-applgrid/src/Inc/pdfiset.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/pdfiset.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/pdfiset.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer iset
+ common/pdfiset/iset
Index: dynnlo-v1.5-applgrid/src/Inc/wts_bypart.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/wts_bypart.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/wts_bypart.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision wt_gg,wt_gq,wt_qq,wt_qqb
+ common/wts_bypart/wt_gg,wt_gq,wt_qq,wt_qqb
Index: dynnlo-v1.5-applgrid/src/Inc/lc.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/lc.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/lc.f (revision 1338)
@@ -0,0 +1,12 @@
+ integer colourchoice
+c--- 'colourchoice' allows calculation by colour structure
+c--- For Gflag=.true. [QQGG, QQGGG processes]
+c--- 1) Only leading colour ( NCF . N )
+c--- 2) Only sub-leading ( NCF . 1/N )
+c--- 3) Only sub-sub-leading ( NCF . 1/N**3 ) [QQGGG only]
+c--- 0) The total
+c--- For Qflag=.true. [QQBQQB process]
+c--- 1) Only leading colour ( NCF . 1 )
+c--- 2) Only sub-leading ( NCF . 1/N ) [Identical quarks only]
+c--- 0) The total
+ common/ColC/colourchoice
Index: dynnlo-v1.5-applgrid/src/Inc/calls.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/calls.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/calls.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer calls
+ common/calls/calls
Index: dynnlo-v1.5-applgrid/src/Inc/lhapdf.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/lhapdf.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/lhapdf.f (revision 1338)
@@ -0,0 +1,4 @@
+ character*30 PDFname
+ integer PDFmember
+ common/lhapdf_char/PDFname
+ common/lhapdf_int/PDFmember
Index: dynnlo-v1.5-applgrid/src/Inc/maxwt.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/maxwt.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/maxwt.f (revision 1338)
@@ -0,0 +1,10 @@
+c --- Common block for keeping track of weights, used
+c --- if unweighting is selected :
+ double precision wtmax,newwt
+ logical evtgen
+ logical unweight
+ logical skipnt
+ common/maxwt/wtmax,newwt,evtgen,skipnt,unweight
+
+c --- Useful local variables where weights are being checked :
+ double precision wtabs
Index: dynnlo-v1.5-applgrid/src/Inc/virtexp.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/virtexp.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/virtexp.f (revision 1338)
@@ -0,0 +1,9 @@
+ double precision
+ . ro,omro,xm,xm2,U,T,f1,f2,f3,INVG,
+ . xlm,vlpm,vlsm,vltm,vlwm,vlbl,vdmp,vdmb,
+ . vdt,vdw,xlf,rmuom2,tbar,ubar,b,xlp,t1,t2,brackt,brackw,bracks
+ common/virtexp/
+ . ro,omro,xm,xm2,U,T,f1,f2,f3,INVG,
+ . xlm,vlpm,vlsm,vltm,vlwm,vlbl,vdmp,vdmb,
+ . vdt,vdw,xlf,rmuom2,tbar,ubar,b,xlp,t1,t2,brackt,brackw,bracks
+
Index: dynnlo-v1.5-applgrid/src/Inc/epinv2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/epinv2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/epinv2.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision epinv2
+ common/epinv2/epinv2
Index: dynnlo-v1.5-applgrid/src/Inc/efficiency.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/efficiency.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/efficiency.f (revision 1338)
@@ -0,0 +1,13 @@
+c--- common block for the calculation of cut efficiencies
+c
+c--- ntotshot : total number of shots in the run
+c--- njetzero : number of shots that failed the jet cuts
+c--- ncutzero : number of shots that passed the jet cuts
+c--- but then failed the process-specific cuts
+c--- ntotzero : total number of events that automatically
+c--- returned zero weight. Should be approximately
+c--- njetzero+ncutzero, with a small extra number
+c--- (dependent on 'cutoff') due to 'masscuts' and 'smalls'
+
+ integer njetzero,ncutzero,ntotzero,ntotshot
+ common/efficiency/njetzero,ncutzero,ntotzero,ntotshot
Index: dynnlo-v1.5-applgrid/src/Inc/verbose.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/verbose.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/verbose.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical verbose
+ common/verbose/verbose
Index: dynnlo-v1.5-applgrid/src/Inc/nflav.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/nflav.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/nflav.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer nflav
+ common/nflav/nflav
Index: dynnlo-v1.5-applgrid/src/Inc/vsn.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/vsn.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/vsn.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision verysmallnumber
+ parameter(verysmallnumber=1d-9)
Index: dynnlo-v1.5-applgrid/src/Inc/debug1.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/debug1.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/debug1.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical debug1
+ common/debug1/debug1
Index: dynnlo-v1.5-applgrid/src/Inc/bbproc.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/bbproc.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/bbproc.f (revision 1338)
@@ -0,0 +1,6 @@
+************************************************************************
+* bbproc should be set to TRUE if the process in question involves *
+* two b quarks that should be treated using special cuts *
+************************************************************************
+ logical bbproc
+ common/bbproc/bbproc
Index: dynnlo-v1.5-applgrid/src/Inc/sprods_com.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/sprods_com.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/sprods_com.f (revision 1338)
@@ -0,0 +1,3 @@
+ double precision s(mxpart,mxpart)
+ common/sprods/s
+
Index: dynnlo-v1.5-applgrid/src/Inc/zprods_decl.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/zprods_decl.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/zprods_decl.f (revision 1338)
@@ -0,0 +1,3 @@
+ double complex za(mxpart,mxpart),zb(mxpart,mxpart)
+
+
Index: dynnlo-v1.5-applgrid/src/Inc/nn.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/nn.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/nn.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer ntrue,nfalse,ncount
+ common/nn/ntrue,nfalse
Index: dynnlo-v1.5-applgrid/src/Inc/msqv_cs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/msqv_cs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/msqv_cs.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision msqv_cs(0:2,-nf:nf,-nf:nf)
+ common/msqv_cs/msqv_cs
Index: dynnlo-v1.5-applgrid/src/Inc/eventbuffer.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/eventbuffer.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/eventbuffer.f (revision 1338)
@@ -0,0 +1,13 @@
+c --- Author: D. Waters, September 2002
+c --- Event buffer, used during unweighting to store
+c --- the unweighted events generated during a single
+c --- VEGAS pass.
+ integer buffersize
+ parameter(buffersize=10000)
+ integer numstored,numused
+ double precision eventbuffer(buffersize,mxpart,4)
+ double precision wtbuffer(buffersize)
+ integer indexlist(buffersize)
+ integer pflavbuffer(buffersize),pbarflavbuffer(buffersize)
+ common/eventlist/numstored,numused,eventbuffer,wtbuffer,indexlist,
+ + pflavbuffer,pbarflavbuffer
Index: dynnlo-v1.5-applgrid/src/Inc/debr.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/debr.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/debr.f (revision 1338)
@@ -0,0 +1,17 @@
+ double complex HQ1H,HQ2H,HQ3H,HQPH,HP1H,HP2H,HP3H,HPQH,H1QH,H2QH,
+ . H3QH,H1PH,H2PH,H3PH,H12H,H13H,H23H,H21H,H31H,H32H,H1LH,H2LH,H3LH,
+ . HL1H,HL2H,HL3H,H1L_H,H2L_H,H3L_H,HL_1H,HL_2H,HL_3H,HL_QH,HL_PH,
+ . HQL_H,HPL_H,
+ . TQ1T,TQ2T,TQ3T,TQPT,TP1T,TP2T,TP3T,TPQT,T1QT,T2QT,T3QT,T1PT,T2PT,
+ . T3PT,T12T,T13T,T23T,T21T,T31T,T32T,T1L_T,T2L_T,T3L_T,T1LT,T2LT,
+ . T3LT,TL_1T,TL_2T,TL_3T,TL_QT,TL_PT,TLQT,TLPT,TQLT,TPLT
+ common/debr1/HQ1H,HQ2H,HQ3H,HQPH,HP1H,HP2H,HP3H,HPQH,H1QH,H2QH,
+ . H3QH,H1PH,H2PH,H3PH,H12H,H13H,H23H,H21H,H31H,H32H,H1LH,H2LH,H3LH,
+ . HL1H,HL2H,HL3H,H1L_H,H2L_H,H3L_H,HL_1H,HL_2H,HL_3H,HL_QH,HL_PH,
+ . HQL_H,HPL_H,
+ . TQ1T,TQ2T,TQ3T,TQPT,TP1T,TP2T,TP3T,TPQT,T1QT,T2QT,T3QT,T1PT,T2PT,
+ . T3PT,T12T,T13T,T23T,T21T,T31T,T32T,T1L_T,T2L_T,T3L_T,T1LT,T2LT,
+ . T3LT,TL_1T,TL_2T,TL_3T,TL_QT,TL_PT,TLQT,TLPT,TQLT,TPLT
+ double precision S12,S13,S23,SQ1,SQ2,SQ3,SP1,SP2,SP3
+ common/debr2/S12,S13,S23,SQ1,SQ2,SQ3,SP1,SP2,SP3
+ integer q,k1,k2,k3,p,l,l_
Index: dynnlo-v1.5-applgrid/src/Inc/nwz.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/nwz.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/nwz.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer nwz
+ common/nwz/nwz
Index: dynnlo-v1.5-applgrid/src/Inc/nyy.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/nyy.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/nyy.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer nyy
+ parameter(nyy=101)
Index: dynnlo-v1.5-applgrid/src/Inc/nvector.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/nvector.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/nvector.f (revision 1338)
@@ -0,0 +1,2 @@
+ integer nvector
+ parameter(nvector=6)
Index: dynnlo-v1.5-applgrid/src/Inc/phi.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/phi.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/phi.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision phi
+ common/phi/phi
Index: dynnlo-v1.5-applgrid/src/Inc/basic.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/basic.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/basic.f (revision 1338)
@@ -0,0 +1,4 @@
+ double complex Lla(4,4,4,4),Lal(4,4,4,4)
+ double complex Rla(4,4,4,4),Ral(4,4,4,4)
+ common/basic/Lla,Lal,Rla,Ral
+
Index: dynnlo-v1.5-applgrid/src/Inc/jetcuts.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/jetcuts.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/jetcuts.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision ptjetmin,etajetmin,etajetmax,ptbjetmin,etabjetmax
+ common/jetcuts/ptjetmin,etajetmin,etajetmax,ptbjetmin,etabjetmax
Index: dynnlo-v1.5-applgrid/src/Inc/PR_h2j.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/PR_h2j.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/PR_h2j.f (revision 1338)
@@ -0,0 +1,28 @@
+c--- The variables R and P provide the Regular and Plus pieces associated
+c--- with radiation from leg 1 (H1(a,b,c,is) and leg 2 (H2(a,b,c,is)
+c--- In each case the parton labelling uses the normal QM notation of
+c--- putting everything backward
+c--- emitted line after emission = a
+c--- emitter before emission = b
+c--- spectator = c
+c--- There is no label for he or she who is emitted.
+c--- Note that in general each piece will be composed of many different
+c--- dipole contributions
+
+c--- NOTE: this is just an extension to PR_new which enables the
+c--- division of matrix elements into colour structures in the
+c--- same way as 'msq_struc.f'
+
+c integer igg_ab,igg_ba,igg_sym,iqq_a,iqq_b,iqq_i,
+c . igggg_a,igggg_b,igggg_c,iqr
+c parameter(igg_ab=4,igg_ba=5,igg_sym=6)
+c--- Note that the 4-quark and 4-gluon pieces are never needed simultaneously,
+c--- so we can reuse the same indices to save memory
+c parameter(iqq_a=1,iqq_b=2,iqq_i=3)
+c parameter(igggg_a=1,igggg_b=2,igggg_c=3)
+c--- One extra parameter needed for non-identical quark pieces
+c parameter(iqr=7)
+
+ double precision
+ . H1(-1:1,-1:1,-1:1,8,3),H2(-1:1,-1:1,-1:1,8,3)
+ common/RP_h2j/H1,H2
Index: dynnlo-v1.5-applgrid/src/Inc/new_pspace.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/new_pspace.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/new_pspace.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical new_pspace
+ common/new_pspace/new_pspace
Index: dynnlo-v1.5-applgrid/src/Inc/dipolescale.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/dipolescale.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/dipolescale.f (revision 1338)
@@ -0,0 +1,3 @@
+c--- contains the dynamic scale for each dipole
+ double precision dipscale(0:40)
+ common/dipolescale/dipscale
Index: dynnlo-v1.5-applgrid/src/Inc/msq_cs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/msq_cs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/msq_cs.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision msq_cs(0:2,-nf:nf,-nf:nf)
+ common/msq_cs/msq_cs
Index: dynnlo-v1.5-applgrid/src/Inc/cutoff.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/cutoff.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/cutoff.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision cutoff
+ common/cutoff/cutoff
Index: dynnlo-v1.5-applgrid/src/Inc/debug.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/debug.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/debug.f (revision 1338)
@@ -0,0 +1,2 @@
+ logical debug
+ common/debug/debug
Index: dynnlo-v1.5-applgrid/src/Inc/masses.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/masses.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/masses.f (revision 1338)
@@ -0,0 +1,42 @@
+c double precision md,mu,ms,mc,mb,mt
+c common/qmass1/md,mu,ms,mc,mb,mt
+
+c double precision mel,mmu,mtau
+c common/lmass/mel,mmu,mtau
+
+c double precision hmass,hwidth
+c common/hmass/hmass,hwidth
+
+c double precision wmass,wwidth
+c common/wmass/wmass,wwidth
+
+c double precision zmass,zwidth
+c common/zmass/zmass,zwidth
+
+c double precision twidth
+c common/twidth/twidth
+
+c double precision tauwidth
+c common/tauwidth/tauwidth
+
+c double precision mtausq,mcsq,mbsq
+c common/qmassq/mtausq,mcsq,mbsq
+
+ double precision
+ . md,mu,ms,mc,mb,mt,
+ . mel,mmu,mtau,
+ . hmass,hwidth,
+ . wmass,wwidth,
+ . zmass,zwidth,
+ . twidth,
+ . tauwidth,
+ . mtausq,mcsq,mbsq
+ common/masses/
+ . md,mu,ms,mc,mb,mt,
+ . mel,mmu,mtau,
+ . hmass,hwidth,
+ . wmass,wwidth,
+ . zmass,zwidth,
+ . twidth,
+ . tauwidth,
+ . mtausq,mcsq,mbsq
Index: dynnlo-v1.5-applgrid/src/Inc/ckm1.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/ckm1.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/ckm1.f (revision 1338)
@@ -0,0 +1,5 @@
+ double precision VV(-nf:nf,-nf:nf),gl(-nf:nf,-nf:nf),
+ & gr(-nf:nf,-nf:nf),e(-nf:nf,-nf:nf),fl,fr
+ double precision glsq(-nf:nf,-nf:nf),grsq(-nf:nf,-nf:nf),
+ & flsq,frsq
+ common/CKM1/VV,gl,gr,fl,fr,e,glsq,grsq,flsq,frsq
Index: dynnlo-v1.5-applgrid/src/Inc/ewinput.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/ewinput.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/ewinput.f (revision 1338)
@@ -0,0 +1,4 @@
+ double precision Gf_inp,aemmz_inp,xw_inp,wmass_inp,zmass_inp
+ integer ewscheme
+ common/ewinput/Gf_inp,aemmz_inp,xw_inp,wmass_inp,zmass_inp
+ common/ewscheme/ewscheme
Index: dynnlo-v1.5-applgrid/src/Inc/nplot.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/nplot.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/nplot.f (revision 1338)
@@ -0,0 +1,5 @@
+ integer nplot
+ parameter(nplot=150)
+ character*3 linlog(nplot)
+ character*8 titlearray(nplot)
+ common/topd/titlearray,linlog
Index: dynnlo-v1.5-applgrid/src/Inc/limits.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/limits.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/limits.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision wsqmin,wsqmax
+ common/limits/wsqmin,wsqmax
Index: dynnlo-v1.5-applgrid/src/Inc/facscale.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/facscale.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/facscale.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision facscale
+ common/facscale/facscale
Index: dynnlo-v1.5-applgrid/src/Inc/flavours.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/flavours.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/flavours.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision ppbar_flavours(-nf:nf,-nf:nf)
+ common/flavours/ppbar_flavours
Index: dynnlo-v1.5-applgrid/src/Inc/mmsq_cs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/mmsq_cs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/mmsq_cs.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision mmsq_cs(0:2,2,2)
+ common/mmsq_cs/mmsq_cs
Index: dynnlo-v1.5-applgrid/src/Inc/phasemin.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Inc/phasemin.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Inc/phasemin.f (revision 1338)
@@ -0,0 +1,3 @@
+ double precision taumin,xmin
+ common/taumin/taumin
+ common/xmin/xmin
Index: dynnlo-v1.5-applgrid/src/Need/mcfm_vegasNEW.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/mcfm_vegasNEW.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/mcfm_vegasNEW.f (revision 1338)
@@ -0,0 +1,231 @@
+CC Modified to do full NNLO calculation
+C
+C lowintHst is lowest order* Hst
+C
+C realvirt is real (V + 2 partons) + virtual (V + 1 parton)
+
+C Setting order=1 the calculation is done at NLO
+
+ subroutine mcfm_vegas(myinit,myitmx,myncall,mybin,xinteg,xerr)
+************************************************************************
+* *
+* This routine should perform the sweeps of vegasnr *
+* *
+* Input parameters: *
+* myinit : the vegasnr routine entry point *
+* myitmx : the number of vegasnr sweeps *
+* myncall : the number of iterations per sweep *
+* bin : whether or not the results should be histogrammed *
+* *
+* Returned variables: *
+* xinteg : value of integration *
+* xerr : integration error
+* *
+************************************************************************
+ implicit none
+ include 'gridinfo.f'
+ include 'realwt.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'vegas_common.f'
+ include 'PDFerrors.f'
+ integer myitmx,myncall,myinit,i,j,k,nproc
+ logical mybin,bin
+ double precision sig,sd,chi,sigr,sdr,sigdk,sddk,chidk,
+ . xreal,xreal2,xinteg,xerr,adjust,myscale,myfacscale
+ character*4 part,mypart
+ common/nproc/nproc
+ common/part/part
+ common/mypart/mypart
+ common/bin/bin
+ common/xreal/xreal,xreal2
+ common/reset/reset,scalereset
+ double precision lowint,virtint,realint
+ double precision region(2*mxdim),lord_bypart(-1:1,-1:1)
+C
+ integer order
+ common/nnlo/order
+ double precision realvirt,lowintHst
+C
+ logical first,reset,scalereset,myreadin
+ common/bypart/lord_bypart
+ external lowint,virtint,realint
+C
+ external realvirt,lowintHst
+C
+ data first/.true./
+ save first
+
+CC HERE CHOOSE ORDER OF CALCULATION
+
+ order=2
+
+CC
+
+
+c--- Initialize all integration results to zero, so that the
+c--- total of virt and real may be combined at the end for 'tota'
+ sig=0d0
+ sigr=0d0
+ sigdk=0d0
+ sd=0d0
+ sdr=0d0
+ sddk=0d0
+ xreal=0d0
+ xreal2=0d0
+
+ do j=-1,1
+ do k=-1,1
+ lord_bypart(j,k)=0d0
+ enddo
+ enddo
+ if (PDFerrors) then
+ do i=0,maxPDFsets
+ PDFxsec(i)=0d0
+ enddo
+ endif
+
+c--- Controls behaviour of gen_njets: need to reset phase-space
+c--- boundaries when going from virt to real (using tota)
+c--- need to reset scale also, for special scalestart values
+ reset=.false.
+ scalereset=.false.
+
+c--- Put the vegasnr parameters in the common block
+ itmx=myitmx
+ ncall=myncall
+ bin=mybin
+
+c--- Basic lowest-order integration
+ if (part .eq. 'lord') then
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,lowint,myinit,myncall,myitmx,
+ . 0,sig,sd,chi)
+ endif
+
+c--- Store value of part in mypart, which will be retained;
+c--- also store value of scale in myscale, which will be retained;
+c--- part and scale can be changed to make sure that the tota option works.
+ mypart=part
+ myscale=scale
+ myfacscale=facscale
+
+c--- If we're doing the tota integration, then set up the grid info
+ if (mypart .eq. 'tota') then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for virtual grid
+ ingridfile='dvegas_virt_'//ingridfile
+ myreadin=readin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ outgridfile='dvegas_virt.grid'
+ else
+ readin=.true.
+ writeout=.false.
+ ingridfile='dvegas_virt.grid'
+ endif
+ endif
+ endif
+
+CC Virtint must contain lowest order * Hst factor
+
+c--- Virtual integration should have one extra dimension
+c--- (added and then taken away)
+ if ((mypart .eq. 'virt') .or. (mypart .eq. 'tota')) then
+ part='virt'
+ reset=.true.
+ scalereset=.true.
+ ndim=ndim-1
+C ndim=ndim+1
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,lowintHst,myinit,myncall,myitmx,
+ . 0,sig,sd,chi)
+C ndim=ndim-1
+ ndim=ndim+1
+ endif
+
+CC Prepare the grid also for real only
+
+c--- If we're doing the tota integration, then set up the grid info
+ if ((mypart .eq. 'tota') .or. (mypart .eq. 'real')) then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for real grid
+ ingridfile(8:11)='real'
+ readin=myreadin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ outgridfile='dvegas_real.grid'
+ else
+ readin=.true.
+ writeout=.false.
+ ingridfile='dvegas_real.grid'
+ endif
+ endif
+ endif
+
+CC Here real and virtual together
+
+
+c--- Real integration should have three extra dimensions
+c--- 'realwt' is a special option that in general should be false
+c--- ('realwt' true samples the integral according to the
+c--- unsubtracted real emission weight)
+ if ((mypart .eq. 'real').or.(mypart.eq.'tota')) then
+ part='real'
+ scalereset=.true.
+ ndim=ndim+3
+ if (realwt) then
+ nprn=0
+ endif
+ xreal=0d0
+ xreal2=0d0
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,realvirt,myinit,myncall,myitmx,
+ . 0,sigr,sdr,chi)
+ ndim=ndim-3
+ write(6,*)
+ ncall=myncall
+ if (realwt) then
+ sigr=xreal
+ sdr=dsqrt(abs((xreal2-xreal**2)/dfloat(ncall)))
+ write(6,*) itmx,' iterations of ',ncall,' calls'
+ write(6,*) 'Value of subtracted integral',sigr
+ write(6,*) 'Error on subtracted integral',sdr
+ endif
+ endif
+
+
+c--- calculate integration variables to be returned
+ xinteg=sig+sigr+sigdk
+ xerr=dsqrt(sd**2+sdr**2+sddk**2)
+
+c--- return part and scale to their real values
+ part=mypart
+ scale=myscale
+ first=.false.
+
+ return
+ end
+
+
+ subroutine boundregion(idim,region)
+c--- Initializes integration region [0,1] for each variable
+c--- in the idim-dimensional integration range
+ implicit none
+ include 'mxdim.f'
+ integer i,idim
+ double precision region(2*mxdim)
+
+ do i=1,idim
+ region(i)=0d0
+ region(i+idim)=1d0
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/higgsp.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/higgsp.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/higgsp.f (revision 1338)
@@ -0,0 +1,62 @@
+ subroutine higgsp(bbbr,gamgambr,wwbr,zzbr)
+C--returns Higgs branching ratios as calculated by
+C interpolating the Spira tables br.sm1 br.sm2
+C Other branching ratios could be added.
+ implicit none
+ include 'masses.f'
+ integer npt
+ parameter(npt=1000)
+ integer j,nlo
+ character*79 string
+ double precision bbbr,gamgambr,wwbr,zzbr,htemp,width(npt)
+ double precision xmh(npt),brbb(npt),brtautau,brss,brcc,brmumu,
+ . brtt,brgg,brgamgam(npt),brzgam,brww(npt),brzz(npt)
+ logical first
+ data first/.true./
+ save brbb,brww,brzz,width
+
+ if (first) then
+ first=.false.
+ open(unit=47,file='br.sm1',status='old',err=44)
+ read(47,*,err=75) string
+ 75 read(47,*,err=76) string
+ 76 continue
+ do j=1,npt
+ read(47,*,err=77) xmh(j),brbb(j),brtautau,brmumu,brss,brcc,brtt
+ enddo
+ 77 continue
+ close(unit=47)
+
+ open(unit=48,file='br.sm2',status='old',err=45)
+ read(48,*,err=85) string
+ 85 read(48,*,err=86) string
+ 86 continue
+ do j=1,npt
+ read(48,*) xmh(j),brgg,brgamgam(j),brzgam,brww(j),brzz(j),width(j)
+ enddo
+ close(unit=48)
+ endif
+
+ if (hmass .lt. 1d0) then
+ htemp=1d0
+ nlo=1
+ elseif (hmass .gt. 999d0) then
+ htemp=999d0
+ nlo=999
+ else
+ htemp=hmass
+ nlo=int(htemp)
+ endif
+ bbbr=brbb(nlo)+(htemp-nlo)*(brbb(nlo+1)-brbb(nlo))
+ gamgambr=brgamgam(nlo)+(htemp-nlo)*(brgamgam(nlo+1)-brgamgam(nlo))
+ wwbr=brww(nlo)+(htemp-nlo)*(brww(nlo+1)-brww(nlo))
+ zzbr=brzz(nlo)+(htemp-nlo)*(brzz(nlo+1)-brzz(nlo))
+ hwidth=width(nlo)+(htemp-nlo)*(width(nlo+1)-width(nlo))
+ return
+ 44 continue
+ write(6,*) 'Error opening br1.sm1 or br2.sm2'
+ return
+ 45 continue
+ write(6,*) 'Error opening br2.sm2'
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/integrate.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/integrate.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/integrate.f (revision 1338)
@@ -0,0 +1,201 @@
+
+CC Modified to do full NNLO calculation
+C
+C lowintHst is lowest order* Hst
+C
+C realvirt is real (V + 2 partons) + virtual (V + 1 parton)
+
+C Number of calls reduced by a factor of 5 for lowintHst
+
+
+ subroutine integrate(myinit,myitmx,myncall,mybin,xinteg,xerr)
+************************************************************************
+* *
+* This routine should perform the sweeps of vegasnr *
+* *
+* Input parameters: *
+* myinit : the vegasnr routine entry point *
+* myitmx : the number of vegasnr sweeps *
+* myncall : the number of iterations per sweep *
+* bin : whether or not the results should be histogrammed *
+* *
+* Returned variables: *
+* xinteg : value of integration *
+* xerr : integration error
+* *
+************************************************************************
+ implicit none
+ include 'gridinfo.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'vegas_common.f'
+ integer myitmx,myncall,myinit,i,j,k
+ logical mybin,bin
+ double precision sig,sd,chi,sigr,sdr,sigdk,sddk,chidk,
+ . xreal,xreal2,xinteg,xerr,adjust,myscale,myfacscale
+ character*4 part,mypart
+ common/part/part
+ common/mypart/mypart
+ common/bin/bin
+ common/xreal/xreal,xreal2
+ double precision lowint,virtint,realint
+ double precision region(2*mxdim)
+C
+ integer order
+ common/nnlo/order
+ integer myncall0
+ double precision realvirt2,realvirt4,lowintHst
+ character*30 runstring
+ common/runstring/runstring
+C
+ logical first,myreadin
+ external lowint,virtint,realint
+C
+ external realvirt2,realvirt4,lowintHst
+C
+ data first/.true./
+ save first
+
+
+CC For lowestorder and lowintHst the number of calls is divided by 5
+
+ myncall0=myncall/10
+
+CC
+
+
+c--- Initialize all integration results to zero, so that the
+c--- total of virt and real may be combined at the end for 'tota'
+ sig=0d0
+ sigr=0d0
+ sigdk=0d0
+ sd=0d0
+ sdr=0d0
+ sddk=0d0
+ xreal=0d0
+ xreal2=0d0
+
+
+
+c--- Put the vegasnr parameters in the common block
+ itmx=myitmx
+ ncall=myncall0
+ bin=mybin
+
+
+c--- Store value of part in mypart, which will be retained;
+c--- also store value of scale in myscale, which will be retained;
+c--- part and scale can be changed to make sure that the tota option works.
+ mypart=part
+ myscale=scale
+ myfacscale=facscale
+CC
+ myreadin=readin
+CC
+
+c--- If we're doing the tota integration, then set up the grid info
+ if (mypart .eq. 'tota') then
+ if (first .and. (myinit .eq. 1)) then
+ call strcat(runstring,'_dvegas_virt.grid',ingridfile)
+ myreadin=readin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ call strcat(runstring,'_dvegas_virt.grid',outgridfile)
+ else
+ readin=.true.
+ writeout=.false.
+ call strcat(runstring,'_dvegas_virt.grid',ingridfile)
+ endif
+ endif
+ endif
+
+
+CC Virtint must contain lowest order * Hst factor
+
+ if ((mypart .eq. 'virt') .or. (mypart .eq. 'tota')) then
+ part='virt'
+
+C Add two dimensions for convolutions
+ ndim=ndim+2
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,lowintHst,myinit,myncall0,myitmx,
+ . 0,sig,sd,chi)
+ ndim=ndim-2
+ endif
+
+ if(order.eq.0) goto 99
+
+
+CC Prepare the grid also for real only
+
+c--- If we're doing the tota integration, then set up the grid info
+ if ((mypart .eq. 'tota') .or. (mypart .eq. 'real')) then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for real grid
+ call strcat(runstring,'_dvegas_real.grid',ingridfile)
+ readin=myreadin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ call strcat(runstring,'_dvegas_real.grid',outgridfile)
+ else
+ readin=.true.
+ writeout=.false.
+ call strcat(runstring,'_dvegas_real.grid',ingridfile)
+ endif
+ endif
+ endif
+
+CC Here real and virtual together
+
+
+c--- Real integration should have three extra dimensions
+
+ if ((mypart .eq. 'real').or.(mypart.eq.'tota')) then
+ part='real'
+ ndim=ndim+6
+ xreal=0d0
+ xreal2=0d0
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,realvirt2,myinit,myncall,myitmx,
+ . 0,sigr,sdr,chi)
+ ndim=ndim-6
+ write(6,*)
+ ncall=myncall
+ endif
+
+ 99 continue
+
+c--- calculate integration variables to be returned
+ xinteg=sig+sigr+sigdk
+ xerr=dsqrt(sd**2+sdr**2+sddk**2)
+
+c--- return part and scale to their real values
+ part=mypart
+ scale=myscale
+ first=.false.
+
+ return
+ end
+
+
+ subroutine boundregion(idim,region)
+c--- Initializes integration region [0,1] for each variable
+c--- in the idim-dimensional integration range
+ implicit none
+ include 'mxdim.f'
+ integer i,idim
+ double precision region(2*mxdim)
+
+ do i=1,idim
+ region(i)=0d0
+ region(i+idim)=1d0
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/integration.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/integration.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/integration.f (revision 1338)
@@ -0,0 +1,113 @@
+ FUNCTION ADPINT (F, A, B, AERR, RERR, ERREST, IER)
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+ integer oldint
+
+c.....Integral of F(X) from A to B, with error
+c.....less than ABS(AERR) + ABS(RERR*INTEGRAL)
+c.....Best estimate of error returned in ERREST.
+c.....Error code is IER: zero if OK, non-zero if in trouble.
+
+ EXTERNAL F
+ PARAMETER (MAXINT = 500)
+
+c Work space:
+
+ COMMON / ADPWRK / NUMINT, U(MAXINT), V(MAXINT), FU(MAXINT),
+ > FV(MAXINT), FW(MAXINT), ERR(MAXINT), RESULT(MAXINT)
+ SAVE / ADPWRK /
+
+ IER = 0
+ NUMINT = 5
+ DX = (B-A)/ NUMINT
+ DO 1 I = 1, NUMINT
+ IF (I .EQ. 1) THEN
+ U(I) = A
+ FU(I) = F(U(I))
+ ELSE
+ U(I) = V(I-1)
+ FU(I) = FV(I-1)
+ ENDIF
+ IF (I .EQ. NUMINT) THEN
+ V(I) = B
+ ELSE
+ V(I) = A + DX * I
+ ENDIF
+ FV(I) = F(V(I))
+ CALL ADPCAL(F,I)
+ 1 CONTINUE
+
+ 2 CONTINUE
+
+c.....Error estimate:
+
+ ADPINT = 0.
+ ERREST = 0.
+ DO 3 I = 1, NUMINT
+ ADPINT = ADPINT + RESULT(I)
+ ERREST = ERREST + ERR(I)
+ 3 CONTINUE
+ TARGET = ABS(AERR) + ABS(RERR * ADPINT)
+ IF (ERREST .GT. TARGET) THEN
+ OLDINT = NUMINT
+ DO 4 I = 1,OLDINT
+ IF (ERR(I)*2*OLDINT .GT. TARGET) CALL ADPSPL(F,I,IER)
+ 4 CONTINUE
+ IF (IER .EQ. 0) GOTO 2
+ ENDIF
+ RETURN
+ END
+
+ FUNCTION INTUSE ()
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+
+c.....Return number of intervals used last call to ADPINT
+
+ PARAMETER (MAXINT = 500)
+ COMMON / ADPWRK / NUMINT, U(MAXINT), V(MAXINT), FU(MAXINT),
+ > FV(MAXINT), FW(MAXINT), ERR(MAXINT), RESULT(MAXINT)
+ INTUSE = NUMINT
+ RETURN
+ END
+
+ SUBROUTINE ADPCAL (F,I)
+
+c.....Fill in details of interval I given endpoints
+
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+ EXTERNAL F
+ PARAMETER (MAXINT = 500)
+ COMMON / ADPWRK / NUMINT, U(MAXINT), V(MAXINT), FU(MAXINT),
+ > FV(MAXINT), FW(MAXINT), ERR(MAXINT), RESULT(MAXINT)
+
+ FW(I) = F( (U(I) + V(I)) /2.)
+ DX = V(I) - U(I)
+ RESULT(I) = DX * (FU(I) + 4. * FW(I) + FV(I)) / 6.
+ ERR(I) = ABS(DX * (FU(I) - 2. * FW(I) + FV(I)) / 12.)
+ RETURN
+ END
+
+ SUBROUTINE ADPSPL (F, I, IER)
+
+c.....Split interval I
+
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+ EXTERNAL F
+ PARAMETER (MAXINT = 500)
+ COMMON / ADPWRK / NUMINT, U(MAXINT), V(MAXINT), FU(MAXINT),
+ > FV(MAXINT), FW(MAXINT), ERR(MAXINT), RESULT(MAXINT)
+
+ IF (NUMINT .GE. MAXINT) THEN
+ IER = 1
+ RETURN
+ ENDIF
+ NUMINT = NUMINT + 1
+ V(NUMINT) = V(I)
+ U(NUMINT) = (U(I) + V(I)) / 2.
+ V(I) = U(NUMINT)
+ FV(NUMINT) = FV(I)
+ FU(NUMINT) = FW(I)
+ FV(I) = FW(I)
+ CALL ADPCAL (F, I)
+ CALL ADPCAL (F, NUMINT)
+ RETURN
+ END
Index: dynnlo-v1.5-applgrid/src/Need/includedipoleMIO.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/includedipoleMIO.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/includedipoleMIO.f (revision 1338)
@@ -0,0 +1,50 @@
+ logical function includedipole(nd,ptrans)
+ implicit none
+ include 'constants.f'
+ include 'clustering.f'
+ include 'npart.f'
+ include 'ptilde.f'
+ include 'jetlabel.f'
+ double precision ptrans(mxpart,4),pjet(mxpart,4),rcut
+ integer i,j,nd,nqcdjets,nqcdstart,notag,isub
+ logical gencuts,failedgencuts,makecuts
+
+ common/nqcdjets/nqcdjets,nqcdstart
+ common/rcut/rcut
+ common/makecuts/makecuts
+ common/notag/notag
+
+ includedipole=.true.
+
+ if (nd .gt. 0) then
+ isub=1
+ else
+ isub=0
+ endif
+
+ call genclust2(ptrans,rcut,pjet,isub)
+ do j=1,4
+ do i=1,npart+2
+ ptildejet(nd,i,j)=pjet(i,j)
+ enddo
+ enddo
+
+c--- if the number of jets is not correct, then do not include dipole
+c if ((clustering .and. (jets .ne. nqcdjets-notag)
+c . .and. (inclusive .eqv. .false.)) .or.
+c . (clustering .and. (jets .lt. nqcdjets-notag)
+c . .and. (inclusive .eqv. .true.))) then
+c includedipole=.false.
+c write(*,*)'p1'
+c return
+c else
+c--- otherwise, if it is correct, check the lepton cuts
+ if (makecuts) then
+ failedgencuts=gencuts(pjet,jets)
+ if (failedgencuts) includedipole=.false.
+ endif
+c endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/getptQ1.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/getptQ1.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/getptQ1.f (revision 1338)
@@ -0,0 +1,64 @@
+ subroutine getptQ1(pt5,pt6,eta5,eta6,ptQ1,etaQ1,ptoreta)
+ implicit none
+ include 'constants.f'
+ include 'jetlabel.f'
+ integer ptoreta
+ double precision pt5,pt6,eta5,eta6,ptQ1,ptQ2,etaQ1,etaQ2
+
+c--- note: this function ASSUMES that there is at most one b-quark
+c--- and one anti-b-quark, returning zero if there are less than this
+c--- If two b-quarks are found, the one returned is either:
+c--- the one with the highest pt (ptoreta=1)
+c--- the most central one (ptoreta=2)
+
+ if (jets .eq. 1) then
+ if ((jetlabel(1) .eq. 'bq') .or. (jetlabel(1) .eq. 'ba')) then
+ ptQ1=pt5
+ etaQ1=eta5
+ return
+ else
+ write(6,*) 'Error in getptQ1: only 1 jet and it'
+ write(6,*) ' is not a heavy quark!'
+ stop
+ endif
+ endif
+
+ if (jets .ne. 2) then
+ write(6,*) 'Error in getptQ1: strange number of jets, ',jets,'!'
+ stop
+ endif
+
+c--- now we know that we have 2 jets
+ ptQ1=-1d0
+ ptQ2=-1d0
+ etaQ1=99d0
+ etaQ2=99d0
+
+ if ((jetlabel(1) .eq. 'bq') .or. (jetlabel(1) .eq. 'ba')) then
+ ptQ1=pt5
+ etaQ1=eta5
+ endif
+ if ((jetlabel(2) .eq. 'bq') .or. (jetlabel(2) .eq. 'ba')) then
+ ptQ2=pt6
+ etaQ2=eta6
+ endif
+
+ if (ptoreta .eq. 1) then
+ ptQ1=max(ptQ1,ptQ2)
+ elseif (ptoreta .eq. 2) then
+ if (abs(etaQ2) .lt. abs(etaQ1)) then
+ ptQ1=ptQ2
+ etaQ1=etaQ2
+ endif
+ else
+ write(6,*) 'The value of ptoreta in getptQ1.f is incorrect'
+ stop
+ endif
+
+ if (ptQ1 .lt. 0d0) then
+ write(6,*) 'Error in getptQ1: 2 jets, but no heavy quarks!'
+ stop
+ endif
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/countDY.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/countDY.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/countDY.f (revision 1338)
@@ -0,0 +1,895 @@
+CC Counterterm to be subtracted from real+virt to get a finite
+CC cross section at qt->0
+
+C Version that allows to separate also qg channel
+
+C Scale dependence included up to NNLO
+
+ double precision function countint(vector,wgt)
+ implicit none
+ include 'constants.f'
+ include 'realonly.f'
+ include 'virtonly.f'
+ include 'noglue.f'
+ include 'vegas_common.f'
+ include 'ptilde.f'
+ include 'npart.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'zerowidth.f'
+ include 'efficiency.f'
+ include 'masses.f'
+ include 'limits.f'
+C
+ include 'jetlabel.f'
+ include 'qcdcouple.f'
+ include 'phasemin.f'
+ include 'rescoeff.f'
+ include 'dynamicscale.f'
+C
+ integer ih1,ih2,j,k,l,nd,nmax,nmin,nvec,order
+ integer nproc
+ common/nproc/nproc
+ double precision vector(mxdim),W,val,xint
+ double precision sqrts
+ double precision p(mxpart,4),pjet(mxpart,4),p1ext(4),p2ext(4)
+ double precision pswt,rscalestart,fscalestart
+ double precision s(mxpart,mxpart),wgt,msq(-nf:nf,-nf:nf)
+ double precision msqc(-nf:nf,-nf:nf),xmsq(0:maxd)
+ double precision flux,BrnRat,xreal,xreal2
+ double precision xx1,xx2,q(mxpart,4)
+ double precision m3,m4,m5,qtcut
+CC
+ logical cuts
+ double precision x1,x2,dot,ptrans(mxpart,4)
+ double precision q2,qt2,shat,Itilde
+ double precision fx10(-nf:nf),fx20(-nf:nf)
+ double precision fx1p(-nf:nf),fx2p(-nf:nf)
+ double precision alfa,beta,diff,Pqq,Pqg,Pqqint,Cqq,Cqg
+ double precision xjacq2,xjacqt2,xth,x3,almin,almax
+ double precision xmio,fluxborn,pswt0
+ double precision shad,yq,zmax,tauh,Vol,y3
+ double precision xx0(2),xx10,xx20
+ double precision sig1,sig2,LR,LF
+ double precision sig11,sig12
+ double precision sig21,sig22,sig23,sig24
+ double precision tdelta,tH1st,tH1stF,tgaga,tcga,tgamma2
+ double precision LL1,LL2,LL3,LL4
+ double precision z1,z2,diff1,diff2,cut
+ double precision D0int,D1int
+ double precision Pqqqq,Pqqqg,Pqggq,Pqggg
+ double precision CqqPqq,CqqPqg,CqgPgq,CqgPgg
+ double precision P2qg,P2qqV,P2qqbV,P2qqS
+ double precision diffg10,diffg20,diffc10,diffc20
+ double precision diffg1f,diffg2f,diffc1f,diffc2f
+ external Itilde,Pqq,Pqg,Cqq,Cqg,Pqqint,D0int,D1int
+ external Pqqqq,Pqqqg,Pqggq,Pqggg,CqqPqq,CqqPqg,CqgPgq,CqgPgg
+ external P2qqV,P2qqbV,P2qg,P2qqS
+
+ common/xmio/xmio
+ common/xx0/xx0
+ common/qtcut/qtcut
+ common/nnlo/order
+
+CC
+CC Variables passed from virtint or lowint
+CC
+ common/count/qt2,q2,shat
+
+CC
+ integer n2,n3,sgnj,sgnk,flgq
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ common/xreal/xreal,xreal2
+ logical bin,first,failed
+ logical incldip(0:maxd),includedipole,includereal
+ logical creatent,dswhisto
+ common/density/ih1,ih2
+ common/energy/sqrts
+ common/bin/bin
+ common/Pext/p1ext,p2ext
+ common/nmax/nmax
+ common/BrnRat/BrnRat
+ common/nmin/nmin
+ common/incldip/incldip
+ common/outputflags/creatent,dswhisto
+ data p/48*0d0/
+ data first/.true./
+ save first,rscalestart,fscalestart
+ if (first) then
+ first=.false.
+ rscalestart=scale
+ fscalestart=facscale
+ endif
+ ntotshot=ntotshot+1
+ pswt=0d0
+ countint=0d0
+
+ do nd=0,1
+ xmsq(nd)=0d0
+ enddo
+
+
+CC Check if q2 is the proper interval
+
+ if(q2.lt.wsqmin.or.q2.gt.wsqmax) goto 999
+
+CC Cut on qt2
+
+ if(dsqrt(qt2).lt.qtcut) goto 999
+
+ shad=sqrts**2
+
+ xmio=dsqrt(qt2/q2)
+
+ npart=3
+ nvec=npart+2
+
+
+CC Dynamic scale
+
+ if(dynamicscale) call scaleset(q2)
+
+CC LR,LF
+
+
+ LR=dlog(q2/scale**2)
+ LF=dlog(q2/facscale**2)
+
+
+CC jacobian for qt2
+
+ xth=vector(2)
+ xjacqt2=(shat-q2)**2/shat*dabs(1-2*xth)
+
+
+CC jacobian for Q2
+
+ if (zerowidth) then
+ xjacq2=pi*mass3*width3
+ else
+ x3=vector(1)
+ almin=datan(-mass3/width3)
+ almax=datan((shat-mass3**2)/mass3/width3)
+ xjacq2=mass3*width3
+ & *(almax-almin)/(dcos((almax-almin)*x3+almin))**2
+ endif
+
+CC Test: volume
+
+ zmax=1+2*xmio**2-2*xmio*dsqrt(1+xmio**2)
+
+
+ tauh=q2/shad
+ Vol=-(dlog(zmax)-dlog(tauh))/dlog(taumin)
+
+
+CC LL1,LL2,LL3,LL4: large log (squared) corresponding to eq. (136)
+CC In this way normalization is fixed to dsigma/dqt2
+
+
+ LL1=Itilde(1)/q2**2
+ LL2=Itilde(2)/q2**2
+ LL3=Itilde(3)/q2**2
+ LL4=Itilde(4)/q2**2
+
+
+
+CC Generate BORN momenta for counterterm
+
+ call genBORN2(q2,shat,vector,ptrans,pswt0,*999)
+
+ call storeptilde(1,ptrans)
+
+CC Here we have to check if the counterevent passes the cuts
+
+ jets=0
+ incldip(1)=cuts(ptrans,0)
+ if (incldip(1)) goto 999
+
+CC Compute Born matrix element
+
+
+ if(nproc.eq.3)then
+ call qqb_z(ptrans,msqc)
+ else
+ call qqb_w(ptrans,msqc)
+ endif
+
+
+
+C Scaled momentum fractions
+
+ cut=1d-7
+
+
+ beta=cut+(1-cut)*vector(8)
+ alfa=cut+(1-cut)*vector(9)
+
+ xx10=xx0(1)
+ xx20=xx0(2)
+
+ z1=xx10**beta
+ z2=xx20**alfa
+
+
+c--- calculate PDF's
+
+c if(xx10.lt.1d-5)write(*,*)q2,xx10
+c if(xx20.lt.1d-5)write(*,*)q2,xx20
+
+ call fdist(ih1,xx10,facscale,fx10)
+ call fdist(ih2,xx20,facscale,fx20)
+
+ call fdist(ih1,xx10**(1-beta),facscale,fx1p)
+ call fdist(ih2,xx20**(1-alfa),facscale,fx2p)
+
+
+CC Switch off gluon !!
+
+ if(noglue) then
+ fx10(0)=0d0
+ fx20(0)=0d0
+ fx1p(0)=0d0
+ fx2p(0)=0d0
+ endif
+
+CC Gluon only !
+
+ if(ggonly) then
+ do j=1,5
+ fx10(j)=0d0
+ fx10(-j)=0d0
+ fx1p(j)=0d0
+ fx1p(-j)=0d0
+ fx20(j)=0d0
+ fx20(-j)=0d0
+ fx2p(j)=0d0
+ fx2p(-j)=0d0
+ enddo
+ endif
+
+ flgq=1
+ if(gqonly)flgq=0
+
+
+C Flux for Born cross section
+
+
+ fluxborn=fbGeV2/(2*q2)
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Start construction of the counterterm
+
+ tdelta=0d0
+ tH1st=0d0
+ tH1stF=0d0
+ tgaga=0d0
+ tcga=0d0
+ tgamma2=0d0
+
+ diffc10=0d0
+ diffc1f=0d0
+ diffc20=0d0
+ diffc2f=0d0
+
+ diffg10=0d0
+ diffg1f=0d0
+ diffg20=0d0
+ diffg2f=0d0
+
+ sig1=0d0
+ sig2=0d0
+
+ sig11=0d0
+ sig12=0d0
+ sig21=0d0
+ sig22=0d0
+ sig23=0d0
+ sig24=0d0
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if(msqc(j,k).eq.0d0) goto 75
+
+
+C Simplest term without convolutions
+
+ tdelta=tdelta+fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+C Start H1st: to be used later
+
+C H1st delta term
+
+ tH1st=tH1st+2*C1qqdelta*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+C H1st: non delta terms, first leg
+
+
+ tH1st=tH1st+(fx1p(j)*Cqq(z1)*flgq+fx1p(0)*Cqg(z1))
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+
+C H1st: non delta terms, second leg
+
+
+ tH1st=tH1st+(fx2p(k)*Cqq(z2)*flgq+fx2p(0)*Cqg(z2))
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+
+
+C H1st: muf dependence (LF factor to be added at the end)
+
+
+c gammaqq and gammaqg: first leg
+
+
+ diff=-dlog(xx10)
+ & *((fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)*flgq+fx1p(0)*Pqg(z1))
+ tH1stF=tH1stF+diff*fx20(k)*msqc(j,k)
+ tH1stF=tH1stF-Pqqint(xx10)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+c gammaqq and gammaqg: second leg
+
+
+ diff=-dlog(xx20)
+ & *((fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)*flgq+fx2p(0)*Pqg(z2))
+ tH1stF=tH1stF+diff*fx10(j)*msqc(j,k)
+ tH1stF=tH1stF-Pqqint(xx20)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+CC End of H1st
+
+ if(order.eq.1) goto 75
+
+CC Now (gamma+gamma)*(gamma+gamma) term: to be used later
+
+C First part: one gamma for each leg: FLGQ here is non trivial ! DONE
+
+
+ diffg1f=-dlog(xx10)*(fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)
+ & - Pqqint(xx10)*fx10(j)
+
+
+ diffg10=-dlog(xx10)*fx1p(0)*Pqg(z1)
+
+ diffg2f=-dlog(xx20)*(fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)
+ & - Pqqint(xx20)*fx20(k)
+
+
+ diffg20=-dlog(xx20)*fx2p(0)*Pqg(z2)
+
+
+ tgaga=tgaga+2*
+ # (flgq*diffg10*diffg20+flgq*diffg1f*diffg2f
+ # +diffg10*diffg2f+diffg1f*diffg20)*msqc(j,k)
+
+
+CC Second part: gamma*gamma terms
+
+c Pij * Pjk = D1ijjk (log(1-z)/(1-z))_+ + D0ijjk/(1-z)_+
+c + Pijjk(z) + Deltaijjk delta(1-z)
+
+C First leg
+
+
+ diff1=-dlog(xx10)*(flgq*(fx1p(j)-fx10(j)*xx10**beta)
+ & *(D0qqqq/(1-z1)+D1qqqq*dlog(1-z1)/(1-z1))
+ & +fx1p(j)*Pqqqq(z1)*flgq+fx1p(0)*(Pqqqg(z1)+Pqggg(z1)))
+ & +(Deltaqqqq-D0qqqq*D0int(xx10)-D1qqqq*D1int(xx10))
+ & *fx10(j)*flgq
+
+
+C Second leg
+
+
+ diff2=-dlog(xx20)*(flgq*(fx2p(k)-fx20(k)*xx20**alfa)
+ & *(D0qqqq/(1-z2)+D1qqqq*dlog(1-z2)/(1-z2))
+ & +fx2p(k)*Pqqqq(z2)*flgq+fx2p(0)*(Pqqqg(z2)+Pqggg(z2)))
+ & +(Deltaqqqq-D0qqqq*D0int(xx20)-D1qqqq*D1int(xx20))
+ & *fx20(k)*flgq
+
+
+C Include Pqggq
+
+ do l=1,nf
+ diff1=diff1-dlog(xx10)*(fx1p(l)+fx1p(-l))*Pqggq(z1)*flgq
+ diff2=diff2-dlog(xx20)*(fx2p(l)+fx2p(-l))*Pqggq(z2)*flgq
+ enddo
+
+ tgaga=tgaga+diff1*fx20(k)*msqc(j,k)
+ tgaga=tgaga+diff2*fx10(j)*msqc(j,k)
+
+
+
+C End of (gamma+gamma)*(gamma+gamma) term: FLGQ non trivial here ! DONE
+
+C Start (C+C)*(gamma+gamma) term
+
+c gamma first leg, C second leg
+
+
+ diffc2f=-dlog(xx20)*fx2p(k)*Cqq(z2)+C1qqdelta*fx20(k)
+
+ diffc20=-dlog(xx20)*fx2p(0)*Cqg(z2)
+
+
+ tcga=tcga+msqc(j,k)*
+ # (flgq*diffg10*diffc20+flgq*diffg1f*diffc2f
+ # +diffg10*diffc2f+diffg1f*diffc20)
+
+
+c C first leg, gamma second leg
+
+ diffc1f=-dlog(xx10)*fx1p(j)*Cqq(z1)+C1qqdelta*fx10(j)
+
+ diffc10=-dlog(xx10)*fx1p(0)*Cqg(z1)
+
+ tcga=tcga+msqc(j,k)*
+ # (flgq*diffc10*diffg20+flgq*diffc1f*diffg2f
+ # +diffc10*diffg2f+diffc1f*diffg20)
+
+
+c C*gamma: first leg (ignore delta term in Cqq: taken into account with tH1stF)
+
+ tcga=tcga
+ & +(fx1p(j)*CqqPqq(z1)*flgq+fx1p(0)*(CqqPqg(z1)+CqgPgg(z1)))
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+c C*gamma: second leg (ignore delta term in Cqq: taken into account with tH1stF)
+
+ tcga=tcga
+ & +(fx2p(k)*CqqPqq(z2)*flgq+fx2p(0)*(CqqPqg(z2)+CqgPgg(z2)))
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+
+c Add Cqg*Pgq contribution
+
+ do l=1,nf
+ tcga=tcga+(fx1p(l)+fx1p(-l))*CqgPgq(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tcga=tcga+(fx2p(l)+fx2p(-l))*CqgPgq(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+ enddo
+
+CC Start 2-loop AP
+
+C Gluon + pure singlet
+
+
+ do l=-nf,nf
+ if(l.eq.0) then
+ tgamma2=tgamma2+fx1p(0)*P2qg(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+ tgamma2=tgamma2+fx2p(0)*P2qg(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+ else
+ tgamma2=tgamma2+fx1p(l)*P2qqS(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tgamma2=tgamma2+fx2p(l)*P2qqS(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+ endif
+ enddo
+
+
+C P2qq non-singlet: regular part
+
+ tgamma2=tgamma2+fx1p(j)*P2qqV(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tgamma2=tgamma2+fx2p(k)*P2qqV(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+
+
+C P2qq non-singlet: 1/(1-z)_+
+
+
+ diff=-dlog(xx10)
+ & *(fx1p(j)-fx10(j)*xx10**beta)/(1-z1)
+ & - D0int(xx10)*fx10(j)
+
+ tgamma2=tgamma2+2d0/3*Kappa*diff*fx20(k)*msqc(j,k)*flgq
+
+
+ diff=-dlog(xx20)
+ & *(fx2p(k)-fx20(k)*xx20**alfa)/(1-z2)
+ & - D0int(xx20)*fx20(k)
+
+ tgamma2=tgamma2+2d0/3*Kappa*diff*fx10(j)*msqc(j,k)*flgq
+
+
+
+C P2qqb non singlet
+
+ tgamma2=tgamma2+fx1p(-j)*P2qqbV(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+
+ tgamma2=tgamma2+fx2p(-k)*P2qqbV(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+
+ 75 continue
+
+ enddo
+ enddo
+
+
+CC First order
+
+ sig12=-0.5d0*A1q*tdelta
+ sig11=-B1q*tdelta-tH1stF
+
+
+CC Second order
+
+ sig24=(A1q)**2/8*tdelta
+
+ sig23=-beta0*A1q/3*tdelta-0.5d0*A1q*sig11
+
+ sig22=0.5d0*(beta0*A1q*LR-A2q)*tdelta
+ & -0.5d0*A1q*(tH1st+LF*tH1stF)
+ & -0.5d0*(B1q-beta0)*sig11
+ & +0.5d0*B1q*tH1stF
+ & +0.5d0*tgaga
+
+
+
+ sig21=-beta0*LR*sig11-B1q*(tH1st+LF*tH1stF)
+ & -LF*tgaga-B2q*tdelta+beta0*tH1st-tcga-tgamma2
+
+c Include missing delta term from C*gamma (no factor 2 here !)
+
+ sig21=sig21-C1qqdelta*tH1stF
+
+
+C Include missing term from contact term in 2 loop AP
+
+ sig21=sig21-2*Delta2qq*tdelta
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+CC Include as/pi factors and sum O(as) and O(as^2) contributions
+
+ sig1=sig12*LL2+sig11*LL1
+ sig2=sig24*LL4+sig23*LL3+sig22*LL2+sig21*LL1
+
+
+ sig1=sig1*ason2pi*2
+ sig2=sig2*(ason2pi*2)**2
+
+ if(order.eq.1)then
+ xmsq(1)=-sig1
+ else
+ xmsq(1)=-(sig1+sig2)
+ endif
+
+c xmsq(1)=sig1+sig2
+
+CC Include iacobians
+
+ xmsq(1)=xmsq(1)*xjacqt2*xjacq2*q2/shad/Vol
+
+
+ countint=0d0
+ xint=0d0
+
+
+C Multiply by BORN phase space weight
+
+ xmsq(1)=xmsq(1)*fluxborn*pswt0/BrnRat/2d0
+
+
+ 77 continue
+
+
+
+c---Add to total
+
+ xint=xmsq(1)
+ val=xmsq(1)*wgt
+
+
+c---if we're binning, add to histo too
+ if (bin) then
+ call getptildejet(1,pjet)
+ call dotem(nvec,pjet,s)
+ val=val/dfloat(itmx)
+ call plotter(ptrans,val,1)
+C call plotter(p,val,0)
+ endif
+
+
+ countint=xint
+
+ xreal=xreal+xint*wgt/dfloat(itmx)
+ xreal2=xreal2+(xint*wgt)**2/dfloat(itmx)
+
+
+ return
+
+ 999 countint=0d0
+ ntotzero=ntotzero+1
+
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+CC qq splitting function (with asopi normalization)
+
+ function Pqq(z)
+ implicit none
+ real *8 Pqq,z
+ Pqq=2d0/3*(1+z**2)/(1-z)
+ return
+ end
+
+CC qg splitting function (with asopi normalization)
+
+ function Pqg(z)
+ implicit none
+ real *8 Pqg,z
+ Pqg=0.25d0*(1-2*z*(1-z))
+ return
+ end
+
+CC Non delta term in Cqq coefficient (with asopi normalization)
+
+ function Cqq(z)
+ implicit none
+ real *8 Cqq,z
+ Cqq=2d0/3*(1-z)
+ return
+ end
+
+
+CC Cqg coefficient (with asopi normalization)
+
+ function Cqg(z)
+ implicit none
+ real *8 Cqg,z
+ Cqg=0.5d0*z*(1-z)
+ return
+ end
+
+
+CC Integral of Pqq=1/2 CF (1+x^2)/(1-x) from 0 to z
+
+ function Pqqint(z)
+ implicit none
+ real *8 Pqqint,z
+ Pqqint=-2d0/3*(z+z**2/2+2*dlog(1-z))
+ return
+ end
+
+CC Integral of 1/(1-x) from 0 to z
+
+ function D0int(z)
+ implicit none
+ real *8 D0int,z
+ D0int=-dlog(1-z)
+ return
+ end
+
+CC Integral of log(1-x)/(1-x) from 0 to z
+
+ function D1int(z)
+ implicit none
+ real *8 D1int,z
+ D1int=-0.5d0*dlog(1-z)**2
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C P*P convolutions
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Regular part of Pqq*Pqq (checked !)
+
+ function Pqqqq(z)
+ implicit none
+ real *8 Pqqqq,z
+ Pqqqq=4d0/9*(-4*dlog(z)/(1-z)-2*(1-z)
+ & +(1+z)*(3*dlog(z)-4*dlog(1-z)-3))
+ return
+ end
+
+
+CC Pqq*Pqg (checked !)
+
+ function Pqqqg(z)
+ implicit none
+ real *8 Pqqqg,z
+ Pqqqg=1d0/3*((z**2+(1-z)**2)*dlog((1-z)/z)
+ & -(z-0.5d0)*dlog(z)+z-0.25d0)
+ return
+ end
+
+CC Pqg*Pgq (checked !)
+
+ function Pqggq(z)
+ implicit none
+ real *8 Pqggq,z
+ Pqggq=1d0/3*(2d0/3/z+(1+z)*dlog(z)-2d0/3*z**2-0.5d0*(z-1))
+ return
+ end
+
+
+CC Full Pqg*Pgg (checked !)
+
+ function Pqggg(z)
+ implicit none
+ real *8 Pqggg,z,beta0,Pqg
+ integer nf
+ external Pqg
+ nf=5
+ beta0=(33-2*nf)/12d0
+ Pqggg=1.5d0*(1/3d0/z+(z**2-z+0.5d0)*dlog(1-z)
+ & +(2*z+0.5d0)*dlog(z)+0.25d0+2*z-31d0/12*z**2)
+
+ Pqggg=Pqggg+beta0*Pqg(z)
+ return
+ end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C C*P convolutions
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Cqq*Pqq (without delta term in Cqq) (checked !)
+
+ function CqqPqq(z)
+ implicit none
+ real *8 CqqPqq,z
+ CqqPqq=2d0/9*(1-z)*(4*dlog(1-z)-2*dlog(z)-1)
+ return
+ end
+
+CC Cqq*Pqg (without delta term in Cqq) (checked !)
+
+ function CqqPqg(z)
+ implicit none
+ real *8 CqqPqg,z
+ CqqPqg=(-2+z+z**2-(1+2*z)*dlog(z))/6d0
+ return
+ end
+
+CC Cqg*Pgq (checked !)
+
+ function CqgPgq(z)
+ implicit none
+ real *8 CqgPgq,z
+ CqgPgq=(1d0/3/z-1+2*z**2/3-z*dlog(z))/3d0
+ return
+ end
+
+CC Cqg*Pgg (checked !)
+
+ function CqgPgg(z)
+ implicit none
+ real *8 CqgPgg,z,beta0
+ integer nf
+ nf=5
+ beta0=(33-2*nf)/12d0
+ CqgPgg=3d0/4*(2*z*(1-z)*dlog(1-z)-4*z*dlog(z)
+ & +1d0/3/z-1-5*z+17d0*z**2/3)+beta0/2*z*(1-z)
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C Two loop AP: pqq of ESW is my 3/2 Pqq
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Pqq NS: Eq. (4.107) ESW (no 1/(1-x)_+ and delta term)
+
+ function P2qqV(x)
+ implicit none
+ real *8 x,P2qqV,Pqq,pi
+ integer nf
+ external Pqq
+
+ pi=3.14159265358979d0
+ nf=5
+
+ P2qqV=16d0/9*(-(2*dlog(x)*dlog(1-x)+1.5d0*dlog(x))*3d0/2*Pqq(x)
+ & -(1.5d0+3.5d0*x)*dlog(x)-0.5d0*(1+x)*dlog(x)**2-5*(1-x))
+ & +4*((0.5d0*dlog(x)**2+11d0/6*dlog(x))*3d0/2*Pqq(x)
+ & -(67d0/18-pi**2/6)*(1+x)
+ & +(1+x)*dlog(x)+20d0/3*(1-x))
+ & +2d0/3d0*nf*(-dlog(x)*Pqq(x)+10d0/9*(1+x)-4d0/3*(1-x))
+
+c Change to as/pi normalization
+
+ P2qqV=P2qqV/4
+
+ return
+ end
+
+
+C Pqqb NS: Eq. (4.108) ESW
+
+ function P2qqbV(x)
+ implicit none
+ real *8 x,P2qqbV,Pqq,S2
+ external Pqq,S2
+
+ P2qqbV=-2d0/9*(3d0*Pqq(-x)*S2(x)+2*(1+x)*dlog(x)+4*(1-x))
+
+c Change to as/pi normalization
+
+ P2qqbV=P2qqbV/4
+
+ return
+ end
+
+
+
+C Pqg Singlet: Eq. (4.110) ESW (ESW Pqg is 4 times my Pqg)
+
+ function P2qg(x)
+ implicit none
+ real *8 x,P2qg,Pqg,pi,S2,logx,logomxsx
+ external Pqg,S2
+
+ pi=3.14159265358979d0
+ logx=dlog(x)
+ logomxsx=dlog((1-x)/x)
+
+ P2qg=2d0/3*(4-9*x-(1-4*x)*logx-(1-2*x)*logx**2+4*dlog(1-x)
+ & +(2*logomxsx**2-4*logomxsx-2d0/3*pi**2+10d0)*4*Pqg(x))
+ & +1.5d0*(182d0/9+14d0/9*x+40d0/9/x+(136d0/3*x-38d0/3)*logx
+ & -4*dlog(1-x)-(2+8*x)*logx**2+8*Pqg(-x)*S2(x)
+ & +(-logx**2+44d0/3*logx-2*dlog(1-x)**2+4*dlog(1-x)+pi**2/3
+ & -218d0/9)*4*Pqg(x))
+
+c Change to as/pi normalization
+
+ P2qg=P2qg/4d0
+
+c Divide by 2 to eliminate 2nf factor
+
+ P2qg=P2qg/2d0
+
+ return
+ end
+
+C Pqq Pure Singlet appearing in ESW Eq. (4.95)
+C PSqq=PSqqb
+C Obtained through Eq.(4.101)
+C PSqq=1/2/nf (P2qq-P2qqbV-P2qqV) (contains only CF TR=2/3)
+
+ function P2qqS(x)
+ implicit none
+ real *8 P2qqS,x
+
+ P2qqS=2d0/3*(20 - 18*x + 54*x**2 - 56*x**3
+ & +3*x*(3 + 15*x + 8*x**2)*dlog(x)
+ & - 9*x*(1 + x)*dlog(x)**2)/(9*x)
+
+ P2qqS=P2qqS/4
+
+ return
+ end
+
+
+C S2: Eq. (4.114) ESW
+
+ function S2(x)
+ implicit none
+ real *8 x,pi,S2,myli2
+ external myli2
+ pi=3.14159265358979d0
+
+ S2=-2*myli2(-x)+0.5d0*dlog(x)**2-2*dlog(x)*dlog(1+x)-pi**2/6
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/besselkold.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/besselkold.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/besselkold.f (revision 1338)
@@ -0,0 +1,97 @@
+c.....Function BK(n,z)
+c.....BK(n,z) is the n-derivative of BesselK[nu,z]
+c.....with respect to nu in nu=1
+
+c.....Itilde defined as in the paper
+
+ function Itilde(m)
+ implicit none
+ external BK
+ real *8 BK,Itilde,argum,dloqt,a_param,b0p
+ integer m
+C include 'scales.h'
+C include 'const.h'
+C common/a_param/a_param,b0p
+
+ real *8 Eulergamma,b0,pi,z3,logx
+ real *8 xmio
+ common/xmio/xmio
+
+ Eulergamma=0.577215664902d0
+ pi=3.14159265359d0
+ z3=1.20205690316d0
+ b0=2*dexp(-Eulergamma)
+
+C
+
+ argum=b0*xmio
+ logx=dlog(xmio)
+
+ if (m.eq.1) then
+ Itilde=-b0/xmio*BK(0,argum)
+ elseif (m.eq.2) then
+ Itilde=2*b0/xmio*(BK(0,argum)*logx-BK(1,argum))
+ endif
+
+
+ return
+ end
+
+
+
+ function BK(n,z)
+ implicit none
+ external fb
+ real *8 bk,fb,errest,z,zz,max,adpint
+ real *8 loz,zhalf,egamma
+ integer n,nn,ifail
+ common/nuorder/nn
+ common/zz/zz
+ nn=n
+ zz=z
+ max=10d0
+ egamma=0.577215664902d0
+ zhalf=z/2d0
+ loz=dlog(zhalf)
+C Use approximated form for n=0,1 and z<1.5d0
+ if((n.eq.0).and.(z.lt.1.5d0)) then
+
+ bk=1d0/z+zhalf*(loz-0.5d0*(1-2*egamma))
+ & +0.5d0*zhalf**3*(loz-0.5d0*(2.5d0-2*egamma))
+ & +zhalf**5/12d0*(loz-0.5d0*(10d0/3-2*egamma))
+ & +zhalf**7/144d0*(loz-0.5d0*(47d0/12-2*egamma))
+ & +zhalf**9/2880d0*(loz-0.5d0*(131d0/30-2*egamma))
+
+ elseif((n.eq.1).and.(z.lt.1.5d0)) then
+
+ bk=-(loz+egamma)-zhalf**2*(loz-1+egamma)
+ & -0.25d0*zhalf**4*(loz-1.5d0+egamma)
+ & -zhalf**6/36d0*(loz-11d0/6+egamma)
+ & -zhalf**8/576d0*(loz-25d0/12+egamma)
+ bk=bk/z
+ else
+ bk=adpint(fb,0d0,max,1d-10,1d-5,errest,ifail)
+ endif
+ return
+ end
+
+
+ function fb(t)
+ implicit none
+ integer nn,nu
+ real *8 fb,t,zz
+ common/nuorder/nn
+ common/zz/zz
+ nu=1
+ if(nn.eq.0) then
+ fb=dexp(-zz*dcosh(t))*dcosh(nu*t)
+ elseif(nn.eq.1) then
+ fb=dexp(-zz*dcosh(t))*t*dsinh(nu*t)
+ elseif(nn.eq.2) then
+ fb=dexp(-zz*dcosh(t))*t*t*dcosh(nu*t)
+ elseif(nn.eq.3) then
+ fb=dexp(-zz*dcosh(t))*t*t*t*dsinh(nu*t)
+ endif
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/realvirt.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/realvirt.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/realvirt.f (revision 1338)
@@ -0,0 +1,51 @@
+CC Attempt to put real and virtual together
+
+ double precision function realvirt(vector,wgt)
+ implicit none
+ include 'vegas_common.f'
+ integer j,order
+ double precision wgt,realint,virtint,lowint,countint
+ double precision vector(mxdim),vv(mxdim),tmpr,tmpv,tmpc
+ external realint,virtint,lowint,countint
+
+ common/nnlo/order
+
+ do j=1,mxdim
+ vv(j)=vector(j)
+ enddo
+
+CC Mapping real <-> virtual
+
+ vv(1)=vector(2)
+ vv(2)=vector(3)
+ vv(3)=vector(4)
+ vv(4)=vector(7)
+ vv(5)=vector(8)
+ vv(6)=vector(9)
+ vv(7)=vector(10)
+CC Additional dimension for virtual
+ vv(8)=vector(1)
+CC Dummies
+ vv(9)=vector(5)
+ vv(10)=vector(6)
+
+ tmpr=0d0
+ tmpv=0d0
+ tmpc=0d0
+
+ if(order.eq.2) then
+ tmpr=realint(vector,wgt)
+ tmpv=virtint(vv,wgt)
+ else
+ tmpv=lowint(vv,wgt)
+ endif
+
+CC Counterterm
+
+ tmpc=countint(vv,wgt)
+
+ realvirt=tmpr+tmpv+tmpc
+
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/besselk.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/besselk.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/besselk.f (revision 1338)
@@ -0,0 +1,201 @@
+c.....Function BK(n,z)
+c.....BK(n,z) is the n-derivative of BesselK[nu,z]
+c.....with respect to nu in nu=1
+
+c.....Itilde defined as in the paper
+
+ function Itilde(m)
+ implicit none
+ double precision zBK,argum,Itilde
+ double precision Eulergamma,b0,z2,z3,logx
+ double precision xmio
+ integer m
+ common/xmio/xmio
+
+ external zBK
+
+ Eulergamma=0.577215664902d0
+ z2=1.64493406685d0
+ z3=1.20205690316d0
+ b0=2*dexp(-Eulergamma)
+
+C
+
+ argum=b0*xmio
+ logx=dlog(xmio)
+
+ if (m.eq.1) then
+ Itilde=-zBK(0,argum)/xmio**2
+ elseif (m.eq.2) then
+ Itilde=2d0/xmio**2*(zBK(0,argum)*logx-zBK(1,argum))
+ elseif (m.eq.3) then
+ Itilde=-3/xmio**2*(zBK(0,argum)*(logx**2-z2)
+ & -2*zBK(1,argum)*logx+zBK(2,argum))
+ elseif (m.eq.4) then
+ Itilde=4/xmio**2*(zBK(0,argum)*(logx**3-3*z2*logx+2*z3)
+ & -3*zBK(1,argum)*(logx**2-z2)+3*zBK(2,argum)*logx
+ & -zBK(3,argum))
+ endif
+
+
+ return
+ end
+
+C n-derivative of the function BesselK[nu,z]
+C with respect to nu for nu=1
+C NOTE: IT IS MULTIPLIED by z
+
+ function zBK(n,z)
+ implicit none
+ double precision zbk,fb,errest,z,zz,max,adpint
+ double precision zbesselk0,zbesselk1,zbesselk2,zbesselk3
+ integer n,nn,ifail
+ common/nuorder/nn
+ common/zz/zz
+ external fb,zbesselk0,zbesselk1,zbesselk2,zbesselk3
+ nn=n
+ zz=z
+ max=10d0
+
+C Use approximated form only for z<1.5d0
+
+ if(z.gt.1.5d0) then
+ zbk=z*adpint(fb,0d0,max,1d-10,1d-5,errest,ifail)
+ goto 99
+ endif
+
+ if(n.eq.0) then
+ zbk=zbesselk0(z)
+ elseif(n.eq.1) then
+ zbk=zbesselk1(z)
+ elseif(n.eq.2) then
+ zbk=zbesselk2(z)
+ elseif(n.eq.3) then
+ zbk=zbesselk3(z)
+ endif
+
+ 99 return
+ end
+
+C Approximated forms of BesselK[nu,z] for nu=1 and
+C derivatives with respect to nu of BesselK[nu,z] at nu=1
+C All functions multiplied by z
+
+ function zbesselk0(z)
+ implicit none
+ double precision zbesselk0,z,zm,loz,egamma
+ egamma=0.577215664902d0
+ zm=z/2d0
+ loz=dlog(zm)
+
+ zbesselk0=1d0+z*zm*(loz-0.5d0*(1-2*egamma))
+ & +zm**4*(loz-0.5d0*(2.5d0-2*egamma))
+ & +zm**6/6d0*(loz-0.5d0*(10d0/3-2*egamma))
+ & +zm**8/72d0*(loz-0.5d0*(47d0/12-2*egamma))
+ & +zm**10/1440d0*(loz-0.5d0*(131d0/30-2*egamma))
+
+ return
+ end
+
+
+ function zbesselk1(z)
+ implicit none
+ double precision zbesselk1,z,zm,loz,egamma
+ egamma=0.577215664902d0
+ zm=z/2d0
+ loz=dlog(zm)
+ zbesselk1=-(loz+egamma)-zm**2*(loz-1+egamma)
+ & -0.25d0*zm**4*(loz-1.5d0+egamma)
+ & -zm**6/36d0*(loz-11d0/6+egamma)
+ & -zm**8/576d0*(loz-25d0/12+egamma)
+
+
+ return
+ end
+
+
+ function zbesselk2(z)
+ implicit none
+ double precision zbesselk2,z,a(0:13),loz,zm
+ data a(0) / 1.15443132980306572d0/
+ data a(1) / 1.97811199065594511d0/
+ data a(2) / 0.154431329803065721d0/
+ data a(3) / 4.801792651508824500d0/
+ data a(4) / 0.806235643470665767d0/
+ data a(5) /-0.672784335098467139d0/
+ data a(6) / 3.285072828402112960d0/
+ data a(7) /-1.945338757678943440d0/
+ data a(8) /-0.181575166960855634d0/
+ data a(9) / 0.694195147571435559d0/
+ data a(10)/-0.607655744858515573d0/
+ data a(11)/-0.019182189839330562d0/
+ data a(12)/ 0.068894530444636532d0/
+ data a(13)/-0.070514317816328185d0/
+
+
+ zm=z/2
+ loz=dlog(zm)
+
+ zbesselk2=loz**2+a(0)*loz+a(1)
+ & +zm**2*(2*loz**3/3d0+a(2)*loz**2+a(3)*loz+a(4))
+ & +zm**4*(loz**3/3d0+a(5)*loz**2+a(6)*loz+a(7))
+ & +zm**6*(loz**3/18d0+a(8)*loz**2+a(9)*loz+a(10))
+ & +zm**8*(loz**3/216d0+a(11)*loz**2+a(12)*loz+a(13))
+ return
+ end
+
+
+ function zbesselk3(z)
+ implicit none
+ double precision zbesselk3,z,b(0:14),loz,zm
+
+ data b(0) / 1.731646994704598580d0/
+ data b(1) / 5.934335971967835330d0/
+ data b(2) / 5.444874456485317730d0/
+ data b(3) /-1.268353005295401420d0/
+ data b(4) / 8.471041982558638170d0/
+ data b(5) /-3.026167526073320430d0/
+ data b(6) /-0.692088251323850355d0/
+ data b(7) / 2.809848746963509900d0/
+ data b(8) /-2.161466255000085060d0/
+ data b(9) /-0.104676472369316706d0/
+ data b(10)/ 0.381989731242156681d0/
+ data b(11)/-0.367492827636283900d0/
+ data b(12)/-0.007844362856415627d0/
+ data b(13)/ 0.027796539630842606d0/
+ data b(14)/-0.029917436634978395d0/
+
+
+ zm=z/2
+ loz=dlog(zm)
+
+ zbesselk3=loz**3+b(0)*loz**2+b(1)*loz+b(2)
+ & +zm**2*(loz**3+b(3)*loz**2+b(4)*loz+b(5))
+ & +zm**4*(loz**3/4d0+b(6)*loz**2+b(7)*loz+b(8))
+ & +zm**6*(loz**3/36d0+b(9)*loz**2+b(10)*loz+b(11))
+ & +zm**8*(loz**3/576d0+b(12)*loz**2+b(13)*loz+b(14))
+ zbesselk3=-zbesselk3
+
+ return
+ end
+
+
+ function fb(t)
+ implicit none
+ integer nn,nu
+ double precision fb,t,zz
+ common/nuorder/nn
+ common/zz/zz
+ nu=1
+ if(nn.eq.0) then
+ fb=dexp(-zz*dcosh(t))*dcosh(nu*t)
+ elseif(nn.eq.1) then
+ fb=dexp(-zz*dcosh(t))*t*dsinh(nu*t)
+ elseif(nn.eq.2) then
+ fb=dexp(-zz*dcosh(t))*t*t*dcosh(nu*t)
+ elseif(nn.eq.3) then
+ fb=dexp(-zz*dcosh(t))*t*t*t*dsinh(nu*t)
+ endif
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/smalls.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/smalls.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/smalls.f (revision 1338)
@@ -0,0 +1,50 @@
+CC NEW: cuts only on QCD partons
+
+ subroutine smalls(s,npart,*)
+c cut if radiated parton too close
+ implicit none
+ include 'constants.f'
+ include 'cutoff.f'
+ integer npart
+ double precision s(mxpart,mxpart)
+
+CC Case H->34
+
+ if (npart .eq. 3) then
+ if (
+ . (-s(1,5) .lt. cutoff)
+ . .or. (-s(2,5) .lt. cutoff)
+ . ) return 1
+
+ elseif (npart .eq. 4) then
+ if (
+ . (-s(1,5) .lt. cutoff)
+ . .or. (-s(2,5) .lt. cutoff)
+ . .or. (-s(1,6) .lt. cutoff)
+ . .or. (-s(2,6) .lt. cutoff)
+ . .or. (+s(5,6) .lt. cutoff)
+ . ) return 1
+
+CC Case H->3456
+
+ elseif (npart .eq. 5) then
+ if (
+ . (-s(1,7) .lt. cutoff)
+ . .or. (-s(2,7) .lt. cutoff)
+ . ) return 1
+
+ elseif (npart .eq. 6) then
+ if (
+ . (-s(1,7) .lt. cutoff)
+ . .or. (-s(2,7) .lt. cutoff)
+ . .or. (-s(1,8) .lt. cutoff)
+ . .or. (-s(2,8) .lt. cutoff)
+ . .or. (+s(7,8) .lt. cutoff)
+ . ) return 1
+ else
+ write(*,*)'ERROR in SMALLS'
+ stop
+ endif
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/myli3.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/myli3.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/myli3.f (revision 1338)
@@ -0,0 +1,22 @@
+ function myLI3(x)
+ implicit none
+ double precision myLI3,xlog,x,PI,Z3
+ PI=3.14159265358979312D0
+ Z3=1.20205690315959429D0
+
+ if (x.lt.0.5d0) then
+ xlog=dlog(1d0-x)
+ myLI3= -xlog -(3*xlog**2)/8.-(17*xlog**3)/216.-(5*xlog**4)/576
+ # - (7*xlog**5)/54000. + (7*xlog**6)/86400. + 19*xlog**7/5556600
+ # - xlog**8/752640-11*xlog**9/127008000+11*xlog**10/435456000
+ elseif (x.lt.1d0) then
+ xlog=dlog(x)
+ myLI3=Z3+(Pi**2*xlog)/6+(3d0/4-dlog(-xlog)/2)*xlog**2
+ # -xlog**3/12-xlog**4/288+xlog**6/86400-xlog**8/10160640
+ elseif (x.eq.1d0) then
+ myLI3=1.20205690315959429D0
+ else
+ write(6,*)'wrong argument of Li3!!'
+ endif
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/donothing_gvec.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/donothing_gvec.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/donothing_gvec.f (revision 1338)
@@ -0,0 +1,15 @@
+ subroutine donothing_gvec(p,n,in,msq)
+ implicit none
+ include 'constants.f'
+ integer j,k,in
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),n(4)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/setmb_msbar.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/setmb_msbar.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/setmb_msbar.f (revision 1338)
@@ -0,0 +1,52 @@
+ subroutine setmb_msbar
+c--- set up the value of the running b-mass in the MS-bar scheme,
+c--- evaluated at the pole mass (mb)
+c--- expressions are taken from
+c--- J.~Fleischer, F.~Jegerlehner, O.~V.~Tarasov and O.~L.~Veretin,
+c--- %``Two-loop {QCD} corrections of the massive fermion propagator,''
+c--- Nucl.\ Phys.\ B {\bf 539}, 671 (1999)
+c--- [Erratum-ibid.\ B {\bf 571}, 511 (2000)]
+c--- [arXiv:hep-ph/9803493].
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mb_msbar.f'
+ double precision alphas,amz,c1,c2,a,zeta3,i31
+ character*4 part
+ common/couple/amz
+ common/part/part
+ parameter(zeta3=1.202057d0)
+
+ if (mb_msbar .lt. 0d0) then
+ c1=4d0*Cf
+ c2=0d0
+c--- calculate the MS-bar mass from the pole mass
+ if (part .eq. 'lord') then
+ a=alphas(mb,amz,1)/(4d0*pi)
+ else
+ a=alphas(mb,amz,2)/(4d0*pi)
+ i31=3d0/2d0*zeta3-6d0*pisqo6*dlog(2d0)
+ c2=Cf*xn*(1111d0/24d0-8d0*pisqo6-4d0*i31)
+ . -Cf*half*dfloat(nf-1)*(71d0/6d0+8d0*pisqo6)
+ . +Cf**2*(121d0/8d0+30d0*pisqo6+8d0*i31)
+ . -12d0*Cf*half*(1d0-2d0*pisqo6)
+ endif
+ mb_msbar=mb/(1d0+c1*a+c2*a**2)
+ endif
+
+c--- For comparison, these were the choices made in previous publications:
+c--- mb(mb)=4.20 is our choice for the H+b paper
+c--- mb(mb)=4.25 is the value used in the Les Houches write-up
+
+ write(6,99) mb_msbar
+
+ return
+
+ 99 format(/,
+ . ' ************* Running b-mass at pole mass **********'/,
+ . ' * *'/,
+ . ' * mb_MSbar(mb) = ',f8.4,' *'/,
+ . ' ****************************************************')
+
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/countDYnew.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/countDYnew.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/countDYnew.f (revision 1338)
@@ -0,0 +1,1414 @@
+CC Counterterm to be subtracted from real+virt to get a finite
+CC cross section at qt->0
+
+C Version that allows to separate also qg channel
+
+C Scale dependence included up to NNLO
+
+ double precision function countint(vector,wgt)
+ implicit none
+ include 'constants.f'
+ include 'realonly.f'
+ include 'virtonly.f'
+ include 'noglue.f'
+ include 'vegas_common.f'
+ include 'ptilde.f'
+ include 'npart.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'zerowidth.f'
+ include 'efficiency.f'
+ include 'masses.f'
+ include 'limits.f'
+C
+ include 'jetlabel.f'
+ include 'qcdcouple.f'
+ include 'phasemin.f'
+ include 'rescoeff.f'
+ include 'dynamicscale.f'
+c P.S. to use grids
+ include 'APPLinclude.f'
+c double precision xCheck1,xCheck2,xCheck3,xCheck4,
+c * xCheck5,xCheck6,xCheck7
+c P.S. end
+C
+ integer ih1,ih2,j,k,l,nd,nmax,nmin,nvec,order
+ integer nproc
+ common/nproc/nproc
+ double precision vector(mxdim),W,val,xint
+ double precision sqrts,qtmax
+ double precision p(mxpart,4),pjet(mxpart,4),p1ext(4),p2ext(4)
+ double precision pswt,rscalestart,fscalestart
+ double precision s(mxpart,mxpart),wgt,msq(-nf:nf,-nf:nf)
+ double precision msqc(-nf:nf,-nf:nf),xmsq(0:maxd)
+ double precision flux,BrnRat,xreal,xreal2
+ double precision xx1,xx2,q(mxpart,4)
+ double precision m3,m4,m5,qtcut,xqtcut
+CC
+ logical cuts
+ double precision x1,x2,dot,ptrans(mxpart,4)
+ double precision q2,qt2,shat,Itilde
+ double precision fx10(-nf:nf),fx20(-nf:nf)
+ double precision fx1p(-nf:nf),fx2p(-nf:nf)
+ double precision alfa,beta,diff,Pqq,Pqg,Pqqint,Cqq,Cqg
+ double precision xjacq2,xjacqt2,xth,x3,almin,almax
+ double precision xmio,fluxborn,pswt0
+ double precision shad,yq,zmax,tauh,Vol,y3
+ double precision xx0(2),xx10,xx20
+ double precision sig1,sig2,LR,LF
+ double precision sig11,sig12
+ double precision sig21,sig22,sig23,sig24
+ double precision tdelta,tH1st,tH1stF,tgaga,tcga,tgamma2
+ double precision LL1,LL2,LL3,LL4
+ double precision z1,z2,diff1,diff2,cut
+ double precision D0int,D1int
+ double precision Pqqqq,Pqqqg,Pqggq,Pqggg
+ double precision CqqPqq,CqqPqg,CqgPgq,CqgPgg
+ double precision P2qg,P2qqV,P2qqbV,P2qqS
+ double precision diffg10,diffg20,diffc10,diffc20
+ double precision diffg1f,diffg2f,diffc1f,diffc2f
+ external Itilde,Pqq,Pqg,Cqq,Cqg,Pqqint,D0int,D1int
+ external Pqqqq,Pqqqg,Pqggq,Pqggg,CqqPqq,CqqPqg,CqgPgq,CqgPgg
+ external P2qqV,P2qqbV,P2qg,P2qqS
+
+ common/xmio/xmio
+ common/xx0/xx0
+ common/qtcut/xqtcut
+ common/nnlo/order
+C P.S. special temp arrays.
+ double precision weightDelta( -nf:nf, -nf:nf)
+
+ double precision weightvST ( -nf:nf, -nf:nf)
+ double precision weightv1ST( -nf:nf, -nf:nf)
+ double precision weightv2ST( -nf:nf, -nf:nf)
+
+ double precision weightvSTF ( -nf:nf, -nf:nf)
+ double precision weightv1STF( -nf:nf, -nf:nf)
+ double precision weightv2STF( -nf:nf, -nf:nf)
+
+ double precision weightvvGAGA ( -nf:nf, -nf:nf)
+ double precision weightvv1GAGA ( -nf:nf, -nf:nf)
+ double precision weightvv2GAGA ( -nf:nf, -nf:nf)
+ double precision weightvv12GAGA( -nf:nf, -nf:nf)
+
+ double precision weightvvTCG ( -nf:nf, -nf:nf)
+ double precision weightvv1TCG ( -nf:nf, -nf:nf)
+ double precision weightvv2TCG ( -nf:nf, -nf:nf)
+ double precision weightvv12TCG( -nf:nf, -nf:nf)
+C P.S. end
+CC
+CC Variables passed from virtint or lowint
+CC
+ common/count/qt2,q2,shat
+
+CC
+ integer n2,n3,sgnj,sgnk,flgq
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ common/xreal/xreal,xreal2
+ logical bin,first,failed
+ logical incldip(0:maxd),includedipole,includereal
+ logical creatent,dswhisto
+ common/density/ih1,ih2
+ common/energy/sqrts
+ common/bin/bin
+ common/Pext/p1ext,p2ext
+ common/nmax/nmax
+ common/BrnRat/BrnRat
+ common/nmin/nmin
+ common/incldip/incldip
+ common/outputflags/creatent,dswhisto
+ data p/48*0d0/
+ data first/.true./
+ save first,rscalestart,fscalestart
+ if (first) then
+ first=.false.
+ rscalestart=scale
+ fscalestart=facscale
+ endif
+ ntotshot=ntotshot+1
+ pswt=0d0
+ countint=0d0
+
+ do nd=0,1
+ xmsq(nd)=0d0
+ enddo
+
+ if(zerowidth) then
+
+CC Check if q2 is the proper interval
+
+ if(q2.lt.wsqmin.or.q2.gt.wsqmax) goto 999
+ xjacq2=pi*mass3*width3
+ else
+
+CC Generate q2 again, up to wsqmax
+
+ x3=vector(6)
+ q2=wsqmin+x3*(wsqmax-wsqmin)
+ xjacq2=wsqmax-wsqmin
+
+ endif
+
+CC Generate qt2 up to qtmax
+
+ xth=vector(3)
+
+CC Now compute qtcut from xqtcut
+
+ qtcut=xqtcut*dsqrt(q2)
+
+ if(xth.lt.0.02d0) goto 999
+ qt2=qtcut**2*dexp(1d0/xth-1)
+
+
+CC Jacobian for qt2
+
+ xjacqt2=1d0/xth**2*qt2
+
+
+
+ shad=sqrts**2
+
+ xmio=dsqrt(qt2/q2)
+
+ npart=3
+ nvec=npart+2
+
+ Vol=1d0
+
+
+CC Dynamic scale
+
+ if(dynamicscale) call scaleset(q2)
+
+CC LR,LF
+
+
+ LR=dlog(q2/scale**2)
+ LF=dlog(q2/facscale**2)
+
+
+
+
+CC LL1,LL2,LL3,LL4: large log (squared) corresponding to eq. (136)
+CC In this way normalization is fixed to dsigma/dqt2
+
+
+ LL1=Itilde(1)/q2**2
+ LL2=Itilde(2)/q2**2
+ LL3=Itilde(3)/q2**2
+ LL4=Itilde(4)/q2**2
+
+
+
+CC Generate BORN momenta for counterterm
+
+ call genBORN2(q2,shat,vector,ptrans,pswt0,*999)
+
+ call storeptilde(1,ptrans)
+
+CC Here we have to check if the counterevent passes the cuts
+
+ jets=0
+ incldip(1)=cuts(ptrans,0)
+ if (incldip(1)) goto 999
+
+CC Compute Born matrix element
+
+
+ if(nproc.eq.3)then
+ call qqb_z(ptrans,msqc)
+ else
+ call qqb_w(ptrans,msqc)
+ endif
+
+
+
+C Scaled momentum fractions
+
+ cut=1d-7
+
+
+ beta=cut+(1-cut)*vector(8)
+ alfa=cut+(1-cut)*vector(9)
+
+ xx10=xx0(1)
+ xx20=xx0(2)
+
+ z1=xx10**beta
+ z2=xx20**alfa
+
+
+c--- calculate PDF's
+
+c if(xx10.lt.1d-5)write(*,*)q2,xx10
+c if(xx20.lt.1d-5)write(*,*)q2,xx20
+
+ call fdist(ih1,xx10,facscale,fx10)
+ call fdist(ih2,xx20,facscale,fx20)
+
+ call fdist(ih1,xx10**(1-beta),facscale,fx1p)
+ call fdist(ih2,xx20**(1-alfa),facscale,fx2p)
+
+
+CC Switch off gluon !!
+
+ if(noglue) then
+ fx10(0)=0d0
+ fx20(0)=0d0
+ fx1p(0)=0d0
+ fx2p(0)=0d0
+ endif
+
+CC Gluon only !
+
+ if(ggonly) then
+ do j=1,5
+ fx10(j)=0d0
+ fx10(-j)=0d0
+ fx1p(j)=0d0
+ fx1p(-j)=0d0
+ fx20(j)=0d0
+ fx20(-j)=0d0
+ fx2p(j)=0d0
+ fx2p(-j)=0d0
+ enddo
+ endif
+
+ flgq=1
+ if(gqonly)flgq=0
+
+
+CC TIENI SOLO uubar
+c do j=-nf,1
+c fx10(j)=0d0
+c fx1p(j)=0d0
+c enddo
+c do j=3,nf
+c fx10(j)=0d0
+c fx1p(j)=0d0
+c enddo
+c do j=-nf,-3
+c fx20(j)=0d0
+c fx2p(j)=0d0
+c enddo
+c do j=-1,nf
+c fx20(j)=0d0
+c fx2p(j)=0d0
+c enddo
+CC
+
+
+C Flux for Born cross section
+
+
+ fluxborn=fbGeV2/(2*q2)
+
+c --- P.S. initialize array
+ if (creategrid.and.bin) then
+ do j=-nf,nf
+ do k=-nf,nf
+ weightDelta(j,k) = 0d0
+ weightb(j,k) = 0d0
+
+ weightv (j,k)=0d0
+ weightv1(j,k)=0d0
+ weightv2(j,k)=0d0
+
+ weightvST (j,k)=0d0
+ weightv1ST(j,k)=0d0
+ weightv2ST(j,k)=0d0
+
+ weightvSTF (j,k)=0d0
+ weightv1STF(j,k)=0d0
+ weightv2STF(j,k)=0d0
+
+ weightvv (j,k)=0d0
+ weightvv1(j,k)=0d0
+ weightvv2(j,k)=0d0
+ weightvv12(j,k)=0d0
+
+ weightvvGAGA (j,k)=0d0
+ weightvv1GAGA (j,k)=0d0
+ weightvv2GAGA (j,k)=0d0
+ weightvv12GAGA(j,k)=0d0
+
+ weightvvTCG (j,k)=0d0
+ weightvv1TCG (j,k)=0d0
+ weightvv2TCG (j,k)=0d0
+ weightvv12TCG(j,k)=0d0
+
+ enddo
+ enddo
+ weightfactor = 1d0
+ contrib = -100
+ endif
+c P.S end init..
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Start construction of the counterterm
+
+ tdelta=0d0
+ tH1st=0d0
+ tH1stF=0d0
+ tgaga=0d0
+ tcga=0d0
+ tgamma2=0d0
+
+ diffc10=0d0
+ diffc1f=0d0
+ diffc20=0d0
+ diffc2f=0d0
+
+ diffg10=0d0
+ diffg1f=0d0
+ diffg20=0d0
+ diffg2f=0d0
+
+ sig1=0d0
+ sig2=0d0
+
+ sig11=0d0
+ sig12=0d0
+ sig21=0d0
+ sig22=0d0
+ sig23=0d0
+ sig24=0d0
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if(msqc(j,k).eq.0d0) goto 75
+
+
+C Simplest term without convolutions
+
+ tdelta=tdelta+fx10(j)*fx20(k)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightDelta(j,k) = weightDelta(j,k) + msqc(j,k)*flgq
+ endif
+c---- P.S. end
+C Start H1st: to be used later
+
+C H1st delta term
+
+ tH1st=tH1st+2*C1qqdelta*fx10(j)*fx20(k)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvST(j,k) = weightvST(j,k) +
+ * 2*C1qqdelta*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+C H1st: non delta terms, first leg
+
+
+ tH1st=tH1st+(fx1p(j)*Cqq(z1)*flgq+fx1p(0)*Cqg(z1))
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv1ST(j,k) = weightv1ST(j,k) +
+ * Cqq(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightv1ST(0,k) = weightv1ST(0,k) +
+ * Cqg(z1) * (-dlog(xx10))*msqc(j,k)
+ endif
+c---- P.S. end
+
+C H1st: non delta terms, second leg
+
+
+ tH1st=tH1st+(fx2p(k)*Cqq(z2)*flgq+fx2p(0)*Cqg(z2))
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv2ST(j,k) = weightv2ST(j,k) +
+ * Cqq(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ weightv2ST(j,0) = weightv2ST(j,0) +
+ * Cqg(z2)*(-dlog(xx20))*msqc(j,k)
+ endif
+c---- P.S. end
+
+C H1st: muf dependence (LF factor to be added at the end)
+
+
+c gammaqq and gammaqg: first leg
+
+
+ diff=-dlog(xx10)
+ & *((fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)*flgq+fx1p(0)*Pqg(z1))
+ tH1stF=tH1stF+diff*fx20(k)*msqc(j,k)
+ tH1stF=tH1stF-Pqqint(xx10)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv1STF(j,k) = weightv1STF(j,k) +
+ * (-dlog(xx10))*Pqq(z1)*msqc(j,k) *flgq
+ weightv1STF(0,k) = weightv1STF(0,k) +
+ * (-dlog(xx10))*Pqg(z1) *msqc(j,k)
+ weightvSTF(j,k) = weightvSTF(j,k) +
+ * (dlog(xx10))*xx10**beta*Pqq(z1)*msqc(j,k)*flgq +
+ * (-Pqqint(xx10))*msqc(j,k) *flgq
+ endif
+c---- P.S. end
+c gammaqq and gammaqg: second leg
+
+
+ diff=-dlog(xx20)
+ & *((fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)*flgq+fx2p(0)*Pqg(z2))
+ tH1stF=tH1stF+diff*fx10(j)*msqc(j,k)
+ tH1stF=tH1stF-Pqqint(xx20)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv2STF(j,k) = weightv2STF(j,k) +
+ * (-dlog(xx20))*Pqq(z2)*msqc(j,k) *flgq
+ weightv2STF(j,0) = weightv2STF(j,0) +
+ * (-dlog(xx20))*Pqg(z2)*msqc(j,k)
+ weightvSTF(j,k) = weightvSTF(j,k) +
+ * (log(xx20))*xx20**alfa*Pqq(z2)*msqc(j,k)*flgq +
+ * (-Pqqint(xx20))*msqc(j,k) *flgq
+ endif
+c---- P.S. end
+
+CC End of H1st
+
+ if(order.eq.1) goto 75
+
+CC Now (gamma+gamma)*(gamma+gamma) term: to be used later
+
+C First part: one gamma for each leg: FLGQ here is non trivial ! DONE
+
+
+ diffg1f=-dlog(xx10)*(fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)
+ & - Pqqint(xx10)*fx10(j)
+
+
+ diffg10=-dlog(xx10)*fx1p(0)*Pqg(z1)
+
+ diffg2f=-dlog(xx20)*(fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)
+ & - Pqqint(xx20)*fx20(k)
+
+
+ diffg20=-dlog(xx20)*fx2p(0)*Pqg(z2)
+
+
+ tgaga=tgaga+2*
+ # (flgq*diffg10*diffg20+flgq*diffg1f*diffg2f
+ # +diffg10*diffg2f+diffg1f*diffg20)*msqc(j,k)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv2GAGA(j,0) = weightvv2GAGA(j,0) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))*
+ * (-dlog(xx20))*Pqg(z2)
+ * *msqc(j,k)*2 ! 1f * 20
+ weightvv12GAGA(j,0) = weightvv12GAGA(j,0) +
+ * (-dlog(xx10))*Pqq(z1)*(-dlog(xx20))*Pqg(z2)
+ * *msqc(j,k)*2 ! 1f * 20
+ weightvv1GAGA(0,k) = weightvv1GAGA(0,k) +
+ * (-dlog(xx10))*Pqg(z1)*
+ * (dlog(xx20)*xx20**alfa*Pqq(z2)-Pqqint(xx20))
+ * *msqc(j,k)*2 ! 10 * 2f
+ weightvv12GAGA(0,k) = weightvv12GAGA(0,k) +
+ * (-dlog(xx10))*Pqg(z1)*(-dlog(xx20))*Pqq(z2)
+ * *msqc(j,k)*2 ! 10 * 2f
+ weightvv12GAGA(j,k) = weightvv12GAGA(j,k) +
+ * (-dlog(xx10))*Pqq(z1)*(-dlog(xx20))*Pqq(z2)
+ * *msqc(j,k)*2 * flgq ! 1f * 2f
+ weightvvGAGA(j,k) = weightvvGAGA(j,k) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))*
+ * (dlog(xx20)*xx20**alfa*Pqq(z2)-Pqqint(xx20))
+ * *msqc(j,k)*2 * flgq ! 1f * 2f
+ weightvv1GAGA(j,k) = weightvv1GAGA(j,k) +
+ * (-dlog(xx10))*Pqq(z1)
+ * *(dlog(xx20)*xx20**alfa*Pqq(z2)-Pqqint(xx20))
+ * *msqc(j,k)*2 * flgq ! 1f * 2f
+ weightvv2GAGA(j,k) = weightvv2GAGA(j,k) +
+ * (-dlog(xx20))*Pqq(z2)
+ * *(dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))
+ * *msqc(j,k)*2 * flgq ! 1f * 2f
+ weightvv12GAGA(0,0) = weightvv12GAGA(0,0)+
+ * (-dlog(xx10))*Pqg(z1)*(-dlog(xx20))*Pqg(z2)
+ * *msqc(j,k)*2 * flgq ! 10 * 20
+ endif
+c---- P.S. end
+
+CC Second part: gamma*gamma terms
+
+c Pij * Pjk = D1ijjk (log(1-z)/(1-z))_+ + D0ijjk/(1-z)_+
+c + Pijjk(z) + Deltaijjk delta(1-z)
+
+C First leg
+
+
+ diff1=-dlog(xx10)*(flgq*(fx1p(j)-fx10(j)*xx10**beta)
+ & *(D0qqqq/(1-z1)+D1qqqq*dlog(1-z1)/(1-z1))
+ & +fx1p(j)*Pqqqq(z1)*flgq+fx1p(0)*(Pqqqg(z1)+Pqggg(z1)))
+ & +(Deltaqqqq-D0qqqq*D0int(xx10)-D1qqqq*D1int(xx10))
+ & *fx10(j)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1GAGA(0,k) = weightvv1GAGA(0,k) +
+ * (-dlog(xx10))*(Pqqqg(z1)+Pqggg(z1))*
+ * msqc(j,k)
+ weightvv1GAGA(j,k) = weightvv1GAGA(j,k) +
+ * (-dlog(xx10))*
+ * ((D0qqqq/(1-z1)+D1qqqq*dlog(1-z1)/(1-z1))+
+ * Pqqqq(z1))*
+ * msqc(j,k)*flgq
+ weightvvGAGA(j,k) = weightvvGAGA(j,k) +
+ * (Deltaqqqq-D0qqqq*D0int(xx10)-D1qqqq*D1int(xx10) +
+ * dlog(xx10)*xx10**beta*
+ * (D0qqqq/(1-z1)+D1qqqq*dlog(1-z1)/(1-z1)))*
+ * msqc(j,k)*flgq
+ endif
+c---- P.S. end
+
+C Second leg
+
+
+ diff2=-dlog(xx20)*(flgq*(fx2p(k)-fx20(k)*xx20**alfa)
+ & *(D0qqqq/(1-z2)+D1qqqq*dlog(1-z2)/(1-z2))
+ & +fx2p(k)*Pqqqq(z2)*flgq+fx2p(0)*(Pqqqg(z2)+Pqggg(z2)))
+ & +(Deltaqqqq-D0qqqq*D0int(xx20)-D1qqqq*D1int(xx20))
+ & *fx20(k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv2GAGA(j,0) = weightvv2GAGA(j,0) +
+ * (-dlog(xx20)) *(Pqqqg(z2)+Pqggg(z2))*
+ * msqc(j,k)
+ weightvv2GAGA(j,k) = weightvv2GAGA(j,k) +
+ * (-dlog(xx20))*
+ * ((D0qqqq/(1-z2)+D1qqqq*dlog(1-z2)/(1-z2))+
+ * Pqqqq(z2))*
+ * msqc(j,k)*flgq
+ weightvvGAGA(j,k) = weightvvGAGA(j,k) +
+ * (Deltaqqqq-D0qqqq*D0int(xx20)-D1qqqq*D1int(xx20)+
+ * dlog(xx20)*xx20**alfa*
+ * (D0qqqq/(1-z2)+D1qqqq*dlog(1-z2)/(1-z2)))*
+ * msqc(j,k)*flgq
+ endif
+c---- P.S. end
+
+C Include Pqggq
+
+ do l=1,nf
+ diff1=diff1-dlog(xx10)*(fx1p(l)+fx1p(-l))*Pqggq(z1)*flgq
+ diff2=diff2-dlog(xx20)*(fx2p(l)+fx2p(-l))*Pqggq(z2)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1GAGA(l,k) = weightvv1GAGA(l,k) +
+ * (-dlog(xx10))*Pqggq(z1)*msqc(j,k)*flgq
+ weightvv1GAGA(-l,k) = weightvv1GAGA(-l,k) +
+ * (-dlog(xx10))*Pqggq(z1)*msqc(j,k)*flgq
+ weightvv2GAGA(j,l) = weightvv2GAGA(j,l) +
+ * (-dlog(xx20))*Pqggq(z2)*msqc(j,k)*flgq
+ weightvv2GAGA(j,-l) = weightvv2GAGA(j,-l) +
+ * (-dlog(xx20))*Pqggq(z2)*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+ enddo
+
+ tgaga=tgaga+diff1*fx20(k)*msqc(j,k)
+ tgaga=tgaga+diff2*fx10(j)*msqc(j,k)
+
+
+
+C End of (gamma+gamma)*(gamma+gamma) term: FLGQ non trivial here ! DONE
+
+C Start (C+C)*(gamma+gamma) term
+
+c gamma first leg, C second leg
+
+
+ diffc2f=-dlog(xx20)*fx2p(k)*Cqq(z2)+C1qqdelta*fx20(k)
+
+ diffc20=-dlog(xx20)*fx2p(0)*Cqg(z2)
+
+
+ tcga=tcga+msqc(j,k)*
+ # (flgq*diffg10*diffc20+flgq*diffg1f*diffc2f
+ # +diffg10*diffc2f+diffg1f*diffc20)
+
+c---- P.S. save weight.
+ if(creategrid.and.bin)then
+ weightvv12TCG(j,0) = weightvv12TCG(j,0) +
+ * dlog(xx10)*Pqq(z1)*dlog(xx20)*Cqg(z2)*
+ * msqc(j,k) ! g1f * c20
+ weightvv2TCG(j,0) = weightvv2TCG(j,0) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))*
+ * (-dlog(xx20))*Cqg(z2)*
+ * msqc(j,k) ! g1f * c20
+
+ weightvv12TCG(0,k) = weightvv12TCG(0,k) +
+ * dlog(xx10)*Pqg(z1)*dlog(xx20)*Cqq(z2)*
+ * msqc(j,k) ! g10 * c2f
+ weightvv1TCG(0,k) = weightvv1TCG(0,k) +
+ * (-dlog(xx10))*Pqg(z1)*C1qqdelta*
+ * msqc(j,k) ! g10 * c2f
+
+ weightvv12TCG(0,0) = weightvv12TCG(0,0) +
+ * dlog(xx10)*Pqg(z1)*dlog(xx20)*Cqg(z2)*
+ * msqc(j,k) * flgq ! g10 * c20
+ weightvvTCG(j,k) = weightvvTCG(j,k) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))*C1qqdelta*
+ * msqc(j,k) * flgq ! g1f * c2f
+ weightvv12TCG(j,k) = weightvv12TCG(j,k) +
+ * dlog(xx10)*Pqq(z1)*dlog(xx20)*Cqq(z2)*
+ * msqc(j,k) * flgq ! g1f * c2f
+
+ weightvv1TCG(j,k) = weightvv1TCG(j,k) +
+ * (-dlog(xx10))*Pqq(z1)*C1qqdelta*
+ * msqc(j,k) * flgq ! g1f * c2f
+ weightvv2TCG(j,k) = weightvv2TCG(j,k) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))*
+ * (-dlog(xx20))*Cqq(z2)*
+ * msqc(j,k) * flgq ! g1f * c2f
+ endif
+c---- P.S. end
+
+c C first leg, gamma second leg
+
+ diffc1f=-dlog(xx10)*fx1p(j)*Cqq(z1)+C1qqdelta*fx10(j)
+
+ diffc10=-dlog(xx10)*fx1p(0)*Cqg(z1)
+
+ tcga=tcga+msqc(j,k)*
+ # (flgq*diffc10*diffg20+flgq*diffc1f*diffg2f
+ # +diffc10*diffg2f+diffc1f*diffg20)
+
+c---- P.S. save weight XXXXXXXXXXXXXXXXXXX
+ if(creategrid.and.bin)then
+ weightvv2TCG(j,k) = weightvv2TCG(j,k) +
+ * (-dlog(xx20))*Pqq(z2)*C1qqdelta*msqc(j,k) ! g2f * c1f
+ weightvv1TCG(j,k) = weightvv1TCG(j,k) +
+ * (dlog(xx20)*xx20**alfa*Pqq(z2)-Pqqint(xx20))*
+ * (-dlog(xx10))*Cqq(z1)*msqc(j,k) ! g2f * c1f
+ weightvv12TCG(j,k) = weightvv12TCG(j,k) +
+ * dlog(xx20)*Pqq(z2)*dlog(xx10)*Cqq(z1)*
+ * msqc(j,k) ! g2f * c1f
+ weightvvTCG(j,k) = weightvvTCG(j,k) +
+ * (dlog(xx20)*xx20**alfa*Pqq(z2)-Pqqint(xx20))*
+ * C1qqdelta*msqc(j,k) ! g2f * c1f
+
+ weightvv12TCG(0,k) = weightvv12TCG(0,k) +
+ * dlog(xx10)*Cqg(z1)*dlog(xx20)*Pqq(z2)*
+ * msqc(j,k) ! g2f * c10
+ weightvv1TCG(0,k) = weightvv1TCG(0,k) +
+ * (-dlog(xx10))*Cqg(z1)*(dlog(xx20)*xx20**alfa*Pqq(z2)
+ * - Pqqint(xx20))*
+ * msqc(j,k) ! g2f * c10
+
+ weightvv12TCG(j,0) = weightvv12TCG(j,0) +
+ * dlog(xx10)*Cqq(z1)*dlog(xx20)*Pqg(z2)*
+ * msqc(j,k) ! g20 * c1f
+
+ weightvv2TCG(j,0) = weightvv2TCG(j,0) +
+ * (-dlog(xx20))*Pqg(z2)*C1qqdelta*
+ * msqc(j,k) ! g20 * c1f
+
+
+ weightvv12TCG(0,0) = weightvv12TCG(0,0) +
+ * dlog(xx20)*Pqg(z2)*dlog(xx10)*Cqg(z1)*
+ * msqc(j,k) ! g20 * c10
+ endif
+c---- P.S. end..
+
+c C*gamma: first leg (ignore delta term in Cqq: taken into account with tH1stF)
+
+ tcga=tcga
+ & +(fx1p(j)*CqqPqq(z1)*flgq+fx1p(0)*(CqqPqg(z1)+CqgPgg(z1)))
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+c C*gamma: second leg (ignore delta term in Cqq: taken into account with tH1stF)
+
+ tcga=tcga
+ & +(fx2p(k)*CqqPqq(z2)*flgq+fx2p(0)*(CqqPqg(z2)+CqgPgg(z2)))
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1TCG(j,k) = weightvv1TCG(j,k) +
+ * CqqPqq(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv1TCG(0,k) = weightvv1TCG(0,k) +
+ * (CqqPqg(z1)+CqgPgg(z1))*(-dlog(xx10))*msqc(j,k)
+ weightvv2TCG(j,k) = weightvv2TCG(j,k) +
+ * CqqPqq(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ weightvv2TCG(j,0) = weightvv2TCG(j,0) +
+ * (CqqPqg(z2)+CqgPgg(z2))*(-dlog(xx20))*msqc(j,k)
+ endif
+c---- P.S. end
+
+c Add Cqg*Pgq contribution
+
+ do l=1,nf
+ tcga=tcga+(fx1p(l)+fx1p(-l))*CqgPgq(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tcga=tcga+(fx2p(l)+fx2p(-l))*CqgPgq(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1TCG(l,k) = weightvv1TCG(l,k) +
+ * CqgPgq(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv1TCG(-l,k) = weightvv1TCG(-l,k) +
+ * CqgPgq(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv2TCG(j,l) = weightvv2TCG(j,l) +
+ * CqgPgq(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ weightvv2TCG(j,-l) = weightvv2TCG(j,-l) +
+ * CqgPgq(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+ enddo
+
+CC Start 2-loop AP
+
+C Gluon + pure singlet
+
+
+ do l=-nf,nf
+ if(l.eq.0) then
+ tgamma2=tgamma2+fx1p(0)*P2qg(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+ tgamma2=tgamma2+fx2p(0)*P2qg(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1TCG(0,k) = weightvv1TCG(0,k) +
+ * P2qg(z1)*(-dlog(xx10))*msqc(j,k)
+ weightvv2TCG(j,0) = weightvv2TCG(j,0) +
+ * P2qg(z2)*(-dlog(xx20))*msqc(j,k)
+ endif
+c---- P.S. end
+ else
+ tgamma2=tgamma2+fx1p(l)*P2qqS(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tgamma2=tgamma2+fx2p(l)*P2qqS(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1TCG(l,k) = weightvv1TCG(l,k) +
+ * P2qqS(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv2TCG(j,l) = weightvv2TCG(j,l) +
+ * P2qqS(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+ endif
+ enddo
+
+
+C P2qq non-singlet: regular part
+
+ tgamma2=tgamma2+fx1p(j)*P2qqV(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tgamma2=tgamma2+fx2p(k)*P2qqV(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1TCG(j,k) = weightvv1TCG(j,k) +
+ * P2qqV(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv2TCG(j,k) = weightvv2TCG(j,k) +
+ * P2qqV(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+
+C P2qq non-singlet: 1/(1-z)_+
+
+
+ diff=-dlog(xx10)
+ & *(fx1p(j)-fx10(j)*xx10**beta)/(1-z1)
+ & - D0int(xx10)*fx10(j)
+
+ tgamma2=tgamma2+2d0/3*Kappa*diff*fx20(k)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1TCG(j,k) = weightvv1TCG(j,k) +
+ * (-dlog(xx10))/(1-z1)*
+ * 2d0/3*Kappa*msqc(j,k)*flgq
+ weightvvTCG(j,k) = weightvvTCG(j,k) +
+ * (dlog(xx10)*xx10**beta/(1-z1) - D0int(xx10))*
+ * 2d0/3*Kappa*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+
+ diff=-dlog(xx20)
+ & *(fx2p(k)-fx20(k)*xx20**alfa)/(1-z2)
+ & - D0int(xx20)*fx20(k)
+
+ tgamma2=tgamma2+2d0/3*Kappa*diff*fx10(j)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv2TCG(j,k) = weightvv2TCG(j,k) +
+ * (-dlog(xx20))/(1-z2)*
+ * 2d0/3*Kappa*msqc(j,k)*flgq
+ weightvvTCG(j,k) = weightvvTCG(j,k) +
+ * (dlog(xx20)*xx20**alfa/(1-z2) - D0int(xx20))*
+ * 2d0/3*Kappa*msqc(j,k)*flgq
+ endif
+c---- P.S. end....
+
+C P2qqb non singlet
+
+ tgamma2=tgamma2+fx1p(-j)*P2qqbV(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+
+ tgamma2=tgamma2+fx2p(-k)*P2qqbV(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1TCG(-j,k) = weightvv1TCG(-j,k) +
+ * P2qqbV(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv2TCG(j,-k) = weightvv2TCG(j,-k) +
+ * P2qqbV(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+
+ 75 continue
+
+ enddo
+ enddo
+
+
+CC First order
+
+ sig12=-0.5d0*A1q*tdelta
+ sig11=-B1q*tdelta-tH1stF
+c---- P.S. save weight
+ do j=-nf,nf
+ do k=-nf,nf
+ weightv(j,k)=weightv(j,k)
+ * -0.5d0*A1q*weightDelta(j,k)*LL2
+ * -(B1q*weightDelta(j,k)+weightvSTF(j,k))*LL1
+ weightv1(j,k)=weightv1(j,k)
+ * -weightv1STF(j,k)*LL1
+ weightv2(j,k)=weightv2(j,k)
+ * -weightv2STF(j,k)*LL1
+ enddo
+ enddo
+c---- P.S. end.
+
+CC Second order
+
+ sig24=(A1q)**2/8*tdelta
+
+ sig23=-beta0*A1q/3*tdelta-0.5d0*A1q*sig11
+c---- P.S. save weight
+ do j=-nf,nf
+ do k=-nf,nf
+ weightvv(j,k)=weightvv(j,k)+
+ * ((A1q)**2/8*LL4+(-beta0*A1q/3+B1q*0.5d0*A1q)*LL3)
+ * *weightDelta(j,k)+
+ * (0.5d0*A1q)*weightvSTF(j,k)*LL3
+ weightvv1(j,k)=weightvv1(j,k)+
+ * 0.5d0*A1q*weightv1STF(j,k)*LL3
+ weightvv2(j,k)=weightvv2(j,k)+
+ * 0.5d0*A1q*weightv2STF(j,k)*LL3
+ enddo
+ enddo
+c---- P.S. end.
+
+ sig22=0.5d0*(beta0*A1q*LR-A2q)*tdelta
+ & -0.5d0*A1q*(tH1st+LF*tH1stF)
+ & -0.5d0*(B1q-beta0)*sig11
+ & +0.5d0*B1q*tH1stF
+ & +0.5d0*tgaga
+
+c---- P.S. save weight
+ do j=-nf,nf
+ do k=-nf,nf
+ weightvv(j,k)=weightvv(j,k)+
+ * 0.5d0*(beta0*A1q*LR-A2q)*weightDelta(j,k)*LL2
+ * -0.5d0*(B1q-beta0)*(-B1q)*weightDelta(j,k)*LL2
+ * -0.5d0*(B1q-beta0)*(-1d0)*weightvSTF(j,k)*LL2
+ weightvv1(j,k)=weightvv1(j,k)
+ * -0.5d0*(B1q-beta0)*(-1d0)*weightv1STF(j,k)*LL2
+ weightvv2(j,k)=weightvv2(j,k)
+ * -0.5d0*(B1q-beta0)*(-1d0)*weightv2STF(j,k)*LL2
+ weightvv(j,k)=weightvv(j,k)+
+ * (-0.5d0*A1q)*(weightvST(j,k)+LF*weightvSTF(j,k))*LL2
+ * +0.5d0*B1q*weightvSTF(j,k)*LL2
+ weightvv1(j,k)=weightvv1(j,k)+
+ * (-0.5d0*A1q)*(weightv1ST(j,k)+LF*weightv1STF(j,k))*LL2
+ * +0.5d0*B1q*weightv1STF(j,k)*LL2
+ weightvv2(j,k)=weightvv2(j,k)+
+ * (-0.5d0*A1q)*(weightv2ST(j,k)+LF*weightv2STF(j,k))*LL2
+ * +0.5d0*B1q*weightv2STF(j,k)*LL2
+ weightvv(j,k)=weightvv(j,k)+
+ * 0.5d0*weightvvGAGA(j,k)*LL2
+ weightvv1(j,k)=weightvv1(j,k)+
+ * 0.5d0*weightvv1GAGA(j,k)*LL2
+ weightvv2(j,k)=weightvv2(j,k)+
+ * 0.5d0*weightvv2GAGA(j,k)*LL2
+ weightvv12(j,k)=weightvv12(j,k)+
+ * 0.5d0*weightvv12GAGA(j,k)*LL2
+ enddo
+ enddo
+c---- P.S. end.
+
+
+ sig21=-beta0*LR*sig11-B1q*(tH1st+LF*tH1stF)
+ & -LF*tgaga-B2q*tdelta+beta0*tH1st-tcga-tgamma2
+
+c---- P.S. save weight
+ do j=-nf,nf
+ do k=-nf,nf
+ weightvv(j,k)=weightvv(j,k)
+ * +(-B2q-2*Delta2qq+beta0*LR*B1q)*weightDelta(j,k)*LL1
+ weightvv(j,k)=weightvv(j,k)
+ * +(beta0*LR-B1q*LF-C1qqdelta)*weightvSTF(j,k)*LL1
+ weightvv1(j,k)=weightvv1(j,k)
+ * +(beta0*LR-B1q*LF-C1qqdelta)*weightv1STF(j,k)*LL1
+ weightvv2(j,k)=weightvv2(j,k)
+ * +(beta0*LR-B1q*LF-C1qqdelta)*weightv2STF(j,k)*LL1
+ weightvv(j,k)=weightvv(j,k)
+ * +(-B1q+beta0)*weightvST(j,k)*LL1
+ weightvv1(j,k)=weightvv1(j,k)
+ * +(-B1q+beta0)*weightv1ST(j,k)*LL1
+ weightvv2(j,k)=weightvv2(j,k)
+ * +(-B1q+beta0)*weightv2ST(j,k)*LL1
+ weightvv(j,k)=weightvv(j,k)
+ * -(LF*weightvvGAGA(j,k)+weightvvTCG(j,k))*LL1
+ weightvv1(j,k)=weightvv1(j,k)
+ * -(LF*weightvv1GAGA(j,k)+weightvv1TCG(j,k))*LL1
+ weightvv2(j,k)=weightvv2(j,k)
+ * -(LF*weightvv2GAGA(j,k)+weightvv2TCG(j,k))*LL1
+ weightvv12(j,k)=weightvv12(j,k)
+ * -(LF*weightvv12GAGA(j,k)+weightvv12TCG(j,k))*LL1
+ enddo
+ enddo
+c---- P.S. end.
+
+c Include missing delta term from C*gamma (no factor 2 here !)
+
+ sig21=sig21-C1qqdelta*tH1stF
+
+
+C Include missing term from contact term in 2 loop AP
+
+ sig21=sig21-2*Delta2qq*tdelta
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+CC Include as/pi factors and sum O(as) and O(as^2) contributions
+
+ sig1=sig12*LL2+sig11*LL1
+ sig2=sig24*LL4+sig23*LL3+sig22*LL2+sig21*LL1
+
+
+ sig1=sig1*ason2pi*2
+ sig2=sig2*(ason2pi*2)**2
+
+ if(order.eq.1)then
+ xmsq(1)=-sig1
+ else
+ xmsq(1)=-(sig1+sig2)
+ endif
+
+c xmsq(1)=sig1+sig2
+
+CC Include iacobians
+
+ xmsq(1)=xmsq(1)*xjacqt2*xjacq2*q2/shad/Vol
+
+
+ countint=0d0
+ xint=0d0
+
+
+C Multiply by BORN phase space weight
+
+ xmsq(1)=xmsq(1)*fluxborn*pswt0/BrnRat
+
+
+ 77 continue
+
+
+
+c---Add to total
+
+ xint=xmsq(1)
+ val=xmsq(1)*wgt
+c---- P.S. correct to ason2pi factor
+ do j=-nf,nf
+ do k=-nf,nf
+ weightvv(j,k) =4*weightvv(j,k)
+ weightvv1(j,k) =4*weightvv1(j,k)
+ weightvv2(j,k) =4*weightvv2(j,k)
+ weightvv12(j,k) =4*weightvv12(j,k)
+ weightv(j,k) =2*weightv(j,k)
+ weightv1(j,k) =2*weightv1(j,k)
+ weightv2(j,k) =2*weightv2(j,k)
+ enddo
+ enddo
+c---- P.S. end
+
+c---if we're binning, add to histo too
+ if (bin) then
+ call getptildejet(1,pjet)
+ call dotem(nvec,pjet,s)
+ val=val/dfloat(itmx)
+c P.S. writing out the common block
+ if (creategrid.and.bin) then ! P.S. scale with factor
+ if(order.eq.1)then
+ contrib = 300
+ elseif(order.eq.2)then
+ contrib = 400
+ endif
+ weightfactor = (-1d0)*xjacqt2*xjacq2*q2*fluxborn*pswt0
+ * *wgt/(shad*Vol*BrnRat*dfloat(itmx))
+ ag_xx1 = xx10
+ ag_xx2 = xx20
+ ag_x1z = xx10**(1-beta)
+ ag_x2z = xx20**(1-alfa)
+ ag_scale = facscale
+ refwt = val
+ refwt2 = val*val*dfloat(itmx)
+c$$$ xCheck1=0d0
+c$$$ xCheck2=0d0
+c$$$ xCheck3=0d0
+c$$$ xCheck4=0d0
+c$$$ xCheck5=0d0
+c$$$ xCheck6=0d0
+c$$$ xCheck7=0d0
+c$$$ do j=-nf,nf
+c$$$ do k=-nf,nf
+c$$$ xCheck1 = xCheck1
+c$$$ * + weightv(j,k)* fx10(j)*fx20(k) *
+c$$$ * weightfactor*ason2pi
+c$$$ xCheck2 = xCheck2
+c$$$ * + weightv1(j,k)* fx1p(j)*fx20(k) *
+c$$$ * weightfactor*ason2pi
+c$$$ xCheck3 = xCheck3
+c$$$ * + weightv2(j,k)* fx10(j)*fx2p(k) *
+c$$$ * weightfactor*ason2pi
+c$$$ if (order.eq.2)then
+c$$$ xCheck4 = xCheck4
+c$$$ * + weightvv(j,k)* fx10(j)*fx20(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ xCheck5 = xCheck5
+c$$$ * + weightvv1(j,k)* fx1p(j)*fx20(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ xCheck6 = xCheck6
+c$$$ * + weightvv2(j,k)* fx10(j)*fx2p(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ xCheck7 = xCheck7
+c$$$ * + weightvv12(j,k)* fx1p(j)*fx2p(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ endif
+c$$$ enddo
+c$$$ enddo
+c$$$ print *," --- countDYnew "
+c$$$ print *," ** ", xCheck1,xCheck2,xCheck3,xCheck4,
+c$$$ * xCheck5,xCheck6,xCheck7
+c$$$ print *," ** : ",refwt,
+c$$$ * refwt/(xCheck1+xCheck2+xCheck3+xCheck4+
+c$$$ * xCheck5+xCheck6+xCheck7)
+ endif
+c P.S.
+ call plotter(ptrans,val,1)
+C call plotter(p,val,0)
+ endif
+
+
+ countint=xint
+
+ xreal=xreal+xint*wgt/dfloat(itmx)
+ xreal2=xreal2+(xint*wgt)**2/dfloat(itmx)
+
+ return
+
+ 999 countint=0d0
+ ntotzero=ntotzero+1
+
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+CC qq splitting function (with asopi normalization)
+
+ function Pqq(z)
+ implicit none
+ real *8 Pqq,z
+ Pqq=2d0/3*(1+z**2)/(1-z)
+ return
+ end
+
+CC qg splitting function (with asopi normalization)
+
+ function Pqg(z)
+ implicit none
+ real *8 Pqg,z
+ Pqg=0.25d0*(1-2*z*(1-z))
+ return
+ end
+
+CC Non delta term in Cqq coefficient (with asopi normalization)
+
+ function Cqq(z)
+ implicit none
+ real *8 Cqq,z
+ Cqq=2d0/3*(1-z)
+ return
+ end
+
+
+CC Cqg coefficient (with asopi normalization)
+
+ function Cqg(z)
+ implicit none
+ real *8 Cqg,z
+ Cqg=0.5d0*z*(1-z)
+ return
+ end
+
+
+CC Integral of Pqq=1/2 CF (1+x^2)/(1-x) from 0 to z
+
+ function Pqqint(z)
+ implicit none
+ real *8 Pqqint,z
+ Pqqint=-2d0/3*(z+z**2/2+2*dlog(1-z))
+ return
+ end
+
+CC Integral of 1/(1-x) from 0 to z
+
+ function D0int(z)
+ implicit none
+ real *8 D0int,z
+ D0int=-dlog(1-z)
+ return
+ end
+
+CC Integral of log(1-x)/(1-x) from 0 to z
+
+ function D1int(z)
+ implicit none
+ real *8 D1int,z
+ D1int=-0.5d0*dlog(1-z)**2
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C P*P convolutions
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Regular part of Pqq*Pqq (checked !)
+
+ function Pqqqq(z)
+ implicit none
+ real *8 Pqqqq,z
+ Pqqqq=4d0/9*(-4*dlog(z)/(1-z)-2*(1-z)
+ & +(1+z)*(3*dlog(z)-4*dlog(1-z)-3))
+ return
+ end
+
+
+CC Pqq*Pqg (checked !)
+
+ function Pqqqg(z)
+ implicit none
+ real *8 Pqqqg,z
+ Pqqqg=1d0/3*((z**2+(1-z)**2)*dlog((1-z)/z)
+ & -(z-0.5d0)*dlog(z)+z-0.25d0)
+ return
+ end
+
+CC Pqg*Pgq (checked !)
+
+ function Pqggq(z)
+ implicit none
+ real *8 Pqggq,z
+ Pqggq=1d0/3*(2d0/3/z+(1+z)*dlog(z)-2d0/3*z**2-0.5d0*(z-1))
+ return
+ end
+
+
+CC Full Pqg*Pgg (checked !)
+
+ function Pqggg(z)
+ implicit none
+ real *8 Pqggg,z,beta0,Pqg
+ integer nf
+ external Pqg
+ nf=5
+ beta0=(33-2*nf)/12d0
+ Pqggg=1.5d0*(1/3d0/z+(z**2-z+0.5d0)*dlog(1-z)
+ & +(2*z+0.5d0)*dlog(z)+0.25d0+2*z-31d0/12*z**2)
+
+ Pqggg=Pqggg+beta0*Pqg(z)
+ return
+ end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C C*P convolutions
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Cqq*Pqq (without delta term in Cqq) (checked !)
+
+ function CqqPqq(z)
+ implicit none
+ real *8 CqqPqq,z
+ CqqPqq=2d0/9*(1-z)*(4*dlog(1-z)-2*dlog(z)-1)
+ return
+ end
+
+CC Cqq*Pqg (without delta term in Cqq) (checked !)
+
+ function CqqPqg(z)
+ implicit none
+ real *8 CqqPqg,z
+ CqqPqg=(-2+z+z**2-(1+2*z)*dlog(z))/6d0
+ return
+ end
+
+CC Cqg*Pgq (checked !)
+
+ function CqgPgq(z)
+ implicit none
+ real *8 CqgPgq,z
+ CqgPgq=(1d0/3/z-1+2*z**2/3-z*dlog(z))/3d0
+ return
+ end
+
+CC Cqg*Pgg (checked !)
+
+ function CqgPgg(z)
+ implicit none
+ real *8 CqgPgg,z,beta0
+ integer nf
+ nf=5
+ beta0=(33-2*nf)/12d0
+ CqgPgg=3d0/4*(2*z*(1-z)*dlog(1-z)-4*z*dlog(z)
+ & +1d0/3/z-1-5*z+17d0*z**2/3)+beta0/2*z*(1-z)
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C Two loop AP: pqq of ESW is my 3/2 Pqq
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Pqq NS: Eq. (4.107) ESW (no 1/(1-x)_+ and delta term)
+
+ function P2qqV(x)
+ implicit none
+ real *8 x,P2qqV,Pqq,pi
+ integer nf
+ external Pqq
+
+ pi=3.14159265358979d0
+ nf=5
+
+ P2qqV=16d0/9*(-(2*dlog(x)*dlog(1-x)+1.5d0*dlog(x))*3d0/2*Pqq(x)
+ & -(1.5d0+3.5d0*x)*dlog(x)-0.5d0*(1+x)*dlog(x)**2-5*(1-x))
+ & +4*((0.5d0*dlog(x)**2+11d0/6*dlog(x))*3d0/2*Pqq(x)
+ & -(67d0/18-pi**2/6)*(1+x)
+ & +(1+x)*dlog(x)+20d0/3*(1-x))
+ & +2d0/3d0*nf*(-dlog(x)*Pqq(x)+10d0/9*(1+x)-4d0/3*(1-x))
+
+c Change to as/pi normalization
+
+ P2qqV=P2qqV/4
+
+ return
+ end
+
+
+C Pqqb NS: Eq. (4.108) ESW
+
+ function P2qqbV(x)
+ implicit none
+ real *8 x,P2qqbV,Pqq,S2
+ external Pqq,S2
+
+ P2qqbV=-2d0/9*(3d0*Pqq(-x)*S2(x)+2*(1+x)*dlog(x)+4*(1-x))
+
+c Change to as/pi normalization
+
+ P2qqbV=P2qqbV/4
+
+ return
+ end
+
+
+
+C Pqg Singlet: Eq. (4.110) ESW (ESW Pqg is 4 times my Pqg)
+
+ function P2qg(x)
+ implicit none
+ real *8 x,P2qg,Pqg,pi,S2,logx,logomxsx
+ external Pqg,S2
+
+ pi=3.14159265358979d0
+ logx=dlog(x)
+ logomxsx=dlog((1-x)/x)
+
+ P2qg=2d0/3*(4-9*x-(1-4*x)*logx-(1-2*x)*logx**2+4*dlog(1-x)
+ & +(2*logomxsx**2-4*logomxsx-2d0/3*pi**2+10d0)*4*Pqg(x))
+ & +1.5d0*(182d0/9+14d0/9*x+40d0/9/x+(136d0/3*x-38d0/3)*logx
+ & -4*dlog(1-x)-(2+8*x)*logx**2+8*Pqg(-x)*S2(x)
+ & +(-logx**2+44d0/3*logx-2*dlog(1-x)**2+4*dlog(1-x)+pi**2/3
+ & -218d0/9)*4*Pqg(x))
+
+c Change to as/pi normalization
+
+ P2qg=P2qg/4d0
+
+c Divide by 2 to eliminate 2nf factor
+
+ P2qg=P2qg/2d0
+
+ return
+ end
+
+C Pqq Pure Singlet appearing in ESW Eq. (4.95)
+C PSqq=PSqqb
+C Obtained through Eq.(4.101)
+C PSqq=1/2/nf (P2qq-P2qqbV-P2qqV) (contains only CF TR=2/3)
+
+ function P2qqS(x)
+ implicit none
+ real *8 P2qqS,x
+
+ P2qqS=2d0/3*(20 - 18*x + 54*x**2 - 56*x**3
+ & +3*x*(3 + 15*x + 8*x**2)*dlog(x)
+ & - 9*x*(1 + x)*dlog(x)**2)/(9*x)
+
+ P2qqS=P2qqS/4
+
+ return
+ end
+
+
+C S2: Eq. (4.114) ESW
+
+ function S2(x)
+ implicit none
+ real *8 x,pi,S2,myli2
+ external myli2
+ pi=3.14159265358979d0
+
+ S2=-2*myli2(-x)+0.5d0*dlog(x)**2-2*dlog(x)*dlog(1+x)-pi**2/6
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/virtint.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/virtint.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/virtint.f (revision 1338)
@@ -0,0 +1,663 @@
+ double precision function virtint(r,wgt)
+ implicit none
+ include 'constants.f'
+ include 'noglue.f'
+ include 'vegas_common.f'
+ include 'sprods_com.f'
+ include 'npart.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'agq.f'
+ include 'PR_new.f'
+ include 'PR_cs_new.f'
+ include 'msq_cs.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'clustering.f'
+ include 'efficiency.f'
+ include 'lc.f'
+ include 'process.f'
+ include 'maxwt.f'
+ include 'limits.f'
+ include 'b0.f'
+ include 'dynamicscale.f'
+c P.S. to use grids
+ include 'ptilde.f'
+ include 'APPLinclude.f'
+ double precision psCR, f_X1overZ, f_X2overZ !, xCheck
+ double precision msqv0(-nf:nf,-nf:nf)
+c P.S. end
+ double precision mqq(0:2,fn:nf,fn:nf)
+ double precision msqx(0:2,-nf:nf,-nf:nf,-nf:nf,-nf:nf)
+ double precision msqx_cs(0:2,-nf:nf,-nf:nf)
+ double precision AP(-1:1,-1:1,3)
+CC
+CC Variables to be passed to the counterterm
+CC
+ double precision qt2,qq2,shat,dot
+ common/count/qt2,qq2,shat
+CC
+
+ integer ih1,ih2,j,k,cs,nvec,is,ia,ib,ic
+ double precision p(mxpart,4),pjet(mxpart,4),r(mxdim),W,sqrts,xmsq,
+ . val,fx1(-nf:nf),fx2(-nf:nf),fx1z(-nf:nf),fx2z(-nf:nf)
+ double precision pswt,xjac,rscalestart,fscalestart,
+ . wgt,msq(-nf:nf,-nf:nf),msqv(-nf:nf,-nf:nf),msqvdk(-nf:nf,-nf:nf),
+ . msq_qq,msq_aa,msq_aq,msq_qa,msq_qg,msq_gq,epcorr
+ double precision xx(2),z,x1onz,x2onz,flux,omz,
+ . BrnRat,xmsq_old,tmp
+ integer nshot,rvcolourchoice,sgnj,sgnk
+ logical bin,first,includedipole
+ character*4 mypart
+ common/density/ih1,ih2
+ common/energy/sqrts
+ common/bin/bin
+ common/x1x2/xx
+ common/BrnRat/BrnRat
+ common/rvcolourchoice/rvcolourchoice
+ common/mypart/mypart
+ integer nproc
+ common/nproc/nproc
+
+ data p/48*0d0/
+ data nshot/1/
+ data first/.true./
+ save first,rscalestart,fscalestart
+ if (first) then
+ first=.false.
+ rscalestart=scale
+ fscalestart=facscale
+ endif
+
+ ntotshot=ntotshot+1
+ virtint=0d0
+
+ W=sqrts**2
+
+ npart=3
+ call gen3(r,p,pswt,*999)
+ qq2=2*dot(p,3,4)
+ qt2=p(5,1)**2+p(5,2)**2
+
+
+ shat=2*dot(p,1,2)
+
+
+ nvec=npart+2
+
+C Dynamic scale
+
+ if(dynamicscale) call scaleset(qq2)
+
+
+ call dotem(nvec,p,s)
+
+c---impose mass cuts on final state
+ call masscuts(s,*999)
+c----reject event if any s(i,j) is too small
+ call smalls(s,npart,*999)
+
+c--- see whether this point will pass cuts - if it will not, do not
+c--- bother calculating the matrix elements for it, instead bail out
+ if (includedipole(0,p) .eqv. .false.) then
+ goto 999
+ endif
+
+
+ z=r(ndim)**2
+ if (nshot .eq. 1) z=0.95d0
+ xjac=two*dsqrt(z)
+
+ omz=1d0-z
+
+ flux=fbGeV2/(2d0*xx(1)*xx(2)*W)
+
+c--- to test poles, we need colourchoice=0, but save real value
+ if (nshot .eq. 1) then
+ rvcolourchoice=colourchoice
+ colourchoice=0
+ endif
+
+ 12 continue
+c--- point to restart from when checking epsilon poles
+
+c--- correction to epinv from AP subtraction when mu_FAC != mu_REN,
+c--- corresponding to subtracting -1/epinv*Pab*log(musq_REN/musq_FAC)
+ epcorr=epinv+2d0*dlog(scale/facscale)
+
+
+ AP(q,q,1)=+ason2pi*Cf*1.5d0*epcorr
+ AP(q,q,2)=+ason2pi*Cf*(-1d0-z)*epcorr
+ AP(q,q,3)=+ason2pi*Cf*2d0/omz*epcorr
+ AP(a,a,1)=+ason2pi*Cf*1.5d0*epcorr
+ AP(a,a,2)=+ason2pi*Cf*(-1d0-z)*epcorr
+ AP(a,a,3)=+ason2pi*Cf*2d0/omz*epcorr
+
+ AP(q,g,1)=0d0
+ AP(q,g,2)=ason2pi*Tr*(z**2+omz**2)*epcorr
+ AP(q,g,3)=0d0
+ AP(a,g,1)=0d0
+ AP(a,g,2)=ason2pi*Tr*(z**2+omz**2)*epcorr
+ AP(a,g,3)=0d0
+
+ AP(g,q,1)=0d0
+ AP(g,q,2)=ason2pi*Cf*(1d0+omz**2)/z*epcorr
+ AP(g,q,3)=0d0
+ AP(g,a,1)=0d0
+ AP(g,a,2)=ason2pi*Cf*(1d0+omz**2)/z*epcorr
+ AP(g,a,3)=0d0
+
+ AP(g,g,1)=+ason2pi*b0*epcorr
+ AP(g,g,2)=+ason2pi*xn*2d0*(1d0/z+z*omz-2d0)*epcorr
+ AP(g,g,3)=+ason2pi*xn*2d0/omz*epcorr
+
+
+ do ia=-1,+1
+ do ib=-1,+1
+ do ic=-1,+1
+ do is=1,3
+ Q1(ia,ib,ic,is)=0d0
+ Q2(ia,ib,ic,is)=0d0
+ do cs=0,2
+ R1(ia,ib,ic,cs,is)=0d0
+ R2(ia,ib,ic,cs,is)=0d0
+c do j=1,8
+c S1(ia,ib,ic,j,cs,is)=0d0
+c S2(ia,ib,ic,j,cs,is)=0d0
+c enddo
+ enddo
+ enddo
+ enddo
+ enddo
+ enddo
+
+c--- Calculate the required matrix elements
+
+ if(nproc.eq.3) then
+ call qqb_z1jet(p,msq)
+cccccc P.S. call qqb_z1jet_v(p,msqv)
+ call qqb_z1jet_v(p,msqv,msqv0) ! P.S. modified to catch alphas^2
+ call qqb_z1jet_z(p,z)
+ else
+ call qqb_w_g(p,msq)
+ccccc P.S. call qqb_w1jet_v(p,msqv)
+ call qqb_w1jet_v(p,msqv,msqv0) ! P.S. modified to catch alphas^2
+ call qqb_w1jet_z(p,z)
+ endif
+
+
+ 777 continue
+ xmsq=0d0
+
+c P.S. initialise grids
+ if (creategrid.and.bin) then
+ do j=-nf,nf
+ do k=-nf,nf
+ weightv(j,k) = 0d0
+ weightvv(j,k) = 0d0
+ weightvv1(j,k) = 0d0
+ weightvv2(j,k) = 0d0
+ enddo
+ enddo
+ weightfactor = 1d0
+ f_X1overZ = 0d0
+ f_X2overZ = 0d0
+ contrib = -100
+ endif
+c P.S. end
+
+ call fdist(ih1,xx(1),facscale,fx1)
+ call fdist(ih2,xx(2),facscale,fx2)
+
+ do j=-nf,nf
+ fx1z(j)=0d0
+ fx2z(j)=0d0
+ enddo
+
+ if (z .gt. xx(1)) then
+ x1onz=xx(1)/z
+ call fdist(ih1,x1onz,facscale,fx1z)
+C P.S.
+ f_X1overZ = 1d0
+C P.S.
+ endif
+ if (z .gt. xx(2)) then
+ x2onz=xx(2)/z
+ call fdist(ih2,x2onz,facscale,fx2z)
+C P.S.
+ f_X2overZ = 1d0
+C P.S.
+ endif
+
+
+CC TIENI SOLO uubar
+c do j=-nf,1
+c fx1(j)=0d0
+c fx1z(j)=0d0
+c enddo
+c do j=3,nf
+c fx1(j)=0d0
+c fx1z(j)=0d0
+c enddo
+c do j=-nf,-3
+c fx2(j)=0d0
+c fx2z(j)=0d0
+c enddo
+c do j=-1,nf
+c fx2(j)=0d0
+c fx2z(j)=0d0
+c enddo
+CC
+
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+
+ if (ggonly) then
+ if ((j.ne.0) .or. (k.ne.0)) goto 20
+ endif
+
+ if (gqonly) then
+ if (((j.eq.0).and.(k.eq.0)) .or. ((j.ne.0).and.(k.ne.0))) goto 20
+ endif
+
+ if (noglue) then
+ if ((j.eq.0) .or. (k.eq.0)) goto 20
+ endif
+
+
+ tmp=xmsq
+
+c--- The variables R1 and R2 provide the Regular and Plus pieces associated
+c--- with radiation from leg 1 (R1(a,b,c,cs,is)) and leg 2 (R2(a,b,c,cs,is))
+c--- In each case the parton labelling is using the normal QM notation of
+c--- putting everything backward
+c--- emitted line after emission = a
+c--- emitter before emission = b
+c--- spectator = c
+c--- There is no label for he or she who is emitted.
+c--- Note that in general each piece will be composed of many different
+c--- dipole contributions
+
+
+c--- SUM BY TOTAL MATRIX ELEMENTS: everything else
+C--QQ
+ if ((j .gt. 0) .and. (k.gt.0)) then
+ xmsq=xmsq+(msqv(j,k)
+ & + msq(j,k)*(one+AP(q,q,1)-AP(q,q,3)+Q1(q,q,q,1)-Q1(q,q,q,3)
+ & +AP(q,q,1)-AP(q,q,3)+Q2(q,q,q,1)-Q2(q,q,q,3)))
+ & *fx1(j)*fx2(k)
+ & +(msq(j,k)*(AP(q,q,2)+AP(q,q,3)+Q1(q,q,q,2)+Q1(q,q,q,3))
+ & + msq(g,k)*(AP(g,q,2)+Q1(g,q,q,2)))*fx1z(j)/z*fx2(k)
+ & +(msq(j,k)*(AP(q,q,2)+AP(q,q,3)+Q2(q,q,q,2)+Q2(q,q,q,3))
+ & + msq(j,g)*(AP(g,q,2)+Q2(g,q,q,2)))*fx1(j)*fx2z(k)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(j,k) = weightv(j,k) +
+ & msqv(j,k) - msqv0(j,k) + msq(j,k)
+ weightvv(j,k) = weightvv(j,k) +
+ & msqv0(j,k) +
+ & msq(j,k)*(zip+AP(q,q,1)-AP(q,q,3)+Q1(q,q,q,1)-Q1(q,q,q,3)
+ & +AP(q,q,1)-AP(q,q,3)+Q2(q,q,q,1)-Q2(q,q,q,3))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & (msq(j,k)*(AP(q,q,2)+AP(q,q,3)+Q1(q,q,q,2)+Q1(q,q,q,3)))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & ( msq(g,k)*(AP(g,q,2)+Q1(g,q,q,2))) !*fx1z(j)/z*fx2(k)
+ weightvv2(j,k) = weightvv2(j,k) +
+ & (msq(j,k)*(AP(q,q,2)+AP(q,q,3)+Q2(q,q,q,2)+Q2(q,q,q,3)))
+ weightvv2(j,k) = weightvv2(j,k) +
+ & ( msq(j,g)*(AP(g,q,2)+Q2(g,q,q,2))) !*fx1(j)*fx2z(k)/z
+ endif
+C--QbarQbar
+ elseif ((j .lt. 0) .and. (k.lt.0)) then
+ xmsq=xmsq+(msqv(j,k)
+ & + msq(j,k)*(one+AP(a,a,1)-AP(a,a,3)+Q1(a,a,a,1)-Q1(a,a,a,3)
+ & +AP(a,a,1)-AP(a,a,3)+Q2(a,a,a,1)-Q2(a,a,a,3)))
+ & *fx1(j)*fx2(k)
+ & +(msq(j,k)*(AP(a,a,2)+AP(a,a,3)+Q1(a,a,a,2)+Q1(a,a,a,3))
+ & + msq(g,k)*(AP(g,a,2)+Q1(g,a,a,2)))*fx1z(j)/z*fx2(k)
+ & +(msq(j,k)*(AP(a,a,2)+AP(a,a,3)+Q2(a,a,a,2)+Q2(a,a,a,3))
+ & + msq(j,g)*(AP(g,a,2)+Q2(g,a,a,2)))*fx1(j)*fx2z(k)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(j,k) = weightv(j,k) +
+ & msqv(j,k) - msqv0(j,k) + msq(j,k)
+ weightvv(j,k) = weightvv(j,k) +
+ & msqv0(j,k) +
+ & msq(j,k)*(zip+AP(a,a,1)-AP(a,a,3)+Q1(a,a,a,1)-Q1(a,a,a,3)
+ & +AP(a,a,1)-AP(a,a,3)+Q2(a,a,a,1)-Q2(a,a,a,3))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & (msq(j,k)*(AP(a,a,2)+AP(a,a,3)+Q1(a,a,a,2)+Q1(a,a,a,3)))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & ( msq(g,k)*(AP(g,a,2)+Q1(g,a,a,2))) !*fx1z(j)/z*fx2(k)
+ weightvv2(j,k) = weightvv2(j,k) +
+ & (msq(j,k)*(AP(a,a,2)+AP(a,a,3)+Q2(a,a,a,2)+Q2(a,a,a,3)))
+ weightvv2(j,k) = weightvv2(j,k) +
+ & ( msq(j,g)*(AP(g,a,2)+Q2(g,a,a,2))) !*fx1(j)*fx2z(k)/z
+ endif
+C--QQbar
+ elseif ((j .gt. 0) .and. (k.lt.0)) then
+ xmsq=xmsq+(msqv(j,k)
+ & + msq(j,k)*(one+AP(q,q,1)-AP(q,q,3)+Q1(q,q,a,1)-Q1(q,q,a,3)
+ & +AP(a,a,1)-AP(a,a,3)+Q2(a,a,q,1)-Q2(a,a,q,3)))
+ & *fx1(j)*fx2(k)
+ & +(msq(j,k)*(AP(q,q,2)+AP(q,q,3)+Q1(q,q,a,3)+Q1(q,q,a,2))
+ & + msq(g,k)*(AP(g,q,2)+Q1(g,q,a,2)))*fx1z(j)/z*fx2(k)
+ & +(msq(j,k)*(AP(a,a,2)+AP(a,a,3)+Q2(a,a,q,3)+Q2(a,a,q,2))
+ & + msq(j,g)*(AP(g,a,2)+Q2(g,a,q,2)))*fx1(j)*fx2z(k)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(j,k) = weightv(j,k) +
+ & msqv(j,k) - msqv0(j,k) + msq(j,k)
+ weightvv(j,k) = weightvv(j,k) +
+ & msqv0(j,k) +
+ & msq(j,k)*(zip+AP(q,q,1)-AP(q,q,3)+Q1(q,q,a,1)-Q1(q,q,a,3)
+ & +AP(a,a,1)-AP(a,a,3)+Q2(a,a,q,1)-Q2(a,a,q,3))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & (msq(j,k)*(AP(q,q,2)+AP(q,q,3)+Q1(q,q,a,3)+Q1(q,q,a,2)))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & ( msq(g,k)*(AP(g,q,2)+Q1(g,q,a,2))) !*fx1z(j)/z*fx2(k)
+ weightvv2(j,k) = weightvv2(j,k) +
+ & (msq(j,k)*(AP(a,a,2)+AP(a,a,3)+Q2(a,a,q,3)+Q2(a,a,q,2)))
+ weightvv2(j,k) = weightvv2(j,k) +
+ & ( msq(j,g)*(AP(g,a,2)+Q2(g,a,q,2)))!*fx1(j)*fx2z(k)/z
+ endif
+
+ elseif ((j .lt. 0) .and. (k.gt.0)) then
+C--QbarQ
+ xmsq=xmsq+(msqv(j,k)
+ & +msq(j,k)*(one+AP(a,a,1)-AP(a,a,3)+Q1(a,a,q,1)-Q1(a,a,q,3)
+ & +AP(q,q,1)-AP(q,q,3)+Q2(q,q,a,1)-Q2(q,q,a,3)))
+ & *fx1(j)*fx2(k)
+ & +(msq(j,k)*(AP(a,a,3)+AP(a,a,2)+Q1(a,a,q,3)+Q1(a,a,q,2))
+ & + msq(g,k)*(AP(g,a,2)+Q1(g,a,q,2)))*fx1z(j)/z*fx2(k)
+ & +(msq(j,k)*(AP(q,q,3)+AP(q,q,2)+Q2(q,q,a,3)+Q2(q,q,a,2))
+ & + msq(j,g)*(AP(g,q,2)+Q2(g,q,a,2)))*fx1(j)*fx2z(k)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(j,k) = weightv(j,k) +
+ & msqv(j,k) - msqv0(j,k) + msq(j,k)
+ weightvv(j,k) = weightvv(j,k) +
+ & msqv0(j,k) +
+ & msq(j,k)*(zip+AP(a,a,1)-AP(a,a,3)+Q1(a,a,q,1)-Q1(a,a,q,3)
+ & +AP(q,q,1)-AP(q,q,3)+Q2(q,q,a,1)-Q2(q,q,a,3))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & (msq(j,k)*(AP(a,a,3)+AP(a,a,2)+Q1(a,a,q,3)+Q1(a,a,q,2)))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & ( msq(g,k)*(AP(g,a,2)+Q1(g,a,q,2))) !*fx1z(j)/z*fx2(k)
+ weightvv2(j,k) = weightvv2(j,k) +
+ & (msq(j,k)*(AP(q,q,3)+AP(q,q,2)+Q2(q,q,a,3)+Q2(q,q,a,2)))
+ weightvv2(j,k) = weightvv2(j,k) +
+ & ( msq(j,g)*(AP(g,q,2)+Q2(g,q,a,2))) !*fx1(j)*fx2z(k)/z
+ endif
+
+ elseif ((j .eq. g) .and. (k.eq.g)) then
+C--gg
+
+ msq_qg=msq(+5,g)+msq(+4,g)+msq(+3,g)+msq(+2,g)+msq(+1,g)
+ & +msq(-5,g)+msq(-4,g)+msq(-3,g)+msq(-2,g)+msq(-1,g)
+ msq_gq=msq(g,+5)+msq(g,+4)+msq(g,+3)+msq(g,+2)+msq(g,+1)
+ & +msq(g,-5)+msq(g,-4)+msq(g,-3)+msq(g,-2)+msq(g,-1)
+ xmsq=xmsq+(msqv(g,g)
+ & +msq(g,g)*(one+AP(g,g,1)-AP(g,g,3)+Q1(g,g,g,1)-Q1(g,g,g,3)
+ & +AP(g,g,1)-AP(g,g,3)+Q2(g,g,g,1)-Q2(g,g,g,3)))
+ & *fx1(g)*fx2(g)
+ & +(msq(g,g)*(AP(g,g,2)+AP(g,g,3)+Q1(g,g,g,2)+Q1(g,g,g,3))
+ & + msq_qg*(AP(q,g,2)+Q1(q,g,g,2)))*fx1z(g)/z*fx2(g)
+ & +(msq(g,g)*(AP(g,g,2)+AP(g,g,3)+Q2(g,g,g,2)+Q2(g,g,g,3))
+ & + msq_gq*(AP(q,g,2)+Q2(q,g,g,2)))*fx1(g)*fx2z(g)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(j,k) = weightv(j,k) +
+ & msqv(j,k) - msqv0(j,k) + msq(j,k)
+ weightvv(j,k) = weightvv(j,k) +
+ & msqv0(j,k) +
+ & msq(g,g)*(zip+AP(g,g,1)-AP(g,g,3)+Q1(g,g,g,1)-Q1(g,g,g,3)
+ & +AP(g,g,1)-AP(g,g,3)+Q2(g,g,g,1)-Q2(g,g,g,3))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & (msq(g,g)*(AP(g,g,2)+AP(g,g,3)+Q1(g,g,g,2)+Q1(g,g,g,3))
+ & + msq_qg*(AP(q,g,2)+Q1(q,g,g,2)))!*fx1z(g)/z*fx2(g)
+
+ weightvv2(j,k) = weightvv2(j,k) +
+ & (msq(g,g)*(AP(g,g,2)+AP(g,g,3)+Q2(g,g,g,2)+Q2(g,g,g,3))
+ & + msq_gq*(AP(q,g,2)+Q2(q,g,g,2))) !*fx1(g)*fx2z(g)/z
+ endif
+
+ elseif (j .eq. g) then
+C--gQ
+ if (k .gt. 0) then
+ msq_aq=msq(-1,k)+msq(-2,k)+msq(-3,k)+msq(-4,k)+msq(-5,k)
+ msq_qq=msq(+1,k)+msq(+2,k)+msq(+3,k)+msq(+4,k)+msq(+5,k)
+ xmsq=xmsq+(msqv(g,k)
+ & +msq(g,k)*(one+AP(g,g,1)-AP(g,g,3)+Q1(g,g,q,1)-Q1(g,g,q,3)
+ & +AP(q,q,1)-AP(q,q,3)+Q2(q,q,g,1)-Q2(q,q,g,3)))
+ & *fx1(g)*fx2(k)
+ & +(msq(g,k)*(AP(g,g,2)+AP(g,g,3)+Q1(g,g,q,2)+Q1(g,g,q,3))
+ & + msq_aq*(AP(a,g,2)+Q1(a,g,q,2))
+ & + msq_qq*(AP(q,g,2)+Q1(q,g,q,2)))*fx1z(g)/z*fx2(k)
+ & +(msq(g,k)*(AP(q,q,2)+AP(q,q,3)+Q2(q,q,g,2)+Q2(q,q,g,3))
+ & + msq(g,g)*(AP(g,q,2)+Q2(g,q,g,2)))*fx1(g)*fx2z(k)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(g,k) = weightv(g,k) +
+ & msqv(g,k) - msqv0(g,k) + msq(g,k)
+ weightvv(g,k) = weightvv(g,k) +
+ & msqv0(g,k) +
+ & msq(g,k)*(zip+AP(g,g,1)-AP(g,g,3)+Q1(g,g,q,1)-Q1(g,g,q,3)
+ & +AP(q,q,1)-AP(q,q,3)+Q2(q,q,g,1)-Q2(q,q,g,3))
+ weightvv1(g,k) = weightvv1(g,k) +
+ & (msq(g,k)*(AP(g,g,2)+AP(g,g,3)+Q1(g,g,q,2)+Q1(g,g,q,3))
+ & + msq_aq*(AP(a,g,2)+Q1(a,g,q,2))
+ & + msq_qq*(AP(q,g,2)+Q1(q,g,q,2)))!*fx1z(g)/z*fx2(k)
+ weightvv2(g,k) = weightvv2(g,k) +
+ & (msq(g,k)*(AP(q,q,2)+AP(q,q,3)+Q2(q,q,g,2)+Q2(q,q,g,3))
+ & + msq(g,g)*(AP(g,q,2)+Q2(g,q,g,2))) !*fx1(g)*fx2z(k)/z
+ endif
+
+
+C--gQbar
+
+ elseif (k.lt.0) then
+ msq_qa=msq(+1,k)+msq(+2,k)+msq(+3,k)+msq(+4,k)+msq(+5,k)
+ msq_aa=msq(-1,k)+msq(-2,k)+msq(-3,k)+msq(-4,k)+msq(-5,k)
+ xmsq=xmsq+(msqv(g,k)
+ & +msq(g,k)*(one+AP(g,g,1)-AP(g,g,3)+Q1(g,g,a,1)-Q1(g,g,a,3)
+ & +AP(a,a,1)-AP(a,a,3)+Q2(a,a,g,1)-Q2(a,a,g,3)))
+ & *fx1(g)*fx2(k)
+ & +(msq(g,k)*(AP(g,g,2)+AP(g,g,3)+Q1(g,g,a,2)+Q1(g,g,a,3))
+ & + msq_qa*(AP(q,g,2)+Q1(q,g,a,2))
+ & + msq_aa*(AP(a,g,2)+Q1(a,g,a,2)))*fx1z(g)/z*fx2(k)
+ & +(msq(g,k)*(AP(a,a,2)+AP(a,a,3)+Q2(a,a,g,2)+Q2(a,a,g,3))
+ & + msq(g,g)*(AP(g,a,2)+Q2(g,a,g,2)))*fx1(g)*fx2z(k)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(g,k) = weightv(g,k) +
+ & msqv(g,k) - msqv0(g,k) + msq(g,k)
+ weightvv(g,k) = weightvv(g,k) +
+ & msqv0(g,k) +
+ & msq(g,k)*(zip+AP(g,g,1)-AP(g,g,3)+Q1(g,g,a,1)-Q1(g,g,a,3)
+ & +AP(a,a,1)-AP(a,a,3)+Q2(a,a,g,1)-Q2(a,a,g,3))
+ weightvv1(g,k) = weightvv1(g,k) +
+ & (msq(g,k)*(AP(g,g,2)+AP(g,g,3)+Q1(g,g,a,2)+Q1(g,g,a,3))
+ & + msq_qa*(AP(q,g,2)+Q1(q,g,a,2))
+ & + msq_aa*(AP(a,g,2)+Q1(a,g,a,2))) !*fx1z(g)/z*fx2(k)
+ weightvv2(g,k) = weightvv2(g,k) +
+ & (msq(g,k)*(AP(a,a,2)+AP(a,a,3)+Q2(a,a,g,2)+Q2(a,a,g,3))
+ & + msq(g,g)*(AP(g,a,2)+Q2(g,a,g,2)))!*fx1(g)*fx2z(k)/z
+ endif
+ endif
+C--Qg
+ elseif (k .eq. g) then
+ if (j.gt.0) then
+ msq_qa=msq(j,-1)+msq(j,-2)+msq(j,-3)+msq(j,-4)+msq(j,-5)
+ msq_qq=msq(j,+1)+msq(j,+2)+msq(j,+3)+msq(j,+4)+msq(j,+5)
+ xmsq=xmsq+(msqv(j,g)
+ & +msq(j,g)*(one
+ & +AP(q,q,1)-AP(q,q,3)+Q1(q,q,g,1)-Q1(q,q,g,3)
+ & +AP(g,g,1)-AP(g,g,3)+Q2(g,g,q,1)-Q2(g,g,q,3)))
+ & *fx1(j)*fx2(g)
+ & +(msq(j,g)*(AP(q,q,2)+AP(q,q,3)+Q1(q,q,g,2)+Q1(q,q,g,3))
+ & + msq(g,g)*(AP(g,q,2)+Q1(g,q,g,2)))*fx1z(j)/z*fx2(g)
+ & +(msq(j,g)*(AP(g,g,2)+AP(g,g,3)+Q2(g,g,q,2)+Q2(g,g,q,3))
+ & + msq_qa*(AP(a,g,2)+Q2(a,g,q,2))
+ & + msq_qq*(AP(q,g,2)+Q2(q,g,q,2)))*fx1(j)*fx2z(g)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(j,k) = weightv(j,k) +
+ & msqv(j,k) - msqv0(j,k) + msq(j,k)
+ weightvv(j,k) = weightvv(j,k) +
+ & msqv0(j,k) +
+ & msq(j,g)*(zip
+ & +AP(q,q,1)-AP(q,q,3)+Q1(q,q,g,1)-Q1(q,q,g,3)
+ & +AP(g,g,1)-AP(g,g,3)+Q2(g,g,q,1)-Q2(g,g,q,3))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & (msq(j,g)*(AP(q,q,2)+AP(q,q,3)+Q1(q,q,g,2)+Q1(q,q,g,3))
+ & + msq(g,g)*(AP(g,q,2)+Q1(g,q,g,2)))!*fx1z(j)/z*fx2(g)
+ weightvv2(j,k) = weightvv2(j,k) +
+ & (msq(j,g)*(AP(g,g,2)+AP(g,g,3)+Q2(g,g,q,2)+Q2(g,g,q,3))
+ & + msq_qa*(AP(a,g,2)+Q2(a,g,q,2))
+ & + msq_qq*(AP(q,g,2)+Q2(q,g,q,2)))!*fx1(j)*fx2z(g)/z
+ endif
+C--Qbarg
+ elseif (j.lt.0) then
+ msq_aq=msq(j,+1)+msq(j,+2)+msq(j,+3)+msq(j,+4)+msq(j,+5)
+ msq_aa=msq(j,-1)+msq(j,-2)+msq(j,-3)+msq(j,-4)+msq(j,-5)
+ xmsq=xmsq+(msqv(j,g)
+ & +msq(j,g)*(one+AP(a,a,1)-AP(a,a,3)+Q1(a,a,g,1)-Q1(a,a,g,3)
+ & +AP(g,g,1)-AP(g,g,3)+Q2(g,g,a,1)-Q2(g,g,a,3)))
+ & *fx1(j)*fx2(g)
+ & +(msq(j,g)*(AP(a,a,2)+AP(a,a,3)+Q1(a,a,g,2)+Q1(a,a,g,3))
+ & + msq(g,g)*(AP(g,a,2)+Q1(g,a,g,2)))*fx1z(j)/z*fx2(g)
+ & +(msq(j,g)*(AP(g,g,2)+AP(g,g,3)+Q2(g,g,a,3)+Q2(g,g,a,2))
+ & + msq_aq*(AP(q,g,2)+Q2(q,g,a,2))
+ & + msq_aa*(AP(a,g,2)+Q2(a,g,a,2)))*fx1(j)*fx2z(g)/z
+ if(creategrid.and.bin)then !P.S. APPLgrid
+ weightv(j,k) = weightv(j,k) +
+ & msqv(j,k) - msqv0(j,k) + msq(j,k)
+ weightvv(j,k) = weightvv(j,k) +
+ & msqv0(j,k) +
+ & msq(j,g)*(zip+AP(a,a,1)-AP(a,a,3)+Q1(a,a,g,1)-Q1(a,a,g,3)
+ & +AP(g,g,1)-AP(g,g,3)+Q2(g,g,a,1)-Q2(g,g,a,3))
+ weightvv1(j,k) = weightvv1(j,k) +
+ & (msq(j,g)*(AP(a,a,2)+AP(a,a,3)+Q1(a,a,g,2)+Q1(a,a,g,3))
+ & + msq(g,g)*(AP(g,a,2)+Q1(g,a,g,2))) !*fx1z(j)/z*fx2(g)
+ weightvv2(j,k) = weightvv2(j,k) +
+ & (msq(j,g)*(AP(g,g,2)+AP(g,g,3)+Q2(g,g,a,3)+Q2(g,g,a,2))
+ & + msq_aq*(AP(q,g,2)+Q2(q,g,a,2))
+ & + msq_aa*(AP(a,g,2)+Q2(a,g,a,2))) !*fx1(j)*fx2z(g)/z
+ endif
+ endif
+
+ endif
+
+ if (j .gt. 0) then
+ sgnj=+1
+ elseif (j .lt. 0) then
+ sgnj=-1
+ else
+ sgnj=0
+ endif
+ if (k .gt. 0) then
+ sgnk=+1
+ elseif (k .lt. 0) then
+ sgnk=-1
+ else
+ sgnk=0
+ endif
+
+
+ 20 continue
+
+ enddo
+ enddo
+
+
+ virtint=flux*xjac*pswt*xmsq/BrnRat
+
+
+
+c--- code to check that epsilon poles cancel
+ if (nshot .eq. 1) then
+ if (xmsq .eq. 0d0) goto 999
+ xmsq_old=xmsq
+ nshot=nshot+1
+ epinv=0d0
+ epinv2=0d0
+c epinv=1d0
+c epinv2=1d0
+ goto 12
+ elseif (nshot .eq. 2) then
+ nshot=nshot+1
+
+ if (abs(xmsq_old/xmsq-1d0) .gt. 1d-6) then
+CC if (abs(xmsq_old/xmsq-1d0) .gt. 1d-4) then
+ write(6,*) 'epsilon fails to cancel'
+ write(6,*) 'xmsq (epinv=large) = ',xmsq_old
+ write(6,*) 'xmsq (epinv=zero ) = ',xmsq
+c stop
+ else
+ write(6,*) 'Poles cancelled!'
+ colourchoice=rvcolourchoice
+ endif
+ endif
+
+ call getptildejet(0,pjet)
+
+ call dotem(nvec,pjet,s)
+
+
+ val=virtint*wgt
+c--- update the maximum weight so far, if necessary
+ if (val .gt. wtmax) then
+ wtmax=val
+ endif
+
+ if (bin) then
+ val=val/dfloat(itmx)
+c P.S. storing virt weight to common block
+ if (creategrid.and.bin) then
+ psCR = 1d0/ason2pi
+
+ do j=-nf,nf
+ do k=-nf,nf
+ weightv(j,k)=weightv(j,k)*psCR
+ weightvv(j,k)=weightvv(j,k)*psCR**2
+ weightvv1(j,k)=weightvv1(j,k)*psCR**2*f_X1overZ/z
+ weightvv2(j,k)=weightvv2(j,k)*psCR**2*f_X2overZ/z
+ enddo
+ enddo
+ contrib = 350
+ weightfactor = flux*xjac*pswt*wgt/BrnRat/dfloat(itmx)
+ ag_xx1 = xx(1)
+ ag_xx2 = xx(2)
+ ag_x1z = x1onz
+ ag_x2z = x2onz
+ ag_scale = facscale
+ refwt = val
+ refwt2 = val*val*dfloat(itmx)
+c$$$ xCheck=0d0
+c$$$ do j=-nf,nf
+c$$$ do k=-nf,nf
+c$$$ xCheck = xCheck + weightv(j,k)
+c$$$ * * fx1(j)*fx2(k) * weightfactor*ason2pi
+c$$$ xCheck = xCheck
+c$$$ * + weightvv(j,k)* fx1(j)*fx2(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ xCheck = xCheck
+c$$$ * + weightvv1(j,k)* fx1z(j)*fx2(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ xCheck = xCheck
+c$$$ * + weightvv2(j,k)* fx1(j)*fx2z(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ enddo
+c$$$ enddo
+c$$$ print *," ** virtint : ", refwt, xCheck, refwt/xCheck
+ endif
+c P.S. end
+ call plotter(pjet,val,0)
+ endif
+
+ return
+
+ 999 continue
+ ntotzero=ntotzero+1
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/setup.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/setup.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/setup.f (revision 1338)
@@ -0,0 +1,510 @@
+ subroutine setup
+ implicit none
+ include 'constants.f'
+ include 'virtonly.f'
+ include 'realonly.f'
+ include 'noglue.f'
+ include 'lc.f'
+ include 'cutoff.f'
+ include 'maxwt.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'zerowidth.f'
+ include 'removebr.f'
+ include 'clustering.f'
+ include 'gridinfo.f'
+ include 'limits.f'
+ include 'alfacut.f'
+ include 'pdfiset.f'
+ include 'qcdcouple.f'
+ include 'zcouple.f'
+ include 'nlooprun.f'
+ include 'rescoeff.f'
+ include 'jetcuts.f'
+ include 'flags.f'
+ include 'dipolescale.f'
+CC P.S.
+ include 'ptilde.f'
+ include 'APPLinclude.f'
+CC
+CC
+ include 'vegas_common.f'
+ include 'nwz.f'
+ include 'ewcharge.f'
+ include 'dynamicscale.f'
+ include 'lhapdf.f'
+ character *2 plabel(mxpart)
+ common/plabel/plabel
+ integer order,notag,nqcdjets,nqcdstart,isub,nproc,ndec,nd
+ common/nnlo/order
+ common/notag/notag
+ common/nqcdjets/nqcdjets,nqcdstart
+ common/isub/isub
+ double precision BrnRat,gamgambr,wwbr,zzbr,br0
+ common/BrnRat/BrnRat
+ common/nproc/nproc
+
+ double precision xqtcut
+ common/qtcut/xqtcut
+
+ double precision beta1,H2qqdelta,H2qqD0
+ common/Hstcoeff/beta1,H2qqdelta,H2qqD0
+
+ logical isol
+ common/isol/isol
+
+C Labels that identify the charged leptons
+
+ integer i1,i2
+ common/isolabel/i1,i2
+
+ logical int
+ common/int/int
+
+ logical dorebin
+ common/dorebin/dorebin
+
+ character *50 prefix
+ character *36 pdfstring
+ integer nset
+ common/prefix/nset,prefix
+ common/pdfstring/pdfstring
+
+ character*4 part
+ character*30 runstring
+ integer j
+ logical makecuts
+ integer nmin,nmax,n2,n3,n30
+ integer ih1,ih2,itmx1,itmx2,ncall1,ncall2,idum,rseed
+ double precision rtsmin,sroot,LT
+ double precision Mwmin,Mwmax
+ double precision Rcut
+ double precision ran2,randummy
+ double precision cmass,bmass
+ double precision mass2,width2,mass3,width3,vmass
+ double precision amz,alphas
+ double precision brwen,brzee,brtau,brtop
+
+ character *3 str1
+ character *10 str2
+ character *38 str3
+ character *50 string
+
+
+ common/couple/amz
+
+ common/breit/n2,n3,mass2,width2,mass3,width3
+
+ common/nmin/nmin
+ common/nmax/nmax
+ common/rtsmin/rtsmin
+ common/mwminmax/Mwmin,Mwmax
+
+
+ common/part/part
+ common/runstring/runstring
+ common/energy/sroot
+ common/density/ih1,ih2
+ common/iterat/itmx1,ncall1,itmx2,ncall2
+ common/ranno/idum
+
+
+ common/Rcut/Rcut
+ common/makecuts/makecuts
+
+ common/qmass/cmass,bmass
+
+ common/rseed/rseed
+ save /ranno/
+
+ logical lhapdfs
+ common/lhapdfs/lhapdfs
+
+ lhapdfs=.false.
+
+ isol=.false.
+
+ virtonly=.false.
+ realonly=.false.
+
+ noglue=.false.
+ ggonly=.false.
+ gqonly=.false.
+
+ nmin=1
+ nmax=2
+
+ clustering=.true.
+ colourchoice=0
+ rtsmin=40d0
+ cutoff=0.001d0
+
+CC
+
+ Qflag=.true.
+ Gflag=.true.
+
+CC
+ aii=1d0
+ aif=1d0
+ afi=1d0
+ aff=1d0
+
+ inclusive=.true.
+
+CC Parameters used to define jets
+CC Logical variable 'algorithm' can be taken to be 'ktal', 'ankt' or 'cone'
+
+ algorithm='ankt'
+
+ ptjetmin=0d0
+ etajetmin=0d0
+ etajetmax=20d0
+
+ Rcut=0.4d0
+
+CC Dynamic scale (if true muf=mur=q)
+
+ dynamicscale=.false.
+
+ removebr=.false.
+ makecuts=.true.
+
+
+CC Adjust the grid at each iteration
+
+ dorebin=.true.
+
+
+CC Read a previously saved grid
+
+ readin=.false.
+
+
+ writeout=.false.
+ ingridfile=''
+ outgridfile=''
+
+CC Read inputfile
+
+
+ read(*,*) sroot
+ read(*,*) ih1,ih2
+ read(*,*) nproc !decay mode
+ read(*,*) scale,facscale ! mur,muf
+ read(*,*) order
+ read(*,*) part
+ read(*,*) zerowidth
+ read(*,*) Mwmin,Mwmax
+ read(*,*) itmx1,ncall1
+ read(*,*) itmx2,ncall2
+ read(*,*) rseed ! seed
+ read(*,*) iset,nset
+ read(*,*) PDFname,PDFmember
+ read(*,*) runstring
+C P.S. applgrid modification
+ read(*,*) creategrid ! applgrid production
+C P.S. end
+
+CC Set all factorization scales to facscale
+CC to avoid problems when dynamicscale=.false.
+
+ do nd=0,40
+ dipscale(nd)=facscale
+ enddo
+
+CC Cut on qt/Q
+
+ xqtcut=0.008
+
+
+C Limits on invariant mass of vector boson decay products
+C (irrelevant if zerowidth=.true.)
+
+
+ wsqmin=Mwmin**2
+ wsqmax=Mwmax**2
+
+
+
+C Check if the limits are compatible with sroot
+
+ if(wsqmax.gt.(sroot**2)) wsqmax=sroot**2
+
+
+ do j=1,mxpart
+ plabel(j)=''
+ enddo
+
+
+ plabel(1)='pp'
+ plabel(2)='pp'
+
+c--- the default behaviour is to remove no branching ratio
+
+ BrnRat=1d0
+
+ call coupling
+
+ call cstring(pdfstring)
+
+ if(lhapdfs.eqv.(.false.)) then
+ write(6,*)'CCCCCCCCCC Parton Distributions CCCCCCCCCCCC'
+ write(6,*)'C C'
+ write(6,*)'C ', pdfstring,' C'
+ write(6,*)'C C'
+ endif
+ write(6,*)'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'
+
+ notag=0
+ nqcdjets=0
+ isub=0
+
+
+
+ mb=0
+
+
+
+ if((ih1.eq.1).and.(ih2.eq.-1)) then
+ str1='ppb'
+ elseif((ih1.eq.1).and.(ih2.eq.1)) then
+ str1='pp'
+ else
+ write(*,*)'Initial state not allowed'
+ endif
+
+
+CC Here ndim is the number of dimensions for Born
+
+ if(nproc.eq.1) then
+C
+C W+->l+nubar
+C
+ str2=' -> W+ -> '
+ ndec=2
+ ndim=4
+ plabel(3)='nl'
+ plabel(4)='ea'
+ plabel(5)='pp'
+ plabel(6)='pp'
+ n2=0
+ i1=4
+ i2=4
+ nwz=1
+ mass3=wmass
+ width3=wwidth
+
+ if (removebr) then
+ call branch(brwen,brzee,brtau,brtop)
+ BrnRat=brwen
+ endif
+
+ str3=' nu(p3)+e+(p4)'
+
+ elseif(nproc.eq.2) then
+C
+C W-=>l-nu
+C
+ str2=' -> W- -> '
+ ndec=2
+ ndim=4
+ plabel(3)='el'
+ plabel(4)='na'
+ plabel(5)='pp'
+ plabel(6)='pp'
+ n2=0
+ i1=3
+ i2=3
+ nwz=-1
+ mass3=wmass
+ width3=wwidth
+
+
+
+
+ if (removebr) then
+ call branch(brwen,brzee,brtau,brtop)
+ BrnRat=brwen
+ endif
+
+ str3=' e^-(p3)+nu~(p4)'
+
+ elseif(nproc.eq.3) then
+C
+C Z->e+e-
+C
+ str2=' -> Z -> '
+ ndec=2
+ ndim=4
+ plabel(3)='el'
+ plabel(4)='ea'
+ plabel(5)='pp'
+ plabel(6)='pp'
+ n2=0
+ i1=3
+ i2=4
+ nwz=0
+ mass3=zmass
+ width3=zwidth
+
+ l1=le
+ r1=re
+
+C q1=0 switch off the photon
+
+ q1=-1
+
+ int=.false.
+
+ str3=' e-(p3)+e+(p4)'
+
+
+
+ if (removebr) then
+ call branch(brwen,brzee,brtau,brtop)
+ BrnRat=brzee
+ endif
+
+
+
+
+ else
+ write(*,*)'Wrong decay channel'
+ stop
+ endif
+
+
+C New: decide if using Breit-Wigner or not
+
+ n3=0
+ vmass=wmass
+ if(nproc.eq.3) vmass=zmass
+
+ if(mwmin.lt.vmass.and.mwmax.gt.vmass) n3=1
+
+
+
+CCCCCCCCCCCCC
+
+ call strcat(str1,str2,string)
+ call strcat(string,str3,string)
+
+
+ call cstring(string)
+
+
+ write(6,*)'C C'
+
+ if(order.eq.0) then
+ write(6,*)'C Computing LO cross section for C'
+ elseif(order.eq.1) then
+ write(6,*)'C Computing NLO cross section for C'
+ elseif(order.eq.2) then
+ write(6,*)'C Computing NNLO cross section for C'
+ else
+ write(*,*)'Order can be 0,1 or 2 !'
+ stop
+ endif
+
+ write(6,*)'C C'
+ write(*,*)'C',string,'C'
+ write(6,*)'C C'
+ write(6,96)sroot
+ write(6,*)'C C'
+ write(6,*)'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'
+
+
+ 96 format(' C at Sqrt(s)=',f8.2,' GeV C')
+
+ nqcdjets=0
+
+
+ call ckmfill(nwz)
+
+
+
+CCCCCCCCCCCCCCCCCC
+
+
+c--- set-up the random number generator with a negative seed
+ idum=-abs(rseed)
+ randummy=ran2()
+
+c--- initialize masses for alpha_s routine
+ cmass=dsqrt(mcsq)
+ bmass=dsqrt(mbsq)
+
+
+c--- check that we have a valid value of 'part'
+ if ( (part .ne. 'lord') .and. (part .ne. 'real') .and.
+ . (part .ne. 'virt') .and. (part .ne. 'tota') ) then
+ write(6,*) 'part=',part,' is not a valid option'
+ stop
+ endif
+
+
+
+ as=alphas(scale,amz,nlooprun)
+ ason2pi=as/twopi
+ ason4pi=as/fourpi
+ gsq=fourpi*as
+ musq=scale**2
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Resummation coefficients
+
+ beta0=(33-2*nf)/12d0
+
+ beta1=(153d0-19*nf)/24d0
+
+ Kappa=67/6d0-(pi**2)/2d0-5d0/9d0*nf
+
+ A1q=4d0/3
+ A2q=0.5d0*A1q*Kappa
+ B1q=-2d0
+
+
+ B2q=4d0/9*(pi**2-3d0/4-12*Z3)+(11d0/9*pi**2-193d0/12+6*Z3)
+ & +nf/6d0*(17d0/3-4d0/9*pi**2)
+
+
+
+C Delta term in c1qq coefficient
+
+ C1qqdelta=(pi**2-8)/3d0
+
+C Delta term in P2qq splitting function (as/pi normalization)
+
+ Delta2qq=16d0/9*(3d0/8-pi**2/2+6*Z3)
+ & +4*(17d0/24+11d0*pi**2/18-3*Z3)-2d0/3*nf*(1d0/6+2*pi**2/9d0)
+
+ Delta2qq=Delta2qq/4d0
+
+CC Coefficients of D0 and D1 in P*P (as/pi normalization)
+
+ D0qqqq=8d0/3
+ D1qqqq=32d0/9
+
+
+CC Coefficients of delta(1-z) in P*P
+
+ Deltaqqqq=4d0/9*(9d0/4-2*pi**2/3d0)
+
+C H2qq contribution: coefficient of delta(1-z)
+
+ H2qqdelta=-2561d0/144+127d0*nf/72+3*pi**2/2-19d0*nf*Pi**2/81+
+ & 49d0*Pi**4/324 +58d0*Z3/9 + 8d0*nf*Z3/27
+
+C H2qq contribution: coefficient of D0(z)
+
+ H2qqD0=-404d0/27+(56d0*nf)/81+14*Z3
+
+
+ return
+
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/strcat.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/strcat.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/strcat.f (revision 1338)
@@ -0,0 +1,50 @@
+ subroutine strcat(str1,str2,str)
+c concatenates str1 and str2 into str. Ignores trailing blanks of str1,str2
+ character *(*) str1,str2,str
+ l1=istrl(str1)
+ l2=istrl(str2)
+ l =len(str)
+ if(l.lt.l1+l2) then
+ write(*,*) 'error: l1+l2>l in strcat'
+ write(*,*) 'l1=',l1,' str1=',str1
+ write(*,*) 'l2=',l2,' str2=',str2
+ write(*,*) 'l=',l
+ stop
+ endif
+ if(l1.ne.0) str(1:l1)=str1(1:l1)
+ if(l2.ne.0) str(l1+1:l1+l2)=str2(1:l2)
+ if(l1+l2+1.le.l) str(l1+l2+1:l)= ' '
+ end
+
+ function istrl(string)
+c returns the position of the last non-blank character in string
+ character * (*) string
+ i = len(string)
+ dowhile(i.gt.0.and.string(i:i).eq.' ')
+ i=i-1
+ enddo
+ istrl = i
+ end
+
+
+ subroutine cstring(string)
+c center a string in its length (MG July 2007)
+ implicit none
+ character * (*) string
+ integer i,j,l,l1,istrl
+ l=len(string)
+ l1=istrl(string)
+ i=(l-l1)/2
+
+
+ do j=0,l1-1
+ string(l1+i-j:l1+i-j)=string(l1-j:l1-j)
+ enddo
+
+ do j=1,i
+ string(j:j)=' '
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/dyinit.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dyinit.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dyinit.f (revision 1338)
@@ -0,0 +1,93 @@
+ subroutine dyinit
+C
+C Main initialization routine
+C
+ implicit none
+ include 'constants.f'
+ include 'cutoff.f'
+ include 'efficiency.f'
+ include 'limits.f'
+ include 'npart.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+
+C
+ include 'masses.f'
+ include 'zerowidth.f'
+C P.S. unify with mcmf for beter interface
+ include 'nflav.f'
+C P.S. end...
+ character*30 runstring
+ common/runstring/runstring
+
+C
+ logical creatent,dswhisto
+ double precision rtsmin,sqrts,p1ext(4),p2ext(4),
+ . p(mxpart,4),val
+ integer j,k,nproc
+ common/rtsmin/rtsmin
+ common/energy/sqrts
+ common/pext/p1ext,p2ext
+ common/nproc/nproc
+ data p/mxpart*3d0,mxpart*4d0,mxpart*0d0,mxpart*5d0/
+
+
+ write(*,*) 'CCCCCCCCCCCCCC DYNNLO, Version 1.4 CCCCCCCCCCCCC'
+ write(*,*) 'C C'
+ write(*,*) 'C Written by M.Grazzini August 2013 C'
+ write(*,*) 'C C'
+ write(*,*) 'C Please refer to: C'
+ write(*,*) 'C S.Catani et al., PRL 103 (2009) 082001 C'
+ write(*,*) 'C S.Catani, M.Grazzini, PRL 98 (2007) 222002 C'
+ write(*,*) 'C C'
+
+ call setup
+
+C Initialize efficiency variables
+ njetzero=0
+ ncutzero=0
+ ntotzero=0
+ ntotshot=0
+
+
+C Set-up incoming beams and PS integration cut-offs
+ rtsmin=min(rtsmin,dsqrt(wsqmin+cutoff))
+
+
+ if(zerowidth)then
+ rtsmin=wmass
+ if(nproc.eq.3)rtsmin=zmass
+ endif
+
+ taumin=(rtsmin/sqrts)**2
+ xmin=taumin
+
+ p1ext(4)=-half*sqrts
+ p1ext(1)=0d0
+ p1ext(2)=0d0
+ p1ext(3)=-half*sqrts
+
+ p2ext(4)=-half*sqrts
+ p2ext(1)=0d0
+ p2ext(2)=0d0
+ p2ext(3)=+half*sqrts
+
+* Initialize all histograms
+* npart=6 is a dummy value, to ensure that all histograms are included
+ npart=6
+ val=1d-15
+ call plotter(p,val,1)
+
+ do j=1,mxpart
+ do k=1,4
+ p(j,k)=0d0
+ enddo
+ enddo
+
+C P.S.
+ nflav=5
+C P.S. end
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/zeromsq.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/zeromsq.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/zeromsq.f (revision 1338)
@@ -0,0 +1,16 @@
+ subroutine zeromsq(msq,msqv)
+ implicit none
+ include 'constants.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),msqv(-nf:nf,-nf:nf)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ msqv(j,k)=0d0
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/r.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/r.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/r.f (revision 1338)
@@ -0,0 +1,25 @@
+ double precision function r(p,i,j)
+c----calculate the jets separation between p(i) and p(j)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),r1,r2,dely,delphi,ei,ej
+ integer i,j
+
+ ei=dsqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
+ ej=dsqrt(p(j,1)**2+p(j,2)**2+p(j,3)**2)
+
+ r1= (ei+p(i,3))*(ej-p(j,3))/
+ . ((ej+p(j,3))*(ei-p(i,3)))
+ dely=0.5d0*dlog(r1)
+
+ r2= (p(i,1)*p(j,1)+p(i,2)*p(j,2))
+ . /dsqrt((p(i,1)**2+p(i,2)**2)*(p(j,1)**2+p(j,2)**2))
+ if (r2 .lt. -0.999999999D0) r2=-1D0
+ if (r2 .gt. 0.999999999D0) r2=1D0
+ delphi=dacos(r2)
+
+ r=dsqrt(dely**2+delphi**2)
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/masscuts.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/masscuts.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/masscuts.f (revision 1338)
@@ -0,0 +1,29 @@
+ subroutine masscuts(s,*)
+ implicit none
+ include 'constants.f'
+ include 'npart.f'
+ include 'limits.f'
+ logical first
+ double precision s(mxpart,mxpart)
+ integer nqcdjets,nqcdstart
+ common/nqcdjets/nqcdjets,nqcdstart
+ data first/.true./
+ save first
+
+
+ if ( (s(3,4) .lt. wsqmin)
+ . .or. (s(3,4) .gt. wsqmax))
+ . return 1
+
+c if ((npart .gt. 3) .and. (nqcdjets .lt. 2)) then
+c if ( (s(5,6) .lt. bbsqmin)
+c . .or. (s(5,6) .gt. bbsqmax))
+c . return 1
+c endif
+
+ 98 format(' * ',f8.2,' < ',a12,' < ',f8.2,' *')
+ 99 format(' * ',f8.2,' < ',a3,' < ',f8.2,' *')
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/dynnlo.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dynnlo.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dynnlo.f (revision 1338)
@@ -0,0 +1,43 @@
+ program dynnlo
+
+ implicit none
+ include 'constants.f'
+ include 'gridinfo.f'
+c P.S. to use grids
+ include 'ptilde.f'
+ include 'APPLinclude.f'
+c P.S. end
+ integer itmx1,ncall1,itmx2,ncall2
+ double precision integ,integ_err
+ double precision p(mxpart,4),wt
+ common/iterat/itmx1,ncall1,itmx2,ncall2
+
+
+CC Initialization
+
+ call dyinit
+
+
+CC Warm up
+
+ if(readin.eqv. .false.)
+ & call integrate(0,itmx1,ncall1,.false.,integ,integ_err)
+
+
+CC Main run
+
+ call integrate(1,itmx2,ncall2,.true.,integ,integ_err)
+
+
+
+CC Final processing and print-out
+
+ call hexit(integ,integ_err)
+c-- >> P.S. creating grid
+ if (creategrid)then
+ call write_grid(integ)
+ endif
+c-- >> P.S. end creating grid
+ stop
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/scaleset.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/scaleset.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/scaleset.f (revision 1338)
@@ -0,0 +1,36 @@
+ subroutine scaleset(q2)
+ implicit none
+ include 'constants.f'
+ include 'scale.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'nwz.f'
+ include 'facscale.f'
+ include 'nlooprun.f'
+
+ double precision q2,scalemax,amz,alphas
+ common/couple/amz
+
+ scale=dsqrt(q2)
+ facscale=dsqrt(q2)
+
+ scalemax=3000d0
+
+c--- catch absurdly large scales
+ if (scale.gt.scalemax) then
+ scale=scalemax
+ facscale=scalemax
+ endif
+
+
+c--- run alpha_s
+ as=alphas(scale,amz,nlooprun)
+
+ ason2pi=as/twopi
+ ason4pi=as/fourpi
+ gsq=fourpi*as
+ musq=scale**2
+
+ return
+
+ end
Index: dynnlo-v1.5-applgrid/src/Need/getbs.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/getbs.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/getbs.f (revision 1338)
@@ -0,0 +1,21 @@
+ subroutine getbs(pjet,nbq,nba)
+ implicit none
+ include 'constants.f'
+ include 'jetlabel.f'
+ integer i,nbq,nba
+ double precision pjet(mxpart,4)
+
+c--- note: this function ASSUMES that there is at most one b-quark
+c--- and one anti-b-quark, returning zero if there are less than this
+
+ nbq=0
+ nba=0
+
+ do i=1,jets
+ if (jetlabel(i) .eq. 'bq') nbq=i+4
+ if (jetlabel(i) .eq. 'ba') nba=i+4
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/besselkfast.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/besselkfast.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/besselkfast.f (revision 1338)
@@ -0,0 +1,414 @@
+c.....Function BK(n,z)
+c.....BK(n,z) is the n-derivative of BesselK[nu,z]
+c.....with respect to nu in nu=1
+
+c.....Itilde defined as in the paper
+
+ function Itilde(m)
+ implicit none
+ double precision zbesselk0,zbesselk1,zbesselk2,zbesselk3
+ double precision argum,Itilde
+ double precision Eulergamma,b0,z2,z3,logx
+ double precision xmio
+ integer m
+ common/xmio/xmio
+
+
+ Eulergamma=0.577215664902d0
+ z2=1.64493406685d0
+ z3=1.20205690316d0
+ b0=2*dexp(-Eulergamma)
+
+C
+
+ argum=b0*xmio
+ logx=dlog(xmio)
+
+ if (m.eq.1) then
+ Itilde=-zbesselk0(argum)/xmio**2
+ elseif (m.eq.2) then
+ Itilde=2d0/xmio**2*(zbesselk0(argum)*logx-zbesselk1(argum))
+ elseif (m.eq.3) then
+ Itilde=-3/xmio**2*(zbesselk0(argum)*(logx**2-z2)
+ & -2*zbesselk1(argum)*logx+zbesselk2(argum))
+ elseif (m.eq.4) then
+ Itilde=4/xmio**2*(zbesselk0(argum)*(logx**3-3*z2*logx+2*z3)
+ & -3*zbesselk1(argum)*(logx**2-z2)+3*zbesselk2(argum)*logx
+ & -zbesselk3(argum))
+ endif
+
+
+ return
+ end
+
+C n-derivative of the function BesselK[nu,z]
+C with respect to nu for nu=1
+C NOTE: IT IS MULTIPLIED by z
+
+
+ function zbesselk0(z)
+ implicit none
+ double precision zbesselk0,z,zm,loz,egamma,pi,r(0:11),zbk0
+ data r(0)/ 6.03844076705d2/
+ data r(1)/ -1.21597891877d2/
+ data r(2)/ 2.72488273113d1/
+ data r(3)/ -6.88391426811d0/
+ data r(4)/ 1.99353173375d0/
+ data r(5)/ -0.676592588425d0/
+ data r(6)/ 0.277576446533d0/
+ data r(7)/ -0.144195556641d0/
+ data r(8)/ 0.102539062500d0/
+ data r(9)/ -0.1171875d0/
+ data r(10)/ 0.375d0/
+ data r(11)/ 1d0/
+
+ egamma=0.577215664902d0
+ pi=3.14159265359d0
+ if(z.lt.1.5d0) then
+ zm=z/2d0
+ loz=dlog(zm)
+
+ zbesselk0=1d0+z*zm*(loz-0.5d0*(1-2*egamma))
+ & +zm**4*(loz-0.5d0*(2.5d0-2*egamma))
+ & +zm**6/6d0*(loz-0.5d0*(10d0/3-2*egamma))
+ & +zm**8/72d0*(loz-0.5d0*(47d0/12-2*egamma))
+ & +zm**10/1440d0*(loz-0.5d0*(131d0/30-2*egamma))
+ elseif(z.ge.1.5d0.and.z.lt.4d0) then
+ zbesselk0=zbk0(z)
+ else
+ zbesselk0=dsqrt(Pi/2d0)*(z)**(-10.5d0)*dexp(-z)*
+ & (r(0)+r(1)*z+r(2)*z**2+r(3)*z**3+r(4)*z**4+r(5)*z**5+
+ & r(6)*z**6+r(7)*z**7+r(8)*z**8+r(9)*z**9+r(10)*z**10+
+ & r(11)*z**11)
+ endif
+ return
+ end
+
+
+ function zbesselk1(z)
+ implicit none
+ double precision zbesselk1,z,zm,loz,egamma,pi,r(0:11),zbk1
+ data r(0) /-5.51335896122d2/
+ data r(1) /1.10017140269d2/
+ data r(2) /-2.43805296996d1/
+ data r(3) /6.07404200127d0/
+ data r(4) /-1.72772750258d0/
+ data r(5) /0.572501420975d0/
+ data r(6) /-0.227108001709d0/
+ data r(7) /0.112152099609d0/
+ data r(8) /-7.32421875d-2/
+ data r(9) /7.03125d-2/
+ data r(10) /-0.125d0/
+ data r(11) /1d0/
+
+ egamma=0.577215664902d0
+ pi=3.14159265359d0
+ if(z.lt.1.5d0) then
+ zm=z/2d0
+ loz=dlog(zm)
+ zbesselk1=-(loz+egamma)-zm**2*(loz-1+egamma)
+ & -0.25d0*zm**4*(loz-1.5d0+egamma)
+ & -zm**6/36d0*(loz-11d0/6+egamma)
+ & -zm**8/576d0*(loz-25d0/12+egamma)
+ elseif(z.ge.1.5d0.and.z.lt.4d0) then
+ zbesselk1=zbk1(z)
+ else
+ zbesselk1=dsqrt(Pi/2d0)*(z)**(-11.5d0)*dexp(-z)*
+ & (r(0)+r(1)*z+r(2)*z**2+r(3)*z**3+r(4)*z**4+r(5)*z**5+
+ & r(6)*z**6+r(7)*z**7+r(8)*z**8+r(9)*z**9+r(10)*z**10+
+ & r(11)*z**11)
+ endif
+ return
+ end
+
+
+ function zbesselk2(z)
+ implicit none
+ double precision zbesselk2,z,a(0:13),loz,zm,pi,r(0:11),zbk2
+ data a(0) / 1.15443132980306572d0/
+ data a(1) / 1.97811199065594511d0/
+ data a(2) / 0.154431329803065721d0/
+ data a(3) / 4.801792651508824500d0/
+ data a(4) / 0.806235643470665767d0/
+ data a(5) /-0.672784335098467139d0/
+ data a(6) / 3.285072828402112960d0/
+ data a(7) /-1.945338757678943440d0/
+ data a(8) /-0.181575166960855634d0/
+ data a(9) / 0.694195147571435559d0/
+ data a(10)/-0.607655744858515573d0/
+ data a(11)/-0.019182189839330562d0/
+ data a(12)/ 0.068894530444636532d0/
+ data a(13)/-0.070514317816328185d0/
+
+ data r(0) /3.19461756880d4/
+ data r(1) /-5.82903207466d3/
+ data r(2) /1.17069096329d3/
+ data r(3) /-2.61456867712d2/
+ data r(4) /6.57620334072d1/
+ data r(5) /-18.9305966582d0/
+ data r(6) /6.37010269165d0/
+ data r(7) /-2.57905883789d0/
+ data r(8) /1.30957031250d0/
+ data r(9) /-0.888020833333d0/
+ data r(10) /0.875d0/
+ data r(11) /1d0/
+
+ pi=3.14159265359d0
+ if(z.lt.1.5d0) then
+ zm=z/2
+ loz=dlog(zm)
+
+ zbesselk2=loz**2+a(0)*loz+a(1)
+ & +zm**2*(2*loz**3/3d0+a(2)*loz**2+a(3)*loz+a(4))
+ & +zm**4*(loz**3/3d0+a(5)*loz**2+a(6)*loz+a(7))
+ & +zm**6*(loz**3/18d0+a(8)*loz**2+a(9)*loz+a(10))
+ & +zm**8*(loz**3/216d0+a(11)*loz**2+a(12)*loz+a(13))
+ elseif(z.ge.1.5d0.and.z.lt.4d0) then
+ zbesselk2=zbk2(z)
+ else
+ zbesselk2=dsqrt(Pi/2d0)*(z)**(-11.5d0)*dexp(-z)*
+ & (r(0)+r(1)*z+r(2)*z**2+r(3)*z**3+r(4)*z**4+r(5)*z**5+
+ & r(6)*z**6+r(7)*z**7+r(8)*z**8+r(9)*z**9+r(10)*z**10+
+ & r(11)*z**11)
+ endif
+ return
+ end
+
+
+ function zbesselk3(z)
+ implicit none
+ double precision zbesselk3,z,b(0:14),loz,zm,pi,r(0:9),zbk3
+
+ data b(0) / 1.731646994704598580d0/
+ data b(1) / 5.934335971967835330d0/
+ data b(2) / 5.444874456485317730d0/
+ data b(3) /-1.268353005295401420d0/
+ data b(4) / 8.471041982558638170d0/
+ data b(5) /-3.026167526073320430d0/
+ data b(6) /-0.692088251323850355d0/
+ data b(7) / 2.809848746963509900d0/
+ data b(8) /-2.161466255000085060d0/
+ data b(9) /-0.104676472369316706d0/
+ data b(10)/ 0.381989731242156681d0/
+ data b(11)/-0.367492827636283900d0/
+ data b(12)/-0.007844362856415627d0/
+ data b(13)/ 0.027796539630842606d0/
+ data b(14)/-0.029917436634978395d0/
+
+ data r(0)/-3.19152148877d3/
+ data r(1)/7.05641513542d2/
+ data r(2)/-1.75295543138d2/
+ data r(3)/4.96775524480d1/
+ data r(4)/-1.63798988342d1/
+ data r(5)/6.45276489258d0/
+ data r(6)/-3.15332031250d0/
+ data r(7)/2.0234375d0/
+ data r(8)/-1.875d0/
+ data r(9)/3d0/
+
+ pi=3.14159265359d0
+ if(z.lt.1.5d0) then
+ zm=z/2
+ loz=dlog(zm)
+
+ zbesselk3=loz**3+b(0)*loz**2+b(1)*loz+b(2)
+ & +zm**2*(loz**3+b(3)*loz**2+b(4)*loz+b(5))
+ & +zm**4*(loz**3/4d0+b(6)*loz**2+b(7)*loz+b(8))
+ & +zm**6*(loz**3/36d0+b(9)*loz**2+b(10)*loz+b(11))
+ & +zm**8*(loz**3/576d0+b(12)*loz**2+b(13)*loz+b(14))
+ zbesselk3=-zbesselk3
+ elseif(z.ge.1.5d0.and.z.lt.4d0) then
+ zbesselk3=zbk3(z)
+ else
+ zbesselk3=dsqrt(Pi/2d0)*(z)**(-10.5d0)*dexp(-z)*
+ & (r(0)+r(1)*z+r(2)*z**2+r(3)*z**3+r(4)*z**4+r(5)*z**5+
+ & r(6)*z**6+r(7)*z**7+r(8)*z**8+r(9)*z**9)
+ endif
+ return
+ end
+
+C n-derivative of the function BesselK[nu,z]
+C with respect to nu for nu=1, multiplied by z
+
+C Interpolated form from z=1 to z=5
+
+ function zbk0(x)
+ implicit none
+ integer i,j
+ real*8 xa(1:21),ya(1:21),xx(1:5),yy(1:5),zbk0,x,y,dy
+ DATA XA/1d0,1.2d0,1.4d0,1.6d0,1.8d0,2d0,2.2d0,2.4d0,
+ & 2.6d0,2.8d0,3d0,3.2d0,3.4d0,3.6d0,3.8d0,4d0,
+ & 4.2d0,4.4d0,4.6d0,4.8d0,5d0/
+ DATA YA/0.601907230197d0,0.521510869273d0,0.449170263122d0,
+ & 0.385014258172d0,0.328721579643d0,0.279731763633d0,
+ & 0.237372982262d0,0.200939613012d0,0.169738517152d0,
+ & 1.431155197d-1,1.20469293385d-1,1.01257264676d-1,
+ & 8.49965460188d-2,7.12618632710d-2,5.96817704982d-2,
+ & 4.99339955491d-2,4.17404598909d-2,3.48623147904d-2,
+ & 2.90952007636d-2,2.42648469315d-2,2.02230672273d-2/
+
+ call locate(xa,21,x,j)
+ if (j.lt.2) j=2
+ if (j.gt.20) j=20
+ do i=1,4
+ xx(i)=xa(j+i-2)
+ yy(i)=ya(j+i-2)
+ enddo
+ call xpolint(xx,yy,4,x,y,dy)
+ zbk0=y
+ if(x.lt.1d0) zbk0=0d0
+
+ end
+
+ function zbk1(x)
+ implicit none
+ integer i,j
+ real*8 xa(1:21),ya(1:21),xx(1:5),yy(1:5),zbk1,x,y,dy
+ DATA XA/1d0,1.2d0,1.4d0,1.6d0,1.8d0,2d0,2.2d0,2.4d0,
+ & 2.6d0,2.8d0,3d0,3.2d0,3.4d0,3.6d0,3.8d0,4d0,
+ & 4.2d0,4.4d0,4.6d0,4.8d0,5d0/
+ DATA YA/0.421024438241d0,0.318508220287d0,0.243655061182d0,
+ & 0.187954751969d0,0.14593140049d0,0.11389387275d0,
+ & 8.92690056716d-2,7.02173415434d-2,5.53983032863d-2,
+ & 4.3819981975d-2,3.47395043863d-2,2.75949976751d-2,
+ & 2.19580188068d-2,1.74996410181d-2,1.39658845342d-2,
+ & 1.11596760859d-2,8.92745154154d-3,7.14911062331d-3,
+ & 5.73042291729d-3,4.59724631672d-3,3.69109833404d-3/
+
+ call locate(xa,21,x,j)
+ if (j.lt.2) j=2
+ if (j.gt.20) j=20
+ do i=1,4
+ xx(i)=xa(j+i-2)
+ yy(i)=ya(j+i-2)
+ enddo
+ call xpolint(xx,yy,4,x,y,dy)
+ zbk1=y
+ if(x.lt.1d0) zbk1=0d0
+
+ end
+
+ function zbk2(x)
+ implicit none
+ integer i,j
+ real*8 xa(1:21),ya(1:21),xx(1:5),yy(1:5),zbk2,x,y,dy
+ DATA XA/1d0,1.2d0,1.4d0,1.6d0,1.8d0,2d0,2.2d0,2.4d0,
+ & 2.6d0,2.8d0,3d0,3.2d0,3.4d0,3.6d0,3.8d0,4d0,
+ & 4.2d0,4.4d0,4.6d0,4.8d0,5d0/
+
+ DATA YA/0.680674889238d0,0.491594990820d0,0.362195189493d0,
+ & 0.270816279222d0,0.204792327117d0,0.156253340447d0,
+ & 0.120082673664d0,9.28359137653d-2,7.21300592003d-2,
+ & 5.62799660668d-2,4.40726122853d-2,3.46219598130d-2,
+ & 2.72728851066d-2,2.15360151576d-2,1.70426018226d-2,
+ & 1.35127158151d-2,1.07324867217d-2,8.53760219545d-3,
+ & 6.80120891232d-3,5.42495329856d-3,4.33228989306d-3/
+
+ call locate(xa,21,x,j)
+ if (j.lt.2) j=2
+ if (j.gt.20) j=20
+ do i=1,4
+ xx(i)=xa(j+i-2)
+ yy(i)=ya(j+i-2)
+ enddo
+ call xpolint(xx,yy,4,x,y,dy)
+ zbk2=y
+ if(x.lt.1d0) zbk2=0d0
+
+ end
+
+ function zbk3(x)
+ implicit none
+ integer i,j
+ real*8 xa(1:21),ya(1:21),xx(1:5),yy(1:5),zbk3,x,y,dy
+ DATA XA/1d0,1.2d0,1.4d0,1.6d0,1.8d0,2d0,2.2d0,2.4d0,
+ & 2.6d0,2.8d0,3d0,3.2d0,3.4d0,3.6d0,3.8d0,4d0,
+ & 4.2d0,4.4d0,4.6d0,4.8d0,5d0/
+
+ DATA YA/0.923433129276d0,0.604688213722d0,0.408298815558d0,
+ & 0.282121092418d0,0.198476215508d0,0.141664802216d0,
+ & 1.02324263482d-1,7.46480617096d-2,5.49203947626d-2,
+ & 4.07017495249d-2,3.03561460004d-2,2.27666860711d-2,
+ & 1.71591652247d-2,1.29898581976d-2,9.87254609222d-3,
+ & 7.53015239679d-3,5.76215402177d-3,4.42230076800d-3,
+ & 3.40318600534d-3,2.62543960976d-3,2.03008127036d-3/
+
+ call locate(xa,21,x,j)
+ if (j.lt.2) j=2
+ if (j.gt.20) j=20
+ do i=1,4
+ xx(i)=xa(j+i-2)
+ yy(i)=ya(j+i-2)
+ enddo
+ call xpolint(xx,yy,4,x,y,dy)
+ zbk3=y
+ if(x.lt.1d0) zbk3=0d0
+
+ end
+
+
+
+
+ SUBROUTINE LOCATE(XX,N,X,J)
+ INTEGER J,N,JL,JM,JU
+ DOUBLE PRECISION X,XX(N)
+ JL=0
+ JU=N+1
+ 10 IF(JU-JL.GT.1)THEN
+ JM=(JU+JL)/2
+ IF((XX(N).GE.XX(1)).EQV.(X.GE.XX(JM))) then
+ JL=JM
+ ELSE
+ JU=JM
+ ENDIF
+ GOTO 10
+ ENDIF
+ IF(X.EQ.XX(1))THEN
+ J=1
+ ELSE IF(X.EQ.XX(N)) THEN
+ J=N-1
+ ELSE
+ J=JL
+ ENDIF
+ RETURN
+ END
+
+
+ SUBROUTINE XPOLINT (XA,YA,N,X,Y,DY)
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+ PARAMETER (NMAX=10)
+ DIMENSION XA(N),YA(N),C(NMAX),D(NMAX)
+ NS=1
+ DIF=ABS(X-XA(1))
+ DO 11 I=1,N
+ DIFT=ABS(X-XA(I))
+ IF (DIFT.LT.DIF) THEN
+ NS=I
+ DIF=DIFT
+ ENDIF
+ C(I)=YA(I)
+ D(I)=YA(I)
+ 11 CONTINUE
+ Y=YA(NS)
+ NS=NS-1
+ DO 13 M=1,N-1
+ DO 12 I=1,N-M
+ HO=XA(I)-X
+ HP=XA(I+M)-X
+ W=C(I+1)-D(I)
+ DEN=HO-HP
+ IF(DEN.EQ.0.)PAUSE
+ DEN=W/DEN
+ D(I)=HP*DEN
+ C(I)=HO*DEN
+ 12 CONTINUE
+ IF (2*NS.LT.N-M)THEN
+ DY=C(NS+1)
+ ELSE
+ DY=D(NS)
+ NS=NS-1
+ ENDIF
+ Y=Y+DY
+ 13 CONTINUE
+ RETURN
+ END
Index: dynnlo-v1.5-applgrid/src/Need/dipolesubxx.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipolesubxx.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipolesubxx.f (revision 1338)
@@ -0,0 +1,167 @@
+************************************************************************
+* Author: J. M. Campbell *
+* August, 2001 *
+* *
+* Replica of dipolesub.f, except for the fact that extra matrix *
+* element arrays are called in the Born term *
+* *
+* Calculates the nj-jet subtraction term corresponding to dipole *
+* nd with momentum p and dipole kinematics (ip,jp) wrt kp *
+* Automatically chooses dipole kind *
+* Returns the dipoles in sub,subv and matrix elements in msq,msqv *
+* nd labels the dipole configurations *
+* ip labels the emitter parton *
+* jp labels the emitted parton *
+* kp labels the spectator parton *
+* subr_born is the subroutine which call the born process *
+* subr_corr is the subroutine which call the born process dotted *
+* with vec for an emitted gluon only *
+* msqx - lowest order matrix elements with 4 indices, msqx(j,k,l,m)*
+* Sum_{l,m} msqx(j,k,l,m) = msq(j,k) *
+* mvxg - lowest order matrix elements with 4 indices and *
+* contracted with appropriate vector, msqvx(j,k,l,m) *
+* Sum_{l,m} msqvx(j,k,l,m) = msqv(j,k) *
+************************************************************************
+
+ subroutine dipsxx(nd,p,ip,jp,kp,sub,subv,
+ . subr_born,subr_corr,msqx,msqvx)
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'qqgg.f'
+ include 'ptilde.f'
+ double precision p(mxpart,4),ptrans(mxpart,4),sub(4),subv,vecsq
+ double precision x,omx,z,omz,y,omy,u,omu,sij,sik,sjk,dot,vec(4)
+ double precision msq(-nf:nf,-nf:nf)
+ double precision msqx(0:2,-nf:nf,-nf:nf,-nf:nf,-nf:nf)
+ double precision msqvx(0:2,-1:1,-1:1,-1:1,-1:1)
+ integer nd,ip,jp,kp,nu,j,k
+ external subr_born,subr_corr
+
+C---Initialize the dipoles to zero
+ do j=1,4
+ sub(j)=0d0
+ enddo
+
+ sij=two*dot(p,ip,jp)
+ sik=two*dot(p,ip,kp)
+ sjk=two*dot(p,jp,kp)
+
+ if ((ip .le. 2) .and. (kp .le. 2)) then
+***********************************************************************
+*************************** INITIAL-INITIAL ***************************
+***********************************************************************
+ omx=-(sij+sjk)/sik
+ x=one-omx
+
+ call transform(p,ptrans,x,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+ do nu=1,4
+ vec(nu)=p(jp,nu)-sij/sik*p(kp,nu)
+ enddo
+ vecsq=-sij*sjk/sik
+ call subr_born(ptrans,msq,msqx)
+ call subr_corr(ptrans,vec,ip,msqvx)
+
+ sub(qq)=-gsq/x/sij*(two/omx-one-x)
+ sub(gq)=-gsq/sij
+ sub(qg)=-gsq/x/sij*(one-two*x*omx)
+ sub(gg)=-2d0*gsq/x/sij*(x/omx+x*omx)
+ subv =+4d0*gsq/x/sij*omx/x/vecsq
+
+***********************************************************************
+*************************** INITIAL-FINAL *****************************
+***********************************************************************
+ elseif ((ip .le. 2) .and. (kp .gt. 2)) then
+
+ omx=-sjk/(sij+sik)
+ x=one-omx
+ u=sij/(sij+sik)
+ omu=sik/(sij+sik)
+C---npart is the number of particles in the final state
+C---transform the momenta so that only the first npart+1 are filled
+ call transform(p,ptrans,x,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+ do nu=1,4
+ vec(nu)=p(jp,nu)/u-p(kp,nu)/omu
+ enddo
+ call subr_born(ptrans,msq,msqx)
+ call subr_corr(ptrans,vec,ip,msqvx)
+ sub(qq)=-gsq/x/sij*(two/(omx+u)-one-x)
+ sub(gq)=-gsq/sij
+ sub(qg)=-gsq/x/sij*(one-two*x*omx)
+ sub(gg)=-2d0*gsq/x/sij*(one/(omx+u)-one+x*omx)
+ subv =-4d0*gsq/x/sij*(omx/x*u*(one-u)/sjk)
+
+ elseif ((ip .gt. 2) .and. (kp .le. 2)) then
+***********************************************************************
+*************************** FINAL-INITIAL *****************************
+***********************************************************************
+c--- note, here we assume that msq kinematics are already taken care of
+c--- for msq, although msqv must be recalculated each time
+ omx=-sij/(sjk+sik)
+ x=one-omx
+ z=sik/(sik+sjk)
+ omz=sjk/(sik+sjk)
+ do nu=1,4
+ vec(nu)=z*p(ip,nu)-omz*p(jp,nu)
+ enddo
+C---call again because vec has changed
+ do j=1,mxpart
+ do k=1,4
+ ptrans(j,k)=ptilde(nd,j,k)
+ enddo
+ enddo
+c--- do something special if (jp .ne. 5)
+ if (jp .ne. 5) then
+ if (ip .lt. 5) then
+C ie for cases 34_i,43_i
+ call subr_corr(ptrans,vec,3,msqvx)
+ else
+C ie for cases 54_i,53_i
+ call subr_corr(ptrans,vec,4,msqvx)
+ endif
+ else
+C ie for cases 35_i,45_i
+ call subr_corr(ptrans,vec,ip,msqvx)
+ endif
+
+ sub(qq)=+gsq/x/sij*(two/(omz+omx)-one-z)
+ sub(gq)=+gsq/x/sij
+ sub(gg)=+2d0*gsq/x/sij*(one/(omz+omx)+one/(z+omx)-two)
+ subv =+4d0*gsq/x/sij/sij
+
+
+***********************************************************************
+**************************** FINAL-FINAL ******************************
+***********************************************************************
+ elseif ((ip .gt. 2) .and. (kp .gt. 2)) then
+c------Eq-(5.2)
+ y=sij/(sij+sjk+sik)
+ z=sik/(sjk+sik)
+ omz=one-z
+ omy=one-y
+C---calculate the ptrans-momenta
+
+ call transform(p,ptrans,y,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+ do nu=1,4
+ vec(nu)=z*p(ip,nu)-omz*p(jp,nu)
+ enddo
+ call subr_born(ptrans,msq,msqx)
+ if (ip .lt. kp) then
+ call subr_corr(ptrans,vec,3,msqvx)
+ else
+ call subr_corr(ptrans,vec,4,msqvx)
+ endif
+
+ sub(qq)=gsq/sij*(two/(one-z*omy)-one-z)
+ sub(gq)=gsq/sij
+ sub(gg)=gsq/sij*(two/(one-z*omy)+two/(one-omz*omy)-four)
+ subv =+4d0*gsq/sij/sij
+
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/mcfm_vegas.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/mcfm_vegas.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/mcfm_vegas.f (revision 1338)
@@ -0,0 +1,280 @@
+ subroutine mcfm_vegas(myinit,myitmx,myncall,mybin,xinteg,xerr)
+************************************************************************
+* *
+* This routine should perform the sweeps of vegasnr *
+* *
+* Input parameters: *
+* myinit : the vegasnr routine entry point *
+* myitmx : the number of vegasnr sweeps *
+* myncall : the number of iterations per sweep *
+* bin : whether or not the results should be histogrammed *
+* *
+* Returned variables: *
+* xinteg : value of integration *
+* xerr : integration error
+* *
+************************************************************************
+ implicit none
+ include 'gridinfo.f'
+ include 'realwt.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'vegas_common.f'
+ include 'PDFerrors.f'
+ integer myitmx,myncall,myinit,i,j,k,nproc
+ logical mybin,bin
+ double precision sig,sd,chi,sigr,sdr,sigdk,sddk,chidk,
+ . xreal,xreal2,xinteg,xerr,adjust,myscale,myfacscale
+ character*4 part,mypart
+ common/nproc/nproc
+ common/part/part
+ common/mypart/mypart
+ common/bin/bin
+ common/xreal/xreal,xreal2
+ common/reset/reset,scalereset
+ double precision lowint,virtint,realint
+ double precision region(2*mxdim),lord_bypart(-1:1,-1:1)
+ logical first,reset,scalereset,myreadin
+ common/bypart/lord_bypart
+ external lowint,virtint,realint
+ data first/.true./
+ save first
+
+c--- Initialize all integration results to zero, so that the
+c--- total of virt and real may be combined at the end for 'tota'
+ sig=0d0
+ sigr=0d0
+ sigdk=0d0
+ sd=0d0
+ sdr=0d0
+ sddk=0d0
+ xreal=0d0
+ xreal2=0d0
+
+ do j=-1,1
+ do k=-1,1
+ lord_bypart(j,k)=0d0
+ enddo
+ enddo
+ if (PDFerrors) then
+ do i=0,maxPDFsets
+ PDFxsec(i)=0d0
+ enddo
+ endif
+
+c--- Controls behaviour of gen_njets: need to reset phase-space
+c--- boundaries when going from virt to real (using tota)
+c--- need to reset scale also, for special scalestart values
+ reset=.false.
+ scalereset=.false.
+
+c--- Put the vegasnr parameters in the common block
+ itmx=myitmx
+ ncall=myncall
+ bin=mybin
+
+c--- Basic lowest-order integration
+ if (part .eq. 'lord') then
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,lowint,myinit,myncall,myitmx,
+ . 0,sig,sd,chi)
+ endif
+
+c--- Store value of part in mypart, which will be retained;
+c--- also store value of scale in myscale, which will be retained;
+c--- part and scale can be changed to make sure that the tota option works.
+ mypart=part
+ myscale=scale
+ myfacscale=facscale
+
+c--- If we're doing the tota integration, then set up the grid info
+ if ((mypart .eq. 'tota') .or. (mypart .eq. 'todk')) then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for virtual grid
+ ingridfile='dvegas_virt_'//ingridfile
+ myreadin=readin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ outgridfile='dvegas_virt.grid'
+ else
+ readin=.true.
+ writeout=.false.
+ ingridfile='dvegas_virt.grid'
+ endif
+ endif
+ endif
+
+c--- Virtual integration should have one extra dimension
+c--- (added and then taken away)
+ if ( (mypart .eq. 'virt') .or. (mypart .eq. 'tota')
+ . .or. (mypart .eq. 'todk') ) then
+ part='virt'
+ reset=.true.
+ scalereset=.true.
+ ndim=ndim+1
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,virtint,myinit,myncall,myitmx,
+ . 0,sig,sd,chi)
+ ndim=ndim-1
+ endif
+
+c--- If we're doing the tota integration, then set up the grid info
+ if ((mypart .eq. 'tota') .or. (mypart .eq. 'todk')) then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for real grid
+ ingridfile(8:11)='real'
+ readin=myreadin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ outgridfile='dvegas_real.grid'
+ else
+ readin=.true.
+ writeout=.false.
+ ingridfile='dvegas_real.grid'
+ endif
+ endif
+ endif
+
+c--- Real integration should have three extra dimensions
+c--- 'realwt' is a special option that in general should be false
+c--- ('realwt' true samples the integral according to the
+c--- unsubtracted real emission weight)
+ if (mypart .eq. 'real') then
+ part='real'
+ scalereset=.true.
+ if (realwt) then
+ nprn=0
+ endif
+ xreal=0d0
+ xreal2=0d0
+ ndim=ndim+3
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,realint,myinit,myncall,myitmx,
+ . 0,sigr,sdr,chi)
+ ndim=ndim-3
+ write(6,*)
+ ncall=myncall
+ if (realwt) then
+ sigr=xreal
+ sdr=dsqrt(abs((xreal2-xreal**2)/dfloat(ncall)))
+ write(6,*) itmx,' iterations of ',ncall,' calls'
+ write(6,*) 'Value of subtracted integral',sigr
+ write(6,*) 'Error on subtracted integral',sdr
+ endif
+ endif
+ if ((mypart .eq. 'tota') .or. (mypart .eq. 'todk')) then
+ scale=myscale
+ facscale=myfacscale
+ part='real'
+ reset=.true.
+ if (realwt) then
+ nprn=0
+ endif
+ xreal=0d0
+ xreal2=0d0
+ adjust=(dfloat(ndim+3))/(dfloat(ndim+1))
+ ncall=int(dfloat(myncall)**adjust)/2
+ write(6,*) 'Adjusting number of points for real to',ncall
+ ndim=ndim+3
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,realint,myinit,ncall,myitmx,
+ . 0,sigr,sdr,chi)
+ ndim=ndim-3
+ write(6,*)
+ ncall=myncall
+
+ if (realwt) then
+ sigr=xreal
+ sdr=dsqrt(abs((xreal2-xreal**2)/dfloat(ncall)))
+ write(6,*) itmx,' iterations of ',ncall,' calls'
+ write(6,*) 'Value of subtracted integral',sigr
+ write(6,*) 'Error on subtracted integral',sdr
+ endif
+ endif
+
+c--- If we're doing the todk integration, then set up the grid info
+ if (mypart .eq. 'todk') then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for real grid
+ ingridfile(8:11)='redk'
+ readin=myreadin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ outgridfile='dvegas_redk.grid'
+ else
+ readin=.true.
+ writeout=.false.
+ ingridfile='dvegas_redk.grid'
+ endif
+ endif
+ endif
+
+ if (mypart .eq. 'todk') then
+ scale=myscale
+ nproc=nproc+1
+ call chooser
+ part='real'
+ reset=.true.
+ if (realwt) then
+ nprn=0
+ endif
+ xreal=0d0
+ xreal2=0d0
+ adjust=(dfloat(ndim+3))/(dfloat(ndim+1))
+ ncall=int(dfloat(myncall)**adjust)/2
+ write(6,*) 'Adjusting number of points for real to',ncall
+ ndim=ndim+3
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,realint,myinit,ncall,myitmx,
+ . 0,sigdk,sddk,chidk)
+ ndim=ndim-3
+ write(6,*)
+ ncall=myncall
+ nproc=nproc-1
+ call chooser
+
+ if (realwt) then
+ sigdk=xreal
+ sddk=dsqrt(abs((xreal2-xreal**2)/dfloat(ncall)))
+ write(6,*) itmx,' iterations of ',ncall,' calls'
+ write(6,*) 'Value of subtracted integral',sigdk
+ write(6,*) 'Error on subtracted integral',sddk
+ endif
+ endif
+
+c--- calculate integration variables to be returned
+ xinteg=sig+sigr+sigdk
+ xerr=dsqrt(sd**2+sdr**2+sddk**2)
+
+c--- return part and scale to their real values
+ part=mypart
+ scale=myscale
+ first=.false.
+
+ return
+ end
+
+
+ subroutine boundregion(idim,region)
+c--- Initializes integration region [0,1] for each variable
+c--- in the idim-dimensional integration range
+ implicit none
+ include 'mxdim.f'
+ integer i,idim
+ double precision region(2*mxdim)
+
+ do i=1,idim
+ region(i)=0d0
+ region(i+idim)=1d0
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/histofinLH.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/histofinLH.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/histofinLH.f (revision 1338)
@@ -0,0 +1,191 @@
+ block data linlog_data
+ implicit none
+ include 'nplot.f'
+ data linlog/150*'lin'/
+ end
+
+ subroutine histofin(xsec,xsec_err,itno,itmx)
+c--- This outputs the final histograms for itno=0
+c--- For itno>0, this is an intermediate result only
+ implicit none
+ include 'nplot.f'
+ include 'histo.f'
+ integer j,nlength,itno,itmx,nplotmax,L
+ logical fin,snd
+ common/fin/fin
+ character*30 runstring
+ character*72 runname,outfiledat,outfiletop,outfileerr
+ character*3 oldbook
+ double precision xsec,xsec_err
+ double precision EHIST(4,40,100)
+ integer IHISTOMATCH(100),ICOUNTHISTO
+ common/runstring/runstring
+ common/runname/runname
+ common/nlength/nlength
+ common/nplotmax/nplotmax
+ COMMON/EHISTO/EHIST,IHISTOMATCH,ICOUNTHISTO
+ character*4 part,mypart
+ common/mypart/mypart
+ common/part/part
+ integer order
+ common/nnlo/order
+
+C Part is what it is computing
+C mypart is what is set at the beginning
+
+C Fin is true at the very last iteration
+C Snd is true when computing real after virt
+
+ snd=.false.
+
+ if((part.eq.'real').and.(mypart.eq.'tota')) snd=.true.
+
+
+c
+c Accumula i valori e i valori al quadrato per l'analisi statistica,
+c e svuota l'istogramma di accumulo.
+c
+
+ do j=1,nplotmax
+ call mopera(j,'A',j+20,j+40,1d0,1d0)
+ enddo
+
+
+ if(itno.lt.itmx) then
+
+c do j=1,nplotmax
+
+c call flush(6)
+
+c--- ensure that MFINAL doesn't turn off booking for intermediate results
+c oldbook=book(j)
+c call mfinal(j)
+c if (itno .gt. 0) then
+c book(j)=oldbook
+c endif
+c enddo
+
+
+C Generate intermediate topdrawer file (no errors !)
+
+ do j=1,nplotmax
+ call flush(6)
+
+ call strcat(runstring,'.top',outfiletop)
+ open(unit=99,file=outfiletop,status='unknown')
+
+CC Rescale by itmx/itno and put in j+120
+
+ call mopera(j+20,'F',2,j+120,dfloat(itmx)/dfloat(itno),1d0)
+
+CC If needed, combine with final result for virtual
+
+ if(snd) then
+ call mopera(j+120,'+',j+80,j+120,1d0,1d0)
+ endif
+
+ call mfinal(j+120)
+ call mtop(j+120,150,'x','y',linlog(j))
+
+ enddo
+ close (unit=99)
+
+
+CC If we are at the last step
+
+ else
+
+ call strcat(runstring,'.top',outfiletop)
+
+ open(unit=99,file=outfiletop,status='unknown')
+
+c--- write out run info to top of files
+
+ call writeinfo(99,xsec,xsec_err,itno)
+
+
+C Complete statistical analysis
+
+
+ do j=1,nplotmax
+
+c accumula j+1 riscalato in j e pone in j+2 la stima dell'errore
+c
+
+ call mopera(j+20,'E',j+40,j,1d0,1d0)
+
+
+c
+c accumula l'errore in quadratura
+c
+ call mopera(j+40,'Q',j+60,j+60,1d0,1d0)
+
+ enddo
+
+
+
+C If this is the end rescale by itmx and put results,error in j,j+60
+
+C If not rescale by itmx and put results,error in j+80,j+100
+C Then clear j+20,j+40,j+60,j+80 and number of entries
+
+
+ do j=1,nplotmax
+
+ if(fin) then
+ call mopera(j,'F',2,j,dfloat(itmx),1d0)
+ call mopera(j+60,'F',2,j+60,dfloat(itmx),1d0)
+ else
+ call mopera(j,'F',2,j+80,dfloat(itmx),1d0)
+ call mopera(j+60,'F',2,j+100,dfloat(itmx),1d0)
+ call mopera(j,'F',2,j,0d0,1d0) ! clear
+ call mopera(j+20,'F',2,j+20,0d0,1d0) ! clear
+ call mopera(j+40,'F',2,j+20,0d0,1d0) ! clear
+ call mopera(j+60,'F',2,j+60,0d0,1d0) ! clear
+ ihis(j,1)=0
+ ihis(j+20,1)=0
+ ihis(j+40,1)=0
+ ihis(j+60,1)=0
+ endif
+
+ enddo
+
+
+C If needed combine the histograms (used when computing real+virt)
+
+ do j=1,nplotmax
+
+ if(fin.and.(mypart.eq.'tota').and.(order.ne.0)) then
+ call mopera(j,'+',j+80,j,1d0,1d0) ! sum real+virtual
+C Combine errors in quadrature
+ call mopera(j+60,'S',j,j+60,1d0,1d0) ! square it
+ call mopera(j+100,'S',j,j+100,1d0,1d0)! square it
+ call mopera(j+60,'+',j+100,j+60,1d0,1d0) ! sum squares
+ call mopera(j+60,'R',j,j+60,1d0,1d0) ! takes square root
+ endif
+
+ enddo
+
+C Generate final topdrawer file
+
+ do j=1,nplotmax
+ call flush(6)
+
+ if(fin) then
+ call mfinal(j)
+ call mtop(j,60+j,'x','y',linlog(j))
+ else
+ call mfinal(j+80)
+ call mtop(j+80,100+j,'x','y',linlog(j))
+ endif
+
+ enddo
+
+ endif
+
+ close (unit=99)
+
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/countDYale.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/countDYale.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/countDYale.f (revision 1338)
@@ -0,0 +1,881 @@
+CC Counterterm to be subtracted from real+virt to get a finite
+CC cross section at qt->0
+
+C Version that allows to separate also qg channel
+
+C Scale dependence included up to NNLO
+
+ double precision function countint(vector,wgt)
+ implicit none
+ include 'constants.f'
+ include 'realonly.f'
+ include 'virtonly.f'
+ include 'noglue.f'
+ include 'vegas_common.f'
+ include 'ptilde.f'
+ include 'npart.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'zerowidth.f'
+ include 'efficiency.f'
+ include 'masses.f'
+ include 'limits.f'
+C
+ include 'jetlabel.f'
+ include 'qcdcouple.f'
+ include 'phasemin.f'
+ include 'rescoeff.f'
+ include 'dynamicscale.f'
+C
+ integer ih1,ih2,j,k,l,nd,nmax,nmin,nvec,order
+ integer nproc
+ common/nproc/nproc
+ double precision vector(mxdim),val,xint
+ double precision sqrts
+ double precision p(mxpart,4),pjet(mxpart,4),p1ext(4),p2ext(4)
+ double precision pswt,rscalestart,fscalestart
+ double precision s(mxpart,mxpart),wgt
+ double precision msqc(-nf:nf,-nf:nf),xmsq(0:maxd)
+ double precision C1qqdelta(-nf:nf,-nf:nf)
+ double precision BrnRat,xreal,xreal2
+ double precision qtcut
+CC
+ logical cuts
+ double precision ptrans(mxpart,4)
+ double precision q2,qt2,shat,Itilde
+ double precision fx10(-nf:nf),fx20(-nf:nf)
+ double precision fx1p(-nf:nf),fx2p(-nf:nf)
+ double precision alfa,beta,diff,Pqq,Pqg,Pqqint,Cqq,Cqg
+ double precision xjacq2,xjacqt2,xth,x3
+ double precision xmio,fluxborn,pswt0,qtmax
+ double precision shad,Vol
+ double precision xx0(2),xx10,xx20
+ double precision sig1,sig2,LR,LF
+ double precision sig11,sig12
+ double precision sig21,sig22,sig23,sig24
+ double precision tdelta,tH1st,tH1stF,tgaga,tcga,tgamma2
+ double precision LL1,LL2,LL3,LL4
+ double precision z1,z2,diff1,diff2,cut
+ double precision D0int,D1int
+ double precision Pqqqq,Pqqqg,Pqggq,Pqggg
+ double precision CqqPqq,CqqPqg,CqgPgq,CqgPgg
+ double precision P2qg,P2qqV,P2qqbV,P2qqS
+ double precision diffg10,diffg20,diffc10,diffc20
+ double precision diffg1f,diffg2f,diffc1f,diffc2f
+ external Itilde,Pqq,Pqg,Cqq,Cqg,Pqqint,D0int,D1int
+ external Pqqqq,Pqqqg,Pqggq,Pqggg,CqqPqq,CqqPqg,CqgPgq,CqgPgg
+ external P2qqV,P2qqbV,P2qg,P2qqS
+
+ common/xmio/xmio
+ common/xx0/xx0
+ common/qtcut/qtcut
+ common/nnlo/order
+
+CC
+CC Variables passed from virtint or lowint
+CC
+ common/count/qt2,q2,shat
+
+CC
+ integer flgq
+c integer n2,n3
+c double precision mass2,width2,mass3,width3
+c common/breit/n2,n3,mass2,width2,mass3,width3
+ common/xreal/xreal,xreal2
+ logical bin,first
+ logical incldip(0:maxd)
+ logical creatent,dswhisto
+ common/density/ih1,ih2
+ common/energy/sqrts
+ common/bin/bin
+ common/Pext/p1ext,p2ext
+ common/nmax/nmax
+ common/BrnRat/BrnRat
+ common/nmin/nmin
+ common/incldip/incldip
+ common/outputflags/creatent,dswhisto
+ data p/48*0d0/
+ data first/.true./
+ save first,rscalestart,fscalestart
+ if (first) then
+ first=.false.
+ rscalestart=scale
+ fscalestart=facscale
+ endif
+ ntotshot=ntotshot+1
+ pswt=0d0
+ countint=0d0
+
+ ! nd=0,ndmax?
+ do nd=0,1
+ xmsq(nd)=0d0
+ enddo
+
+
+ npart=4
+ nvec=npart+2
+
+ shad=sqrts**2
+
+CC Generate q2 again, up to wsqmax
+ x3=vector(6)
+ q2=wsqmin+x3*(wsqmax-wsqmin)
+CC Check if q2 is in the proper interval (NB: q2=shat now)
+ if(q2.lt.wsqmin.or.q2.gt.wsqmax) goto 999
+CC Jacobian for qt2
+ xjacq2=wsqmax-wsqmin
+
+CC Generate qt2 up to qtmax
+ qtmax=3d3
+ xth=vector(7)
+ qt2=qtmax**2*xth
+ if(dsqrt(qt2).lt.qtcut) goto 999
+CC Jacobian for qt2
+ xjacqt2=qtmax**2
+
+c--- xmio used by besselk to calculate Itilde
+ xmio=dsqrt(qt2/q2)
+ Vol=1d0
+
+
+CC LR,LF
+
+ LR=dlog(q2/scale**2)
+ LF=dlog(q2/facscale**2)
+
+CC LL1,LL2,LL3,LL4: large log (squared) corresponding to eq. (136)
+CC In this way normalization is fixed to dsigma/dqt2
+
+ LL1=Itilde(1)/q2**2
+ LL2=Itilde(2)/q2**2
+ LL3=Itilde(3)/q2**2
+ LL4=Itilde(4)/q2**2
+
+CC Generate BORN momenta for counterterm (consistent with gen4)
+
+ call genBORN3(q2,shat,vector,ptrans,pswt0,*999)
+
+ call storeptilde(1,ptrans)
+
+CC Here we have to check if the counterevent passes the cuts
+
+ jets=0
+ incldip(1)=cuts(ptrans,0)
+ if (incldip(1)) goto 999
+
+CC Compute Born matrix element
+
+ if(nproc.eq.3)then
+ call qqb_zgam(ptrans,msqc)
+ call qqb_zgam_c1qqdelta(ptrans,C1qqdelta)
+ else
+ call qqb_wgam(ptrans,msqc)
+ call qqb_wgam_c1qqdelta(ptrans,C1qqdelta)
+ endif
+
+C Scaled momentum fractions
+
+ cut=1d-7
+
+ beta=cut+(1-cut)*vector(11)
+ alfa=cut+(1-cut)*vector(12)
+
+ xx10=xx0(1)
+ xx20=xx0(2)
+
+ z1=xx10**beta
+ z2=xx20**alfa
+
+
+c--- calculate PDF's
+
+ if(xx10.lt.1d-5)write(*,*)q2,xx10
+ if(xx20.lt.1d-5)write(*,*)q2,xx20
+
+ call fdist(ih1,xx10,facscale,fx10)
+ call fdist(ih2,xx20,facscale,fx20)
+
+ call fdist(ih1,xx10**(1-beta),facscale,fx1p)
+ call fdist(ih2,xx20**(1-alfa),facscale,fx2p)
+
+
+CC Switch off gluon !!
+
+ if(noglue) then
+ fx10(0)=0d0
+ fx20(0)=0d0
+ fx1p(0)=0d0
+ fx2p(0)=0d0
+ endif
+
+CC Gluon only !
+
+ if(ggonly) then
+ do j=1,5
+ fx10(j)=0d0
+ fx10(-j)=0d0
+ fx1p(j)=0d0
+ fx1p(-j)=0d0
+ fx20(j)=0d0
+ fx20(-j)=0d0
+ fx2p(j)=0d0
+ fx2p(-j)=0d0
+ enddo
+ endif
+
+ flgq=1
+ if(gqonly)flgq=0
+
+C Flux for Born cross section
+
+ fluxborn=fbGeV2/(2*q2)
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Start construction of the counterterm
+
+ tdelta=0d0
+ tH1st=0d0
+ tH1stF=0d0
+ tgaga=0d0
+ tcga=0d0
+ tgamma2=0d0
+
+ diffc10=0d0
+ diffc1f=0d0
+ diffc20=0d0
+ diffc2f=0d0
+
+ diffg10=0d0
+ diffg1f=0d0
+ diffg20=0d0
+ diffg2f=0d0
+
+ sig1=0d0
+ sig2=0d0
+
+ sig11=0d0
+ sig12=0d0
+ sig21=0d0
+ sig22=0d0
+ sig23=0d0
+ sig24=0d0
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if(msqc(j,k).eq.0d0) goto 75
+
+
+C Simplest term without convolutions
+
+ tdelta=tdelta+fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+C Start H1st: to be used later
+
+C H1st delta term
+
+ tH1st=tH1st+2*C1qqdelta(j,k)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+C H1st: non delta terms, first leg
+
+
+ tH1st=tH1st+(fx1p(j)*Cqq(z1)*flgq+fx1p(0)*Cqg(z1))
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+
+C H1st: non delta terms, second leg
+
+
+ tH1st=tH1st+(fx2p(k)*Cqq(z2)*flgq+fx2p(0)*Cqg(z2))
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+
+
+C H1st: muf dependence (LF factor to be added at the end)
+
+
+c gammaqq and gammaqg: first leg
+
+
+ diff=-dlog(xx10)
+ & *((fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)*flgq+fx1p(0)*Pqg(z1))
+ tH1stF=tH1stF+diff*fx20(k)*msqc(j,k)
+ tH1stF=tH1stF-Pqqint(xx10)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+c gammaqq and gammaqg: second leg
+
+
+ diff=-dlog(xx20)
+ & *((fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)*flgq+fx2p(0)*Pqg(z2))
+ tH1stF=tH1stF+diff*fx10(j)*msqc(j,k)
+ tH1stF=tH1stF-Pqqint(xx20)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+CC End of H1st
+
+ if(order.eq.1) goto 75
+
+CC Now (gamma+gamma)*(gamma+gamma) term: to be used later
+
+C First part: one gamma for each leg: FLGQ here is non trivial ! DONE
+
+
+ diffg1f=-dlog(xx10)*(fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)
+ & - Pqqint(xx10)*fx10(j)
+
+
+ diffg10=-dlog(xx10)*fx1p(0)*Pqg(z1)
+
+ diffg2f=-dlog(xx20)*(fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)
+ & - Pqqint(xx20)*fx20(k)
+
+
+ diffg20=-dlog(xx20)*fx2p(0)*Pqg(z2)
+
+
+ tgaga=tgaga+2*
+ & (flgq*diffg10*diffg20+flgq*diffg1f*diffg2f
+ & +diffg10*diffg2f+diffg1f*diffg20)*msqc(j,k)
+
+
+CC Second part: gamma*gamma terms
+
+c Pij * Pjk = D1ijjk (log(1-z)/(1-z))_+ + D0ijjk/(1-z)_+
+c + Pijjk(z) + Deltaijjk delta(1-z)
+
+C First leg
+
+
+ diff1=-dlog(xx10)*(flgq*(fx1p(j)-fx10(j)*xx10**beta)
+ & *(D0qqqq/(1-z1)+D1qqqq*dlog(1-z1)/(1-z1))
+ & +fx1p(j)*Pqqqq(z1)*flgq+fx1p(0)*(Pqqqg(z1)+Pqggg(z1)))
+ & +(Deltaqqqq-D0qqqq*D0int(xx10)-D1qqqq*D1int(xx10))
+ & *fx10(j)*flgq
+
+
+C Second leg
+
+
+ diff2=-dlog(xx20)*(flgq*(fx2p(k)-fx20(k)*xx20**alfa)
+ & *(D0qqqq/(1-z2)+D1qqqq*dlog(1-z2)/(1-z2))
+ & +fx2p(k)*Pqqqq(z2)*flgq+fx2p(0)*(Pqqqg(z2)+Pqggg(z2)))
+ & +(Deltaqqqq-D0qqqq*D0int(xx20)-D1qqqq*D1int(xx20))
+ & *fx20(k)*flgq
+
+
+C Include Pqggq
+
+ do l=1,nf
+ diff1=diff1-dlog(xx10)*(fx1p(l)+fx1p(-l))*Pqggq(z1)*flgq
+ diff2=diff2-dlog(xx20)*(fx2p(l)+fx2p(-l))*Pqggq(z2)*flgq
+ enddo
+
+ tgaga=tgaga+diff1*fx20(k)*msqc(j,k)
+ tgaga=tgaga+diff2*fx10(j)*msqc(j,k)
+
+
+
+C End of (gamma+gamma)*(gamma+gamma) term: FLGQ non trivial here ! DONE
+
+C Start (C+C)*(gamma+gamma) term
+
+c gamma first leg, C second leg
+
+
+ diffc2f=-dlog(xx20)*fx2p(k)*Cqq(z2)+C1qqdelta(j,k)*fx20(k)
+
+ diffc20=-dlog(xx20)*fx2p(0)*Cqg(z2)
+
+
+ tcga=tcga+msqc(j,k)*
+ & (flgq*diffg10*diffc20+flgq*diffg1f*diffc2f
+ & +diffg10*diffc2f+diffg1f*diffc20)
+
+
+c C first leg, gamma second leg
+
+ diffc1f=-dlog(xx10)*fx1p(j)*Cqq(z1)+C1qqdelta(j,k)*fx10(j)
+
+ diffc10=-dlog(xx10)*fx1p(0)*Cqg(z1)
+
+ tcga=tcga+msqc(j,k)*
+ & (flgq*diffc10*diffg20+flgq*diffc1f*diffg2f
+ & +diffc10*diffg2f+diffc1f*diffg20)
+
+
+c C*gamma: first leg (ignore delta term in Cqq: taken into account afterwards)
+
+ tcga=tcga
+ & +(fx1p(j)*CqqPqq(z1)*flgq+fx1p(0)*(CqqPqg(z1)+CqgPgg(z1)))
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+c C*gamma: first leg, Cqq delta term
+
+ diff=-dlog(xx10)
+ & *((fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)*flgq+fx1p(0)*Pqg(z1))
+ tcga=tcga+diff*fx20(k)*msqc(j,k)
+ & *C1qqdelta(j,k)
+ tcga=tcga-Pqqint(xx10)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+ & *C1qqdelta(j,k)
+
+c C*gamma: second leg (ignore delta term in Cqq: taken into account afterwards)
+
+ tcga=tcga
+ & +(fx2p(k)*CqqPqq(z2)*flgq+fx2p(0)*(CqqPqg(z2)+CqgPgg(z2)))
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+
+c C*gamma: second leg, Cqq delta term
+
+ diff=-dlog(xx20)
+ & *((fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)*flgq+fx2p(0)*Pqg(z2))
+ tcga=tcga+diff*fx10(j)*msqc(j,k)
+ & *C1qqdelta(j,k)
+ tcga=tcga-Pqqint(xx20)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+ & *C1qqdelta(j,k)
+
+c Add Cqg*Pgq contribution
+
+ do l=1,nf
+ tcga=tcga+(fx1p(l)+fx1p(-l))*CqgPgq(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tcga=tcga+(fx2p(l)+fx2p(-l))*CqgPgq(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+ enddo
+
+CC Start 2-loop AP
+
+C Gluon + pure singlet
+
+
+ do l=-nf,nf
+ if(l.eq.0) then
+ tgamma2=tgamma2+fx1p(0)*P2qg(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+ tgamma2=tgamma2+fx2p(0)*P2qg(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+ else
+ tgamma2=tgamma2+fx1p(l)*P2qqS(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tgamma2=tgamma2+fx2p(l)*P2qqS(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+ endif
+ enddo
+
+
+C P2qq non-singlet: regular part
+
+ tgamma2=tgamma2+fx1p(j)*P2qqV(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tgamma2=tgamma2+fx2p(k)*P2qqV(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+
+
+C P2qq non-singlet: 1/(1-z)_+
+
+
+ diff=-dlog(xx10)
+ & *(fx1p(j)-fx10(j)*xx10**beta)/(1-z1)
+ & - D0int(xx10)*fx10(j)
+
+ tgamma2=tgamma2+2d0/3*Kappa*diff*fx20(k)*msqc(j,k)*flgq
+
+
+ diff=-dlog(xx20)
+ & *(fx2p(k)-fx20(k)*xx20**alfa)/(1-z2)
+ & - D0int(xx20)*fx20(k)
+
+ tgamma2=tgamma2+2d0/3*Kappa*diff*fx10(j)*msqc(j,k)*flgq
+
+
+
+C P2qqb non singlet
+
+ tgamma2=tgamma2+fx1p(-j)*P2qqbV(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+
+ tgamma2=tgamma2+fx2p(-k)*P2qqbV(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+
+ 75 continue
+
+ enddo
+ enddo
+
+
+CC First order
+
+ sig12=-0.5d0*A1q*tdelta
+ sig11=-B1q*tdelta-tH1stF
+
+
+CC Second order
+
+ sig24=(A1q)**2/8*tdelta
+
+ sig23=-beta0*A1q/3*tdelta-0.5d0*A1q*sig11
+
+ sig22=0.5d0*(beta0*A1q*LR-A2q)*tdelta
+ & -0.5d0*A1q*(tH1st+LF*tH1stF)
+ & -0.5d0*(B1q-beta0)*sig11
+ & +0.5d0*B1q*tH1stF
+ & +0.5d0*tgaga
+
+
+
+ sig21=-beta0*LR*sig11-B1q*(tH1st+LF*tH1stF)
+ & -LF*tgaga-B2q*tdelta+beta0*tH1st-tcga-tgamma2
+
+
+C Include missing term from contact term in 2 loop AP
+
+ sig21=sig21-2*Delta2qq*tdelta
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+CC Include as/pi factors and sum O(as) and O(as^2) contributions
+
+
+ sig1=sig12*LL2+sig11*LL1
+ sig2=sig24*LL4+sig23*LL3+sig22*LL2+sig21*LL1
+
+
+ sig1=sig1*ason2pi*2
+ sig2=sig2*(ason2pi*2)**2
+
+ if(order.eq.1)then
+ xmsq(1)=-sig1
+ else
+ xmsq(1)=-(sig1+sig2)
+ endif
+
+
+CC Include jacobians
+
+ xmsq(1)=xmsq(1)*xjacqt2*xjacq2*q2/shad/Vol
+
+
+ countint=0d0
+ xint=0d0
+
+
+C Multiply by BORN phase space weight
+
+ xmsq(1)=xmsq(1)*fluxborn*pswt0/BrnRat
+
+
+c 77 continue
+
+
+
+c---Add to total
+
+ xint=xmsq(1)
+ val=xmsq(1)*wgt
+
+
+c---if we're binning, add to histo too
+ if (bin) then
+ call getptildejet(1,pjet)
+ call dotem(nvec,pjet,s)
+ val=val/dfloat(itmx)
+ call plotter(ptrans,val,1)
+c call plotter(p,val,0)
+ endif
+
+
+ countint=xint
+
+ xreal=xreal+xint*wgt/dfloat(itmx)
+ xreal2=xreal2+(xint*wgt)**2/dfloat(itmx)
+
+
+ return
+
+ 999 countint=0d0
+ ntotzero=ntotzero+1
+
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+CC qq splitting function (with asopi normalization)
+
+ function Pqq(z)
+ implicit none
+ real *8 Pqq,z
+ Pqq=2d0/3*(1+z**2)/(1-z)
+ return
+ end
+
+CC qg splitting function (with asopi normalization)
+
+ function Pqg(z)
+ implicit none
+ real *8 Pqg,z
+ Pqg=0.25d0*(1-2*z*(1-z))
+ return
+ end
+
+CC Non delta term in Cqq coefficient (with asopi normalization)
+
+ function Cqq(z)
+ implicit none
+ real *8 Cqq,z
+ Cqq=2d0/3*(1-z)
+ return
+ end
+
+
+CC Cqg coefficient (with asopi normalization)
+
+ function Cqg(z)
+ implicit none
+ real *8 Cqg,z
+ Cqg=0.5d0*z*(1-z)
+ return
+ end
+
+
+CC Integral of Pqq=1/2 CF (1+x^2)/(1-x) from 0 to z
+
+ function Pqqint(z)
+ implicit none
+ real *8 Pqqint,z
+ Pqqint=-2d0/3*(z+z**2/2+2*dlog(1-z))
+ return
+ end
+
+CC Integral of 1/(1-x) from 0 to z
+
+ function D0int(z)
+ implicit none
+ real *8 D0int,z
+ D0int=-dlog(1-z)
+ return
+ end
+
+CC Integral of log(1-x)/(1-x) from 0 to z
+
+ function D1int(z)
+ implicit none
+ real *8 D1int,z
+ D1int=-0.5d0*dlog(1-z)**2
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C P*P convolutions
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Regular part of Pqq*Pqq (checked !)
+
+ function Pqqqq(z)
+ implicit none
+ real *8 Pqqqq,z
+ Pqqqq=4d0/9*(-4*dlog(z)/(1-z)-2*(1-z)
+ & +(1+z)*(3*dlog(z)-4*dlog(1-z)-3))
+ return
+ end
+
+
+CC Pqq*Pqg (checked !)
+
+ function Pqqqg(z)
+ implicit none
+ real *8 Pqqqg,z
+ Pqqqg=1d0/3*((z**2+(1-z)**2)*dlog((1-z)/z)
+ & -(z-0.5d0)*dlog(z)+z-0.25d0)
+ return
+ end
+
+CC Pqg*Pgq (checked !)
+
+ function Pqggq(z)
+ implicit none
+ real *8 Pqggq,z
+ Pqggq=1d0/3*(2d0/3/z+(1+z)*dlog(z)-2d0/3*z**2-0.5d0*(z-1))
+ return
+ end
+
+
+CC Full Pqg*Pgg (checked !)
+
+ function Pqggg(z)
+ implicit none
+ real *8 Pqggg,z,beta0,Pqg
+ integer nf
+ external Pqg
+ nf=5
+ beta0=(33-2*nf)/12d0
+ Pqggg=1.5d0*(1/3d0/z+(z**2-z+0.5d0)*dlog(1-z)
+ & +(2*z+0.5d0)*dlog(z)+0.25d0+2*z-31d0/12*z**2)
+
+ Pqggg=Pqggg+beta0*Pqg(z)
+ return
+ end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C C*P convolutions
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Cqq*Pqq (without delta term in Cqq) (checked !)
+
+ function CqqPqq(z)
+ implicit none
+ real *8 CqqPqq,z
+ CqqPqq=2d0/9*(1-z)*(4*dlog(1-z)-2*dlog(z)-1)
+ return
+ end
+
+CC Cqq*Pqg (without delta term in Cqq) (checked !)
+
+ function CqqPqg(z)
+ implicit none
+ real *8 CqqPqg,z
+ CqqPqg=(-2+z+z**2-(1+2*z)*dlog(z))/6d0
+ return
+ end
+
+CC Cqg*Pgq (checked !)
+
+ function CqgPgq(z)
+ implicit none
+ real *8 CqgPgq,z
+ CqgPgq=(1d0/3/z-1+2*z**2/3-z*dlog(z))/3d0
+ return
+ end
+
+CC Cqg*Pgg (checked !)
+
+ function CqgPgg(z)
+ implicit none
+ real *8 CqgPgg,z,beta0
+ integer nf
+ nf=5
+ beta0=(33-2*nf)/12d0
+ CqgPgg=3d0/4*(2*z*(1-z)*dlog(1-z)-4*z*dlog(z)
+ & +1d0/3/z-1-5*z+17d0*z**2/3)+beta0/2*z*(1-z)
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C Two loop AP: pqq of ESW is my 3/2 Pqq
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Pqq NS: Eq. (4.107) ESW (no 1/(1-x)_+ and delta term)
+
+ function P2qqV(x)
+ implicit none
+ real *8 x,P2qqV,Pqq,pi
+ integer nf
+ external Pqq
+
+ pi=3.14159265358979d0
+ nf=5
+
+ P2qqV=16d0/9*(-(2*dlog(x)*dlog(1-x)+1.5d0*dlog(x))*3d0/2*Pqq(x)
+ & -(1.5d0+3.5d0*x)*dlog(x)-0.5d0*(1+x)*dlog(x)**2-5*(1-x))
+ & +4*((0.5d0*dlog(x)**2+11d0/6*dlog(x))*3d0/2*Pqq(x)
+ & -(67d0/18-pi**2/6)*(1+x)
+ & +(1+x)*dlog(x)+20d0/3*(1-x))
+ & +2d0/3d0*nf*(-dlog(x)*Pqq(x)+10d0/9*(1+x)-4d0/3*(1-x))
+
+c Change to as/pi normalization
+
+ P2qqV=P2qqV/4
+
+ return
+ end
+
+
+C Pqqb NS: Eq. (4.108) ESW
+
+ function P2qqbV(x)
+ implicit none
+ real *8 x,P2qqbV,Pqq,S2
+ external Pqq,S2
+
+ P2qqbV=-2d0/9*(3d0*Pqq(-x)*S2(x)+2*(1+x)*dlog(x)+4*(1-x))
+
+c Change to as/pi normalization
+
+ P2qqbV=P2qqbV/4
+
+ return
+ end
+
+
+
+C Pqg Singlet: Eq. (4.110) ESW (ESW Pqg is 4 times my Pqg)
+
+ function P2qg(x)
+ implicit none
+ real *8 x,P2qg,Pqg,pi,S2,logx,logomxsx
+ external Pqg,S2
+
+ pi=3.14159265358979d0
+ logx=dlog(x)
+ logomxsx=dlog((1-x)/x)
+
+ P2qg=2d0/3*(4-9*x-(1-4*x)*logx-(1-2*x)*logx**2+4*dlog(1-x)
+ & +(2*logomxsx**2-4*logomxsx-2d0/3*pi**2+10d0)*4*Pqg(x))
+ & +1.5d0*(182d0/9+14d0/9*x+40d0/9/x+(136d0/3*x-38d0/3)*logx
+ & -4*dlog(1-x)-(2+8*x)*logx**2+8*Pqg(-x)*S2(x)
+ & +(-logx**2+44d0/3*logx-2*dlog(1-x)**2+4*dlog(1-x)+pi**2/3
+ & -218d0/9)*4*Pqg(x))
+
+c Change to as/pi normalization
+
+ P2qg=P2qg/4d0
+
+c Divide by 2 to eliminate 2nf factor
+
+ P2qg=P2qg/2d0
+
+ return
+ end
+
+C Pqq Pure Singlet appearing in ESW Eq. (4.95)
+C PSqq=PSqqb
+C Obtained through Eq.(4.101)
+C PSqq=1/2/nf (P2qq-P2qqbV-P2qqV) (contains only CF TR=2/3)
+
+ function P2qqS(x)
+ implicit none
+ real *8 P2qqS,x
+
+ P2qqS=2d0/3*(20 - 18*x + 54*x**2 - 56*x**3
+ & +3*x*(3 + 15*x + 8*x**2)*dlog(x)
+ & - 9*x*(1 + x)*dlog(x)**2)/(9*x)
+
+ P2qqS=P2qqS/4
+
+ return
+ end
+
+
+C S2: Eq. (4.114) ESW
+
+ function S2(x)
+ implicit none
+ real *8 x,pi,S2,myli2
+ external myli2
+ pi=3.14159265358979d0
+
+ S2=-2*myli2(-x)+0.5d0*dlog(x)**2-2*dlog(x)*dlog(1+x)-pi**2/6
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/myli3new.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/myli3new.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/myli3new.f (revision 1338)
@@ -0,0 +1,26 @@
+ function myLI3(x)
+ implicit none
+ double precision myLI3,xlog,x,PI,Z3
+ PI=3.14159265358979312D0
+ Z3=1.20205690315959429D0
+
+
+ if (x.lt.-20) then ! asymptotic expansion, suggested by Mathematica
+ xlog=dlog(-x)
+ myLI3= -1d0/6*(xlog**3+Pi**2*xlog) +1/x +1d0/8/x**2 +1d0/27/x**3
+ elseif (x.lt.0.5d0) then
+ xlog=dlog(1d0-x)
+ myLI3= -xlog -(3*xlog**2)/8. -(17*xlog**3)/216. -(5*xlog**4)/576
+ . -(7*xlog**5)/54000. +(7*xlog**6)/86400. +19*xlog**7/5556600
+ . -xlog**8/752640 -11*xlog**9/127008000 +11*xlog**10/435456000
+ elseif (x.lt.1d0) then
+ xlog=dlog(x)
+ myLI3=Z3 +(Pi**2*xlog)/6 +(3d0/4-dlog(-xlog)/2)*xlog**2
+ . -xlog**3/12-xlog**4/288 +xlog**6/86400 -xlog**8/10160640
+ elseif (x.eq.1d0) then
+ myLI3=Z3
+ else
+ write(6,*)'wrong argument of Li3!!'
+ endif
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/pdf_old.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/pdf_old.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/pdf_old.f (revision 1338)
@@ -0,0 +1,5833 @@
+ SUBROUTINE fdist(ih,x,q,fx)
+ implicit none
+
+ include 'pdfiset.f'
+ include 'constants.f'
+ real * 8 FX(-nf:nf)
+ REAL * 8 X,Q,Q2,DUV,DDV,DDEL,DUDB,DSB,DGL,CHR,BOT,UB,DB,DQ1
+ REAL * 8 BBAR,CBAR,DSBAR,PHOT
+ REAL * 8 ctq4fn,ctq5pdf,ctq6pdf
+
+C For Alekhin pdfs
+
+ real*8 pdfs09(0:8),dpdfs09(0:8,25)
+ real*8 pdfs06(0:9),dpdfs06(0:9,23)
+C
+ integer j,mode,ih
+ integer NPDF,NPAR
+
+ character *50 prefix,prefix1
+ integer nset
+ common/prefix/nset,prefix
+
+
+
+ Q2=Q**2
+
+
+
+C Fix to prevent undefined math operations for x=1.
+C Assumes that all structure functions vanish for x=1.
+
+
+ IF(1-X.EQ.0) THEN
+ DO J=-NF,NF
+ FX(J) = 0
+ ENDDO
+ RETURN
+ ENDIF
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ4
+
+ if (iset.eq.1) then
+ mode=3
+ DGL=Ctq4Fn (mode,0, x, Q)*x
+ UB=Ctq4Fn (mode,-1, x, Q)*x
+ DB=Ctq4Fn (mode,-2, x, Q)*x
+ DSB=Ctq4Fn (mode,-3, x, Q)*x
+ CHR=Ctq4Fn (mode,-4, x, Q)*x
+ BOT=Ctq4Fn (mode,-5, x, Q)*x
+ DUV=Ctq4Fn (mode,1, x, Q)*x - UB
+ DDV=Ctq4Fn (mode,2, x, Q)*x - DB
+ elseif (iset.eq.2) then
+ mode=1
+ DGL=Ctq4Fn (mode,0, x, Q)*x
+ UB=Ctq4Fn (mode,-1, x, Q)*x
+ DB=Ctq4Fn (mode,-2, x, Q)*x
+ DSB=Ctq4Fn (mode,-3, x, Q)*x
+ CHR=Ctq4Fn (mode,-4, x, Q)*x
+ BOT=Ctq4Fn (mode,-5, x, Q)*x
+ DUV=Ctq4Fn (mode,1, x, Q)*x - UB
+ DDV=Ctq4Fn (mode,2, x, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST98
+ elseif ((ISET.LT.17).AND.(ISET.GT.10)) THEN
+ mode=iset-10
+ call mrs98(x,q2,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ5
+
+ elseif ((ISET.LE.29).AND.(ISET.GT.20)) THEN
+ DGL=Ctq5Pdf (0, X, Q)*x
+ UB=Ctq5Pdf (-1, X, Q)*x
+ DB=Ctq5Pdf (-2, X, Q)*x
+ DSB=Ctq5Pdf (-3, X, Q)*x
+ CHR=Ctq5Pdf (-4, X, Q)*x
+ BOT=Ctq5Pdf (-5, X, Q)*x
+ DUV=Ctq5Pdf (1, X, Q)*x - UB
+ DDV=Ctq5Pdf (2, X, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST99
+ elseif (iset.eq.30) then
+ mode=1
+ call mrs99(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2001
+
+ ELSEIF ((ISET.LT.45).AND.(ISET.GT.40)) THEN
+ mode=iset-40
+ call mrst2001(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+ ELSEIF ((ISET.LT.49).AND.(ISET.GT.44)) THEN
+ mode=iset-44
+ call mrstnnlo(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2002 LO
+
+ ELSEIF (ISET.eq.49) THEN
+ mode=iset-48
+ call mrstlo(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ6
+
+ elseif ((ISET.LE.54).AND.(ISET.GT.50)) THEN
+ DGL=Ctq6Pdf (0, X, Q)*x
+ UB=Ctq6Pdf (-1, X, Q)*x
+ DB=Ctq6Pdf (-2, X, Q)*x
+ DSB=Ctq6Pdf (-3, X, Q)*x
+ CHR=Ctq6Pdf (-4, X, Q)*x
+ BOT=Ctq6Pdf (-5, X, Q)*x
+ DUV=Ctq6Pdf (1, X, Q)*x - UB
+ DDV=Ctq6Pdf (2, X, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2002
+
+ elseif ((iset.eq.61).or.(iset.eq.62)) then
+ mode=iset-60
+ call mrst2002(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2004
+
+ elseif ((iset.eq.71).or.(iset.eq.72)) then
+ mode=iset-70
+ call mrst2004(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Alekhin NNLO A06
+
+ elseif (iset.eq.75) then
+
+ call a06(x,q2,pdfs06,dpdfs06,npdf,npar)
+ if(nset.eq.0) then
+ duv=pdfs06(1)
+ ddv=pdfs06(2)
+ dgl=pdfs06(3)
+ ub=pdfs06(4)
+ dsb=pdfs06(5)
+ db=pdfs06(6)
+ chr=pdfs06(7)
+ bot=pdfs06(8)
+ else
+ duv=pdfs06(1)+dpdfs06(1,nset)
+ ddv=pdfs06(2)+dpdfs06(2,nset)
+ dgl=pdfs06(3)+dpdfs06(3,nset)
+ ub=pdfs06(4)+dpdfs06(4,nset)
+ dsb=pdfs06(5)+dpdfs06(5,nset)
+ db=pdfs06(6)+dpdfs06(6,nset)
+ chr=pdfs06(7)+dpdfs06(7,nset)
+ bot=pdfs06(8)+dpdfs06(8,nset)
+ endif
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Alekhin NNLO A09
+
+ elseif (iset.eq.85) then
+ call a09(x,q2,pdfs09,dpdfs09,5,nset)
+ if(nset.eq.0) then
+ duv=pdfs09(1)
+ ddv=pdfs09(2)
+ dgl=pdfs09(3)
+ ub=pdfs09(4)
+ dsb=pdfs09(5)
+ db=pdfs09(6)
+ chr=pdfs09(7)
+ bot=pdfs09(8)
+ else
+ duv=pdfs09(1)+dpdfs09(1,nset)
+ ddv=pdfs09(2)+dpdfs09(2,nset)
+ dgl=pdfs09(3)+dpdfs09(3,nset)
+ ub=pdfs09(4)+dpdfs09(4,nset)
+ dsb=pdfs09(5)+dpdfs09(5,nset)
+ db=pdfs09(6)+dpdfs09(6,nset)
+ chr=pdfs09(7)+dpdfs09(7,nset)
+ bot=pdfs09(8)+dpdfs09(8,nset)
+ endif
+
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MSTW 2008
+
+ elseif ((iset.gt.89).and.(iset.lt.93)) then
+
+ prefix1 = prefix(1:len_trim(prefix))//'.90cl' ! 90% C.L. errors
+
+ if(nset.eq.0)prefix1=prefix
+
+
+ CALL GetAllPDFs(prefix1,nset,x,q,
+ # DUV,DDV,UB,DB,DSB,DSBAR,CHR,Cbar,BOT,bbar,DGL,phot)
+
+
+
+
+ ELSE
+ WRITE(*,*)'NO SUCH DISTRIBUTION'
+ STOP
+ ENDIF
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+ if(iset.lt.90) then
+
+ DSBAR=DSB
+ CBAR=CHR
+ BBAR=BOT
+
+ endif
+
+CC BE CAREFUL !!
+
+CC Different from HNNLO:
+CC u->2 d->1
+
+
+c for protons
+ if (ih.eq.1) then
+ FX(0)=DGL/x
+ FX(2)=(DUV+UB)/x
+ FX(1)=(DDV+DB)/x
+ FX(3)=DSB/x
+ FX(4)=CHR/x
+ FX(5)=BOT/x
+ FX(-2)=UB/x
+ FX(-1)=DB/x
+ FX(-3)=DSBAR/x
+ FX(-4)=CBAR/x
+ FX(-5)=BBAR/x
+c for anti-protons
+ elseif (ih.eq.-1) then
+ FX(0)=DGL/x
+ FX(-2)=(DUV+UB)/x
+ FX(-1)=(DDV+DB)/x
+ FX(-3)=DSB/x
+ FX(-4)=CHR/x
+ FX(-5)=BOT/x
+ FX(2)=UB/x
+ FX(1)=DB/x
+ FX(3)=DSBAR/x
+ FX(4)=CBAR/x
+ FX(5)=BBAR/x
+ endif
+
+
+ RETURN
+ END
+
+
+
+ subroutine mrs98(x,q2,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C****************************************************************C
+C C
+C This is a package for the new MRS 1998 parton C
+C distributions. The format is similar to the previous C
+C (1996) MRS-R series. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, MSbar factorization is assumed, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 1 FT08A central gluon, a_s 300 0.1175 0.00561 C
+C 2 FT09A higher gluon 300 0.1175 0.00510 C
+C 3 FT11A lower gluon 300 0.1175 0.00408 C
+C 4 FT24A lower a_s 229 0.1125 0.00586 C
+C 5 FT23A higher a_s 383 0.1225 0.00410 C
+C C
+C C
+C The corresponding grid files are called ft08a.dat etc. C
+C C
+C The reference is: C
+C A.D. Martin, R.G. Roberts, W.J. Stirling, R.S Thorne C
+C Univ. Durham preprint DTP/98/??, hep-ph/??????? (1998) C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C
+c and for the LO sets
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C C
+C 6 LO05A central gluon, a_s 174 0.1250 0.01518 C
+C 7 LO09A higher gluon 174 0.1250 0.01616 C
+C 8 LO10A lower gluon 174 0.1250 0.01533 C
+C 9 LO01A lower a_s 136 0.1200 0.01652 C
+C 10 LO07A higher a_s 216 0.1300 0.01522 C
+C C
+C C
+C The corresponding grid files are called lt05a.dat etc. C
+c C
+C C
+C****************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ if(mode.eq.1) then
+ call mrs981(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrs982(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrs983(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrs984(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.5) then
+ call mrs985(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+c from here LO
+ elseif(mode.eq.6) then
+ call mrs986(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.7) then
+ call mrs987(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.8) then
+ call mrs988(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.9) then
+ call mrs989(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.10) then
+ call mrs9810(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ')
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ')
+ return
+ end
+
+ subroutine mrs981(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft08a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs982(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft09a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs983(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft11a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs984(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft24a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs985(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft23a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+C****************************************************************C
+C C
+C This is a package for the new MRS LO 1998 parton C
+C distributions. The format is similar to the previous C
+C (1996) MRS-R series. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C Reference Martin, Roberts, Stirling and Thorne C
+C Durham preprint DTP/98/52 (August 1998) C
+C C
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 6 LO05A central gluon, a_s 174 0.1250 0.01518 C
+C 7 LO09A higher gluon 174 0.1250 0.01616 C
+C 8 LO10A lower gluon 174 0.1250 0.01533 C
+C 9 LO01A lower a_s 136 0.1200 0.01652 C
+C 10 LO07A higher a_s 216 0.1300 0.01522 C
+C C
+C C
+
+ subroutine mrs986(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo05a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs987(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo09a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs988(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo10a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs989(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo01a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs9810(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo07a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs99(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C****************************************************************C
+C C
+C This is a package for the new **corrected** MRST parton C
+C distributions. The format is similar to the previous C
+C (1998) MRST series. C
+C C
+C NOTE: 7 new sets are added here, corresponding to shifting C
+C the small x HERA data up and down by 2.5%, and by varying C
+C the charm and strange distributions, and by forcing a C
+C larger d/u ratio at large x. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, MSbar factorization is assumed, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 1 COR01 central gluon, a_s 300 0.1175 0.00537 C
+C 2 COR02 higher gluon 300 0.1175 0.00497 C
+C 3 COR03 lower gluon 300 0.1175 0.00398 C
+C 4 COR04 lower a_s 229 0.1125 0.00585 C
+C 5 COR05 higher a_s 383 0.1225 0.00384 C
+C 6 COR06 quarks up 303.3 0.1178 0.00497 C
+C 7 COR07 quarks down 290.3 0.1171 0.00593 C
+C 8 COR08 strange up 300 0.1175 0.00524 C
+C 9 COR09 strange down 300 0.1175 0.00524 C
+C 10 C0R10 charm up 300 0.1175 0.00525 C
+C 11 COR11 charm down 300 0.1175 0.00524 C
+C 12 COR12 larger d/u 300 0.1175 0.00515 C
+C C
+C The corresponding grid files are called cor01.dat etc. C
+C C
+C The reference is: C
+C A.D. Martin, R.G. Roberts, W.J. Stirling, R.S Thorne C
+C Univ. Durham preprint DTP/99/64, hep-ph/9907231 (1999) C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C C
+C****************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+c write(6,*)q,q2
+c if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99
+c if(x.lt.xmin.or.x.gt.xmax) print 98
+ if(mode.eq.1) then
+ call mrs991(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrs992(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrs993(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrs994(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.5) then
+ call mrs995(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.6) then
+ call mrs996(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.7) then
+ call mrs997(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.8) then
+ call mrs998(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.9) then
+ call mrs999(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.10) then
+ call mrs9910(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.11) then
+ call mrs9911(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.12) then
+ call mrs9912(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ')
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ')
+ return
+ end
+
+ subroutine mrs991(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor01.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs992(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor02.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs993(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor03.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs994(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor04.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs995(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor05.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs996(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor06.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs997(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor07.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+ subroutine mrs998(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor08.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs999(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor09.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+ subroutine mrs9910(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor10.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs9911(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor11.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs9912(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor12.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+c
+c From now 2001 MRST sets
+c
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+
+
+ subroutine mrstlo(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2001 LO parton C
+C distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0201xxx C
+C C
+C There is 1 pdf set corresponding to mode = 1 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.220 C
+C corresponding to alpha_s(M_Z) of 0.130 C
+C This set reads a grid whose first number is 0.02868 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrstlo1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrstlo1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/lo2002.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+
+
+
+
+
+ subroutine mrst2001(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2001 NLO parton C
+C distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0110215 C
+C C
+C There are 4 pdf sets corresponding to mode = 1, 2, 3, 4 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.323 C
+C corresponding to alpha_s(M_Z) of 0.119 C
+C This set reads a grid whose first number is 0.00927 C
+C C
+C Mode=2 gives the set with Lambda(MSbar,nf=4) = 0.290 C
+C corresponding to alpha_s(M_Z) of 0.117 C
+C This set reads a grid whose first number is 0.00953 C
+C C
+C Mode=3 gives the set with Lambda(MSbar,nf=4) = 0.362 C
+C corresponding to alpha_s(M_Z) of 0.121 C
+C This set reads a grid whose first number is 0.00889 C
+C C
+C Mode=4 gives the set MRST2001J which gives better agreement C
+C with the Tevatron inclusive jet data but has unattractive C
+C gluon behaviour at large x (see discussion in paper) C
+C This set has Lambda(MSbar,nf=4) = 0.353(alpha_s(M_Z) = 0.121 C
+C This set reads a grid whose first number is 0.00826 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst20011(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst20012(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrst20013(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrst20014(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst20011(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf119.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20012(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf117.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20013(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf121.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20014(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/j121.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+
+
+
+ subroutine mrstnnlo(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the MRST 2002 NNLO parton distributionsC
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0201127 C
+C C
+C There are 4 pdf sets corresponding to mode = 1, 2, 3, 4 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the `average' of the slow and fast evolutions C
+C This set reads a grid whose first number is 0.00725 C
+C C
+C Mode=2 gives the set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the fast evolution C
+C This set reads a grid whose first number is 0.00734 C
+C C
+C Mode=3 gives the set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the slow evolution C
+C This set reads a grid whose first number is 0.00739 C
+C C
+C Mode=4 gives the set MRSTNNLOJ which gives better agreement C
+C with the Tevatron inclusive jet data but has unattractive C
+C gluon behaviour at large x (see discussion in paper) C
+C This set has Lambda(MSbar,nf=4) = 0.267(alpha_s(M_Z) =0.1180 C
+C This set reads a grid whose first number is 0.00865 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrstnnlo1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrstnnlo2(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrstnnlo3(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrstnnlo4(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrstnnlo1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo2(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo3(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155b.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo4(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1180j.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine jeppe1(nx,my,xx,yy,ff,cc)
+ implicit real*8(a-h,o-z)
+ PARAMETER(NNX=49,MMY=37)
+ dimension xx(nx),yy(my),ff(nx,my),ff1(NNX,MMY),ff2(NNX,MMY),
+ xff12(NNX,MMY),yy0(4),yy1(4),yy2(4),yy12(4),z(16),wt(16,16),
+ xcl(16),cc(nx,my,4,4),iwt(16,16)
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ x -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ x 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ x 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ x 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ x 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ x -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ x 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ x -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ x 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ x -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ x 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+
+ do 42 m=1,my
+ dx=xx(2)-xx(1)
+ ff1(1,m)=(ff(2,m)-ff(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff1(nx,m)=(ff(nx,m)-ff(nx-1,m))/dx
+ do 41 n=2,nx-1
+ ff1(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff(n-1,m),ff(n,m),
+ xff(n+1,m))
+ 41 continue
+ 42 continue
+
+ do 44 n=1,nx
+ dy=yy(2)-yy(1)
+ ff2(n,1)=(ff(n,2)-ff(n,1))/dy
+ dy=yy(my)-yy(my-1)
+ ff2(n,my)=(ff(n,my)-ff(n,my-1))/dy
+ do 43 m=2,my-1
+ ff2(n,m)=polderiv(yy(m-1),yy(m),yy(m+1),ff(n,m-1),ff(n,m),
+ xff(n,m+1))
+ 43 continue
+ 44 continue
+
+ do 46 m=1,my
+ dx=xx(2)-xx(1)
+ ff12(1,m)=(ff2(2,m)-ff2(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff12(nx,m)=(ff2(nx,m)-ff2(nx-1,m))/dx
+ do 45 n=2,nx-1
+ ff12(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff2(n-1,m),ff2(n,m),
+ xff2(n+1,m))
+ 45 continue
+ 46 continue
+
+ do 53 n=1,nx-1
+ do 52 m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(n,m)
+ yy0(2)=ff(n+1,m)
+ yy0(3)=ff(n+1,m+1)
+ yy0(4)=ff(n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do 47 k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ 47 continue
+
+ do 49 l=1,16
+ xxd=0.
+ do 48 k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ 48 continue
+ cl(l)=xxd
+ 49 continue
+ l=0
+ do 51 k=1,4
+ do 50 j=1,4
+ l=l+1
+ cc(n,m,k,j)=cl(l)
+ 50 continue
+ 51 continue
+ 52 continue
+ 53 continue
+ return
+ end
+
+ subroutine jeppe2(x,y,nx,my,xx,yy,cc,z)
+ implicit real*8(a-h,o-z)
+ dimension xx(nx),yy(my),cc(nx,my,4,4)
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.
+ do 1 l=4,1,-1
+ z=t*z+((cc(n,m,l,4)*u+cc(n,m,l,3))*u
+ . +cc(n,m,l,2))*u+cc(n,m,l,1)
+ 1 continue
+ return
+ end
+
+
+
+
+ real*8 function polderiv(x1,x2,x3,y1,y2,y3)
+ implicit real*8(a-h,o-z)
+ polderiv=(x3*x3*(y1-y2)-2.0*x2*(x3*(y1-y2)+x1*
+ .(y2-y3))+x2*x2*(y1-y3)+x1*x1*(y2-y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+
+ subroutine mrst2002(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2002 updated NLO and C
+C NNLO parton distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0211080 C
+C C
+C There are 2 pdf sets corresponding to mode = 1, 2 C
+C C
+C Mode=1 gives the NLO set with alpha_s(M_Z,NLO) = 0.1197 C
+C This set reads a grid whose first number is 0.00949 C
+C C
+C Mode=2 gives the NNLO set with alpha_s(M_Z,NNLO) = 0.1154 C
+C This set reads a grid whose first number is 0.00685 C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst2(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2002nlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst2(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2002nnlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst2004(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2004 'physical gluon' NLO C
+C and NNLO parton distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0410230 C
+C C
+C There are 2 pdf sets corresponding to mode = 1, 2 C
+C C
+C Mode=1 gives the NLO set with Lambda(4) = 347 MeV C
+C This set reads a grid called mrst2004nlo.dat C
+C whose first number is 0.00910 C
+C C
+C Mode=2 gives the NNLO set with Lambda(4) = 251 MeV C
+C This set reads a grid called mrst2004nnlo.dat C
+C whose first number is 0.00673 C
+C C
+C These fits use a new, physically motivated parametrisation C
+C for the gluon at the starting scale, Q_0^2 = 1 GeV^2 C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst12(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst22(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst12(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2004nlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe12(nx,nq,xxl,qql,f1,cc1)
+ call jeppe12(nx,nq,xxl,qql,f2,cc2)
+ call jeppe12(nx,nq,xxl,qql,f3,cc3)
+ call jeppe12(nx,nq,xxl,qql,f4,cc4)
+ call jeppe12(nx,nq,xxl,qql,f6,cc6)
+ call jeppe12(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe12(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe12(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe22(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe22(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst22(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2004nnlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe12(nx,nq,xxl,qql,f1,cc1)
+ call jeppe12(nx,nq,xxl,qql,f2,cc2)
+ call jeppe12(nx,nq,xxl,qql,f3,cc3)
+ call jeppe12(nx,nq,xxl,qql,f4,cc4)
+ call jeppe12(nx,nq,xxl,qql,f6,cc6)
+ call jeppe12(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe12(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe12(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe22(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe22(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine jeppe12(nx,my,xx,yy,ff,cc)
+ implicit real*8(a-h,o-z)
+ parameter(nnx=49,mmy=37)
+ dimension xx(nx),yy(my),ff(nnx,mmy),ff1(nnx,mmy),ff2(nnx,mmy),
+ xff12(nnx,mmy),yy0(4),yy1(4),yy2(4),yy12(4),z(16),wt(16,16),
+ xcl(16),cc(nx,my,4,4),iwt(16,16)
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ x -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ x 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ x 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ x 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ x 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ x -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ x 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ x -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ x 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ x -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ x 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+
+ do 42 m=1,my
+ dx=xx(2)-xx(1)
+ ff1(1,m)=(ff(2,m)-ff(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff1(nx,m)=(ff(nx,m)-ff(nx-1,m))/dx
+ do 41 n=2,nx-1
+ ff1(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff(n-1,m),ff(n,m),
+ xff(n+1,m))
+ 41 continue
+ 42 continue
+
+ do 44 n=1,nx
+ dy=yy(2)-yy(1)
+ ff2(n,1)=(ff(n,2)-ff(n,1))/dy
+ dy=yy(my)-yy(my-1)
+ ff2(n,my)=(ff(n,my)-ff(n,my-1))/dy
+ do 43 m=2,my-1
+ ff2(n,m)=polderiv(yy(m-1),yy(m),yy(m+1),ff(n,m-1),ff(n,m),
+ xff(n,m+1))
+ 43 continue
+ 44 continue
+
+ do 46 m=1,my
+ dx=xx(2)-xx(1)
+ ff12(1,m)=(ff2(2,m)-ff2(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff12(nx,m)=(ff2(nx,m)-ff2(nx-1,m))/dx
+ do 45 n=2,nx-1
+ ff12(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff2(n-1,m),ff2(n,m),
+ xff2(n+1,m))
+ 45 continue
+ 46 continue
+
+ do 53 n=1,nx-1
+ do 52 m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(n,m)
+ yy0(2)=ff(n+1,m)
+ yy0(3)=ff(n+1,m+1)
+ yy0(4)=ff(n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do 47 k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ 47 continue
+
+ do 49 l=1,16
+ xxd=0.
+ do 48 k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ 48 continue
+ cl(l)=xxd
+ 49 continue
+ l=0
+ do 51 k=1,4
+ do 50 j=1,4
+ l=l+1
+ cc(n,m,k,j)=cl(l)
+ 50 continue
+ 51 continue
+ 52 continue
+ 53 continue
+ return
+ end
+
+ subroutine jeppe22(x,y,nx,my,xx,yy,cc,z)
+ implicit real*8(a-h,o-z)
+ dimension xx(nx),yy(my),cc(nx,my,4,4)
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.
+ do 1 l=4,1,-1
+ z=t*z+((cc(n,m,l,4)*u+cc(n,m,l,3))*u
+ . +cc(n,m,l,2))*u+cc(n,m,l,1)
+ 1 continue
+ return
+ end
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 4
+C June 21, 1996
+C
+C By: H.L. Lai, J. Huston, S. Kuhlmann, F. Olness, J. Owens, D. Soper
+C W.K. Tung, H. Weerts
+C Ref: MSUHEP-60426, CTEQ-604, e-Print Archive: hep-ph/9606399
+C
+C This package contains 9 sets of CTEQ4 PDF's. Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz) Q0(GeV) Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ4M Standard MSbar scheme 0.116 1.6 cteq4m.tbl
+C 2 CTEQ4D Standard DIS scheme 0.116 1.6 cteq4d.tbl
+C 3 CTEQ4L Leading Order 0.116 1.6 cteq4l.tbl
+C 4 CTEQ4A1 Alpha_s series 0.110 1.6 cteq4a1.tbl
+C 5 CTEQ4A2 Alpha_s series 0.113 1.6 cteq4a2.tbl
+C 6 CTEQ4A3 same as CTEQ4M 0.116 1.6 cteq4m.tbl
+C 7 CTEQ4A4 Alpha_s series 0.119 1.6 cteq4a4.tbl
+C 8 CTEQ4A5 Alpha_s series 0.122 1.6 cteq4a5.tbl
+C 9 CTEQ4HJ High Jet 0.116 1.6 cteq4hj.tbl
+C 10 CTEQ4LQ Low Q0 0.114 0.7 cteq4lq.tbl
+C ---------------------------------------------------------------------------
+C
+C The available applied range is 10^-5 < x < 1 and 1.6 < Q < 10,000 (GeV)
+C except CTEQ4LQ for which Q starts at a lower value of 0.7 GeV.
+C The Table_Files are assumed to be in the working directory.
+C
+C The function Ctq4Fn (Iset, Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar)
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ4 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Hung-Liang Lai(Lai_H@pa.msu.edu) or Wu-Ki Tung(Tung@pa.msu.edu).
+C
+C===========================================================================
+
+ Function Ctq4Fn (Iset, Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Character Flnm(10)*11
+ Common
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / QCDtable / Alambda, Nfl, Iorder
+ Data (Flnm(I), I=1,10)
+ > / 'cteq4m.tbl ', 'cteq4d.tbl ', 'cteq4l.tbl '
+ > , 'cteq4a1.tbl', 'cteq4a2.tbl', 'cteq4m.tbl ', 'cteq4a4.tbl'
+ > , 'cteq4a5.tbl', 'cteq4hj.tbl', 'cteq4lq.tbl' /
+ Data Isetold, Isetmin, Isetmax / -987, 1, 10 /
+ save Flnm, Isetold, Isetmin, Isetmax
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ If (Iset.lt.Isetmin .or. Iset.gt.Isetmax) Then
+ Print *, 'Invalid Iset number in Ctq4Fn :', Iset
+ Stop
+ Endif
+ IU= NextUt()
+ Open(IU, File='Pdfdata/'//Flnm(Iset), Status='OLD', Err=100)
+ Call ReadTbl (IU)
+ Close (IU)
+ Isetold=Iset
+ Endif
+
+ If (X .lt. 0D0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq4Fn: ', X
+ Stop
+ Endif
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq4Fn: ', Q
+ Stop
+ Endif
+ If (Iparton .lt. -NfMx .or. Iparton .gt. NfMx) Then
+ Print *, 'Iparton out of range in Ctq4Fn: ', Iparton
+ Stop
+ Endif
+
+ Ctq4Fn = PartonX (Iparton, X, Q)
+ if(Ctq4Fn.lt.0.D0) Ctq4Fn = 0.D0
+
+ Return
+
+ 100 Print *, ' Data file ', Flnm(Iset), ' cannot be opened '
+ >//'in Ctq4Fn!!'
+ Stop
+C ********************
+ End
+
+ Function NextUt()
+C Returns an unallocated FORTRAN i/o unit.
+ Logical EX
+C
+ Do 10 N = 50, 300
+ INQUIRE (UNIT=N, OPENED=EX)
+ If (.NOT. EX) then
+ NextUt = N
+ Return
+ Endif
+ 10 Continue
+ Stop ' There is no available I/O unit. '
+C *************************
+ End
+C
+
+
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 5.0
+C Nov. 1, 1999
+C
+C Ref: "GLOBAL QCD ANALYSIS OF PARTON STRUCTURE OF THE NUCLEON:
+C CTEQ5 PPARTON DISTRIBUTIONS"
+C
+C hep-ph/9903282; to be published in Eur. Phys. J. C 1999.
+C
+C These PDF's use quadratic interpolation of attached tables. A parametrized
+C version of the same PDF's without external tables is under construction.
+C They will become available later.
+C
+C This package contains 7 sets of CTEQ5 PDF's; plus two updated ones.
+C The undated CTEQ5M1 and CTEQHQ1 use an improved evolution code.
+C Both the original and the updated ones fit current data with comparable
+C accuracy. The CTEQHQ1 set also involve a different choice of scale,
+C hence differs from CTEQHQ slightly more. It is preferred over CTEQ5HQ.
+
+C Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz) Lam4 Lam5 Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ5M Standard MSbar scheme 0.118 326 226 cteq5m.tbl
+C 2 CTEQ5D Standard DIS scheme 0.118 326 226 cteq5d.tbl
+C 3 CTEQ5L Leading Order 0.127 192 146 cteq5l.tbl
+C 4 CTEQ5HJ Large-x gluon enhanced 0.118 326 226 cteq5hj.tbl
+C 5 CTEQ5HQ Heavy Quark 0.118 326 226 cteq5hq.tbl
+C 6 CTEQ5F3 Nf=3 FixedFlavorNumber 0.106 (Lam3=395) cteq5f3.tbl
+C 7 CTEQ5F4 Nf=4 FixedFlavorNumber 0.112 309 XXX cteq5f4.tbl
+C --------------------------------------------------------
+C 8 CTEQ5M1 Improved CTEQ5M 0.118 326 226 cteq5m1.tbl
+C 9 CTEQ5HQ1 Improved CTEQ5HQ 0.118 326 226 ctq5hq1.tbl
+C ---------------------------------------------------------------------------
+C
+C The available applied range is 10^-5 << x << 1 and 1.0 << Q << 10,000 (GeV).
+C Lam5 (Lam4, Lam3) represents Lambda value (in MeV) for 5 (4,3) flavors.
+C The matching alpha_s between 4 and 5 flavors takes place at Q=4.5 GeV,
+C which is defined as the bottom quark mass, whenever it can be applied.
+C
+C The Table_Files are assumed to be in the working directory.
+C
+C Before using the PDF, it is necessary to do the initialization by
+C Call SetCtq5(Iset)
+C where Iset is the desired PDF specified in the above table.
+C
+C The function Ctq5Pdf (Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar),
+C whereas CTEQ5F3 has, by definition, only 3 flavors and gluon;
+C CTEQ5F4 has only 4 flavors and gluon.
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+C
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ5 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Hung-Liang Lai(lai@phys.nthu.edu.tw) or Wu-Ki Tung(Tung@pa.msu.edu).
+C
+C===========================================================================
+
+ Function Ctq5Pdf (Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Logical Warn
+ Common
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / QCDtable / Alambda, Nfl, Iorder
+
+ Data Warn /.true./
+ save Warn
+
+ If (X .lt. 0D0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq5Pdf: ', X
+ Stop
+ Endif
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq5Pdf: ', Q
+ Stop
+ Endif
+ If ((Iparton .lt. -NfMx .or. Iparton .gt. NfMx)) Then
+ If (Warn) Then
+C put a warning for calling extra flavor.
+ Warn = .false.
+ Print *, 'Warning: Iparton out of range in Ctq5Pdf: '
+ > , Iparton
+ Endif
+ Ctq5Pdf = 0D0
+ Return
+ Endif
+
+ Ctq5Pdf = PartonX (Iparton, X, Q)
+ if(Ctq5Pdf.lt.0.D0) Ctq5Pdf = 0.D0
+
+ Return
+
+C ********************
+ End
+
+ FUNCTION PartonX (IPRTN, X, Q)
+C
+C Given the parton distribution function in the array Upd in
+C COMMON / CtqPar_5_1 / , this routine fetches u(fl, x, q) at any value of
+C x and q using Mth-order polynomial interpolation for x and Ln(Q/Lambda).
+C
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C
+ PARAMETER (MXX = 105, MXQ = 25, MXF = 6)
+ PARAMETER (MXPQX = (MXF *2 +2) * MXQ * MXX)
+ PARAMETER (M= 2, M1 = M + 1)
+C
+ Logical First
+ Common
+ > / CtqPar_5_1 / Al, XV(0:MXX), QL(0:MXQ), UPD(MXPQX)
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / XQrange / Qini, Qmax, Xmin
+C
+ Dimension Fq(M1), Df(M1)
+
+ Data First /.true./
+ save First
+C Work with Log (Q)
+ QG = LOG (Q/AL)
+
+C Find lower end of interval containing X
+ JL = -1
+ JU = Nx+1
+ 11 If (JU-JL .GT. 1) Then
+ JM = (JU+JL) / 2
+ If (X .GT. XV(JM)) Then
+ JL = JM
+ Else
+ JU = JM
+ Endif
+ Goto 11
+ Endif
+
+ Jx = JL - (M-1)/2
+ If (X .lt. Xmin .and. First ) Then
+ First = .false.
+ Print '(A, 2(1pE12.4))',
+ > ' WARNING: X << Xmin, extrapolation used; X, Xmin =', X, Xmin
+ If (Jx .LT. 0) Jx = 0
+ Elseif (Jx .GT. Nx-M) Then
+ Jx = Nx - M
+ Endif
+C Find the interval where Q lies
+ JL = -1
+ JU = NT+1
+ 12 If (JU-JL .GT. 1) Then
+ JM = (JU+JL) / 2
+ If (QG .GT. QL(JM)) Then
+ JL = JM
+ Else
+ JU = JM
+ Endif
+ Goto 12
+ Endif
+
+ Jq = JL - (M-1)/2
+ If (Jq .LT. 0) Then
+ Jq = 0
+ If (Q .lt. Qini) Print '(A, 2(1pE12.4))',
+ > ' WARNING: Q << Qini, extrapolation used; Q, Qini =', Q, Qini
+ Elseif (Jq .GT. Nt-M) Then
+ Jq = Nt - M
+ If (Q .gt. Qmax) Print '(A, 2(1pE12.4))',
+ > ' WARNING: Q > Qmax, extrapolation used; Q, Qmax =', Q, Qmax
+ Endif
+
+ If (Iprtn .GE. 3) Then
+ Ip = - Iprtn
+ Else
+ Ip = Iprtn
+ EndIf
+C Find the off-set in the linear array Upd
+ JFL = Ip + NfMx
+ J0 = (JFL * (NT+1) + Jq) * (NX+1) + Jx
+C
+C Now interpolate in x for M1 Q's
+ Do 21 Iq = 1, M1
+ J1 = J0 + (Nx+1)*(Iq-1) + 1
+ Call Polint (XV(Jx), Upd(J1), M1, X, Fq(Iq), Df(Iq))
+ 21 Continue
+C Finish off by interpolating in Q
+ Call Polint (QL(Jq), Fq(1), M1, QG, Ftmp, Ddf)
+
+ PartonX = Ftmp
+C
+ RETURN
+C ****************************
+ END
+
+ Subroutine SetCtq5 (Iset)
+ Implicit Double Precision (A-H,O-Z)
+ Parameter (Isetmax=9)
+ Character Flnm(Isetmax)*12, Tablefile*40
+ Data (Flnm(I), I=1,Isetmax)
+ > / 'cteq5m.tbl', 'cteq5d.tbl', 'cteq5l.tbl', 'cteq5hj.tbl'
+ > , 'cteq5hq.tbl', 'cteq5f3.tbl', 'cteq5f4.tbl'
+ > , 'cteq5m1.tbl', 'ctq5hq1.tbl' /
+ Data Tablefile / 'test.tbl' /
+ Data Isetold, Isetmin, Isettest / -987, 1, 911 /
+ save
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ IU= NextUn()
+ If (Iset .eq. Isettest) then
+ Print* ,'Opening ', Tablefile
+ 21 Open(IU, File=Tablefile, Status='OLD', Err=101)
+ GoTo 22
+ 101 Print*, Tablefile, ' cannot be opened '
+ Print*, 'Please input the .tbl file:'
+ Read (*,'(A)') Tablefile
+ Goto 21
+ 22 Continue
+ ElseIf (Iset.lt.Isetmin .or. Iset.gt.Isetmax) Then
+ Print *, 'Invalid Iset number in SetCtq5 :', Iset
+ Stop
+ Else
+ Tablefile=Flnm(Iset)
+ Open(IU, File='Pdfdata/'//Tablefile, Status='OLD', Err=100)
+ Endif
+ Call ReadTbl (IU)
+ Close (IU)
+ Isetold=Iset
+ Endif
+ Return
+
+ 100 Print *, ' Data file ', Tablefile, ' cannot be opened '
+ >//'in SetCtq5!!'
+ Stop
+C ********************
+ End
+
+ Subroutine ReadTbl (Nu)
+ Implicit Double Precision (A-H,O-Z)
+ Character Line*80
+ PARAMETER (MXX = 105, MXQ = 25, MXF = 6)
+ PARAMETER (MXPQX = (MXF *2 +2) * MXQ * MXX)
+ Common
+ > / CtqPar_5_1 / Al, XV(0:MXX), QL(0:MXQ), UPD(MXPQX)
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / XQrange / Qini, Qmax, Xmin
+ > / QCDtable / Alambda, Nfl, Iorder
+ > / Masstbl / Amass(6)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, '(A)') Line
+ Read (Nu, *) Dr, Fl, Al, (Amass(I),I=1,6)
+ Iorder = Nint(Dr)
+ Nfl = Nint(Fl)
+ Alambda = Al
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) NX, NT, NfMx
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) QINI, QMAX, (QL(I), I =0, NT)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) XMIN, (XV(I), I =0, NX)
+
+ Do 11 Iq = 0, NT
+ QL(Iq) = Log (QL(Iq) /Al)
+ 11 Continue
+C
+C Since quark = anti-quark for nfl>2 at this stage,
+C we Read out only the non-redundent data points
+C No of flavors = NfMx (sea) + 1 (gluon) + 2 (valence)
+
+ Nblk = (NX+1) * (NT+1)
+ Npts = Nblk * (NfMx+3)
+ Read (Nu, '(A)') Line
+ Read (Nu, *, IOSTAT=IRET) (UPD(I), I=1,Npts)
+
+ Return
+C ****************************
+ End
+
+ Function NextUn()
+C Returns an unallocated FORTRAN i/o unit.
+ Logical EX
+C
+ Do 10 N = 10, 300
+ INQUIRE (UNIT=N, OPENED=EX)
+ If (.NOT. EX) then
+ NextUn = N
+ Return
+ Endif
+ 10 Continue
+ Stop ' There is no available I/O unit. '
+C *************************
+ End
+C
+
+ SUBROUTINE POLINT (XA,YA,N,X,Y,DY)
+
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C Adapted from "Numerical Recipes"
+ PARAMETER (NMAX=10)
+ DIMENSION XA(N),YA(N),C(NMAX),D(NMAX)
+ NS=1
+ DIF=ABS(X-XA(1))
+ DO 11 I=1,N
+ DIFT=ABS(X-XA(I))
+ IF (DIFT.LT.DIF) THEN
+ NS=I
+ DIF=DIFT
+ ENDIF
+ C(I)=YA(I)
+ D(I)=YA(I)
+11 CONTINUE
+ Y=YA(NS)
+ NS=NS-1
+ DO 13 M=1,N-1
+ DO 12 I=1,N-M
+ HO=XA(I)-X
+ HP=XA(I+M)-X
+ W=C(I+1)-D(I)
+ DEN=HO-HP
+ IF(DEN.EQ.0.)PAUSE
+ DEN=W/DEN
+ D(I)=HP*DEN
+ C(I)=HO*DEN
+12 CONTINUE
+ IF (2*NS.LT.N-M)THEN
+ DY=C(NS+1)
+ ELSE
+ DY=D(NS)
+ NS=NS-1
+ ENDIF
+ Y=Y+DY
+13 CONTINUE
+ RETURN
+ END
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 6
+C January 24, 2002, v6.0
+C April 10, 2002, v6.1
+C
+C Ref: "New Generation of Parton Distributions with
+C Uncertainties from Global QCD Analysis"
+C By: J. Pumplin, D.R. Stump, J.Huston, H.L. Lai, P. Nadolsky, W.K. Tung
+C hep-ph/0201195
+C
+C This package contains 3 standard sets of CTEQ6 PDF's and 40 up/down sets
+C with respect to CTEQ6M PDF's. Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz)**Lam4 Lam5 Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ6M Standard MSbar scheme 0.118 326 226 cteq6m.tbl
+C 2 CTEQ6D Standard DIS scheme 0.118 326 226 cteq6d.tbl
+C 3 CTEQ6L Leading Order 0.118** 326** 226 cteq6l.tbl
+C 4 CTEQ6L1 Leading Order 0.130 215 165 cteq6l1.tbl
+C ------------------------------
+C 1xx CTEQ6M1xx +/- w.r.t. CTEQ6M 0.118 326 226 cteq6m1xx.tbl
+C (where xx=01--40)
+C ---------------------------------------------------------------------------
+C ** ALL fits are obtained by using the same coupling strength
+C \alpha_s(Mz)=0.118 and the NLO running \alpha_s formula, except CTEQ6L1
+C which uses the LO running \alpha_s and its value determined from the fit.
+C For the LO fits, the evolution of the PDF and the hard cross sections are
+C calculated at LO. More detailed discussions are given in hep-ph/0201195.
+C
+C The table grids are generated for 10^-6 < x < 1 and 1.3 < Q < 10,000 (GeV).
+C PDF values outside of the above range are returned using extrapolation.
+C Lam5 (Lam4) represents Lambda value (in MeV) for 5 (4) flavors.
+C The matching alpha_s between 4 and 5 flavors takes place at Q=4.5 GeV,
+C which is defined as the bottom quark mass, whenever it can be applied.
+C
+C The Table_Files are assumed to be in the working directory.
+C
+C Before using the PDF, it is necessary to do the initialization by
+C Call SetCtq6(Iset)
+C where Iset is the desired PDF specified in the above table.
+C
+C The function Ctq6Pdf (Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar),
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+C
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ6 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Pumplin@pa.msu.edu or Tung@pa.msu.edu.
+C
+C===========================================================================
+
+ Function Ctq6Pdf (Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Logical Warn
+ Common
+ > / CtqPar_6_2 / Nx, Nt, NfMx
+ > / QCDtable / Alambda, Nfl, Iorder
+
+ Data Warn /.true./
+ save Warn
+
+ If (X .lt. 0D0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq6Pdf: ', X
+ Stop
+ Endif
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq6Pdf: ', Q
+ Stop
+ Endif
+ If ((Iparton .lt. -NfMx .or. Iparton .gt. NfMx)) Then
+ If (Warn) Then
+C put a warning for calling extra flavor.
+ Warn = .false.
+ Print *, 'Warning: Iparton out of range in Ctq6Pdf: '
+ > , Iparton
+ Endif
+ Ctq6Pdf = 0D0
+ Return
+ Endif
+
+ Ctq6Pdf = PartonX6 (Iparton, X, Q)
+ if(Ctq6Pdf.lt.0D0) Ctq6Pdf = 0D0
+
+ Return
+
+C ********************
+ End
+
+ Subroutine SetCtq6 (Iset)
+ Implicit Double Precision (A-H,O-Z)
+ Parameter (Isetmax0=4)
+ Character Flnm(Isetmax0)*6, nn*3, Tablefile*40
+ Data (Flnm(I), I=1,Isetmax0)
+ > / 'cteq6m', 'cteq6d', 'cteq6l', 'cteq6l'/
+ Data Isetold, Isetmin0, Isetmin1, Isetmax1 /-987,1,101,140/
+ save
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ IU= NextUn6()
+ If (Iset.ge.Isetmin0 .and. Iset.le.3) Then
+ Tablefile=Flnm(Iset)//'.tbl'
+ Elseif (Iset.eq.Isetmax0) Then
+ Tablefile=Flnm(Iset)//'1.tbl'
+ Elseif (Iset.ge.Isetmin1 .and. Iset.le.Isetmax1) Then
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(1)//nn//'.tbl'
+ Else
+ Print *, 'Invalid Iset number in SetCtq6 :', Iset
+ Stop
+ Endif
+ Open(IU, File='Pdfdata/'//Tablefile, Status='OLD', Err=100)
+ 21 Call ReadTbl6 (IU)
+ Close (IU)
+ Isetold=Iset
+ Endif
+ Return
+
+ 100 Print *, ' Data file ', Tablefile, ' cannot be opened '
+ >//'in SetCtq6!!'
+ Stop
+C ********************
+ End
+
+ Subroutine ReadTbl6 (Nu)
+ Implicit Double Precision (A-H,O-Z)
+ Character Line*80
+ PARAMETER (MXX = 96, MXQ = 20, MXF = 5)
+ PARAMETER (MXPQX = (MXF + 3) * MXQ * MXX)
+ Common
+ > / CtqPar_6_1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+ > / CtqPar_6_2 / Nx, Nt, NfMx
+ > / XQrange / Qini, Qmax, Xmin
+ > / QCDtable / Alambda, Nfl, Iorder
+ > / Masstbl / Amass(6)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, '(A)') Line
+ Read (Nu, *) Dr, Fl, Al, (Amass(I),I=1,6)
+ Iorder = Nint(Dr)
+ Nfl = Nint(Fl)
+ Alambda = Al
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) NX, NT, NfMx
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) QINI, QMAX, (TV(I), I =0, NT)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) XMIN, (XV(I), I =0, NX)
+
+ Do 11 Iq = 0, NT
+ TV(Iq) = Log(Log (TV(Iq) /Al))
+ 11 Continue
+C
+C Since quark = anti-quark for nfl>2 at this stage,
+C we Read out only the non-redundent data points
+C No of flavors = NfMx (sea) + 1 (gluon) + 2 (valence)
+
+ Nblk = (NX+1) * (NT+1)
+ Npts = Nblk * (NfMx+3)
+ Read (Nu, '(A)') Line
+ Read (Nu, *, IOSTAT=IRET) (UPD(I), I=1,Npts)
+
+ Return
+C ****************************
+ End
+
+ Function NextUn6()
+C Returns an unallocated FORTRAN i/o unit.
+ Logical EX
+C
+ Do 10 N = 10, 300
+ INQUIRE (UNIT=N, OPENED=EX)
+ If (.NOT. EX) then
+ NextUn6 = N
+ Return
+ Endif
+ 10 Continue
+ Stop ' There is no available I/O unit. '
+C *************************
+ End
+C
+
+ SUBROUTINE POLINT6 (XA,YA,N,X,Y,DY)
+
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C Adapted from "Numerical Recipes"
+ PARAMETER (NMAX=10)
+ DIMENSION XA(N),YA(N),C(NMAX),D(NMAX)
+ NS=1
+ DIF=ABS(X-XA(1))
+ DO 11 I=1,N
+ DIFT=ABS(X-XA(I))
+ IF (DIFT.LT.DIF) THEN
+ NS=I
+ DIF=DIFT
+ ENDIF
+ C(I)=YA(I)
+ D(I)=YA(I)
+11 CONTINUE
+ Y=YA(NS)
+ NS=NS-1
+ DO 13 M=1,N-1
+ DO 12 I=1,N-M
+ HO=XA(I)-X
+ HP=XA(I+M)-X
+ W=C(I+1)-D(I)
+ DEN=HO-HP
+ IF(DEN.EQ.0.)PAUSE
+ DEN=W/DEN
+ D(I)=HP*DEN
+ C(I)=HO*DEN
+12 CONTINUE
+ IF (2*NS.LT.N-M)THEN
+ DY=C(NS+1)
+ ELSE
+ DY=D(NS)
+ NS=NS-1
+ ENDIF
+ Y=Y+DY
+13 CONTINUE
+ RETURN
+ END
+
+ Function PartonX6 (IPRTN, XX, QQ)
+
+c Given the parton distribution function in the array U in
+c COMMON / PEVLDT / , this routine interpolates to find
+c the parton distribution at an arbitray point in x and q.
+c
+ Implicit Double Precision (A-H,O-Z)
+
+ Parameter (MXX = 96, MXQ = 20, MXF = 5)
+ Parameter (MXQX= MXQ * MXX, MXPQX = MXQX * (MXF+3))
+
+ Common
+ > / CtqPar_6_1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+ > / CtqPar_6_2 / Nx, Nt, NfMx
+ > / XQrange / Qini, Qmax, Xmin
+
+ Dimension fvec(4), fij(4)
+ Dimension xvpow(0:mxx)
+ Data OneP / 1.00001d0 /
+ Data xpow / 0.3d0 / !**** choice of interpolation variable
+ Data nqvec / 4 /
+ Data ientry / 0 /
+ Save ientry,xvpow
+
+c store the powers used for interpolation on first call...
+ if(ientry .eq. 0) then
+ ientry = 1
+
+ xvpow(0) = 0D0
+ do i = 1, nx
+ xvpow(i) = xv(i)**xpow
+ enddo
+ endif
+
+ X = XX
+ Q = QQ
+ tt = dlog(dlog(Q/Al))
+
+c ------------- find lower end of interval containing x, i.e.,
+c get jx such that xv(jx) .le. x .le. xv(jx+1)...
+ JLx = -1
+ JU = Nx+1
+ 11 If (JU-JLx .GT. 1) Then
+ JM = (JU+JLx) / 2
+ If (X .Ge. XV(JM)) Then
+ JLx = JM
+ Else
+ JU = JM
+ Endif
+ Goto 11
+ Endif
+C Ix 0 1 2 Jx JLx Nx-2 Nx
+C |---|---|---|...|---|-x-|---|...|---|---|
+C x 0 Xmin x 1
+C
+ If (JLx .LE. -1) Then
+ Print '(A,1pE12.4)', 'Severe error: x <= 0 in PartonX6! x = ', x
+ Stop
+ ElseIf (JLx .Eq. 0) Then
+ Jx = 0
+ Elseif (JLx .LE. Nx-2) Then
+
+C For interrior points, keep x in the middle, as shown above
+ Jx = JLx - 1
+ Elseif (JLx.Eq.Nx-1 .or. x.LT.OneP) Then
+
+C We tolerate a slight over-shoot of one (OneP=1.00001),
+C perhaps due to roundoff or whatever, but not more than that.
+C Keep at least 4 points >= Jx
+ Jx = JLx - 2
+ Else
+ Print '(A,1pE12.4)', 'Severe error: x > 1 in PartonX6! x = ', x
+ Stop
+ Endif
+C ---------- Note: JLx uniquely identifies the x-bin; Jx does not.
+
+C This is the variable to be interpolated in
+ ss = x**xpow
+
+ If (JLx.Ge.2 .and. JLx.Le.Nx-2) Then
+
+c initiation work for "interior bins": store the lattice points in s...
+ svec1 = xvpow(jx)
+ svec2 = xvpow(jx+1)
+ svec3 = xvpow(jx+2)
+ svec4 = xvpow(jx+3)
+
+ s12 = svec1 - svec2
+ s13 = svec1 - svec3
+ s23 = svec2 - svec3
+ s24 = svec2 - svec4
+ s34 = svec3 - svec4
+
+ sy2 = ss - svec2
+ sy3 = ss - svec3
+
+c constants needed for interpolating in s at fixed t lattice points...
+ const1 = s13/s23
+ const2 = s12/s23
+ const3 = s34/s23
+ const4 = s24/s23
+ s1213 = s12 + s13
+ s2434 = s24 + s34
+ sdet = s12*s34 - s1213*s2434
+ tmp = sy2*sy3/sdet
+ const5 = (s34*sy2-s2434*sy3)*tmp/s12
+ const6 = (s1213*sy2-s12*sy3)*tmp/s34
+
+ EndIf
+
+c --------------Now find lower end of interval containing Q, i.e.,
+c get jq such that qv(jq) .le. q .le. qv(jq+1)...
+ JLq = -1
+ JU = NT+1
+ 12 If (JU-JLq .GT. 1) Then
+ JM = (JU+JLq) / 2
+ If (tt .GE. TV(JM)) Then
+ JLq = JM
+ Else
+ JU = JM
+ Endif
+ Goto 12
+ Endif
+
+ If (JLq .LE. 0) Then
+ Jq = 0
+ Elseif (JLq .LE. Nt-2) Then
+C keep q in the middle, as shown above
+ Jq = JLq - 1
+ Else
+C JLq .GE. Nt-1 case: Keep at least 4 points >= Jq.
+ Jq = Nt - 3
+
+ Endif
+C This is the interpolation variable in Q
+
+ If (JLq.GE.1 .and. JLq.LE.Nt-2) Then
+c store the lattice points in t...
+ tvec1 = Tv(jq)
+ tvec2 = Tv(jq+1)
+ tvec3 = Tv(jq+2)
+ tvec4 = Tv(jq+3)
+
+ t12 = tvec1 - tvec2
+ t13 = tvec1 - tvec3
+ t23 = tvec2 - tvec3
+ t24 = tvec2 - tvec4
+ t34 = tvec3 - tvec4
+
+ ty2 = tt - tvec2
+ ty3 = tt - tvec3
+
+ tmp1 = t12 + t13
+ tmp2 = t24 + t34
+
+ tdet = t12*t34 - tmp1*tmp2
+
+ EndIf
+
+
+c get the pdf function values at the lattice points...
+
+ If (Iprtn .GE. 3) Then
+ Ip = - Iprtn
+ Else
+ Ip = Iprtn
+ EndIf
+ jtmp = ((Ip + NfMx)*(NT+1)+(jq-1))*(NX+1)+jx+1
+
+ Do it = 1, nqvec
+
+ J1 = jtmp + it*(NX+1)
+
+ If (Jx .Eq. 0) Then
+C For the first 4 x points, interpolate x^2*f(x,Q)
+C This applies to the two lowest bins JLx = 0, 1
+C We can not put the JLx.eq.1 bin into the "interrior" section
+C (as we do for q), since Upd(J1) is undefined.
+ fij(1) = 0
+ fij(2) = Upd(J1+1) * XV(1)**2
+ fij(3) = Upd(J1+2) * XV(2)**2
+ fij(4) = Upd(J1+3) * XV(3)**2
+C
+C Use Polint6 which allows x to be anywhere w.r.t. the grid
+
+ Call Polint6 (XVpow(0), Fij(1), 4, ss, Fx, Dfx)
+
+ If (x .GT. 0D0) Fvec(it) = Fx / x**2
+C Pdf is undefined for x.eq.0
+ ElseIf (JLx .Eq. Nx-1) Then
+C This is the highest x bin:
+
+ Call Polint6 (XVpow(Nx-3), Upd(J1), 4, ss, Fx, Dfx)
+
+ Fvec(it) = Fx
+
+ Else
+C for all interior points, use Jon's in-line function
+C This applied to (JLx.Ge.2 .and. JLx.Le.Nx-2)
+ sf2 = Upd(J1+1)
+ sf3 = Upd(J1+2)
+
+ g1 = sf2*const1 - sf3*const2
+ g4 = -sf2*const3 + sf3*const4
+
+ Fvec(it) = (const5*(Upd(J1)-g1)
+ & + const6*(Upd(J1+3)-g4)
+ & + sf2*sy3 - sf3*sy2) / s23
+
+ Endif
+
+ enddo
+C We now have the four values Fvec(1:4)
+c interpolate in t...
+
+ If (JLq .LE. 0) Then
+C 1st Q-bin, as well as extrapolation to lower Q
+ Call Polint6 (TV(0), Fvec(1), 4, tt, ff, Dfq)
+
+ ElseIf (JLq .GE. Nt-1) Then
+C Last Q-bin, as well as extrapolation to higher Q
+ Call Polint6 (TV(Nt-3), Fvec(1), 4, tt, ff, Dfq)
+ Else
+C Interrior bins : (JLq.GE.1 .and. JLq.LE.Nt-2)
+C which include JLq.Eq.1 and JLq.Eq.Nt-2, since Upd is defined for
+C the full range QV(0:Nt) (in contrast to XV)
+ tf2 = fvec(2)
+ tf3 = fvec(3)
+
+ g1 = ( tf2*t13 - tf3*t12) / t23
+ g4 = (-tf2*t34 + tf3*t24) / t23
+
+ h00 = ((t34*ty2-tmp2*ty3)*(fvec(1)-g1)/t12
+ & + (tmp1*ty2-t12*ty3)*(fvec(4)-g4)/t34)
+
+ ff = (h00*ty2*ty3/tdet + tf2*ty3 - tf3*ty2) / t23
+ EndIf
+
+ PartonX6 = ff
+
+ Return
+C ********************
+ End
+
+
+
+
+C----------------------------------------------------------------------
+C-- Fortran interpolation code for MSTW PDFs, building on existing
+C-- MRST Fortran code and Jeppe Andersen's C++ code.
+C-- Three user interfaces:
+C-- call GetAllPDFs(prefix,ih,x,q,upv,dnv,usea,dsea,
+C-- str,sbar,chm,cbar,bot,bbar,glu,phot)
+C-- call GetAllPDFsAlt(prefix,ih,x,q,xpdf,xphoton)
+C-- xf = GetOnePDF(prefix,ih,x,q,f)
+C-- See enclosed example.f for usage.
+C-- Comments to Graeme Watt <watt(at)hep.ucl.ac.uk>.
+C----------------------------------------------------------------------
+
+C----------------------------------------------------------------------
+
+C-- Traditional MRST-like interface: return all flavours.
+C-- (Note the additional "sbar", "cbar", "bbar" and "phot"
+C-- compared to previous MRST releases.)
+ subroutine GetAllPDFs(prefix,ih,x,q,
+ & upv,dnv,usea,dsea,str,sbar,chm,cbar,bot,bbar,glu,phot)
+ implicit none
+ integer ih
+ double precision x,q,upv,dnv,usea,dsea,str,sbar,chm,cbar,
+ & bot,bbar,glu,phot,GetOnePDF,up,dn,sv,cv,bv
+ character*(*) prefix
+
+C-- Quarks.
+ dn = GetOnePDF(prefix,ih,x,q,1)
+ up = GetOnePDF(prefix,ih,x,q,2)
+ str = GetOnePDF(prefix,ih,x,q,3)
+ chm = GetOnePDF(prefix,ih,x,q,4)
+ bot = GetOnePDF(prefix,ih,x,q,5)
+
+C-- Valence quarks.
+ dnv = GetOnePDF(prefix,ih,x,q,7)
+ upv = GetOnePDF(prefix,ih,x,q,8)
+ sv = GetOnePDF(prefix,ih,x,q,9)
+ cv = GetOnePDF(prefix,ih,x,q,10)
+ bv = GetOnePDF(prefix,ih,x,q,11)
+
+C-- Antiquarks = quarks - valence quarks.
+ dsea = dn - dnv
+ usea = up - upv
+ sbar = str - sv
+ cbar = chm - cv
+ bbar = bot - bv
+
+C-- Gluon.
+ glu = GetOnePDF(prefix,ih,x,q,0)
+
+C-- Photon (= zero unless considering QED contributions).
+ phot = GetOnePDF(prefix,ih,x,q,13)
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+C-- Alternative LHAPDF-like interface: return PDFs in an array.
+ subroutine GetAllPDFsAlt(prefix,ih,x,q,xpdf,xphoton)
+ implicit none
+ integer ih,f
+ double precision x,q,xpdf(-6:6),xphoton,xvalence,GetOnePDF
+ character*(*) prefix
+
+ do f = 1, 6
+ xpdf(f) = GetOnePDF(prefix,ih,x,q,f) ! quarks
+ xvalence = GetOnePDF(prefix,ih,x,q,f+6) ! valence quarks
+ xpdf(-f) = xpdf(f) - xvalence ! antiquarks
+ end do
+ xpdf(0) = GetOnePDF(prefix,ih,x,q,0) ! gluon
+ xphoton = GetOnePDF(prefix,ih,x,q,13) ! photon
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+C-- Get only one parton flavour 'f', using PDG notation:
+C-- f = -6, -5, -4, -3, -2, -1,0,1,2,3,4,5,6
+C-- = tbar,bbar,cbar,sbar,ubar,dbar,g,d,u,s,c,b,t.
+C-- Can also get valence quarks directly:
+C-- f = 7, 8, 9,10,11,12.
+C-- = dv,uv,sv,cv,bv,tv.
+C-- Photon: f = 13.
+ double precision function GetOnePDF(prefix,ih,x,q,f)
+ implicit none
+ logical warn,fatal
+ parameter(warn=.false.,fatal=.true.)
+C-- Set warn=.true. to turn on warnings when extrapolating.
+C-- Set fatal=.false. to return zero instead of terminating when
+C-- invalid input values of x and q are used.
+ integer ih,f,nhess,nx,nq,np,nqc0,nqb0,nqc,nqb,n,m,ip,io,
+ & alphaSorder,nExtraFlavours
+ double precision x,q,xmin,xmax,qsqmin,qsqmax,mc2,mb2,eps,
+ & dummy,qsq,xlog,qsqlog,res,res1,anom,ExtrapolatePDF,
+ & InterpolatePDF,distance,tolerance,
+ & mCharm,mBottom,alphaSQ0,alphaSMZ
+ parameter(nx=64,nq=48,np=12,nqc0=4,nqb0=14,
+ & nqc=nq-nqc0,nqb=nq-nqb0)
+ parameter(xmin=1d-6,xmax=1d0,qsqmin=1d0,qsqmax=1d9,eps=1d-6)
+ parameter(nhess=2*20)
+ character set*2,prefix*(*),filename*60,oldprefix(0:nhess)*50
+ character dummyChar,dummyWord*50
+ double precision ff(np,nx,nq)
+ double precision qq(nq),xx(nx),cc(np,0:nhess,nx,nq,4,4)
+ double precision xxl(nx),qql(nq)
+C-- Store distance along each eigenvector, tolerance,
+C-- heavy quark masses and alphaS parameters in COMMON block.
+ common/mstwCommon/distance,tolerance,
+ & mCharm,mBottom,alphaSQ0,alphaSMZ,alphaSorder
+ save
+ data xx/1d-6,2d-6,4d-6,6d-6,8d-6,
+ & 1d-5,2d-5,4d-5,6d-5,8d-5,
+ & 1d-4,2d-4,4d-4,6d-4,8d-4,
+ & 1d-3,2d-3,4d-3,6d-3,8d-3,
+ & 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ & .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ & .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ & .5d0,.525d0,.55d0,.575d0,.6d0,.625d0,.65d0,.675d0,
+ & .7d0,.725d0,.75d0,.775d0,.8d0,.825d0,.85d0,.875d0,
+ & .9d0,.925d0,.95d0,.975d0,1d0/
+ data qq/1.d0,
+ & 1.25d0,1.5d0,0.d0,0.d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,
+ & 1d1,1.2d1,0.d0,0.d0,2.6d1,4d1,6.4d1,1d2,
+ & 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ & 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ & 1.8d6,3.2d6,5.6d6,1d7,1.8d7,3.2d7,5.6d7,1d8,
+ & 1.8d8,3.2d8,5.6d8,1d9/
+
+ if (f.lt.-6.or.f.gt.13) then
+ print *,"Error: invalid parton flavour = ",f
+ stop
+ end if
+
+ if (ih.lt.0.or.ih.gt.nhess) then
+ print *,"Error: invalid eigenvector number = ",ih
+ stop
+ end if
+
+C-- Check if the requested parton set is already in memory.
+ if (oldprefix(ih).ne.prefix) then
+
+C-- Start of initialisation for eigenvector set "i" ...
+C-- Do this only the first time the set "i" is called,
+C-- OR if the prefix has changed from the last time.
+
+C-- Check that the character arrays "oldprefix" and "filename"
+C-- are large enough.
+ if (len_trim(prefix).gt.len(oldprefix(ih))) then
+ print *,"Error in GetOnePDF: increase size of oldprefix"
+ stop
+ else if (len_trim(prefix)+7.gt.len(filename)) then
+ print *,"Error in GetOnePDF: increase size of filename"
+ stop
+ end if
+
+ write(set,'(I2.2)') ih ! convert integer to string
+C-- Remove trailing blanks from prefix before assigning filename.
+ filename = prefix(1:len_trim(prefix))//'.'//set//'.dat'
+C-- Line below can be commented out if you don't want this message.
+ print *,"Reading PDF grid from ",filename(1:len_trim(filename))
+ open(unit=33,file=filename,iostat=io,status='old')
+ if (io.ne.0) then
+ print *,"Error in GetOnePDF: can't open ",
+ & filename(1:len_trim(filename))
+ stop
+ end if
+
+C-- Read header containing heavy quark masses and alphaS values.
+ read(33,*)
+ read(33,*)
+ read(33,*) dummyChar,dummyWord,dummyWord,dummyChar,
+ & distance,tolerance
+ read(33,*) dummyChar,dummyWord,dummyChar,mCharm
+ read(33,*) dummyChar,dummyWord,dummyChar,mBottom
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSQ0
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSMZ
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSorder
+ read(33,*) dummyChar,dummyWord,dummyChar,nExtraFlavours
+ read(33,*)
+ read(33,*)
+ mc2=mCharm**2
+ mb2=mBottom**2
+ qq(4)=mc2
+ qq(5)=mc2+eps
+ qq(14)=mb2
+ qq(15)=mb2+eps
+
+C-- Check that the heavy quark masses are sensible.
+ if (mc2.lt.qq(3).or.mc2.gt.qq(6)) then
+ print *,"Error in GetOnePDF: invalid mCharm = ",mCharm
+ stop
+ end if
+ if (mb2.lt.qq(13).or.mb2.gt.qq(16)) then
+ print *,"Error in GetOnePDF: invalid mBottom = ",mBottom
+ stop
+ end if
+
+C-- The nExtraFlavours variable is provided to aid compatibility
+C-- with future grids where, for example, a photon distribution
+C-- might be provided (cf. the MRST2004QED PDFs).
+ if (nExtraFlavours.lt.0.or.nExtraFlavours.gt.1) then
+ print *,"Error in GetOnePDF: invalid nExtraFlavours = ",
+ & nExtraFlavours
+ stop
+ end if
+
+C-- Now read in the grids from the grid file.
+ do n=1,nx-1
+ do m=1,nq
+ if (nExtraFlavours.gt.0) then
+ if (alphaSorder.eq.2) then ! NNLO
+ read(33,'(12(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,12)
+ else ! LO or NLO
+ ff(10,n,m) = 0.d0 ! = chm-cbar
+ ff(11,n,m) = 0.d0 ! = bot-bbar
+ read(33,'(10(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,9),ff(12,n,m)
+ end if
+ else ! nExtraFlavours = 0
+ if (alphaSorder.eq.2) then ! NNLO
+ ff(12,n,m) = 0.d0 ! = photon
+ read(33,'(11(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,11)
+ else ! LO or NLO
+ ff(10,n,m) = 0.d0 ! = chm-cbar
+ ff(11,n,m) = 0.d0 ! = bot-bbar
+ ff(12,n,m) = 0.d0 ! = photon
+ read(33,'(9(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,9)
+ end if
+ end if
+ if (io.ne.0) then
+ print *,"Error in GetOnePDF reading ",filename
+ stop
+ end if
+ enddo
+ enddo
+
+C-- Check that ALL the file contents have been read in.
+ read(33,*,iostat=io) dummy
+ if (io.eq.0) then
+ print *,"Error in GetOnePDF: not at end of ",filename
+ stop
+ end if
+ close(unit=33)
+
+C-- PDFs are identically zero at x = 1.
+ do m=1,nq
+ do ip=1,np
+ ff(ip,nx,m)=0d0
+ enddo
+ enddo
+
+ do n=1,nx
+ xxl(n)=log10(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=log10(qq(m))
+ enddo
+
+C-- Initialise all parton flavours.
+ do ip=1,np
+ call InitialisePDF(ip,np,ih,nhess,nx,nq,nqc0,nqb0,
+ & xxl,qql,ff,cc)
+ enddo
+
+ oldprefix(ih) = prefix
+
+C-- ... End of initialisation for eigenvector set "ih".
+
+ end if ! oldprefix(ih).ne.prefix
+
+C----------------------------------------------------------------------
+
+ qsq=q*q
+C-- If mc2 < qsq < mc2+eps, then qsq = mc2+eps.
+ if (qsq.gt.qq(nqc0).and.qsq.lt.qq(nqc0+1)) qsq = qq(nqc0+1)
+C-- If mb2 < qsq < mb2+eps, then qsq = mb2+eps.
+ if (qsq.gt.qq(nqb0).and.qsq.lt.qq(nqb0+1)) qsq = qq(nqb0+1)
+
+ xlog=log10(x)
+ qsqlog=log10(qsq)
+
+ res = 0.d0
+
+ if (f.eq.0) then ! gluon
+ ip = 1
+ else if (f.ge.1.and.f.le.5) then ! quarks
+ ip = f+1
+ else if (f.le.-1.and.f.ge.-5) then ! antiquarks
+ ip = -f+1
+ else if (f.ge.7.and.f.le.11) then ! valence quarks
+ ip = f
+ else if (f.eq.13) then ! photon
+ ip = 12
+ else if (abs(f).ne.6.and.f.ne.12) then
+ if (warn.or.fatal) print *,"Error in GetOnePDF: f = ",f
+ if (fatal) stop
+ end if
+
+ if (x.le.0.d0.or.x.gt.xmax.or.q.le.0.d0) then
+
+ if (warn.or.fatal) print *,"Error in GetOnePDF: x,qsq = ",
+ & x,qsq
+ if (fatal) stop
+
+ else if (abs(f).eq.6.or.f.eq.12) then ! set top quarks to zero
+
+ res = 0.d0
+
+ else if (qsq.lt.qsqmin) then ! extrapolate to low Q^2
+
+ if (warn) then
+ print *, "Warning in GetOnePDF, extrapolating: f = ",f,
+ & ", x = ",x,", q = ",q
+ end if
+
+ if (x.lt.xmin) then ! extrapolate to low x
+
+ res = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = res1 - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ end if
+
+ else ! do usual interpolation
+
+ res = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = res1 - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ end if
+
+ end if
+
+C-- Calculate the anomalous dimension, dlog(xf)/dlog(qsq),
+C-- evaluated at qsqmin. Then extrapolate the PDFs to low
+C-- qsq < qsqmin by interpolating the anomalous dimenion between
+C-- the value at qsqmin and a value of 1 for qsq << qsqmin.
+C-- If value of PDF at qsqmin is very small, just set
+C-- anomalous dimension to 1 to prevent rounding errors.
+ if (abs(res).ge.1.D-5) then
+ anom = (res1-res)/res/0.01D0
+ else
+ anom = 1.D0
+ end if
+ res = res*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin)
+
+ else if (x.lt.xmin.or.qsq.gt.qsqmax) then ! extrapolate
+
+ if (warn) then
+ print *, "Warning in GetOnePDF, extrapolating: f = ",f,
+ & ", x = ",x,", q = ",q
+ end if
+
+ res = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+ end if
+
+ else ! do usual interpolation
+
+ res = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+ end if
+
+ end if
+
+ GetOnePDF = res
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ subroutine InitialisePDF(ip,np,ih,nhess,nx,my,myc0,myb0,
+ & xx,yy,ff,cc)
+ implicit none
+ integer nhess,ih,nx,my,myc0,myb0,j,k,l,m,n,ip,np
+ double precision xx(nx),yy(my),ff(np,nx,my),
+ & ff1(nx,my),ff2(nx,my),ff12(nx,my),ff21(nx,my),
+ & yy0(4),yy1(4),yy2(4),yy12(4),z(16),
+ & cl(16),cc(np,0:nhess,nx,my,4,4),iwt(16,16),
+ & polderiv1,polderiv2,polderiv3,d1,d2,d1d2,xxd
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ & -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ & 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ & 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ & 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ & 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ & -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ & 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ & -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ & 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ & -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ & 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+ do m=1,my
+ ff1(1,m)=polderiv1(xx(1),xx(2),xx(3),
+ & ff(ip,1,m),ff(ip,2,m),ff(ip,3,m))
+ ff1(nx,m)=polderiv3(xx(nx-2),xx(nx-1),xx(nx),
+ & ff(ip,nx-2,m),ff(ip,nx-1,m),ff(ip,nx,m))
+ do n=2,nx-1
+ ff1(n,m)=polderiv2(xx(n-1),xx(n),xx(n+1),
+ & ff(ip,n-1,m),ff(ip,n,m),ff(ip,n+1,m))
+ enddo
+ enddo
+
+C-- Calculate the derivatives at qsq=mc2,mc2+eps,mb2,mb2+eps
+C-- in a similar way as at the endpoints qsqmin and qsqmax.
+ do n=1,nx
+ do m=1,my
+ if (m.eq.1.or.m.eq.myc0+1.or.m.eq.myb0+1) then
+ ff2(n,m)=polderiv1(yy(m),yy(m+1),yy(m+2),
+ & ff(ip,n,m),ff(ip,n,m+1),ff(ip,n,m+2))
+ else if (m.eq.my.or.m.eq.myc0.or.m.eq.myb0) then
+ ff2(n,m)=polderiv3(yy(m-2),yy(m-1),yy(m),
+ & ff(ip,n,m-2),ff(ip,n,m-1),ff(ip,n,m))
+ else
+ ff2(n,m)=polderiv2(yy(m-1),yy(m),yy(m+1),
+ & ff(ip,n,m-1),ff(ip,n,m),ff(ip,n,m+1))
+ end if
+ end do
+ end do
+
+C-- Calculate the cross derivatives (d/dx)(d/dy).
+ do m=1,my
+ ff12(1,m)=polderiv1(xx(1),xx(2),xx(3),
+ & ff2(1,m),ff2(2,m),ff2(3,m))
+ ff12(nx,m)=polderiv3(xx(nx-2),xx(nx-1),xx(nx),
+ & ff2(nx-2,m),ff2(nx-1,m),ff2(nx,m))
+ do n=2,nx-1
+ ff12(n,m)=polderiv2(xx(n-1),xx(n),xx(n+1),
+ & ff2(n-1,m),ff2(n,m),ff2(n+1,m))
+ enddo
+ enddo
+
+C-- Calculate the cross derivatives (d/dy)(d/dx).
+ do n=1,nx
+ do m = 1, my
+ if (m.eq.1.or.m.eq.myc0+1.or.m.eq.myb0+1) then
+ ff21(n,m)=polderiv1(yy(m),yy(m+1),yy(m+2),
+ & ff1(n,m),ff1(n,m+1),ff1(n,m+2))
+ else if (m.eq.my.or.m.eq.myc0.or.m.eq.myb0) then
+ ff21(n,m)=polderiv3(yy(m-2),yy(m-1),yy(m),
+ & ff1(n,m-2),ff1(n,m-1),ff1(n,m))
+ else
+ ff21(n,m)=polderiv2(yy(m-1),yy(m),yy(m+1),
+ & ff1(n,m-1),ff1(n,m),ff1(n,m+1))
+ end if
+ end do
+ end do
+
+C-- Take the average of (d/dx)(d/dy) and (d/dy)(d/dx).
+ do n=1,nx
+ do m = 1, my
+ ff12(n,m)=0.5*(ff12(n,m)+ff21(n,m))
+ end do
+ end do
+
+ do n=1,nx-1
+ do m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(ip,n,m)
+ yy0(2)=ff(ip,n+1,m)
+ yy0(3)=ff(ip,n+1,m+1)
+ yy0(4)=ff(ip,n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ enddo
+
+ do l=1,16
+ xxd=0.d0
+ do k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ enddo
+ cl(l)=xxd
+ enddo
+ l=0
+ do k=1,4
+ do j=1,4
+ l=l+1
+ cc(ip,ih,n,m,k,j)=cl(l)
+ enddo
+ enddo
+ enddo
+ enddo
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function InterpolatePDF(ip,np,ih,nhess,x,y,
+ & nx,my,xx,yy,cc)
+ implicit none
+ integer ih,nx,my,nhess,locx,l,m,n,ip,np
+ double precision xx(nx),yy(my),cc(np,0:nhess,nx,my,4,4),
+ & x,y,z,t,u
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.d0
+ do l=4,1,-1
+ z=t*z+((cc(ip,ih,n,m,l,4)*u+cc(ip,ih,n,m,l,3))*u
+ . +cc(ip,ih,n,m,l,2))*u+cc(ip,ih,n,m,l,1)
+ enddo
+
+ InterpolatePDF = z
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function ExtrapolatePDF(ip,np,ih,nhess,x,y,
+ & nx,my,xx,yy,cc)
+ implicit none
+ integer ih,nx,my,nhess,locx,n,m,ip,np
+ double precision xx(nx),yy(my),cc(np,0:nhess,nx,my,4,4),
+ & x,y,z,f0,f1,z0,z1,InterpolatePDF
+
+ n=locx(xx,nx,x) ! 0: below xmin, nx: above xmax
+ m=locx(yy,my,y) ! 0: below qsqmin, my: above qsqmax
+
+C-- If extrapolation in small x only:
+ if (n.eq.0.and.m.gt.0.and.m.lt.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(1),y,nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(2),y,nx,my,xx,yy,cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z = exp(log(f0)+(log(f1)-log(f0))/(xx(2)-xx(1))*(x-xx(1)))
+ else
+ z = f0+(f1-f0)/(xx(2)-xx(1))*(x-xx(1))
+ end if
+C-- If extrapolation into large q only:
+ else if (n.gt.0.and.m.eq.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,x,yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,x,yy(my-1),nx,my,xx,yy,cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+C-- If extrapolation into large q AND small x:
+ else if (n.eq.0.and.m.eq.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(1),yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(1),yy(my-1),nx,my,xx,yy,
+ & cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z0 = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z0 = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(2),yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(2),yy(my-1),nx,my,xx,yy,
+ & cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z1 = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z1 = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+ if (z0.gt.0.d0.and.z1.gt.0.d0) then
+ z = exp(log(z0)+(log(z1)-log(z0))/(xx(2)-xx(1))*(x-xx(1)))
+ else
+ z = z0+(z1-z0)/(xx(2)-xx(1))*(x-xx(1))
+ end if
+ else
+ print *,"Error in ExtrapolatePDF"
+ stop
+ end if
+
+ ExtrapolatePDF = z
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ integer function locx(xx,nx,x)
+C-- returns an integer j such that x lies inbetween xx(j) and xx(j+1).
+C-- nx is the length of the array with xx(nx) the highest element.
+ implicit none
+ integer nx,jl,ju,jm
+ double precision x,xx(nx)
+ if(x.eq.xx(1)) then
+ locx=1
+ return
+ endif
+ if(x.eq.xx(nx)) then
+ locx=nx-1
+ return
+ endif
+ ju=nx+1
+ jl=0
+ 1 if((ju-jl).le.1) go to 2
+ jm=(ju+jl)/2
+ if(x.ge.xx(jm)) then
+ jl=jm
+ else
+ ju=jm
+ endif
+ go to 1
+ 2 locx=jl
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function polderiv1(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x1 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv1=(x3*x3*(y1-y2)+2.d0*x1*(x3*(-y1+y2)+x2*(y1-y3))
+ & +x2*x2*(-y1+y3)+x1*x1*(-y2+y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+ double precision function polderiv2(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x2 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv2=(x3*x3*(y1-y2)-2.d0*x2*(x3*(y1-y2)+x1*(y2-y3))
+ & +x2*x2*(y1-y3)+x1*x1*(y2-y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+ double precision function polderiv3(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x3 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv3=(x3*x3*(-y1+y2)+2.d0*x2*x3*(y1-y3)+x1*x1*(y2-y3)
+ & +x2*x2*(-y1+y3)+2.d0*x1*x3*(-y2+y3))/
+ & ((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+C----------------------------------------------------------------------
Index: dynnlo-v1.5-applgrid/src/Need/checkorder.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/checkorder.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/checkorder.f (revision 1338)
@@ -0,0 +1,47 @@
+ subroutine checkorder()
+c--- checks the value of nproc and part against a list of processes that
+c--- are calculable only at LO. If the calculation is not possible,
+c--- writes an error message and aborts
+ integer nproc
+ character*4 part
+
+ common/nproc/nproc
+ common/part/part
+
+c--- if we're calculating LO only, there's no problem
+ if (part .eq. 'lord') return
+
+c--- otherwise, we must be performing a NLO calculation, and this list of
+c--- process numbers can't be calculated beyond LO
+ if ( (nproc .eq. 13) .or. (nproc .eq. 18)
+ . .or. (nproc .eq. 14) .or. (nproc .eq. 19)
+ . .or. (nproc .eq. 20) .or. (nproc .eq. 25)
+ . .or. (nproc .eq. 23) .or. (nproc .eq. 28)
+ . .or. (nproc .eq. 24) .or. (nproc .eq. 29)
+ . .or. (nproc .eq. 45) .or. (nproc .eq. 50)
+ . .or. (nproc .eq. 56) .or. (nproc .eq. 64)
+ . .or. (nproc .eq. 151)
+ . .or. (nproc .eq. 152) .or. (nproc .eq. 156)
+ . .or. (nproc .eq. 180) .or. (nproc .eq. 181)
+ . .or. (nproc .eq. 185) .or. (nproc .eq. 186)
+ . .or. (nproc .eq. 190) .or. (nproc .eq. 191)
+ . .or. (nproc .eq. 196) .or. (nproc .eq. 197)
+ . .or. (nproc .eq. 201) .or. (nproc .eq. 202)
+ . .or. (nproc .eq. 206) .or. (nproc .eq. 207)
+ . .or. (nproc .eq. 216) .or. (nproc .eq. 217)
+ . .or. (nproc .eq. 221) .or. (nproc .eq. 263)
+ . .or. (nproc .eq. 264) .or. (nproc .eq. 271)
+ . .or. (nproc .eq. 272) .or. (nproc .eq. 311)
+ . .or. (nproc .eq. 316) .or. (nproc .eq. 321)
+ . .or. (nproc .eq. 326) .or. (nproc .eq. 331)
+ . .or. (nproc .eq. 336)
+ . ) then
+ write(6,*)
+ write(6,*)'This process cannot be calculated beyond LO - please'
+ write(6,*)'check the values of nproc and part then try again'
+ stop
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/pdf.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/pdf.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/pdf.f (revision 1338)
@@ -0,0 +1,7746 @@
+ SUBROUTINE fdist(ih,x,q,fx)
+ implicit none
+
+ include 'pdfiset.f'
+ include 'constants.f'
+ real * 8 FX(-nf:nf)
+ REAL * 8 X,Q,Q2,DUV,DDV,DDEL,DUDB,DSB,DGL,CHR,BOT,UB,DB,DQ1
+ REAL * 8 BBAR,CBAR,DSBAR,PHOT
+ REAL * 8 ctq4fn,ctq5pdf,ctq6pdf
+
+C For Alekhin pdfs
+
+ real*8 pdfs09(0:8),dpdfs09(0:8,25)
+ real*8 pdfs06(0:9),dpdfs06(0:9,23)
+C
+C For Reya pdfs
+ double precision JR09VFNNLOxuv,JR09VFNNLOxdv,JR09VFNNLOxgl,
+ & JR09VFNNLOxub,JR09VFNNLOxdb,JR09VFNNLOxsb,
+ & JR09VFNNLOxcb,JR09VFNNLOxbb,
+ & JR09VFNNLOalphas,
+ & xuv(-13:13),xdv(-13:13),xgl(-13:13),xub(-13:13),
+ & xdb(-13:13),xsb(-13:13),xcb(-13:13),xbb(-13:13),
+ & alphas(-13:13),
+ & exuv,exdv,exgl,exub,exdb,exsb,excb,exbb,ealphas
+ double precision GJR08VFNSxuv,GJR08VFNSxdv,GJR08VFNSxgl,
+ & GJR08VFNSxub,GJR08VFNSxdb,GJR08VFNSxsb,
+ & GJR08VFNSxcb,GJR08VFNSxbb,
+ & GJR08VFNSalphas
+C For NNPDF pdfs
+C
+ integer KREP,NREP,IX,IPDF,NX,idum,ranpdf
+ double precision XPDF(-6:6),XMAX,XMIN!,X,Q,
+ double precision XPDFAV(-6:6),XPDFER(-6:6)
+ double precision XPDFREP(-6:6,1000)
+ character nnpdfgrid*100
+ double precision ran2
+ COMMON/ranno/idum
+C
+C
+ integer j,mode,ih
+ integer NPDF,NPAR
+
+ character *50 prefix,prefix1
+ integer nset
+ common/prefix/nset,prefix
+
+
+ Q2=Q**2
+
+
+
+C Fix to prevent undefined math operations for x=1.
+C Assumes that all structure functions vanish for x=1.
+
+
+ IF(1-X.EQ.0) THEN
+ DO J=-NF,NF
+ FX(J) = 0
+ ENDDO
+ RETURN
+ ENDIF
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ4
+
+ if (iset.eq.1) then
+ mode=3
+ DGL=Ctq4Fn (mode,0, x, Q)*x
+ UB=Ctq4Fn (mode,-1, x, Q)*x
+ DB=Ctq4Fn (mode,-2, x, Q)*x
+ DSB=Ctq4Fn (mode,-3, x, Q)*x
+ CHR=Ctq4Fn (mode,-4, x, Q)*x
+ BOT=Ctq4Fn (mode,-5, x, Q)*x
+ DUV=Ctq4Fn (mode,1, x, Q)*x - UB
+ DDV=Ctq4Fn (mode,2, x, Q)*x - DB
+ elseif (iset.eq.2) then
+ mode=1
+ DGL=Ctq4Fn (mode,0, x, Q)*x
+ UB=Ctq4Fn (mode,-1, x, Q)*x
+ DB=Ctq4Fn (mode,-2, x, Q)*x
+ DSB=Ctq4Fn (mode,-3, x, Q)*x
+ CHR=Ctq4Fn (mode,-4, x, Q)*x
+ BOT=Ctq4Fn (mode,-5, x, Q)*x
+ DUV=Ctq4Fn (mode,1, x, Q)*x - UB
+ DDV=Ctq4Fn (mode,2, x, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST98
+ elseif ((ISET.LT.17).AND.(ISET.GT.10)) THEN
+ mode=iset-10
+ call mrs98(x,q2,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ5
+
+ elseif ((ISET.LE.29).AND.(ISET.GT.20)) THEN
+ DGL=Ctq5Pdf (0, X, Q)*x
+ UB=Ctq5Pdf (-1, X, Q)*x
+ DB=Ctq5Pdf (-2, X, Q)*x
+ DSB=Ctq5Pdf (-3, X, Q)*x
+ CHR=Ctq5Pdf (-4, X, Q)*x
+ BOT=Ctq5Pdf (-5, X, Q)*x
+ DUV=Ctq5Pdf (1, X, Q)*x - UB
+ DDV=Ctq5Pdf (2, X, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST99
+ elseif (iset.eq.30) then
+ mode=1
+ call mrs99(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2001
+
+ ELSEIF ((ISET.LT.45).AND.(ISET.GT.40)) THEN
+ mode=iset-40
+ call mrst2001(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+ ELSEIF ((ISET.LT.49).AND.(ISET.GT.44)) THEN
+ mode=iset-44
+ call mrstnnlo(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2002 LO
+
+ ELSEIF (ISET.eq.49) THEN
+ mode=iset-48
+ call mrstlo(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ6
+
+ elseif ((ISET.LE.54).AND.(ISET.GT.50)) THEN
+ DGL=Ctq6Pdf (0, X, Q)*x
+ UB=Ctq6Pdf (-1, X, Q)*x
+ DB=Ctq6Pdf (-2, X, Q)*x
+ DSB=Ctq6Pdf (-3, X, Q)*x
+ CHR=Ctq6Pdf (-4, X, Q)*x
+ BOT=Ctq6Pdf (-5, X, Q)*x
+ DUV=Ctq6Pdf (1, X, Q)*x - UB
+ DDV=Ctq6Pdf (2, X, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ6.6
+
+ elseif ((ISET.LE.59).AND.(ISET.GT.54)) THEN
+ DGL=Ctq6Pdf (0, X, Q)*x
+ UB=Ctq6Pdf (-1, X, Q)*x
+ DB=Ctq6Pdf (-2, X, Q)*x
+ DSB=Ctq6Pdf (-3, X, Q)*x
+ CHR=Ctq6Pdf (-4, X, Q)*x
+ BOT=Ctq6Pdf (-5, X, Q)*x
+ DUV=Ctq6Pdf (1, X, Q)*x - UB
+ DDV=Ctq6Pdf (2, X, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2002
+
+ elseif ((iset.eq.61).or.(iset.eq.62)) then
+ mode=iset-60
+ call mrst2002(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2004
+
+ elseif ((iset.eq.71).or.(iset.eq.72)) then
+ mode=iset-70
+ call mrst2004(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Alekhin NNLO A06
+
+ elseif (iset.eq.75) then
+
+ call a06(x,q2,pdfs06,dpdfs06,npdf,npar)
+ if(nset.eq.0) then
+ duv=pdfs06(1)
+ ddv=pdfs06(2)
+ dgl=pdfs06(3)
+ ub=pdfs06(4)
+ dsb=pdfs06(5)
+ db=pdfs06(6)
+ chr=pdfs06(7)
+ bot=pdfs06(8)
+ else
+ duv=pdfs06(1)+dpdfs06(1,nset)
+ ddv=pdfs06(2)+dpdfs06(2,nset)
+ dgl=pdfs06(3)+dpdfs06(3,nset)
+ ub=pdfs06(4)+dpdfs06(4,nset)
+ dsb=pdfs06(5)+dpdfs06(5,nset)
+ db=pdfs06(6)+dpdfs06(6,nset)
+ chr=pdfs06(7)+dpdfs06(7,nset)
+ bot=pdfs06(8)+dpdfs06(8,nset)
+ endif
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Alekhin NNLO A09
+
+ elseif (iset.eq.76) then
+ call a09(x,q2,pdfs09,dpdfs09,5,nset)
+ if(nset.eq.0) then
+ duv=pdfs09(1)
+ ddv=pdfs09(2)
+ dgl=pdfs09(3)
+ ub=pdfs09(4)
+ dsb=pdfs09(5)
+ db=pdfs09(6)
+ chr=pdfs09(7)
+ bot=pdfs09(8)
+ else
+ duv=pdfs09(1)+dpdfs09(1,nset)
+ ddv=pdfs09(2)+dpdfs09(2,nset)
+ dgl=pdfs09(3)+dpdfs09(3,nset)
+ ub=pdfs09(4)+dpdfs09(4,nset)
+ dsb=pdfs09(5)+dpdfs09(5,nset)
+ db=pdfs09(6)+dpdfs09(6,nset)
+ chr=pdfs09(7)+dpdfs09(7,nset)
+ bot=pdfs09(8)+dpdfs09(8,nset)
+ endif
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MSTW 2008
+
+ elseif ((iset.gt.89).and.(iset.lt.93)) then
+
+ prefix1 = prefix(1:len_trim(prefix))//'.68cl' ! 68% C.L. errors
+
+ if(nset.eq.0)prefix1=prefix
+
+
+ CALL GetAllPDFs(prefix1,nset,x,q,
+ # DUV,DDV,UB,DB,DSB,DSBAR,CHR,Cbar,BOT,bbar,DGL,phot)
+
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C NNPDF 2.0
+
+ elseif ((iset.gt.79).and.(iset.lt.81)) then
+
+! ranpdf=INT(ran2()*100)
+! write(*,*) ranpdf
+! do KREP=1,NREP
+! Get PDFs for each replica at each value of x
+ call NNPDFINTevolveLHA(X,Q,XPDF,nset)
+!CM call NNPDFINTevolveLHA(X,Q,XPDF,ranpdf)
+! Save in array
+! do IPDF=-6,6,1
+! XPDFREP(IPDF,NREP) = XPDF(IPDF)
+! enddo
+
+! enddo
+
+* Compute averages and errors
+! call NNPDFAV(XPDFREP,NREP,XPDFAV,XPDFER)
+
+ DGL = XPDF(0)
+ UB = XPDF(-2)
+ DB = XPDF(-1)
+ DSB = XPDF(3)
+ CHR = XPDF(4)
+ BOT = XPDF(5)
+ DUV = XPDF(2) - UB
+ DDV = XPDF(1) - DB
+ BBAR = XPDF(-5)
+ CBAR = XPDF(-4)
+ DSBAR = XPDF(-3)
+
+! write(*,*)duv,ddv,dgl,ub,dsb,db,chr,bot
+
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C GJR08VFLO Dynamical Parton Distribution Functions
+
+ elseif ((iset.gt.64).and.(iset.lt.66)) then
+
+ DUV = GJR08VFNSxuv(x,Q2,14)
+ DDV = GJR08VFNSxdv(x,Q2,14)
+ DGL = GJR08VFNSxgl(x,Q2,14)
+ UB = GJR08VFNSxub(x,Q2,14)
+ DB = GJR08VFNSxdb(x,Q2,14)
+ DSB = GJR08VFNSxsb(x,Q2,14)
+ CHR = GJR08VFNSxcb(x,Q2,14)
+ BOT = GJR08VFNSxbb(x,Q2,14)
+! alphas(set) = GJR08VFNSalphas(Q2,14)
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C GJR08VFNLO Dynamical Parton Distribution Functions
+
+ elseif ((iset.gt.65).and.(iset.lt.67)) then
+
+ DUV = GJR08VFNSxuv(x,Q2,nset)
+ DDV = GJR08VFNSxdv(x,Q2,nset)
+ DGL = GJR08VFNSxgl(x,Q2,nset)
+ UB = GJR08VFNSxub(x,Q2,nset)
+ DB = GJR08VFNSxdb(x,Q2,nset)
+ DSB = GJR08VFNSxsb(x,Q2,nset)
+ CHR = GJR08VFNSxcb(x,Q2,nset)
+ BOT = GJR08VFNSxbb(x,Q2,nset)
+! alphas(set) = GJR08VFNSalphas(Q2,nset)
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C JR09VFNNLO Dynamical Parton Distribution Functions
+
+ elseif ((iset.gt.66).and.(iset.lt.68)) then
+
+ DUV = JR09VFNNLOxuv(x,Q2,nset)
+ DDV = JR09VFNNLOxdv(x,Q2,nset)
+ DGL = JR09VFNNLOxgl(x,Q2,nset)
+ UB = JR09VFNNLOxub(x,Q2,nset)
+ DB = JR09VFNNLOxdb(x,Q2,nset)
+ DSB = JR09VFNNLOxsb(x,Q2,nset)
+ CHR = JR09VFNNLOxcb(x,Q2,nset)
+ BOT = JR09VFNNLOxbb(x,Q2,nset)
+! alphas(set) = JR09VFNNLOalphas(Q2,nset)
+
+
+
+ ELSE
+ WRITE(*,*)'NO SUCH DISTRIBUTION'
+ STOP
+ ENDIF
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+
+ if(iset.lt.80) then
+
+ DSBAR=DSB
+ CBAR=CHR
+ BBAR=BOT
+
+ endif
+
+CC BE CAREFUL !!
+
+CC Different from HNNLO:
+CC u->2 d->1
+
+
+c for protons
+ if (ih.eq.1) then
+ FX(0)=DGL/x
+ FX(2)=(DUV+UB)/x
+ FX(1)=(DDV+DB)/x
+ FX(3)=DSB/x
+ FX(4)=CHR/x
+ FX(5)=BOT/x
+ FX(-2)=UB/x
+ FX(-1)=DB/x
+ FX(-3)=DSBAR/x
+ FX(-4)=CBAR/x
+ FX(-5)=BBAR/x
+c for anti-protons
+ elseif (ih.eq.-1) then
+ FX(0)=DGL/x
+ FX(-2)=(DUV+UB)/x
+ FX(-1)=(DDV+DB)/x
+ FX(-3)=DSB/x
+ FX(-4)=CHR/x
+ FX(-5)=BOT/x
+ FX(2)=UB/x
+ FX(1)=DB/x
+ FX(3)=DSBAR/x
+ FX(4)=CBAR/x
+ FX(5)=BBAR/x
+ endif
+
+
+ RETURN
+ END
+
+
+
+ subroutine mrs98(x,q2,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C****************************************************************C
+C C
+C This is a package for the new MRS 1998 parton C
+C distributions. The format is similar to the previous C
+C (1996) MRS-R series. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, MSbar factorization is assumed, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 1 FT08A central gluon, a_s 300 0.1175 0.00561 C
+C 2 FT09A higher gluon 300 0.1175 0.00510 C
+C 3 FT11A lower gluon 300 0.1175 0.00408 C
+C 4 FT24A lower a_s 229 0.1125 0.00586 C
+C 5 FT23A higher a_s 383 0.1225 0.00410 C
+C C
+C C
+C The corresponding grid files are called ft08a.dat etc. C
+C C
+C The reference is: C
+C A.D. Martin, R.G. Roberts, W.J. Stirling, R.S Thorne C
+C Univ. Durham preprint DTP/98/??, hep-ph/??????? (1998) C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C
+c and for the LO sets
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C C
+C 6 LO05A central gluon, a_s 174 0.1250 0.01518 C
+C 7 LO09A higher gluon 174 0.1250 0.01616 C
+C 8 LO10A lower gluon 174 0.1250 0.01533 C
+C 9 LO01A lower a_s 136 0.1200 0.01652 C
+C 10 LO07A higher a_s 216 0.1300 0.01522 C
+C C
+C C
+C The corresponding grid files are called lt05a.dat etc. C
+c C
+C C
+C****************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ if(mode.eq.1) then
+ call mrs981(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrs982(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrs983(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrs984(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.5) then
+ call mrs985(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+c from here LO
+ elseif(mode.eq.6) then
+ call mrs986(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.7) then
+ call mrs987(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.8) then
+ call mrs988(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.9) then
+ call mrs989(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.10) then
+ call mrs9810(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ')
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ')
+ return
+ end
+
+ subroutine mrs981(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft08a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs982(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft09a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs983(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft11a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs984(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft24a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs985(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft23a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+C****************************************************************C
+C C
+C This is a package for the new MRS LO 1998 parton C
+C distributions. The format is similar to the previous C
+C (1996) MRS-R series. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C Reference Martin, Roberts, Stirling and Thorne C
+C Durham preprint DTP/98/52 (August 1998) C
+C C
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 6 LO05A central gluon, a_s 174 0.1250 0.01518 C
+C 7 LO09A higher gluon 174 0.1250 0.01616 C
+C 8 LO10A lower gluon 174 0.1250 0.01533 C
+C 9 LO01A lower a_s 136 0.1200 0.01652 C
+C 10 LO07A higher a_s 216 0.1300 0.01522 C
+C C
+C C
+
+ subroutine mrs986(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo05a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs987(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo09a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs988(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo10a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs989(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo01a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs9810(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo07a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs99(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C****************************************************************C
+C C
+C This is a package for the new **corrected** MRST parton C
+C distributions. The format is similar to the previous C
+C (1998) MRST series. C
+C C
+C NOTE: 7 new sets are added here, corresponding to shifting C
+C the small x HERA data up and down by 2.5%, and by varying C
+C the charm and strange distributions, and by forcing a C
+C larger d/u ratio at large x. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, MSbar factorization is assumed, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 1 COR01 central gluon, a_s 300 0.1175 0.00537 C
+C 2 COR02 higher gluon 300 0.1175 0.00497 C
+C 3 COR03 lower gluon 300 0.1175 0.00398 C
+C 4 COR04 lower a_s 229 0.1125 0.00585 C
+C 5 COR05 higher a_s 383 0.1225 0.00384 C
+C 6 COR06 quarks up 303.3 0.1178 0.00497 C
+C 7 COR07 quarks down 290.3 0.1171 0.00593 C
+C 8 COR08 strange up 300 0.1175 0.00524 C
+C 9 COR09 strange down 300 0.1175 0.00524 C
+C 10 C0R10 charm up 300 0.1175 0.00525 C
+C 11 COR11 charm down 300 0.1175 0.00524 C
+C 12 COR12 larger d/u 300 0.1175 0.00515 C
+C C
+C The corresponding grid files are called cor01.dat etc. C
+C C
+C The reference is: C
+C A.D. Martin, R.G. Roberts, W.J. Stirling, R.S Thorne C
+C Univ. Durham preprint DTP/99/64, hep-ph/9907231 (1999) C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C C
+C****************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+c write(6,*)q,q2
+c if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99
+c if(x.lt.xmin.or.x.gt.xmax) print 98
+ if(mode.eq.1) then
+ call mrs991(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrs992(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrs993(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrs994(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.5) then
+ call mrs995(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.6) then
+ call mrs996(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.7) then
+ call mrs997(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.8) then
+ call mrs998(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.9) then
+ call mrs999(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.10) then
+ call mrs9910(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.11) then
+ call mrs9911(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.12) then
+ call mrs9912(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ')
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ')
+ return
+ end
+
+ subroutine mrs991(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor01.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs992(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor02.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs993(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor03.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs994(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor04.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs995(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor05.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs996(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor06.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs997(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor07.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+ subroutine mrs998(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor08.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs999(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor09.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+ subroutine mrs9910(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor10.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs9911(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor11.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs9912(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor12.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+c
+c From now 2001 MRST sets
+c
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+
+
+ subroutine mrstlo(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2001 LO parton C
+C distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0201xxx C
+C C
+C There is 1 pdf set corresponding to mode = 1 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.220 C
+C corresponding to alpha_s(M_Z) of 0.130 C
+C This set reads a grid whose first number is 0.02868 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrstlo1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrstlo1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/lo2002.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+
+
+
+
+
+ subroutine mrst2001(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2001 NLO parton C
+C distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0110215 C
+C C
+C There are 4 pdf sets corresponding to mode = 1, 2, 3, 4 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.323 C
+C corresponding to alpha_s(M_Z) of 0.119 C
+C This set reads a grid whose first number is 0.00927 C
+C C
+C Mode=2 gives the set with Lambda(MSbar,nf=4) = 0.290 C
+C corresponding to alpha_s(M_Z) of 0.117 C
+C This set reads a grid whose first number is 0.00953 C
+C C
+C Mode=3 gives the set with Lambda(MSbar,nf=4) = 0.362 C
+C corresponding to alpha_s(M_Z) of 0.121 C
+C This set reads a grid whose first number is 0.00889 C
+C C
+C Mode=4 gives the set MRST2001J which gives better agreement C
+C with the Tevatron inclusive jet data but has unattractive C
+C gluon behaviour at large x (see discussion in paper) C
+C This set has Lambda(MSbar,nf=4) = 0.353(alpha_s(M_Z) = 0.121 C
+C This set reads a grid whose first number is 0.00826 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst20011(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst20012(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrst20013(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrst20014(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst20011(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf119.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20012(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf117.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20013(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf121.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20014(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/j121.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+
+
+
+ subroutine mrstnnlo(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the MRST 2002 NNLO parton distributionsC
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0201127 C
+C C
+C There are 4 pdf sets corresponding to mode = 1, 2, 3, 4 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the `average' of the slow and fast evolutions C
+C This set reads a grid whose first number is 0.00725 C
+C C
+C Mode=2 gives the set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the fast evolution C
+C This set reads a grid whose first number is 0.00734 C
+C C
+C Mode=3 gives the set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the slow evolution C
+C This set reads a grid whose first number is 0.00739 C
+C C
+C Mode=4 gives the set MRSTNNLOJ which gives better agreement C
+C with the Tevatron inclusive jet data but has unattractive C
+C gluon behaviour at large x (see discussion in paper) C
+C This set has Lambda(MSbar,nf=4) = 0.267(alpha_s(M_Z) =0.1180 C
+C This set reads a grid whose first number is 0.00865 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrstnnlo1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrstnnlo2(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrstnnlo3(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrstnnlo4(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrstnnlo1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo2(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo3(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155b.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo4(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1180j.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine jeppe1(nx,my,xx,yy,ff,cc)
+ implicit real*8(a-h,o-z)
+ PARAMETER(NNX=49,MMY=37)
+ dimension xx(nx),yy(my),ff(nx,my),ff1(NNX,MMY),ff2(NNX,MMY),
+ xff12(NNX,MMY),yy0(4),yy1(4),yy2(4),yy12(4),z(16),wt(16,16),
+ xcl(16),cc(nx,my,4,4),iwt(16,16)
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ x -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ x 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ x 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ x 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ x 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ x -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ x 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ x -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ x 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ x -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ x 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+
+ do 42 m=1,my
+ dx=xx(2)-xx(1)
+ ff1(1,m)=(ff(2,m)-ff(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff1(nx,m)=(ff(nx,m)-ff(nx-1,m))/dx
+ do 41 n=2,nx-1
+ ff1(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff(n-1,m),ff(n,m),
+ xff(n+1,m))
+ 41 continue
+ 42 continue
+
+ do 44 n=1,nx
+ dy=yy(2)-yy(1)
+ ff2(n,1)=(ff(n,2)-ff(n,1))/dy
+ dy=yy(my)-yy(my-1)
+ ff2(n,my)=(ff(n,my)-ff(n,my-1))/dy
+ do 43 m=2,my-1
+ ff2(n,m)=polderiv(yy(m-1),yy(m),yy(m+1),ff(n,m-1),ff(n,m),
+ xff(n,m+1))
+ 43 continue
+ 44 continue
+
+ do 46 m=1,my
+ dx=xx(2)-xx(1)
+ ff12(1,m)=(ff2(2,m)-ff2(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff12(nx,m)=(ff2(nx,m)-ff2(nx-1,m))/dx
+ do 45 n=2,nx-1
+ ff12(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff2(n-1,m),ff2(n,m),
+ xff2(n+1,m))
+ 45 continue
+ 46 continue
+
+ do 53 n=1,nx-1
+ do 52 m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(n,m)
+ yy0(2)=ff(n+1,m)
+ yy0(3)=ff(n+1,m+1)
+ yy0(4)=ff(n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do 47 k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ 47 continue
+
+ do 49 l=1,16
+ xxd=0.
+ do 48 k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ 48 continue
+ cl(l)=xxd
+ 49 continue
+ l=0
+ do 51 k=1,4
+ do 50 j=1,4
+ l=l+1
+ cc(n,m,k,j)=cl(l)
+ 50 continue
+ 51 continue
+ 52 continue
+ 53 continue
+ return
+ end
+
+ subroutine jeppe2(x,y,nx,my,xx,yy,cc,z)
+ implicit real*8(a-h,o-z)
+ dimension xx(nx),yy(my),cc(nx,my,4,4)
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.
+ do 1 l=4,1,-1
+ z=t*z+((cc(n,m,l,4)*u+cc(n,m,l,3))*u
+ . +cc(n,m,l,2))*u+cc(n,m,l,1)
+ 1 continue
+ return
+ end
+
+
+
+
+ real*8 function polderiv(x1,x2,x3,y1,y2,y3)
+ implicit real*8(a-h,o-z)
+ polderiv=(x3*x3*(y1-y2)-2.0*x2*(x3*(y1-y2)+x1*
+ .(y2-y3))+x2*x2*(y1-y3)+x1*x1*(y2-y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+
+ subroutine mrst2002(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2002 updated NLO and C
+C NNLO parton distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0211080 C
+C C
+C There are 2 pdf sets corresponding to mode = 1, 2 C
+C C
+C Mode=1 gives the NLO set with alpha_s(M_Z,NLO) = 0.1197 C
+C This set reads a grid whose first number is 0.00949 C
+C C
+C Mode=2 gives the NNLO set with alpha_s(M_Z,NNLO) = 0.1154 C
+C This set reads a grid whose first number is 0.00685 C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst2(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2002nlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst2(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2002nnlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst2004(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2004 'physical gluon' NLO C
+C and NNLO parton distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0410230 C
+C C
+C There are 2 pdf sets corresponding to mode = 1, 2 C
+C C
+C Mode=1 gives the NLO set with Lambda(4) = 347 MeV C
+C This set reads a grid called mrst2004nlo.dat C
+C whose first number is 0.00910 C
+C C
+C Mode=2 gives the NNLO set with Lambda(4) = 251 MeV C
+C This set reads a grid called mrst2004nnlo.dat C
+C whose first number is 0.00673 C
+C C
+C These fits use a new, physically motivated parametrisation C
+C for the gluon at the starting scale, Q_0^2 = 1 GeV^2 C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst12(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst22(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst12(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2004nlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe12(nx,nq,xxl,qql,f1,cc1)
+ call jeppe12(nx,nq,xxl,qql,f2,cc2)
+ call jeppe12(nx,nq,xxl,qql,f3,cc3)
+ call jeppe12(nx,nq,xxl,qql,f4,cc4)
+ call jeppe12(nx,nq,xxl,qql,f6,cc6)
+ call jeppe12(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe12(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe12(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe22(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe22(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst22(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2004nnlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe12(nx,nq,xxl,qql,f1,cc1)
+ call jeppe12(nx,nq,xxl,qql,f2,cc2)
+ call jeppe12(nx,nq,xxl,qql,f3,cc3)
+ call jeppe12(nx,nq,xxl,qql,f4,cc4)
+ call jeppe12(nx,nq,xxl,qql,f6,cc6)
+ call jeppe12(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe12(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe12(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe22(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe22(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine jeppe12(nx,my,xx,yy,ff,cc)
+ implicit real*8(a-h,o-z)
+ parameter(nnx=49,mmy=37)
+ dimension xx(nx),yy(my),ff(nnx,mmy),ff1(nnx,mmy),ff2(nnx,mmy),
+ xff12(nnx,mmy),yy0(4),yy1(4),yy2(4),yy12(4),z(16),wt(16,16),
+ xcl(16),cc(nx,my,4,4),iwt(16,16)
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ x -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ x 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ x 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ x 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ x 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ x -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ x 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ x -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ x 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ x -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ x 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+
+ do 42 m=1,my
+ dx=xx(2)-xx(1)
+ ff1(1,m)=(ff(2,m)-ff(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff1(nx,m)=(ff(nx,m)-ff(nx-1,m))/dx
+ do 41 n=2,nx-1
+ ff1(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff(n-1,m),ff(n,m),
+ xff(n+1,m))
+ 41 continue
+ 42 continue
+
+ do 44 n=1,nx
+ dy=yy(2)-yy(1)
+ ff2(n,1)=(ff(n,2)-ff(n,1))/dy
+ dy=yy(my)-yy(my-1)
+ ff2(n,my)=(ff(n,my)-ff(n,my-1))/dy
+ do 43 m=2,my-1
+ ff2(n,m)=polderiv(yy(m-1),yy(m),yy(m+1),ff(n,m-1),ff(n,m),
+ xff(n,m+1))
+ 43 continue
+ 44 continue
+
+ do 46 m=1,my
+ dx=xx(2)-xx(1)
+ ff12(1,m)=(ff2(2,m)-ff2(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff12(nx,m)=(ff2(nx,m)-ff2(nx-1,m))/dx
+ do 45 n=2,nx-1
+ ff12(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff2(n-1,m),ff2(n,m),
+ xff2(n+1,m))
+ 45 continue
+ 46 continue
+
+ do 53 n=1,nx-1
+ do 52 m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(n,m)
+ yy0(2)=ff(n+1,m)
+ yy0(3)=ff(n+1,m+1)
+ yy0(4)=ff(n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do 47 k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ 47 continue
+
+ do 49 l=1,16
+ xxd=0.
+ do 48 k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ 48 continue
+ cl(l)=xxd
+ 49 continue
+ l=0
+ do 51 k=1,4
+ do 50 j=1,4
+ l=l+1
+ cc(n,m,k,j)=cl(l)
+ 50 continue
+ 51 continue
+ 52 continue
+ 53 continue
+ return
+ end
+
+ subroutine jeppe22(x,y,nx,my,xx,yy,cc,z)
+ implicit real*8(a-h,o-z)
+ dimension xx(nx),yy(my),cc(nx,my,4,4)
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.
+ do 1 l=4,1,-1
+ z=t*z+((cc(n,m,l,4)*u+cc(n,m,l,3))*u
+ . +cc(n,m,l,2))*u+cc(n,m,l,1)
+ 1 continue
+ return
+ end
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 4
+C June 21, 1996
+C
+C By: H.L. Lai, J. Huston, S. Kuhlmann, F. Olness, J. Owens, D. Soper
+C W.K. Tung, H. Weerts
+C Ref: MSUHEP-60426, CTEQ-604, e-Print Archive: hep-ph/9606399
+C
+C This package contains 9 sets of CTEQ4 PDF's. Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz) Q0(GeV) Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ4M Standard MSbar scheme 0.116 1.6 cteq4m.tbl
+C 2 CTEQ4D Standard DIS scheme 0.116 1.6 cteq4d.tbl
+C 3 CTEQ4L Leading Order 0.116 1.6 cteq4l.tbl
+C 4 CTEQ4A1 Alpha_s series 0.110 1.6 cteq4a1.tbl
+C 5 CTEQ4A2 Alpha_s series 0.113 1.6 cteq4a2.tbl
+C 6 CTEQ4A3 same as CTEQ4M 0.116 1.6 cteq4m.tbl
+C 7 CTEQ4A4 Alpha_s series 0.119 1.6 cteq4a4.tbl
+C 8 CTEQ4A5 Alpha_s series 0.122 1.6 cteq4a5.tbl
+C 9 CTEQ4HJ High Jet 0.116 1.6 cteq4hj.tbl
+C 10 CTEQ4LQ Low Q0 0.114 0.7 cteq4lq.tbl
+C ---------------------------------------------------------------------------
+C
+C The available applied range is 10^-5 < x < 1 and 1.6 < Q < 10,000 (GeV)
+C except CTEQ4LQ for which Q starts at a lower value of 0.7 GeV.
+C The Table_Files are assumed to be in the working directory.
+C
+C The function Ctq4Fn (Iset, Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar)
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ4 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Hung-Liang Lai(Lai_H@pa.msu.edu) or Wu-Ki Tung(Tung@pa.msu.edu).
+C
+C===========================================================================
+
+ Function Ctq4Fn (Iset, Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Character Flnm(10)*11
+ Common
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / QCDtable / Alambda, Nfl, Iorder
+ Data (Flnm(I), I=1,10)
+ > / 'cteq4m.tbl ', 'cteq4d.tbl ', 'cteq4l.tbl '
+ > , 'cteq4a1.tbl', 'cteq4a2.tbl', 'cteq4m.tbl ', 'cteq4a4.tbl'
+ > , 'cteq4a5.tbl', 'cteq4hj.tbl', 'cteq4lq.tbl' /
+ Data Isetold, Isetmin, Isetmax / -987, 1, 10 /
+ save Flnm, Isetold, Isetmin, Isetmax
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ If (Iset.lt.Isetmin .or. Iset.gt.Isetmax) Then
+ Print *, 'Invalid Iset number in Ctq4Fn :', Iset
+ Stop
+ Endif
+ IU= NextUt()
+ Open(IU, File='Pdfdata/'//Flnm(Iset), Status='OLD', Err=100)
+ Call ReadTbl (IU)
+ Close (IU)
+ Isetold=Iset
+ Endif
+
+ If (X .lt. 0D0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq4Fn: ', X
+ Stop
+ Endif
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq4Fn: ', Q
+ Stop
+ Endif
+ If (Iparton .lt. -NfMx .or. Iparton .gt. NfMx) Then
+ Print *, 'Iparton out of range in Ctq4Fn: ', Iparton
+ Stop
+ Endif
+
+ Ctq4Fn = PartonX (Iparton, X, Q)
+ if(Ctq4Fn.lt.0.D0) Ctq4Fn = 0.D0
+
+ Return
+
+ 100 Print *, ' Data file ', Flnm(Iset), ' cannot be opened '
+ >//'in Ctq4Fn!!'
+ Stop
+C ********************
+ End
+
+ Function NextUt()
+C Returns an unallocated FORTRAN i/o unit.
+ Logical EX
+C
+ Do 10 N = 50, 300
+ INQUIRE (UNIT=N, OPENED=EX)
+ If (.NOT. EX) then
+ NextUt = N
+ Return
+ Endif
+ 10 Continue
+ Stop ' There is no available I/O unit. '
+C *************************
+ End
+C
+
+
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 5.0
+C Nov. 1, 1999
+C
+C Ref: "GLOBAL QCD ANALYSIS OF PARTON STRUCTURE OF THE NUCLEON:
+C CTEQ5 PPARTON DISTRIBUTIONS"
+C
+C hep-ph/9903282; to be published in Eur. Phys. J. C 1999.
+C
+C These PDF's use quadratic interpolation of attached tables. A parametrized
+C version of the same PDF's without external tables is under construction.
+C They will become available later.
+C
+C This package contains 7 sets of CTEQ5 PDF's; plus two updated ones.
+C The undated CTEQ5M1 and CTEQHQ1 use an improved evolution code.
+C Both the original and the updated ones fit current data with comparable
+C accuracy. The CTEQHQ1 set also involve a different choice of scale,
+C hence differs from CTEQHQ slightly more. It is preferred over CTEQ5HQ.
+
+C Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz) Lam4 Lam5 Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ5M Standard MSbar scheme 0.118 326 226 cteq5m.tbl
+C 2 CTEQ5D Standard DIS scheme 0.118 326 226 cteq5d.tbl
+C 3 CTEQ5L Leading Order 0.127 192 146 cteq5l.tbl
+C 4 CTEQ5HJ Large-x gluon enhanced 0.118 326 226 cteq5hj.tbl
+C 5 CTEQ5HQ Heavy Quark 0.118 326 226 cteq5hq.tbl
+C 6 CTEQ5F3 Nf=3 FixedFlavorNumber 0.106 (Lam3=395) cteq5f3.tbl
+C 7 CTEQ5F4 Nf=4 FixedFlavorNumber 0.112 309 XXX cteq5f4.tbl
+C --------------------------------------------------------
+C 8 CTEQ5M1 Improved CTEQ5M 0.118 326 226 cteq5m1.tbl
+C 9 CTEQ5HQ1 Improved CTEQ5HQ 0.118 326 226 ctq5hq1.tbl
+C ---------------------------------------------------------------------------
+C
+C The available applied range is 10^-5 << x << 1 and 1.0 << Q << 10,000 (GeV).
+C Lam5 (Lam4, Lam3) represents Lambda value (in MeV) for 5 (4,3) flavors.
+C The matching alpha_s between 4 and 5 flavors takes place at Q=4.5 GeV,
+C which is defined as the bottom quark mass, whenever it can be applied.
+C
+C The Table_Files are assumed to be in the working directory.
+C
+C Before using the PDF, it is necessary to do the initialization by
+C Call SetCtq5(Iset)
+C where Iset is the desired PDF specified in the above table.
+C
+C The function Ctq5Pdf (Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar),
+C whereas CTEQ5F3 has, by definition, only 3 flavors and gluon;
+C CTEQ5F4 has only 4 flavors and gluon.
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+C
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ5 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Hung-Liang Lai(lai@phys.nthu.edu.tw) or Wu-Ki Tung(Tung@pa.msu.edu).
+C
+C===========================================================================
+
+ Function Ctq5Pdf (Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Logical Warn
+ Common
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / QCDtable / Alambda, Nfl, Iorder
+
+ Data Warn /.true./
+ save Warn
+
+ If (X .lt. 0D0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq5Pdf: ', X
+ Stop
+ Endif
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq5Pdf: ', Q
+ Stop
+ Endif
+ If ((Iparton .lt. -NfMx .or. Iparton .gt. NfMx)) Then
+ If (Warn) Then
+C put a warning for calling extra flavor.
+ Warn = .false.
+ Print *, 'Warning: Iparton out of range in Ctq5Pdf: '
+ > , Iparton
+ Endif
+ Ctq5Pdf = 0D0
+ Return
+ Endif
+
+ Ctq5Pdf = PartonX (Iparton, X, Q)
+ if(Ctq5Pdf.lt.0.D0) Ctq5Pdf = 0.D0
+
+ Return
+
+C ********************
+ End
+
+ FUNCTION PartonX (IPRTN, X, Q)
+C
+C Given the parton distribution function in the array Upd in
+C COMMON / CtqPar_5_1 / , this routine fetches u(fl, x, q) at any value of
+C x and q using Mth-order polynomial interpolation for x and Ln(Q/Lambda).
+C
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C
+ PARAMETER (MXX = 105, MXQ = 25, MXF = 6)
+ PARAMETER (MXPQX = (MXF *2 +2) * MXQ * MXX)
+ PARAMETER (M= 2, M1 = M + 1)
+C
+ Logical First
+ Common
+ > / CtqPar_5_1 / Al, XV(0:MXX), QL(0:MXQ), UPD(MXPQX)
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / XQrange / Qini, Qmax, Xmin
+C
+ Dimension Fq(M1), Df(M1)
+
+ Data First /.true./
+ save First
+C Work with Log (Q)
+ QG = LOG (Q/AL)
+
+C Find lower end of interval containing X
+ JL = -1
+ JU = Nx+1
+ 11 If (JU-JL .GT. 1) Then
+ JM = (JU+JL) / 2
+ If (X .GT. XV(JM)) Then
+ JL = JM
+ Else
+ JU = JM
+ Endif
+ Goto 11
+ Endif
+
+ Jx = JL - (M-1)/2
+ If (X .lt. Xmin .and. First ) Then
+ First = .false.
+ Print '(A, 2(1pE12.4))',
+ > ' WARNING: X << Xmin, extrapolation used; X, Xmin =', X, Xmin
+ If (Jx .LT. 0) Jx = 0
+ Elseif (Jx .GT. Nx-M) Then
+ Jx = Nx - M
+ Endif
+C Find the interval where Q lies
+ JL = -1
+ JU = NT+1
+ 12 If (JU-JL .GT. 1) Then
+ JM = (JU+JL) / 2
+ If (QG .GT. QL(JM)) Then
+ JL = JM
+ Else
+ JU = JM
+ Endif
+ Goto 12
+ Endif
+
+ Jq = JL - (M-1)/2
+ If (Jq .LT. 0) Then
+ Jq = 0
+ If (Q .lt. Qini) Print '(A, 2(1pE12.4))',
+ > ' WARNING: Q << Qini, extrapolation used; Q, Qini =', Q, Qini
+ Elseif (Jq .GT. Nt-M) Then
+ Jq = Nt - M
+ If (Q .gt. Qmax) Print '(A, 2(1pE12.4))',
+ > ' WARNING: Q > Qmax, extrapolation used; Q, Qmax =', Q, Qmax
+ Endif
+
+ If (Iprtn .GE. 3) Then
+ Ip = - Iprtn
+ Else
+ Ip = Iprtn
+ EndIf
+C Find the off-set in the linear array Upd
+ JFL = Ip + NfMx
+ J0 = (JFL * (NT+1) + Jq) * (NX+1) + Jx
+C
+C Now interpolate in x for M1 Q's
+ Do 21 Iq = 1, M1
+ J1 = J0 + (Nx+1)*(Iq-1) + 1
+ Call Polint (XV(Jx), Upd(J1), M1, X, Fq(Iq), Df(Iq))
+ 21 Continue
+C Finish off by interpolating in Q
+ Call Polint (QL(Jq), Fq(1), M1, QG, Ftmp, Ddf)
+
+ PartonX = Ftmp
+C
+ RETURN
+C ****************************
+ END
+
+ Subroutine SetCtq5 (Iset)
+ Implicit Double Precision (A-H,O-Z)
+ Parameter (Isetmax=9)
+ Character Flnm(Isetmax)*12, Tablefile*40
+ Data (Flnm(I), I=1,Isetmax)
+ > / 'cteq5m.tbl', 'cteq5d.tbl', 'cteq5l.tbl', 'cteq5hj.tbl'
+ > , 'cteq5hq.tbl', 'cteq5f3.tbl', 'cteq5f4.tbl'
+ > , 'cteq5m1.tbl', 'ctq5hq1.tbl' /
+ Data Tablefile / 'test.tbl' /
+ Data Isetold, Isetmin, Isettest / -987, 1, 911 /
+ save
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ IU= NextUn()
+ If (Iset .eq. Isettest) then
+ Print* ,'Opening ', Tablefile
+ 21 Open(IU, File=Tablefile, Status='OLD', Err=101)
+ GoTo 22
+ 101 Print*, Tablefile, ' cannot be opened '
+ Print*, 'Please input the .tbl file:'
+ Read (*,'(A)') Tablefile
+ Goto 21
+ 22 Continue
+ ElseIf (Iset.lt.Isetmin .or. Iset.gt.Isetmax) Then
+ Print *, 'Invalid Iset number in SetCtq5 :', Iset
+ Stop
+ Else
+ Tablefile=Flnm(Iset)
+ Open(IU, File='Pdfdata/'//Tablefile, Status='OLD', Err=100)
+ Endif
+ Call ReadTbl (IU)
+ Close (IU)
+ Isetold=Iset
+ Endif
+ Return
+
+ 100 Print *, ' Data file ', Tablefile, ' cannot be opened '
+ >//'in SetCtq5!!'
+ Stop
+C ********************
+ End
+
+ Subroutine ReadTbl (Nu)
+ Implicit Double Precision (A-H,O-Z)
+ Character Line*80
+ PARAMETER (MXX = 105, MXQ = 25, MXF = 6)
+ PARAMETER (MXPQX = (MXF *2 +2) * MXQ * MXX)
+ Common
+ > / CtqPar_5_1 / Al, XV(0:MXX), QL(0:MXQ), UPD(MXPQX)
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / XQrange / Qini, Qmax, Xmin
+ > / QCDtable / Alambda, Nfl, Iorder
+ > / Masstbl / Amass(6)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, '(A)') Line
+ Read (Nu, *) Dr, Fl, Al, (Amass(I),I=1,6)
+ Iorder = Nint(Dr)
+ Nfl = Nint(Fl)
+ Alambda = Al
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) NX, NT, NfMx
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) QINI, QMAX, (QL(I), I =0, NT)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) XMIN, (XV(I), I =0, NX)
+
+ Do 11 Iq = 0, NT
+ QL(Iq) = Log (QL(Iq) /Al)
+ 11 Continue
+C
+C Since quark = anti-quark for nfl>2 at this stage,
+C we Read out only the non-redundent data points
+C No of flavors = NfMx (sea) + 1 (gluon) + 2 (valence)
+
+ Nblk = (NX+1) * (NT+1)
+ Npts = Nblk * (NfMx+3)
+ Read (Nu, '(A)') Line
+ Read (Nu, *, IOSTAT=IRET) (UPD(I), I=1,Npts)
+
+ Return
+C ****************************
+ End
+
+! Function NextUn()
+!C Returns an unallocated FORTRAN i/o unit.
+! Logical EX
+!C
+! Do 10 N = 10, 300
+! INQUIRE (UNIT=N, OPENED=EX)
+! If (.NOT. EX) then
+! NextUn = N
+! Return
+! Endif
+! 10 Continue
+! Stop ' There is no available I/O unit. '
+!C *************************
+! End
+!C
+
+ SUBROUTINE POLINT (XA,YA,N,X,Y,DY)
+
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C Adapted from "Numerical Recipes"
+ PARAMETER (NMAX=10)
+ DIMENSION XA(N),YA(N),C(NMAX),D(NMAX)
+ NS=1
+ DIF=ABS(X-XA(1))
+ DO 11 I=1,N
+ DIFT=ABS(X-XA(I))
+ IF (DIFT.LT.DIF) THEN
+ NS=I
+ DIF=DIFT
+ ENDIF
+ C(I)=YA(I)
+ D(I)=YA(I)
+11 CONTINUE
+ Y=YA(NS)
+ NS=NS-1
+ DO 13 M=1,N-1
+ DO 12 I=1,N-M
+ HO=XA(I)-X
+ HP=XA(I+M)-X
+ W=C(I+1)-D(I)
+ DEN=HO-HP
+c IF(DEN.EQ.0.)PAUSE
+ if(DEN.EQ.0.) then
+ write(*,*)'DEN=0 in pdf.f'
+ stop
+ endif
+ DEN=W/DEN
+ D(I)=HP*DEN
+ C(I)=HO*DEN
+12 CONTINUE
+ IF (2*NS.LT.N-M)THEN
+ DY=C(NS+1)
+ ELSE
+ DY=D(NS)
+ NS=NS-1
+ ENDIF
+ Y=Y+DY
+13 CONTINUE
+ RETURN
+ END
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 6
+C January 24, 2002, v6.0
+C April 10, 2002, v6.1
+C
+C Ref: "New Generation of Parton Distributions with
+C Uncertainties from Global QCD Analysis"
+C By: J. Pumplin, D.R. Stump, J.Huston, H.L. Lai, P. Nadolsky, W.K. Tung
+C hep-ph/0201195
+C
+C This package contains 3 standard sets of CTEQ6 PDF's and 40 up/down sets
+C with respect to CTEQ6M PDF's. Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz)**Lam4 Lam5 Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ6M Standard MSbar scheme 0.118 326 226 cteq6m.tbl
+C 2 CTEQ6D Standard DIS scheme 0.118 326 226 cteq6d.tbl
+C 3 CTEQ6L Leading Order 0.118** 326** 226 cteq6l.tbl
+C 4 CTEQ6L1 Leading Order 0.130 215 165 cteq6l1.tbl
+C ------------------------------
+C 1xx CTEQ6M1xx +/- w.r.t. CTEQ6M 0.118 326 226 cteq6m1xx.tbl
+C (where xx=01--40)
+C ---------------------------------------------------------------------------
+C ** ALL fits are obtained by using the same coupling strength
+C \alpha_s(Mz)=0.118 and the NLO running \alpha_s formula, except CTEQ6L1
+C which uses the LO running \alpha_s and its value determined from the fit.
+C For the LO fits, the evolution of the PDF and the hard cross sections are
+C calculated at LO. More detailed discussions are given in hep-ph/0201195.
+C
+C The table grids are generated for 10^-6 < x < 1 and 1.3 < Q < 10,000 (GeV).
+C PDF values outside of the above range are returned using extrapolation.
+C Lam5 (Lam4) represents Lambda value (in MeV) for 5 (4) flavors.
+C The matching alpha_s between 4 and 5 flavors takes place at Q=4.5 GeV,
+C which is defined as the bottom quark mass, whenever it can be applied.
+C
+C The Table_Files are assumed to be in the working directory.
+C
+C Before using the PDF, it is necessary to do the initialization by
+C Call SetCtq6(Iset)
+C where Iset is the desired PDF specified in the above table.
+C
+C The function Ctq6Pdf (Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar),
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+C
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ6 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Pumplin@pa.msu.edu or Tung@pa.msu.edu.
+C
+C===========================================================================
+!
+! Function Ctq6Pdf (Iparton, X, Q)
+! Implicit Double Precision (A-H,O-Z)
+! Logical Warn
+! Common
+! > / CtqPar_6_2 / Nx, Nt, NfMx
+! > / QCDtable / Alambda, Nfl, Iorder
+!
+! Data Warn /.true./
+! save Warn
+!
+! If (X .lt. 0D0 .or. X .gt. 1D0) Then
+! Print *, 'X out of range in Ctq6Pdf: ', X
+! Stop
+! Endif
+! If (Q .lt. Alambda) Then
+! Print *, 'Q out of range in Ctq6Pdf: ', Q
+! Stop
+! Endif
+! If ((Iparton .lt. -NfMx .or. Iparton .gt. NfMx)) Then
+! If (Warn) Then
+!C put a warning for calling extra flavor.
+! Warn = .false.
+! Print *, 'Warning: Iparton out of range in Ctq6Pdf: '
+! > , Iparton
+! Endif
+! Ctq6Pdf = 0D0
+! Return
+! Endif
+!
+! Ctq6Pdf = PartonX6 (Iparton, X, Q)
+! if(Ctq6Pdf.lt.0D0) Ctq6Pdf = 0D0
+!
+! Return
+!
+!C ********************
+! End
+!
+! Subroutine SetCtq6 (Iset)
+! Implicit Double Precision (A-H,O-Z)
+! Parameter (Isetmax0=4)
+! Character Flnm(Isetmax0)*6, nn*3, Tablefile*40
+! Data (Flnm(I), I=1,Isetmax0)
+! > / 'cteq6m', 'cteq6d', 'cteq6l', 'cteq6l'/
+! Data Isetold, Isetmin0, Isetmin1, Isetmax1 /-987,1,101,140/
+! save
+!
+!C If data file not initialized, do so.
+! If(Iset.ne.Isetold) then
+! IU= NextUn6()
+! If (Iset.ge.Isetmin0 .and. Iset.le.3) Then
+! Tablefile=Flnm(Iset)//'.tbl'
+! Elseif (Iset.eq.Isetmax0) Then
+! Tablefile=Flnm(Iset)//'1.tbl'
+! Elseif (Iset.ge.Isetmin1 .and. Iset.le.Isetmax1) Then
+! write(nn,'(I3)') Iset
+! Tablefile=Flnm(1)//nn//'.tbl'
+! Else
+! Print *, 'Invalid Iset number in SetCtq6 :', Iset
+! Stop
+! Endif
+! Open(IU, File='Pdfdata/'//Tablefile, Status='OLD', Err=100)
+! 21 Call ReadTbl6 (IU)
+! Close (IU)
+! Isetold=Iset
+! Endif
+! Return
+!
+! 100 Print *, ' Data file ', Tablefile, ' cannot be opened '
+! >//'in SetCtq6!!'
+! Stop
+!C ********************
+! End
+!
+! Subroutine ReadTbl6 (Nu)
+! Implicit Double Precision (A-H,O-Z)
+! Character Line*80
+! PARAMETER (MXX = 96, MXQ = 20, MXF = 5)
+! PARAMETER (MXPQX = (MXF + 3) * MXQ * MXX)
+! Common
+! > / CtqPar_6_1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+! > / CtqPar_6_2 / Nx, Nt, NfMx
+! > / XQrange / Qini, Qmax, Xmin
+! > / QCDtable / Alambda, Nfl, Iorder
+! > / Masstbl / Amass(6)
+!
+! Read (Nu, '(A)') Line
+! Read (Nu, '(A)') Line
+! Read (Nu, *) Dr, Fl, Al, (Amass(I),I=1,6)
+! Iorder = Nint(Dr)
+! Nfl = Nint(Fl)
+! Alambda = Al
+!
+! Read (Nu, '(A)') Line
+! Read (Nu, *) NX, NT, NfMx
+!
+! Read (Nu, '(A)') Line
+! Read (Nu, *) QINI, QMAX, (TV(I), I =0, NT)
+!
+! Read (Nu, '(A)') Line
+! Read (Nu, *) XMIN, (XV(I), I =0, NX)
+!
+! Do 11 Iq = 0, NT
+! TV(Iq) = Log(Log (TV(Iq) /Al))
+! 11 Continue
+!C
+!C Since quark = anti-quark for nfl>2 at this stage,
+!C we Read out only the non-redundent data points
+!C No of flavors = NfMx (sea) + 1 (gluon) + 2 (valence)
+!
+! Nblk = (NX+1) * (NT+1)
+! Npts = Nblk * (NfMx+3)
+! Read (Nu, '(A)') Line
+! Read (Nu, *, IOSTAT=IRET) (UPD(I), I=1,Npts)
+!
+! Return
+!C ****************************
+! End
+!
+! Function NextUn6()
+!C Returns an unallocated FORTRAN i/o unit.
+! Logical EX
+!C
+! Do 10 N = 10, 300
+! INQUIRE (UNIT=N, OPENED=EX)
+! If (.NOT. EX) then
+! NextUn6 = N
+! Return
+! Endif
+! 10 Continue
+! Stop ' There is no available I/O unit. '
+!C *************************
+! End
+!C
+!
+! SUBROUTINE POLINT6 (XA,YA,N,X,Y,DY)
+!
+! IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+!C Adapted from "Numerical Recipes"
+! PARAMETER (NMAX=10)
+! DIMENSION XA(N),YA(N),C(NMAX),D(NMAX)
+! NS=1
+! DIF=ABS(X-XA(1))
+! DO 11 I=1,N
+! DIFT=ABS(X-XA(I))
+! IF (DIFT.LT.DIF) THEN
+! NS=I
+! DIF=DIFT
+! ENDIF
+! C(I)=YA(I)
+! D(I)=YA(I)
+!11 CONTINUE
+! Y=YA(NS)
+! NS=NS-1
+! DO 13 M=1,N-1
+! DO 12 I=1,N-M
+! HO=XA(I)-X
+! HP=XA(I+M)-X
+! W=C(I+1)-D(I)
+! DEN=HO-HP
+! IF(DEN.EQ.0.)PAUSE
+! DEN=W/DEN
+! D(I)=HP*DEN
+! C(I)=HO*DEN
+!12 CONTINUE
+! IF (2*NS.LT.N-M)THEN
+! DY=C(NS+1)
+! ELSE
+! DY=D(NS)
+! NS=NS-1
+! ENDIF
+! Y=Y+DY
+!13 CONTINUE
+! RETURN
+! END
+!
+! Function PartonX6 (IPRTN, XX, QQ)
+!
+!c Given the parton distribution function in the array U in
+!c COMMON / PEVLDT / , this routine interpolates to find
+!c the parton distribution at an arbitray point in x and q.
+!c
+! Implicit Double Precision (A-H,O-Z)
+!
+! Parameter (MXX = 96, MXQ = 20, MXF = 5)
+! Parameter (MXQX= MXQ * MXX, MXPQX = MXQX * (MXF+3))
+!
+! Common
+! > / CtqPar_6_1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+! > / CtqPar_6_2 / Nx, Nt, NfMx
+! > / XQrange / Qini, Qmax, Xmin
+!
+! Dimension fvec(4), fij(4)
+! Dimension xvpow(0:mxx)
+! Data OneP / 1.00001d0 /
+! Data xpow / 0.3d0 / !**** choice of interpolation variable
+! Data nqvec / 4 /
+! Data ientry / 0 /
+! Save ientry,xvpow
+!
+!c store the powers used for interpolation on first call...
+! if(ientry .eq. 0) then
+! ientry = 1
+!
+! xvpow(0) = 0D0
+! do i = 1, nx
+! xvpow(i) = xv(i)**xpow
+! enddo
+! endif
+!
+! X = XX
+! Q = QQ
+! tt = dlog(dlog(Q/Al))
+!
+!c ------------- find lower end of interval containing x, i.e.,
+!c get jx such that xv(jx) .le. x .le. xv(jx+1)...
+! JLx = -1
+! JU = Nx+1
+! 11 If (JU-JLx .GT. 1) Then
+! JM = (JU+JLx) / 2
+! If (X .Ge. XV(JM)) Then
+! JLx = JM
+! Else
+! JU = JM
+! Endif
+! Goto 11
+! Endif
+!C Ix 0 1 2 Jx JLx Nx-2 Nx
+!C |---|---|---|...|---|-x-|---|...|---|---|
+!C x 0 Xmin x 1
+!C
+! If (JLx .LE. -1) Then
+! Print '(A,1pE12.4)', 'Severe error: x <= 0 in PartonX6! x = ', x
+! Stop
+! ElseIf (JLx .Eq. 0) Then
+! Jx = 0
+! Elseif (JLx .LE. Nx-2) Then
+!
+!C For interrior points, keep x in the middle, as shown above
+! Jx = JLx - 1
+! Elseif (JLx.Eq.Nx-1 .or. x.LT.OneP) Then
+!
+!C We tolerate a slight over-shoot of one (OneP=1.00001),
+!C perhaps due to roundoff or whatever, but not more than that.
+!C Keep at least 4 points >= Jx
+! Jx = JLx - 2
+! Else
+! Print '(A,1pE12.4)', 'Severe error: x > 1 in PartonX6! x = ', x
+! Stop
+! Endif
+!C ---------- Note: JLx uniquely identifies the x-bin; Jx does not.
+!
+!C This is the variable to be interpolated in
+! ss = x**xpow
+!
+! If (JLx.Ge.2 .and. JLx.Le.Nx-2) Then
+!
+!c initiation work for "interior bins": store the lattice points in s...
+! svec1 = xvpow(jx)
+! svec2 = xvpow(jx+1)
+! svec3 = xvpow(jx+2)
+! svec4 = xvpow(jx+3)
+!
+! s12 = svec1 - svec2
+! s13 = svec1 - svec3
+! s23 = svec2 - svec3
+! s24 = svec2 - svec4
+! s34 = svec3 - svec4
+!
+! sy2 = ss - svec2
+! sy3 = ss - svec3
+!
+!c constants needed for interpolating in s at fixed t lattice points...
+! const1 = s13/s23
+! const2 = s12/s23
+! const3 = s34/s23
+! const4 = s24/s23
+! s1213 = s12 + s13
+! s2434 = s24 + s34
+! sdet = s12*s34 - s1213*s2434
+! tmp = sy2*sy3/sdet
+! const5 = (s34*sy2-s2434*sy3)*tmp/s12
+! const6 = (s1213*sy2-s12*sy3)*tmp/s34
+!
+! EndIf
+!
+!c --------------Now find lower end of interval containing Q, i.e.,
+!c get jq such that qv(jq) .le. q .le. qv(jq+1)...
+! JLq = -1
+! JU = NT+1
+! 12 If (JU-JLq .GT. 1) Then
+! JM = (JU+JLq) / 2
+! If (tt .GE. TV(JM)) Then
+! JLq = JM
+! Else
+! JU = JM
+! Endif
+! Goto 12
+! Endif
+!
+! If (JLq .LE. 0) Then
+! Jq = 0
+! Elseif (JLq .LE. Nt-2) Then
+!C keep q in the middle, as shown above
+! Jq = JLq - 1
+! Else
+!C JLq .GE. Nt-1 case: Keep at least 4 points >= Jq.
+! Jq = Nt - 3
+!
+! Endif
+!C This is the interpolation variable in Q
+!
+! If (JLq.GE.1 .and. JLq.LE.Nt-2) Then
+!c store the lattice points in t...
+! tvec1 = Tv(jq)
+! tvec2 = Tv(jq+1)
+! tvec3 = Tv(jq+2)
+! tvec4 = Tv(jq+3)
+!
+! t12 = tvec1 - tvec2
+! t13 = tvec1 - tvec3
+! t23 = tvec2 - tvec3
+! t24 = tvec2 - tvec4
+! t34 = tvec3 - tvec4
+!
+! ty2 = tt - tvec2
+! ty3 = tt - tvec3
+!
+! tmp1 = t12 + t13
+! tmp2 = t24 + t34
+!
+! tdet = t12*t34 - tmp1*tmp2
+!
+! EndIf
+!
+!
+!c get the pdf function values at the lattice points...
+!
+! If (Iprtn .GE. 3) Then
+! Ip = - Iprtn
+! Else
+! Ip = Iprtn
+! EndIf
+! jtmp = ((Ip + NfMx)*(NT+1)+(jq-1))*(NX+1)+jx+1
+!
+! Do it = 1, nqvec
+!
+! J1 = jtmp + it*(NX+1)
+!
+! If (Jx .Eq. 0) Then
+!C For the first 4 x points, interpolate x^2*f(x,Q)
+!C This applies to the two lowest bins JLx = 0, 1
+!C We can not put the JLx.eq.1 bin into the "interrior" section
+!C (as we do for q), since Upd(J1) is undefined.
+! fij(1) = 0
+! fij(2) = Upd(J1+1) * XV(1)**2
+! fij(3) = Upd(J1+2) * XV(2)**2
+! fij(4) = Upd(J1+3) * XV(3)**2
+!C
+!C Use Polint6 which allows x to be anywhere w.r.t. the grid
+!
+! Call Polint6 (XVpow(0), Fij(1), 4, ss, Fx, Dfx)
+!
+! If (x .GT. 0D0) Fvec(it) = Fx / x**2
+!C Pdf is undefined for x.eq.0
+! ElseIf (JLx .Eq. Nx-1) Then
+!C This is the highest x bin:
+!
+! Call Polint6 (XVpow(Nx-3), Upd(J1), 4, ss, Fx, Dfx)
+!
+! Fvec(it) = Fx
+!
+! Else
+!C for all interior points, use Jon's in-line function
+!C This applied to (JLx.Ge.2 .and. JLx.Le.Nx-2)
+! sf2 = Upd(J1+1)
+! sf3 = Upd(J1+2)
+!
+! g1 = sf2*const1 - sf3*const2
+! g4 = -sf2*const3 + sf3*const4
+!
+! Fvec(it) = (const5*(Upd(J1)-g1)
+! & + const6*(Upd(J1+3)-g4)
+! & + sf2*sy3 - sf3*sy2) / s23
+!
+! Endif
+!
+! enddo
+!C We now have the four values Fvec(1:4)
+!c interpolate in t...
+!
+! If (JLq .LE. 0) Then
+!C 1st Q-bin, as well as extrapolation to lower Q
+! Call Polint6 (TV(0), Fvec(1), 4, tt, ff, Dfq)
+!
+! ElseIf (JLq .GE. Nt-1) Then
+!C Last Q-bin, as well as extrapolation to higher Q
+! Call Polint6 (TV(Nt-3), Fvec(1), 4, tt, ff, Dfq)
+! Else
+!C Interrior bins : (JLq.GE.1 .and. JLq.LE.Nt-2)
+!C which include JLq.Eq.1 and JLq.Eq.Nt-2, since Upd is defined for
+!C the full range QV(0:Nt) (in contrast to XV)
+! tf2 = fvec(2)
+! tf3 = fvec(3)
+!
+! g1 = ( tf2*t13 - tf3*t12) / t23
+! g4 = (-tf2*t34 + tf3*t24) / t23
+!
+! h00 = ((t34*ty2-tmp2*ty3)*(fvec(1)-g1)/t12
+! & + (tmp1*ty2-t12*ty3)*(fvec(4)-g4)/t34)
+!
+! ff = (h00*ty2*ty3/tdet + tf2*ty3 - tf3*ty2) / t23
+! EndIf
+!
+! PartonX6 = ff
+!
+! Return
+!C ********************
+! End
+!
+
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: version 6.0-6.6
+C April 10, 2002, v6.01
+C February 23, 2003, v6.1
+C August 6, 2003, v6.11
+C December 12, 2004, v6.12
+C December 4, 2006, v6.5 (CTEQ6.5M series added)
+C March 23, 2007, v6.51 (CTEQ6.5S/C series added)
+C April 24, 2007, v6.52 (minor improvement)
+C March 30, 2008, v6.6
+C
+C Ref[1]: "New Generation of Parton Distributions with Uncertainties from Global QCD Analysis"
+C By: J. Pumplin, D.R. Stump, J.Huston, H.L. Lai, P. Nadolsky, W.K. Tung
+C JHEP 0207:012(2002), hep-ph/0201195
+C
+C Ref[2]: "Inclusive Jet Production, Parton Distributions, and the Search for New Physics"
+C By : D. Stump, J. Huston, J. Pumplin, W.K. Tung, H.L. Lai, S. Kuhlmann, J. Owens
+C JHEP 0310:046(2003), hep-ph/0303013
+C
+C Ref[3]: "Neutrino dimuon Production and Strangeness Asymmetry of the Nucleon"
+C By: F. Olness, J. Pumplin, S. Stump, J. Huston, P. Nadolsky, H.L. Lai, S. Kretzer, J.F. Owens, W.K. Tung
+C Eur. Phys. J. C40:145(2005), hep-ph/0312323
+C
+C Ref[4]: "CTEQ6 Parton Distributions with Heavy Quark Mass Effects"
+C By: S. Kretzer, H.L. Lai, F. Olness, W.K. Tung
+C Phys. Rev. D69:114005(2004), hep-ph/0307022
+C
+C Ref[5]: "Heavy Quark Mass Effects in Deep Inelastic Scattering and Global QCD Analysis"
+C By : W.K. Tung, H.L. Lai, A. Belyaev, J. Pumplin, D. Stump, C.-P. Yuan
+C JHEP 0702:053(2007), hep-ph/0611254
+C
+C Ref[6]: "The Strange Parton Distribution of Nucleon: Global Analysis and Applications"
+C By : H.L. Lai, P. Nadolsky, J. Pumplin, D. Stump, W.K. Tung, C.-P. Yuan
+C JHEP 0704:089,2007, hep-ph/0702268
+C
+C Ref[7]: "The Charm Content of the Nucleon"
+C By : J. Pumplin, H.L. Lai, W.K. Tung
+C Phys.Rev.D75:054029,2007, hep-ph/0701220
+
+C Ref[8]: "Implications of CTEQ global analysis for collider observables"
+C By : P. M. Nadolsky, H.-L. Lai, Q.-H. Cao, J. Huston, J. Pumplin, D. R. Stump, W.-K. Tung, C.-P. Yuan
+C arXiv:0802.0007 [hep-ph], submitted to Phys. Rev. D.
+C
+
+C This package contains
+C (1) 4 standard sets of CTEQ6 PDF's (CTEQ6M, CTEQ6D, CTEQ6L, CTEQ6L1) ;
+C (2) 40 up/down sets (with respect to CTEQ6M) for uncertainty studies from Ref[1];
+C (3) updated version of the above: CTEQ6.1M and its 40 up/down eigenvector sets from Ref[2].
+C (4) 5 special sets for strangeness study from Ref[3].
+C (5) 1 special set for heavy quark study from Ref[4].
+C (6) CTEQ6.5M and its 40 up/down eigenvector sets from Ref[5].
+C (7) 8 sets of PDFs resulting from the strangeness study, Ref[6].
+C (8) 7 sets of PDFs resulting from the charm study, Ref[7].
+C (9) CTEQ6.6M and its 44 up/down eigenvector sets from Ref[8].
+C (10) Fits with nonperturbative charm from the study in Ref[8].
+C (11) Fits with alternative values of the strong coupling strength from the study in Ref[8].
+
+
+C Details about the calling convention are:
+C --------------------------------------------------------------------------------
+C Iset PDF-set Description Alpha_s(Mz)**Lam4 Lam5 Table_File Ref
+C ================================================================================
+C Standard, "best-fit", sets:
+C --------------------------
+C 1 CTEQ6M Standard MSbar scheme 0.118 326 226 cteq6m.tbl [1]
+C 2 CTEQ6D Standard DIS scheme 0.118 326 226 cteq6d.tbl [1]
+C 3 CTEQ6L Leading Order 0.118** 326** 226 cteq6l.tbl [1]
+C 4 CTEQ6L1 Leading Order 0.130** 215** 165 cteq6l1.tbl [1]
+C 200 CTEQ6.1M: updated CTEQ6M (see below, under "uncertainty" section) [2]
+C 400 CTEQ6.6M; the 2008 set (see below, under "uncertainty" section) [8]
+C
+C --------------------------
+C Special sets with nonperturbative charm at Q_0=1.3 GeV from Ref [8]
+C --------------------------
+C 450 CTEQ6.6C1 BHPS model for IC 0.118 326 226 ctq66.c1.pds
+C 451 CTEQ6.6C2 BHPS model for IC 0.118 326 226 ctq66.c2.pds
+C 452 CTEQ6.6C3 Sea-like model 0.118 326 226 ctq66.c3.pds
+C 453 CTEQ6.6C4 Sea-like model 0.118 326 226 ctq66.c4.pds
+C Momentum Fraction carried by c+cbar=2c at Q0=1.3 GeV:
+C Iset: 451 452 453 454
+C Mom. frac: 0.01 0.035 0.01 0.035
+
+
+C --------------------------
+C Special CTEQ6.6 sets with alternative values of strong coupling strength [8]
+C --------------------------
+C 460 CTEQ6.6A1 0.125 328 ctq66.a1.pds
+C 461 CTEQ6.6A2 0.122 281 ctq66.a2.pds
+C 462 CTEQ6.6A3 0.114 179 ctq66.a3.pds
+C 463 CTEQ6.6A4 0.112 159 ctq66.a4.pds
+
+C --------------------------
+C Special sets for strangeness study: Ref.[3]
+C --------------------------
+C 11 CTEQ6A Class A 0.118 326 226 cteq6sa.pds
+C 12 CTEQ6B Class B 0.118 326 226 cteq6sb.pds
+C 13 CTEQ6C Class C 0.118 326 226 cteq6sc.pds
+C 14 CTEQ6B+ Large [S-] 0.118 326 226 cteq6sb+.pds
+C 15 CTEQ6B- Negative [S-] 0.118 326 226 cteq6sb-.pds
+C --------------------------
+C Special set for Heavy Quark study: Ref.[4]
+C --------------------------
+C 21 CTEQ6HQ 0.118 326 226 cteq6hq.pds
+C --------------------------
+C Released sets for strangeness study: Ref.[6]
+C -------------------------- s=sbr
+C 30 CTEQ6.5S0 Best-fit 0.118 326 226 ctq65.s+0.pds
+C 31 CTEQ6.5S1 Low s+ 0.118 326 226 ctq65.s+1.pds
+C 32 CTEQ6.5S2 High s+ 0.118 326 226 ctq65.s+2.pds
+C 33 CTEQ6.5S3 Alt Low s+ 0.118 326 226 ctq65.s+3.pds
+C 34 CTEQ6.5S4 Alt High s+ 0.118 326 226 ctq65.s+4.pds
+C -------------------------- s!=sbr
+C strangeness asymmetry <x>_s-
+C 35 CTEQ6.5S-0 Best-fit 0.0014 0.118 326 226 ctq65.s-0.pds
+C 36 CTEQ6.5S-1 Low -0.0010 0.118 326 226 ctq65.s-1.pds
+C 37 CTEQ6.5S-2 High 0.0050 0.118 326 226 ctq65.s-2.pds
+C --------------------------
+C Released sets for charm study: Ref.[7]
+C --------------------------
+C 40 CTEQ6.5C0 no intrinsic charm 0.118 326 226 ctq65.c0.pds
+C 41 CTEQ6.5C1 BHPS model for IC 0.118 326 226 ctq65.c1.pds
+C 42 CTEQ6.5C2 BHPS model for IC 0.118 326 226 ctq65.c2.pds
+C 43 CTEQ6.5C3 Meson cloud model 0.118 326 226 ctq65.c3.pds
+C 44 CTEQ6.5C4 Meson cloud model 0.118 326 226 ctq65.c4.pds
+C 45 CTEQ6.5C5 Sea-like model 0.118 326 226 ctq65.c5.pds
+C 46 CTEQ6.5C6 Sea-like model 0.118 326 226 ctq65.c6.pds
+C
+C Momentum Fraction carried by c,cbar at Q0=1.3 GeV:
+C Iset:charm ,cbar | Iset:charm ,cbar | Iset:charm ,cbar
+C 41: 0.002857,0.002857 | 43: 0.003755,0.004817 | 45: 0.005714,0.005714
+C 42: 0.010000,0.010000 | 44: 0.007259,0.009312 | 46: 0.012285,0.012285
+C
+C ============================================================================
+C For uncertainty calculations using eigenvectors of the Hessian:
+C ---------------------------------------------------------------
+C central + 40 up/down sets along 20 eigenvector directions
+C -----------------------------
+C Original version, Ref[1]: central fit: CTEQ6M (=CTEQ6M.00)
+C -----------------------
+C 1xx CTEQ6M.xx +/- sets 0.118 326 226 cteq6m1xx.tbl
+C where xx = 01-40: 01/02 corresponds to +/- for the 1st eigenvector, ... etc.
+C e.g. 100 is CTEQ6M.00 (=CTEQ6M),
+C 101/102 are CTEQ6M.01/02, +/- sets of 1st eigenvector, ... etc.
+C ====================================================================
+C Updated version, Ref[2]: central fit: CTEQ6.1M (=CTEQ61.00)
+C -----------------------
+C 2xx CTEQ61.xx +/- sets 0.118 326 226 ctq61.xx.tbl
+C where xx = 01-40: 01/02 corresponds to +/- for the 1st eigenvector, ... etc.
+C e.g. 200 is CTEQ61.00 (=CTEQ6.1M),
+C 201/202 are CTEQ61.01/02, +/- sets of 1st eigenvector, ... etc.
+C ====================================================================
+C Version with mass effects, Ref[5]: central fit: CTEQ6.5M (=CTEQ65.00)
+C -----------------------
+C 3xx CTEQ65.xx +/- sets 0.118 326 226 ctq65.xx.pds
+C where xx = 01-40: 01/02 corresponds to +/- for the 1st eigenvector, ... etc.
+C e.g. 300 is CTEQ65.00 (=CTEQ6.5M),
+C 301/302 are CTEQ65.01/02, +/- sets of 1st eigenvector, ... etc.
+C ====================================================================
+C Version with mass effects and free strangeness, Ref[8]:
+C central fit: CTEQ6.6M (=CTEQ66.00)
+C -----------------------
+C 4xx CTEQ66.xx +/- sets 0.118 326 226 ctq66.xx.pds
+C where xx = 01-44: 01/02 corresponds to +/- for the 1st eigenvector, ... etc.
+C e.g. 400 is CTEQ66.00 (=CTEQ6.6M),
+C 401/402 are CTEQ66.01/02, +/- sets of 1st eigenvector, ... etc.
+
+C ===========================================================================
+C ** ALL fits are obtained by using the same coupling strength
+C \alpha_s(Mz)=0.118 and the NLO running \alpha_s formula, except CTEQ6L1
+C which uses the LO running \alpha_s and its value determined from the fit.
+C For the LO fits, the evolution of the PDF and the hard cross sections are
+C calculated at LO. More detailed discussions are given in the references.
+C
+C The table grids are generated for
+C * 10^-8 < x < 1 and 1.3 < Q < 10^5 (GeV) for CTEQ6.6 series;
+C * 10^-7 < x < 1 and 1.3 < Q < 10^5 (GeV) for CTEQ6.5S/C series;
+C * 10^-6 < x < 1 and 1.3 < Q < 10,000 (GeV) for CTEQ6, CTEQ6.1 series;
+C
+C PDF values outside of the above range are returned using extrapolation.
+C Lam5 (Lam4) represents Lambda value (in MeV) for 5 (4) flavors.
+C The matching alpha_s between 4 and 5 flavors takes place at Q=4.5 GeV,
+C which is defined as the bottom quark mass, whenever it can be applied.
+C
+C The Table_Files are assumed to be in the working directory.
+C
+C Before using the PDF, it is necessary to do the initialization by
+C Call SetCtq6(Iset)
+C where Iset is the desired PDF specified in the above table.
+C
+C The function Ctq6Pdf (Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar),
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+C
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ6 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C nadolsky@pa.msu.edu, pumplin@pa.msu.edu or tung@pa.msu.edu.
+C
+C===========================================================================
+
+ Function Ctq6Pdf (Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Logical Warn
+ Common
+ > / CtqPar2 / Nx, Nt, NfMx, MxVal
+ > / QCDtable / Alambda, Nfl, Iorder
+
+ Data Warn /.true./
+ save Warn
+
+ If (X .lt. 0d0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq6Pdf: ', X
+ Ctq6Pdf = 0D0
+ Return
+ Endif
+
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq6Pdf: ', Q
+ Stop
+ Endif
+
+ If ((Iparton .lt. -NfMx .or. Iparton .gt. NfMx)) Then
+ If (Warn) Then
+C put a warning for calling extra flavor.
+ Warn = .false.
+ Print *, 'Warning: Iparton out of range in Ctq6Pdf! '
+ Print *, 'Iparton, MxFlvN0: ', Iparton, NfMx
+ Endif
+ Ctq6Pdf = 0D0
+ Return
+ Endif
+
+ Ctq6Pdf = PartonX6 (Iparton, X, Q)
+ if (Ctq6Pdf.lt.0.D0) Ctq6Pdf = 0.D0
+
+ Return
+
+C ********************
+ End
+
+ Subroutine SetCtq6 (Iset)
+ Implicit Double Precision (A-H,O-Z)
+ Parameter (Isetmax0=8)
+!CM Character Flnm(Isetmax0)*6, nn*3, Tablefile*40
+ Character Flnm(Isetmax0)*6, nn*3,nset2*2, Tablefile*40
+ Logical fmtpds
+ Data (Flnm(I), I=1,Isetmax0)
+ > / 'cteq6m', 'cteq6d', 'cteq6l', 'cteq6l','ctq61.','cteq6s'
+ > ,'ctq65.', 'ctq66.' /
+ Data Isetold, Isetmin0, Isetmin1, Isetmax1 /-987,1,100,140/
+ Data Isetmin2,Isetmax2 /200,240/
+ Data Isetmin3,Isetmax3 /300,340/
+ Data Isetmin4,Isetmax4 /400,444/
+ Data IsetminS,IsetmaxS /11,15/
+ Data IsetmnSp07,IsetmxSp07 /30,34/
+ Data IsetmnSm07,IsetmxSm07 /35,37/
+ Data IsetmnC07,IsetmxC07 /40,46/
+ Data IsetmnC08,IsetmxC08 /450,453/
+ Data IsetmnAS08,IsetmxAS08 /460,463/
+
+ Data IsetHQ /21/
+ Common /Setchange/ Isetch
+!CM
+ character *50 prefix,prefix1
+ integer nset
+ common/prefix/nset,prefix
+!CM
+ save
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ fmtpds=.true.
+
+ If (Iset.ge.Isetmin0 .and. Iset.le.3) Then
+C Iset = 1,2,3 for 6m, 6d, 6l
+ fmtpds=.false.
+ Tablefile=Flnm(Iset)//'.tbl'
+ Elseif (Iset.eq.4) Then
+C 4 (2nd LO fit)
+ fmtpds=.false.
+ Tablefile=Flnm(Iset)//'1.tbl'
+ Elseif (Iset.ge.Isetmin1 .and. Iset.le.Isetmax1) Then
+C 101 - 140
+ fmtpds=.false.
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(1)//nn//'.tbl'
+ Elseif (Iset.ge.Isetmin2 .and. Iset.le.Isetmax2) Then
+C 200 - 240
+ fmtpds=.false.
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(5)//nn(2:3)//'.tbl'
+ Elseif (Iset.ge.IsetminS .and. Iset.le.IsetmaxS) Then
+C 11 - 15
+ If(Iset.eq.11) then
+ Tablefile=Flnm(6)//'a.pds'
+ Elseif(Iset.eq.12) then
+ Tablefile=Flnm(6)//'b.pds'
+ Elseif(Iset.eq.13) then
+ Tablefile=Flnm(6)//'c.pds'
+ Elseif(Iset.eq.14) then
+ Tablefile=Flnm(6)//'b+.pds'
+ Elseif(Iset.eq.15) then
+ Tablefile=Flnm(6)//'b-.pds'
+ Endif
+ Elseif (Iset.eq.IsetHQ) Then
+C 21
+ TableFile='cteq6hq.pds'
+ Elseif (Iset.ge.IsetmnSp07 .and. Iset.le.IsetmxSp07) Then
+C (Cteq6.5S) 30 - 34
+ write(nn,'(I2)') Iset
+ Tablefile=Flnm(7)//'s+'//nn(2:2)//'.pds'
+ Elseif (Iset.ge.IsetmnSm07 .and. Iset.le.IsetmxSm07) Then
+C (Cteq6.5S) 35 - 37
+ Is = Iset - 5
+ write(nn,'(I2)') Is
+ Tablefile=Flnm(7)//'s-'//nn(2:2)//'.pds'
+ Elseif (Iset.ge.IsetmnC07 .and. Iset.le.IsetmxC07) Then
+C (Cteq6.5C) 40 - 46
+ write(nn,'(I2)') Iset
+ Tablefile=Flnm(7)//'c'//nn(2:2)//'.pds'
+ Elseif (Iset.ge.Isetmin3 .and. Iset.le.Isetmax3) Then
+C (Cteq6.5) 300 - 340
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(7)//nn(2:3)//'.pds'
+ Elseif (Iset.ge.Isetmin4 .and. Iset.le.Isetmax4) Then
+C (Cteq6.6) 400 - 444
+!CM write(nn,'(I3)') Iset
+ write(nset2,'(I2.2)') nset
+!CM Tablefile=Flnm(8)//nn(2:3)//'.pds'
+ Tablefile=Flnm(8)//nset2//'.pds'
+ Elseif (Iset.ge.IsetmnC08 .and. Iset.le.IsetmxC08) Then
+C (Cteq6.6C) 450 - 453
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(8)//'c'//nn(3:3)//'.pds'
+ Elseif (Iset.ge.IsetmnAS08 .and. Iset.le.IsetmxAS08) Then
+C (Cteq6.6AS) 460 - 463
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(8)//'a'//nn(3:3)//'.pds'
+ Else
+ Print *, 'Invalid Iset number in SetCtq6 :', Iset
+ Stop
+ Endif
+ IU= NextUn()
+ Open(IU, File='Pdfdata/'//Tablefile, Status='OLD', Err=100)
+ 21 Call Readpds (IU,fmtpds)
+ Close (IU)
+ Isetold=Iset
+ Isetch=1
+ Endif
+ Return
+
+ 100 Print *, ' Data file ', Tablefile, ' cannot be opened '
+ > //'in SetCtq6!!'
+ Stop
+C ********************
+ End
+
+ Subroutine Readpds (Nu,fmtpds)
+ Implicit Double Precision (A-H,O-Z)
+ Character Line*80
+ Logical fmtpds
+ PARAMETER (MXX = 201, MXQ = 25, MXF = 6, MaxVal=4)
+ PARAMETER (MXPQX = (MXF+1+MaxVal) * MXQ * MXX)
+ Common
+ > / CtqPar1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+ > / CtqPar2 / Nx, Nt, NfMx, MxVal
+ > / XQrange / Qini, Qmax, Xmin
+ > / QCDtable / Alambda, Nfl, Iorder
+ > / Masstbl / Amass(6)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, '(A)') Line
+ Read (Nu, *) Dr, Fl, Al, (Amass(I),I=1,6)
+ Iorder = Nint(Dr)
+ Nfl = Nint(Fl)
+ Alambda = Al
+
+ Read (Nu, '(A)') Line
+ If(fmtpds) then
+C This is the .pds (WKT) format
+ Read (Nu, *) N0, N0, N0, NfMx, MxVal, N0
+ If(MxVal.gt.MaxVal) MxVal=3 !old .pds format (read in KF, not MxVal)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) NX, NT, N0, NG, N0
+
+ Read (Nu, '(A)') (Line,I=1,NG+2)
+ Read (Nu, *) QINI, QMAX, (aa,TV(I), I =0, NT)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) XMIN, aa, (XV(I), I =1, NX)
+ XV(0)=0D0
+ Else
+C This is the old .tbl (HLL) format
+ MxVal=2
+ Read (Nu, *) NX, NT, NfMx
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) QINI, QMAX, (TV(I), I =0, NT)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) XMIN, (XV(I), I =0, NX)
+
+ Do 11 Iq = 0, NT
+ TV(Iq) = Log(Log (TV(Iq) /Al))
+ 11 Continue
+ Endif
+
+ Nblk = (NX+1) * (NT+1)
+ Npts = Nblk * (NfMx+1+MxVal)
+ Read (Nu, '(A)') Line
+ Read (Nu, *, IOSTAT=IRET) (UPD(I), I=1,Npts)
+
+ Return
+C ****************************
+ End
+
+ Function PartonX6 (IPRTN, XX, QQ)
+
+c Given the parton distribution function in the array U in
+c COMMON / PEVLDT / , this routine interpolates to find
+c the parton distribution at an arbitray point in x and q.
+c
+ Implicit Double Precision (A-H,O-Z)
+
+ PARAMETER (MXX = 201, MXQ = 25, MXF = 6, MaxVal=4)
+ PARAMETER (MXPQX = (MXF+1+MaxVal) * MXQ * MXX)
+
+ Common
+ > / CtqPar1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+ > / CtqPar2 / Nx, Nt, NfMx, MxVal
+ > / XQrange / Qini, Qmax, Xmin
+ > /Setchange/ Isetch
+
+ Dimension fvec(4), fij(4)
+ Dimension xvpow(0:mxx)
+ Data OneP / 1.00001 /
+ Data xpow / 0.3d0 / !**** choice of interpolation variable
+ Data nqvec / 4 /
+ Data ientry / 0 /
+ Data X, Q, JX, JQ /-1D0, -1D0, 0, 0/
+ Save xvpow
+ Save X, Q, JX, JQ, JLX, JLQ
+ Save ss, const1, const2, const3, const4, const5, const6
+ Save sy2, sy3, s23, tt, t12, t13, t23, t24, t34, ty2, ty3
+ Save tmp1, tmp2, tdet
+
+ If((XX.eq.X).and.(QQ.eq.Q)) goto 99
+c store the powers used for interpolation on first call...
+ if(Isetch .eq. 1) then
+ Isetch = 0
+
+ xvpow(0) = 0D0
+ do i = 1, nx
+ xvpow(i) = xv(i)**xpow
+ enddo
+ endif
+
+ X = XX
+ Q = QQ
+ tt = log(log(Q/Al))
+
+c ------------- find lower end of interval containing x, i.e.,
+c get jx such that xv(jx) .le. x .le. xv(jx+1)...
+ JLx = -1
+ JU = Nx+1
+ 11 If (JU-JLx .GT. 1) Then
+ JM = (JU+JLx) / 2
+ If (X .Ge. XV(JM)) Then
+ JLx = JM
+ Else
+ JU = JM
+ Endif
+ Goto 11
+ Endif
+C Ix 0 1 2 Jx JLx Nx-2 Nx
+C |---|---|---|...|---|-x-|---|...|---|---|
+C x 0 Xmin x 1
+C
+ If (JLx .LE. -1) Then
+ Print '(A,1pE12.4)', 'Severe error: x <= 0 in PartonX6! x = ', x
+ Stop
+ ElseIf (JLx .Eq. 0) Then
+ Jx = 0
+ Elseif (JLx .LE. Nx-2) Then
+
+C For interrior points, keep x in the middle, as shown above
+ Jx = JLx - 1
+ Elseif (JLx.Eq.Nx-1 .or. x.LT.OneP) Then
+
+C We tolerate a slight over-shoot of one (OneP=1.00001),
+C perhaps due to roundoff or whatever, but not more than that.
+C Keep at least 4 points >= Jx
+ Jx = JLx - 2
+ Else
+ Print '(A,1pE12.4)', 'Severe error: x > 1 in PartonX6! x = ', x
+ Stop
+ Endif
+C ---------- Note: JLx uniquely identifies the x-bin; Jx does not.
+
+C This is the variable to be interpolated in
+ ss = x**xpow
+
+ If (JLx.Ge.2 .and. JLx.Le.Nx-2) Then
+
+c initiation work for "interior bins": store the lattice points in s...
+ svec1 = xvpow(jx)
+ svec2 = xvpow(jx+1)
+ svec3 = xvpow(jx+2)
+ svec4 = xvpow(jx+3)
+
+ s12 = svec1 - svec2
+ s13 = svec1 - svec3
+ s23 = svec2 - svec3
+ s24 = svec2 - svec4
+ s34 = svec3 - svec4
+
+ sy2 = ss - svec2
+ sy3 = ss - svec3
+
+c constants needed for interpolating in s at fixed t lattice points...
+ const1 = s13/s23
+ const2 = s12/s23
+ const3 = s34/s23
+ const4 = s24/s23
+ s1213 = s12 + s13
+ s2434 = s24 + s34
+ sdet = s12*s34 - s1213*s2434
+ tmp = sy2*sy3/sdet
+ const5 = (s34*sy2-s2434*sy3)*tmp/s12
+ const6 = (s1213*sy2-s12*sy3)*tmp/s34
+
+ EndIf
+
+c --------------Now find lower end of interval containing Q, i.e.,
+c get jq such that qv(jq) .le. q .le. qv(jq+1)...
+ JLq = -1
+ JU = NT+1
+ 12 If (JU-JLq .GT. 1) Then
+ JM = (JU+JLq) / 2
+ If (tt .GE. TV(JM)) Then
+ JLq = JM
+ Else
+ JU = JM
+ Endif
+ Goto 12
+ Endif
+
+ If (JLq .LE. 0) Then
+ Jq = 0
+ Elseif (JLq .LE. Nt-2) Then
+C keep q in the middle, as shown above
+ Jq = JLq - 1
+ Else
+C JLq .GE. Nt-1 case: Keep at least 4 points >= Jq.
+ Jq = Nt - 3
+
+ Endif
+C This is the interpolation variable in Q
+
+ If (JLq.GE.1 .and. JLq.LE.Nt-2) Then
+c store the lattice points in t...
+ tvec1 = Tv(jq)
+ tvec2 = Tv(jq+1)
+ tvec3 = Tv(jq+2)
+ tvec4 = Tv(jq+3)
+
+ t12 = tvec1 - tvec2
+ t13 = tvec1 - tvec3
+ t23 = tvec2 - tvec3
+ t24 = tvec2 - tvec4
+ t34 = tvec3 - tvec4
+
+ ty2 = tt - tvec2
+ ty3 = tt - tvec3
+
+ tmp1 = t12 + t13
+ tmp2 = t24 + t34
+
+ tdet = t12*t34 - tmp1*tmp2
+
+ EndIf
+
+
+c get the pdf function values at the lattice points...
+
+ 99 If (Iprtn .Gt. MxVal) Then
+ Ip = - Iprtn
+ Else
+ Ip = Iprtn
+ EndIf
+ jtmp = ((Ip + NfMx)*(NT+1)+(jq-1))*(NX+1)+jx+1
+
+ Do it = 1, nqvec
+
+ J1 = jtmp + it*(NX+1)
+
+ If (Jx .Eq. 0) Then
+C For the first 4 x points, interpolate x^2*f(x,Q)
+C This applies to the two lowest bins JLx = 0, 1
+C We can not put the JLx.eq.1 bin into the "interrior" section
+C (as we do for q), since Upd(J1) is undefined.
+ fij(1) = 0
+ fij(2) = Upd(J1+1) * XV(1)**2
+ fij(3) = Upd(J1+2) * XV(2)**2
+ fij(4) = Upd(J1+3) * XV(3)**2
+C
+C Use Polint which allows x to be anywhere w.r.t. the grid
+
+ Call Polint4F (XVpow(0), Fij(1), ss, Fx)
+
+ If (x .GT. 0D0) Fvec(it) = Fx / x**2
+C Pdf is undefined for x.eq.0
+ ElseIf (JLx .Eq. Nx-1) Then
+C This is the highest x bin:
+
+ Call Polint4F (XVpow(Nx-3), Upd(J1), ss, Fx)
+
+ Fvec(it) = Fx
+
+ Else
+C for all interior points, use Jon's in-line function
+C This applied to (JLx.Ge.2 .and. JLx.Le.Nx-2)
+ sf2 = Upd(J1+1)
+ sf3 = Upd(J1+2)
+
+ g1 = sf2*const1 - sf3*const2
+ g4 = -sf2*const3 + sf3*const4
+
+ Fvec(it) = (const5*(Upd(J1)-g1)
+ & + const6*(Upd(J1+3)-g4)
+ & + sf2*sy3 - sf3*sy2) / s23
+
+ Endif
+
+ enddo
+C We now have the four values Fvec(1:4)
+c interpolate in t...
+
+ If (JLq .LE. 0) Then
+C 1st Q-bin, as well as extrapolation to lower Q
+ Call Polint4F (TV(0), Fvec(1), tt, ff)
+
+ ElseIf (JLq .GE. Nt-1) Then
+C Last Q-bin, as well as extrapolation to higher Q
+ Call Polint4F (TV(Nt-3), Fvec(1), tt, ff)
+ Else
+C Interrior bins : (JLq.GE.1 .and. JLq.LE.Nt-2)
+C which include JLq.Eq.1 and JLq.Eq.Nt-2, since Upd is defined for
+C the full range QV(0:Nt) (in contrast to XV)
+ tf2 = fvec(2)
+ tf3 = fvec(3)
+
+ g1 = ( tf2*t13 - tf3*t12) / t23
+ g4 = (-tf2*t34 + tf3*t24) / t23
+
+ h00 = ((t34*ty2-tmp2*ty3)*(fvec(1)-g1)/t12
+ & + (tmp1*ty2-t12*ty3)*(fvec(4)-g4)/t34)
+
+ ff = (h00*ty2*ty3/tdet + tf2*ty3 - tf3*ty2) / t23
+ EndIf
+
+ PartonX6 = ff
+
+ Return
+C ********************
+ End
+
+ SUBROUTINE POLINT4F (XA,YA,X,Y)
+
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C The POLINT4 routine is based on the POLINT routine from "Numerical Recipes",
+C but assuming N=4, and ignoring the error estimation.
+C suggested by Z. Sullivan.
+ DIMENSION XA(*),YA(*)
+
+ H1=XA(1)-X
+ H2=XA(2)-X
+ H3=XA(3)-X
+ H4=XA(4)-X
+
+ W=YA(2)-YA(1)
+ DEN=W/(H1-H2)
+ D1=H2*DEN
+ C1=H1*DEN
+
+ W=YA(3)-YA(2)
+ DEN=W/(H2-H3)
+ D2=H3*DEN
+ C2=H2*DEN
+
+ W=YA(4)-YA(3)
+ DEN=W/(H3-H4)
+ D3=H4*DEN
+ C3=H3*DEN
+
+ W=C2-D1
+ DEN=W/(H1-H3)
+ CD1=H3*DEN
+ CC1=H1*DEN
+
+ W=C3-D2
+ DEN=W/(H2-H4)
+ CD2=H4*DEN
+ CC2=H2*DEN
+
+ W=CC2-CD1
+ DEN=W/(H1-H4)
+ DD1=H4*DEN
+ DC1=H1*DEN
+
+ If((H3+H4).lt.0D0) Then
+ Y=YA(4)+D3+CD2+DD1
+ Elseif((H2+H3).lt.0D0) Then
+ Y=YA(3)+D2+CD1+DC1
+ Elseif((H1+H2).lt.0D0) Then
+ Y=YA(2)+C2+CD1+DC1
+ ELSE
+ Y=YA(1)+C1+CC1+DC1
+ ENDIF
+
+ RETURN
+C *************************
+ END
+
+ Function NextUn()
+C Returns an unallocated FORTRAN i/o unit.
+ Logical EX
+C
+ Do 10 N = 10, 300
+ INQUIRE (UNIT=N, OPENED=EX)
+ If (.NOT. EX) then
+ NextUn = N
+ Return
+ Endif
+ 10 Continue
+ Stop ' There is no available I/O unit. '
+C *************************
+ End
+C
+
+
+
+C----------------------------------------------------------------------
+C-- Fortran interpolation code for MSTW PDFs, building on existing
+C-- MRST Fortran code and Jeppe Andersen's C++ code.
+C-- Three user interfaces:
+C-- call GetAllPDFs(prefix,ih,x,q,upv,dnv,usea,dsea,
+C-- str,sbar,chm,cbar,bot,bbar,glu,phot)
+C-- call GetAllPDFsAlt(prefix,ih,x,q,xpdf,xphoton)
+C-- xf = GetOnePDF(prefix,ih,x,q,f)
+C-- See enclosed example.f for usage.
+C-- Comments to Graeme Watt <watt(at)hep.ucl.ac.uk>.
+C----------------------------------------------------------------------
+
+C----------------------------------------------------------------------
+
+C-- Traditional MRST-like interface: return all flavours.
+C-- (Note the additional "sbar", "cbar", "bbar" and "phot"
+C-- compared to previous MRST releases.)
+ subroutine GetAllPDFs(prefix,ih,x,q,
+ & upv,dnv,usea,dsea,str,sbar,chm,cbar,bot,bbar,glu,phot)
+ implicit none
+ integer ih
+ double precision x,q,upv,dnv,usea,dsea,str,sbar,chm,cbar,
+ & bot,bbar,glu,phot,GetOnePDF,up,dn,sv,cv,bv
+ character*(*) prefix
+
+C-- Quarks.
+ dn = GetOnePDF(prefix,ih,x,q,1)
+ up = GetOnePDF(prefix,ih,x,q,2)
+ str = GetOnePDF(prefix,ih,x,q,3)
+ chm = GetOnePDF(prefix,ih,x,q,4)
+ bot = GetOnePDF(prefix,ih,x,q,5)
+
+C-- Valence quarks.
+ dnv = GetOnePDF(prefix,ih,x,q,7)
+ upv = GetOnePDF(prefix,ih,x,q,8)
+ sv = GetOnePDF(prefix,ih,x,q,9)
+ cv = GetOnePDF(prefix,ih,x,q,10)
+ bv = GetOnePDF(prefix,ih,x,q,11)
+
+C-- Antiquarks = quarks - valence quarks.
+ dsea = dn - dnv
+ usea = up - upv
+ sbar = str - sv
+ cbar = chm - cv
+ bbar = bot - bv
+
+C-- Gluon.
+ glu = GetOnePDF(prefix,ih,x,q,0)
+
+C-- Photon (= zero unless considering QED contributions).
+ phot = GetOnePDF(prefix,ih,x,q,13)
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+C-- Alternative LHAPDF-like interface: return PDFs in an array.
+ subroutine GetAllPDFsAlt(prefix,ih,x,q,xpdf,xphoton)
+ implicit none
+ integer ih,f
+ double precision x,q,xpdf(-6:6),xphoton,xvalence,GetOnePDF
+ character*(*) prefix
+
+ do f = 1, 6
+ xpdf(f) = GetOnePDF(prefix,ih,x,q,f) ! quarks
+ xvalence = GetOnePDF(prefix,ih,x,q,f+6) ! valence quarks
+ xpdf(-f) = xpdf(f) - xvalence ! antiquarks
+ end do
+ xpdf(0) = GetOnePDF(prefix,ih,x,q,0) ! gluon
+ xphoton = GetOnePDF(prefix,ih,x,q,13) ! photon
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+C-- Get only one parton flavour 'f', using PDG notation:
+C-- f = -6, -5, -4, -3, -2, -1,0,1,2,3,4,5,6
+C-- = tbar,bbar,cbar,sbar,ubar,dbar,g,d,u,s,c,b,t.
+C-- Can also get valence quarks directly:
+C-- f = 7, 8, 9,10,11,12.
+C-- = dv,uv,sv,cv,bv,tv.
+C-- Photon: f = 13.
+ double precision function GetOnePDF(prefix,ih,x,q,f)
+ implicit none
+ logical warn,fatal
+ parameter(warn=.false.,fatal=.true.)
+C-- Set warn=.true. to turn on warnings when extrapolating.
+C-- Set fatal=.false. to return zero instead of terminating when
+C-- invalid input values of x and q are used.
+ integer ih,f,nhess,nx,nq,np,nqc0,nqb0,nqc,nqb,n,m,ip,io,
+ & alphaSorder,nExtraFlavours
+ double precision x,q,xmin,xmax,qsqmin,qsqmax,mc2,mb2,eps,
+ & dummy,qsq,xlog,qsqlog,res,res1,anom,ExtrapolatePDF,
+ & InterpolatePDF,distance,tolerance,
+ & mCharm,mBottom,alphaSQ0,alphaSMZ
+ parameter(nx=64,nq=48,np=12,nqc0=4,nqb0=14,
+ & nqc=nq-nqc0,nqb=nq-nqb0)
+ parameter(xmin=1d-6,xmax=1d0,qsqmin=1d0,qsqmax=1d9,eps=1d-6)
+ parameter(nhess=2*20)
+ character set*2,prefix*(*),filename*60,oldprefix(0:nhess)*50
+ character dummyChar,dummyWord*50
+ double precision ff(np,nx,nq)
+ double precision qq(nq),xx(nx),cc(np,0:nhess,nx,nq,4,4)
+ double precision xxl(nx),qql(nq)
+C-- Store distance along each eigenvector, tolerance,
+C-- heavy quark masses and alphaS parameters in COMMON block.
+ common/mstwCommon/distance,tolerance,
+ & mCharm,mBottom,alphaSQ0,alphaSMZ,alphaSorder
+ save
+ data xx/1d-6,2d-6,4d-6,6d-6,8d-6,
+ & 1d-5,2d-5,4d-5,6d-5,8d-5,
+ & 1d-4,2d-4,4d-4,6d-4,8d-4,
+ & 1d-3,2d-3,4d-3,6d-3,8d-3,
+ & 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ & .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ & .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ & .5d0,.525d0,.55d0,.575d0,.6d0,.625d0,.65d0,.675d0,
+ & .7d0,.725d0,.75d0,.775d0,.8d0,.825d0,.85d0,.875d0,
+ & .9d0,.925d0,.95d0,.975d0,1d0/
+ data qq/1.d0,
+ & 1.25d0,1.5d0,0.d0,0.d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,
+ & 1d1,1.2d1,0.d0,0.d0,2.6d1,4d1,6.4d1,1d2,
+ & 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ & 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ & 1.8d6,3.2d6,5.6d6,1d7,1.8d7,3.2d7,5.6d7,1d8,
+ & 1.8d8,3.2d8,5.6d8,1d9/
+
+ if (f.lt.-6.or.f.gt.13) then
+ print *,"Error: invalid parton flavour = ",f
+ stop
+ end if
+
+ if (ih.lt.0.or.ih.gt.nhess) then
+ print *,"Error: invalid eigenvector number = ",ih
+ stop
+ end if
+
+C-- Check if the requested parton set is already in memory.
+ if (oldprefix(ih).ne.prefix) then
+
+C-- Start of initialisation for eigenvector set "i" ...
+C-- Do this only the first time the set "i" is called,
+C-- OR if the prefix has changed from the last time.
+
+C-- Check that the character arrays "oldprefix" and "filename"
+C-- are large enough.
+ if (len_trim(prefix).gt.len(oldprefix(ih))) then
+ print *,"Error in GetOnePDF: increase size of oldprefix"
+ stop
+ else if (len_trim(prefix)+7.gt.len(filename)) then
+ print *,"Error in GetOnePDF: increase size of filename"
+ stop
+ end if
+
+ write(set,'(I2.2)') ih ! convert integer to string
+C-- Remove trailing blanks from prefix before assigning filename.
+ filename = prefix(1:len_trim(prefix))//'.'//set//'.dat'
+C-- Line below can be commented out if you don't want this message.
+ print *,"Reading PDF grid from ",filename(1:len_trim(filename))
+ open(unit=33,file=filename,iostat=io,status='old')
+ if (io.ne.0) then
+ print *,"Error in GetOnePDF: can't open ",
+ & filename(1:len_trim(filename))
+ stop
+ end if
+
+C-- Read header containing heavy quark masses and alphaS values.
+ read(33,*)
+ read(33,*)
+ read(33,*) dummyChar,dummyWord,dummyWord,dummyChar,
+ & distance,tolerance
+ read(33,*) dummyChar,dummyWord,dummyChar,mCharm
+ read(33,*) dummyChar,dummyWord,dummyChar,mBottom
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSQ0
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSMZ
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSorder
+ read(33,*) dummyChar,dummyWord,dummyChar,nExtraFlavours
+ read(33,*)
+ read(33,*)
+ mc2=mCharm**2
+ mb2=mBottom**2
+ qq(4)=mc2
+ qq(5)=mc2+eps
+ qq(14)=mb2
+ qq(15)=mb2+eps
+
+C-- Check that the heavy quark masses are sensible.
+ if (mc2.lt.qq(3).or.mc2.gt.qq(6)) then
+ print *,"Error in GetOnePDF: invalid mCharm = ",mCharm
+ stop
+ end if
+ if (mb2.lt.qq(13).or.mb2.gt.qq(16)) then
+ print *,"Error in GetOnePDF: invalid mBottom = ",mBottom
+ stop
+ end if
+
+C-- The nExtraFlavours variable is provided to aid compatibility
+C-- with future grids where, for example, a photon distribution
+C-- might be provided (cf. the MRST2004QED PDFs).
+ if (nExtraFlavours.lt.0.or.nExtraFlavours.gt.1) then
+ print *,"Error in GetOnePDF: invalid nExtraFlavours = ",
+ & nExtraFlavours
+ stop
+ end if
+
+C-- Now read in the grids from the grid file.
+ do n=1,nx-1
+ do m=1,nq
+ if (nExtraFlavours.gt.0) then
+ if (alphaSorder.eq.2) then ! NNLO
+ read(33,'(12(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,12)
+ else ! LO or NLO
+ ff(10,n,m) = 0.d0 ! = chm-cbar
+ ff(11,n,m) = 0.d0 ! = bot-bbar
+ read(33,'(10(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,9),ff(12,n,m)
+ end if
+ else ! nExtraFlavours = 0
+ if (alphaSorder.eq.2) then ! NNLO
+ ff(12,n,m) = 0.d0 ! = photon
+ read(33,'(11(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,11)
+ else ! LO or NLO
+ ff(10,n,m) = 0.d0 ! = chm-cbar
+ ff(11,n,m) = 0.d0 ! = bot-bbar
+ ff(12,n,m) = 0.d0 ! = photon
+ read(33,'(9(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,9)
+ end if
+ end if
+ if (io.ne.0) then
+ print *,"Error in GetOnePDF reading ",filename
+ stop
+ end if
+ enddo
+ enddo
+
+C-- Check that ALL the file contents have been read in.
+ read(33,*,iostat=io) dummy
+ if (io.eq.0) then
+ print *,"Error in GetOnePDF: not at end of ",filename
+ stop
+ end if
+ close(unit=33)
+
+C-- PDFs are identically zero at x = 1.
+ do m=1,nq
+ do ip=1,np
+ ff(ip,nx,m)=0d0
+ enddo
+ enddo
+
+ do n=1,nx
+ xxl(n)=log10(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=log10(qq(m))
+ enddo
+
+C-- Initialise all parton flavours.
+ do ip=1,np
+ call InitialisePDF(ip,np,ih,nhess,nx,nq,nqc0,nqb0,
+ & xxl,qql,ff,cc)
+ enddo
+
+ oldprefix(ih) = prefix
+
+C-- ... End of initialisation for eigenvector set "ih".
+
+ end if ! oldprefix(ih).ne.prefix
+
+C----------------------------------------------------------------------
+
+ qsq=q*q
+C-- If mc2 < qsq < mc2+eps, then qsq = mc2+eps.
+ if (qsq.gt.qq(nqc0).and.qsq.lt.qq(nqc0+1)) qsq = qq(nqc0+1)
+C-- If mb2 < qsq < mb2+eps, then qsq = mb2+eps.
+ if (qsq.gt.qq(nqb0).and.qsq.lt.qq(nqb0+1)) qsq = qq(nqb0+1)
+
+ xlog=log10(x)
+ qsqlog=log10(qsq)
+
+ res = 0.d0
+
+ if (f.eq.0) then ! gluon
+ ip = 1
+ else if (f.ge.1.and.f.le.5) then ! quarks
+ ip = f+1
+ else if (f.le.-1.and.f.ge.-5) then ! antiquarks
+ ip = -f+1
+ else if (f.ge.7.and.f.le.11) then ! valence quarks
+ ip = f
+ else if (f.eq.13) then ! photon
+ ip = 12
+ else if (abs(f).ne.6.and.f.ne.12) then
+ if (warn.or.fatal) print *,"Error in GetOnePDF: f = ",f
+ if (fatal) stop
+ end if
+
+ if (x.le.0.d0.or.x.gt.xmax.or.q.le.0.d0) then
+
+ if (warn.or.fatal) print *,"Error in GetOnePDF: x,qsq = ",
+ & x,qsq
+ if (fatal) stop
+
+ else if (abs(f).eq.6.or.f.eq.12) then ! set top quarks to zero
+
+ res = 0.d0
+
+ else if (qsq.lt.qsqmin) then ! extrapolate to low Q^2
+
+ if (warn) then
+ print *, "Warning in GetOnePDF, extrapolating: f = ",f,
+ & ", x = ",x,", q = ",q
+ end if
+
+ if (x.lt.xmin) then ! extrapolate to low x
+
+ res = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = res1 - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ end if
+
+ else ! do usual interpolation
+
+ res = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = res1 - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ end if
+
+ end if
+
+C-- Calculate the anomalous dimension, dlog(xf)/dlog(qsq),
+C-- evaluated at qsqmin. Then extrapolate the PDFs to low
+C-- qsq < qsqmin by interpolating the anomalous dimenion between
+C-- the value at qsqmin and a value of 1 for qsq << qsqmin.
+C-- If value of PDF at qsqmin is very small, just set
+C-- anomalous dimension to 1 to prevent rounding errors.
+ if (abs(res).ge.1.D-5) then
+ anom = (res1-res)/res/0.01D0
+ else
+ anom = 1.D0
+ end if
+ res = res*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin)
+
+ else if (x.lt.xmin.or.qsq.gt.qsqmax) then ! extrapolate
+
+ if (warn) then
+ print *, "Warning in GetOnePDF, extrapolating: f = ",f,
+ & ", x = ",x,", q = ",q
+ end if
+
+ res = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+ end if
+
+ else ! do usual interpolation
+
+ res = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+ end if
+
+ end if
+
+ GetOnePDF = res
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ subroutine InitialisePDF(ip,np,ih,nhess,nx,my,myc0,myb0,
+ & xx,yy,ff,cc)
+ implicit none
+ integer nhess,ih,nx,my,myc0,myb0,j,k,l,m,n,ip,np
+ double precision xx(nx),yy(my),ff(np,nx,my),
+ & ff1(nx,my),ff2(nx,my),ff12(nx,my),ff21(nx,my),
+ & yy0(4),yy1(4),yy2(4),yy12(4),z(16),
+ & cl(16),cc(np,0:nhess,nx,my,4,4),iwt(16,16),
+ & polderiv1,polderiv2,polderiv3,d1,d2,d1d2,xxd
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ & -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ & 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ & 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ & 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ & 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ & -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ & 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ & -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ & 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ & -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ & 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+ do m=1,my
+ ff1(1,m)=polderiv1(xx(1),xx(2),xx(3),
+ & ff(ip,1,m),ff(ip,2,m),ff(ip,3,m))
+ ff1(nx,m)=polderiv3(xx(nx-2),xx(nx-1),xx(nx),
+ & ff(ip,nx-2,m),ff(ip,nx-1,m),ff(ip,nx,m))
+ do n=2,nx-1
+ ff1(n,m)=polderiv2(xx(n-1),xx(n),xx(n+1),
+ & ff(ip,n-1,m),ff(ip,n,m),ff(ip,n+1,m))
+ enddo
+ enddo
+
+C-- Calculate the derivatives at qsq=mc2,mc2+eps,mb2,mb2+eps
+C-- in a similar way as at the endpoints qsqmin and qsqmax.
+ do n=1,nx
+ do m=1,my
+ if (m.eq.1.or.m.eq.myc0+1.or.m.eq.myb0+1) then
+ ff2(n,m)=polderiv1(yy(m),yy(m+1),yy(m+2),
+ & ff(ip,n,m),ff(ip,n,m+1),ff(ip,n,m+2))
+ else if (m.eq.my.or.m.eq.myc0.or.m.eq.myb0) then
+ ff2(n,m)=polderiv3(yy(m-2),yy(m-1),yy(m),
+ & ff(ip,n,m-2),ff(ip,n,m-1),ff(ip,n,m))
+ else
+ ff2(n,m)=polderiv2(yy(m-1),yy(m),yy(m+1),
+ & ff(ip,n,m-1),ff(ip,n,m),ff(ip,n,m+1))
+ end if
+ end do
+ end do
+
+C-- Calculate the cross derivatives (d/dx)(d/dy).
+ do m=1,my
+ ff12(1,m)=polderiv1(xx(1),xx(2),xx(3),
+ & ff2(1,m),ff2(2,m),ff2(3,m))
+ ff12(nx,m)=polderiv3(xx(nx-2),xx(nx-1),xx(nx),
+ & ff2(nx-2,m),ff2(nx-1,m),ff2(nx,m))
+ do n=2,nx-1
+ ff12(n,m)=polderiv2(xx(n-1),xx(n),xx(n+1),
+ & ff2(n-1,m),ff2(n,m),ff2(n+1,m))
+ enddo
+ enddo
+
+C-- Calculate the cross derivatives (d/dy)(d/dx).
+ do n=1,nx
+ do m = 1, my
+ if (m.eq.1.or.m.eq.myc0+1.or.m.eq.myb0+1) then
+ ff21(n,m)=polderiv1(yy(m),yy(m+1),yy(m+2),
+ & ff1(n,m),ff1(n,m+1),ff1(n,m+2))
+ else if (m.eq.my.or.m.eq.myc0.or.m.eq.myb0) then
+ ff21(n,m)=polderiv3(yy(m-2),yy(m-1),yy(m),
+ & ff1(n,m-2),ff1(n,m-1),ff1(n,m))
+ else
+ ff21(n,m)=polderiv2(yy(m-1),yy(m),yy(m+1),
+ & ff1(n,m-1),ff1(n,m),ff1(n,m+1))
+ end if
+ end do
+ end do
+
+C-- Take the average of (d/dx)(d/dy) and (d/dy)(d/dx).
+ do n=1,nx
+ do m = 1, my
+ ff12(n,m)=0.5*(ff12(n,m)+ff21(n,m))
+ end do
+ end do
+
+ do n=1,nx-1
+ do m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(ip,n,m)
+ yy0(2)=ff(ip,n+1,m)
+ yy0(3)=ff(ip,n+1,m+1)
+ yy0(4)=ff(ip,n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ enddo
+
+ do l=1,16
+ xxd=0.d0
+ do k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ enddo
+ cl(l)=xxd
+ enddo
+ l=0
+ do k=1,4
+ do j=1,4
+ l=l+1
+ cc(ip,ih,n,m,k,j)=cl(l)
+ enddo
+ enddo
+ enddo
+ enddo
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function InterpolatePDF(ip,np,ih,nhess,x,y,
+ & nx,my,xx,yy,cc)
+ implicit none
+ integer ih,nx,my,nhess,locx,l,m,n,ip,np
+ double precision xx(nx),yy(my),cc(np,0:nhess,nx,my,4,4),
+ & x,y,z,t,u
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.d0
+ do l=4,1,-1
+ z=t*z+((cc(ip,ih,n,m,l,4)*u+cc(ip,ih,n,m,l,3))*u
+ . +cc(ip,ih,n,m,l,2))*u+cc(ip,ih,n,m,l,1)
+ enddo
+
+ InterpolatePDF = z
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function ExtrapolatePDF(ip,np,ih,nhess,x,y,
+ & nx,my,xx,yy,cc)
+ implicit none
+ integer ih,nx,my,nhess,locx,n,m,ip,np
+ double precision xx(nx),yy(my),cc(np,0:nhess,nx,my,4,4),
+ & x,y,z,f0,f1,z0,z1,InterpolatePDF
+
+ n=locx(xx,nx,x) ! 0: below xmin, nx: above xmax
+ m=locx(yy,my,y) ! 0: below qsqmin, my: above qsqmax
+
+C-- If extrapolation in small x only:
+ if (n.eq.0.and.m.gt.0.and.m.lt.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(1),y,nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(2),y,nx,my,xx,yy,cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z = exp(log(f0)+(log(f1)-log(f0))/(xx(2)-xx(1))*(x-xx(1)))
+ else
+ z = f0+(f1-f0)/(xx(2)-xx(1))*(x-xx(1))
+ end if
+C-- If extrapolation into large q only:
+ else if (n.gt.0.and.m.eq.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,x,yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,x,yy(my-1),nx,my,xx,yy,cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+C-- If extrapolation into large q AND small x:
+ else if (n.eq.0.and.m.eq.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(1),yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(1),yy(my-1),nx,my,xx,yy,
+ & cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z0 = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z0 = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(2),yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(2),yy(my-1),nx,my,xx,yy,
+ & cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z1 = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z1 = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+ if (z0.gt.0.d0.and.z1.gt.0.d0) then
+ z = exp(log(z0)+(log(z1)-log(z0))/(xx(2)-xx(1))*(x-xx(1)))
+ else
+ z = z0+(z1-z0)/(xx(2)-xx(1))*(x-xx(1))
+ end if
+ else
+ print *,"Error in ExtrapolatePDF"
+ stop
+ end if
+
+ ExtrapolatePDF = z
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ integer function locx(xx,nx,x)
+C-- returns an integer j such that x lies inbetween xx(j) and xx(j+1).
+C-- nx is the length of the array with xx(nx) the highest element.
+ implicit none
+ integer nx,jl,ju,jm
+ double precision x,xx(nx)
+ if(x.eq.xx(1)) then
+ locx=1
+ return
+ endif
+ if(x.eq.xx(nx)) then
+ locx=nx-1
+ return
+ endif
+ ju=nx+1
+ jl=0
+ 1 if((ju-jl).le.1) go to 2
+ jm=(ju+jl)/2
+ if(x.ge.xx(jm)) then
+ jl=jm
+ else
+ ju=jm
+ endif
+ go to 1
+ 2 locx=jl
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function polderiv1(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x1 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv1=(x3*x3*(y1-y2)+2.d0*x1*(x3*(-y1+y2)+x2*(y1-y3))
+ & +x2*x2*(-y1+y3)+x1*x1*(-y2+y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+ double precision function polderiv2(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x2 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv2=(x3*x3*(y1-y2)-2.d0*x2*(x3*(y1-y2)+x1*(y2-y3))
+ & +x2*x2*(y1-y3)+x1*x1*(y2-y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+ double precision function polderiv3(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x3 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv3=(x3*x3*(-y1+y2)+2.d0*x2*x3*(y1-y3)+x1*x1*(y2-y3)
+ & +x2*x2*(-y1+y3)+2.d0*x1*x3*(-y2+y3))/
+ & ((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+C----------------------------------------------------------------------
+
+
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! JR09VFNNLO (To be published)
+!! (See also: Phys. Rev. D79 (2009) 074023 and arXiv:0810.4274)
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! This package contains the JR09 VFNS NNLO(MSbar) dynamical parton
+!! distributions of the nucleon and their associated exact iterative
+!! solutions for alpha_s.
+!!
+!! The sets resulting from displacements in the parameter space with
+!! respect to the central value of the NNLO(MSbar) fit along the plus
+!! (minus) directions of the (rescaled) eigenvectors of the hessian
+!! matrix are included. The tolerance parameter for these displacements
+!! was chosen to be T = 4.535 for a total of 1568 fitted points. Since
+!! alpha_s was included as a free parameter in the error estimation the
+!! use of the provided alpha_s solution for each set is mandatory for
+!! uncertainty studies (the difference on alpha_s for different
+!! eigenvector sets can be as large as 10% at low scales).
+!!
+!! The grids are generated for 10^-9 <= x <= 1 and Qo^2 <= Q^2 <= 10^8
+!! (GeV^2) where Qo^2 = 0.55 GeV^2 for the NNLO distributions. Outside
+!! these ranges the output is either set to NaN or obtained through
+!! extrapolation and should NOT be used.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! The routines use a modification of the standard multidimensional
+!! linear interpolation routine FINT (CERNLIB E104) distributed as the
+!! file 'dfint.f'.
+!! The file './JR09VFNNLO.grd', where ./ means the path from the working
+!! directory to the file, is read.
+!! For questions, comments, problems etc please contact:
+!! pjimenez@het.physik.uni-dortmund.de
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! JR09VFNNLOinit:
+!! Initialization routine of the package to be called (only once)
+!! before using any of the other subroutines.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! JR09VFNNLOx'parton'(x,Q2,set) with 'parton' = uv,dv,gl,ub,db,sb,cb,bb:
+!! Parton distribution 'parton' (times x).
+!! x == Bjorken-x.
+!! Q2 == Q**2 (GeV**2) == Factorization scale
+!! == Renormalization scale.
+!! set == set to be used.
+!! JR09VFNNLOalphas(Q2,set):
+!! Value of alpha_s (no additional 2pi or 4pi factors).
+!! Q2 == Q**2 (GeV**2) == Renormalization scale.
+!! set == set to be used.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! set == Index specifying the set to be used:
+!! 0 NNLO(MSbar).
+!! 1,2,...,13 set corresponding to a displacement +T with respect
+!! to the set 0 in the direction of the ith eigenvector.
+!! -1,-2,...,-13 the same for displacements -T.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ block data JR09VFNNLO
+ implicit none
+ integer shape(2)
+ double precision grid(217)
+ common /JR09VFNNLOgrid/ grid,shape
+ data shape /118,99/
+ data grid
+ & /1d-9,1.25d-9,1.6d-9,2d-9,2.5d-9,3.16d-9,4d-9,5d-9,6.3d-9,8d-9,
+ & 1d-8,1.25d-8,1.6d-8,2d-8,2.5d-8,3.16d-8,4d-8,5d-8,6.3d-8,8d-8,
+ & 1d-7,1.25d-7,1.6d-7,2d-7,2.5d-7,3.16d-7,4d-7,5d-7,6.3d-7,8d-7,
+ & 1d-6,1.25d-6,1.6d-6,2d-6,2.5d-6,3.16d-6,4d-6,5d-6,6.3d-6,8d-6,
+ & 1d-5,1.25d-5,1.6d-5,2d-5,2.5d-5,3.16d-5,4d-5,5d-5,6.3d-5,8d-5,
+ & 1d-4,1.25d-4,1.6d-4,2d-4,2.5d-4,3.16d-4,4d-4,5d-4,6.3d-4,8d-4,
+ & 1d-3,1.25d-3,1.6d-3,2d-3,2.5d-3,3.16d-3,4d-3,5d-3,6.3d-3,8d-3,
+ & 1d-2,1.25d-2,1.6d-2,2d-2,2.5d-2,3.16d-2,4d-2,5d-2,6.3d-2,8d-2,
+ & 0.10d0,0.125d0,0.15d0,0.175d0,0.20d0,0.225d0,0.25d0,0.275d0,
+ & 0.30d0,0.325d0,0.35d0,0.375d0,0.40d0,0.425d0,0.45d0,0.475d0,
+ & 0.50d0,0.525d0,0.55d0,0.575d0,0.60d0,0.625d0,0.65d0,0.675d0,
+ & 0.70d0,0.725d0,0.75d0,0.775d0,0.80d0,0.825d0,0.85d0,0.875d0,
+ & 0.9d0,0.920d0,0.94d0,0.960d0,0.98d0,1d0,
+ & 0.3d0,0.31d0,0.35d0,0.375d0,0.4d0,0.45d0,0.5d0,0.51d0,0.525d0,
+ & 0.55d0,0.575d0,0.6d0,0.65d0,0.7d0,0.75d0,0.8d0,0.85d0,0.9d0,
+ & 1d0,1.25d0,1.6d0,2d0,2.5d0,3.16d0,4d0,5d0,6.3d0,8d0,
+ & 1d1,1.25d1,1.6d1,2d1,2.5d1,3.16d1,4d1,5d1,6.3d1,8d1,
+ & 1d2,1.25d2,1.6d2,2d2,2.5d2,3.16d2,4d2,5d2,6.3d2,8d2,
+ & 1d3,1.25d3,1.6d3,2d3,2.5d3,3.16d3,4d3,5d3,6.3d3,8d3,
+ & 1d4,1.25d4,1.6d4,2d4,2.5d4,3.16d4,4d4,5d4,6.3d4,8d4,
+ & 1d5,1.25d5,1.6d5,2d5,2.5d5,3.16d5,4d5,5d5,6.3d5,8d5,
+ & 1d6,1.25d6,1.6d6,2d6,2.5d6,3.16d6,4d6,5d6,6.3d6,8d6,
+ & 1d7,1.25d7,1.6d7,2d7,2.5d7,3.16d7,4d7,5d7,6.3d7,8d7,1d8/
+ end block data JR09VFNNLO
+
+ subroutine JR09VFNNLOinit
+ implicit none
+ integer shape(2),i,j,k
+ double precision NaN,grid(217),
+ & alphas(99,-13:13),
+ & xuv(118,99,-13:13),
+ & xdv(118,99,-13:13),
+ & xgl(118,99,-13:13),
+ & xub(118,99,-13:13),
+ & xdb(118,99,-13:13),
+ & xsb(118,99,-13:13),
+ & xcb(118,99,-13:13),
+ & xbb(118,99,-13:13)
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOalphasc/ alphas
+ common /JR09VFNNLOxuvc/ xuv
+ common /JR09VFNNLOxdvc/ xdv
+ common /JR09VFNNLOxglc/ xgl
+ common /JR09VFNNLOxubc/ xub
+ common /JR09VFNNLOxdbc/ xdb
+ common /JR09VFNNLOxsbc/ xsb
+ common /JR09VFNNLOxcbc/ xcb
+ common /JR09VFNNLOxbbc/ xbb
+ NaN=0d0
+ NaN=0d0/NaN
+ open(10,file='Pdfdata/JR09VFNNLO.grd')
+ do 1 k=-13,13
+ do 2 j=1,99
+ read(10,*) alphas(j,k)
+ 2 continue
+ 1 continue
+ do 10 k=-13,13
+ do 11 j=1,99
+ do 12 i=1,118
+ read(10,*) xuv(i,j,k)
+ 12 continue
+ 11 continue
+ 10 continue
+ do 20 k=-13,13
+ do 21 j=1,99
+ do 22 i=1,118
+ read(10,*) xdv(i,j,k)
+ 22 continue
+ 21 continue
+ 20 continue
+ do 30 k=-13,13
+ do 31 j=1,99
+ do 32 i=1,118
+ read(10,*) xgl(i,j,k)
+ 32 continue
+ 31 continue
+ 30 continue
+ do 40 k=-13,13
+ do 41 j=1,99
+ do 42 i=1,118
+ read(10,*) xub(i,j,k)
+ 42 continue
+ 41 continue
+ 40 continue
+ do 50 k=-13,13
+ do 51 j=1,99
+ do 52 i=1,118
+ read(10,*) xdb(i,j,k)
+ 52 continue
+ 51 continue
+ 50 continue
+ do 60 k=-13,13
+ do 61 j=1,99
+ do 62 i=1,118
+ read(10,*) xsb(i,j,k)
+ 62 continue
+ 61 continue
+ 60 continue
+ do 70 k=-13,13
+ do 71 j=1,99
+ do 72 i=1,118
+ read(10,*) xcb(i,j,k)
+ 72 continue
+ 71 continue
+ 70 continue
+ do 80 k=-13,13
+ do 81 j=1,99
+ do 82 i=1,118
+ read(10,*) xbb(i,j,k)
+ 82 continue
+ 81 continue
+ 80 continue
+ close(10)
+ do 1000 k=-13,13
+ do 1001 j=1,9
+ do 1002 i=1,118
+ xuv(i,j,k)=NaN
+ xdv(i,j,k)=NaN
+ xgl(i,j,k)=NaN
+ xub(i,j,k)=NaN
+ xdb(i,j,k)=NaN
+ xsb(i,j,k)=NaN
+ xcb(i,j,k)=NaN
+ xbb(i,j,k)=NaN
+ 1002 continue
+ 1001 continue
+ 1000 continue
+ return
+ end subroutine JR09VFNNLOinit
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOalphas(Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),alphas(99,-13:13),arg,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOalphasc/ alphas
+ arg = Q2
+ JR09VFNNLOalphas = dfint(1,arg,shape(2),grid(119),alphas(1,nset))
+ return
+ end function JR09VFNNLOalphas
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxuv(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xuv(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxuvc/ xuv
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxuv = dfint(2,arg,shape,grid,xuv(1,1,nset))
+ return
+ end function JR09VFNNLOxuv
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxdv(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xdv(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxdvc/ xdv
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxdv = dfint(2,arg,shape,grid,xdv(1,1,nset))
+ return
+ end function JR09VFNNLOxdv
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxgl(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xgl(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxglc/ xgl
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxgl = dfint(2,arg,shape,grid,xgl(1,1,nset))
+ return
+ end function JR09VFNNLOxgl
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxub(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xub(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxubc/ xub
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxub = dfint(2,arg,shape,grid,xub(1,1,nset))
+ return
+ end function JR09VFNNLOxub
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxdb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xdb(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxdbc/ xdb
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxdb = dfint(2,arg,shape,grid,xdb(1,1,nset))
+ return
+ end function JR09VFNNLOxdb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxsb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xsb(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxsbc/ xsb
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxsb = dfint(2,arg,shape,grid,xsb(1,1,nset))
+ return
+ end function JR09VFNNLOxsb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxcb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xcb(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxcbc/ xcb
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxcb = dfint(2,arg,shape,grid,xcb(1,1,nset))
+ return
+ end function JR09VFNNLOxcb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxbb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xbb(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxbbc/ xbb
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxbb = dfint(2,arg,shape,grid,xbb(1,1,nset))
+ return
+ end function JR09VFNNLOxbb
+
+
+ block data GJR08VFNS
+ implicit none
+ integer shape(2)
+ double precision grid(217)
+ common /GJR08VFNSgrid/ grid,shape
+ data shape /118,99/
+ data grid
+ & /1d-9,1.25d-9,1.6d-9,2d-9,2.5d-9,3.16d-9,4d-9,5d-9,6.3d-9,8d-9,
+ & 1d-8,1.25d-8,1.6d-8,2d-8,2.5d-8,3.16d-8,4d-8,5d-8,6.3d-8,8d-8,
+ & 1d-7,1.25d-7,1.6d-7,2d-7,2.5d-7,3.16d-7,4d-7,5d-7,6.3d-7,8d-7,
+ & 1d-6,1.25d-6,1.6d-6,2d-6,2.5d-6,3.16d-6,4d-6,5d-6,6.3d-6,8d-6,
+ & 1d-5,1.25d-5,1.6d-5,2d-5,2.5d-5,3.16d-5,4d-5,5d-5,6.3d-5,8d-5,
+ & 1d-4,1.25d-4,1.6d-4,2d-4,2.5d-4,3.16d-4,4d-4,5d-4,6.3d-4,8d-4,
+ & 1d-3,1.25d-3,1.6d-3,2d-3,2.5d-3,3.16d-3,4d-3,5d-3,6.3d-3,8d-3,
+ & 1d-2,1.25d-2,1.6d-2,2d-2,2.5d-2,3.16d-2,4d-2,5d-2,6.3d-2,8d-2,
+ & 0.10d0,0.125d0,0.15d0,0.175d0,0.20d0,0.225d0,0.25d0,0.275d0,
+ & 0.30d0,0.325d0,0.35d0,0.375d0,0.40d0,0.425d0,0.45d0,0.475d0,
+ & 0.50d0,0.525d0,0.55d0,0.575d0,0.60d0,0.625d0,0.65d0,0.675d0,
+ & 0.70d0,0.725d0,0.75d0,0.775d0,0.80d0,0.825d0,0.85d0,0.875d0,
+ & 0.9d0,0.920d0,0.94d0,0.960d0,0.98d0,1d0,
+ & 0.3d0,0.31d0,0.35d0,0.375d0,0.4d0,0.45d0,0.5d0,0.51d0,0.525d0,
+ & 0.55d0,0.575d0,0.6d0,0.65d0,0.7d0,0.75d0,0.8d0,0.85d0,0.9d0,
+ & 1d0,1.25d0,1.6d0,2d0,2.5d0,3.16d0,4d0,5d0,6.3d0,8d0,
+ & 1d1,1.25d1,1.6d1,2d1,2.5d1,3.16d1,4d1,5d1,6.3d1,8d1,
+ & 1d2,1.25d2,1.6d2,2d2,2.5d2,3.16d2,4d2,5d2,6.3d2,8d2,
+ & 1d3,1.25d3,1.6d3,2d3,2.5d3,3.16d3,4d3,5d3,6.3d3,8d3,
+ & 1d4,1.25d4,1.6d4,2d4,2.5d4,3.16d4,4d4,5d4,6.3d4,8d4,
+ & 1d5,1.25d5,1.6d5,2d5,2.5d5,3.16d5,4d5,5d5,6.3d5,8d5,
+ & 1d6,1.25d6,1.6d6,2d6,2.5d6,3.16d6,4d6,5d6,6.3d6,8d6,
+ & 1d7,1.25d7,1.6d7,2d7,2.5d7,3.16d7,4d7,5d7,6.3d7,8d7,1d8/
+ end block data GJR08VFNS
+
+ subroutine GJR08VFNSinit
+ implicit none
+ integer shape(2),i,j,k
+ double precision NaN,grid(217),
+ & alphas(99,-13:14),
+ & xuv(118,99,-13:14),
+ & xdv(118,99,-13:14),
+ & xgl(118,99,-13:14),
+ & xub(118,99,-13:14),
+ & xdb(118,99,-13:14),
+ & xsb(118,99,-13:14),
+ & xcb(118,99,-13:14),
+ & xbb(118,99,-13:14)
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSalphasc/ alphas
+ common /GJR08VFNSxuvc/ xuv
+ common /GJR08VFNSxdvc/ xdv
+ common /GJR08VFNSxglc/ xgl
+ common /GJR08VFNSxubc/ xub
+ common /GJR08VFNSxdbc/ xdb
+ common /GJR08VFNSxsbc/ xsb
+ common /GJR08VFNSxcbc/ xcb
+ common /GJR08VFNSxbbc/ xbb
+ NaN=0d0
+ NaN=0d0/NaN
+ open(10,file='Pdfdata/GJR08VFNS.grd')
+ do 1 k=-13,14
+ do 2 j=1,99
+ read(10,*) alphas(j,k)
+ 2 continue
+ 1 continue
+ do 10 k=-13,14
+ do 11 j=1,99
+ do 12 i=1,118
+ read(10,*) xuv(i,j,k)
+ 12 continue
+ 11 continue
+ 10 continue
+ do 20 k=-13,14
+ do 21 j=1,99
+ do 22 i=1,118
+ read(10,*) xdv(i,j,k)
+ 22 continue
+ 21 continue
+ 20 continue
+ do 30 k=-13,14
+ do 31 j=1,99
+ do 32 i=1,118
+ read(10,*) xgl(i,j,k)
+ 32 continue
+ 31 continue
+ 30 continue
+ do 40 k=-13,14
+ do 41 j=1,99
+ do 42 i=1,118
+ read(10,*) xub(i,j,k)
+ 42 continue
+ 41 continue
+ 40 continue
+ do 50 k=-13,14
+ do 51 j=1,99
+ do 52 i=1,118
+ read(10,*) xdb(i,j,k)
+ 52 continue
+ 51 continue
+ 50 continue
+ do 60 k=-13,14
+ do 61 j=1,99
+ do 62 i=1,118
+ read(10,*) xsb(i,j,k)
+ 62 continue
+ 61 continue
+ 60 continue
+ do 70 k=-13,14
+ do 71 j=1,99
+ do 72 i=1,118
+ read(10,*) xcb(i,j,k)
+ 72 continue
+ 71 continue
+ 70 continue
+ do 80 k=-13,14
+ do 81 j=1,99
+ do 82 i=1,118
+ read(10,*) xbb(i,j,k)
+ 82 continue
+ 81 continue
+ 80 continue
+ close(10)
+ do 1000 k=-13,13
+ do 1001 j=1,6
+ do 1002 i=1,118
+ xuv(i,j,k)=NaN
+ xdv(i,j,k)=NaN
+ xgl(i,j,k)=NaN
+ xub(i,j,k)=NaN
+ xdb(i,j,k)=NaN
+ xsb(i,j,k)=NaN
+ xcb(i,j,k)=NaN
+ xbb(i,j,k)=NaN
+ 1002 continue
+ 1001 continue
+ 1000 continue
+ return
+ end subroutine GJR08VFNSinit
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSalphas(Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),alphas(99,-13:14),arg,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSalphasc/ alphas
+ arg = Q2
+ GJR08VFNSalphas = dfint(1,arg,shape(2),grid(119),alphas(1,nset))
+ return
+ end function GJR08VFNSalphas
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxuv(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xuv(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxuvc/ xuv
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxuv = dfint(2,arg,shape,grid,xuv(1,1,nset))
+ return
+ end function GJR08VFNSxuv
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxdv(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xdv(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxdvc/ xdv
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxdv = dfint(2,arg,shape,grid,xdv(1,1,nset))
+ return
+ end function GJR08VFNSxdv
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxgl(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xgl(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxglc/ xgl
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxgl = dfint(2,arg,shape,grid,xgl(1,1,nset))
+ return
+ end function GJR08VFNSxgl
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxub(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xub(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxubc/ xub
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxub = dfint(2,arg,shape,grid,xub(1,1,nset))
+ return
+ end function GJR08VFNSxub
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxdb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xdb(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxdbc/ xdb
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxdb = dfint(2,arg,shape,grid,xdb(1,1,nset))
+ return
+ end function GJR08VFNSxdb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxsb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xsb(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxsbc/ xsb
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxsb = dfint(2,arg,shape,grid,xsb(1,1,nset))
+ return
+ end function GJR08VFNSxsb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxcb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xcb(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxcbc/ xcb
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxcb = dfint(2,arg,shape,grid,xcb(1,1,nset))
+ return
+ end function GJR08VFNSxcb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxbb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xbb(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxbbc/ xbb
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxbb = dfint(2,arg,shape,grid,xbb(1,1,nset))
+ return
+ end function GJR08VFNSxbb
+
+
+
+!! CERNLIB E104 modified to be used with (G)JR GRIDS:
+!! Name changed from fint to dfint.
+!! Real variables changed to double precision.
+!! External references to CERNLIB (error handling) routines removed.
+ DOUBLE PRECISION FUNCTION DFINT(NARG,ARG,NENT,ENT,TABLE)
+ INTEGER NENT(9), INDEX(32)
+ DOUBLE PRECISION ARG(9), ENT(9), TABLE(9), WEIGHT(32)
+ DFINT = 0d0
+ IF(NARG .LT. 1 .OR. NARG .GT. 5) GOTO 300
+ LMAX = 0
+ ISTEP = 1
+ KNOTS = 1
+ INDEX(1) = 1
+ WEIGHT(1) = 1d0
+ DO 100 N = 1, NARG
+ X = ARG(N)
+ NDIM = NENT(N)
+ LOCA = LMAX
+ LMIN = LMAX + 1
+ LMAX = LMAX + NDIM
+ IF(NDIM .GT. 2) GOTO 10
+ IF(NDIM .EQ. 1) GOTO 100
+ H = X - ENT(LMIN)
+ IF(H .EQ. 0.) GOTO 90
+ ISHIFT = ISTEP
+ IF(X-ENT(LMIN+1) .EQ. 0d0) GOTO 21
+ ISHIFT = 0
+ ETA = H / (ENT(LMIN+1) - ENT(LMIN))
+ GOTO 30
+ 10 LOCB = LMAX + 1
+ 11 LOCC = (LOCA+LOCB) / 2
+ IF(X-ENT(LOCC)) 12, 20, 13
+ 12 LOCB = LOCC
+ GOTO 14
+ 13 LOCA = LOCC
+ 14 IF(LOCB-LOCA .GT. 1) GOTO 11
+ LOCA = MIN0( MAX0(LOCA,LMIN), LMAX-1 )
+ ISHIFT = (LOCA - LMIN) * ISTEP
+ ETA = (X - ENT(LOCA)) / (ENT(LOCA+1) - ENT(LOCA))
+ GOTO 30
+ 20 ISHIFT = (LOCC - LMIN) * ISTEP
+ 21 DO 22 K = 1, KNOTS
+ INDEX(K) = INDEX(K) + ISHIFT
+ 22 CONTINUE
+ GOTO 90
+ 30 DO 31 K = 1, KNOTS
+ INDEX(K) = INDEX(K) + ISHIFT
+ INDEX(K+KNOTS) = INDEX(K) + ISTEP
+ WEIGHT(K+KNOTS) = WEIGHT(K) * ETA
+ WEIGHT(K) = WEIGHT(K) - WEIGHT(K+KNOTS)
+ 31 CONTINUE
+ KNOTS = 2*KNOTS
+ 90 ISTEP = ISTEP * NDIM
+ 100 CONTINUE
+ DO 200 K = 1, KNOTS
+ I = INDEX(K)
+ DFINT = DFINT + WEIGHT(K) * TABLE(I)
+ 200 CONTINUE
+ RETURN
+ 300 WRITE(*,1000) NARG
+ STOP
+1000 FORMAT( 7X, 24HFUNCTION DFINT... NARG =,I6,
+ + 17H NOT WITHIN RANGE)
+ END
+
+
+
+
+***********************************************
+* NNPDFINTevolveLHA
+*
+* Routine for calculating
+* the value of all xpdfs at x and Q from replica KREP
+* in a (x,Q) point
+*
+* Similar to the evolvePDF routine of the LHAPDF package
+* with an extra input variable for the number of replica
+*
+************************************************
+
+ subroutine NNPDFINTevolveLHA(X,Q,XPDF,KREP)
+ IMPLICIT none
+*
+ INTEGER MXREP
+ PARAMETER(MXREP=1e3)
+*
+ integer NPX,NPQ2,NPL,IX,IQ2
+ parameter(NPX=100,NPQ2=50)
+ parameter(NPL=5000)
+ double precision Q2MIN,Q2MAX,XPDFMIN,XPDFMAX,XCH,Q2CH
+ parameter(Q2MAX=1d8,Q2CH=4d0)
+ parameter(XPDFMIN=1d-9,XPDFMAX=1d0,XCH=1D-1)
+*
+ double precision XG(NPX),Q2G(NPQ2),XPDFEV(NPX,NPQ2,-6:6,0:MXREP)
+ common/CPDFGR/XPDFEV,XG,Q2G,Q2MIN,IX,IQ2
+
+ integer I,IPDF,KREP
+ double precision X,Q,Q2,XDIST,QDIST,XPDF(-6:6)
+*
+ integer m,n,nmax,mmax,minq,maxq,midq,maxx,minx,midx
+ parameter(m=4,n=2)
+ parameter(nmax=1e3,mmax=1e3)
+ double precision dy,x1,x2,y,x1a(mmax),x2a(nmax),ya(mmax,nmax)
+ integer ix1a(m),ix2a(n),J
+
+* Set correct scale
+ Q2=Q**2d0
+
+* Evolved PDF interpolation
+
+ IF ( X.LT.XPDFMIN .OR. X.GT.XPDFMAX ) THEN
+ WRITE(6,2000)
+ 2000 FORMAT (2X,'PARTON INTERPOLATION: X OUT OF RANGE -- STOP')
+ write(6,*) "X= ",X," XMAX, XMIN = ",XPDFMAX,XPDFMIN
+ !STOP
+ ENDIF
+*
+ IF ( Q2.LT.Q2MIN .OR. Q2.GT.Q2MAX ) THEN
+ WRITE(6,2001)
+ 2001 FORMAT (2X,'PARTON INTERPOLATION: Q2 OUT OF RANGE -- STOP')
+ write(6,*) "Q2 ,Q2MIN, Q2MAX = ",Q2,Q2MIN,Q2MAX
+ !STOP
+ ENDIF
+*
+* FIND NEAREST POINTS IN THE GRID
+*
+ MINX = 1
+ MAXX = NPX+1
+ 10 CONTINUE
+ MIDX = (MINX+MAXX)/2
+ IF(X.LT.XG(MIDX)) THEN
+ MAXX=MIDX
+ ELSE
+ MINX=MIDX
+ END IF
+ IF((MAXX-MINX).GT.1) GO TO 10
+ IX = MINX
+
+ MINQ = 1
+ MAXQ = NPQ2+1
+ 20 CONTINUE
+ MIDQ = (MINQ+MAXQ)/2
+ IF(Q2.LT.Q2G(MIDQ)) THEN
+ MAXQ=MIDQ
+ ELSE
+ MINQ=MIDQ
+ END IF
+ IF((MAXQ-MINQ).GT.1) GO TO 20
+ IQ2 = MINQ
+
+*
+* POLYNOMIAL INTERPOLATION
+*
+
+* Assign grid for interpolation. M, N -> order of polyN interpolation
+ do I=1,M
+ if(IX.ge.M/2.and.IX.le.(NPX-M/2)) IX1A(I) = IX - M/2 + I
+ if(IX.lt.M/2) IX1A(I) = I
+ if(IX.gt.(NPX-M/2)) IX1A(I) = (NPX - M) + I
+
+* Check grids
+ if(IX1A(I).le.0.or.IX1A(I).gt.NPX) then
+ write(6,*) "Error in grids! "
+ write(6,*) "I, IXIA(I) = ",I, IX1A(I)
+ call exit(-10)
+ endif
+ enddo
+
+ do J=1,N
+ if(IQ2.ge.N/2.and.IQ2.le.(NPQ2-N/2)) IX2A(J) = IQ2 - N/2 + J
+ if(IQ2.lt.N/2) IX2A(J) = J
+ if(IQ2.gt.(NPQ2-N/2)) IX2A(J) = (NPQ2 - N) + J
+* Check grids
+ if(IX2A(J).le.0.or.IX2A(J).gt.NPQ2) then
+ write(6,*) "Error in grids! "
+ write(6,*) "J, IXIA(J) = ",J,IX2A(J)
+ call exit(-10)
+ endif
+ enddo
+
+* Define points where to evaluate interpolation
+* Choose between linear or logarithmic (x,Q2) interpolation
+
+ IF(X.LT.XCH)THEN
+ X1=dlog(X)
+ ELSE
+ X1=X
+ ENDIF
+ X2=dlog(Q2)
+
+ DO IPDF = -6,6,1
+
+* Choose between linear or logarithmic (x,Q2) interpolation
+
+ DO I=1,M
+ IF(X.LT.XCH)THEN
+ X1A(I)= dlog(XG(IX1A(I)))
+ ELSE
+ X1A(I)= XG(IX1A(I))
+ ENDIF
+ DO J=1,N
+ X2A(J) = dlog(Q2G(IX2A(J)))
+ YA(I,J) = XPDFEV(IX1A(I),IX2A(J),IPDF,KREP)
+ enddo
+ enddo
+
+* 2D polynomial interpolation
+ call polin2(x1a,x2a,ya,m,n,x1,x2,y,dy)
+ XPDF(IPDF) = y
+
+ enddo
+*
+ RETURN
+*
+ END
+
+*****************************************************
+* polin2.f
+*
+* 2D interpolation of arbitrary polinomial order
+* Uses polint
+* Given arrays x1a(1:m) and x2a(1:n) of independent variables,
+* and an m by n array of function values ya(1:m,1:n) tabulated
+* at the grid points defined by x1a,x2a; and given values x1,x2
+* of the independent variable, this routine returns
+* an interpolated function value y with error dy
+*
+* Taken from NR fortran
+*****************************************************
+
+ subroutine polin2(x1a,x2a,ya,m,n,x1,x2,y,dy)
+ implicit none
+*
+ integer m,n,nmax,mmax
+ integer j,k
+ parameter(nmax=1e3,mmax=1e3)
+
+ DOUBLE PRECISION dy,x1,x2,y,x1a(mmax),x2a(nmax),ya(mmax,nmax)
+ DOUBLE PRECISION ymtmp(nmax),yntmp(nmax)
+
+ do j=1,m
+ do k=1,n
+ yntmp(k)=ya(j,k)
+ enddo
+ call polintNN(x2a,yntmp,n,x2,ymtmp(j),dy)
+ enddo
+ call polintNN(x1a,ymtmp,m,x1,y,dy)
+*
+ return
+ end
+
+***********************************************
+* polint.f
+*
+* Order N polynomial interpolation using Lagrange's formula
+* as descrived in Numerical Recipees:
+* Given arrays xa and ya each of length n, and given a value
+* x, this routine returns a value y and an error estimate dy.
+* If P(x) is the polynomial of degree N-1 such that
+* P(xa_i)=ya_i,i=1,...,n, then the returned value is y=P(x)
+* The algorithm used is Neville's algorithm
+*******************************************************
+
+ subroutine POLINTNN(xa,ya,n,x,y,dy)
+ implicit none
+*
+ integer n,NMAX
+* Largest anticipated value of n
+ parameter(nmax=1e3)
+ DOUBLE PRECISION dy,x,y,xa(nmax),ya(nmax)
+ INTEGER i,m,ns
+ DOUBLE PRECISION den,dif,dift,ho,hp,w,c(nmax),d(nmax)
+ ns=1
+ dif=abs(x-xa(1))
+ do 11 i=1,n
+ dift=abs(x-xa(i))
+ if(dift.lt.dif) then
+ ns=i
+ dif=dift
+ endif
+ c(i)=ya(i)
+ d(i)=ya(i)
+ 11 enddo
+ y=ya(ns)
+ ns=ns-1
+ do m=1,n-1
+ do i=1,n-m
+ ho=xa(i)-x
+ hp=xa(i+m)-x
+ w=c(i+1)-d(i)
+ den=ho-hp
+ if(den.eq.0) then
+ write (*,*) 'failure in polint'
+ read(5,*)
+ endif
+ den=w/den
+ d(i)=hp*den
+ c(i)=ho*den
+ enddo
+ if(2*ns.lt.(n-m)) then
+ dy=c(ns+1)
+ else
+ dy=d(ns)
+ ns=ns-1
+ endif
+ y=y+dy
+ enddo
+
+ return
+ end
+
+***********************************************
+
+ INTEGER FUNCTION JISEARCH(N,X,Y)
+!
+ IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+! Dynamical memory allocation
+ DOUBLE PRECISION X(*)
+!
+ MIN=1
+ MAX=N+1
+!
+ 10 CONTINUE
+ MID=(MIN+MAX)/2
+ IF(Y.LT.X(MID)) THEN
+ MAX=MID
+ ELSE
+ MIN=MID
+ END IF
+ IF((MAX-MIN).GT.1) GOTO 10
+!
+ JISEARCH=MIN
+!
+ RETURN
+ END
+
+
+***********************************************
+*
+*
+* NNPDFwrapinit.f
+*
+* This routine computes, from a grid of NNPDF
+* evolved pdfs, the value of all xpdfs at x and Q
+* (LHAPDF convention) from replica KREP
+*
+* To be used from an external wrapper
+*
+************************************************
+
+ subroutine InitNNPDFwrap(wrapfile,NMEM)
+
+* Loads the array of evolved PDF grids for the
+* LHAPDF-like pdf interpolation
+
+ implicit none
+
+ integer MXREP
+ parameter(MXREP=1e3)
+ integer NREP
+ common/CNREP/NREP
+
+ integer NPX,NPQ2,NPL,IX,IQ2
+ parameter(NPX=100,NPQ2=50)
+ parameter(NPL=5000)
+
+ double precision Q2MIN,Q2MAX,XPDFMIN,XPDFMAX,XCH,Q2CH
+ parameter(Q2MAX=1d8,Q2CH=4d0)
+ parameter(XPDFMIN=1d-9,XPDFMAX=1d0,XCH=1D-1)
+*
+ double precision XG(NPX),Q2G(NPQ2),XPDFEV(NPX,NPQ2,-6:6,0:MXREP)
+ common/CPDFGR/XPDFEV,XG,Q2G,Q2MIN,IX,IQ2
+
+ integer IPDF,KREP,NLINESDES,ILINES,NXTMP,NQ2TMP,NMEM
+ parameter(NLINESDES=11)
+ double precision XMINTMP,XMAXTMP,Q2MINTMP,Q2MAXTMP
+
+ character*53 wrapfile, info
+
+* Read the NNPDF wrapper grid file
+
+! write(*,*)"wrapfile=",wrapfile
+ open(unit=10,status="old",file=wrapfile)
+
+* Read description of grid file
+ do ILINES=1,NLINESDES
+ read(10,*) info
+! write(6,*) info
+ enddo
+! write(6,*) " "
+
+* Read max and min extremes of grid
+ read(10,*) XMINTMP,XMAXTMP,Q2MINTMP,Q2MAXTMP
+
+* Read and check grids
+* Read the grid in x
+ read(10,*) NXTMP
+ if(NXTMP.ne.NPX) then
+ write(6,*) "Invalid value of NX!"
+ call exit(-10)
+ endif
+ do IX=1,NPX
+ read(10,*) XG(IX)
+ enddo
+* Read the grid in Q2
+ read(10,*) NQ2TMP
+ if(NQ2TMP.ne.NPQ2) then
+ write(6,*) "Invalid value of NQ2!"
+ call exit(-10)
+ endif
+ do IQ2=1,NPQ2
+ read(10,*) Q2G(IQ2)
+ enddo
+
+* Read the number of replicas
+ read(10,*) NREP
+ NMEM=NREP
+* Read the evolved xpdf grid for each replica
+ do KREP=0,NREP
+ do IX=1,NPX
+ do IQ2=1,NPQ2
+ read(10,*) ( XPDFEV(IX,IQ2,IPDF,KREP), IPDF=-6,6,1 )
+ enddo
+ enddo
+ enddo
+ close(10)
+*
+ return
+ end
+
+
+* -----------------------------------------------
+
+* Example how to compute averages and errors from NNPDFs
+ subroutine NNPDFAV(XPDFREP,NREP,XPDFAV,XPDFER)
+ implicit none
+
+ integer NREP,KREP,IPDF
+
+ double precision X,Q,XPDFAV(-6:6),XPDFER(-6:6)
+ double precision XPDF(-6:6),SUM(-6:6),SUM2(-6:6)
+ double precision XPDFREP(-6:6,1000)
+
+ do IPDF=-6,6,1
+ SUM(IPDF) = 0d0
+ SUM2(IPDF) = 0d0
+ enddo
+
+ do KREP=1,NREP
+
+ do IPDF=-6,6,1
+ SUM(IPDF) = SUM(IPDF)+XPDFREP(IPDF,KREP)
+ SUM2(IPDF) = SUM2(IPDF)+XPDFREP(IPDF,KREP)**2d0
+ enddo
+
+ enddo
+
+! Average and standard deviation
+ do IPDF=-6,6,1
+ XPDFAV(IPDF) = SUM(IPDF)/NREP
+ XPDFER(IPDF) = dsqrt(SUM2(IPDF)/NREP-XPDFAV(IPDF)**2d0)
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/mcfm_exit.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/mcfm_exit.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/mcfm_exit.f (revision 1338)
@@ -0,0 +1,142 @@
+ subroutine mcfm_exit(xinteg,xinteg_err)
+************************************************************************
+* *
+* This routine should perform the final processing and print-outs *
+* *
+************************************************************************
+ implicit none
+ include 'efficiency.f'
+ include 'PDFerrors.f'
+ integer j,k
+ double precision xinteg,xinteg_err,minPDFxsec,maxPDFxsec
+ double precision PDFerror,PDFperror,PDFnerror
+ double precision lord_bypart(-1:1,-1:1),lordnorm
+ character*4 part
+ logical creatent,dswhisto
+ common/outputflags/creatent,dswhisto
+ common/part/part
+ common/bypart/lord_bypart
+
+c--- Print-out the value of the integral and its error
+ write(6,*)
+ write(6,53)'Value of final ',part,' integral is',
+ . xinteg,' +/-',xinteg_err, ' fb'
+
+ 53 format(a15,a4,a12,f13.3,a4,f10.3,a3)
+
+c--- Print-out a summary of the effects of jets and cuts
+ write(6,*)
+ write(6,*) 'Total number of shots : ',ntotshot
+ write(6,*) 'Total no. failing cuts : ',ntotzero
+ write(6,*) 'Number failing jet cuts : ',njetzero
+ write(6,*) 'Number failing process cuts : ',ncutzero
+ write(6,*)
+ call flush(6)
+
+c--- Calculate the actual number of shots that were passed
+c--- through the jet and cut routines
+ ntotshot=ntotshot-(ntotzero-njetzero-ncutzero)
+ write(6,54) 'Jet efficiency : ',
+ . 100d0-100d0*dfloat(njetzero)/dfloat(ntotshot)
+ write(6,54) 'Cut efficiency : ',
+ . 100d0-100d0*dfloat(ncutzero)/dfloat((ntotshot-njetzero))
+ write(6,54) 'Total efficiency : ',
+ . 100d0-100d0*dfloat((njetzero+ncutzero))/dfloat(ntotshot)
+ write(6,*)
+
+ lordnorm=0d0
+ do j=-1,1
+ do k=-1,1
+ lordnorm=lordnorm+lord_bypart(j,k)
+ enddo
+ enddo
+ write(6,*) 'Contribution from parton sub-processes:'
+ write(6,*) '---------------------------------------'
+ write(6,55) ' GG ',
+ .lord_bypart( 0, 0)/lordnorm*xinteg,
+ .lord_bypart( 0, 0)/lordnorm*100d0
+ write(6,55) 'GQ + GQB ',
+ .(lord_bypart( 0,+1)+lord_bypart( 0,-1))/lordnorm*xinteg,
+ .(lord_bypart( 0,+1)+lord_bypart( 0,-1))/lordnorm*100d0
+ write(6,55) 'QG + QBG ',
+ .(lord_bypart(+1, 0)+lord_bypart(-1, 0))/lordnorm*xinteg,
+ .(lord_bypart(+1, 0)+lord_bypart(-1, 0))/lordnorm*100d0
+ write(6,55) 'QQ + QBQB',
+ .(lord_bypart(+1,+1)+lord_bypart(-1,-1))/lordnorm*xinteg,
+ .(lord_bypart(+1,+1)+lord_bypart(-1,-1))/lordnorm*100d0
+ write(6,55) ' QQB ',
+ .(lord_bypart(+1,-1)+lord_bypart(-1,+1))/lordnorm*xinteg,
+ .(lord_bypart(+1,-1)+lord_bypart(-1,+1))/lordnorm*100d0
+ write(6,*) '---------------------------------------'
+ call flush(6)
+
+ 54 format(a20,f6.2,'%')
+ 55 format(4x,a9,' |',f15.5,f8.2,'%')
+
+c--- if we've calculated PDF errors, present results
+ if (PDFerrors) then
+ write(6,*)
+ write(6,58) '************ PDF error analysis ************'
+ write(6,58) '* *'
+ minPDFxsec=PDFxsec(0)
+ maxPDFxsec=PDFxsec(0)
+ PDFerror=0d0
+ do j=0,maxPDFsets
+ write(6,56) j,PDFxsec(j)
+ if (PDFxsec(j) .lt. minPDFxsec) then
+ minPDFxsec=PDFxsec(j)
+ elseif (PDFxsec(j) .gt. maxPDFxsec) then
+ maxPDFxsec=PDFxsec(j)
+ endif
+ if ( (j .gt. 0) .and. (j/2 .eq. (j-1)/2) ) then
+ PDFerror=PDFerror+(PDFxsec(j)-PDFxsec(j+1))**2
+ endif
+ if ( (j .gt. 0) .and. (PDFxsec(j) .gt. PDFxsec(0)) ) then
+ PDFperror=PDFperror+(PDFxsec(j)-PDFxsec(0))**2
+ endif
+ if ( (j .gt. 0) .and. (PDFxsec(j) .lt. PDFxsec(0)) ) then
+ PDFnerror=PDFnerror+(PDFxsec(j)-PDFxsec(0))**2
+ endif
+ enddo
+ PDFerror=0.5d0*dsqrt(PDFerror)
+ PDFperror=dsqrt(PDFperror)
+ PDFnerror=dsqrt(PDFnerror)
+ write(6,58) '* *'
+ write(6,58) '* --------------- SUMMARY ---------------- *'
+ write(6,58) '* *'
+ write(6,57) 'Minimum value',minPDFxsec
+ write(6,57) 'Central value',PDFxsec(0)
+ write(6,57) 'Maximum value',maxPDFxsec
+ write(6,58) '* *'
+ write(6,57) 'Err estimate +/-',PDFerror
+ write(6,57) ' +ve direction',PDFperror
+ write(6,57) ' -ve direction',PDFnerror
+ write(6,58) '********************************************'
+ endif
+
+ 56 format('* PDF error set ',i3,' --->',f13.3,' fb *')
+ 57 format('* ',a16,f14.3,' fb *')
+ 58 format(a44)
+
+c--- Finalize the histograms, if we're not filling ntuples instead
+ if (creatent .eqv. .false.) then
+ if (dswhisto .eqv. .false.) then
+c--- Traditional MCFM histograms
+ call histofin(xinteg,xinteg_err)
+ else
+c--- DSW histograms - store the information
+c call dswhbook(200,'Sigma',1.0d0,0.0d0,10.0d0)
+c call dswhfill(200,0.5d0,xinteg)
+c call dswhfill(200,1.5d0,xinteg_err)
+c--- DSW histograms - output and close file
+ call dswhrout
+ call dswclose
+ endif
+ else
+ call dswhrout
+ call dswclose
+ endif
+
+ return
+
+ end
Index: dynnlo-v1.5-applgrid/src/Need/dclaus.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dclaus.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dclaus.f (revision 1338)
@@ -0,0 +1,79 @@
+*
+* $Id: dclaus64.F,v 1.2 1996/04/02 16:23:45 mclareni Exp $
+*
+* $Log: dclaus64.F,v $
+* Revision 1.2 1996/04/02 16:23:45 mclareni
+* More precise dclaus64 (C326), test added and C344 removed from TESTALL
+*
+* Revision 1.1.1.1 1996/04/01 15:02:03 mclareni
+* Mathlib gen
+*
+*
+ DOUBLE PRECISION FUNCTION DCLAUS(X)
+ IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+
+ DIMENSION A(0:8),B(0:13)
+
+ PARAMETER (R1 = 1d0, HF =R1/2d0)
+ PARAMETER (PI = 3.14159 26535 89793 24D0)
+ PARAMETER (PI2 = 2d0*PI, PIH = PI/2d0, RPIH = 2d0/PI)
+
+ DATA A( 0) / 0.02795 28319 73575 6613D0/
+ DATA A( 1) / 0.00017 63088 74389 8116D0/
+ DATA A( 2) / 0.00000 12662 74146 1157D0/
+ DATA A( 3) / 0.00000 00117 17181 8134D0/
+ DATA A( 4) / 0.00000 00001 23006 4129D0/
+ DATA A( 5) / 0.00000 00000 01395 2729D0/
+ DATA A( 6) / 0.00000 00000 00016 6908D0/
+ DATA A( 7) / 0.00000 00000 00000 2076D0/
+ DATA A( 8) / 0.00000 00000 00000 0027D0/
+
+ DATA B( 0) / 0.63909 70888 57265 341D0/
+ DATA B( 1) /-0.05498 05693 01851 716D0/
+ DATA B( 2) /-0.00096 12619 45950 606D0/
+ DATA B( 3) /-0.00003 20546 86822 550D0/
+ DATA B( 4) /-0.00000 13294 61695 426D0/
+ DATA B( 5) /-0.00000 00620 93601 824D0/
+ DATA B( 6) /-0.00000 00031 29600 656D0/
+ DATA B( 7) /-0.00000 00001 66351 954D0/
+ DATA B( 8) /-0.00000 00000 09196 527D0/
+ DATA B( 9) /-0.00000 00000 00524 004D0/
+ DATA B(10) /-0.00000 00000 00030 580D0/
+ DATA B(11) /-0.00000 00000 00001 820D0/
+ DATA B(12) /-0.00000 00000 00000 110D0/
+ DATA B(13) /-0.00000 00000 00000 007D0/
+
+ V=MOD(ABS(X),PI2)
+ S=SIGN(R1,X)
+ IF(V .GT. PI) THEN
+ V=PI2-V
+ S=-S
+ ENDIF
+ IF(V .EQ. 0d0 .OR. V .EQ. PI) THEN
+ H=0d0
+ ELSEIF(V .LT. PIH) THEN
+ U=RPIH*V
+ H=2d0*U**2-1d0
+ ALFA=H+H
+ B1=0d0
+ B2=0d0
+ DO 1 I = 8,0,-1
+ B0=A(I)+ALFA*B1-B2
+ B2=B1
+ 1 B1=B0
+ H=V*(1d0-LOG(V)+HF*V**2*(B0-H*B2))
+ ELSE
+ U=RPIH*V-2d0
+ H=2d0*U**2-1d0
+ ALFA=H+H
+ B1=0d0
+ B2=0d0
+ DO 2 I = 13,0,-1
+ B0=B(I)+ALFA*B1-B2
+ B2=B1
+ 2 B1=B0
+ H=(PI-V)*(B0-H*B2)
+ ENDIF
+ DCLAUS=S*H
+ RETURN
+ END
Index: dynnlo-v1.5-applgrid/src/Need/storedip_mass.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/storedip_mass.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/storedip_mass.f (revision 1338)
@@ -0,0 +1,23 @@
+ subroutine storedip_mass(msq_dip,msq_dipv)
+c--- this routine transfers the information on the colour
+c--- structure from a common block into separate arrays for
+c--- each parton configuration
+ implicit none
+ include 'constants.f'
+ include 'msq_cs.f'
+ include 'msqv_cs.f'
+ integer i,j,k
+ double precision
+ . msq_dip(0:2,-nf:nf,-nf:nf),msq_dipv(0:2,-nf:nf,-nf:nf)
+
+ do i=0,2
+ do j=-nf,nf
+ do k=-nf,nf
+ msq_dip(i,j,k)=msq_cs(i,j,k)
+ msq_dipv(i,j,k)=msqv_cs(i,j,k)
+ enddo
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/swapjet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/swapjet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/swapjet.f (revision 1338)
@@ -0,0 +1,21 @@
+ subroutine swapjet(pjet,jetindex,i,j)
+c--- swaps jets i..j in pjet
+ implicit none
+ include 'constants.f'
+ include 'jetlabel.f'
+ integer i,j,k,jetindex(mxpart)
+ double precision pjet(mxpart,4),tmp
+ character*2 chartmp
+
+ do k=1,4
+ tmp=pjet(i,k)
+ pjet(i,k)=pjet(j,k)
+ pjet(j,k)=tmp
+ enddo
+
+ chartmp=jetlabel(i)
+ jetlabel(i)=jetlabel(j)
+ jetlabel(j)=chartmp
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/qqb_hww_g.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/qqb_hww_g.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/qqb_hww_g.f (revision 1338)
@@ -0,0 +1,64 @@
+ subroutine qqb_hww_g(p,msq)
+ implicit none
+c----NLO matrix element for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> W^- (e^-(p5)+nubar(p6))
+c + W^+ (nu(p3)+e^+(p4))+g(p7)
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),fac
+ double precision sh,ss,tt,uu,decay,s(mxpart,mxpart)
+ double precision aw,qqb,qg,gq,gg
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ aw=gwsq/(4d0*pi)
+ call dotem(7,p,s)
+ decay=gwsq**3*wmass**2*s(5,3)*s(6,4)
+
+c-- calculate propagators
+ ss=s(1,2)
+ tt=s(1,7)
+ uu=s(2,7)
+ sh=s(1,2)+s(1,7)+s(2,7)
+
+ gg=aw*as**3*4d0*V/9d0*xn*(sh**4+ss**4+tt**4+uu**4)
+ . /(ss*tt*uu*wmass**2)
+ qqb=aw*as**3*2d0*V/9d0*(tt**2+uu**2)/(ss*wmass**2)
+ gq=-aw*as**3*2d0*V/9d0*(ss**2+tt**2)/(uu*wmass**2)
+ qg=-aw*as**3*2d0*V/9d0*(ss**2+uu**2)/(tt*wmass**2)
+
+ fac=one/((s(3,4)-wmass**2)**2+(wmass*wwidth)**2)
+ fac=fac/((s(5,6)-wmass**2)**2+(wmass*wwidth)**2)
+ fac=fac/((sh-hmass**2)**2+(hmass*hwidth)**2)
+
+
+ gg=avegg*fac*gg*decay
+ gq=aveqg*fac*gq*decay
+ qg=aveqg*fac*qg*decay
+ qqb=aveqq*fac*qqb*decay
+
+c--set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ if ((k .eq. -j) .and. (j .ne. 0)) then
+ msq(j,k)=qqb
+ elseif ((j .eq. 0) .and. (k .ne. 0)) then
+ msq(j,k)=gq
+ elseif ((j .ne. 0) .and. (k .eq. 0)) then
+ msq(j,k)=qg
+ elseif ((k .eq. 0) .and. (j .eq. 0)) then
+ msq(j,k)=gg
+ endif
+ enddo
+ enddo
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/dipolesubx.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipolesubx.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipolesubx.f (revision 1338)
@@ -0,0 +1,176 @@
+************************************************************************
+* Author: J. M. Campbell *
+* August, 2001 *
+* *
+* Replica of dipolesub.f, except for the fact that extra matrix *
+* element arrays are called in the Born term *
+* *
+* Calculates the nj-jet subtraction term corresponding to dipole *
+* nd with momentum p and dipole kinematics (ip,jp) wrt kp *
+* Automatically chooses dipole kind *
+* Returns the dipoles in sub,subv and matrix elements in msq,msqv *
+* nd labels the dipole configurations *
+* ip labels the emitter parton *
+* jp labels the emitted parton *
+* kp labels the spectator parton *
+* msq - lowest order matrix elements at rescaled momentum, msq(j,k)*
+* msqv - lowest order matrix elements at rescaled momentum *
+* with emitter contracted with appropriate vector, msqv(j,k) *
+* subr_born is the subroutine which call the born process *
+* subr_corr is the subroutine which call the born process dotted *
+* with vec for an emitted gluon only *
+* mqq - 4-quark contribution to lowest order matrix elements sqd. *
+* msqx - lowest order matrix elements with 4 indices, msqx(j,k,l,m)*
+* Sum_{l,m} msqx(j,k,l,m) = msq(j,k) *
+* mg - 2-quark contribution to lowest order matrix elements sqd, *
+* separated by colours *
+* mvg - 2-quark contribution to lowest order matrix elements sqd, *
+* separated by colours, contracted with appropriate vector *
+* mvxg - lowest order matrix elements with 4 indices and *
+* contracted with appropriate vector, msqvx(j,k,l,m) *
+* Sum_{l,m} msqvx(j,k,l,m) = msqv(j,k) *
+************************************************************************
+
+ subroutine dipsx(nd,p,ip,jp,kp,sub,subv,msq,msqv,
+ . subr_born,subr_corr,mqq,msqx,mg,mvg,mvxg)
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'qqgg.f'
+ include 'ptilde.f'
+ double precision p(mxpart,4),ptrans(mxpart,4),sub(4),subv,vecsq
+ double precision x,omx,z,omz,y,omy,u,omu,sij,sik,sjk,dot,vec(4)
+ double precision msq(-nf:nf,-nf:nf),msqv(-nf:nf,-nf:nf)
+ double precision mqq(0:2,-nf:nf,-nf:nf)
+ double precision msqx(0:2,-nf:nf,-nf:nf,-nf:nf,-nf:nf)
+ double precision mg(0:2,-nf:nf,-nf:nf)
+ double precision mvg(0:2,-nf:nf,-nf:nf)
+ double precision mvxg(-nf:nf,-nf:nf,-nf:nf,-nf:nf)
+ integer nd,ip,jp,kp,nu,j,k
+ external subr_born,subr_corr
+
+C---Initialize the dipoles to zero
+ do j=1,4
+ sub(j)=0d0
+ enddo
+
+ sij=two*dot(p,ip,jp)
+ sik=two*dot(p,ip,kp)
+ sjk=two*dot(p,jp,kp)
+
+ if ((ip .le. 2) .and. (kp .le. 2)) then
+***********************************************************************
+*************************** INITIAL-INITIAL ***************************
+***********************************************************************
+ omx=-(sij+sjk)/sik
+ x=one-omx
+
+ call transform(p,ptrans,x,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+ do nu=1,4
+ vec(nu)=p(jp,nu)-sij/sik*p(kp,nu)
+ enddo
+ vecsq=-sij*sjk/sik
+ call subr_born(ptrans,msq,mqq,msqx,mg)
+ call subr_corr(ptrans,vec,ip,msqv,mvg,mvxg)
+
+ sub(qq)=-gsq/x/sij*(two/omx-one-x)
+ sub(gq)=-gsq/sij
+ sub(qg)=-gsq/x/sij*(one-two*x*omx)
+ sub(gg)=-2d0*gsq/x/sij*(x/omx+x*omx)
+ subv =+4d0*gsq/x/sij*omx/x/vecsq
+
+***********************************************************************
+*************************** INITIAL-FINAL *****************************
+***********************************************************************
+ elseif ((ip .le. 2) .and. (kp .gt. 2)) then
+ omx=-sjk/(sij+sik)
+ x=one-omx
+ u=sij/(sij+sik)
+ omu=sik/(sij+sik)
+C---npart is the number of particles in the final state
+C---transform the momenta so that only the first npart+1 are filled
+ call transform(p,ptrans,x,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+ do nu=1,4
+ vec(nu)=p(jp,nu)/u-p(kp,nu)/omu
+ enddo
+ call subr_born(ptrans,msq,mqq,msqx,mg)
+ call subr_corr(ptrans,vec,ip,msqv,mvg,mvxg)
+ sub(qq)=-gsq/x/sij*(two/(omx+u)-one-x)
+ sub(gq)=-gsq/sij
+ sub(qg)=-gsq/x/sij*(one-two*x*omx)
+ sub(gg)=-2d0*gsq/x/sij*(one/(omx+u)-one+x*omx)
+ subv =-4d0*gsq/x/sij*(omx/x*u*(one-u)/sjk)
+ elseif ((ip .gt. 2) .and. (kp .le. 2)) then
+***********************************************************************
+*************************** FINAL-INITIAL *****************************
+***********************************************************************
+c--- note, here we assume that msq kinematics are already taken care of
+c--- for msq, although msqv must be recalculated each time
+ omx=-sij/(sjk+sik)
+ x=one-omx
+ z=sik/(sik+sjk)
+ omz=sjk/(sik+sjk)
+ do nu=1,4
+ vec(nu)=z*p(ip,nu)-omz*p(jp,nu)
+ enddo
+C---call again because vec has changed
+ do j=1,mxpart
+ do k=1,4
+ ptrans(j,k)=ptilde(nd,j,k)
+ enddo
+ enddo
+c--- do something special if we're doing W+2,Z+2jet (jp .ne. 7)
+ if (jp .ne.7) then
+ if (ip .lt. 7) then
+C ie for cases 56_i,65_i
+ call subr_corr(ptrans,vec,5,msqv,mvg,mvxg)
+ else
+C ie for cases 76_i,75_i
+ call subr_corr(ptrans,vec,6,msqv,mvg,mvxg)
+ endif
+ else
+C ie for cases 57_i,67_i
+ call subr_corr(ptrans,vec,ip,msqv,mvg,mvxg)
+ endif
+
+ sub(qq)=+gsq/x/sij*(two/(omz+omx)-one-z)
+ sub(gq)=+gsq/x/sij
+ sub(gg)=+2d0*gsq/x/sij*(one/(omz+omx)+one/(z+omx)-two)
+ subv =+4d0*gsq/x/sij/sij
+
+
+***********************************************************************
+**************************** FINAL-FINAL ******************************
+***********************************************************************
+ elseif ((ip .gt. 2) .and. (kp .gt. 2)) then
+c------Eq-(5.2)
+ y=sij/(sij+sjk+sik)
+ z=sik/(sjk+sik)
+ omz=one-z
+ omy=one-y
+C---calculate the ptrans-momenta
+
+ call transform(p,ptrans,y,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+ do nu=1,4
+ vec(nu)=z*p(ip,nu)-omz*p(jp,nu)
+ enddo
+ call subr_born(ptrans,msq,mqq,msqx,mg)
+ if (ip .lt. kp) then
+ call subr_corr(ptrans,vec,5,msqv,mvg,mvxg)
+ else
+ call subr_corr(ptrans,vec,6,msqv,mvg,mvxg)
+ endif
+
+ sub(qq)=gsq/sij*(two/(one-z*omy)-one-z)
+ sub(gq)=gsq/sij
+ sub(gg)=gsq/sij*(two/(one-z*omy)+two/(one-omz*omy)-four)
+ subv =+4d0*gsq/sij/sij
+
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/coupling.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/coupling.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/coupling.f (revision 1338)
@@ -0,0 +1,143 @@
+ subroutine coupling
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'qcdcouple.f'
+ include 'scale.f'
+ include 'nlooprun.f'
+ include 'process.f'
+ include 'ewinput.f'
+ include 'b0.f'
+ character*4 part,mypart
+ common/part/part
+ integer i,order
+ double precision aemmz,alphas,amz,cmass,bmass
+ double precision Vud,Vus,Vub,Vcd,Vcs,Vcb
+ double precision xsq,topwidth
+ character*3 inlabel(10)
+ common/cabib/Vud,Vus,Vub,
+ & Vcd,Vcs,Vcb
+ common/qmass/cmass,bmass
+ common/em/aemmz
+ common/couple/amz
+ common/mypart/mypart
+ common/nnlo/order
+
+C Only ewscheme=1 or -1 are implemented
+
+ if (ewscheme .eq. -1) then
+
+C This is the old MCFM default, corresponding to an effective
+C field theory approach valid for scales below the top-mass
+C (see Georgi, Nucl. Phys. B 363 (1991) 301).
+C
+C Equal to their input values:
+
+ Gf = Gf_inp
+ aemmz = aemmz_inp
+ wmass = wmass_inp
+ zmass = zmass_inp
+
+C Derived
+
+ xw = fourpi*aemmz/(8d0*wmass**2*Gf/rt2)
+ mt = dsqrt(16d0*pisq/3d0/rt2/Gf*(
+ . wmass**2/zmass**2/(1d0-xw)-1d0))
+
+ elseif (ewscheme .eq. 1) then
+C
+C This is the new MCFM default: Gmu scheme
+C
+C Equal to their input values:
+
+ zmass = zmass_inp
+ wmass = wmass_inp
+ Gf = Gf_inp
+
+C Derived:
+ xw = One-(wmass/zmass)**2
+ aemmz = Rt2*Gf*wmass**2*xw/pi
+
+ else
+ write(6,*) 'ewscheme=',ewscheme,' is not implemented.'
+ stop
+ endif
+
+c--- Now set up the other derived parameters
+ gwsq=fourpi*aemmz/xw
+ esq=gwsq*xw
+ gw=dsqrt(gwsq)
+ call couplz(xw)
+
+
+c--- Calculate the appropriate Higgs vacuum expectation value.
+c--- This vevsq is defined so that gwsq/(4*wmass**2)=Gf*rt2=1/vevsq
+c--- (ie differs from definition in ESW)
+ vevsq=1d0/rt2/Gf
+
+c--- Set-up twidth, using LO formula except when including radiation in decay
+ xsq=(wmass/mt)**2
+
+c--- set up the beta-function
+ b0=(xn*11d0-2d0*nf)/6d0
+
+c--- initialize the pdf set
+ nlooprun=0
+ call pdfset
+
+ cmass=dsqrt(mcsq)
+ bmass=dsqrt(mbsq)
+ musq=scale**2
+
+c--- set the number of loops to use in the running of alpha_s
+c--- if it hasn't been set by pdfset already
+ if (nlooprun.eq.0) then
+ nlooprun=order+1
+ endif
+
+c--- initialize alpha_s
+ as=alphas(abs(scale),amz,nlooprun)
+
+ ason2pi=as/twopi
+ ason4pi=as/fourpi
+ gsq=fourpi*as
+
+***************************************
+
+ write(6,99)gsq/fourpi,amz,nlooprun
+
+ 99 format(' CCCCCCCCCCC Strong coupling, alpha_s CCCCCCCCCCCC'/,
+ . ' C C'/,
+ . ' C alpha_s (mur)=',f8.5,' C'/,
+ . ' C alpha_s (mz) =',f8.5,' C'/,
+ . ' C (using ',i1,
+ . '-loop running for alpha_s) C'/,
+ . ' C C')
+
+
+
+ return
+ end
+
+
+ block data wsalam1
+ implicit none
+ include 'constants.f'
+ include 'ewcharge.f'
+ data Q(-5)/+0.333333333333333d0/
+ data Q(-4)/-0.666666666666667d0/
+ data Q(-3)/+0.333333333333333d0/
+ data Q(-2)/-0.666666666666667d0/
+ data Q(-1)/+0.333333333333333d0/
+ data Q(0)/+0d0/
+ data Q(+1)/-0.333333333333333d0/
+ data Q(+2)/+0.666666666666667d0/
+ data Q(+3)/-0.333333333333333d0/
+ data Q(+4)/+0.666666666666667d0/
+ data Q(+5)/-0.333333333333333d0/
+ data tau/1d0,-1d0,1d0,-1d0,1d0,0d0,-1d0,1d0,-1d0,1d0,-1d0/
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Need/dipoles_mass_old.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipoles_mass_old.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipoles_mass_old.f (revision 1338)
@@ -0,0 +1,726 @@
+************************************************************************
+* Author: R.K. ELLIS *
+* December 2002 *
+* *
+* Routines which return various pieces of the integrated *
+* massive subtraction terms, used in both _v and _z routines *
+* *
+* These routines are for MASSIVE dipole subtractions *
+************************************************************************
+
+************************************************************************
+* *
+* The labelling of the routines is as follows: *
+* The collinear pair is assumed to be incoming, *
+* so a reversal has to be made for the final state cases *
+* *
+* -------->------------>-------- *
+* j / i *
+* / *
+* / *
+* *
+* represented by {ii/if}_ij *
+* *
+************************************************************************
+
+***********************************************************************
+*************************** INITIAL-INITIAL ***************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ii_mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,mbar,Pqqreg,alfax
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqq=
+c-- [delta(1-x)]*(epinv*(epinv-L)+1/2*L^2+3/2*epinv-[pi]^2/6)
+c-- +(1-x)-(1+x)*(L+2*[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+
+ if (vorz .eq. 1) then
+ ii_mqq=epinv*(epinv2-L)+0.5d0*L**2-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_mqq=ii_mqq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pqqreg=-one-x
+ ii_mqq=omx+Pqqreg*(two*lomx+L-epinv)-(one+x**2)/omx*lx
+ alfax=aii/omx
+ if (alfax .lt. 1d0) ii_mqq=ii_mqq+(two/omx+Pqqreg)*dlog(alfax)
+ return
+ endif
+
+ ii_mqq=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function ii_mqg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pqgreg,alfax,mbar
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqg=(1-2*x*(1-x))*(-[ln(x)]+L+2*[ln(1-x)])+2*x*(1-x)
+ ii_mqg=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pqgreg=one-two*x*omx
+ ii_mqg=Pqgreg*(two*lomx-lx+L-epinv)+two*x*omx
+ alfax=aii/omx
+ if (alfax .lt. 1d0) ii_mqg=ii_mqg+Pqgreg*dlog(alfax)
+ endif
+ return
+ end
+
+***************************** Gluon-Quark *****************************
+ double precision function ii_mgq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pgqreg,alfax,mbar
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-quark (--> gluon) antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agq=(1+(1-x)^2)/x*(-[ln(x)]+L+2*[ln(1-x)])+x
+
+
+ ii_mgq=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pgqreg=(one+omx**2)/x
+ ii_mgq=Pgqreg*(two*lomx-lx+L-epinv)+x
+ alfax=aii/omx
+ if (alfax .lt. 1d0) ii_mgq=ii_mgq+Pgqreg*dlog(alfax)
+ return
+ endif
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ii_mgg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pggreg,alfax,mbar
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agg=(epinv*(epinv-L)+1/2*L^2+epinv*11/6-[pi]^2/6
+c-- -nf/3/xn*epinv)*[delta(1-x)]
+c-- -2*[ln(x)]/[1-x]
+c-- +2*(-1+x*(1-x)+(1-x)/x)*(-[ln(x)]+L+2*[ln(1-x)])
+c-- +(4*[ln(1-x)/(1-xp)]+2*L/[1-xp])
+
+ if (vorz .eq. 1) then
+ ii_mgg=epinv*(epinv2-L)+half*L**2-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_mgg=ii_mgg-1d0/6d0
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ Pggreg=omx/x+x*omx-one
+ lx=dlog(x)
+ ii_mgg=two*Pggreg*(two*lomx-lx+L-epinv)-two*lx/omx
+ alfax=aii/omx
+ if (alfax .lt. 1d0) ii_mgg=ii_mgg
+ . +two*(one/omx+Pggreg)*dlog(alfax)
+ return
+ endif
+
+ ii_mgg=two*(two*lomx+L-epinv)/omx
+
+ return
+ end
+
+***********************************************************************
+**************************** INITIAL-FINAL ****************************
+******************************Section 5.3******************************
+***********************************************************************
+***************************** Quark-Quark *****************************
+ double precision function if_mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,omx,lx,lomx,Pqqreg,ddilog,zp
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'alfacut.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+
+c g zipifqq=colfac*(
+c del(omx)*((epinv+log(1+mbarsq))*(epinv-L)+1/2*L**2
+c +1/2*log(1+mbarsq)**2+2*dilog(1/(1+musq))-pisq/6)
+c +Preg(q,q)/colfac*(-(epinv-L)+2*log(omx)-log(x)-log(x*mbarsq+omx))
+c +omx-2/omx*(log(x)+log(1+x*mbarsq+omx,1+mbarsq))
+c +2/omxp*(-[epinv-L]+2*log(omx)-log(1+mbarsq))
+c )-ifqq;
+
+ mbarsq=mbar**2
+ if_mqq=0d0
+ if (vorz .eq. 1) then
+c if_mqq=epinv*epinv2-epinv*L+0.5d0*L**2
+c . +(epinv-L)*dlog(1d0+mbarsq)+0.5d0*dlog(1d0+mbarsq)**2
+c . +2d0*ddilog(1d0/(1d0+mbarsq))-pisq/6d0
+ if_mqq=(epinv+dlog(1d0+mbarsq))*(epinv-L)+0.5d0*L**2
+ . +0.5d0*dlog(1d0+mbarsq)**2
+ . +2d0*ddilog(1d0/(1d0+mbarsq))-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_mqq=if_mqq-half
+ return
+ endif
+ endif
+ omx=one-x
+ lomx=dlog(omx)
+ zp=omx/(omx+mbarsq)
+ if (vorz .eq. 2) then
+ Pqqreg=-(1d0+x)
+ lx=dlog(x)
+c if_mqq=(2d0*lomx-lx-dlog(1d0-x+mbarsq)+L-epinv)*Pqqreg+Pqqpr
+c . -two/omx*(dlog((2d0-x+mbarsq)/(1d0+mbarsq))+lx)
+ if_mqq=Pqqreg*(-(epinv-L)+2d0*dlog(omx)-lx-dlog(x*mbarsq+omx))
+ . +omx-2d0/omx*(lx+dlog((1d0+x*mbarsq+omx)/(1d0+mbarsq)))
+ if (aif .lt. zp)
+ . if_mqq=if_mqq-(two/omx*(dlog(zp*(omx+aif)/(aif*(omx+zp))))
+ . +Pqqreg*dlog(zp/aif))
+ return
+ elseif (vorz .eq. 3) then
+c if_mqq=two/omx*(two*lomx+L-epinv-dlog(1d0+mbarsq))
+ if_mqq=2d0/omx*(-(epinv-L)+2d0*dlog(omx)-dlog(1d0+mbarsq))
+ endif
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function if_mgg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,mbar,mbarsq,Pggreg,ddilog,zp
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'alfacut.f'
+ include 'scheme.f'
+
+c g zipifgg=colfac*(
+c del(omx)*((epinv+log(1+mbarsq))*(epinv-L)+1/2*L**2
+c +1/2*log(1+mbarsq)**2+2*dilog(1/(1+musq))-pisq/6)
+c +Preg(g,g)/colfac*(-(epinv-L)+2*log(omx)-log(x)-log(x*mbarsq+omx))
+c +2*mbarsq*log(x*mbarsq,x*mbarsq+omx)
+c -2/omx*(log(x)+log(1+x*mbarsq+omx,1+mbarsq))
+c +2/omxp*(-[epinv-L]+2*log(omx)-log(1+mbarsq))
+c )-ifgg;
+
+ mbarsq=mbar**2
+ if_mgg=0d0
+CDTS (5.88)
+ if (vorz .eq. 1) then
+c if_mgg=epinv*epinv2-epinv*L+0.5d0*L**2
+c . +2d0*ddilog(1d0/(1d0+mbarsq))-pisq/6d0
+c . +(epinv-L)*(dlog(1d0+mbarsq))+0.5d0*(dlog(1d0+mbarsq))**2
+ if_mgg=(epinv+dlog(1d0+mbarsq))*(epinv-L)+0.5d0*L**2
+ . +0.5d0*dlog(1d0+mbarsq)**2+2d0*ddilog(1d0/(1d0+mbarsq))-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_mgg=if_mgg-1d0/6d0
+ return
+ endif
+ return
+ endif
+ omx=one-x
+ lomx=dlog(omx)
+ zp=omx/(omx+mbarsq)
+ if (vorz .eq. 2) then
+C regular contribution
+ Pggreg=2d0*(omx/x-1d0+x*omx)
+ lx=dlog(x)
+c if_mgg=(2d0*lomx-log(omx+mbarsq)+L-epinv-lx)*Pggreg
+c . -two/omx*(log((two-x+mbarsq)/(1d0+mbarsq))+lx)
+c . -2d0*mbarsq/x*log((omx+mbarsq)/mbarsq)
+ if_mgg=Pggreg*(-(epinv-L)+2d0*dlog(omx)-lx-dlog(x*mbarsq+omx))
+ . +2d0*mbarsq*dlog(x*mbarsq/(x*mbarsq+omx))
+ . -2d0/omx*(lx+dlog((1d0+x*mbarsq+omx)/(1d0+mbarsq)))
+c +Preg(g,g)/colfac*(-(epinv-L)+2*log(omx)-log(x)-log(x*mbarsq+omx))
+c +2*mbarsq*log(x*mbarsq,x*mbarsq+omx)
+c -2/omx*(log(x)+log(1+x*mbarsq+omx,1+mbarsq))
+ if (aif .lt. zp)
+ . if_mgg=if_mgg-(two/omx*(dlog(zp*(omx+aif)/(aif*(omx+zp))))
+ . +Pggreg*dlog(zp/aif))
+ return
+ elseif (vorz .eq. 3) then
+C plus contribution
+c if_mgg=two/omx*(two*lomx+L-epinv-log(1d0+mbarsq))
+ if_mgg=2d0/omx*(-(epinv-L)+2d0*dlog(omx)-dlog(1d0+mbarsq))
+ return
+ endif
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+C--- Not necessary because for off-diagonal (no soft singularity)
+C--- we always choose to use the initial spectator
+c double precision function if_mqg(x,L,mbar,vorz)
+c implicit none
+c integer vorz
+c double precision x,L,mbar,mbarsq,omx,lx,lomx,Pqgreg
+c include 'constants.f'
+c include 'epinv.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,aqg=(1-2*x*(1-x))*(L-[ln(x)]+[ln(1-x)])+2*x*(1-x)
+c
+c if_mqg=0d0
+c if ((vorz .eq. 1).or.(vorz .eq. 3)) return
+c
+c mbarsq=mbar**2
+c omx=one-x
+c lomx=dlog(omx)
+c lx=dlog(x)
+c
+c if (vorz .eq. 2) then
+c Pqgreg=one-two*x*omx
+c if_mqg=Pqgreg*(lomx-lx+L-epinv+log(omx/(omx+mbarsq)))+two*x*omx
+c endif
+c
+c return
+c end
+
+***************************** Gluon-Quark *****************************
+C--- Not necessary because for off-diagonal (no soft singularity)
+C--- we always choose to use the initial spectator
+c double precision function if_mgq(x,L,mbar,vorz)
+c implicit none
+c integer vorz
+c double precision x,L,mbar,mbarsq,omx,lx,lomx
+c include 'constants.f'
+c include 'epinv.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,agq=(1+(1-x)^2)/x*(L-[ln(x)]+[ln(1-x)])+x
+c
+c if_mgq=0d0
+c if ((vorz .eq. 1).or.(vorz .eq. 3)) return
+
+c omx=one-x
+c lomx=dlog(omx)
+c lx=dlog(x)
+
+c if (vorz .eq. 2) then
+c if_mgq=(one+omx**2)/x*(lomx-lx+L-epinv)+x
+c endif
+
+c return
+c end
+
+***********************************************************************
+**************************** FINAL-INITIAL ****************************
+*****************************Section 5.2*******************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function fi_mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,omx,ddilog,theta
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'alfacut.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqq=(epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+7/2-[pi]^2/2)*[delta(1-x)]
+c-- +2/[1-x]*[ln(2-x)]
+c-- +(-2*[ln(1-x)/(1-xp)]-3/2/[1-xp])
+
+c g zipfiqq=colfac*(
+c del(omx)*((1+log(mbarsq,1+mbarsq))*(epinv-L)
+c +1/2*log(mbarsq)-1/2*log(mbarsq)**2
+c +1/2*log(1+mbarsq)+1/2*log(1+mbarsq)**2
+c -2*log(mbarsq)*log(1+mbarsq)
+c -4*dilog(-mbarsq)+mbarsq/2/(1+mbarsq)
+c +3/2-2/3*pisq)
+c +2/omx*(log(1+x*mbarsq+omx,1+mbarsq))
+c +omx/2/(x*mbarsq+omx)**2
+c +2/omxp*(log(1+mbarsq,omx+x*mbarsq)-1)
+c )-fiqq;
+
+c--- note that the modification for afi .ne. 1d0 is, at the moment,
+c--- speculative (based on the massless case) and needs to be checked
+ theta=0d0
+ if (x .gt. 1d0-afi) theta=1d0
+
+ mbarsq=mbar**2
+ if (vorz .eq. 1) then
+CDST(5.59)
+c JaS=
+c . +epinv*(epinv2-L)+half*L**2
+c . -epinv*(epinv2-L)-half*L**2
+c . +dlog(mbarsq)*(epinv-L)-0.5d0*dlog(mbarsq)**2
+c . -0.5d0*(epinv-L-dlog(mbarsq))-pisq/6d0-2d0
+c . -(epinv-L)*(dlog(1d0+mbarsq))
+c . +1.5d0*(epinv-L)+3.5d0-half*pisq
+CDST(5.60)
+c JaNS=0.5d0*dlog(1d0+mbarsq)**2-2d0*dlog(mbarsq)*dlog(1d0+mbarsq)
+c . -4d0*ddilog(-mbarsq)+0.5d0*dlog(1d0+mbarsq)
+c . +0.5d0*mbarsq/(1d0+mbarsq)
+c fi_mqq=JaS+JaNS
+ fi_mqq=(1d0+dlog(mbarsq/(1d0+mbarsq)))*(epinv-L)
+ . +0.5d0*dlog(mbarsq)-0.5d0*dlog(mbarsq)**2
+ . +0.5d0*dlog(1d0+mbarsq)+0.5d0*dlog(1d0+mbarsq)**2
+ . -2d0*dlog(mbarsq)*dlog(1d0+mbarsq)
+ . -4d0*ddilog(-mbarsq)+mbarsq/2d0/(1d0+mbarsq)
+ . +1.5d0-2d0/3d0*pisq
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ fi_mqq=fi_mqq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+c fi_mqq=two*dlog(two-x)/omx
+ fi_mqq=2d0/omx*(dlog((1d0+x*mbarsq+omx)/(1d0+mbarsq)))
+ . +omx/2d0/(x*mbarsq+omx)**2
+ fi_mqq=fi_mqq*theta
+ return
+ endif
+
+CDST(5.58)
+ if (vorz .eq. 3) then
+c fi_mqq=-(two*dlog(omx)+1.5d0)/omx
+ fi_mqq=theta*2d0/omx*(dlog((1d0+mbarsq)/(omx+x*mbarsq))-1d0)
+ endif
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function fi_mgg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,omx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqg=(-2/3*(epinv-L)-10/9)*[delta(1-x)]
+c-- +0
+c-- +2/3/[1-xp]
+c-- Id,agg=
+c-- (2*epinv*(epinv-L)+L^2+(epinv-L)*11/3+67/9-[pi]^2)
+c-- *[delta(1-x)]
+c-- +4*[ln(2-x)]/[1-x]
+c-- +2*(-2*[ln(1-x)/(1-xp)]-11/6/[1-xp])
+
+
+ if (vorz .eq. 1) then
+ fi_mgg=two*epinv*(epinv2-L)+L**2+67d0/9d0-pisq
+ . +11d0*(epinv-L)/3d0
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ fi_mgg=fi_mgg-dfloat(nflav)/xn/3d0
+ return
+ endif
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ fi_mgg=four*dlog(two-x)/omx
+ return
+ endif
+
+ fi_mgg=-(four*dlog(omx)+11d0/3d0)/omx
+ return
+ end
+
+
+
+
+***************************** Quark-Gluon *****************************
+ double precision function fi_mqg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,omx,rt,JaS,JaNS
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+
+ mbarsq=mbar**2
+ if (1d0-4d0*mbarsq .lt. 0d0) then
+ write(6,*) 'error in fi_mqg,(1d0-4d0*mbarsq .lt. 0d0)'
+ stop
+ else
+ rt=dsqrt(1d0-4d0*mbarsq)
+ endif
+ if (vorz .eq. 1) then
+CDTS 5.63
+ JaS=-2d0/3d0*dlog(mbarsq)-10d0/9d0
+CDTS 5.64
+ JaNS=10d0/9d0*(1d0-rt)-8d0/9d0*mbarsq*rt
+ . +4d0/3d0*dlog(0.5d0*(1d0+rt))
+ fi_mqg=JaS+JaNS
+
+ elseif (vorz .eq. 2) then
+C regular
+ fi_mqg=0d0
+ elseif (vorz .eq. 3) then
+C plus at x=x+
+ omx=1d0-x
+CDTS 5.62
+ fi_mqg=2d0/3d0*(omx+2d0*mbarsq)/omx**2*sqrt(1d0-4d0*mbarsq/omx)
+ endif
+ return
+ end
+
+
+***********************************************************************
+***************************** FINAL-FINAL *****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ff_mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,Lro,ro,vtijk,arg,
+ . Ieik,Icoll,ddilog
+
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+C mbarsq=mass**2/Qsq
+C L=log(Qsq/musq)
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqq=epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+5-[pi]^2/2
+
+c g zipffqq=colfac*del(omx)*(
+c 1/vtijk*((epinv-L)*Lro-1/2*Lro**2-2*Lro*log(1-4*mbarsq)
+c +4*dilog(-ro)-6*dilog(1-ro)+pisq/3)
+c +epinv-L+3-2*log(1-2*mbar)+log(1-mbar)+1/2*log(mbarsq)
+c -2*mbar/(1-2*mbarsq)*(1-2*mbar)-mbar/(1-mbar)
+c -2*mbarsq/(1-2*mbarsq)*log(mbar/(1-mu))
+c )-ffqq;
+
+ ff_mqq=0d0
+ if (vorz .eq. 1) then
+ mbarsq=mbar**2
+ arg=1d0-4d0*mbarsq
+ if (arg .lt. 0d0) then
+ write(6,*) 'Threshold problem in ff_mqq'
+ stop
+ endif
+ vtijk=dsqrt(arg)/(1d0-2d0*mbarsq)
+ ro=dsqrt((1d0-vtijk)/(1d0+vtijk))
+ Lro=dlog(ro)
+ ff_mqq=1d0/vtijk*((epinv-L)*Lro-0.5d0*Lro**2-2d0*Lro*dlog(arg)
+ . +4d0*ddilog(-ro)-6d0*ddilog(1d0-ro)+pisq/3d0)
+ . +epinv-L+3d0
+ . -2d0*dlog(1d0-2d0*mbar)+dlog(1d0-mbar)+0.5d0*dlog(mbarsq)
+ . -2d0*mbar/(1d0-2d0*mbarsq)*(1d0-2d0*mbar)-mbar/(1d0-mbar)
+ . -2d0*mbarsq/(1d0-2d0*mbarsq)*dlog(mbar/(1d0-mbar))
+c Ieik=1d0/vtijk*(0.5d0*(epinv-L)*Lro-Lro*dlog(arg)
+c . -dlog(roj)**2+pisq/6d0
+c . +2d0*ddilog(-ro)-2d0*ddilog(1d0-ro)-ddilog(1d0-roj**2))
+c Icoll=(epinv-L)+0.5d0*Lmbarsq-2d0-2d0*dlog((1d0-mbar)**2-mbarsq)
+c . +dlog(1d0-mbar)-2d0*mbarsq/(1d0-2d0*mbarsq)*dlog(mbar/(1d0-mbar))
+c . +5d0-mbar/(1d0-mbar)-2d0*mbar*(1d0-2d0*mbar)/(1d0-2d0*mbarsq)
+c ff_mqq=2d0*Ieik+Icoll
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ff_mqq=ff_mqq-half
+ return
+ endif
+ return
+ endif
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function ff_mqg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,ro,arg
+C-----L=Log(Qsq/musq)
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c
+ ff_mqg=0d0
+ if (vorz .eq. 1) then
+ mbarsq=mbar**2
+ arg=1d0-4d0*mbarsq
+ if (arg .lt. 0d0) then
+ write(6,*) 'Threshold problem in ff_mqg'
+ stop
+ else
+ ro=dsqrt(arg)
+ ff_mqg=-2d0/3d0*(2d0*dlog(mbarsq)
+ . -2d0*dlog(0.5d0*(1d0+ro))+2d0/3d0*ro*(3d0+ro**2))
+ return
+ endif
+ endif
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ff_mgg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,Ieik,Icoll
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c Id,agg=2*epinv*(epinv-L)+L^2+11/3*(epinv-L)+100/9-[pi]^2
+
+ ff_mgg=0d0
+CDST Eq.5.32
+ if (vorz .eq. 1) then
+ Ieik=0.5d0*epinv*(epinv2-L)+0.5d0*L**2-pisq/4d0
+ Icoll=11d0/6d0*(epinv-L)+50d0/9d0
+CDST Eq.5.36 needs to be added too - need to fix this
+ Icoll=Icoll+half*dfloat(nf)/xn*(-2d0/3d0*(epinv-L)-16d0/9d0)
+ ff_mgg=2d0*(2d0*Ieik+Icoll)
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ff_mgg=ff_mgg-dfloat(nflav)/xn/3d0
+ return
+ endif
+ return
+ endif
+ return
+ end
+
+c
+c * Now write these expressions in a neater form
+c g zipffqq=colfac*del(omx)*(
+c 1/vtijk*((epinv-L)*Lro-1/2*Lro**2-2*Lro*log(1-4*mbarsq)
+c +4*dilog(-ro)-6*dilog(1-ro)+pisq/3)
+c +epinv-L+3-2*log(1-2*mbar)+log(1-mbar)+1/2*log(mbarsq)
+c -2*mbar/(1-2*mbarsq)*(1-2*mbar)-mbar/(1-mbar)
+c -2*mbarsq/(1-2*mbarsq)*log(mbar/(1-mu))
+c )-ffqq;
+
+c g zipifqq=colfac*(
+c del(omx)*((epinv+log(1+mbarsq))*(epinv-L)+1/2*L**2
+c +1/2*log(1+mbarsq)**2+2*dilog(1/(1+musq))-pisq/6)
+c +Preg(q,q)/colfac*(-(epinv-L)+2*log(omx)-log(x)-log(x*mbarsq+omx))
+c +omx-2/omx*(log(x)+log(1+x*mbarsq+omx,1+mbarsq))
+c +2/omxp*(-[epinv-L]+2*log(omx)-log(1+mbarsq))
+c )-ifqq;
+
+c g zipifgg=colfac*(
+c del(omx)*((epinv+log(1+mbarsq))*(epinv-L)+1/2*L**2
+c +1/2*log(1+mbarsq)**2+2*dilog(1/(1+musq))-pisq/6)
+c +Preg(g,g)/colfac*(-(epinv-L)+2*log(omx)-log(x)-log(x*mbarsq+omx))
+c +2*mbarsq*log(x*mbarsq,x*mbarsq+omx)
+c -2/omx*(log(x)+log(1+x*mbarsq+omx,1+mbarsq))
+c +2/omxp*(-[epinv-L]+2*log(omx)-log(1+mbarsq))
+c )-ifgg;
+
+c g zipfiqq=colfac*(
+c del(omx)*((1+log(mbarsq,1+mbarsq))*(epinv-L)
+c +1/2*log(mbarsq)-1/2*log(mbarsq)**2
+c +1/2*log(1+mbarsq)+1/2*log(1+mbarsq)**2
+c -2*log(mbarsq)*log(1+mbarsq)
+c -4*dilog(-mbarsq)+mbarsq/2/(1+mbarsq)
+c +3/2-2/3*pisq)
+c +2/omx*(log(1+x*mbarsq+omx,1+mbarsq))
+c +omx/2/(x*mbarsq+omx)**2
+c +2/omxp*(log(1+mbarsq,omx+x*mbarsq)-1)
+c )-fiqq;
Index: dynnlo-v1.5-applgrid/src/Need/setrunname.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/setrunname.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/setrunname.f (revision 1338)
@@ -0,0 +1,91 @@
+ subroutine setrunname(scalestart,fscalestart)
+ implicit none
+ include 'flags.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'jetcuts.f'
+ include 'workdir.f'
+ include 'pdlabel.f'
+ double precision scalestart,fscalestart
+ integer nlength,lenocc
+ character*30 runstring
+ character*4 part
+ character*72 outlabel1,runname,outlabeltmp
+ character*3 strmh,strscale,getstr,strpt
+ common/part/part
+ common/runstring/runstring
+ common/runname/runname
+ common/nlength/nlength
+
+ if (abs(scalestart-fscalestart) .lt. 1d0) then
+c--- if the scales are the same, use this scale as the label
+ strscale=getstr(int(scalestart))
+ else
+c--- .... otherwise, use the percentage of (muR/muF)
+ strscale=getstr(int(scalestart/fscalestart*100d0))
+ endif
+
+ if ( (case .eq. 'WHbbar')
+ . .or. (case .eq. 'ZHbbar')
+ . .or. (case .eq. 'qq_tth')
+ . .or. (case .eq. 'tottth')
+ .) then
+ strmh=getstr(int(hmass))
+ outlabel1=case//'_'//part//'_'//pdlabel//'_'//strscale//'_'//strmh
+ elseif ( (case .eq. 'H_1jet') ) then
+ strmh=getstr(int(hmass))
+ strpt=getstr(int(ptjetmin))
+ outlabel1=case//'_'//part//'_'//pdlabel//'_'//strscale//
+ . '_'//strmh//'_pt'//strpt(1:2)
+ elseif ( (case .eq. 'W_2jet')
+ . .or. (case .eq. 'Z_2jet') ) then
+ if (Gflag .eqv. .false.) then
+ outlabel1=case//'_'//part//'_'//pdlabel//'_'//strscale//'_qrk'
+ elseif (Qflag .eqv. .false.) then
+ outlabel1=case//'_'//part//'_'//pdlabel//'_'//strscale//'_glu'
+ else
+ outlabel1=case//'_'//part//'_'//pdlabel//'_'//strscale
+ endif
+ else
+ outlabel1=case//'_'//part//'_'//pdlabel//'_'//strscale
+ endif
+ nlength=lenocc(outlabel1)
+ runname=outlabel1(1:nlength)//'_'//runstring
+ nlength=lenocc(runname)
+
+c--- add working directory, if necessary
+ if (workdir .ne. '') then
+ outlabeltmp=runname
+ runname=workdir(1:lenocc(workdir))//'/'//outlabeltmp
+ nlength=nlength+1+lenocc(workdir)
+ endif
+
+ return
+ end
+
+
+ character*3 function getstr(no)
+c returns a string of length 3 from an integer
+ integer no,i1,i2,i3,zero
+
+ zero=ichar('0')
+
+ i1=abs(no)/100
+ i2=(abs(no)-i1*100)/10
+ i3=abs(no)-i1*100-i2*10
+
+ if (i1.eq.0.and.i2.eq.0) then
+ if (no .lt. 0) then
+ getstr='-'//char(i3+zero)//'_'
+ else
+ getstr=char(i3+zero)//'__'
+ endif
+ elseif(i1.eq.0) then
+ getstr=char(i2+zero)//char(i3+zero)//'_'
+ else
+ getstr=char(i1+zero)//char(i2+zero)//char(i3+zero)
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/dipoles_mass.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipoles_mass.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipoles_mass.f (revision 1338)
@@ -0,0 +1,666 @@
+************************************************************************
+* Author: J. M. Campbell *
+* April 15th, 2004 *
+* *
+* Routines which return various pieces of the integrated *
+* MASSIVE subtraction terms, used in both _v and _z routines *
+* *
+* The formulae implemented here are derived in the FORM programs *
+* testif.frm, testif_gg.frm and testfi.frm *
+* *
+* Other final-initial and all final-final dipoles are untested *
+************************************************************************
+
+************************************************************************
+* *
+* The labelling of the routines is as follows: *
+* The collinear pair is assumed to be incoming, *
+* so a reversal has to be made for the final state cases *
+* *
+* -------->------------>-------- *
+* j / i *
+* / *
+* / *
+* *
+* represented by {ii/if}_ij *
+* *
+************************************************************************
+
+***********************************************************************
+*************************** Initial-INITIAL ***************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ii_mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,mbar,Pqqreg,alfax
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+
+ if (vorz .eq. 1) then
+ ii_mqq=epinv*(epinv2-L)+0.5d0*L**2-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_mqq=ii_mqq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pqqreg=-one-x
+ ii_mqq=omx+Pqqreg*(two*lomx+L-epinv)-(one+x**2)/omx*lx
+ alfax=aii/omx
+ if (alfax .lt. 1d0) ii_mqq=ii_mqq+(two/omx+Pqqreg)*dlog(alfax)
+ return
+ endif
+
+ ii_mqq=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function ii_mqg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pqgreg,alfax,mbar
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-quark antenna, either
+
+ ii_mqg=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pqgreg=one-two*x*omx
+ ii_mqg=Pqgreg*(two*lomx-lx+L-epinv)+two*x*omx
+ alfax=aii/omx
+ if (alfax .lt. 1d0) ii_mqg=ii_mqg+Pqgreg*dlog(alfax)
+ endif
+ return
+ end
+
+***************************** Gluon-Quark *****************************
+ double precision function ii_mgq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pgqreg,alfax,mbar
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-quark (--> gluon) antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+
+ ii_mgq=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pgqreg=(one+omx**2)/x
+ ii_mgq=Pgqreg*(two*lomx-lx+L-epinv)+x
+ alfax=aii/omx
+ if (alfax .lt. 1d0) ii_mgq=ii_mgq+Pgqreg*dlog(alfax)
+ return
+ endif
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ii_mgg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pggreg,alfax,mbar
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+
+ if (vorz .eq. 1) then
+ ii_mgg=epinv*(epinv2-L)+half*L**2-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_mgg=ii_mgg-1d0/6d0
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ Pggreg=omx/x+x*omx-one
+ lx=dlog(x)
+ ii_mgg=two*Pggreg*(two*lomx-lx+L-epinv)-two*lx/omx
+ alfax=aii/omx
+ if (alfax .lt. 1d0) ii_mgg=ii_mgg
+ . +two*(one/omx+Pggreg)*dlog(alfax)
+ return
+ endif
+
+ ii_mgg=two*(two*lomx+L-epinv)/omx
+
+ return
+ end
+
+***********************************************************************
+**************************** INITIAL-FINAL ****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function if_mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,omx,lx,lomx,Pqqreg,ddilog,zp
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+
+ mbarsq=mbar**2
+ if_mqq=0d0
+ if (vorz .eq. 1) then
+ if_mqq=(epinv+dlog(1d0+mbarsq))*(epinv-L)+half*L**2
+ . -half*dlog(1d0+mbarsq)**2+2d0*dlog(mbarsq)*dlog(1d0+mbarsq)
+ . +2d0*ddilog(-mbarsq)+pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_mqq=if_mqq-half
+ return
+ endif
+ endif
+ omx=one-x
+ lomx=dlog(omx)
+ zp=omx/(omx+mbarsq)
+ if (vorz .eq. 2) then
+ Pqqreg=-(1d0+x)
+ lx=dlog(x)
+ if_mqq=Pqqreg*(-(epinv-L)+2d0*lomx-lx-dlog(x*mbarsq+omx))
+ . +omx-2d0/omx*(lx+dlog((1d0+x*mbarsq+omx)/(1d0+mbarsq)))
+ if (aif .lt. zp) then
+ if_mqq=if_mqq-(two/omx*(dlog(zp*(omx+aif)/(aif*(omx+zp))))
+ . +Pqqreg*dlog(zp/aif))
+ endif
+ elseif (vorz .eq. 3) then
+ if_mqq=2d0/omx*(-(epinv-L)+2d0*lomx-dlog(1d0+mbarsq))
+ endif
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function if_mgg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,mbar,mbarsq,Pggreg,ddilog,zp
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+ include 'scheme.f'
+
+ mbarsq=mbar**2
+ if_mgg=0d0
+
+ if (vorz .eq. 1) then
+ if_mgg=(epinv+dlog(1d0+mbarsq))*(epinv-L)+half*L**2
+ . -half*dlog(1d0+mbarsq)**2+2d0*dlog(mbarsq)*dlog(1d0+mbarsq)
+ . +2d0*ddilog(-mbarsq)+pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_mgg=if_mgg-1d0/6d0
+ return
+ endif
+ return
+ endif
+ omx=one-x
+ zp=omx/(omx+mbarsq)
+ if (vorz .eq. 2) then
+ Pggreg=2d0*(omx/x-1d0+x*omx)
+ lx=dlog(x)
+ if_mgg=Pggreg*(-(epinv-L)+2d0*dlog(omx)-lx-dlog(x*mbarsq+omx))
+ . +2d0*mbarsq*dlog(x*mbarsq/(x*mbarsq+omx))
+ . -2d0/omx*(lx+dlog((1d0+x*mbarsq+omx)/(1d0+x*mbarsq)))
+ if (aif .lt. zp) then
+ if (aif .eq. 1d0) then
+ write(6,*) 'zp > 1 in dipoles_mass.f - this is forbidden'
+ stop
+ endif
+ if_mgg=if_mgg-(two/omx*(dlog(zp*(omx+aif)/(aif*(omx+zp))))
+ . +Pggreg*dlog(zp/aif)+2d0*mbarsq*dlog((1d0-zp)/(1d0-aif)))
+ endif
+ return
+ elseif (vorz .eq. 3) then
+ if_mgg=2d0/omx*(-(epinv-L)+2d0*dlog(omx)-dlog(1d0+x*mbarsq))
+ return
+ endif
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+c--- Not necessary because for off-diagonal (no soft singularity)
+c--- we always choose to use the initial spectator
+
+***************************** Gluon-Quark *****************************
+c--- Not necessary because for off-diagonal (no soft singularity)
+c--- we always choose to use the initial spectator
+
+
+***********************************************************************
+**************************** FINAL-INITIAL ****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function fi_mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,omx,ddilog
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+
+ mbarsq=mbar**2
+ if (vorz .eq. 1) then
+ fi_mqq=(1d0+dlog(mbarsq/(1d0+mbarsq)))*(epinv-L)
+ . +dlog(mbarsq)+half*dlog(mbarsq)**2
+ . +half*dlog(1d0+mbarsq)**2
+ . -2d0*dlog(mbarsq)*dlog(1d0+mbarsq)
+ . -2d0*ddilog(-mbarsq)
+ . +2d0-pisq/3d0
+ . +2d0*dlog(afi)*(dlog((1d0+mbarsq)/mbarsq)-1d0)
+ return
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ if (x .gt. 1d0-afi) then
+ fi_mqq=+omx/2d0/(x*mbarsq+omx)**2
+ . +2d0/omx*(dlog((1d0+x*mbarsq+omx)*mbarsq/
+ . ((1d0+mbarsq)*(omx+x*mbarsq))))
+ else
+ fi_mqq=0d0
+ endif
+ return
+ endif
+
+ if (vorz .eq. 3) then
+ if (x .gt. 1d0-afi) then
+ fi_mqq=2d0/omx*(dlog((1d0+mbarsq)/(mbarsq))-1d0)
+ else
+ fi_mqq=0d0
+ endif
+ endif
+
+ return
+ end
+
+
+
+************************************************************************
+************************************************************************
+* BELOW HERE FUNCTIONS HAVE NOT BEEN CHECKED *
+************************************************************************
+************************************************************************
+
+
+***************************** Gluon-Gluon *****************************
+ double precision function fi_mgg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,omx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqg=(-2/3*(epinv-L)-10/9)*[delta(1-x)]
+c-- +0
+c-- +2/3/[1-xp]
+c-- Id,agg=
+c-- (2*epinv*(epinv-L)+L^2+(epinv-L)*11/3+67/9-[pi]^2)
+c-- *[delta(1-x)]
+c-- +4*[ln(2-x)]/[1-x]
+c-- +2*(-2*[ln(1-x)/(1-xp)]-11/6/[1-xp])
+
+
+ if (vorz .eq. 1) then
+ fi_mgg=two*epinv*(epinv2-L)+L**2+67d0/9d0-pisq
+ . +11d0*(epinv-L)/3d0
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ fi_mgg=four*dlog(two-x)/omx
+ return
+ endif
+
+ fi_mgg=-(four*dlog(omx)+11d0/3d0)/omx
+ return
+ end
+
+
+
+
+***************************** Quark-Gluon *****************************
+ double precision function fi_mqg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,omx,rt,JaS,JaNS
+ include 'constants.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+
+ mbarsq=mbar**2
+ if (1d0-4d0*mbarsq .lt. 0d0) then
+ write(6,*) 'error in fi_mqg,(1d0-4d0*mbarsq .lt. 0d0)'
+ stop
+ else
+ rt=dsqrt(1d0-4d0*mbarsq)
+ endif
+ if (vorz .eq. 1) then
+CDTS 5.63
+ JaS=-2d0/3d0*dlog(mbarsq)-10d0/9d0
+CDTS 5.64
+ JaNS=10d0/9d0*(1d0-rt)-8d0/9d0*mbarsq*rt
+ . +4d0/3d0*dlog(half*(1d0+rt))
+ fi_mqg=JaS+JaNS
+
+ elseif (vorz .eq. 2) then
+C regular
+ fi_mqg=0d0
+ elseif (vorz .eq. 3) then
+C plus at x=x+
+ omx=1d0-x
+CDTS 5.62
+ fi_mqg=2d0/3d0*(omx+2d0*mbarsq)/omx**2*sqrt(1d0-4d0*mbarsq/omx)
+ endif
+ return
+ end
+
+
+***********************************************************************
+***************************** FINAL-FINAL *****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ff_1mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,ddilog,afftmp
+ . ,Icolla,Ieika,Icollb,Ieikb,arg,ommsq,logm,logomm,xp,yp
+ . ,arg1,arg2,arg3,ypp,ypm
+
+
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+ include 'phi.f'
+
+ ff_1mqq=0d0
+ phi=1d0
+
+
+ if (vorz .eq. 1) then
+ if (mbar .gt. 1d0) then
+ write(6,*) 'Problem with mbar in ff_1mqq, mbar=',mbar
+ stop
+ endif
+
+
+ mbarsq=mbar**2
+ ommsq=1d0-mbarsq
+ logm=log(mbarsq)
+ logomm=log(ommsq)
+
+C----radiation from massive line with massless spectator
+ afftmp=aff
+ arg=afftmp+(1d0-afftmp)*mbarsq
+ Ieika=
+ . half*logm*(epinv-L)-2d0*ddilog(ommsq)
+ . -logm*logomm-0.25d0*logm**2
+ . -log(afftmp)*logm-ddilog(-ommsq/mbarsq)
+ . +ddilog(-afftmp*ommsq/mbarsq)
+ Icolla=
+ . epinv-L+phi+2d0+(1d0+half*phi)*logm
+ . +(phi-2d0)*logm/(ommsq)-2d0*logomm
+ . +half*phi*(3d0*afftmp-2d0-(3d0-mbarsq)/ommsq*log(arg)
+ . -afftmp/arg)
+ . -2d0*log(afftmp)+2d0*log(arg)/ommsq
+
+
+C----radiation from massless line with massive spectator
+ yp=(1d0-mbar)/(1d0+mbar)
+ afftmp=aff*yp
+ xp=(yp-afftmp)+dsqrt((yp-afftmp)*(1d0/yp-afftmp))
+ arg1=0.25d0*(1d0-yp**2+2*xp*yp)
+ arg2=half*(1d0+YP-xp)
+ arg3=half*(1d0-YP+xp)
+ ypp=half*(1d0+yp)
+ ypm=half*(1d0-yp)
+
+ Ieikb=0d0
+ . +half*epinv*epinv2-half*epinv*L+0.25d0*L**2
+ . -logomm*(epinv-L)
+ . +ddilog(ommsq)-2.5d0*pisqo6+logomm**2
+ . +half*log(arg1/(arg2*arg3))**2-LOG(arg2/ypp)**2
+ . +2d0*(LOG(ypp)*LOG(arg3/ypm)+LOG(ypp/yp)*LOG(arg1/(ypp*ypm))
+ . +DDILOG(ypm/ypp)-DDILOG(arg1/ypp**2)
+ . +DDILOG(arg3)-DDILOG(ypm))
+
+ Icollb=1.5d0*(epinv-L)-3d0*log(1d0-mbar)+5d0-mbar/(1d0-mbar)
+ . -2d0*mbar*(1d0-2d0*mbar)/ommsq
+ . +1.5d0*(LOG(YP/afftmp)-YP+afftmp)
+
+c--- Note: extra factor of half because we include this term once for each
+c--- leg, but this is the sum of both legs
+ ff_1mqq=half*(2d0*(Ieika+Ieikb)+Icolla+Icollb)
+
+
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+c--- Note: extra factor of half because we include this term once for each
+c--- leg, but this is the sum of both legs (as above)
+ ff_1mqq=ff_1mqq-half*half
+ return
+ endif
+ endif
+
+ return
+ end
+
+
+
+
+***************************** Quark-Quark *****************************
+ double precision function ff_mqq(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,Lro,ro,vtijk,arg,ddilog
+
+ include 'constants.f'
+ include 'epinv.f'
+C mbarsq=mass**2/Qsq
+C L=log(Qsq/musq)
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqq=epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+5-[pi]^2/2
+
+c g zipffqq=colfac*del(omx)*(
+c 1/vtijk*((epinv-L)*Lro-1/2*Lro**2-2*Lro*log(1-4*mbarsq)
+c +4*dilog(-ro)-6*dilog(1-ro)+pisq/3)
+c +epinv-L+3-2*log(1-2*mbar)+log(1-mbar)+1/2*log(mbarsq)
+c -2*mbar/(1-2*mbarsq)*(1-2*mbar)-mbar/(1-mbar)
+c -2*mbarsq/(1-2*mbarsq)*log(mbar/(1-mu))
+c )-ffqq;
+
+ ff_mqq=0d0
+ if (vorz .eq. 1) then
+ mbarsq=mbar**2
+ arg=1d0-4d0*mbarsq
+ if (arg .lt. 0d0) then
+ write(6,*) 'Threshold problem in ff_mqq'
+ stop
+ endif
+ vtijk=dsqrt(arg)/(1d0-2d0*mbarsq)
+ ro=dsqrt((1d0-vtijk)/(1d0+vtijk))
+ Lro=dlog(ro)
+ ff_mqq=1d0/vtijk*((epinv-L)*Lro-half*Lro**2-2d0*Lro*dlog(arg)
+ . +4d0*ddilog(-ro)-6d0*ddilog(1d0-ro)+pisq/3d0)
+ . +epinv-L+3d0
+ . -2d0*dlog(1d0-2d0*mbar)+dlog(1d0-mbar)+half*dlog(mbarsq)
+ . -2d0*mbar/(1d0-2d0*mbarsq)*(1d0-2d0*mbar)-mbar/(1d0-mbar)
+ . -2d0*mbarsq/(1d0-2d0*mbarsq)*dlog(mbar/(1d0-mbar))
+c Ieik=1d0/vtijk*(half*(epinv-L)*Lro-Lro*dlog(arg)
+c . -dlog(roj)**2+pisq/6d0
+c . +2d0*ddilog(-ro)-2d0*ddilog(1d0-ro)-ddilog(1d0-roj**2))
+c Icoll=(epinv-L)+half*Lmbarsq-2d0-2d0*dlog((1d0-mbar)**2-mbarsq)
+c . +dlog(1d0-mbar)-2d0*mbarsq/(1d0-2d0*mbarsq)*dlog(mbar/(1d0-mbar))
+c . +5d0-mbar/(1d0-mbar)-2d0*mbar*(1d0-2d0*mbar)/(1d0-2d0*mbarsq)
+c ff_mqq=2d0*Ieik+Icoll
+ return
+ endif
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function ff_mqg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,mbarsq,ro,arg
+C-----L=Log(Qsq/musq)
+ include 'constants.f'
+
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c
+ ff_mqg=0d0
+ if (vorz .eq. 1) then
+ mbarsq=mbar**2
+ arg=1d0-4d0*mbarsq
+ if (arg .lt. 0d0) then
+ write(6,*) 'Threshold problem in ff_mqg'
+ stop
+ else
+ ro=dsqrt(arg)
+ ff_mqg=-2d0/3d0*(2d0*dlog(mbarsq)
+ . -2d0*dlog(half*(1d0+ro))+2d0/3d0*ro*(3d0+ro**2))
+ return
+ endif
+ endif
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ff_mgg(x,L,mbar,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,mbar,Ieik,Icoll
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c Id,agg=2*epinv*(epinv-L)+L^2+11/3*(epinv-L)+100/9-[pi]^2
+
+ ff_mgg=0d0
+CDST Eq.5.32
+ if (vorz .eq. 1) then
+ Ieik=half*epinv*(epinv2-L)+half*L**2-pisq/4d0
+ Icoll=11d0/6d0*(epinv-L)+50d0/9d0
+CDST Eq.5.36 needs to be added too - need to fix this
+ Icoll=Icoll+half*dfloat(nf)/xn*(-2d0/3d0*(epinv-L)-16d0/9d0)
+ ff_mgg=2d0*(2d0*Ieik+Icoll)
+ return
+ endif
+ return
+ end
+
+c
+c * Now write these expressions in a neater form
+c g zipffqq=colfac*del(omx)*(
+c 1/vtijk*((epinv-L)*Lro-1/2*Lro**2-2*Lro*log(1-4*mbarsq)
+c +4*dilog(-ro)-6*dilog(1-ro)+pisq/3)
+c +epinv-L+3-2*log(1-2*mbar)+log(1-mbar)+1/2*log(mbarsq)
+c -2*mbar/(1-2*mbarsq)*(1-2*mbar)-mbar/(1-mbar)
+c -2*mbarsq/(1-2*mbarsq)*log(mbar/(1-mu))
+c )-ffqq;
+
+c g zipifqq=colfac*(
+c del(omx)*((epinv+log(1+mbarsq))*(epinv-L)+1/2*L**2
+c +1/2*log(1+mbarsq)**2+2*dilog(1/(1+musq))-pisq/6)
+c +Preg(q,q)/colfac*(-(epinv-L)+2*log(omx)-log(x)-log(x*mbarsq+omx))
+c +omx-2/omx*(log(x)+log(1+x*mbarsq+omx,1+mbarsq))
+c +2/omxp*(-[epinv-L]+2*log(omx)-log(1+mbarsq))
+c )-ifqq;
+
+c g zipifgg=colfac*(
+c del(omx)*((epinv+log(1+mbarsq))*(epinv-L)+1/2*L**2
+c +1/2*log(1+mbarsq)**2+2*dilog(1/(1+musq))-pisq/6)
+c +Preg(g,g)/colfac*(-(epinv-L)+2*log(omx)-log(x)-log(x*mbarsq+omx))
+c +2*mbarsq*log(x*mbarsq,x*mbarsq+omx)
+c -2/omx*(log(x)+log(1+x*mbarsq+omx,1+mbarsq))
+c +2/omxp*(-[epinv-L]+2*log(omx)-log(1+mbarsq))
+c )-ifgg;
+
+c g zipfiqq=colfac*(
+c del(omx)*((1+log(mbarsq,1+mbarsq))*(epinv-L)
+c +1/2*log(mbarsq)-1/2*log(mbarsq)**2
+c +1/2*log(1+mbarsq)+1/2*log(1+mbarsq)**2
+c -2*log(mbarsq)*log(1+mbarsq)
+c -4*dilog(-mbarsq)+mbarsq/2/(1+mbarsq)
+c +3/2-2/3*pisq)
+c +2/omx*(log(1+x*mbarsq+omx,1+mbarsq))
+c +omx/2/(x*mbarsq+omx)**2
+c +2/omxp*(log(1+mbarsq,omx+x*mbarsq)-1)
+c )-fiqq;
+
Index: dynnlo-v1.5-applgrid/src/Need/dipolesub.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipolesub.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipolesub.f (revision 1338)
@@ -0,0 +1,262 @@
+************************************************************************
+* Author: J. M. Campbell *
+* August, 1999 *
+* Calculates the nj-jet subtraction term corresponding to dipole *
+* nd with momentum p and dipole kinematics (ip,jp) wrt kp *
+* Automatically chooses dipole kind *
+* Returns the dipoles in sub,subv and matrix elements in msq,msqv *
+* nd labels the dipole configurations *
+* ip labels the emitter parton *
+* jp labels the emitted parton *
+* kp labels the spectator parton *
+* subr_born is the subroutine which call the born process *
+* subr_corr is the subroutine which call the born process dotted *
+* with vec for an emitted gluon only *
+************************************************************************
+
+CC Modification in final-initial dipoles
+
+ subroutine dips(nd,p,ip,jp,kp,sub,subv,msq,msqv,
+ . subr_born,subr_corr)
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'qqgg.f'
+ include 'ptilde.f'
+ include 'alfacut.f'
+ include 'process.f'
+ include 'dynamicscale.f'
+c include 'initialscales.f'
+ include 'dipolescale.f'
+ include 'facscale.f'
+ double precision p(mxpart,4),ptrans(mxpart,4),sub(4),subv,vecsq
+ double precision x,omx,z,omz,y,omy,u,omu,sij,sik,sjk,dot,vec(4)
+ double precision msq(-nf:nf,-nf:nf),msqv(-nf:nf,-nf:nf),vtilde,q2d
+ integer nd,ip,jp,kp,nu,j,k
+ integer ndec
+c-- logical includedipole
+ logical incldip(0:maxd)
+ common/incldip/incldip
+ external subr_born,subr_corr
+
+C Added for Drell-Yan
+
+
+
+
+
+ ndec=2
+
+C---Initialize the dipoles to zero
+ do j=1,4
+ sub(j)=0d0
+ enddo
+ subv=0d0
+ call zeromsq(msq,msqv)
+
+ sij=two*dot(p,ip,jp)
+ sik=two*dot(p,ip,kp)
+ sjk=two*dot(p,jp,kp)
+
+ if ((ip .le. 2) .and. (kp .le. 2)) then
+***********************************************************************
+*************************** INITIAL-INITIAL ***************************
+***********************************************************************
+ omx=-(sij+sjk)/sik
+ x=one-omx
+ vtilde=sij/sik
+
+C---Modification so that only close to singular subtracted
+ if (-vtilde .gt. aii) then
+ incldip(nd)=.false.
+ return
+ endif
+
+ call transform(p,ptrans,x,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+
+c-- Check to see if this dipole will be included
+c incldip(nd)=includedipole(nd,ptrans)
+C--if not return
+c if (incldip(nd) .eqv. .false.) return
+
+ do nu=1,4
+ vec(nu)=p(jp,nu)-vtilde*p(kp,nu)
+ enddo
+ vecsq=-sij*sjk/sik
+
+c--- if using a dynamic scale, set that scale with dipole kinematics
+ q2d=2*dot(ptrans,3,4)
+ if (dynamicscale) then
+ call scaleset(q2d)
+ dipscale(nd)=facscale
+ endif
+
+ call subr_born(ptrans,msq)
+ call subr_corr(ptrans,vec,ip,msqv)
+
+ sub(qq)=-gsq/x/sij*(two/omx-one-x)
+ sub(gq)=-gsq/sij
+ sub(qg)=-gsq/x/sij*(one-two*x*omx)
+ sub(gg)=-2d0*gsq/x/sij*(x/omx+x*omx)
+ subv =+4d0*gsq/x/sij*omx/x/vecsq
+
+***********************************************************************
+*************************** INITIAL-FINAL *****************************
+***********************************************************************
+ elseif ((ip .le. 2) .and. (kp .gt. 2)) then
+ u=sij/(sij+sik)
+
+ omx=-sjk/(sij+sik)
+ x=one-omx
+ omu=sik/(sij+sik)
+C---npart is the number of particles in the final state
+C---transform the momenta so that only the first npart+1 are filled
+ call transform(p,ptrans,x,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+
+c-- Check to see if this dipole will be included
+c incldip(nd)=includedipole(nd,ptrans)
+C-- if not return
+c if (incldip(nd) .eqv. .false.) return
+
+c--- if using a dynamic scale, set that scale with dipole kinematics
+ q2d=2*dot(ptrans,3,4)
+ if (dynamicscale) then
+ call scaleset(q2d)
+ dipscale(nd)=facscale
+ endif
+
+c--- Calculate the matrix element now because it might be needed
+c--- in the final-initial segment, regardless of whether or not the
+c--- alfa cut fails here
+ call subr_born(ptrans,msq)
+C---Modification so that only close to singular subtracted
+C---Do not set incldip because initial-final can fail
+C---but final initial needs still to be tested
+
+ if ((case .eq. 'H_1jet') .and. (ip.eq.1) .and. (jp.eq.6)) then
+c--- do nothing
+ else
+ if (u .gt. aif) return
+ endif
+
+ do nu=1,4
+ vec(nu)=p(jp,nu)/u-p(kp,nu)/omu
+ enddo
+
+ call subr_corr(ptrans,vec,ip,msqv)
+ sub(qq)=-gsq/x/sij*(two/(omx+u)-one-x)
+ sub(gq)=-gsq/sij
+ sub(qg)=-gsq/x/sij*(one-two*x*omx)
+ sub(gg)=-2d0*gsq/x/sij*(one/(omx+u)-one+x*omx)
+ subv =-4d0*gsq/x/sij*(omx/x*u*(one-u)/sjk)
+ elseif ((ip .gt. 2) .and. (kp .le. 2)) then
+***********************************************************************
+*************************** FINAL-INITIAL *****************************
+***********************************************************************
+c-- Check to see if this dipole will be included - should have been
+c-- already determined at this point in the initial-final phase
+c if (incldip(nd) .eqv. .false.) return
+
+c--- note, here we assume that msq kinematics are already taken care of
+c--- for msq, although msqv must be recalculated each time
+ omx=-sij/(sjk+sik)
+C---Modification so that only close to singular subtracted
+ if (omx .gt. afi) return
+
+ x=one-omx
+ z=sik/(sik+sjk)
+ omz=sjk/(sik+sjk)
+ do nu=1,4
+ vec(nu)=z*p(ip,nu)-omz*p(jp,nu)
+ enddo
+C---call msqv again because vec has changed
+ do j=1,mxpart
+ do k=1,4
+ ptrans(j,k)=ptilde(nd,j,k)
+ enddo
+ enddo
+
+c--- if using a dynamic scale, set that scale with dipole kinematics
+ q2d=2*dot(ptrans,3,4)
+ if (dynamicscale) then
+ call scaleset(q2d)
+ dipscale(nd)=facscale
+ endif
+
+CC Here modification to deal with H->3456 (Check it !)
+
+c--- do something special if we're doing W+2,Z+2jet (jp .ne. 7)
+ if (jp .ne.(5+ndec)) then
+ if (ip .lt. (5+ndec)) then
+C ie for cases 56_i,65_i
+ call subr_corr(ptrans,vec,3+ndec,msqv)
+ else
+C ie for cases 76_i,75_i
+ call subr_corr(ptrans,vec,4+ndec,msqv)
+ endif
+ else
+C ie for cases 57_i,67_i
+ call subr_corr(ptrans,vec,ip,msqv)
+ endif
+
+ sub(qq)=+gsq/x/sij*(two/(omz+omx)-one-z)
+ sub(gq)=+gsq/x/sij
+ sub(gg)=+2d0*gsq/x/sij*(one/(omz+omx)+one/(z+omx)-two)
+ subv =+4d0*gsq/x/sij/sij
+
+
+***********************************************************************
+**************************** FINAL-FINAL ******************************
+***********************************************************************
+ elseif ((ip .gt. 2) .and. (kp .gt. 2)) then
+c------Eq-(5.2)
+ y=sij/(sij+sjk+sik)
+
+C---Modification so that only close to singular subtracted
+ if (y .gt. aff) then
+ incldip(nd)=.false.
+ return
+ endif
+
+ z=sik/(sjk+sik)
+ omz=one-z
+ omy=one-y
+C---calculate the ptrans-momenta
+
+ call transform(p,ptrans,y,ip,jp,kp)
+ call storeptilde(nd,ptrans)
+
+c-- Check to see if this dipole will be included
+c incldip(nd)=includedipole(nd,ptrans)
+c if (incldip(nd) .eqv. .false.) return
+
+ do nu=1,4
+ vec(nu)=z*p(ip,nu)-omz*p(jp,nu)
+ enddo
+
+c--- if using a dynamic scale, set that scale with dipole kinematics
+ q2d=2*dot(ptrans,3,4)
+ if (dynamicscale) then
+ call scaleset(q2d)
+ dipscale(nd)=facscale
+ endif
+
+ call subr_born(ptrans,msq)
+ if (ip .lt. kp) then
+ call subr_corr(ptrans,vec,5,msqv)
+ else
+ call subr_corr(ptrans,vec,6,msqv)
+ endif
+
+ sub(qq)=gsq/sij*(two/(one-z*omy)-one-z)
+ sub(gq)=gsq/sij
+ sub(gg)=gsq/sij*(two/(one-z*omy)+two/(one-omz*omy)-four)
+ subv =+4d0*gsq/sij/sij
+
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/dittdrein.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dittdrein.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dittdrein.f (revision 1338)
@@ -0,0 +1,35 @@
+ subroutine dittdrein(p,l1,l2,costhdd)
+ implicit none
+ include 'constants.f'
+ integer j,l1,l2
+ double precision costhdd,p(mxpart,4),pt,ptem,ptep,xl
+ double precision pem(4),pep(4),psum(4)
+ double precision p_cm(4)
+
+ do j=1,4
+ pem(j)=p(l1,j)
+ pep(j)=p(l2,j)
+ psum(j)=pem(j)+pep(j)
+ enddo
+
+ ptem=pt(l1,p)
+ ptep=pt(l2,p)
+
+
+ if (ptem .gt. ptep) then
+ call boosta(psum,pem,p_cm)
+ else
+ call boosta(psum,pep,p_cm)
+ endif
+
+ xl=sqrt((psum(1)**2+psum(2)**2+psum(3)**2)
+ . *(p_cm(1)**2+p_cm(2)**2+p_cm(3)**2))
+ costhdd=(p_cm(1)*psum(1)+p_cm(2)*psum(2)+p_cm(3)*psum(3))/xl
+
+ return
+ end
+
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Need/a06.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/a06.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/a06.f (revision 1338)
@@ -0,0 +1,269 @@
+ subroutine a06(xb,q2,PDFS,DPDFS,NPDF,NPAR)
+c
+c This is a code for the NNLO parton distributions
+c in the variable-flavor-number (VFN) schem with account
+c of their experimental and theoretical uncertainties.
+c The Q**2 range is 0.8d0 < Q**2 < 2d8, the x range is 1d-7 < x < 1d0
+c (for the values of PDFs and strong coupling constant at Q2 < 0.8 GeV^2
+c (x < 1d-7) their values at Q^2 = 0.8 GeV^2 (x = 1d-7) are returned).
+c
+c Output parameters:
+c The array PDFS contains fitted values of the strong coupling constant
+c and the parton distributions at given x and Q:
+c PDFS(0) -- \alpha_s
+c PDFS(1) -- valence u-quarks
+c PDFS(2) -- valence d-quarks
+c PDFS(3) -- gluons
+c PDFS(4) -- sea u-quarks
+c PDFS(5) -- s-quarks
+c PDFS(6) -- sea d-quarks
+c PDFS(7) -- c-quarks
+c PDFS(8) -- b-quarks
+c PDFS(9) -- t-quarks
+c NPDF is the number of PDFs returned (NPDF=9 for the VFN scheme).
+c Output array DPDFS(0:npdf,npar) contains derivatives of \alpha_s and
+c the PDFs on the fitted parameters with the number of the parameters
+c returned in NPAR. With the derivatives of \alpha_s included one can take
+c into account the correlations of the fitted PDFs with \alpha_s as well.
+c All derivatives are transformed to the orthonormal
+c basis of eigenvectors of the parameters error matrix. For this reason
+c the variation of the PDFs in the derivatives directions can be performed
+c independently. For example the dispersion of the i-th PDF can be stored
+c in DELPDF using the code
+c
+c-----------------
+c DELPDF=0.
+c do k=1,npar
+c DELPDF=DELPDF+dpdfs(i,k)**2
+c end do
+c-----------------
+c and its random value can be stored in RPDF using the code
+c-----------------
+c RPDF=pdfs(i)
+c do k=1,npar
+c s=0.
+c do l=1,96
+c s=s+(2*rndm(xxx)-1)/sqrt(32.)
+c end do
+c RPDF=RPDF+s*dpdfs(i,k)
+c end do
+c-----------------
+c
+c Reference: Phys. Rev. D74, 054033 (2006) [hep-ph/0606237]
+c
+c Comments: Sergey.Alekhin@ihep.ru
+c
+c Initial version: Dec 2006
+
+ implicit none
+
+ integer nxb,nq,np,nvar
+ parameter(nxb=99,nq=20,np=9,nvar=23)
+
+ integer k,i,n,m,kx,nxbb
+ integer NPDF,NPAR,KORD,KSCHEM
+
+ integer nexp(0:np)
+
+ real*8 f(nxb,nq+1,0:np),xx(nxb)
+ real*8 fsp(nxb),bs(nxb),cs(nxb),ds(nxb)
+ real*8 bsp(nxb,nq+1,0:np),csp(nxb,nq+1,0:np),dsp(nxb,nq+1,0:np)
+ real*8 bspd(nvar,nxb,nq+1,0:np),cspd(nvar,nxb,nq+1,0:np)
+ , ,dspd(nvar,nxb,nq+1,0:np)
+ real*8 pdfs(0:np),dpdfs(0:np,nvar)
+ real*8 df(nvar,0:np,nxb,nq+1)
+ real*8 x,qsq,dels,delx,x1,delx1,xlog1,xd,b,aa,ss,f0,fp,fm
+ real*8 xb,q2,df0,dfp,dfm
+
+ character pdford*1
+ dimension pdford(3)
+ character pdfschem*3
+ dimension pdfschem(0:1)
+
+ real*8 xmin,xmax,qsqmin,qsqmax
+ integer kords,kschems
+
+c I/O channel to read the data
+ integer nport
+ character locdir*2
+ data nport/1/
+c put in your local address of the PDFs files in LOCDIR
+ data locdir /'./'/
+ data pdford/'1','2','3'/
+ data pdfschem /'ffn','vfn'/
+ data nexp / 0, 3, 4, 5, 5, 5, 5, 5, 5, 5 /
+ data xmin,xmax,qsqmin,qsqmax/1d-7,1d0,0.8d0,2d8/
+ data KORDS,KSCHEMS /-1,-1/
+ data KORD,KSCHEM /3,1/
+
+ save kords,kschems,f,df,dels,delx,x1,delx1,xlog1,nxbb,xx
+
+ if (kschem.eq.0) then
+ npdf=6
+ else
+ npdf=9
+ end if
+ npar=nvar
+*
+*...Reset arrays
+*
+ do i=0,npdf
+ pdfs(i) = 0.d0
+ do k=1,npar
+ dpdfs(i,k)= 0.d0
+ end do
+ end do
+*
+ if((kords.eq.kord).and.
+ + (kschems.eq.kschem)) goto 10
+
+ kords=kord
+ kschems=kschem
+
+ dels=(dlog(dlog(qsqmax/0.04d0))-
+ + dlog(dlog(qsqmin/0.04d0)))/dble(nq-1)
+
+ nxbb=nxb/2
+ x1=0.3d0
+ xlog1=dlog(x1)
+ delx=(dlog(x1)-dlog(xmin))/dble(nxbb-1)
+ DELX1=(1.d0-x1)**2/dble(nxbb+1)
+
+*...X GRID
+ do kx=1,nxbb
+ xx(kx)=dexp(dlog(xmin)+delx*dble(kx-1))
+ end do
+ do kx=nxbb+1,nxb-1
+ xx(kx)=1.d0-dsqrt(dabs((1.d0-x1)**2-delx1*dble(kx-nxbb)))
+ end do
+ xx(nxb)=1d0
+
+*...Read input tables
+ print *,'***** Reading PDFs from tables *****'
+ open(unit=nport,status='old'
+ , ,file=locdir//'Pdfdata/a06.dpdfs_'//pdford(kord)//'_'
+ / //pdfschem(kschem))
+ do n=1,nxb-1
+ do m=1,nq
+ do i=0,npdf
+ read (nport,*) (df(k,i,n,m),k=1,npar)
+ end do
+ end do
+ end do
+ close(unit=nport)
+
+ do k=1,npar
+ do i=0,npdf
+ do m=1,nq
+ if (i.ne.0) then
+ df(k,i,nxb,m)=0d0
+ else
+ df(k,i,nxb,m)=df(k,i,nxb-1,m)
+ end if
+ do n=1,nxb
+ fsp(n)=df(k,i,n,m)
+ end do
+ call spline (nxb,xx,fsp,bs,cs,ds)
+ do n=1,nxb
+ bspd(k,n,m,i)=bs(n)
+ cspd(k,n,m,i)=cs(n)
+ dspd(k,n,m,i)=ds(n)
+ end do
+ end do
+ end do
+ end do
+
+ open(unit=nport,status='old',err=199
+ , ,file=locdir//'Pdfdata/a06.pdfs_'//pdford(kord)//'_'
+ / //pdfschem(kschem))
+ do n=1,nxb-1
+ do m=1,nq
+ read(nport,*) (f(n,m,i),i=0,npdf)
+ end do
+ end do
+ do i=0,npdf
+ do m=1,nq
+ if (i.ne.0) then
+ f(nxb,m,i)=0d0
+ else
+ f(nxb,m,i)=f(nxb-1,m,i)
+ end if
+ do n=1,nxb-1
+ f(n,m,i)=f(n,m,i)/(1d0-xx(n))**nexp(i)
+ end do
+ do n=1,nxb
+ fsp(n)=f(n,m,i)
+ end do
+ call spline (nxb,xx,fsp,bs,cs,ds)
+ do n=1,nxb
+ bsp(n,m,i)=bs(n)
+ csp(n,m,i)=cs(n)
+ dsp(n,m,i)=ds(n)
+ end do
+ end do
+ end do
+ close(unit=nport)
+
+ 10 continue
+
+ if((q2.lt.qsqmin).or.(q2.gt.qsqmax)) print 99,q2,qsqmin,qsqmax
+ if((xb.lt.xmin).or.(xb.gt.xmax)) print 98,xb,xmin,xmax
+
+ 99 format(' A06 WARNING: Q^2 VALUE IS OUT OF RANGE ',3g12.3)
+ 98 format(' A06 WARNING: X VALUE IS OUT OF RANGE ',3g12.3)
+
+ x=max(xb,xmin)
+ x=min(x,xmax)
+ qsq=max(q2,qsqmin)
+ qsq=min(qsq,qsqmax)
+
+ if (x.gt.x1) then
+ xd=(1d0-x1)**2-(1d0-x)**2
+ n=int(xd/delx1)+nxbb
+ else
+ xd=dlog(x)-xlog1
+ n=nxbb+int(xd/DELX)-1
+ end if
+ aa=x-xx(n)
+
+ ss=dlog(dlog(qsq/0.04d0))-dlog(dlog(qsqmin/0.04d0))
+ m=int(ss/dels)+1
+ b=ss/dels-dble(m)+1.d0
+
+ do i=0,npdf
+ f0=f(n,m,i) + aa*bsp(n,m,i) + aa**2*csp(n,m,i)
+ + + aa**3*dsp(n,m,i)
+ fp=f(n,m+1,i) + aa*bsp(n,m+1,i) + aa**2*csp(n,m+1,i)
+ + + aa**3*dsp(n,m+1,i)
+ if (m.ge.2) then
+ fm=f(n,m-1,i) + aa*bsp(n,m-1,i) + aa**2*csp(n,m-1,i)
+ + +aa**3*dsp(n,m-1,i)
+ pdfs(i)=fm*b*(b-1d0)/2d0 + f0*(1d0-b**2) + fp*b*(b+1d0)/2d0
+ else
+ pdfs(i)= f0*(1d0-b) + fp*b
+ end if
+ pdfs(i) = pdfs(i)*(1d0-x)**nexp(i)
+ do k=1,npar
+ df0=df(k,i,n,m) + aa*bspd(k,n,m,i) + aa**2*cspd(k,n,m,i)
+ + + aa**3*dspd(k,n,m,i)
+ dfp=df(k,i,n,m+1)+aa*bspd(k,n,m+1,i)+aa**2*cspd(k,n,m+1,i)
+ + + aa**3*dspd(k,n,m+1,i)
+ if (m.ge.2) then
+ dfm=df(k,i,n,m-1)+aa*bspd(k,n,m-1,i)+aa**2*cspd(k,n,m-1,i)
+ + + aa**3*dspd(k,n,m-1,i)
+ dpdfs(i,k)=dfm*b*(b-1d0)/2d0
+ + + df0*(1d0-b**2) +dfp*b*(b+1d0)/2d0
+ else
+ dpdfs(i,k) = df0*(1d0-b) + dfp*b
+ end if
+ end do
+ end do
+
+ return
+
+ 199 print *,'The PDF set is inavailable (FILE:'
+ , ,'a06.pdfs_'//pdford(kord)//'_'
+ / //pdfschem(kschem),')'
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/mfrun.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/mfrun.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/mfrun.f (revision 1338)
@@ -0,0 +1,77 @@
+C-----------------------------------------------------------------------------
+C
+ double precision function massfrun(mf,scale,asmz,nloop)
+C
+C-----------------------------------------------------------------------------
+C
+C This function returns the 'nloop' value of a MSbar fermion mass
+C at a given scale.
+C
+C INPUT: mf = MSbar mass of fermion at MSbar fermion mass scale
+C scale = scale at which the running mass is evaluated
+C asmz = AS(MZ) : this is passed to alphas(scale,asmz,2)
+C nloop = # of loops in the evolutionC
+C
+C COMMON BLOCKS: COMMON/QMASS/CMASS,BMASS,TMASS
+C contains the MS-bar masses of the heavy quarks.
+C
+C EXTERNAL: double precision alphas(scale,asmz,2)
+C
+C-----------------------------------------------------------------------------
+C
+ implicit none
+ include 'masses.f'
+C
+C ARGUMENTS
+C
+ double precision mf,scale,asmz
+ integer nloop
+C
+C LOCAL
+C
+ double precision beta0, beta1,gamma0,gamma1
+ double precision A1,as,asmf,l2
+ integer nf
+C
+C EXTERNAL
+C
+ double precision alphas
+ external alphas
+C
+C COMMON
+C
+c real *8 cmass,bmass,tmass
+c COMMON/QMASS/CMASS,BMASS,TMASS
+c
+c CONSTANTS
+c
+ double precision One, Two, Three, Pi
+ parameter( One = 1d0, Two = 2d0, Three = 3d0 )
+ parameter( Pi = 3.14159265358979323846d0)
+cc
+C
+C
+
+ if ( mf.gt.mt ) then
+ nf = 6
+ else
+ nf = 5
+ end if
+
+ beta0 = ( 11d0 - Two/Three *nf )/4d0
+ beta1 = ( 102d0 - 38d0/Three*nf )/16d0
+ gamma0= one
+ gamma1= ( 202d0/3d0 - 20d0/9d0*nf )/16d0
+ A1 = -beta1*gamma0/beta0**2+gamma1/beta0
+ as = alphas(scale,asmz,nloop)
+ asmf = alphas(mf ,asmz,nloop)
+ l2 = (one+A1*as/Pi)/(one+A1*asmf/Pi)
+
+ massfrun = mf * (as/asmf)**(gamma0/beta0)
+
+ if(nloop.eq.2) massfrun=massfrun*l2
+ccc
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/pdf_lhapdf.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/pdf_lhapdf.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/pdf_lhapdf.f (revision 1338)
@@ -0,0 +1,34 @@
+*****************
+* LHAPDF version*
+*****************
+ subroutine fdist(ih,x,xmu,fx)
+ implicit none
+ double precision fx(-5:5),x,xmu,fPDF(-6:6)
+ integer Iprtn,ih,Irt
+c--- ih1=+1 proton
+c--- ih1=-1 pbar
+
+C---set to zero if x out of range
+ if (x .ge. 1d0) then
+ do Iprtn=-5,5
+ fx(Iprtn)=0d0
+ enddo
+ return
+ endif
+
+ call evolvePDF(x,xmu,fPDF)
+ if (ih.eq.1) then
+ do Iprtn=-5,5
+ fx(+Iprtn)=fPDF(+Iprtn)/x
+ enddo
+ elseif(ih.eq.-1) then
+ do Iprtn=-5,5
+ fx(+Iprtn)=fPDF(-Iprtn)/x
+ enddo
+ endif
+
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Need/clust.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/clust.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/clust.f (revision 1338)
@@ -0,0 +1,307 @@
+ subroutine clust(jets,npar)
+ implicit double precision (a-h,o-z)
+ parameter(pi=3.141592653589793238d0)
+ common /jetdef/ etminj,etmaxj,delrjj,rapmaxj,rapminj
+ common /clusdef/ rsep,jalg1,jalg2
+ common /jetcom/ icol,ji,jj,jk
+ common /parmom/ ppar(4,10)
+ common /jetmom/ pjet(8,10),jp(10)
+ common /phypar/ w,ipp1,ipp2,rmw,rgw,rmz,rgz,sw2,qcdl
+ data init/0/
+ if(init.eq.0) then
+ init=1
+ write(*,*)' jet clustering as of 12/8/95 '
+ endif
+*
+* pjet(5,j) = ET
+* pjet(6,j) = pseudorapidity
+* pjet(7,j) = azimuthal angle
+* pjet(8,j) = 0 (possible mass entry)
+*
+
+
+ do i=1,4+npar
+ do j=1,4
+ pjet(j,i)=ppar(j,i)
+ enddo
+ enddo
+c--added by RKE
+ pjet(8,5)=+1d0
+ pjet(8,6)=+1d0
+ pjet(8,7)=-1d0
+c--added by RKE
+ if (npar.eq.0) then
+ jets=0
+ return
+ endif
+ icol=0
+ ji=-1
+ jj=-1
+ dij=w**2
+ dib=w**2
+ do i=1,npar
+ jp(i)=i+4
+ j=jp(i)
+ pjet(5,j)=dsqrt(pjet(1,j)**2+pjet(2,j)**2)
+ theta=datan2(pjet(5,j),pjet(3,j))
+ pjet(6,j)=-dlog(dabs(dtan(theta/2d0)))
+ pjet(7,j)=datan2(pjet(1,j),pjet(2,j))
+ enddo
+* cluster the partons
+ if(npar.gt.1)then
+ do i=1,npar-1
+ do j=i+1,npar
+ j1=jp(i)
+ j2=jp(j)
+ if ((pjet(4,j1).gt.0.d0).and.(pjet(4,j2).gt.0.d0)) then
+*
+* clustering criterion
+* jalg1 = 1 ; deltaR(i,j) < delrjj
+* jalg1 = 2 ; deltaR(i,jet) < delrjj and deltaR(j,jet) < delrjj
+* jalg1 = 3 ; kt algorithm; R = delrjj
+* jalg1 = 4 ; deltaR(i,jet) < delrjj and deltaR(j,jet) < delrjj
+* but deltaR(i,j) < Rsep
+*
+ if (jalg1.eq.1) then
+ dely=pjet(6,j1)-pjet(6,j2)
+ rar=(pjet(1,j1)*pjet(1,j2)+pjet(2,j1)*pjet(2,j2))
+ . /pjet(5,j1)/pjet(5,j2)
+ if (rar.lt.-1d0) then
+ delfi=pi
+ elseif (rar.gt.1d0) then
+ delfi=0d0
+ else
+ delfi=dacos(rar)
+ endif
+ delr=dsqrt(dely**2+delfi**2)
+ if (delr.lt.delrjj) then
+ icol=1
+ ji=j1
+ jj=j2
+ endif
+ endif
+ if (jalg1.eq.2.or.jalg1.eq.4) then
+*
+ if(jalg1.eq.4)then
+ dely=pjet(6,j1)-pjet(6,j2)
+ rar=(pjet(1,j1)*pjet(1,j2)+pjet(2,j1)*pjet(2,j2))
+ . /pjet(5,j1)/pjet(5,j2)
+ if (rar.lt.-1d0) then
+ delfi=pi
+ elseif (rar.gt.1d0) then
+ delfi=0d0
+ else
+ delfi=dacos(rar)
+ endif
+ delr=dsqrt(dely**2+delfi**2)
+ endif
+ if(jalg2.eq.1.or.jalg2.eq.3.or.jalg2.eq.4)then
+ pt1=pjet(5,j1)
+ pt2=pjet(5,j2)
+ px=pjet(1,j1)+pjet(1,j2)
+ py=pjet(2,j1)+pjet(2,j2)
+ pz=pjet(3,j1)+pjet(3,j2)
+ ee=pjet(4,j1)+pjet(4,j2)
+ pt=sqrt(px**2+py**2)
+ theta=atan2(pt,pz)
+ if(jalg2.eq.1)then
+ etjet=pt1+pt2
+ elseif(jalg2.eq.3)then
+ etjet=pt
+ elseif(jalg2.eq.4)then
+ etjet=ee*dsin(theta)
+ endif
+ etajet=-dlog(dabs(dtan(theta/2.0d0)))
+ phijet=datan2(px,py)
+ rar=(pjet(1,j1)*px+pjet(2,j1)*py)
+ . /pt1/pt
+ if (rar.lt.-1d0) then
+ delfi1=pi
+ elseif (rar.gt.1d0) then
+ delfi1=0d0
+ else
+ delfi1=dacos(rar)
+ endif
+ rar=(pjet(1,j2)*px+pjet(2,j2)*py)
+ . /pt2/pt
+ if (rar.lt.-1d0) then
+ delfi2=pi
+ elseif (rar.gt.1d0) then
+ delfi2=0d0
+ else
+ delfi2=dacos(rar)
+ endif
+ endif
+ if(jalg2.eq.2)then
+ etjet=pjet(5,j1)+pjet(5,j2)
+ etajet=(pjet(6,j1)*pjet(5,j1)
+ . +pjet(6,j2)*pjet(5,j2))/etjet
+ phijet=(pjet(7,j1)*pjet(5,j1)
+ . +pjet(7,j2)*pjet(5,j2))/etjet
+ rar=(pjet(1,j1)*pjet(1,j2)+pjet(2,j1)*pjet(2,j2))
+ . /pjet(5,j1)/pjet(5,j2)
+ if (rar.lt.-1d0) then
+ delfi=pi
+ elseif (rar.gt.1d0) then
+ delfi=0d0
+ else
+ delfi=dacos(rar)
+ endif
+ delfi1= pjet(5,j2)*delfi/etjet ! phi_1 - phijet
+ delfi2=-pjet(5,j1)*delfi/etjet ! phi_2 - phijet
+ endif
+ dely1=pjet(6,j1)-etajet
+ dely2=pjet(6,j2)-etajet
+ delr1=dsqrt(dely1**2+delfi1**2)
+ delr2=dsqrt(dely2**2+delfi2**2)
+ if ((delr1.lt.delrjj).and.(delr2.lt.delrjj)) then
+ if(jalg1.eq.2)then
+ icol=1
+ ji=j1
+ jj=j2
+ elseif((jalg1.eq.4).and.(delr.lt.rsep)) then
+ icol=1
+ ji=j1
+ jj=j2
+ endif
+ endif
+ endif
+ if (jalg1.eq.3) then
+ dely=pjet(6,j1)-pjet(6,j2)
+ rar=(pjet(1,j1)*pjet(1,j2)+pjet(2,j1)*pjet(2,j2))
+ . /pjet(5,j1)/pjet(5,j2)
+ if (rar.lt.-1d0) then
+ delfi=pi
+ elseif (rar.gt.1d0) then
+ delfi=0d0
+ else
+ delfi=dacos(rar)
+ endif
+ delr=dsqrt(dely**2+delfi**2)
+ et=dmin1(pjet(5,j1),pjet(5,j2))
+ if(et**2*delr**2.lt.dij)then
+ ji=j1
+ jj=j2
+ dij=et**2*delr**2
+ endif
+ if(et**2*delrjj**2.lt.dib)dib=et**2*delrjj**2
+ endif
+ endif
+ enddo
+ enddo
+ if(jalg1.eq.3)then
+ if(dij.lt.dib)then
+ icol=1
+ endif
+ endif
+ endif
+*
+*
+ if(icol.eq.1)then
+c----Added by RKE
+ if ((ji .eq. 5).or.(ji .eq. 6)
+ . .or.(jj .eq. 5).or.(jj .eq. 6)) then
+ pjet(8,ji)=+1d0
+ else
+ pjet(8,ji)=-1d0
+ endif
+ jk=ji
+* pjet(.,jk) is made of ppar(.,ji)+ppar(.,jj)
+ if(jalg2.eq.1.or.jalg2.eq.3.or.jalg2.eq.4)then
+ do k=1,4
+ pjet(k,ji)=pjet(k,ji)+pjet(k,jj)
+ enddo
+ pp=sqrt(pjet(1,ji)**2+pjet(2,ji)**2)
+ theta=atan2(pp,pjet(3,ji))
+ if(jalg2.eq.1)then
+ pjet(5,ji)=pjet(5,ji)+pjet(5,jj)
+ pjet(4,ji)=pjet(5,ji)/dsin(theta)
+ elseif(jalg2.eq.3)then
+ pjet(5,ji)=dsqrt(pjet(1,ji)**2+pjet(2,ji)**2)
+ elseif(jalg2.eq.4)then
+ pjet(5,ji)=pjet(4,ji)*dsin(theta)
+ endif
+ pjet(6,ji)=-dlog(dabs(dtan(theta/2.0d0)))
+ pjet(7,ji)=datan2(pjet(1,ji),pjet(2,ji))
+ pjet(4,jj)=-1d0
+ endif
+ if(jalg2.eq.2)then
+
+ write(6,*) 'ji',ji
+ write(6,*) 'jj',jj
+
+ pause
+ etjet=pjet(5,ji)+pjet(5,jj)
+ etajet=
+ . (pjet(6,ji)*pjet(5,ji)+pjet(6,jj)*pjet(5,jj))/etjet
+ phijet=
+ . (pjet(7,ji)*pjet(5,ji)+pjet(7,jj)*pjet(5,jj))/etjet
+ eejet=exp(etajet)
+ rar=(pjet(1,ji)*pjet(1,jj)+pjet(2,ji)*pjet(2,jj))
+ . /pjet(5,ji)/pjet(5,jj)
+ if (rar.lt.-1d0) then
+ delfi=pi
+ elseif (rar.gt.1d0) then
+ delfi=0d0
+ else
+ delfi=dacos(rar)
+ endif
+ delfi1= pjet(5,jj)*delfi/etjet ! phi_1 - phijet
+ cde=dcos(delfi1)
+ sde=dsin(delfi1)
+ if (pjet(2,ji)*pjet(1,jj).gt.pjet(2,jj)*pjet(1,ji))
+ . sde=-sde
+ cphi=(pjet(1,ji)*cde-pjet(2,ji)*sde)/pjet(5,ji)
+ sphi=(pjet(2,ji)*cde+pjet(1,ji)*sde)/pjet(5,ji)
+ pjet(1,ji)=etjet*cphi
+ pjet(2,ji)=etjet*sphi
+ pjet(3,ji)=etjet/2d0*(eejet-1d0/eejet)
+ pjet(4,ji)=etjet/2d0*(eejet+1d0/eejet)
+ pjet(5,ji)=etjet
+ pjet(6,ji)=etajet
+ pjet(7,ji)=phijet
+ pjet(4,jj)=-1d0
+ endif
+ endif
+*
+* sort jets according to decreasing transverse energy
+* j1=most energetic,...,j4=least energetic inside rapidity region
+* then sort non-jets according to Et outside rap region
+*
+ do i=1,npar-1
+ do j=i+1,npar
+ j1=jp(i)
+ j2=jp(j)
+ if(pjet(4,j1).lt.0d0)pjet(5,j1)=0d0
+ if(pjet(4,j2).lt.0d0)pjet(5,j2)=0d0
+ if (pjet(5,j1).lt.pjet(5,j2)) then
+ jt =jp(i)
+ jp(i)=jp(j)
+ jp(j)=jt
+ endif
+ enddo
+ enddo
+* count number of observed jets
+* etminj < et < etmaxj
+* rapminj < eta < rapmaxj
+ jets=0
+ do i=1,npar
+ j=jp(i)
+ if (pjet(4,j).gt.0d0) then
+ if (pjet(5,j).ge.etminj
+ . .and.pjet(5,j).le.etmaxj
+ . .and.abs(pjet(6,j)).le.rapmaxj
+ . .and.abs(pjet(6,j)).ge.rapminj) then
+ jets=jets+1
+ else
+ pjet(4,j)=-1d0
+ endif
+ endif
+ enddo
+*
+ write(6,*) 'end of clust:pjet(4,5)',pjet(4,5)
+ write(6,*) 'end of clust:pjet(4,6)',pjet(4,6)
+ write(6,*) 'end of clust:pjet(4,7)',pjet(4,7)
+ end
+*
+************************************************************************
Index: dynnlo-v1.5-applgrid/src/Need/branch.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/branch.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/branch.f (revision 1338)
@@ -0,0 +1,35 @@
+ subroutine branch(brwen,brzee,brtau,brtop)
+ implicit none
+C Returns the lowest order branching ratios for
+C 1) W --> e nu
+C 2) Z --> e e
+C 3) tau --> e nu nubar
+C 4) t --> b W
+ include 'constants.f'
+ include 'masses.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+
+ double precision facz,facw,factau,factop,pwidth_e
+c double precision pwidth_u,pwidth_d,pwidth_n,width
+ double precision brwen,brzee,brtau,brtop,xsq
+
+ facz=esq/4d0*zmass/(6d0*pi)
+ facw=gwsq/8d0*wmass/(6d0*pi)
+ factau=gwsq**2/32d0/wmass**4*mtau**5/192d0/pi**3
+ xsq=(wmass/mt)**2
+ factop=(gw/wmass)**2*mt**3/(64d0*pi)*(1d0-xsq)**2*(1d0+2d0*xsq)
+
+ pwidth_e=facz*(le**2+re**2)
+c pwidth_d=3*facz*(L(1)**2+R(1)**2)
+c pwidth_u=3*facz*(L(2)**2+R(2)**2)
+c pwidth_n=facz*(ln**2)
+c calculated zwidth=3*pwidth_d+2*pwidth_u+3*pwidth_e+3*pwidth_n
+ brzee=pwidth_e/zwidth
+ brwen=facw/wwidth
+ brtau=factau/tauwidth
+c brtop=factop/twidth
+
+c write(*,*)brzee,brwen,brtau,brtop
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/dipoles_old.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipoles_old.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipoles_old.f (revision 1338)
@@ -0,0 +1,665 @@
+************************************************************************
+* Author: J. M. Campbell *
+* August, 1999 (updated April, 2001) *
+* *
+* Comments added October 15th 2001. *
+* *
+* Revised by R.K. Ellis, November 9th, 16th 2001. *
+* *
+* Routines which return various pieces of the integrated *
+* subtraction terms, used in both _v and _z routines *
+************************************************************************
+
+************************************************************************
+* *
+* The labelling of the routines is as follows: *
+* The collinear pair is assumed to be incoming, *
+* so a reversal has to be made for the final state cases *
+* *
+* -------->------------>-------- *
+* j / i *
+* / *
+* / *
+* *
+* represented by {ii/if}_ij *
+* *
+************************************************************************
+
+***********************************************************************
+*************************** INITIAL-INITIAL ***************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ii_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqq=
+c-- [delta(1-x)]*(epinv*(epinv-L)+1/2*L^2+3/2*epinv-[pi]^2/6)
+c-- +(1-x)-(1+x)*(L+2*[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+
+cIIqq =
+c + 1 - x - 2*[ln(x)]*[1-x]^-1 + [ln(x)]*[1+x] + [ln(al(x))]*
+c [(1+x^2)/(1-x)] - [1+x]*L - 2*[1+x]*[ln(1-x)] + [1+x]*epinv
+c
+c + [delta(1-x)]
+c * ( 1/2*L^2 - 1/6*pisq - epinv*L + epinv^2 )
+c
+c + [1/(1-x)_(0)]
+c * ( 2*L + 4*[ln(1-x)] - 2*epinv )
+
+ if (vorz .eq. 1) then
+ ii_qq=epinv*(epinv2-L)+0.5d0*L**2-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_qq=ii_qq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ ii_qq=omx-(one+x)*(two*lomx+L-epinv)-(one+x**2)/omx*lx
+ if (omx .gt. aii) ii_qq=ii_qq+(one+x**2)/omx*dlog(aii/omx)
+ return
+ endif
+
+ ii_qq=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function ii_qg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqg=(1-2*x*(1-x))*(-[ln(x)]+L+2*[ln(1-x)])+2*x*(1-x)
+
+c IIqg =
+c + 2*x - 2*x^2 - [ln(x)]*[x^2+(1-x)^2] + [ln(al(x))]*
+c [x^2+(1-x)^2] + [x^2+(1-x)^2]*L + 2*[x^2+(1-x)^2]*[ln(1-x)]
+c - [x^2+(1-x)^2]*epinv
+
+
+ ii_qg=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ ii_qg=(one-two*x*omx)*(two*lomx-lx+L-epinv)+two*x*omx
+ if (omx .gt. aii) ii_qg=ii_qg+(one-two*x*omx)*dlog(aii/omx)
+ endif
+ return
+ end
+
+***************************** Gluon-Quark *****************************
+ double precision function ii_gq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-quark (--> gluon) antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agq=(1+(1-x)^2)/x*(-[ln(x)]+L+2*[ln(1-x)])+x
+
+
+c IIgq = + x - [ln(x)]*[(1+(1-x)^2)/x] + [ln(al(x))]*
+c [(1+(1-x)^2)/x] + [(1+(1-x)^2)/x]*L + 2*[(1+(1-x)^2)/x]*
+c [ln(1-x)] - [(1+(1-x)^2)/x]*epinv
+
+ ii_gq=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ ii_gq=(one+omx**2)/x*(two*lomx-lx+L-epinv)+x
+ if (omx .gt. aii) ii_gq=ii_gq+(one+omx**2)/x*dlog(aii/omx)
+ return
+ endif
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ii_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agg=(epinv*(epinv-L)+1/2*L^2+epinv*11/6-[pi]^2/6
+c-- -nflav/3/xn*epinv)*[delta(1-x)]
+c-- -2*[ln(x)]/[1-x]
+c-- +2*(-1+x*(1-x)+(1-x)/x)*(-[ln(x)]+L+2*[ln(1-x)])
+c-- +(4*[ln(1-x)/(1-xp)]+2*L/[1-xp])
+
+c IIgg =
+c - 2*[ln(x)]*[1-x]^-1 - 2*[ln(x)]*[(1-x)/x-1+x*(1-x)] + 2*
+c [1-x]^-1*[ln(al(x))] + 2*[ln(al(x))]*[(1-x)/x-1+x*(1-x)]
+c + 2*[(1-x)/x-1+x*(1-x)]*L + 4*[(1-x)/x-1+x*(1-x)]*[ln(1-x)]
+c - 2*[(1-x)/x-1+x*(1-x)]*epinv
+c
+c + [delta(1-x)]
+c * ( 1/2*L^2 - 1/6*pisq - epinv*L + epinv^2 )
+c
+c + [1/(1-x)_(0)]
+c * ( 2*L + 4*[ln(1-x)] - 2*epinv )
+
+ if (vorz .eq. 1) then
+ ii_gg=epinv*(epinv2-L)+half*L**2-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_gg=ii_gg-1d0/6d0
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ lx=dlog(x)
+ ii_gg=two*(omx/x+x*omx-one)*(two*lomx-lx+L-epinv)-two*lx/omx
+ if (omx .gt. aii) ii_gg=ii_gg
+ . +two*(one/omx+omx/x+x*omx-one)*dlog(aii/omx)
+ return
+ endif
+
+ ii_gg=two*(two*lomx+L-epinv)/omx
+
+ return
+ end
+
+***********************************************************************
+**************************** INITIAL-FINAL ****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+
+
+ double precision function if_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,ltmx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,aqq=(epinv*(epinv-L)+1/2*L^2+3/2*epinv+[pi]^2/6)*[delta(1-x)]
+c-- +(1-x-2/[1-x]*[ln(2-x)]
+c-- -(1+x)*(L+[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+ if (vorz .eq. 1) then
+ if_qq=epinv*(epinv2-L)+half*L**2+pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_qq=if_qq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+cIFqq =
+c + 1 - x - 2*[ln(x)]*[1-x]^-1 + [ln(x)]*[1+x] - 2*[1-x]^-1*
+c [ln((1+al-x)/al)] - [ln(al)]*[1+x] - [1+x]*L - [1+x]*[ln(1-x)]
+c + [1+x]*epinv
+c
+c + [delta(1-x)]
+c * ( 1/2*L^2 + 1/6*pisq - epinv*L + epinv^2 )
+c
+c + [1/(1-x)_(0)]
+c * ( 2*L + 4*[ln(1-x)] - 2*epinv )
+
+ if (vorz .eq. 2) then
+ ltmx=dlog((omx+aif)/aif)
+ lx=dlog(x)
+ if_qq=omx-two/omx*ltmx-(one+x)*(lomx+L-epinv)-(one+x**2)/omx*lx
+ if_qq=if_qq-dlog(aif)*(one+x)
+ return
+ endif
+
+ if_qq=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function if_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,ltmx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,agg=[delta(1-x)]*(
+c-- epinv*(epinv-L)+1/2*L^2+11/6*epinv+[pi]^2/6-1/3*epinv*nflav/xn)
+c-- +2*(-1+(1-x)/x+x*(1-x))*(L-[ln(x)]+[ln(1-x)])
+c-- -2*[ln(2-x)]/[1-x]-2*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+ if (vorz .eq. 1) then
+ if_gg=epinv*(epinv2-L)+half*L**2+pisq/6d0
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_gg=if_gg-1d0/6d0
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+cIFgg =
+c - 2*[ln(x)]*[1-x]^-1 - 2*[ln(x)]*[(1-x)/x-1+x*(1-x)] - 2*
+c [1-x]^-1*[ln((1+al-x)/al)] + 2*[ln(al)]*[(1-x)/x-1+x*(1-x)]
+c + 2*[(1-x)/x-1+x*(1-x)]*L + 2*[(1-x)/x-1+x*(1-x)]*[ln(1-x)]
+c - 2*[(1-x)/x-1+x*(1-x)]*epinv
+c
+c + [delta(1-x)]
+c * ( 1/2*L^2 + 1/6*pisq - epinv*L + epinv^2 )
+c
+c + [1/(1-x)_(0)]
+c * ( 2*L + 4*[ln(1-x)] - 2*epinv )
+
+
+
+ if (vorz .eq. 2) then
+ ltmx=dlog((omx+aif)/aif)
+ lx=dlog(x)
+ if_gg=two*((lomx-lx+L-epinv+dlog(aif))*(omx/x+x*omx-one)
+ . -(ltmx+lx)/omx)
+ return
+ endif
+
+ if_gg=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function if_qg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,aqg=(1-2*x*(1-x))*(L-[ln(x)]+[ln(1-x)])+2*x*(1-x)
+cIFqg =
+c + 2*x - 2*x^2 - [ln(x)]*[x^2+(1-x)^2] + [ln(al)]*
+c [x^2+(1-x)^2] + [x^2+(1-x)^2]*L + [x^2+(1-x)^2]*[ln(1-x)]
+c - [x^2+(1-x)^2]*epinv
+
+
+ if_qg=0d0
+ if ((vorz .eq. 1).or.(vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ if_qg=(one-two*x*omx)*(lomx-lx+L-epinv+dlog(aif))+two*x*omx
+ endif
+
+ return
+ end
+
+***************************** Gluon-Quark *****************************
+c double precision function if_gq(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L,omx,lx,lomx
+c include 'constants.f'
+c include 'epinv.f'
+c include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,agq=(1+(1-x)^2)/x*(L-[ln(x)]+[ln(1-x)])+x
+cIFgq = + x - [ln(x)]*[(1+(1-x)^2)/x] + [ln(al)]*
+c [(1+(1-x)^2)/x] + [(1+(1-x)^2)/x]*L + [(1+(1-x)^2)/x]*
+c [ln(1-x)] - [(1+(1-x)^2)/x]*epinv
+c
+c
+c if_gq=0d0
+c if ((vorz .eq. 1).or.(vorz .eq. 3)) return
+
+c omx=one-x
+c lomx=dlog(omx)
+c lx=dlog(x)
+
+c if (vorz .eq. 2) then
+c if_gq=(one+omx**2)/x*(lomx-lx+L-epinv+log(aif))+x
+c endif
+
+c return
+c end
+
+***********************************************************************
+**************************** FINAL-INITIAL ****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function fi_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,theta
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqq=(epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+7/2-[pi]^2/2)*[delta(1-x)]
+c-- +2/[1-x]*[ln(2-x)]
+c-- +(-2*[ln(1-x)/(1-xp)]-3/2/[1-xp])
+
+cFIq =
+c + 2*[1-x]^-1*[ln(2-x)]*[Theta(x-1+al)]
+c
+c + 2*[ln(1/(1-x))/(1-x)_(1-al)]
+c
+c + [delta(1-x)]
+c * ( 7/2 - 3/2*L + 1/2*L^2 - 1/2*pisq - 3/2*[ln(al)] -
+c [ln(al)]^2 + 3/2*epinv - epinv*L + epinv^2 )
+c
+c - 3/2*[1/(1-x)_(1-al)]
+ theta=0d0
+ if (x .gt. 1d0-afi) theta=1d0
+ if (vorz .eq. 1) then
+ fi_qq=epinv*(epinv2-L)+half*L**2+1.5d0*(epinv-L)
+ . +3.5d0-half*pisq-dlog(afi)*(1.5d0+dlog(afi))
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ fi_qq=fi_qq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ fi_qq=two*dlog(two-x)/omx*theta
+ return
+ endif
+
+ fi_qq=-(two*dlog(omx)+1.5d0)/omx*theta
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function fi_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,theta
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+ include 'b0.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqg=(-2/3*(epinv-L)-10/9)*[delta(1-x)]
+c-- +0
+c-- +2/3/[1-xp]
+c-- Id,agg=
+c-- (2*epinv*(epinv-L)+L^2+(epinv-L)*11/3+67/9-[pi]^2)
+c-- *[delta(1-x)]
+c-- +4*[ln(2-x)]/[1-x]
+c-- +2*(-2*[ln(1-x)/(1-xp)]-11/6/[1-xp])
+
+cFIg =
+c + 4*[1-x]^-1*[ln(2-x)]*[Theta(x-1+al)]
+c
+c + 4*[ln(1/(1-x))/(1-x)_(1-al)]
+c
+c + [delta(1-x)]
+c * ( 67/9 + L^2 - pisq - 2*[ln(al)]^2 - 2*epinv*L + 2*epinv^2 )
+c
+c + [delta(1-x)]*CA^-1
+c * ( - 20/9*Tr*nflav - 2*[ln(al)]*b0 - 2*b0*L + 2*b0*epinv )
+c
+c + [1/(1-x)_(1-al)]*CA^-1
+c * ( - 2*b0 )
+
+ theta=0d0
+ if (x .gt. 1d0-afi) theta=1d0
+ if (vorz .eq. 1) then
+ fi_gg=two*epinv*(epinv2-L)+L**2
+ . +67d0/9d0-10d0/9d0*dfloat(nf)/xn
+ . -pisq+2d0*b0/xn*(epinv-L)-2d0*dlog(afi)*(b0/xn+dlog(afi))
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ fi_gg=fi_gg-dfloat(nf)/xn/3d0
+ return
+ endif
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ fi_gg=four*dlog(two-x)/omx*theta
+ return
+ endif
+
+ fi_gg=-(four*dlog(omx)
+ . +11d0/3d0-dfloat(nf)/xn*2d0/3d0)/omx*theta
+ return
+ end
+
+
+
+
+***************************** Quark-Gluon *****************************
+c double precision function fi_qg(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L,omx
+c include 'constants.f'
+c include 'epinv.f'
+c include 'epinv2.f'
+c include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c--Id,aqg=(-2/3*(epinv-L)-10/9)*[delta(1-x)]
+c-- +0
+c-- +2/3/[1-xp]
+
+
+c if (vorz .eq. 1) then
+c fi_qg=2d0/3d0*(-epinv+L)-10d0/9d0
+c if (scheme .eq. 'tH-V') then
+c return
+c elseif (scheme .eq. 'dred') then
+c fi_qg=fi_qg-1d0/3d0
+c return
+c endif
+c elseif (vorz .eq. 2) then
+c fi_qg=0d0
+c elseif (vorz .eq. 3) then
+c fi_qg=2d0/3d0/(one-x)
+c endif
+c return
+c end
+
+
+***********************************************************************
+***************************** FINAL-FINAL *****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ff_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqq=epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+5-[pi]^2/2
+
+cFFq =
+c + 7/2 - 3/2*L + 1/2*L^2 + 3/2*al - 1/2*pisq - 3/2*[ln(al)]
+c - [ln(al)]^2 + 3/2*epinv - epinv*L + epinv^2
+
+ ff_qq=0d0
+ if (vorz .eq. 1) then
+ ff_qq=epinv*(epinv2-L)+half*L**2+1.5d0*(epinv-L)+5d0-half*pisq
+ ff_qq=ff_qq+1.5d0*(aff-1d0-dlog(aff))-dlog(aff)**2
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ff_qq=ff_qq-half
+ return
+ endif
+ endif
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+c double precision function ff_qg(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L
+c include 'constants.f'
+c include 'epinv.f'
+c include 'epinv2.f'
+c include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c
+c ff_qg=0d0
+c if (vorz .eq. 1) then
+c ff_qg=-2d0/3d0*(epinv-L)-16d0/9d0
+c if (scheme .eq. 'tH-V') then
+c return
+c elseif (scheme .eq. 'dred') then
+c ff_qg=ff_qg-1d0/3d0
+c return
+c endif
+c endif
+c return
+c end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ff_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+ include 'b0.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c Id,agg=2*epinv*(epinv-L)+L^2+11/3*(epinv-L)+100/9-[pi]^2
+
+cFFg =
+c + 67/9 + L^2 - pisq - 2*[ln(al)]^2 - 2*epinv*L + 2*epinv^2
+c + CA^-1
+c * ( 2*al*b0 - 20/9*Tr*nflav - 2*[ln(al)]*b0 - 2*b0*L + 2*b0*epinv ) + 0.
+
+ ff_gg=0d0
+ if (vorz .eq. 1) then
+ ff_gg=two*epinv*(epinv2-L)+L**2+100d0/9d0-pisq
+ . +two*b0/xn*(epinv-L)-dfloat(nf)/xn*16d0/9d0
+ ff_gg=ff_gg-two*dlog(aff)**2+two*b0/xn*(aff-1d0-dlog(aff))
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ff_gg=ff_gg-dfloat(nf)/xn/3d0
+ return
+ endif
+ endif
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Need/realint.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/realint.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/realint.f (revision 1338)
@@ -0,0 +1,378 @@
+ double precision function realint(vector,wgt)
+ implicit none
+ include 'constants.f'
+ include 'realonly.f'
+ include 'virtonly.f'
+ include 'noglue.f'
+ include 'vegas_common.f'
+ include 'ptilde.f'
+ include 'npart.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'efficiency.f'
+ include 'maxwt.f'
+ include 'process.f'
+ include 'dynamicscale.f'
+ include 'dipolescale.f'
+ integer ih1,ih2,j,k,nd,nmax,nmin,nvec
+ double precision vector(mxdim),W,val,xint
+ double precision sqrts,fx1(-nf:nf),fx2(-nf:nf)
+ double precision p(mxpart,4),pjet(mxpart,4),p1ext(4),p2ext(4)
+ double precision pswt,rscalestart,fscalestart
+ double precision s(mxpart,mxpart),wgt,msq(-nf:nf,-nf:nf)
+ double precision msqc(maxd,-nf:nf,-nf:nf),xmsq(0:maxd),xmsqjk
+ double precision flux,BrnRat,xreal,xreal2
+ double precision xx1,xx2,q(mxpart,4),dot,q2
+ integer n2,n3
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ common/xreal/xreal,xreal2
+ logical bin,first,failed
+ logical incldip(0:maxd),includedipole,includereal
+ external qqb_z2jet,qqb_z1jet_gs,qqb_w2jet,qqb_w1jet_gs
+ common/density/ih1,ih2
+ common/energy/sqrts
+ common/bin/bin
+ common/Pext/p1ext,p2ext
+ common/nmax/nmax
+ common/BrnRat/BrnRat
+ common/nmin/nmin
+ common/incldip/incldip
+c P.S. enable grids
+ include 'qcdcouple.f'
+ include 'APPLinclude.f'
+ double precision msqcps(maxd,-nf:nf,-nf:nf)
+ double precision psCR !, xCheck
+c P.S. end
+ integer nproc
+ common/nproc/nproc
+
+ integer ii,jj,kk
+
+ data p/48*0d0/
+ data first/.true./
+ save first,rscalestart,fscalestart
+ if (first) then
+ first=.false.
+ rscalestart=scale
+ fscalestart=facscale
+ endif
+ ntotshot=ntotshot+1
+ pswt=0d0
+ realint=0d0
+
+ W=sqrts**2
+
+ if (first) then
+ write(6,*)
+ write(6,*) 'nmin=',nmin,',nmax=',nmax
+ write(6,*)
+ first=.false.
+ endif
+
+ npart=4
+ call gen4(vector,p,pswt,*999)
+
+
+ nvec=npart+2
+
+ q2=2*dot(p,3,4)
+
+ call dotem(nvec,p,s)
+
+c---impose cuts on final state
+ call masscuts(s,*999)
+
+
+c----reject event if any s(i,j) is too small
+ call smalls(s,npart,*999)
+
+
+c--- see whether this point will pass cuts - if it will not, do not
+c--- bother calculating the matrix elements for it, instead set to zero
+ includereal=includedipole(0,p)
+ incldip(0)=includereal
+
+CC Dynamic scale: set it only if point passes cuts
+
+ if(dynamicscale.and.includereal) then
+ call scaleset(q2)
+ dipscale(0)=facscale
+ endif
+
+
+ if (includereal .eqv. .false.) then
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+ endif
+
+c --- P.S. initialize array
+ if (creategrid.and.bin) then
+ do j=-nf,nf
+ do k=-nf,nf
+ do nd=0,ndmax
+ weightr (nd,j,k) = 0d0
+ enddo
+ enddo
+ enddo
+ psCR = 1d0/ason2pi
+ weightfactor = 1d0
+ contrib = -100
+ endif
+c P.S. end init..
+
+c---- generate collinear points that satisy the jet cuts (for checking)
+c call singgen(p,s,*998)
+
+c----calculate the x's for the incoming partons from generated momenta
+
+ xx1=two*(p(1,4)*p2ext(4)-p(1,3)*p2ext(3))/W
+ xx2=two*(p(2,4)*p1ext(4)-p(2,3)*p1ext(3))/W
+
+
+ if ((xx1 .gt. 1d0) .or. (xx2 .gt. 1d0)) then
+ realint=0d0
+ return
+ endif
+
+
+
+c--- Calculate the required matrix elements
+
+ if(nproc.eq.3) then
+ if (includereal) call qqb_z2jet(p,msq)
+ call qqb_z1jet_gs(p,msqc)
+ else
+ if (includereal) call qqb_w2jet(p,msq)
+ call qqb_w1jet_gs(p,msqc)
+ endif
+
+ do nd=0,ndmax
+ xmsq(nd)=0d0
+ enddo
+
+
+ flux=fbGeV2/(two*xx1*xx2*W)
+
+
+ 777 continue
+ do nd=0,ndmax
+ xmsq(nd)=0d0
+ enddo
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+ do nd=0,ndmax
+
+ call fdist(ih1,xx1,dipscale(nd),fx1)
+ call fdist(ih2,xx2,dipscale(nd),fx2)
+
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+CC Tieni solo uubar+ccbar
+
+c if(j.ne.-k) goto 20
+c if(abs(j).ne.2.and.abs(j).ne.4) goto 20
+
+CC
+
+
+ if (ggonly) then
+ if ((j.ne.0) .or. (k.ne.0)) goto 20
+ endif
+
+ if (gqonly) then
+ if (((j.eq.0).and.(k.eq.0)) .or. ((j.ne.0).and.(k.ne.0))) goto 20
+ endif
+
+ if (noglue) then
+ if ((j.eq.0) .or. (k.eq.0)) goto 20
+ endif
+
+ if (realonly) then
+ if(nd.eq.0) then
+ xmsq(0)=xmsq(0)+fx1(j)*fx2(k)*msq(j,k)
+c P.S. save weight nd = 0.
+ if (creategrid.and.bin) then
+ weightr(0,j,k) = weightr(0,j,k) + msq(j,k)*psCR**2
+ endif
+c P.S. end
+ else
+ xmsq(nd)=0d0
+c P.S.
+ if (creategrid.and.bin) then
+ weightr(nd,j,k) = 0d0
+ endif
+c P.S. end
+ endif
+ elseif (virtonly) then
+ if(nd.eq.0) then
+ xmsq(0)=0d0
+c P.S. -------
+ if (creategrid.and.bin) then
+ weightr(0,j,k) = 0d0
+ endif
+c P.S. end
+ else
+ xmsq(nd)=xmsq(nd)+fx1(j)*fx2(k)*(-msqc(nd,j,k))
+c P.S. save weight nd = 1,ndmax
+ if (creategrid.and.bin) then
+ weightr(nd,j,k)=weightr(nd,j,k)
+ * +(-msqc(nd,j,k))*psCR**2
+ endif
+c P.S. end
+ endif
+ else
+
+ if(nd.eq.0) then
+ xmsqjk=fx1(j)*fx2(k)*msq(j,k)
+c P.S. save weight nd = 0
+ if (creategrid.and.bin) then
+ weightr(0,j,k) = weightr(0,j,k) + msq(j,k)*psCR**2
+ endif
+c P.S. end
+ else
+ xmsqjk=fx1(j)*fx2(k)*(-msqc(nd,j,k))
+c P.S. save weight nd = 1,ndmax
+ if (creategrid.and.bin) then
+ weightr(nd,j,k) = weightr(nd,j,k) + (-msqc(nd,j,k))*psCR**2
+ endif
+c P.S. end
+ endif
+
+ xmsq(nd)=xmsq(nd)+xmsqjk
+
+ endif
+
+ 20 continue
+ enddo
+ enddo
+
+ enddo
+
+ realint=0d0
+ xint=0d0
+
+c---trial with weight of real alone
+c---first set up all dipole contributions
+c---this is the value of integral including subtractions
+ do nd=0,ndmax
+ xmsq(nd)=xmsq(nd)*flux*pswt/BrnRat
+ failed=.false.
+
+c--- if this dipole has no contribution, go to end of loop
+c if (xmsq(nd) .eq. 0d0) goto 997
+
+ if (nd .eq. 0) then
+c---if there's no real contribution, record the event as failing to pass cuts
+ if (xmsq(nd) .eq. 0d0) then
+ failed=.true.
+ goto 996
+ endif
+ else
+c--- if this dipole has no contribution, go to end of loop
+ if (xmsq(nd) .eq. 0d0) goto 997
+c---check whether each counter-event passes the cuts
+ do j=1,mxpart
+ do k=1,4
+ q(j,k)=ptilde(nd,j,k)
+ enddo
+ enddo
+ incldip(nd)=includedipole(nd,q)
+ if (incldip(nd) .eqv. .false.) failed=.true.
+ endif
+
+ 996 if (failed) then
+ if (nd .eq. 0) then
+ ncutzero=ncutzero+1
+ ntotzero=ntotzero+1
+ endif
+ call dotem(nvec,p,s)
+ xmsq(nd)=0d0
+ goto 997
+ endif
+c---if it does, add to total
+ xint=xint+xmsq(nd)
+
+ val=xmsq(nd)*wgt
+
+c--- update the maximum weight so far, if necessary
+ if (dabs(val) .gt. wtmax) then
+ wtmax=dabs(val)
+ endif
+
+c---if we're binning, add to histo too
+ if (bin) then
+ call getptildejet(nd,pjet)
+ call dotem(nvec,pjet,s)
+ val=val/dfloat(itmx)
+c P.S. writing out the common block
+ if (creategrid.and.bin) then
+ contrib = 250
+ dipole = nd
+ weightfactor = wgt*flux*pswt/BrnRat/dfloat(itmx)
+ ag_xx1 = xx1
+ ag_xx2 = xx2
+ ag_scale = dipscale(nd)
+ refwt = val
+ refwt2 = val*val*dfloat(itmx)
+c$$$ xCheck = 0d0
+c$$$ do j=-nf,nf
+c$$$ do k=-nf,nf
+c$$$ xCheck=xCheck+(weightr(nd,j,k))
+c$$$ * * fx1(j)*fx2(k)*weightfactor*ason2pi**2
+c$$$ enddo
+c$$$ enddo
+c$$$ print *," ** realint : ",refwt, xCheck, refwt/xCheck
+ endif
+c P.S.
+ if (nd .eq. 0) then
+ call plotter(pjet,val,0)
+ else
+ call plotter(pjet,val,1)
+ endif
+ endif
+c---otherwise, skip contribution
+ 997 continue
+ enddo
+
+ call dotem(nvec,p,s)
+
+c 998 continue
+
+
+ realint=xint
+
+ xreal=xreal+xint*wgt/dfloat(itmx)
+ xreal2=xreal2+(xint*wgt)**2/dfloat(itmx)
+
+
+ return
+
+ 999 realint=0d0
+ ntotzero=ntotzero+1
+
+ return
+ end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Need/dipoles.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipoles.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipoles.f (revision 1338)
@@ -0,0 +1,692 @@
+************************************************************************
+* Author: J. M. Campbell *
+* August, 1999 (updated April, 2001) *
+* *
+* Comments added October 15th 2001. *
+* *
+* Revised by R.K. Ellis, November 9th, 16th 2001. *
+* *
+* Routines which return various pieces of the integrated *
+* subtraction terms, used in both _v and _z routines *
+************************************************************************
+
+************************************************************************
+* *
+* The labelling of the routines is as follows: *
+* The collinear pair is assumed to be incoming, *
+* so a reversal has to be made for the final state cases *
+* *
+* -------->------------>-------- *
+* j / i *
+* / *
+* / *
+* *
+* represented by {ii/if}_ij *
+* *
+************************************************************************
+
+***********************************************************************
+*************************** INITIAL-INITIAL ***************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ii_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqq=
+c-- [delta(1-x)]*(epinv*(epinv-L)+1/2*L^2+3/2*epinv-[pi]^2/6)
+c-- +(1-x)-(1+x)*(L+2*[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+
+cIIqq =
+c + 1 - x - 2*[ln(x)]*[1-x]^-1 + [ln(x)]*[1+x] + [ln(al(x))]*
+c [(1+x^2)/(1-x)] - [1+x]*L - 2*[1+x]*[ln(1-x)] + [1+x]*epinv
+c
+c + [delta(1-x)]
+c * ( 1/2*L^2 - 1/6*pisq - epinv*L + epinv^2 )
+c
+c + [1/(1-x)_(0)]
+c * ( 2*L + 4*[ln(1-x)] - 2*epinv )
+
+ if (vorz .eq. 1) then
+ ii_qq=epinv*(epinv2-L)+0.5d0*L**2-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_qq=ii_qq-half
+ return
+ else
+ write(6,*) 'Value of scheme not implemented properly ',scheme
+ stop
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ ii_qq=omx-(one+x)*(two*lomx+L-epinv)-(one+x**2)/omx*lx
+ if (omx .gt. aii) ii_qq=ii_qq+(one+x**2)/omx*dlog(aii/omx)
+ return
+ endif
+
+ ii_qq=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function ii_qg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqg=(1-2*x*(1-x))*(-[ln(x)]+L+2*[ln(1-x)])+2*x*(1-x)
+
+c IIqg =
+c + 2*x - 2*x^2 - [ln(x)]*[x^2+(1-x)^2] + [ln(al(x))]*
+c [x^2+(1-x)^2] + [x^2+(1-x)^2]*L + 2*[x^2+(1-x)^2]*[ln(1-x)]
+c - [x^2+(1-x)^2]*epinv
+
+
+ ii_qg=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ ii_qg=(one-two*x*omx)*(two*lomx-lx+L-epinv)+two*x*omx
+ if (omx .gt. aii) ii_qg=ii_qg+(one-two*x*omx)*dlog(aii/omx)
+ endif
+ return
+ end
+
+***************************** Gluon-Quark *****************************
+ double precision function ii_gq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-quark (--> gluon) antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agq=(1+(1-x)^2)/x*(-[ln(x)]+L+2*[ln(1-x)])+x
+
+
+c IIgq = + x - [ln(x)]*[(1+(1-x)^2)/x] + [ln(al(x))]*
+c [(1+(1-x)^2)/x] + [(1+(1-x)^2)/x]*L + 2*[(1+(1-x)^2)/x]*
+c [ln(1-x)] - [(1+(1-x)^2)/x]*epinv
+
+ ii_gq=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ ii_gq=(one+omx**2)/x*(two*lomx-lx+L-epinv)+x
+ if (omx .gt. aii) ii_gq=ii_gq+(one+omx**2)/x*dlog(aii/omx)
+ return
+ endif
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ii_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agg=(epinv*(epinv-L)+1/2*L^2+epinv*11/6-[pi]^2/6
+c-- -nflav/3/xn*epinv)*[delta(1-x)]
+c-- -2*[ln(x)]/[1-x]
+c-- +2*(-1+x*(1-x)+(1-x)/x)*(-[ln(x)]+L+2*[ln(1-x)])
+c-- +(4*[ln(1-x)/(1-xp)]+2*L/[1-xp])
+
+c IIgg =
+c - 2*[ln(x)]*[1-x]^-1 - 2*[ln(x)]*[(1-x)/x-1+x*(1-x)] + 2*
+c [1-x]^-1*[ln(al(x))] + 2*[ln(al(x))]*[(1-x)/x-1+x*(1-x)]
+c + 2*[(1-x)/x-1+x*(1-x)]*L + 4*[(1-x)/x-1+x*(1-x)]*[ln(1-x)]
+c - 2*[(1-x)/x-1+x*(1-x)]*epinv
+c
+c + [delta(1-x)]
+c * ( 1/2*L^2 - 1/6*pisq - epinv*L + epinv^2 )
+c
+c + [1/(1-x)_(0)]
+c * ( 2*L + 4*[ln(1-x)] - 2*epinv )
+
+ if (vorz .eq. 1) then
+ ii_gg=epinv*(epinv2-L)+half*L**2-pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_gg=ii_gg-1d0/6d0
+ return
+ else
+ write(6,*) 'Value of scheme not implemented properly ',scheme
+ stop
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ lx=dlog(x)
+ ii_gg=two*(omx/x+x*omx-one)*(two*lomx-lx+L-epinv)-two*lx/omx
+ if (omx .gt. aii) ii_gg=ii_gg
+ . +two*(one/omx+omx/x+x*omx-one)*dlog(aii/omx)
+ return
+ endif
+
+ ii_gg=two*(two*lomx+L-epinv)/omx
+
+ return
+ end
+
+***********************************************************************
+**************************** INITIAL-FINAL ****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+
+
+ double precision function if_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,ltmx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,aqq=(epinv*(epinv-L)+1/2*L^2+3/2*epinv+[pi]^2/6)*[delta(1-x)]
+c-- +(1-x-2/[1-x]*[ln(2-x)]
+c-- -(1+x)*(L+[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+ if (vorz .eq. 1) then
+ if_qq=epinv*(epinv2-L)+half*L**2+pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_qq=if_qq-half
+ return
+ else
+ write(6,*) 'Value of scheme not implemented properly ',scheme
+ stop
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+cIFqq =
+c + 1 - x - 2*[ln(x)]*[1-x]^-1 + [ln(x)]*[1+x] - 2*[1-x]^-1*
+c [ln((1+al-x)/al)] - [ln(al)]*[1+x] - [1+x]*L - [1+x]*[ln(1-x)]
+c + [1+x]*epinv
+c
+c + [delta(1-x)]
+c * ( 1/2*L^2 + 1/6*pisq - epinv*L + epinv^2 )
+c
+c + [1/(1-x)_(0)]
+c * ( 2*L + 4*[ln(1-x)] - 2*epinv )
+
+ if (vorz .eq. 2) then
+ ltmx=dlog((omx+aif)/aif)
+ lx=dlog(x)
+ if_qq=omx-two/omx*ltmx-(one+x)*(lomx+L-epinv)-(one+x**2)/omx*lx
+ if_qq=if_qq-dlog(aif)*(one+x)
+ return
+ endif
+
+ if_qq=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function if_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,ltmx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,agg=[delta(1-x)]*(
+c-- epinv*(epinv-L)+1/2*L^2+11/6*epinv+[pi]^2/6-1/3*epinv*nflav/xn)
+c-- +2*(-1+(1-x)/x+x*(1-x))*(L-[ln(x)]+[ln(1-x)])
+c-- -2*[ln(2-x)]/[1-x]-2*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+ if (vorz .eq. 1) then
+ if_gg=epinv*(epinv2-L)+half*L**2+pisq/6d0
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_gg=if_gg-1d0/6d0
+ return
+ else
+ write(6,*) 'Value of scheme not implemented properly ',scheme
+ stop
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+cIFgg =
+c - 2*[ln(x)]*[1-x]^-1 - 2*[ln(x)]*[(1-x)/x-1+x*(1-x)] - 2*
+c [1-x]^-1*[ln((1+al-x)/al)] + 2*[ln(al)]*[(1-x)/x-1+x*(1-x)]
+c + 2*[(1-x)/x-1+x*(1-x)]*L + 2*[(1-x)/x-1+x*(1-x)]*[ln(1-x)]
+c - 2*[(1-x)/x-1+x*(1-x)]*epinv
+c
+c + [delta(1-x)]
+c * ( 1/2*L^2 + 1/6*pisq - epinv*L + epinv^2 )
+c
+c + [1/(1-x)_(0)]
+c * ( 2*L + 4*[ln(1-x)] - 2*epinv )
+
+
+
+ if (vorz .eq. 2) then
+ ltmx=dlog((omx+aif)/aif)
+ lx=dlog(x)
+ if_gg=two*((lomx-lx+L-epinv+dlog(aif))*(omx/x+x*omx-one)
+ . -(ltmx+lx)/omx)
+ return
+ endif
+
+ if_gg=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function if_qg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,aqg=(1-2*x*(1-x))*(L-[ln(x)]+[ln(1-x)])+2*x*(1-x)
+cIFqg =
+c + 2*x - 2*x^2 - [ln(x)]*[x^2+(1-x)^2] + [ln(al)]*
+c [x^2+(1-x)^2] + [x^2+(1-x)^2]*L + [x^2+(1-x)^2]*[ln(1-x)]
+c - [x^2+(1-x)^2]*epinv
+
+
+ if_qg=0d0
+ if ((vorz .eq. 1).or.(vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ if_qg=(one-two*x*omx)*(lomx-lx+L-epinv+dlog(aif))+two*x*omx
+ endif
+
+ return
+ end
+
+***************************** Gluon-Quark *****************************
+ double precision function if_gq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,agq=(1+(1-x)^2)/x*(L-[ln(x)]+[ln(1-x)])+x
+cIFgq = + x - [ln(x)]*[(1+(1-x)^2)/x] + [ln(al)]*
+c [(1+(1-x)^2)/x] + [(1+(1-x)^2)/x]*L + [(1+(1-x)^2)/x]*
+c [ln(1-x)] - [(1+(1-x)^2)/x]*epinv
+
+
+ if_gq=0d0
+ if ((vorz .eq. 1).or.(vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ if_gq=(one+omx**2)/x*(lomx-lx+L-epinv+dlog(aif))+x
+ endif
+
+ return
+ end
+
+***********************************************************************
+**************************** FINAL-INITIAL ****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function fi_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,theta
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqq=(epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+7/2-[pi]^2/2)*[delta(1-x)]
+c-- +2/[1-x]*[ln(2-x)]
+c-- +(-2*[ln(1-x)/(1-xp)]-3/2/[1-xp])
+
+cFIq =
+c + 2*[1-x]^-1*[ln(2-x)]*[Theta(x-1+al)]
+c
+c + 2*[ln(1/(1-x))/(1-x)_(1-al)]
+c
+c + [delta(1-x)]
+c * ( 7/2 - 3/2*L + 1/2*L^2 - 1/2*pisq - 3/2*[ln(al)] -
+c [ln(al)]^2 + 3/2*epinv - epinv*L + epinv^2 )
+c
+c - 3/2*[1/(1-x)_(1-al)]
+ theta=0d0
+ if (x .gt. 1d0-afi) theta=1d0
+ if (vorz .eq. 1) then
+ fi_qq=epinv*(epinv2-L)+half*L**2+1.5d0*(epinv-L)
+ . +3.5d0-half*pisq-dlog(afi)*(1.5d0+dlog(afi))
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ fi_qq=fi_qq-half
+ return
+ else
+ write(6,*) 'Value of scheme not implemented properly ',scheme
+ stop
+ endif
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ fi_qq=two*dlog(two-x)/omx*theta
+ return
+ endif
+
+ fi_qq=-(two*dlog(omx)+1.5d0)/omx*theta
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function fi_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,theta
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+ include 'b0.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqg=(-2/3*(epinv-L)-10/9)*[delta(1-x)]
+c-- +0
+c-- +2/3/[1-xp]
+c-- Id,agg=
+c-- (2*epinv*(epinv-L)+L^2+(epinv-L)*11/3+67/9-[pi]^2)
+c-- *[delta(1-x)]
+c-- +4*[ln(2-x)]/[1-x]
+c-- +2*(-2*[ln(1-x)/(1-xp)]-11/6/[1-xp])
+
+cFIg =
+c + 4*[1-x]^-1*[ln(2-x)]*[Theta(x-1+al)]
+c
+c + 4*[ln(1/(1-x))/(1-x)_(1-al)]
+c
+c + [delta(1-x)]
+c * ( 67/9 + L^2 - pisq - 2*[ln(al)]^2 - 2*epinv*L + 2*epinv^2 )
+c
+c + [delta(1-x)]*CA^-1
+c * ( - 20/9*Tr*nflav - 2*[ln(al)]*b0 - 2*b0*L + 2*b0*epinv )
+c
+c + [1/(1-x)_(1-al)]*CA^-1
+c * ( - 2*b0 )
+
+ theta=0d0
+ if (x .gt. 1d0-afi) theta=1d0
+ if (vorz .eq. 1) then
+ fi_gg=two*epinv*(epinv2-L)+L**2
+ . +67d0/9d0-10d0/9d0*dfloat(nf)/xn
+ . -pisq+2d0*b0/xn*(epinv-L)-2d0*dlog(afi)*(b0/xn+dlog(afi))
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ fi_gg=fi_gg-1d0/3d0
+ return
+ else
+ write(6,*) 'Value of scheme not implemented properly ',scheme
+ stop
+ endif
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ fi_gg=four*dlog(two-x)/omx*theta
+ return
+ endif
+
+ fi_gg=-(four*dlog(omx)
+ . +11d0/3d0-dfloat(nf)/xn*2d0/3d0)/omx*theta
+ return
+ end
+
+
+
+
+***************************** Quark-Gluon *****************************
+c double precision function fi_qg(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L,omx
+c include 'constants.f'
+c include 'epinv.f'
+c include 'epinv2.f'
+c include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c--Id,aqg=(-2/3*(epinv-L)-10/9)*[delta(1-x)]
+c-- +0
+c-- +2/3/[1-xp]
+
+
+c if (vorz .eq. 1) then
+c fi_qg=2d0/3d0*(-epinv+L)-10d0/9d0
+c if (scheme .eq. 'tH-V') then
+c return
+c elseif (scheme .eq. 'dred') then
+c fi_qg=fi_qg-1d0/3d0
+c return
+c endif
+c elseif (vorz .eq. 2) then
+c fi_qg=0d0
+c elseif (vorz .eq. 3) then
+c fi_qg=2d0/3d0/(one-x)
+c endif
+c return
+c end
+
+
+***********************************************************************
+***************************** FINAL-FINAL *****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ff_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqq=epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+5-[pi]^2/2
+
+cFFq =
+c + 7/2 - 3/2*L + 1/2*L^2 + 3/2*al - 1/2*pisq - 3/2*[ln(al)]
+c - [ln(al)]^2 + 3/2*epinv - epinv*L + epinv^2
+
+ ff_qq=0d0
+ if (vorz .eq. 1) then
+ ff_qq=epinv*(epinv2-L)+half*L**2+1.5d0*(epinv-L)+5d0-half*pisq
+ ff_qq=ff_qq+1.5d0*(aff-1d0-dlog(aff))-dlog(aff)**2
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ff_qq=ff_qq-half
+ return
+ else
+ write(6,*) 'Value of scheme not implemented properly ',scheme
+ stop
+ endif
+ endif
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+c double precision function ff_qg(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L
+c include 'constants.f'
+c include 'epinv.f'
+c include 'epinv2.f'
+c include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c
+c ff_qg=0d0
+c if (vorz .eq. 1) then
+c ff_qg=-2d0/3d0*(epinv-L)-16d0/9d0
+c if (scheme .eq. 'tH-V') then
+c return
+c elseif (scheme .eq. 'dred') then
+c ff_qg=ff_qg-1d0/3d0
+c return
+c endif
+c endif
+c return
+c end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ff_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c--- 26/11/09: modified to enable separation of CA and TR pieces
+c--- (used in checks of single top + b process)
+
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c Id,agg=2*epinv*(epinv-L)+L^2+11/3*(epinv-L)+100/9-[pi]^2
+
+cFFg =
+c + 67/9 + L^2 - pisq - 2*[ln(al)]^2 - 2*epinv*L + 2*epinv^2
+c + CA^-1
+c * ( 2*al*b0 - 20/9*Tr*nflav - 2*[ln(al)]*b0 - 2*b0*L + 2*b0*epinv ) + 0.
+
+ ff_gg=0d0
+ if (vorz .eq. 1) then
+ ff_gg=two*epinv*(epinv2-L)+L**2+100d0/9d0-pisq
+ . +two*11d0/6d0*(epinv-L)
+ ff_gg=ff_gg-two*dlog(aff)**2+two*11d0/6d0*(aff-1d0-dlog(aff))
+ if (scheme .eq. 'tH-V') then
+ continue ! the above is the CT in this scheme
+ elseif (scheme .eq. 'dred') then
+ ff_gg=ff_gg-1d0/3d0
+ ! no return yet, need to include nflav piece
+ else
+ write(6,*)'Value of scheme not implemented properly ',scheme
+ stop
+ endif
+ ff_gg=ff_gg-4d0/3d0*tr*dfloat(nf)/ca*(epinv-L)
+ . -dfloat(nf)/ca*16d0/9d0
+ ff_gg=ff_gg-4d0/3d0*tr*dfloat(nf)/ca*(aff-1d0-dlog(aff))
+ endif
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/gtperp.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/gtperp.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/gtperp.f (revision 1338)
@@ -0,0 +1,62 @@
+ SUBROUTINE GTPERP(PTDQ,P,I,J,K,C,D)
+ IMPLICIT NONE
+ include 'constants.f'
+C---Find the vectors perpendicular to P(I) and P(J)
+C C AND D are purely space-like vectors in the P(I)+P(J) CMF,
+C with C in the same plane as P(K) and D perpendicular to it,
+C both having length PTDQ*SQRT(2*DOT(P,I,J))
+
+ DOUBLE PRECISION PTDQ,P(mxpart,4),C(4),D(4),PTF,DIJ,DIK,DJK,DOT
+ DOUBLE PRECISION QI(4),QJ(4),EPS4
+ INTEGER I,J,K,L
+ DIJ=DOT(P,I,J)
+ DIK=DOT(P,I,K)
+ DJK=DOT(P,J,K)
+ PTF=PTDQ/SQRT(DIK*DJK)
+ DO L=1,4
+ C(L)=PTF*(DIJ*P(K,L)-DJK*P(I,L)-DIK*P(J,L))
+ QI(L)=P(I,L)
+ QJ(L)=P(J,L)
+ ENDDO
+ DO L=1,4
+ D(L)=EPS4(L,QI,QJ,C)/DIJ
+ ENDDO
+ END
+
+C-----------------------------------------------------------------------
+ DOUBLE PRECISION FUNCTION EPS4(I,A,B,C)
+ IMPLICIT NONE
+ DOUBLE PRECISION EPS3,A(4),B(4),C(4),AA(3),BB(3),CC(3)
+ INTEGER I,J,K,S(4)
+ DATA S/+1,-1,+1,+1/
+ J=1
+ DO K=1,3
+ IF (I.EQ.J) J=J+1
+ AA(K)=A(J)
+ BB(K)=B(J)
+ CC(K)=C(J)
+ J=J+1
+ ENDDO
+ EPS4=0d0
+ DO J=1,3
+ EPS4=EPS4+CC(J)*EPS3(J,AA,BB)
+ ENDDO
+ EPS4=S(I)*EPS4
+ END
+C-----------------------------------------------------------------------
+ DOUBLE PRECISION FUNCTION EPS3(I,A,B)
+ IMPLICIT NONE
+ DOUBLE PRECISION A(3),B(3),AA(2),BB(2)
+ INTEGER I,J,K,S(3)
+ DATA S/+1,-1,+1/
+ J=1
+ DO K=1,2
+ IF (I.EQ.J) J=J+1
+ AA(K)=A(J)
+ BB(K)=B(J)
+ J=J+1
+ ENDDO
+ EPS3=S(I)*(AA(1)*BB(2)-AA(2)*BB(1))
+ END
+C-----------------------------------------------------------------------
+
Index: dynnlo-v1.5-applgrid/src/Need/ddilog.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/ddilog.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/ddilog.f (revision 1338)
@@ -0,0 +1,76 @@
+ DOUBLE PRECISION FUNCTION DDILOG(X)
+
+ DOUBLE PRECISION X,Y,T,S,A,PI3,PI6,ZERO,ONE,HALF,MALF,MONE,MTWO
+ DOUBLE PRECISION C(0:18),H,ALFA,B0,B1,B2
+
+ DATA ZERO /0.0D0/, ONE /1.0D0/
+ DATA HALF /0.5D0/, MALF /-0.5D0/, MONE /-1.0D0/, MTWO /-2.0D0/
+ DATA PI3 /3.28986 81336 96453D0/, PI6 /1.64493 40668 48226D0/
+
+ DATA C( 0) / 0.42996 69356 08137 0D0/
+ DATA C( 1) / 0.40975 98753 30771 1D0/
+ DATA C( 2) /-0.01858 84366 50146 0D0/
+ DATA C( 3) / 0.00145 75108 40622 7D0/
+ DATA C( 4) /-0.00014 30418 44423 4D0/
+ DATA C( 5) / 0.00001 58841 55418 8D0/
+ DATA C( 6) /-0.00000 19078 49593 9D0/
+ DATA C( 7) / 0.00000 02419 51808 5D0/
+ DATA C( 8) /-0.00000 00319 33412 7D0/
+ DATA C( 9) / 0.00000 00043 45450 6D0/
+ DATA C(10) /-0.00000 00006 05784 8D0/
+ DATA C(11) / 0.00000 00000 86121 0D0/
+ DATA C(12) /-0.00000 00000 12443 3D0/
+ DATA C(13) / 0.00000 00000 01822 6D0/
+ DATA C(14) /-0.00000 00000 00270 1D0/
+ DATA C(15) / 0.00000 00000 00040 4D0/
+ DATA C(16) /-0.00000 00000 00006 1D0/
+ DATA C(17) / 0.00000 00000 00000 9D0/
+ DATA C(18) /-0.00000 00000 00000 1D0/
+
+ IF(X .EQ. ONE) THEN
+ DDILOG=PI6
+ RETURN
+ ELSE IF(X .EQ. MONE) THEN
+ DDILOG=MALF*PI6
+ RETURN
+ END IF
+ T=-X
+ IF(T .LE. MTWO) THEN
+ Y=MONE/(ONE+T)
+ S=ONE
+ A=-PI3+HALF*(LOG(-T)**2-LOG(ONE+ONE/T)**2)
+ ELSE IF(T .LT. MONE) THEN
+ Y=MONE-T
+ S=MONE
+ A=LOG(-T)
+ A=-PI6+A*(A+LOG(ONE+ONE/T))
+ ELSE IF(T .LE. MALF) THEN
+ Y=(MONE-T)/T
+ S=ONE
+ A=LOG(-T)
+ A=-PI6+A*(MALF*A+LOG(ONE+T))
+ ELSE IF(T .LT. ZERO) THEN
+ Y=-T/(ONE+T)
+ S=MONE
+ A=HALF*LOG(ONE+T)**2
+ ELSE IF(T .LE. ONE) THEN
+ Y=T
+ S=ONE
+ A=ZERO
+ ELSE
+ Y=ONE/T
+ S=MONE
+ A=PI6+HALF*LOG(T)**2
+ END IF
+
+ H=Y+Y-ONE
+ ALFA=H+H
+ B1=ZERO
+ B2=ZERO
+ DO 1 I = 18,0,-1
+ B0=C(I)+ALFA*B1-B2
+ B2=B1
+ 1 B1=B0
+ DDILOG=-(S*(B0-H*B2)+A)
+ RETURN
+ END
Index: dynnlo-v1.5-applgrid/src/Need/etmiss.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/etmiss.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/etmiss.f (revision 1338)
@@ -0,0 +1,25 @@
+ double precision function etmiss(p,etvec)
+ implicit none
+ include 'constants.f'
+ character*2 plabel(mxpart)
+ integer j,k
+ double precision etvec(4),p(mxpart,4)
+ common/plabel/plabel
+
+ do k=1,4
+ etvec(k)=0d0
+ enddo
+
+ do j=1,mxpart
+ if ((plabel(j) .eq. 'nl') .or. (plabel(j) .eq. 'na')) then
+ do k=1,4
+ etvec(k)=etvec(k)+p(j,k)
+ enddo
+ endif
+ enddo
+
+ etmiss=dsqrt(etvec(1)**2+etvec(2)**2)
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/eq.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/eq.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/eq.f (revision 1338)
@@ -0,0 +1,2 @@
+ double precision EQ(-6:6)
+ common/eq/EQ
Index: dynnlo-v1.5-applgrid/src/Need/pdfset_old2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/pdfset_old2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/pdfset_old2.f (revision 1338)
@@ -0,0 +1,272 @@
+ subroutine pdfset
+ implicit none
+ include 'nlooprun.f'
+ include 'pdfiset.f'
+ double precision amz
+ common/couple/amz
+
+ character *50 prefix
+ character *36 pdfstring
+ integer nset
+ common/prefix/nset,prefix
+ common/pdfstring/pdfstring
+
+
+ if (iset.eq.61) then
+ amz=0.1197d0
+ nlooprun=2
+ pdfstring='MRST2002 NLO'
+ elseif (iset.eq.62) then
+ amz=0.1154d0
+ nlooprun=3
+ pdfstring='MRST2002 NNLO'
+ elseif (iset.eq.49) then
+ amz=0.130d0
+ nlooprun=1
+ pdfstring='MRST2002 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+ elseif (iset.eq.71) then
+ amz=0.1205d0
+ nlooprun=2
+ pdfstring='MRST2004 NLO'
+ elseif (iset.eq.72) then
+ amz=0.1167d0
+ nlooprun=3
+ pdfstring='MRST2004 NNLO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.41) then
+ amz=0.119d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO'
+ elseif (iset.eq.42) then
+ amz=0.117d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO lower alphas'
+ elseif (iset.eq.43) then
+ amz=0.121d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO higher alphas'
+ elseif (iset.eq.44) then
+ amz=0.121d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO better fit to jet data'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.45) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO'
+ elseif (iset.eq.46) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO fast evolution'
+ elseif (iset.eq.47) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO slow evolution'
+ elseif (iset.eq.48) then
+ amz=0.1180d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO better fit to jet data'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.2) then !CTEQ4 NLO
+ amz=0.116d0
+ nlooprun=2
+ pdfstring='CTEQ4 NLO'
+ elseif (iset.eq.1) then !CTEQ4 LO
+ amz=0.132d0
+ nlooprun=1
+ pdfstring='CTEQ4 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.11) then !MRS98 NLO central gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO'
+ elseif (iset.eq.12) then !MRS98 NLO higher gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO higher gluon'
+ elseif (iset.eq.13) then !MRS98 NLO lower gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO lower gluon'
+ elseif (iset.eq.14) then !MRS98 NLO lower as
+ amz=0.1125
+ nlooprun=2
+ pdfstring='MRST98 NLO lower alphas'
+ elseif (iset.eq.15) then !MRS98 NLO higher as
+ amz=0.1225
+ nlooprun=2
+ pdfstring='MRST98 NLO higher alphas'
+ elseif (iset.eq.16) then !MRST98 LO central gluon
+ amz=0.125
+ nlooprun=1
+ pdfstring='MRST98 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.21) then
+ Call SetCtq5(1)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5M NLO'
+ elseif (iset.eq.22) then
+ Call SetCtq5(2)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5D NLO DIS'
+ elseif (iset .eq.23) then
+ Call SetCtq5(3)
+ amz=0.127d0
+ nlooprun=1
+ pdfstring='CTEQ5L LO'
+ elseif (iset .eq.24) then
+ Call SetCtq5(4)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HJ NLO large x gluon enhanced'
+ elseif (iset .eq.25) then
+ Call SetCtq5(5)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HQ NLO Heavy quark'
+ elseif (iset .eq.28) then
+ Call SetCtq5(8)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5M1 NLO improved'
+ elseif (iset .eq.29) then
+ Call SetCtq5(9)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HQ1 NLO improved'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.30) then !MRS99 NLO central gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 NLO'
+ elseif (iset.eq.31) then !MRS99 NLO higher gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 higher gluon'
+ elseif (iset.eq.32) then !MRS99 NLO lower gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 lower gluon'
+ elseif (iset.eq.33) then !MRS99 NLO lower as
+ amz=0.1125
+ nlooprun=2
+ pdfstring='MRST99 lower alphas'
+ elseif (iset.eq.34) then !MRS99 NLO higher as
+ amz=0.1225
+ nlooprun=2
+ pdfstring='MRST99 higher alphas'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset .eq.53) then
+ amz=0.118d0
+ Call SetCtq6(1)
+ nlooprun=2
+ pdfstring='CTEQ6M NLO'
+ elseif (iset.eq.51) then
+ amz=0.118d0
+ Call SetCtq6(3)
+ nlooprun=1
+ pdfstring='CTEQ6L LO'
+ elseif (iset.eq.52) then
+ amz=0.130d0
+ Call SetCtq6(4)
+ nlooprun=1
+ pdfstring='CTEQ6L1 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.55) then
+ amz=0.118d0
+ Call SetCtq6(400)
+ nlooprun=2
+ pdfstring='CTEQ6.6M NLO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCC CCCCCCC
+CCCCC NEW: MSTW2008 CCCCCCC
+
+ elseif (iset.eq.90) then
+ amz=0.13939d0
+ nlooprun=1
+ pdfstring='MSTW2008 LO'
+ prefix = "Pdfdata/mstw2008/mstw2008lo"
+ elseif (iset.eq.91) then
+ amz=0.12018
+ nlooprun=2
+ pdfstring='MSTW2008 NLO'
+ prefix = "Pdfdata/mstw2008/mstw2008nlo"
+ elseif (iset.eq.92) then
+ amz=0.11707
+ nlooprun=3
+ pdfstring='MSTW2008 NNLO'
+ prefix = "Pdfdata/mstw2008/mstw2008nnlo"
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: ALEKHIN06
+
+ elseif (iset.eq.75) then
+ amz=0.1128d0
+ nlooprun=3
+ pdfstring='ALEKHIN 2006'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: ALEKHIN09
+
+ elseif (iset.eq.85) then
+ amz=0.1129d0
+ nlooprun=3
+ pdfstring='ALEKHIN 2009'
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: REYA08 LO
+
+ elseif (iset.eq.65) then
+ Call GJR08VFNSinit
+ amz=0.1263d0
+ nlooprun=1
+ pdfstring='GJR08VF LO'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: REYA08 NLO
+
+ elseif (iset.eq.66) then
+ Call GJR08VFNSinit
+ amz=0.1145d0
+ nlooprun=2
+ pdfstring='GJR08VF NLO'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: REYA09 NNLO
+
+ elseif (iset.eq.67) then
+ Call JR09VFNNLOinit
+ amz=0.1124d0
+ nlooprun=3
+ pdfstring='JR09VF NNLO'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+ else
+ write(6,*) 'Unimplemented distribution= ',iset
+
+ stop
+ endif
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/dipoles_fac.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipoles_fac.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipoles_fac.f (revision 1338)
@@ -0,0 +1,185 @@
+***************************** Gluon-Gluon *****************************
+ double precision function ii_gg_fac(x,L,Lfac,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,Lfac,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agg=(epinv*(epinv-L)+1/2*L^2+epinv*11/6-[pi]^2/6
+c-- -nf/3/xn*epinv)*[delta(1-x)]
+c-- -2*[ln(x)]/[1-x]
+c-- +2*(-1+x*(1-x)+(1-x)/x)*(-[ln(x)]+L+2*[ln(1-x)])
+c-- +(4*[ln(1-x)/(1-xp)]+2*L/[1-xp])
+
+ if (vorz .eq. 1) then
+ ii_gg_fac=epinv*(epinv2-L)+half*L**2-pisqo6
+ . +(11/6d0-dfloat(nf)/3d0/xn)*(epinv-L)
+ . -(11/6d0-dfloat(nf)/3d0/xn)*(epinv-Lfac)
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_gg_fac=ii_gg_fac-1d0/6d0
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ lx=dlog(x)
+ ii_gg_fac=two*(omx/x+x*omx-one)*(two*lomx-lx+Lfac-epinv)
+ . -two*lx/omx
+ return
+ endif
+
+ ii_gg_fac=two*(two*lomx+Lfac-epinv)/omx
+
+ return
+ end
+
+
+***************************** Gluon-Gluon *****************************
+ double precision function if_gg_fac(x,L,Lfac,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,Lfac,omx,lx,lomx,ltmx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,agg=[delta(1-x)]*(
+c-- epinv*(epinv-L)+1/2*L^2+11/6*epinv+[pi]^2/6-1/3*epinv*nf/xn)
+c-- +2*(-1+(1-x)/x+x*(1-x))*(L-[ln(x)]+[ln(1-x)])
+c-- -2*[ln(2-x)]/[1-x]-2*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+ if (vorz .eq. 1) then
+ if_gg_fac=epinv*(epinv2-L)+half*L**2+pisq/6d0
+ . +(11/6d0-dfloat(nf)/3d0/xn)*(epinv-L)
+ . -(11/6d0-dfloat(nf)/3d0/xn)*(epinv-Lfac)
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_gg_fac=if_gg_fac-1d0/6d0
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ ltmx=dlog(two-x)
+ lx=dlog(x)
+ if_gg_fac=two*((lomx-lx+Lfac-epinv)*(omx/x+x*omx-one)
+ . -(ltmx+lx)/omx)
+ return
+ endif
+
+ if_gg_fac=two/omx*(two*lomx+Lfac-epinv)
+
+ return
+ end
+
+***************************** Quark-Quark *****************************
+ double precision function ii_qq_fac(x,L,Lfac,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,Lfac,omx,lx,lomx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqq=
+c-- [delta(1-x)]*(epinv*(epinv-L)+1/2*L^2+3/2*epinv-[pi]^2/6)
+c-- +(1-x)-(1+x)*(L+2*[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+
+ if (vorz .eq. 1) then
+ ii_qq_fac=epinv*(epinv2-L)+0.5d0*L**2-pisqo6
+ . +1.5d0*(epinv-L)
+ . -1.5d0*(epinv-Lfac)
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ii_qq_fac=ii_qq_fac-half
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ ii_qq_fac=omx-(one+x)*(two*lomx+Lfac-epinv)-(one+x**2)/omx*lx
+ return
+ endif
+
+ ii_qq_fac=two/omx*(two*lomx+Lfac-epinv)
+
+ return
+ end
+
+***************************** Quark-Quark *****************************
+ double precision function if_qq_fac(x,L,Lfac,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,Lfac,omx,lx,lomx,ltmx
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,aqq=(epinv*(epinv-L)+1/2*L^2+3/2*epinv+[pi]^2/6)*[delta(1-x)]
+c-- +(1-x-2/[1-x]*[ln(2-x)]
+c-- -(1+x)*(L+[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+ if (vorz .eq. 1) then
+ if_qq_fac=epinv*(epinv2-L)+half*L**2+pisqo6
+ . +1.5d0*(epinv-L)
+ . -1.5d0*(epinv-Lfac)
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ if_qq_fac=if_qq_fac-half
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ ltmx=dlog(two-x)
+ lx=dlog(x)
+ if_qq_fac=omx-two*ltmx/omx-(one+x)*(lomx+Lfac-epinv)
+ . -(one+x**2)/omx*lx
+ return
+ endif
+
+ if_qq_fac=two/omx*(two*lomx+Lfac-epinv)
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/dotem.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dotem.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dotem.f (revision 1338)
@@ -0,0 +1,16 @@
+ subroutine dotem(N,p,s)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),s(mxpart,mxpart)
+ integer j,k,N
+c---returns 2*piDpj for massless particles
+ do j=1,N
+ s(j,j)=0d0
+ do k=j+1,N
+ s(j,k)=2d0*
+ & (p(j,4)*p(k,4)-p(j,1)*p(k,1)-p(j,2)*p(k,2)-p(j,3)*p(k,3))
+ s(k,j)=s(j,k)
+ enddo
+ enddo
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/alfamz.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/alfamz.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/alfamz.f (revision 1338)
@@ -0,0 +1,138 @@
+ DOUBLE PRECISION FUNCTION ALPHAS(Q,AMZ,NLOOP)
+c Evaluation of strong coupling constant alpha_S
+c Author: R.K. Ellis
+
+c q -- scale at which alpha_s is to be evaluated
+c amz -- value of alpha_s at the mass of the Z-boson
+c nloop -- the number of loops (1,2, or 3) at which beta
+c function is evaluated to determine running.
+c the values of the cmass and the bmass should be set
+c in common block qmass.
+
+ IMPLICIT NONE
+ DOUBLE PRECISION Q,T,AMZ,AMZ0,AMB,AMC,ZMASS,BMASS,CMASS,AS_OUT
+ INTEGER NLOOP,NLOOP0,NF3,NF4,NF5
+ PARAMETER(ZMASS=91.188D0)
+ PARAMETER(NF5=5,NF4=4,NF3=3)
+ COMMON/QMASS/CMASS,BMASS
+ SAVE AMZ0,NLOOP0,AMB,AMC
+ DATA AMZ0,NLOOP0/0D0,0/
+
+ IF (Q .LE. 0D0) THEN
+ WRITE(6,*) 'q .le. 0 in alphas'
+ WRITE(6,*) 'q= ',Q
+ STOP
+ ENDIF
+ IF (AMZ .LE. 0D0) THEN
+ WRITE(6,*) 'amz .le. 0 in alphas',AMZ
+ STOP
+ ENDIF
+ IF (CMASS .LE. 0.3D0) THEN
+ WRITE(6,*) 'cmass .le. 0.3GeV in alphas',CMASS
+ WRITE(6,*) 'COMMON/QMASS/CMASS,BMASS'
+ WRITE(6,*) 'continue with cmass=1.5GeV'
+ CMASS=1.5D0
+ ENDIF
+ IF (BMASS .LE. 0D0) THEN
+ WRITE(6,*) 'bmass .le. 0 in alphas',BMASS
+ WRITE(6,*) 'COMMON/QMASS/CMASS,BMASS'
+ WRITE(6,*) 'continue with bmass=5.0GeV'
+ BMASS=5D0
+ ENDIF
+c--- establish value of coupling at b- and c-mass and save
+ IF ((AMZ .NE. AMZ0) .OR. (NLOOP .NE. NLOOP0)) THEN
+ AMZ0=AMZ
+ NLOOP0=NLOOP
+ T=2D0*DLOG(BMASS/ZMASS)
+ CALL NEWTON1(T,AMZ,AMB,NLOOP,NF5)
+ T=2D0*DLOG(CMASS/BMASS)
+ CALL NEWTON1(T,AMB,AMC,NLOOP,NF4)
+ ENDIF
+
+c--- evaluate strong coupling at scale q
+ IF (Q .LT. BMASS) THEN
+ IF (Q .LT. CMASS) THEN
+ T=2D0*DLOG(Q/CMASS)
+ CALL NEWTON1(T,AMC,AS_OUT,NLOOP,NF3)
+ ELSE
+ T=2D0*DLOG(Q/BMASS)
+ CALL NEWTON1(T,AMB,AS_OUT,NLOOP,NF4)
+ ENDIF
+ ELSE
+ T=2D0*DLOG(Q/ZMASS)
+ CALL NEWTON1(T,AMZ,AS_OUT,NLOOP,NF5)
+ ENDIF
+ ALPHAS=AS_OUT
+ RETURN
+ END
+
+
+ SUBROUTINE DIFF(Q,AMZ,NLOOP)
+ IMPLICIT NONE
+ DOUBLE PRECISION BETA(3:5),B0(3:5),C1(3:5),C2(3:5)
+ INTEGER NLOOP,J
+ DOUBLE PRECISION Q,QP,QM,AMZ,CMASS,BMASS,X1,X2,X3,EP,DIFF1,ALPHAS
+ COMMON/QMASS/CMASS,BMASS
+C--- B0=(11.-2.*F/3.)/4./PI
+ DATA B0/0.716197243913527D0,0.66314559621623D0,0.61009394851893D0/
+C--- C1=(102.D0-38.D0/3.D0*F)/4.D0/PI/(11.D0-2.D0/3.D0*F)
+ DATA C1/.565884242104515D0,0.49019722472304D0,0.40134724779695D0/
+C--- C2=(2857.D0/2.D0-5033*F/18.D0+325*F**2/54)
+C--- /16.D0/PI**2/(11.D0-2.D0/3.D0*F)
+ DATA C2/0.453013579178645D0,0.30879037953664D0,0.14942733137107D0/
+C--- DEL=SQRT(4*C2-C1**2)
+
+ X1=ALPHAS(Q,AMZ,1)
+ X2=ALPHAS(Q,AMZ,2)
+ X3=ALPHAS(Q,AMZ,3)
+ J=3
+ IF (Q .GT. CMASS) J=4
+ IF (Q .GT. BMASS) J=5
+ EP=.001D0
+ QP=Q*(1D0+EP)
+ QM=Q*(1D0-EP)
+ IF (NLOOP .EQ.1) THEN
+ BETA(J)=-B0(J)*X1**2
+ DIFF1=(ALPHAS(QP,AMZ,1)-ALPHAS(QM,AMZ,1))/4d0/EP/BETA(J)
+ ENDIF
+ IF (NLOOP .EQ.2) THEN
+ BETA(J)=-B0(J)*X2**2*(1D0+C1(J)*X2)
+ DIFF1=(ALPHAS(QP,AMZ,2)-ALPHAS(QM,AMZ,2))/4d0/EP/BETA(J)
+ ENDIF
+ IF (NLOOP .EQ.3) THEN
+ BETA(J)=-B0(J)*X3**2*(1D0+C1(J)*X3+C2(J)*X3**2)
+ DIFF1=(ALPHAS(QP,AMZ,3)-ALPHAS(QM,AMZ,3))/4d0/EP/BETA(J)
+ ENDIF
+ WRITE(6,*) Q,DIFF1,NLOOP
+ RETURN
+ END
+
+C IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+C DOUBLE PRECISION B0(3:5),C1(3:5),C2(3:5),DEL(3:5)
+C PARAMETER(PI=3.1415926535898D0)
+C NLOOP=2
+C AMZ=0.113D0
+C DO N=3,5
+C F=DFLOAT(N)
+C B0(N)=(11.D0-2.D0*F/3.D0)/4.D0/PI
+C C1(N)=(102.D0-38.D0/3.D0*F)/4.D0/PI/(11.D0-2.D0/3.D0*F)
+C C2(N)=(2857.D0/2.D0-5033*F/18.D0+325D0*F**2/54D0)
+C & /16D0/PI**2/(11.D0-2D0/3D0*F)
+C DEL(N)=SQRT(4D0*C2(N)-C1(N)**2)
+C ENDDO
+C OPEN(UNIT=67,FILE='TEMP.DAT')
+C WRITE(67,*) B0
+C WRITE(67,*) C1
+C WRITE(67,*) C2
+C WRITE(67,*) DEL
+C DO N=1,100
+C Q=DFLOAT(N)+0.1
+C WRITE(6,*)
+C CALL DIFF(Q,AMZ,1)
+C CALL DIFF(Q,AMZ,2)
+C CALL DIFF(Q,AMZ,3)
+C ENDDO
+C STOP
+C END
+
+
Index: dynnlo-v1.5-applgrid/src/Need/boostx.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/boostx.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/boostx.f (revision 1338)
@@ -0,0 +1,46 @@
+ subroutine boostx(p_in,pt,ptt,p_out)
+ implicit none
+c--- Boost input vector p_in to output vector p_out using the same
+c--- transformation as required to boost massive vector pt to ptt
+ double precision p_in(4),pt(4),ptt(4),p_out(4),
+ . p_tmp(4),beta(3),mass,gam,bdotp
+ integer j
+
+ mass=pt(4)**2-pt(1)**2-pt(2)**2-pt(3)**2
+ if (mass .lt. 0d0) then
+ write(6,*) 'mass**2 .lt. 0 in boostx.f, mass**2=',mass
+ stop
+ endif
+ mass=dsqrt(mass)
+
+c--- boost to the rest frame of pt
+ gam=pt(4)/mass
+
+ bdotp=0d0
+ do j=1,3
+ beta(j)=-pt(j)/pt(4)
+ bdotp=bdotp+beta(j)*p_in(j)
+ enddo
+ p_tmp(4)=gam*(p_in(4)+bdotp)
+ do j=1,3
+ p_tmp(j)=p_in(j)+gam*beta(j)/(1d0+gam)*(p_in(4)+p_tmp(4))
+ enddo
+
+c--- boost from rest frame of pt to frame in which pt is identical
+c--- with ptt, thus completing the transformation
+ gam=ptt(4)/mass
+
+ bdotp=0d0
+ do j=1,3
+ beta(j)=+ptt(j)/ptt(4)
+ bdotp=bdotp+beta(j)*p_tmp(j)
+ enddo
+ p_out(4)=gam*(p_tmp(4)+bdotp)
+ do j=1,3
+ p_out(j)=p_tmp(j)+gam*beta(j)/(1d0+gam)*(p_out(4)+p_tmp(4))
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/lowint_incldip.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/lowint_incldip.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/lowint_incldip.f (revision 1338)
@@ -0,0 +1,241 @@
+CC Used to compute Higgs or W(Z) cross section at NLO only
+
+ double precision function lowint(r,wgt)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'limits.f'
+ include 'npart.f'
+ include 'vegas_common.f'
+ include 'sprods_com.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'noglue.f'
+ include 'efficiency.f'
+ include 'maxwt.f'
+ include 'phasemin.f'
+ include 'dynamicscale.f'
+c P.S. to use grids
+ include 'ptilde.f'
+ include 'qcdcouple.f'
+ include 'APPLinclude.f'
+ double precision psCR
+c P.S. end
+CC
+CC Variables to be passed to the counterterm
+CC
+ double precision qt2,qq2,shat,dot
+ common/count/qt2,qq2,shat
+
+c --- To use VEGAS random number sequence :
+ double precision ran2
+ integer ih1,ih2,j,k,nvec,sgnj,sgnk
+ double precision r(mxdim),W,sqrts,xmsq,val,
+ . fx1(-nf:nf),fx2(-nf:nf),p(mxpart,4),pjet(mxpart,4),
+ . pswt,rscalestart,fscalestart
+ double precision wgt,msq(-nf:nf,-nf:nf),m3,m4,m5,xmsqjk
+c double precision msqa(-nf:nf,-nf:nf),n(4)
+ double precision xx(2),flux,vol,vol_mass,vol3_mass,BrnRat
+ logical bin,first,includedipole
+ logical creatent,dswhisto
+ integer nproc
+ common/density/ih1,ih2
+ common/energy/sqrts
+ common/bin/bin
+ common/x1x2/xx
+ common/BrnRat/BrnRat
+ common/nproc/nproc
+ common/outputflags/creatent,dswhisto
+ data p/48*0d0/
+ data first/.true./
+ save first,rscalestart,fscalestart
+
+ if (first) then
+ first=.false.
+ rscalestart=scale
+ fscalestart=facscale
+ endif
+
+ ntotshot=ntotshot+1
+ lowint=0d0
+
+ W=sqrts**2
+
+
+
+ npart=3
+ call gen3(r,p,pswt,*999)
+ qq2=2*dot(p,3,4)
+ qt2=p(5,1)**2+p(5,2)**2
+
+
+ shat=2*dot(p,1,2)
+
+ nvec=npart+2
+
+
+C Dynamic scale
+
+ if(dynamicscale) call scaleset(qq2)
+
+
+ call dotem(nvec,p,s)
+
+ call masscuts(s,*999)
+
+c----reject event if any s(i,j) is too small
+ call smalls(s,npart,*999)
+
+c--- see whether this point will pass cuts - if it will not, do not
+c--- bother calculating the matrix elements for it, instead bail out
+ if (includedipole(0,p) .eqv. .false.) then
+ goto 999
+ endif
+
+
+ xx(1)=-2d0*p(1,4)/sqrts
+ xx(2)=-2d0*p(2,4)/sqrts
+
+
+c--- Calculate the required matrix elements
+
+ if(nproc.eq.3) then
+ call qqb_z_g(p,msq)
+ else
+ call qqb_w_g(p,msq)
+ endif
+
+c --- P.S. initialize array
+ if (creategrid.and.bin) then
+ do j=-nf,nf
+ do k=-nf,nf
+ weightb(j,k) = 0d0
+ enddo
+ enddo
+ psCR = eight*pisq/gsq
+ weightfactor = 1d0
+ contrib = -100
+ endif
+c P.S end init
+
+ flux=fbGeV2/(2d0*xx(1)*xx(2)*W)
+
+
+ 777 continue
+ xmsq=0d0
+
+
+c--- calculate PDF's
+
+ call fdist(ih1,xx(1),facscale,fx1)
+ call fdist(ih2,xx(2),facscale,fx2)
+
+
+
+CC TIENI SOLO uubar
+c do j=-nf,1
+c fx1(j)=0d0
+c enddo
+c do j=3,nf
+c fx1(j)=0d0
+c enddo
+c do j=-nf,-3
+c fx2(j)=0d0
+c enddo
+c do j=-1,nf
+c fx2(j)=0d0
+c enddo
+CC
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if (ggonly) then
+ if ((j.ne.0) .or. (k.ne.0)) goto 20
+ endif
+
+ if (gqonly) then
+ if (((j.eq.0).and.(k.eq.0)) .or. ((j.ne.0).and.(k.ne.0))) goto 20
+ endif
+
+ if (noglue) then
+ if ((j.eq.0) .or. (k.eq.0)) goto 20
+ endif
+
+ xmsqjk=fx1(j)*fx2(k)*msq(j,k)
+ xmsq=xmsq+xmsqjk
+
+ if (j .gt. 0) then
+ sgnj=+1
+ elseif (j .lt. 0) then
+ sgnj=-1
+ else
+ sgnj=0
+ endif
+ if (k .gt. 0) then
+ sgnk=+1
+ elseif (k .lt. 0) then
+ sgnk=-1
+ else
+ sgnk=0
+ endif
+
+c---- P.S. save weight
+ if(creategrid)then
+ weightb(j,k) = weightb(j,k) + msq(j,k) * psCR
+ endif
+c---- P.S. end
+
+ 20 continue
+ enddo
+ enddo
+
+
+ lowint=flux*pswt*xmsq/BrnRat
+
+
+
+ call getptildejet(0,pjet)
+
+ call dotem(nvec,pjet,s)
+
+
+ val=lowint*wgt
+c--- update the maximum weight so far, if necessary
+c--- but not if we are already unweighting ...
+ if ((.not.unweight) .and. (dabs(val) .gt. wtmax)) then
+ wtmax=dabs(val)
+ endif
+
+ if (bin) then
+ val=val/dfloat(itmx)
+c --- DSW. If the user has not selected to generate
+c --- events, still call plotter here in order to
+c --- fill histograms/ntuples with weighted events :
+ if (.not.evtgen) then
+c P.S. born level 1jet (alphas^1 ) ME.
+ if (creategrid.and.bin) then
+ contrib = 110
+ weightfactor = flux*pswt*wgt/BrnRat/dfloat(itmx)
+ ag_xx1 = xx(1)
+ ag_xx2 = xx(2)
+ ag_scale = facscale
+ refwt = val
+ refwt2 = val*val*dfloat(itmx)
+ endif
+c P.S.
+ call plotter(pjet,val,0)
+ endif
+ endif
+
+
+ return
+
+ 999 continue
+ ntotzero=ntotzero+1
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/includedipole.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/includedipole.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/includedipole.f (revision 1338)
@@ -0,0 +1,68 @@
+ logical function includedipole(nd,ptrans)
+ implicit none
+ include 'constants.f'
+ include 'clustering.f'
+ include 'npart.f'
+ include 'ptilde.f'
+ include 'jetlabel.f'
+ double precision ptrans(mxpart,4),pjet(mxpart,4),rcut,pt34
+ double precision qt2,xqtcut,Q2
+ integer i,j,nd,nqcdjets,nqcdstart,notag,isub
+ logical cuts,failedcuts,makecuts,isolation,isol
+
+ common/nqcdjets/nqcdjets,nqcdstart
+ common/rcut/rcut
+ common/makecuts/makecuts
+ common/notag/notag
+ common/qtcut/xqtcut
+ common/isol/isol
+
+
+ includedipole=.true.
+
+ if (nd .gt. 0) then
+ isub=1
+ else
+ isub=0
+ endif
+
+CC Compute qt2,Q2
+
+ qt2=(ptrans(3,1)+ptrans(4,1))**2+(ptrans(3,2)+ptrans(4,2))**2
+
+ Q2=(ptrans(3,4)+ptrans(4,4))**2
+ # -(ptrans(3,1)+ptrans(4,1))**2
+ # -(ptrans(3,2)+ptrans(4,2))**2
+ # -(ptrans(3,3)+ptrans(4,3))**2
+
+
+ if(dsqrt(qt2/Q2).lt.xqtcut) then
+ includedipole=.false.
+ else
+
+ call genclust2(ptrans,rcut,pjet,isub)
+ do j=1,4
+ do i=1,npart+2
+ ptildejet(nd,i,j)=pjet(i,j)
+ enddo
+ enddo
+
+
+CC Insert here isolation cut
+
+ if(isol) then
+ if(isolation(ptrans).eqv..false.) includedipole=.false.
+ endif
+
+c--- check the lepton cuts
+
+ if (makecuts) then
+ failedcuts=cuts(pjet,jets)
+ if (failedcuts) includedipole=.false.
+ endif
+
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/hexit.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/hexit.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/hexit.f (revision 1338)
@@ -0,0 +1,21 @@
+ subroutine hexit(xinteg,xinteg_err)
+ implicit none
+ double precision xinteg,xinteg_err
+ integer itmx1,ncall1,itmx2,ncall2
+ common/iterat/itmx1,ncall1,itmx2,ncall2
+
+
+c--- Print-out the value of the integral and its error
+ write(6,*)
+ write(6,53)xinteg,xinteg_err
+ write(6,*)
+
+ 53 format('Cross section is',f13.3,' +/-',f10.3,' fb')
+
+
+ call histofin(xinteg,xinteg_err,itmx2,itmx2)
+
+
+ return
+
+ end
Index: dynnlo-v1.5-applgrid/src/Need/storedipx.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/storedipx.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/storedipx.f (revision 1338)
@@ -0,0 +1,45 @@
+ subroutine storedipx(msqx_st,msqvx_st,msqx_dip,msqx_dipv,
+ . sub_st,subv_st,sub_dip,sub_dipv,n)
+c--- this routine transfers the information on the colour
+c--- structure from a common block into separate arrays for
+c--- each parton configuration
+ implicit none
+ include 'constants.f'
+ include 'msq_cs.f'
+ include 'msqv_cs.f'
+ integer i,j,k,l,m,n
+ double precision
+ . msqx_st(0:2,-nf:nf,-nf:nf,-nf:nf,-nf:nf),
+ . msqvx_st(0:2,-1:1,-1:1,-1:1,-1:1),
+ . msqx_dip(36,0:2,-nf:nf,-nf:nf,-nf:nf,-nf:nf),
+ . msqx_dipv(36,0:2,-1:1,-1:1,-1:1,-1:1),
+ . sub_st(4),sub_dip(36,4),subv_st,sub_dipv(36)
+
+
+ do i=0,2
+c do j=-nf,nf
+c do k=-nf,nf
+c do l=-nf,nf
+c do m=-nf,nf
+ do j=-2,2
+ do k=-2,2
+ do l=-2,2
+ do m=-2,2
+ msqx_dip(n,i,j,k,l,m)=msqx_st(i,j,k,l,m)
+ if ((abs(j) .lt. 2) .and. (abs(k) .lt. 2)
+ . .and. (abs(l) .lt. 2) .and. (abs(m) .lt. 2)) then
+ msqx_dipv(n,i,j,k,l,m)=msqvx_st(i,j,k,l,m)
+ endif
+ enddo
+ enddo
+ enddo
+ enddo
+ enddo
+
+ do i=1,4
+ sub_dip(n,i)=sub_st(i)
+ enddo
+ sub_dipv(n)=subv_st
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/mcfm.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/mcfm.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/mcfm.f (revision 1338)
@@ -0,0 +1,78 @@
+ program mcfm
+************************************************************************
+* *
+* This is the main program for MCFM *
+* *
+* The sequence of calls should always be: *
+* call mcfm_init : basic variable initialization, print-out *
+* call mcfm_vegas(warmup) : warm-up the Vegas grid *
+* call mcfm_vegas(accum) : accumulate results *
+* call mcfm_exit : final processing and print-out *
+* *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'maxwt.f'
+ include 'eventbuffer.f'
+ include 'gridinfo.f'
+ integer itmx1,ncall1,itmx2,ncall2
+ double precision integ,integ_err
+ logical dryrun
+ integer i,pflav,pbarflav
+ double precision p(mxpart,4),wt
+ common/iterat/itmx1,ncall1,itmx2,ncall2
+ common/dryrun/dryrun
+
+* basic variable initialization, print-out
+ call mcfm_init
+
+* in initial phases, we don't want any unweighting to take place.
+* this will be set true in the first call to getevent.
+ unweight = .false.
+* if we're reading in a grid, there's no need to do any warming-up
+ if (readin) dryrun=.true.
+
+* This is the mcfm_vegas(warmup) call
+* The Vegas parameters are those read from options.DAT for
+* the warm-up stage (itmx1,ncall1) and binning should only take
+* place if dryrun is set to true
+
+* There are now 3 modes of operation:
+* dryrun = .false. : warmup, then freeze grid and accumulate
+* dryrun = .true. , readin = .false. : accumulate during warmup
+* dryrun = .true. , readin = .true. : accumulate with frozen grid
+
+ if ((dryrun .eqv. .false.) .or.
+ . ((dryrun) .and. (readin .eqv. .false.))) then
+ call mcfm_vegas(0,itmx1,ncall1,dryrun,integ,integ_err)
+ endif
+* This is the mcfm_vegas(accum) call
+* This takes place only if dryrun is false
+* The Vegas parameters are those read from options.DAT for
+* the results stage (itmx2,ncall2) and binning takes place (.true.)
+* wtmax may have been set during the dry run, so re-set here :
+ wtmax = 0d0
+ if ((dryrun .eqv. .false.) .or.
+ . ((dryrun) .and. (readin .eqv. .true.))) then
+ call mcfm_vegas(1,itmx2,ncall2,.true.,integ,integ_err)
+ endif
+
+* So far we have not used VEGAS to generate any events.
+* Make sure future calls to "getevent" are aware of this :
+ numstored = 0
+
+ if (evtgen) then
+ write(6,*) 'Generate events :'
+ do i=1,500
+ call mcfm_getevent(p,wt,pflav,pbarflav)
+ call fill_stdhep(p,0,0,wt)
+c call write_stdhep(6)
+ enddo
+ endif
+
+* final processing and print-out
+ call mcfm_exit(integ,integ_err)
+
+ stop
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/aveptjet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/aveptjet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/aveptjet.f (revision 1338)
@@ -0,0 +1,41 @@
+ double precision function aveptjet(p)
+ implicit none
+ include 'constants.f'
+ include 'npart.f'
+ include 'jetlabel.f'
+ integer j,countjet
+ character*2 plabel(mxpart)
+ double precision p(mxpart,4),pjet(mxpart,4),pt,rcut
+ common/plabel/plabel
+ common/rcut/rcut
+
+ aveptjet=0
+
+c-- cluster jets
+ call genclust2(p,rcut,pjet,0)
+
+ countjet=0
+ do j=3,npart+2
+ if (countjet .eq. jets) goto 99
+ if ( (plabel(j) .eq. 'pp') .or. (plabel(j) .eq. 'pj')
+ . .or. (plabel(j) .eq. 'bq') .or. (plabel(j) .eq. 'ba')) then
+ countjet=countjet+1
+ aveptjet=aveptjet+pt(j,pjet)
+ endif
+ enddo
+
+ 99 continue
+
+c--- dummy value returned if countjet=0, since this process
+c--- must have nqcdjets > 0 - so this point will be dumped anyway
+ if (countjet .eq. 0) then
+ aveptjet=10d0
+ return
+ endif
+
+ aveptjet=aveptjet/dfloat(countjet)
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/writeout.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/writeout.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/writeout.f (revision 1338)
@@ -0,0 +1,70 @@
+ subroutine writeout(p)
+ implicit none
+ include 'constants.f'
+ integer j,n
+ double precision p(mxpart,4),dot,sum(4)
+ write(6,*) 'In writeout'
+ write(6,*) 'p1',p(1,1),p(1,2),p(1,3),p(1,4)
+ write(6,*) 'p2',p(2,1),p(2,2),p(2,3),p(2,4)
+ write(6,*) 'p3',p(3,1),p(3,2),p(3,3),p(3,4)
+ write(6,*) 'p4',p(4,1),p(4,2),p(4,3),p(4,4)
+ write(6,*) 'p5',p(5,1),p(5,2),p(5,3),p(5,4)
+ write(6,*) 'p6',p(6,1),p(6,2),p(6,3),p(6,4)
+ write(6,*) 'p7',p(7,1),p(7,2),p(7,3),p(7,4)
+ write(6,*) 'p8',p(8,1),p(8,2),p(8,3),p(8,4)
+ write(6,*) 'p9',p(9,1),p(9,2),p(9,3),p(9,4)
+ write(6,*) 'p10',p(10,1),p(10,2),p(10,3),p(10,4)
+
+ write(6,*) 's12',2d0*dot(p,1,2)
+ write(6,*) 'sqrt(s34)',sqrt(2d0*dot(p,3,4))
+ write(6,*) 's56',2d0*dot(p,5,6)
+ write(6,*) 'sqrt(s345)',
+ . sqrt(2d0*dot(p,3,4)+2d0*dot(p,3,5)+2d0*dot(p,4,5))
+ write(6,*) 'sqrt(s3457)',
+ . sqrt(2d0*dot(p,3,4)+2d0*dot(p,3,5)+2d0*dot(p,3,7)
+ . +2d0*dot(p,4,5)+2d0*dot(p,4,7)
+ . +2d0*dot(p,5,7))
+
+ do j=1,4
+ sum(j)=p(1,j)+p(2,j)
+ enddo
+ do n=3,mxpart
+ do j=1,4
+ sum(j)=sum(j)+p(n,j)
+ enddo
+ enddo
+
+ write(6,*) ' psum1',sum(1)
+ write(6,*) ' psum2',sum(2)
+ write(6,*) ' psum3',sum(3)
+ write(6,*) ' psum4',sum(4)
+c do j=1,4
+c sum(j)=-p(1,j)-p(2,j)
+c enddo
+c do n=3,mxpart
+c do j=1,4
+c sum(j)=sum(j)+p(n,j)
+c enddo
+c enddo
+
+c write(6,*) ' msum1',sum(1)
+c write(6,*) ' msum2',sum(2)
+c write(6,*) ' msum3',sum(3)
+c write(6,*) ' msum4',sum(4)
+ write(6,*) 'p1Dp1',dot(p,1,1)
+ write(6,*) 'p2Dp2',dot(p,2,2)
+ write(6,*) 'p3Dp3',dot(p,3,3)
+ write(6,*) 'p4Dp4',dot(p,4,4)
+ write(6,*) 'p5Dp5',dot(p,5,5)
+ write(6,*) 'p6Dp6',dot(p,6,6)
+ write(6,*) 'p7Dp7',dot(p,7,7)
+ write(6,*) 'p8Dp8',dot(p,8,8)
+ write(6,*) 'p9Dp9',dot(p,9,9)
+ write(6,*) 'p10Dp10',dot(p,10,10)
+ write(6,*)
+
+ call flush(6)
+ pause
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/checkversion.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/checkversion.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/checkversion.f (revision 1338)
@@ -0,0 +1,33 @@
+ subroutine checkversion(inpunit,filename)
+************************************************************************
+* Checks that the version of MCFM specified in the next line of unit *
+* "inpunit" agrees with the version number of the code *
+************************************************************************
+ implicit none
+ include 'codeversion.f'
+ integer inpunit,j,dat
+ character*6 fileversion
+ character*(*) filename
+
+ read(inpunit,*) fileversion
+
+ if (fileversion .ne. codeversion) then
+ dat=18
+ do j=1,20
+ if (filename(j:j) .eq. 'D') dat=j
+ enddo
+ write(6,*)
+ write(6,*) 'Sorry, the version of this input file does not'
+ write(6,*) 'match with the code version number. Please refer'
+ write(6,*) 'to the documentation and adjust accordingly.'
+ write(6,*)
+ write(6,*) ' Filename: ',filename(1:dat+2)
+ write(6,*) ' File version: ',fileversion
+ write(6,*) ' Code version: ',codeversion
+ write(6,*)
+ stop
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/histofin.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/histofin.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/histofin.f (revision 1338)
@@ -0,0 +1,90 @@
+ block data linlog_data
+ implicit none
+ include 'nplot.f'
+ data linlog/71*'lin',2*'log',19*'lin',7*'log'/
+ end
+
+ subroutine histofin(xsec,xsec_err)
+ implicit none
+ include 'nplot.f'
+ include 'verbose.f'
+ include 'PDFerrors.f'
+ integer j,nlength
+ character*72 runname,outfiledat,outfiletop,outfileerr
+ double precision xsec,xsec_err
+ double precision EHIST(4,40,100)
+ integer IHISTOMATCH(100),ICOUNTHISTO
+ common/runname/runname
+ common/nlength/nlength
+ COMMON/EHISTO/EHIST,IHISTOMATCH,ICOUNTHISTO
+
+ write(6,*)
+ write(6,*) '****************************************************'
+ write(6,*) 'output files ',runname
+ write(6,*) '****************************************************'
+ call flush(6)
+
+ outfiledat=runname
+ outfiletop=runname
+ outfileerr=runname
+ outfiledat(nlength+1:nlength+4)='.dat'
+ outfiletop(nlength+1:nlength+4)='.top'
+ outfileerr(nlength+1:nlength+10)='_error.top'
+
+ if ((PDFerrors) .and. (ICOUNTHISTO .gt. 0)) then
+ open(unit=97,file=outfileerr,status='unknown')
+ endif
+ open(unit=98,file=outfiledat,status='unknown')
+ open(unit=99,file=outfiletop,status='unknown')
+
+c--- write out run info to top of files
+ call writeinfo(98,xsec,xsec_err)
+ call writeinfo(99,xsec,xsec_err)
+
+ do j=1,nplot
+ if (verbose) then
+c write(6,*) 'Finalizing plot ',j
+ call flush(6)
+ endif
+ call mfinal(j)
+ enddo
+
+ do j=1,nplot
+ if (verbose) then
+c write(6,*) 'Writing .dat for plot ',j
+ call flush(6)
+ endif
+ call mprint(j)
+ enddo
+ close (unit=98)
+
+c---generate topdrawer file
+ do j=1,nplot
+ if (verbose) then
+c write(6,*) 'Writing .top for plot ',j
+ call flush(6)
+ endif
+ call mtop(j,100,'x','y',linlog(j))
+ if ((PDFerrors) .and. (IHISTOMATCH(j) .ne. 0)) then
+ call emtop(j,100,'x','y',linlog(j))
+ endif
+ enddo
+ close (unit=99)
+
+c---generate error file
+ if ((PDFerrors) .and. (ICOUNTHISTO .gt. 0)) then
+ do j=1,nplot
+ if (IHISTOMATCH(j) .ne. 0) then
+ if (verbose) then
+c write(6,*) 'Writing .top for plot ',j
+ call flush(6)
+ endif
+ call etop(j,100,'x','y',linlog(j))
+ endif
+ enddo
+ close (unit=97)
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/dot.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dot.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dot.f (revision 1338)
@@ -0,0 +1,9 @@
+ double precision function dot(p,i,j)
+ implicit none
+ include 'constants.f'
+ integer i,j
+ double precision p(mxpart,4)
+ dot=p(i,4)*p(j,4)-p(i,1)*p(j,1)-p(i,2)*p(j,2)-p(i,3)*p(j,3)
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/boost.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/boost.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/boost.f (revision 1338)
@@ -0,0 +1,22 @@
+ subroutine boost(mass,p1,p_in,p_out)
+c take momenta p_in in frame in which particle one is at rest with mass
+c "mass"
+c and convert to frame in which particle one has fourvector p1
+ implicit none
+ double precision mass,p1(4),p_in(4),p_out(4)
+ double precision gam,beta(1:3),bdotp,one
+ parameter(one=1d0)
+ integer j,k
+ gam=p1(4)/mass
+ bdotp=0d0
+ do j=1,3
+ beta(j)=-p1(j)/p1(4)
+ bdotp=bdotp+p_in(j)*beta(j)
+ enddo
+ p_out(4)=gam*(p_in(4)-bdotp)
+ do k=1,3
+ p_out(k)=p_in(k)+gam*beta(k)*(gam/(gam+one)*bdotp-p_in(4))
+ enddo
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/higgsw.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/higgsw.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/higgsw.f (revision 1338)
@@ -0,0 +1,18 @@
+ subroutine higgsw(br)
+ implicit none
+ include 'constants.f'
+ include 'ewcouple.f'
+ include 'masses.f'
+ double precision wff,mfsq,br
+c-----approximate form for the width of the standard model higgs
+c-----valid for low masses
+ wff(mfsq)=dsqrt(2d0)/8d0/pi*gf*hmass*mfsq
+ & *(1d0-4d0*mfsq/hmass**2)**1.5d0
+
+ hwidth=3d0*(wff(mbsq)+wff(mcsq))+wff(mtausq)
+ write(6,*) 'hmass,hwidth',hmass,hwidth
+ write(6,*) 'mtausq,mcsq,mbsq',mtausq,mcsq,mbsq
+ write(6,*)
+ br=3d0*wff(mbsq)/hwidth
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/prod4.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/prod4.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/prod4.f (revision 1338)
@@ -0,0 +1,109 @@
+ subroutine prod4(p,za,zb,s)
+c extended to deal with negative energies ie with all momenta outgoing
+c---all particle assumed massless
+ implicit none
+ double precision p(6,4),s(6,6)
+ double complex za(6,6),zb(6,6),c23(6),f(6),one,im
+ double precision rt(6)
+ integer i,j
+ parameter(one=(1d0,0d0),im=(0d0,1d0))
+
+ do j=1,6
+ za(j,j)=(0D0,0D0)
+ zb(j,j)=za(j,j)
+ s(j,j)=0d0
+ if (p(j,4) .gt. 0.d0) then
+ rt(j)=dsqrt(p(j,4)-p(j,1))
+ c23(j)=dcmplx(p(j,2),-p(j,3))
+ f(j)=one
+ else
+ rt(j)=dsqrt(-p(j,4)+p(j,1))
+ c23(j)=dcmplx(-p(j,2),p(j,3))
+ f(j)=im
+ endif
+ enddo
+ do i=2,6
+ do j=1,i-1
+ s(i,j)=2d0*(p(i,4)*p(j,4)-p(i,1)*p(j,1)
+ & -p(i,2)*p(j,2)-p(i,3)*p(j,3))
+ za(i,j)=f(i)*f(j)*(c23(i)*rt(j)/rt(i)-c23(j)*rt(i)/rt(j))
+ za(j,i)=-za(i,j)
+ zb(i,j)=s(i,j)/za(i,j)
+ zb(j,i)=-zb(i,j)
+ s(j,i)=s(i,j)
+ enddo
+ enddo
+
+ return
+ end
+
+ subroutine prod2(p,za,zb)
+c extended to deal with negative energies ie with all momenta outgoing
+ implicit none
+ double precision p(4,4),dot(4,4)
+ double complex za(4,4),zb(4,4),c23(4),f(4),one,im
+ double precision rt(4)
+ integer i,j
+ parameter(one=(1.d0,0.d0),im=(0.d0,1.d0))
+
+ do j=1,4
+ za(j,j)=(0.D0,0.D0)
+ zb(j,j)=za(j,j)
+ if (p(j,4) .gt. 0.d0) then
+ rt(j)=dsqrt(p(j,4)-p(j,1))
+ c23(j)=dcmplx(p(j,2),-p(j,3))
+ f(j)=one
+ else
+ rt(j)=dsqrt(-p(j,4)+p(j,1))
+ c23(j)=dcmplx(-p(j,2),p(j,3))
+ f(j)=im
+ endif
+ enddo
+ do i=2,4
+ do j=1,i-1
+ dot(i,j)=2d0*(p(i,4)*p(j,4)-p(i,1)*p(j,1)
+ & -p(i,2)*p(j,2)-p(i,3)*p(j,3))
+ za(i,j)=f(i)*f(j)*(c23(i)*rt(j)/rt(i)-c23(j)*rt(i)/rt(j))
+ za(j,i)=-za(i,j)
+ zb(i,j)=dot(i,j)/za(i,j)
+ zb(j,i)=-zb(i,j)
+ enddo
+ enddo
+ return
+ end
+
+
+ subroutine prod3(p,za,zb,dot)
+c extended to deal with negative energies ie with all momenta outgoing
+ implicit none
+ double precision p(5,4),dot(5,5)
+ double complex za(5,5),zb(5,5),c23(5),f(5),one,im
+ double precision rt(5)
+ integer i,j
+ parameter(one=(1.d0,0.d0),im=(0.d0,1.d0))
+ do j=1,5
+ za(j,j)=(0.D0,0.D0)
+ zb(j,j)=za(j,j)
+ if (p(j,4) .gt. 0.d0) then
+ rt(j)=dsqrt(p(j,4)-p(j,1))
+ c23(j)=dcmplx(p(j,2),-p(j,3))
+ f(j)=one
+ else
+ rt(j)=dsqrt(-p(j,4)+p(j,1))
+ c23(j)=dcmplx(-p(j,2),p(j,3))
+ f(j)=im
+ endif
+ enddo
+ do i=2,5
+ do j=1,i-1
+ dot(i,j)=2d0*(p(i,4)*p(j,4)-p(i,1)*p(j,1)
+ & -p(i,2)*p(j,2)-p(i,3)*p(j,3))
+ za(i,j)=f(i)*f(j)*(c23(i)*rt(j)/rt(i)-c23(j)*rt(i)/rt(j))
+ za(j,i)=-za(i,j)
+ zb(i,j)=dot(i,j)/za(i,j)
+ zb(j,i)=-zb(i,j)
+ enddo
+ enddo
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/newton1.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/newton1.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/newton1.f (revision 1338)
@@ -0,0 +1,54 @@
+ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF)
+C Author: R.K. Ellis
+
+c--- calculate a_out using nloop beta-function evolution
+c--- with nf flavours, given starting value as-in
+c--- given as_in and logarithmic separation between
+c--- input scale and output scale t.
+c--- Evolution is performed using Newton's method,
+c--- with a precision given by tol.
+
+ IMPLICIT NONE
+ INTEGER NLOOP,NF
+ REAL*8 T,A_IN,A_OUT,AS,TOL,F2,F3,F,FP,DELTA
+ REAL*8 B0(3:5),C1(3:5),C2(3:5),DEL(3:5)
+ PARAMETER(TOL=5D-4)
+C--- B0=(11.-2.*NF/3.)/4./PI
+ DATA B0/0.716197243913527D0,0.66314559621623D0,0.61009394851893D0/
+C--- C1=(102.D0-38.D0/3.D0*NF)/4.D0/PI/(11.D0-2.D0/3.D0*NF)
+ DATA C1/.565884242104515D0,0.49019722472304D0,0.40134724779695D0/
+C--- C2=(2857.D0/2.D0-5033*NF/18.D0+325*NF**2/54)
+C--- /16.D0/PI**2/(11.D0-2.D0/3.D0*NF)
+ DATA C2/0.453013579178645D0,0.30879037953664D0,0.14942733137107D0/
+C--- DEL=SQRT(4*C2-C1**2)
+ DATA DEL/1.22140465909230D0,0.99743079911360D0,0.66077962451190D0/
+ DATA F,FP/0d0,1d0/
+ F2(AS)=1D0/AS+C1(NF)*LOG((C1(NF)*AS)/(1D0+C1(NF)*AS))
+ F3(AS)=1D0/AS+0.5D0*C1(NF)
+ & *LOG((C2(NF)*AS**2)/(1D0+C1(NF)*AS+C2(NF)*AS**2))
+ & -(C1(NF)**2-2D0*C2(NF))/DEL(NF)
+ & *ATAN((2D0*C2(NF)*AS+C1(NF))/DEL(NF))
+
+
+ A_OUT=A_IN/(1D0+A_IN*B0(NF)*T)
+ IF (NLOOP .EQ. 1) RETURN
+ A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T))
+ IF (A_OUT .LT. 0D0) AS=0.3D0
+ 30 AS=A_OUT
+
+ IF (NLOOP .EQ. 2) THEN
+ F=B0(NF)*T+F2(A_IN)-F2(AS)
+ FP=1D0/(AS**2*(1D0+C1(NF)*AS))
+ ELSEIF (NLOOP .EQ. 3) THEN
+ F=B0(NF)*T+F3(A_IN)-F3(AS)
+ FP=1D0/(AS**2*(1D0+C1(NF)*AS+C2(NF)*AS**2))
+ ELSE
+ WRITE(6,*) 'Unimplemented value of NLOOP in newton1'
+ stop
+ ENDIF
+ A_OUT=AS-F/FP
+ DELTA=ABS(F/FP/AS)
+ IF (DELTA .GT. TOL) GO TO 30
+ RETURN
+ END
+
Index: dynnlo-v1.5-applgrid/src/Need/lowintHst.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/lowintHst.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/lowintHst.f (revision 1338)
@@ -0,0 +1,1310 @@
+C Version that allows to separate the channels
+C Scale dependence included
+
+ double precision function lowintHst(r,wgt)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'limits.f'
+ include 'npart.f'
+ include 'vegas_common.f'
+ include 'sprods_com.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'noglue.f'
+ include 'process.f'
+ include 'efficiency.f'
+ include 'phasemin.f'
+c P.S. to use grids
+ include 'ptilde.f'
+ include 'APPLinclude.f'
+c double precision xCheck
+c P.S. end
+C
+ include 'qcdcouple.f'
+ include 'rescoeff.f'
+ include 'dynamicscale.f'
+
+c --- To use VEGAS random number sequence :
+ double precision ran2
+ integer ih1,ih2,j,k,l,nvec,flgq
+ double precision r(mxdim),W,sqrts,xmsq,val,
+ . fx10(-nf:nf),fx20(-nf:nf),p(mxpart,4),pjet(mxpart,4),
+ . pswt,rscalestart,fscalestart
+ double precision wgt,msqc(-nf:nf,-nf:nf)
+ double precision xx(2),flux,BrnRat
+ logical bin,first,includedipole
+CC
+ logical cuts
+ double precision x1p,x2p,fx1p(-nf:nf),fx2p(-nf:nf)
+ double precision asopi,z1,z2,alfa,beta,cut,diff
+ double precision tdelta,tH1st,tH1stF,xx10,xx20,tH2st
+ double precision tgaga,tcga,tgamma2
+ double precision diff10,diff20,diffc10,diffc20,diffg10,diffg20
+ double precision diff1f,diff2f,diffg1f,diffg2f,diffc1f,diffc2f
+ double precision Pggreg,D0int,D1int,Cgq,Pgq,LF,LR
+ double precision dot,q2,Ggq,Ggg,spgq1,spgq2,tH2sp
+ double precision Pqqint,Cqq,Cqg,Pqq,Pqg
+ double precision C2qqreg,C2qqp,C2qqb,C2qg
+C
+ double precision diff1,diff2
+ double precision Pqqqq,Pqqqg,Pqggq,Pqggg
+ double precision CqqPqq,CqqPqg,CqgPgq,CqgPgg
+ double precision P2qg,P2qqV,P2qqbV,P2qqS
+C
+ double precision beta1,H2qqdelta,H2qqD0
+ common/Hstcoeff/beta1,H2qqdelta,H2qqD0
+C P.S. special arrays for scale dependence
+ double precision weightvF ( -nf:nf, -nf:nf)
+ double precision weightv1F( -nf:nf, -nf:nf)
+ double precision weightv2F( -nf:nf, -nf:nf)
+C P.S. end
+ integer order,a,b
+ common/nnlo/order
+CC
+ integer jets,ndec,nproc
+ common/parts_int/jets
+ common/nproc/nproc
+CC
+ common/density/ih1,ih2
+ common/energy/sqrts
+ common/bin/bin
+ common/x1x2/xx
+ common/BrnRat/BrnRat
+
+
+ data p/48*0d0/
+ data first/.true./
+ save first,rscalestart,fscalestart
+
+ if (first) then
+ first=.false.
+ rscalestart=scale
+ fscalestart=facscale
+ endif
+
+ ntotshot=ntotshot+1
+ lowintHst=0d0
+
+C The number of jets is zero for this peice
+
+ jets=0
+
+C
+
+ W=sqrts**2
+
+
+
+ npart=2
+ call gen2(r,p,pswt,*999)
+
+
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+ nvec=npart+2
+ call dotem(nvec,p,s)
+
+ call masscuts(s,*999)
+
+
+
+c--- see whether this point will pass cuts - if it will not, do not
+c--- bother calculating the matrix elements for it, instead bail out
+
+ if(cuts(p,0) .eqv. .true.) then
+ goto 999
+ endif
+
+
+ xx(1)=-2d0*p(1,4)/sqrts
+ xx(2)=-2d0*p(2,4)/sqrts
+
+
+c--- Calculate the required matrix element
+
+
+ if(nproc.eq.3) then
+ call qqb_z(p,msqc)
+ else
+ call qqb_w(p,msqc)
+ endif
+
+
+ flux=fbGeV2/(2d0*xx(1)*xx(2)*W)
+
+c--- initialize a PDF set here, if calculating errors
+ 777 continue
+ xmsq=0d0
+
+
+
+
+
+C Compute Q2
+
+ q2=2*dot(p,3,4)
+
+
+C Dynamic scale
+
+ if(dynamicscale) call scaleset(q2)
+
+ asopi=ason2pi*2
+
+ LF=dlog(q2/facscale**2)
+ LR=dlog(q2/scale**2)
+
+
+C Scaled momentum fractions
+
+ cut=1d-8
+
+C ndim here is 6 as for H->2gamma
+
+
+ beta=cut+(1-cut)*r(ndim-1)
+ alfa=cut+(1-cut)*r(ndim)
+
+
+ xx10=xx(1)
+ xx20=xx(2)
+
+ z1=xx10**beta
+ z2=xx20**alfa
+
+
+
+c--- calculate PDF's
+
+ call fdist(ih1,xx10,facscale,fx10)
+ call fdist(ih2,xx20,facscale,fx20)
+
+ call fdist(ih1,xx10**(1-beta),facscale,fx1p)
+ call fdist(ih2,xx20**(1-alfa),facscale,fx2p)
+
+ if(noglue) then
+ fx10(0)=0d0
+ fx20(0)=0d0
+ fx1p(0)=0d0
+ fx2p(0)=0d0
+ endif
+
+ if(ggonly) then
+ do j=1,nf
+ fx10(j)=0d0
+ fx10(-j)=0d0
+ fx20(j)=0d0
+ fx20(-j)=0d0
+ fx1p(j)=0d0
+ fx1p(-j)=0d0
+ fx2p(j)=0d0
+ fx2p(-j)=0d0
+ enddo
+ endif
+
+CC TIENI SOLO uubar
+c do j=-nf,1
+c fx10(j)=0d0
+c fx1p(j)=0d0
+c enddo
+c do j=3,nf
+c fx10(j)=0d0
+c fx1p(j)=0d0
+c enddo
+c do j=-nf,-3
+c fx20(j)=0d0
+c fx2p(j)=0d0
+c enddo
+c do j=-1,nf
+c fx20(j)=0d0
+c fx2p(j)=0d0
+c enddo
+CC
+
+
+ flgq=1
+ if(gqonly)flgq=0
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CC Start calculation
+c --- P.S. initialize array
+ if (creategrid.and.bin) then
+ do j=-nf,nf
+ do k=-nf,nf
+ weightb(j,k) = 0d0
+
+ weightv (j,k)=0d0
+ weightv1(j,k)=0d0
+ weightv2(j,k)=0d0
+
+ weightvF (j,k)=0d0
+ weightv1F(j,k)=0d0
+ weightv2F(j,k)=0d0
+
+ weightvv (j,k)=0d0
+ weightvv1(j,k)=0d0
+ weightvv2(j,k)=0d0
+ weightvv12(j,k)=0d0
+ enddo
+ enddo
+ weightfactor = 1d0
+ contrib = -100
+ endif
+c P.S end init..
+
+ tdelta=0d0
+ tH1st=0d0
+ tH1stF=0d0
+ tH2st=0d0
+ tcga=0d0
+ tgamma2=0d0
+ tgaga=0d0
+
+
+
+ do j=-nf,nf
+ do k=-nf,nf
+
+ if(msqc(j,k).eq.0d0) goto 75
+
+
+C Simplest term without convolutions
+
+ tdelta=tdelta+fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightb(j,k) = weightb(j,k) + msqc(j,k)*flgq
+ endif
+c---- P.S. end
+
+ if(order.eq.0) goto 75
+
+C Start H1st: to be used later
+
+C H1st delta term
+
+ tH1st=tH1st+2*C1qqdelta*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv(j,k) = weightv(j,k) +
+ * 2*C1qqdelta*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+C H1st: non delta terms, first leg
+
+
+ tH1st=tH1st+(fx1p(j)*Cqq(z1)*flgq+fx1p(0)*Cqg(z1))
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv1(j,k) = weightv1(j,k) +
+ * Cqq(z1)*flgq * (-dlog(xx10))*msqc(j,k)
+ weightv1(0,k) = weightv1(0,k) +
+ * Cqg(z1) * (-dlog(xx10))*msqc(j,k)
+ endif
+c---- P.S. end
+C H1st: non delta terms, second leg
+
+
+ tH1st=tH1st+(fx2p(k)*Cqq(z2)*flgq+fx2p(0)*Cqg(z2))
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv2(j,k) = weightv2(j,k) +
+ * Cqq(z2)*flgq*(-dlog(xx20))*msqc(j,k)
+ weightv2(j,0) = weightv2(j,0) +
+ * Cqg(z2) *(-dlog(xx20))*msqc(j,k)
+ endif
+c---- P.S. end
+
+C H1st: muf dependence (LF factor to be added at the end)
+
+
+c gammaqq and gammaqg: first leg
+
+
+ diff=-dlog(xx10)
+ & *((fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)*flgq+fx1p(0)*Pqg(z1))
+ tH1stF=tH1stF+diff*fx20(k)*msqc(j,k)
+ tH1stF=tH1stF-Pqqint(xx10)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv1F(j,k) = weightv1F(j,k) +
+ * (-dlog(xx10))*Pqq(z1)*flgq *msqc(j,k)
+ weightv1F(0,k) = weightv1F(0,k) +
+ * (-dlog(xx10))*Pqg(z1) *msqc(j,k)
+ weightvF(j,k) = weightvF(j,k) +
+ * (dlog(xx10))*xx10**beta*Pqq(z1)*msqc(j,k)*flgq +
+ * (-Pqqint(xx10))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+c gammaqq and gammaqg: second leg
+
+
+ diff=-dlog(xx20)
+ & *((fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)*flgq+fx2p(0)*Pqg(z2))
+ tH1stF=tH1stF+diff*fx10(j)*msqc(j,k)
+ tH1stF=tH1stF-Pqqint(xx20)*fx10(j)*fx20(k)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightv2F(j,k) = weightv2F(j,k) +
+ * (-dlog(xx20))*Pqq(z2)*flgq*msqc(j,k)
+ weightv2F(j,0) = weightv2F(j,0) +
+ * (-dlog(xx20))*Pqg(z2)*msqc(j,k)
+ weightvF(j,k) = weightvF(j,k) +
+ * (dlog(xx20))*xx20**alfa*Pqq(z2)*msqc(j,k)*flgq +
+ * (-Pqqint(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+
+ if(order.eq.1) goto 75
+
+CC End of H1st
+
+CC Start H2 contribution
+
+CC H2st gg contribution
+ goto 75
+
+ tH2st=tH2st+fx1p(0)*Cqg(z1)*(-dlog(xx10))*
+ & fx2p(0)*Cqg(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv12(0,0) = weightvv12(0,0) +
+ * Cqg(z1)*(-dlog(xx10))*
+ * Cqg(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+ goto 75
+CC H2st qqbar contribution from C1*C1 (without delta term)
+
+C regular*regular
+
+ tH2st=tH2st+fx1p(j)*Cqq(z1)*(-dlog(xx10))*
+ & fx2p(k)*Cqq(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv12(j,k) = weightvv12(j,k) +
+ * Cqq(z1)*(-dlog(xx10))*
+ * Cqq(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+C regular-delta
+
+ tH2st=tH2st+fx1p(j)*Cqq(z1)*(-dlog(xx10))*
+ & fx20(k)*C1qqdelta*msqc(j,k)*flgq
+
+ tH2st=tH2st+fx2p(k)*Cqq(z2)*(-dlog(xx20))*
+ & fx10(j)*C1qqdelta*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(j,k) = weightvv1(j,k) +
+ * Cqq(z1)*(-dlog(xx10))*C1qqdelta*msqc(j,k)*flgq
+ weightvv2(j,k) = weightvv2(j,k) +
+ * Cqq(z2)*(-dlog(xx20))*C1qqdelta*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+CC H2st qg contribution from C1*C1
+
+C regular*regular
+
+ tH2st=tH2st+fx1p(0)*Cqg(z1)*(-dlog(xx10))*
+ & fx2p(k)*Cqq(z2)*(-dlog(xx20))*msqc(j,k)
+
+ tH2st=tH2st+fx1p(j)*Cqq(z1)*(-dlog(xx10))*
+ & fx2p(0)*Cqg(z2)*(-dlog(xx20))*msqc(j,k)
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv12(0,k) = weightvv12(0,k) +
+ * Cqg(z1)*(-dlog(xx10))*Cqq(z2)*(-dlog(xx20))*msqc(j,k)
+ weightvv12(j,0) = weightvv12(j,0) +
+ * Cqq(z1)*(-dlog(xx10))*Cqg(z2)*(-dlog(xx20))*msqc(j,k)
+ endif
+c---- P.S. end
+
+C regular-delta
+
+ tH2st=tH2st+fx1p(0)*Cqg(z1)*(-dlog(xx10))*
+ & fx20(k)*C1qqdelta*msqc(j,k)
+
+ tH2st=tH2st+fx2p(0)*Cqg(z2)*(-dlog(xx20))*
+ & fx10(j)*C1qqdelta*msqc(j,k)
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(0,k) = weightvv1(0,k) +
+ * Cqg(z1)*(-dlog(xx10))*C1qqdelta*msqc(j,k)
+ weightvv2(j,0) = weightvv2(j,0) +
+ * Cqg(z2)*(-dlog(xx20))*C1qqdelta*msqc(j,k)
+ endif
+c---- P.S. end
+CC H2st qqbar channel: D0(z), first leg
+
+ diff=-dlog(xx10)*(fx1p(j)-fx10(j)*xx10**beta)*H2qqD0/(1-z1)
+
+ tH2st=tH2st+0.5d0*diff*fx20(k)*msqc(j,k)*flgq
+ tH2st=tH2st-0.5d0*H2qqD0*D0int(xx10)
+ & *fx10(j)*fx20(k)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(j,k) = weightvv1(j,k) +
+ * (-dlog(xx10))* H2qqD0/(1-z1)*0.5d0*msqc(j,k)*flgq
+ weightvv(j,k) = weightvv(j,k) +
+ * (dlog(xx10)*xx10**beta*H2qqD0/(1-z1)
+ * -H2qqD0*D0int(xx10))*0.5*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+CC H2st, qqbar channel: D0(z), second leg
+
+ diff=-dlog(xx20)*(fx2p(k)-fx20(k)*xx20**alfa)*H2qqD0/(1-z2)
+
+ tH2st=tH2st+0.5d0*diff*fx10(j)*msqc(j,k)*flgq
+ tH2st=tH2st-0.5d0*H2qqD0*D0int(xx20)
+ & *fx10(j)*fx20(k)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv2(j,k) = weightvv2(j,k) +
+ * (-dlog(xx20))*H2qqD0/(1-z2)*0.5d0*msqc(j,k)*flgq
+ weightvv(j,k) = weightvv(j,k) +
+ * (dlog(xx20)*xx20**alfa*H2qqD0/(1-z2)
+ * -H2qqD0*D0int(xx20))*0.5d0*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+CC C2qq, regular part, first leg
+
+ tH2st=tH2st+fx1p(j)*C2qqreg(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+
+CC C2qq, regular part, second leg
+
+ tH2st=tH2st+fx2p(k)*C2qqreg(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(j,k) = weightvv1(j,k) +
+ * C2qqreg(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv2(j,k) = weightvv2(j,k) +
+ * C2qqreg(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+CC C2qg, first leg
+
+ tH2st=tH2st+fx1p(0)*C2qg(z1)*(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+CC C2qg, second leg
+
+ tH2st=tH2st+fx2p(0)*C2qg(z2)*(-dlog(xx20))*fx10(j)*msqc(j,k)
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(0,k) = weightvv1(0,k) +
+ * C2qg(z1)*(-dlog(xx10))*msqc(j,k)
+ weightvv2(j,0) = weightvv2(j,0) +
+ * C2qg(z2)*(-dlog(xx20))*msqc(j,k)
+ endif
+c---- P.S. end
+CC Cqqbar contribution: first leg
+
+ tH2st=tH2st+fx1p(-j)*C2qqb(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+
+CC Cqqbar contribution: second leg
+
+ tH2st=tH2st+fx2p(-k)*C2qqb(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(-j,k) = weightvv1(-j,k) +
+ * C2qqb(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv2(j,-k) = weightvv2(j,-k) +
+ * C2qqb(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+ do a=1,nf
+
+CC Cqqp contribution: first leg
+
+ if(a.ne.abs(j)) then
+ tH2st=tH2st+(fx1p(a)+fx1p(-a))*
+ & C2qqp(z1)*(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(a,k) = weightvv1(a,k) +
+ * C2qqp(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ weightvv1(-a,k) = weightvv1(-a,k) +
+ * C2qqp(z1)*(-dlog(xx10))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+ endif
+
+CC Cqqp contribution: second leg
+
+ if(a.ne.abs(k)) then
+ tH2st=tH2st+(fx2p(a)+fx2p(-a))*
+ & C2qqp(z2)*(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv2(j,a) = weightvv2(j,a) +
+ * C2qqp(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ weightvv2(j,-a) = weightvv2(j,-a) +
+ * C2qqp(z2)*(-dlog(xx20))*msqc(j,k)*flgq
+ endif
+c---- P.S. end
+ endif
+
+ enddo
+
+CCCC Terms needed for NNLO scale dependence CCCCCC
+
+
+CC (gamma+gamma)*(gamma+gamma) term
+
+C First part: one gamma for each leg
+
+
+ diffg1f=-dlog(xx10)*(fx1p(j)-fx10(j)*xx10**beta)*Pqq(z1)
+ & - Pqqint(xx10)*fx10(j)
+
+
+ diffg10=-dlog(xx10)*fx1p(0)*Pqg(z1)
+
+ diffg2f=-dlog(xx20)*(fx2p(k)-fx20(k)*xx20**alfa)*Pqq(z2)
+ & - Pqqint(xx20)*fx20(k)
+
+
+ diffg20=-dlog(xx20)*fx2p(0)*Pqg(z2)
+
+
+ tgaga=tgaga+2*
+ # (flgq*diffg10*diffg20+flgq*diffg1f*diffg2f
+ # +diffg10*diffg2f+diffg1f*diffg20)*msqc(j,k)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+
+ weightvv12(0,0) = weightvv12(0,0) + !g10 g20
+ * dlog(xx10)*Pqg(z1)*dlog(xx20)*Pqg(z2)*
+ * 2d0*msqc(j,k)*0.5d0*LF**2*flgq
+ weightvv12(j,k) = weightvv12(j,k) + ! g1f g2f
+ * dlog(xx10)*Pqq(z1)*dlog(xx20)*Pqq(z2)*
+ * 2d0*msqc(j,k)*0.5d0*LF**2*flgq
+ weightvv(j,k) = weightvv(j,k) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)- Pqqint(xx10))*
+ * (dlog(xx20)*xx20**alfa*Pqq(z2)- Pqqint(xx20))*
+ * 2d0*msqc(j,k)*0.5d0*LF**2*flgq
+ weightvv1(j,k) = weightvv1(j,k) +
+ * (-dlog(xx10))*Pqq(z1)*
+ * (dlog(xx20)*xx20**alfa*Pqq(z2)- Pqqint(xx20))*
+ * 2d0*msqc(j,k)*0.5d0*LF**2*flgq
+ weightvv2(j,k) = weightvv2(j,k) +
+ * (-dlog(xx20))*Pqq(z2)*
+ * (dlog(xx10)*xx10**beta*Pqq(z1)- Pqqint(xx10))*
+ * 2d0*msqc(j,k)*0.5d0*LF**2*flgq
+
+ weightvv12(0,k) = weightvv12(0,k) + !g10 g2f
+ * dlog(xx10)*Pqg(z1)*dlog(xx20)*Pqq(z2)*
+ * 2d0*msqc(j,k)*0.5d0*LF**2
+ weightvv1(0,k) = weightvv1(0,k) +
+ * (-dlog(xx10))*Pqg(z1)*(dlog(xx20)*xx20**alfa*Pqq(z2)
+ * -Pqqint(xx20))*2d0*msqc(j,k)*0.5d0*LF**2
+
+ weightvv12(j,0) = weightvv12(j,0) + !g1f g20
+ * dlog(xx20)*Pqg(z2)*dlog(xx10)*Pqq(z1)*
+ * 2d0*msqc(j,k)*0.5d0*LF**2
+ weightvv2(j,0) = weightvv2(j,0) +
+ * (-dlog(xx20))*Pqg(z2)*(dlog(xx10)*xx10**beta*Pqq(z1)
+ * -Pqqint(xx10))*2d0*msqc(j,k)*0.5d0*LF**2
+
+ endif
+c---- P.S. end
+
+CC Second part: gamma*gamma terms
+
+c Pij * Pjk = D1ijjk (log(1-z)/(1-z))_+ + D0ijjk/(1-z)_+
+c + Pijjk(z) + Deltaijjk delta(1-z)
+
+C First leg
+
+
+ diff1=-dlog(xx10)*(flgq*(fx1p(j)-fx10(j)*xx10**beta)
+ & *(D0qqqq/(1-z1)+D1qqqq*dlog(1-z1)/(1-z1))
+ & +fx1p(j)*Pqqqq(z1)*flgq+fx1p(0)*(Pqqqg(z1)+Pqggg(z1)))
+ & +(Deltaqqqq-D0qqqq*D0int(xx10)-D1qqqq*D1int(xx10))
+ & *fx10(j)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(0,k) = weightvv1(0,k) +
+ * (-dlog(xx10))*(Pqqqg(z1)+Pqggg(z1))*
+ * msqc(j,k)*0.5d0*LF**2
+ weightvv1(j,k) = weightvv1(j,k) +
+ * (-dlog(xx10))*
+ * (flgq*(D0qqqq/(1-z1)+D1qqqq*dlog(1-z1)/(1-z1))+
+ * Pqqqq(z1)*flgq)*
+ * msqc(j,k)*0.5d0*LF**2
+ weightvv(j,k) = weightvv(j,k) +
+ * ( (Deltaqqqq-D0qqqq*D0int(xx10)-D1qqqq*D1int(xx10)) +
+ * dlog(xx10)*xx10**beta*
+ * (D0qqqq/(1-z1)+D1qqqq*dlog(1-z1)/(1-z1)))*
+ * flgq*msqc(j,k)*0.5d0*LF**2
+ endif
+c---- P.S. end
+
+C Second leg
+
+
+ diff2=-dlog(xx20)*(flgq*(fx2p(k)-fx20(k)*xx20**alfa)
+ & *(D0qqqq/(1-z2)+D1qqqq*dlog(1-z2)/(1-z2))
+ & +fx2p(k)*Pqqqq(z2)*flgq+fx2p(0)*(Pqqqg(z2)+Pqggg(z2)))
+ & +(Deltaqqqq-D0qqqq*D0int(xx20)-D1qqqq*D1int(xx20))
+ & *fx20(k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv2(j,0) = weightvv2(j,0) +
+ * (-dlog(xx20)) *(Pqqqg(z2)+Pqggg(z2))*
+ * msqc(j,k)*0.5d0*LF**2
+ weightvv2(j,k) = weightvv2(j,k) +
+ * (-dlog(xx20))*
+ * (flgq*(D0qqqq/(1-z2)+D1qqqq*dlog(1-z2)/(1-z2))+
+ * Pqqqq(z2)*flgq)*
+ * msqc(j,k)*0.5d0*LF**2
+ weightvv(j,k) = weightvv(j,k) +
+ * (Deltaqqqq-D0qqqq*D0int(xx20)-D1qqqq*D1int(xx20)+
+ * dlog(xx20)*xx20**alfa*
+ * (D0qqqq/(1-z2)+D1qqqq*dlog(1-z2)/(1-z2)))*
+ * flgq*msqc(j,k)*0.5d0*LF**2
+ endif
+c---- P.S. end
+
+C Include Pqggq
+
+ do l=1,nf
+ diff1=diff1-dlog(xx10)*(fx1p(l)+fx1p(-l))*Pqggq(z1)*flgq
+ diff2=diff2-dlog(xx20)*(fx2p(l)+fx2p(-l))*Pqggq(z2)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(l,k) = weightvv1(l,k) +
+ * (-dlog(xx10))*Pqggq(z1)*flgq*msqc(j,k)*0.5d0*LF**2
+ weightvv1(-l,k) = weightvv1(-l,k) +
+ * (-dlog(xx10))*Pqggq(z1)*flgq*msqc(j,k)*0.5d0*LF**2
+ weightvv2(j,l) = weightvv2(j,l) +
+ * (-dlog(xx20))*Pqggq(z2)*flgq*msqc(j,k)*0.5d0*LF**2
+ weightvv2(j,-l) = weightvv2(j,-l) +
+ * (-dlog(xx20))*Pqggq(z2)*flgq*msqc(j,k)*0.5d0*LF**2
+ endif
+c---- P.S. end
+ enddo
+
+ tgaga=tgaga+diff1*fx20(k)*msqc(j,k)
+ tgaga=tgaga+diff2*fx10(j)*msqc(j,k)
+
+
+
+C End of (gamma+gamma)*(gamma+gamma) term
+
+C Start (C+C)*(gamma+gamma) term
+
+c gamma first leg, C second leg
+
+
+ diffc2f=-dlog(xx20)*fx2p(k)*Cqq(z2)+C1qqdelta*fx20(k)
+
+ diffc20=-dlog(xx20)*fx2p(0)*Cqg(z2)
+
+
+ tcga=tcga+msqc(j,k)*
+ # (flgq*diffg10*diffc20+flgq*diffg1f*diffc2f
+ # +diffg10*diffc2f+diffg1f*diffc20)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv12(j,k) = weightvv12(j,k) + ! diffg1f diffc2f
+ * dlog(xx10)*Pqq(z1)*dlog(xx20)*Cqq(z2)*
+ * flgq*msqc(j,k)*LF
+ weightvv(j,k) = weightvv(j,k) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))*C1qqdelta*
+ * flgq*msqc(j,k)*LF
+ weightvv1(j,k) = weightvv1(j,k) +
+ * (-dlog(xx10))*Pqq(z1)*C1qqdelta*
+ * flgq*msqc(j,k)*LF
+ weightvv2(j,k) = weightvv2(j,k) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))*
+ * (-dlog(xx20))*Cqq(z2)*
+ * flgq*msqc(j,k)*LF
+
+ weightvv12(0,0) = weightvv12(0,0) + !diffg10 diffc20
+ * flgq*dlog(xx10)*Pqg(z1)*dlog(xx20)*Cqg(z2)*
+ * msqc(j,k)*LF
+
+ weightvv12(j,0) = weightvv12(j,0) + !diffg1f diffc20
+ * dlog(xx10)*Pqq(z1)*dlog(xx20)*Cqg(z2)*
+ * msqc(j,k)*LF
+ weightvv2(j,0) = weightvv2(j,0) +
+ * (dlog(xx10)*xx10**beta*Pqq(z1)-Pqqint(xx10))*
+ * (-dlog(xx20))*Cqg(z2)*
+ * msqc(j,k)*LF
+
+ weightvv12(0,k) = weightvv12(0,k) + !diffg10 diffc2f
+ * dlog(xx10)*Pqg(z1)*dlog(xx20)*Cqq(z2)*
+ * msqc(j,k)*LF
+ weightvv1(0,k) = weightvv1(0,k) +
+ * (-dlog(xx10))*Pqg(z1)*C1qqdelta*
+ * msqc(j,k)*LF
+ endif
+c---- P.S. end
+
+c C first leg, gamma second leg
+
+ diffc1f=-dlog(xx10)*fx1p(j)*Cqq(z1)+C1qqdelta*fx10(j)
+
+ diffc10=-dlog(xx10)*fx1p(0)*Cqg(z1)
+
+ tcga=tcga+msqc(j,k)*
+ # (flgq*diffc10*diffg20+flgq*diffc1f*diffg2f
+ # +diffc10*diffg2f+diffc1f*diffg20)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv12(j,k) = weightvv12(j,k) + !diffc1f diffg2f
+ * dlog(xx20)*Pqq(z2)*dlog(xx10)*Cqq(z1)*
+ * flgq*msqc(j,k)*LF
+ weightvv(j,k) = weightvv(j,k) +
+ * (dlog(xx20)*xx20**alfa*Pqq(z2)-Pqqint(xx20))*
+ * flgq*C1qqdelta*msqc(j,k)*LF
+ weightvv2(j,k) = weightvv2(j,k) +
+ * flgq*(-dlog(xx20))*Pqq(z2)*C1qqdelta*msqc(j,k)*LF
+ weightvv1(j,k) = weightvv1(j,k) +
+ * (dlog(xx20)*xx20**alfa*Pqq(z2)-Pqqint(xx20))*
+ * flgq*(-dlog(xx10))*Cqq(z1)*msqc(j,k)*LF
+
+ weightvv12(0,0) = weightvv12(0,0) + !diffg20 diffc10
+ * dlog(xx20)*Pqg(z2)*dlog(xx10)*Cqg(z1)*
+ * flgq*msqc(j,k)*LF
+
+ weightvv12(j,0) = weightvv12(j,0) + ! diff1cf diffg20
+ * dlog(xx10)*Cqq(z1)*dlog(xx20)*Pqg(z2)*
+ * msqc(j,k)*LF
+ weightvv2(j,0) = weightvv2(j,0) +
+ * (-dlog(xx20))*Pqg(z2)*C1qqdelta*
+ * msqc(j,k)*LF
+
+ weightvv12(0,k) = weightvv12(0,k) + ! diffg2f diffc10
+ * dlog(xx10)*Cqg(z1)*dlog(xx20)*Pqq(z2)*
+ * msqc(j,k)*LF
+ weightvv1(0,k) = weightvv1(0,k) +
+ * (-dlog(xx10))*Cqg(z1)*(dlog(xx20)*xx20**alfa*Pqq(z2)
+ * - Pqqint(xx20))*
+ * msqc(j,k)*LF
+ endif
+c---- P.S. end
+
+c C*gamma: first leg (ignore delta term in Cqq: taken into account with tH1stF)
+
+ tcga=tcga
+ & +(fx1p(j)*CqqPqq(z1)*flgq+fx1p(0)*(CqqPqg(z1)+CqgPgg(z1)))
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+
+c C*gamma: second leg (ignore delta term in Cqq: taken into account with tH1stF)
+
+ tcga=tcga
+ & +(fx2p(k)*CqqPqq(z2)*flgq+fx2p(0)*(CqqPqg(z2)+CqgPgg(z2)))
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(j,k) = weightvv1(j,k) +
+ * CqqPqq(z1)*flgq*(-dlog(xx10))*msqc(j,k)*LF
+ weightvv1(0,k) = weightvv1(0,k) +
+ * (CqqPqg(z1)+CqgPgg(z1))*(-dlog(xx10))*msqc(j,k)*LF
+ weightvv2(j,k) = weightvv2(j,k) +
+ * CqqPqq(z2)*flgq*(-dlog(xx20))*msqc(j,k)*LF
+ weightvv2(j,0) = weightvv2(j,0) +
+ * (CqqPqg(z2)+CqgPgg(z2))*(-dlog(xx20))*msqc(j,k)*LF
+ endif
+c---- P.S. end
+
+c Add Cqg*Pgq contribution
+
+ do l=1,nf
+ tcga=tcga+(fx1p(l)+fx1p(-l))*CqgPgq(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tcga=tcga+(fx2p(l)+fx2p(-l))*CqgPgq(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(l,k) = weightvv1(l,k) +
+ * CqgPgq(z1)*(-dlog(xx10))*msqc(j,k)*flgq*LF
+ weightvv1(-l,k) = weightvv1(-l,k) +
+ * CqgPgq(z1)*(-dlog(xx10))*msqc(j,k)*flgq*LF
+ weightvv2(j,l) = weightvv2(j,l) +
+ * CqgPgq(z2)*(-dlog(xx20))*msqc(j,k)*flgq*LF
+ weightvv2(j,-l) = weightvv2(j,-l) +
+ * CqgPgq(z2)*(-dlog(xx20))*msqc(j,k)*flgq*LF
+ endif
+c---- P.S. end
+ enddo
+
+CC Start 2-loop AP
+
+C Gluon + pure singlet
+
+
+ do l=-nf,nf
+ if(l.eq.0) then
+ tgamma2=tgamma2+fx1p(0)*P2qg(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)
+ tgamma2=tgamma2+fx2p(0)*P2qg(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(0,k) = weightvv1(0,k) +
+ * P2qg(z1)*(-dlog(xx10))*msqc(j,k)*LF
+ weightvv2(j,0) = weightvv2(j,0) +
+ * P2qg(z2)*(-dlog(xx20))*msqc(j,k)*LF
+ endif
+c---- P.S. end
+ else
+ tgamma2=tgamma2+fx1p(l)*P2qqS(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tgamma2=tgamma2+fx2p(l)*P2qqS(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(l,k) = weightvv1(l,k) +
+ * P2qqS(z1)*(-dlog(xx10))*msqc(j,k)*flgq*LF
+ weightvv2(j,l) = weightvv2(j,l) +
+ * P2qqS(z2)*(-dlog(xx20))*msqc(j,k)*flgq*LF
+ endif
+c---- P.S. end
+ endif
+ enddo
+
+
+C P2qq non-singlet: regular part
+
+ tgamma2=tgamma2+fx1p(j)*P2qqV(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+ tgamma2=tgamma2+fx2p(k)*P2qqV(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(j,k) = weightvv1(j,k) +
+ * P2qqV(z1)*(-dlog(xx10))*msqc(j,k)*flgq*LF
+ weightvv2(j,k) = weightvv2(j,k) +
+ * P2qqV(z2)*(-dlog(xx20))*msqc(j,k)*flgq*LF
+ endif
+c---- P.S. end
+
+C P2qq non-singlet: 1/(1-z)_+
+
+
+ diff=-dlog(xx10)
+ & *(fx1p(j)-fx10(j)*xx10**beta)/(1-z1)
+ & - D0int(xx10)*fx10(j)
+
+ tgamma2=tgamma2+2d0/3*Kappa*diff*fx20(k)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(j,k) = weightvv1(j,k) +
+ * (-dlog(xx10))/(1-z1)*
+ * 2d0/3*Kappa*msqc(j,k)*flgq*LF
+ weightvv(j,k) = weightvv(j,k) +
+ * (dlog(xx10)*xx10**beta/(1-z1) - D0int(xx10))*
+ * 2d0/3*Kappa*msqc(j,k)*flgq*LF
+ endif
+c---- P.S. end
+
+ diff=-dlog(xx20)
+ & *(fx2p(k)-fx20(k)*xx20**alfa)/(1-z2)
+ & - D0int(xx20)*fx20(k)
+
+ tgamma2=tgamma2+2d0/3*Kappa*diff*fx10(j)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv2(j,k) = weightvv2(j,k) +
+ * (-dlog(xx20))/(1-z2)*
+ * 2d0/3*Kappa*msqc(j,k)*flgq*LF
+ weightvv(j,k) = weightvv(j,k) +
+ * (dlog(xx20)*xx20**alfa/(1-z2) - D0int(xx20))*
+ * 2d0/3*Kappa*msqc(j,k)*flgq*LF
+ endif
+c---- P.S. end
+
+
+C P2qqb non singlet
+
+ tgamma2=tgamma2+fx1p(-j)*P2qqbV(z1)
+ & *(-dlog(xx10))*fx20(k)*msqc(j,k)*flgq
+
+ tgamma2=tgamma2+fx2p(-k)*P2qqbV(z2)
+ & *(-dlog(xx20))*fx10(j)*msqc(j,k)*flgq
+
+c---- P.S. save weight
+ if(creategrid.and.bin)then
+ weightvv1(-j,k) = weightvv1(-j,k) +
+ * P2qqbV(z1)*(-dlog(xx10))*msqc(j,k)*flgq*LF
+ weightvv2(j,-k) = weightvv2(j,-k) +
+ * P2qqbV(z2)*(-dlog(xx20))*msqc(j,k)*flgq*LF
+ endif
+c---- P.S. end
+CCCCCCCCCCCC End of NNLO scale dependence CCCCCCCCCCCCCCCCC
+
+
+ 75 continue
+
+ enddo
+ enddo
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+ 72 xmsq=tdelta
+
+
+ if(order.eq.1)then
+ xmsq=xmsq+asopi*(tH1st+LF*tH1stF)
+ elseif(order.eq.2)then
+ xmsq=xmsq+asopi*(tH1st+LF*tH1stF)
+ & +asopi**2*(tdelta*H2qqdelta+tH2st)
+
+CC add scale dependence at NNLO
+
+ xmsq=xmsq+asopi**2*(0.5d0*beta0*LF**2*tH1stF
+ & +tgamma2*LF
+ & -beta0*LR*(tH1st+LF*tH1stF)
+ & +LF*tcga+0.5d0*LF**2*tgaga)
+
+
+C Include missing delta term from C*gamma (no factor 2 here !)
+
+ xmsq=xmsq+asopi**2*(LF*C1qqdelta*tH1stF)
+
+C Include missing term from contact term in 2 loop AP
+
+ xmsq=xmsq+asopi**2*(2*Delta2qq*tdelta)*LF
+
+ endif
+
+
+ lowintHst=flux*pswt*xmsq/BrnRat
+
+
+ call getptildejet(0,pjet)
+
+ call dotem(nvec,pjet,s)
+
+
+
+ val=lowintHst*wgt
+
+
+
+ if (bin) then
+ val=val/dfloat(itmx)
+CC call plotter(pjet,val,0)
+
+c P.S. multiply by totalFactor
+ if (creategrid.and.bin) then ! P.S. scale with factor
+c print*," ** P.S. lowintHst ",val
+
+ if(order.eq.0)then
+ contrib = 100
+ elseif(order.eq.1)then
+ contrib = 300
+ elseif(order.eq.2)then
+ contrib = 400
+ endif
+c factor 2 to correct for the as/pi (dynnlo default) to as/2/pi (applgrid default)
+ if (order.ge.1)then
+ do j=-nf,nf
+ do k=-nf,nf
+ if(order.ge.2)then
+ weightvv(j,k)= (
+ * weightvv(j,k)
+ * +weightb(j,k)*H2qqdelta
+ * -beta0*LR*(weightv(j,k)+LF*weightvF(j,k))
+ * +0.5*beta0*LF**2*weightvF(j,k)
+ * )*4d0
+ weightvv1(j,k)= (
+ * weightvv1(j,k)
+ * -beta0*LR*(weightv1(j,k)+LF*weightv1F(j,k))
+ * +0.5*beta0*LF**2*weightv1F(j,k)
+ * )*4d0
+ weightvv2(j,k)= (
+ * weightvv2(j,k)
+ * -beta0*LR*(weightv2(j,k)+LF*weightv2F(j,k))
+ * +0.5*beta0*LF**2*weightv2F(j,k)
+ * )*4d0
+ weightvv12(j,k)= (
+ * weightvv12(j,k)
+ * )*4d0
+ endif
+ weightv(j,k)=
+ * (weightv(j,k)+LF*weightvF(j,k))*2d0
+ weightv1(j,k)=
+ * (weightv1(j,k)+LF*weightv1F(j,k))*2d0
+ weightv2(j,k)=
+ * (weightv2(j,k)+LF*weightv2F(j,k))*2d0
+ enddo
+ enddo
+ endif
+ weightfactor = flux*pswt*wgt/dfloat(itmx)/BrnRat
+ ag_xx1 = xx10
+ ag_xx2 = xx20
+ ag_x1z = xx10**(1-beta)
+ ag_x2z = xx20**(1-alfa)
+ ag_scale = facscale
+ refwt = val
+ refwt2 = val*val*dfloat(itmx)
+
+c$$$ xCheck = 0d0
+c$$$ do j=-nf,nf
+c$$$ do k=-nf,nf
+c$$$ xCheck = xCheck + weightb(j,k)
+c$$$ * * fx10(j)*fx20(k) * weightfactor
+c$$$ xCheck = xCheck
+c$$$ * + weightv(j,k)* fx10(j)*fx20(k) *
+c$$$ * weightfactor*ason2pi
+c$$$ * + weightv1(j,k)* fx1p(j)*fx20(k) *
+c$$$ * weightfactor*ason2pi
+c$$$ * + weightv2(j,k)* fx10(j)*fx2p(k) *
+c$$$ * weightfactor*ason2pi
+c$$$ xCheck = xCheck
+c$$$ * + weightvv(j,k)* fx10(j)*fx20(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ xCheck = xCheck
+c$$$ * + weightvv1(j,k)
+c$$$ * *fx1p(j)*fx20(k)*weightfactor*ason2pi*ason2pi
+c$$$ xCheck = xCheck
+c$$$ * + weightvv2(j,k)
+c$$$ * * fx10(j)*fx2p(k)*weightfactor*ason2pi*ason2pi
+c$$$ xCheck = xCheck
+c$$$ * + weightvv12(j,k)* fx1p(j)*fx2p(k) *
+c$$$ * weightfactor*ason2pi*ason2pi
+c$$$ enddo
+c$$$ enddo
+c$$$ print *," ** lowintHst : ",refwt, xCheck, refwt/xCheck
+ endif
+c P.S.
+ call plotter(p,val,0)
+ endif
+
+ return
+
+ 999 continue
+ ntotzero=ntotzero+1
+
+ return
+ end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+ double precision function C2qqreg(z)
+ implicit none
+ real *8 Pi,Z2,Z3,myli2,myli3,z,CA,CF
+ integer nf
+
+ external myli2,myli3
+
+ Pi=3.14159265358979d0
+ z2=Pi**2/6
+
+ Z3=1.20205690316d0
+
+ CF=4d0/3
+ CA=3d0
+ nf=5
+
+ C2qqreg=
+ & (CF*(-344+24*Pi**2+974*z-1600*CA*z+2052*CF*z+148*nf*z-60*Pi**2*z+
+ & 108*CF*Pi**2*z-1188*z**2+1584*CA*z**2-4104*CF*z**2-72*nf*z**2+
+ & 72*Pi**2*z**2-216*CF*Pi**2*z**2+830*z**3+16*CA*z**3+2052*CF*z**3-
+ & 76*nf*z**3-60*Pi**2*z**3+108*CF*Pi**2*z**3-
+ & 272*z**4+24*Pi**2*z**4+
+ & 324*CA*z*z2-1728*CF*z*z2 - 648*CA*z**2*z2 + 3456*CF*z**2*z2+
+ & 324*CA*z**3*z2-1728*CF*z**3*z2 + 1188*CA*z*Z3 + 864*CF*z*Z3-
+ & 324*CA*z**3*Z3-864*CF*z**3*Z3 - 108*CA*z**2*dlog(1-z) +
+ & 108*CF*z**2*dlog(1-z)+108*CA*z**3*dlog(1-z)-
+ & 108*CF*z**3*dlog(1-z)-
+ & 216*CA*z*z2*dlog(1-z) + 216*CF*z*z2*dlog(1-z) -
+ & 216*CA*z**3*z2*dlog(1-z)+216*CF*z**3*z2*dlog(1-z)-252*z*dlog(z)+
+ & 348*CA*z*dlog(z)-540*CF*z*dlog(z)-
+ & 60*nf*z*dlog(z)+612*z**2*dlog(z)-
+ & 432*CA*z**2*dlog(z)+1404*CF*z**2*dlog(z)-744*z**3*dlog(z)+
+ & 996*CA*z**3*dlog(z)-1728*CF*z**3*dlog(z)-60*nf*z**3*dlog(z)+
+ & 384*z**4*dlog(z)-144*dlog(1-z)*dlog(z)+360*z*dlog(1-z)*dlog(z)-
+ & 216*CA*z*dlog(1-z)*dlog(z) + 648*CF*z*dlog(1-z)*dlog(z) -
+ & 432*z**2*dlog(1-z)*dlog(z) + 432*CA*z**2*dlog(1-z)*dlog(z) -
+ & 1296*CF*z**2*dlog(1-z)*dlog(z) + 360*z**3*dlog(1-z)*dlog(z) -
+ & 216*CA*z**3*dlog(1-z)*dlog(z) + 648*CF*z**3*dlog(1-z)*dlog(z) -
+ & 144*z**4*dlog(1-z)*dlog(z)+216*CA*z*dlog(1-z)**2*dlog(z) -
+ & 324*CF*z*dlog(1-z)**2*dlog(z)+216*CA*z**3*dlog(1-z)**2*dlog(z) -
+ & 324*CF*z**3*dlog(1-z)**2*dlog(z)+27*z*dlog(z)**2+
+ & 99*CA*z*dlog(z)**2-
+ & 162*CF*z*dlog(z)**2-18*nf*z*dlog(z)**2+108*CA*z**2*dlog(z)**2 -
+ & 108*CF*z**2*dlog(z)**2+45*z**3*dlog(z)**2-9*CA*z**3*dlog(z)**2+
+ & 108*CF*z**3*dlog(z)**2-18*nf*z**3*dlog(z)**2-72*z**4*dlog(z)**2-
+ & 108*CF*z*dlog(1-z)*dlog(z)**2-108*CF*z**3*dlog(1-z)*dlog(z)**2-
+ & 18*z*dlog(z)**3 + 18*CA*z*dlog(z)**3-
+ & 18*CF*z*dlog(z)**3+18*z**3*dlog(z)**3 +
+ & 18*CA*z**3*dlog(z)**3+18*CF*z**3*dlog(z)**3 -
+ & 72*((-1 + z)**2*(2 + (-1+3*CA-6*CF)*z + 2*z**2) -
+ & 3*(CA-CF)*z*(1 + z**2)*dlog(1-z)-3*(CA-3*CF)*z*(1+z**2)*dlog(z))*
+ & myli2(z) + 216*CA*z*myli3(1-z)-216*CF*z*myli3(1-z) +
+ & 216*CA*z**3*myli3(1-z)-216*CF*z**3*myli3(1-z) -
+ & 432*CA*z*myli3(z) + 1080*CF*z*myli3(z) -
+ & 432*CA*z**3*myli3(z)+1080*CF*z**3*myli3(z)-1944*CF*z*Z3-
+ & 216*CF*z**3*Z3))/(864*(-1 + z)*z)
+
+
+
+
+ return
+ end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+ double precision function C2qqp(z)
+ implicit none
+ real *8 Pi,myli2,z,CF
+ integer nf
+
+ external myli2
+
+ Pi=3.14159265358979d0
+
+
+ CF=4d0/3
+
+
+ C2qqp=(CF*(2*(-1+z)*(-172+143*z-136*z**2+6*Pi**2*(2-z+2*z**2))-
+ & 12*(z*(-21 + 30*z - 32*z**2)+
+ & 6*(-2+3*z-3*z**2+2*z**3)*dlog(1-z))*
+ & dlog(z)-9*z*(3+3*z+8*z**2)*dlog(z)**2+18*z*(1 + z)*dlog(z)**3-
+ & 72*(-2 + 3*z - 3*z**2 + 2*z**3)*myli2(z)))/(864d0*z)
+
+
+ return
+ end
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+ double precision function C2qqb(z)
+ implicit none
+ real *8 Pi,Z3,myli2,myli3,z,CF,CA,C2qqp
+
+
+ external myli2,myli3,C2qqp
+
+ Pi=3.14159265358979d0
+ Z3=1.20205690316d0
+
+ CF=4d0/3
+ CA=3d0
+
+
+ C2qqb=C2qqp(z)+
+ & (CF*(-CA+2*CF)*(45-3*Pi**2-2*Pi**2*z-45*z**2+Pi**2*z**2+9*
+ & dlog(z)+42*z*dlog(z)+33*z**2*dlog(z)+12*dlog(1-z)*dlog(z)-
+ & 12*z**2*dlog(1-z)*dlog(z)-dlog(z)**3-z**2*
+ & dlog(z)**3+2*Pi**2*dlog(1+z) +
+ & 2*Pi**2*z**2*dlog(1+z)-12*dlog(z)*
+ & dlog(1+z)-24*z*dlog(z)*dlog(1+z)-
+ & 12*z**2*dlog(z)*dlog(1+z)+6*dlog(z)**2*dlog(1+z)+
+ & 6*z**2*dlog(z)**2*dlog(1+z)-4*dlog(1+z)**3-4*z**2*dlog(1+z)**3-
+ & 12*((1+z)**2+(1+z**2)*dlog(z))*myli2(-z)-
+ & 12*(-1+z**2+dlog(z)+z**2*dlog(z))*myli2(z)+36*myli3(-z)+
+ & 36*z**2*myli3(-z)+24*myli3(z)+24*z**2*myli3(z)+
+ & 24*myli3(1d0/(1+z))+24*z**2*myli3(1d0/(1+z))-
+ & 18*Z3-18*z**2*Z3))/(48*(1+z))
+
+
+ return
+ end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C NEW version August 2013
+C
+
+ double precision function C2qg(z)
+ implicit none
+ real *8 z,CF,CA,Pi,Z3,myli2,myli3
+ external myli2,myli3
+
+
+ Pi=3.14159265358979d0
+ Z3=1.20205690316d0
+ CF=4d0/3
+ CA=3d0
+
+
+ C2qg=(688*CA-1260*CA*z-702*CF*z+1548*CA*z**2+2322*CF*z**2+
+ - 72*CA*Pi**2*z**2+144*CF*Pi**2*z**2-1192*CA*z**3-2160*CF*z**3-
+ - 144*CF*Pi**2*z**3+324*CA*z**2*Log(1-z)-324*CF*z**2*Log(1-z)-
+ - 432*CA*z**3*Log(1-z)+432*CF*z**3*Log(1-z)-
+ - 216*CA*z**2*Log(1-z)**2+216*CF*z**2*Log(1-z)**2+
+ - 216*CA*z**3*Log(1-z)**2-216*CF*z**3*Log(1-z)**2 +
+ - 36*CA*z*Log(1 - z)**3 - 36*CF*z*Log(1 - z)**3 -
+ - 72*CA*z**2*Log(1-z)**3 + 72*CF*z**2*Log(1-z)**3 +
+ - 72*CA*z**3*Log(1-z)**3-72*CF*z**3*Log(1-z)**3 +
+ - 504*CA*z*Log(z)+432*CF*z*Log(z)-720*CA*z**2*Log(z) +
+ - 810*CF*z**2*Log(z)+144*CA*Pi**2*z**2*Log(z)
+ - +1632*CA*z**3*Log(z)-
+ - 432*CF*z**3*Log(z) - 432*CF*z**2*Log(1-z)*Log(z) +
+ - 432*CF*z**3*Log(1-z)*Log(z)+108*CF*z*Log(1-z)**2*Log(z)-
+ - 216*CF*z**2*Log(1-z)**2*Log(z)+
+ - 216*CF*z**3*Log(1-z)**2*Log(z)-
+ - 54*CA*z*Log(z)**2+27*CF*z*Log(z)**2+216*CA*z**2*Log(z)**2+
+ - 324*CF*z**2*Log(z)**2 - 792*CA*z**3*Log(z)**2 -
+ - 216*CF*z**3*Log(z)**2 + 108*CF*z*Log(1 - z)*Log(z)**2-
+ - 864*CA*z**2*Log(1-z)*Log(z)**2-
+ - 216*CF*z**2*Log(1-z)*Log(z)**2+
+ - 216*CF*z**3*Log(1-z)*Log(z)**2+36*CA*z*Log(z)**3 -
+ - 18*CF*z*Log(z)**3+72*CA*z**2*Log(z)**3+36*CF*z**2*Log(z)**3-
+ - 72*CF*z**3*Log(z)**3 + 36*CA*Pi**2*z*Log(1 + z) +
+ - 72*CA*Pi**2*z**2*Log(1 + z) + 72*CA*Pi**2*z**3*Log(1+z)+
+ - 432*CA*z**2*Log(z)*Log(1 + z) + 432*CA*z**3*Log(z)*Log(1+z)+
+ - 108*CA*z*Log(z)**2*Log(1+z)+216*CA*z**2*Log(z)**2*Log(1+z)+
+ - 216*CA*z**3*Log(z)**2*Log(1+z)-72*CA*z*Log(1+z)**3 -
+ - 144*CA*z**2*Log(1 + z)**3 - 144*CA*z**3*Log(1 + z)**3 -
+ - 72*(3*(CA - CF)*z*(1 - 2*z + 2*z**2)*Log(1 - z) +
+ - 2*CA*(2 - 3*z + 12*z**2 - 11*z**3 + 6*z**2*Log(z)))*
+ - myLi2(1-z) - 216*CA*z*
+ - (-2*z*(1 + z) + (1 + 2*z + 2*z**2)*Log(z))*myli2(-z)+
+ - 216*CF*z*Log(z)*myli2(z)-
+ - 1728*CA*z**2*Log(z)*myli2(z)-
+ - 432*CF*z**2*Log(z)*myli2(z)+432*CF*z**3*Log(z)*myli2(z)+
+ - 216*CA*z*myli3(1-z)-216*CF*z*myli3(1-z)-
+ - 432*CA*z**2*myli3(1-z)+432*CF*z**2*myli3(1-z) +
+ - 432*CA*z**3*myli3(1-z) - 432*CF*z**3*myli3(1-z) +
+ - 648*CA*z*myli3(-z) + 1296*CA*z**2*myli3(-z)+
+ - 1296*CA*z**3*myli3(-z) - 216*CF*z*myli3(z) +
+ - 1728*CA*z**2*myli3(z) + 432*CF*z**2*myli3(z)-
+ - 432*CF*z**3*myli3(z) + 432*CA*z*myli3(1/(1+z))+
+ - 864*CA*z**2*myli3(1/(1+z)) +
+ - 864*CA*z**3*myli3(1/(1+z)) -
+ - 648*CA*z*Z3 + 1728*CF*z*Z3-3456*CF*z**2*Z3 -
+ - 1296*CA*z**3*Z3 + 3456*CF*z**3*Z3)/(1728d0*z)
+
+
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Need/myli2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/myli2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/myli2.f (revision 1338)
@@ -0,0 +1,90 @@
+ FUNCTION myli2(x)
+ implicit none
+* !! Dilogarithm for arguments x < = 1.0
+ real*8 X,Y,T,S,A,PI3,PI6,ZERO,ONE,HALF,MALF,MONE,MTWO
+ real*8 C(0:18),H,ALFA,B0,B1,B2,LI2OLD
+ real*8 myli2
+ integer i
+
+ DATA ZERO /0.0d0/, ONE /1.0d0/
+ DATA HALF /0.5d0/, MALF /-0.5d0/
+ DATA MONE /-1.0d0/, MTWO /-2.0d0/
+ DATA PI3 /3.289868133696453d0/, PI6 /1.644934066848226d0/
+
+ DATA C( 0) / 0.4299669356081370d0/
+ DATA C( 1) / 0.4097598753307711d0/
+ DATA C( 2) /-0.0185884366501460d0/
+ DATA C( 3) / 0.0014575108406227d0/
+ DATA C( 4) /-0.0001430418444234d0/
+ DATA C( 5) / 0.0000158841554188d0/
+ DATA C( 6) /-0.0000019078495939d0/
+ DATA C( 7) / 0.0000002419518085d0/
+ DATA C( 8) /-0.0000000319334127d0/
+ DATA C( 9) / 0.0000000043454506d0/
+ DATA C(10) /-0.0000000006057848d0/
+ DATA C(11) / 0.0000000000861210d0/
+ DATA C(12) /-0.0000000000124433d0/
+ DATA C(13) / 0.0000000000018226d0/
+ DATA C(14) /-0.0000000000002701d0/
+ DATA C(15) / 0.0000000000000404d0/
+ DATA C(16) /-0.0000000000000061d0/
+ DATA C(17) / 0.0000000000000009d0/
+ DATA C(18) /-0.0000000000000001d0/
+
+ if(x .gt. 1.00000000001d0) then
+ write(6,*)'problems in LI2'
+ write(6,*)'x=',x
+ stop
+ elseif(x .gt. 1.0d0) then
+ x = 1.d0
+ endif
+ IF(X .EQ. ONE) THEN
+ LI2OLD=PI6
+ myli2=LI2OLD
+ RETURN
+ ELSE IF(X .EQ. MONE) THEN
+ LI2OLD=MALF*PI6
+ myli2=LI2OLD
+ RETURN
+ END IF
+ T=-X
+ IF(T .LE. MTWO) THEN
+ Y=MONE/(ONE+T)
+ S=ONE
+ A=-PI3+HALF*(LOG(-T)**2-LOG(ONE+ONE/T)**2)
+ ELSE IF(T .LT. MONE) THEN
+ Y=MONE-T
+ S=MONE
+ A=LOG(-T)
+ A=-PI6+A*(A+LOG(ONE+ONE/T))
+ ELSE IF(T .LE. MALF) THEN
+ Y=(MONE-T)/T
+ S=ONE
+ A=LOG(-T)
+ A=-PI6+A*(MALF*A+LOG(ONE+T))
+ ELSE IF(T .LT. ZERO) THEN
+ Y=-T/(ONE+T)
+ S=MONE
+ A=HALF*LOG(ONE+T)**2
+ ELSE IF(T .LE. ONE) THEN
+ Y=T
+ S=ONE
+ A=ZERO
+ ELSE
+ Y=ONE/T
+ S=MONE
+ A=PI6+HALF*LOG(T)**2
+ END IF
+
+ H=Y+Y-ONE
+ ALFA=H+H
+ B1=ZERO
+ B2=ZERO
+ DO I = 18,0,-1
+ B0=C(I)+ALFA*B1-B2
+ B2=B1
+ B1=B0
+ ENDDO
+ LI2OLD=-(S*(B0-H*B2)+A)
+ myli2=LI2OLD
+ end
Index: dynnlo-v1.5-applgrid/src/Need/writeinfo.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/writeinfo.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/writeinfo.f (revision 1338)
@@ -0,0 +1,90 @@
+ subroutine writeinfo(unitno,xsec,xsec_err)
+************************************************************************
+* Routine to write out run information to a desired unit *
+************************************************************************
+ implicit none
+ include 'maxwt.f'
+ include 'masses.f'
+ include 'facscale.f'
+ include 'scale.f'
+ include 'zerowidth.f'
+ include 'flags.f'
+ include 'clustering.f'
+ include 'gridinfo.f'
+ include 'limits.f'
+ include 'pdfiset.f'
+ include 'dynamicscale.f'
+ integer unitno
+ include 'lhapdf.f'
+ double precision xsec,xsec_err
+
+ character*4 part
+ character*30 runstring
+ character *50 prefix
+ logical creatent,dswhisto,makecuts
+ integer nproc,ih1,ih2,itmx1,itmx2,ncall1,ncall2,rseed
+ integer order
+ double precision sqrts,Mwmin,Mwmax
+ double precision Rcut
+ double precision leptpt,leptrap,misspt,Rjlmin,Rllmin,delyjjmin,
+ . leptpt2,leptrap2,gammpt,gammrap,gammcone,gammcut
+ integer lbjscheme
+ logical jetsopphem
+
+ common/outputflags/creatent,dswhisto
+
+ common/nnlo/order
+ common/part/part
+ common/runstring/runstring
+ common/energy/sqrts
+ common/density/ih1,ih2
+ common/iterat/itmx1,ncall1,itmx2,ncall2
+ integer nset
+ common/prefix/nset,prefix
+ common/mwminmax/Mwmin,Mwmax
+
+
+
+ common/Rcut/Rcut
+ common/makecuts/makecuts
+ common/leptcuts/leptpt,leptrap,misspt,Rjlmin,Rllmin,delyjjmin,
+ . leptpt2,leptrap2,gammpt,gammrap,gammcone,gammcut,
+ . lbjscheme,jetsopphem
+
+ common/nproc/nproc
+ common/rseed/rseed
+
+ write(unitno,*) '( Cross-section is: ',xsec,'+/-',xsec_err,')'
+ write(unitno,*)
+ write(unitno,*) '( Run corresponds to this input file)'
+ write(unitno,*)
+ write(unitno,*) '(sqrts= ',sqrts
+ write(unitno,*) '(ih1= ',ih1,' ih2= ',ih2
+ write(unitno,*) '(nproc: ',nproc
+ write(unitno,*) '(dynamicscale=',dynamicscale
+ if(dynamicscale.eqv..false.) then
+ write(unitno,*) '(muf= ',facscale
+ write(unitno,*) '(mur= ',scale
+ endif
+ write(unitno,*) '(order= ',order
+ write(unitno,*) '(part= ',part
+ write(unitno,*) '(zerowidth= ',zerowidth
+ write(unitno,*) '(Mwmin= ',Mwmin,' Mwmax= ',Mwmax
+ write(unitno,*) '(itmx1= ',itmx1
+ write(unitno,*) '(ncall1= ',ncall1
+ write(unitno,*) '(itmx2= ',itmx2
+ write(unitno,*) '(ncall2= ',ncall2
+ write(unitno,*) '(rnd seed= ',rseed
+ write(unitno,*) '(iset=',iset,' nset=',nset
+ write(unitno,*) '(PDFname=',PDFname,' PDFmember=',PDFmember
+ write(unitno,*) '(runstring=',runstring
+ write(unitno,*)
+ write(unitno,*) '( td -b filename.top '
+ write(unitno,*) 'SET DEVICE POSTSCRIPT SIDEWAYS'
+ write(unitno,*) 'SET SIZE SIDEWAYS'
+
+ return
+
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/dipoles_new.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dipoles_new.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dipoles_new.f (revision 1338)
@@ -0,0 +1,577 @@
+************************************************************************
+* Author: J. M. Campbell *
+* August, 1999 (updated April, 2001) *
+* *
+* Comments added October 15th 2001. *
+* *
+* Revised by R.K. Ellis, November 9th, 16th 2001. *
+* *
+* Routines which return various pieces of the integrated *
+* subtraction terms, used in both _v and _z routines *
+************************************************************************
+
+************************************************************************
+* *
+* The labelling of the routines is as follows: *
+* The collinear pair is assumed to be incoming, *
+* so a reversal has to be made for the final state cases *
+* *
+* -------->------------>-------- *
+* j / i *
+* / *
+* / *
+* *
+* represented by {ii/if}_ij *
+* *
+************************************************************************
+
+***********************************************************************
+*************************** INITIAL-INITIAL ***************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function iin_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pqqreg,alfax
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqq=
+c-- [delta(1-x)]*(epinv*(epinv-L)+1/2*L^2+3/2*epinv-[pi]^2/6)
+c-- +(1-x)-(1+x)*(L+2*[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+
+ if (vorz .eq. 1) then
+ iin_qq=epinv*(epinv2-L)+0.5d0*L**2+1.5d0*epinv-pisqo6
+ . -epinv*1.5d0
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ iin_qq=iin_qq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pqqreg=-one-x
+ iin_qq=omx+Pqqreg*(two*lomx+L-epinv)-(one+x**2)/omx*lx
+ alfax=alfa/omx
+ if (alfax .lt. 1d0) iin_qq=iin_qq+(two/omx+Pqqreg)*log(alfax)
+ return
+ endif
+
+ iin_qq=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+ double precision function iin_qg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pqgreg,alfax
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,aqg=(1-2*x*(1-x))*(-[ln(x)]+L+2*[ln(1-x)])+2*x*(1-x)
+ iin_qg=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pqgreg=one-two*x*omx
+ iin_qg=Pqgreg*(two*lomx-lx+L-epinv)+two*x*omx
+ alfax=alfa/omx
+ if (alfax .lt. 1d0) iin_qg=iin_qg+Pqgreg*log(alfax)
+ endif
+ return
+ end
+
+***************************** Gluon-Quark *****************************
+ double precision function iin_gq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pgqreg,alfax
+ include 'constants.f'
+ include 'epinv.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial quark-quark (--> gluon) antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agq=(1+(1-x)^2)/x*(-[ln(x)]+L+2*[ln(1-x)])+x
+
+
+ iin_gq=0d0
+ if ((vorz .eq. 1) .or. (vorz .eq. 3)) return
+
+ omx=one-x
+ lomx=dlog(omx)
+ lx=dlog(x)
+
+ if (vorz .eq. 2) then
+ Pgqreg=(one+omx**2)/x
+ iin_gq=Pgqreg*(two*lomx-lx+L-epinv)+x
+ alfax=alfa/omx
+ if (alfax .lt. 1d0) iin_gq=iin_gq+Pgqreg*log(alfax)
+ return
+ endif
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function iin_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,Pggreg,alfax
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--TH-V
+c-- Id,agg=(epinv*(epinv-L)+1/2*L^2+epinv*11/6-[pi]^2/6
+c-- -nf/3/xn*epinv)*[delta(1-x)]
+c-- -2*[ln(x)]/[1-x]
+c-- +2*(-1+x*(1-x)+(1-x)/x)*(-[ln(x)]+L+2*[ln(1-x)])
+c-- +(4*[ln(1-x)/(1-xp)]+2*L/[1-xp])
+
+ if (vorz .eq. 1) then
+ iin_gg=epinv*(epinv2-L)+half*L**2-pisqo6
+ . +(11d0-two*nf/xn)/6d0*epinv
+ . -(11d0-two*nf/xn)/6d0*epinv
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ iin_gg=iin_gg-1d0/6d0
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ Pggreg=omx/x+x*omx-one
+ lx=dlog(x)
+ iin_gg=two*Pggreg*(two*lomx-lx+L-epinv)-two*lx/omx
+ alfax=alfa/omx
+ if (alfax .lt. 1d0) iin_gg=iin_gg+Pggreg*log(alfax)
+ return
+ endif
+
+ iin_gg=two*(two*lomx+L-epinv)/omx
+
+ return
+ end
+
+***********************************************************************
+**************************** INITIAL-FINAL ****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ifn_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,ltmx,Pqqpr,Pqqreg
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,aqq=(epinv*(epinv-L)+1/2*L^2+3/2*epinv+[pi]^2/6)*[delta(1-x)]
+c-- +(1-x-2/[1-x]*[ln(2-x)]
+c-- -(1+x)*(L+[ln(1-x)])-(1+x^2)*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+ if (vorz .eq. 1) then
+ ifn_qq=epinv*(epinv2-L)+half*L**2+pisqo6
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ifn_qq=ifn_qq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ Pqqreg=-one-x
+ Pqqpr=omx
+ ltmx=dlog(two-x)
+ lx=dlog(x)
+ ifn_qq=Pqqpr+Pqqreg*(lomx+log(alfa)+L-epinv-lx)
+ . -two/omx*(lx+log((omx+alfa)/alfa))
+ return
+ endif
+
+ ifn_qq=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ifn_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,lx,lomx,ltmx,Pggreg
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,agg=[delta(1-x)]*(
+c-- epinv*(epinv-L)+1/2*L^2+11/6*epinv+[pi]^2/6-1/3*epinv*nf/xn)
+c-- +2*(-1+(1-x)/x+x*(1-x))*(L-[ln(x)]+[ln(1-x)])
+c-- -2*[ln(2-x)]/[1-x]-2*[ln(x)]/[1-x]
+c-- +4*[ln(1-x)/(1-xp)]+2*L/[1-xp]
+
+ if (vorz .eq. 1) then
+ ifn_gg=epinv*(epinv2-L)+half*L**2+pisqo6
+c . +(11d0-two*nf/xn)*epinv/6d0
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ifn_gg=ifn_gg-1d0/6d0
+ return
+ endif
+ endif
+
+ omx=one-x
+ lomx=dlog(omx)
+
+ if (vorz .eq. 2) then
+ Pggreg=two*(omx/x+x*omx-one)
+ ltmx=dlog(two-x)
+ lx=dlog(x)
+ ifn_gg=Pggreg*(lomx+log(alfa)+L-epinv-lx)
+ . -two/omx*(lx+log((omx+alfa)/alfa))
+ return
+ endif
+
+ ifn_gg=two/omx*(two*lomx+L-epinv)
+
+ return
+ end
+
+C----Not necessary because non-soft singular initial states
+C----are included as initial-initial dipoles
+***************************** Quark-Gluon *****************************
+c double precision function ifn_qg(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L,omx,lx,lomx
+c include 'constants.f'
+c include 'epinv.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,aqg=(1-2*x*(1-x))*(L-[ln(x)]+[ln(1-x)])+2*x*(1-x)
+c
+c ifn_qg=0d0
+c if ((vorz .eq. 1).or.(vorz .eq. 3)) return
+c
+c omx=one-x
+c lomx=dlog(omx)
+c lx=dlog(x)
+c
+c if (vorz .eq. 2) then
+c ifn_qg=(one-two*x*omx)*(lomx-lx+L-epinv)+two*x*omx
+c endif
+
+c return
+c end
+
+***************************** Gluon-Quark *****************************
+c double precision function ifn_gq(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L,omx,lx,lomx
+c include 'constants.f'
+c include 'epinv.f'
+c--- returns the integral of the subtraction term for an
+c--- initial-final gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+c-- TH-V
+c-- Id,agq=(1+(1-x)^2)/x*(L-[ln(x)]+[ln(1-x)])+x
+c
+c ifn_gq=0d0
+c if ((vorz .eq. 1).or.(vorz .eq. 3)) return
+
+c omx=one-x
+c lomx=dlog(omx)
+c lx=dlog(x)
+
+c if (vorz .eq. 2) then
+c ifn_gq=(one+omx**2)/x*(lomx-lx+L-epinv)+x
+c endif
+
+c return
+c end
+
+***********************************************************************
+**************************** FINAL-INITIAL ****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function fin_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,gamq
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqq=(epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+7/2-[pi]^2/2)*[delta(1-x)]
+c-- +2/[1-x]*[ln(2-x)]
+c-- +(-2*[ln(1-x)/(1-xp)]-3/2/[1-xp])
+
+ gamq=1.5d0
+ if (vorz .eq. 1) then
+ fin_qq=epinv*(epinv2-L)+half*L**2+gamq*(epinv-L)
+ . +3.5d0-half*pisq
+
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ fin_qq=fin_qq-half
+ return
+ endif
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ fin_qq=two*dlog(two-x)/omx
+ if (alfa .lt. omx) fin_qq=fin_qq-(2d0*log((2d0-x)/omx)+gamq)/omx
+ return
+ endif
+
+ fin_qq=-(two*dlog(omx)+gamq)/omx
+
+ return
+ end
+
+***************************** Gluon-Gluon *****************************
+ double precision function fin_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L,omx,gamg
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c-- Id,aqg=(-2/3*(epinv-L)-10/9)*[delta(1-x)]
+c-- +0
+c-- +2/3/[1-xp]
+c-- Id,agg=
+c-- (2*epinv*(epinv-L)+L^2+(epinv-L)*11/3+67/9-[pi]^2)
+c-- *[delta(1-x)]
+c-- +4*[ln(2-x)]/[1-x]
+c-- +2*(-2*[ln(1-x)/(1-xp)]-11/6/[1-xp])
+
+ gamg=11d0/3d0-2d0/3d0*dfloat(nf)/xn
+ if (vorz .eq. 1) then
+ fin_gg=two*epinv*(epinv2-L)+L**2+gamg*(epinv-L)
+ . +67d0/9d0-dfloat(nf)/xn*10d0/9d0-pisq
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ fin_gg=fin_gg-dfloat(nf)/xn/3d0
+ return
+ endif
+ endif
+
+ omx=one-x
+
+ if (vorz .eq. 2) then
+ fin_gg=four*dlog(two-x)/omx
+ if (omx .gt. alfa)
+ . fin_gg=fin_gg-(four*dlog((2d0-x)/omx)+gamg)/omx
+ return
+ endif
+
+ fin_gg=-(four*dlog(omx)+gamg)/omx
+ return
+ end
+
+
+
+
+***************************** Quark-Gluon *****************************
+c double precision function fin_qg(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L,omx
+c include 'constants.f'
+c include 'epinv.f'
+c include 'epinv2.f'
+c include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C--MSbar
+c--Id,aqg=(-2/3*(epinv-L)-10/9)*[delta(1-x)]
+c-- +0
+c-- +2/3/[1-xp]
+
+
+c if (vorz .eq. 1) then
+c fin_qg=2d0/3d0*(-epinv+L)-10d0/9d0
+c if (scheme .eq. 'tH-V') then
+c return
+c elseif (scheme .eq. 'dred') then
+c fin_qg=fin_qg-1d0/3d0
+c return
+c endif
+c elseif (vorz .eq. 2) then
+c fin_qg=0d0
+c elseif (vorz .eq. 3) then
+c fin_qg=2d0/3d0/(one-x)
+c endif
+c return
+c end
+
+
+***********************************************************************
+***************************** FINAL-FINAL *****************************
+***********************************************************************
+
+***************************** Quark-Quark *****************************
+ double precision function ffn_qq(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial quark-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqq=epinv*(epinv-L)+1/2*L^2+3/2*(epinv-L)+5-[pi]^2/2
+
+ ffn_qq=0d0
+ if (vorz .eq. 1) then
+ ffn_qq=epinv*(epinv2-L)+half*L**2+1.5d0*(epinv-L)+5d0-half*pisq
+ if (alfa.lt.1d0)
+ . ffn_qq=ffn_qq-log(alfa)**2+1.5d0*(alfa-1d0-log(alfa))
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ffn_qq=ffn_qq-half
+ return
+ endif
+ endif
+ return
+ end
+
+***************************** Quark-Gluon *****************************
+c double precision function ffn_qg(x,L,vorz)
+c implicit none
+c integer vorz
+c double precision x,L
+c include 'constants.f'
+c include 'epinv.f'
+c include 'epinv2.f'
+c include 'scheme.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-quark antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c
+c ffn_qg=0d0
+c if (vorz .eq. 1) then
+c ffn_qg=-2d0/3d0*(epinv-L)-16d0/9d0
+c if (scheme .eq. 'tH-V') then
+c return
+c elseif (scheme .eq. 'dred') then
+c ffn_qg=ffn_qg-1d0/3d0
+c return
+c endif
+c endif
+c return
+c end
+
+***************************** Gluon-Gluon *****************************
+ double precision function ffn_gg(x,L,vorz)
+ implicit none
+ integer vorz
+ double precision x,L
+ include 'constants.f'
+ include 'epinv.f'
+ include 'epinv2.f'
+ include 'scheme.f'
+ include 'alfacut.f'
+c--- returns the integral of the subtraction term for an
+c--- final-initial gluon-gluon antenna, either
+c--- divergent for _v (vorz=1) or finite for _z (vorz=2,3 for reg,plus)
+C --MSbar
+c Id,aqg=-2/3*(epinv-L)-16/9
+c Id,agg=2*epinv*(epinv-L)+L^2+11/3*(epinv-L)+100/9-[pi]^2
+
+ ffn_gg=0d0
+ if (vorz .eq. 1) then
+ ffn_gg=two*epinv*(epinv2-L)+L**2+100d0/9d0-pisq
+ . +11d0/3d0*(epinv-L)
+ ffn_gg=ffn_gg+dfloat(nf)/xn*(-2d0/3d0*(epinv-L)-16d0/9d0)
+ if (alfa.lt.1d0)
+ . ffn_gg=ffn_gg-log(alfa)**2
+ . +(11d0/3d0-2d0/3d0*dfloat(nf)/xn)*(alfa-1d0-log(alfa))
+ if (scheme .eq. 'tH-V') then
+ return
+ elseif (scheme .eq. 'dred') then
+ ffn_gg=ffn_gg-dfloat(nf)/xn/3d0
+ return
+ endif
+ endif
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/couplz.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/couplz.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/couplz.f (revision 1338)
@@ -0,0 +1,24 @@
+ subroutine couplz(xw)
+ implicit none
+ include 'constants.f'
+ include 'zcouple.f'
+ include 'ewcharge.f'
+c---calculate the couplings as given in Kunszt and Gunion
+c---Modified to notation of DKS (ie divided by 2*sw*cw)
+c---xw=sin^2 theta_w
+ integer j
+ double precision xw
+ sin2w=two*sqrt(xw*(1d0-xw))
+ do j=1,nf
+ l(j)=(tau(j)-two*Q(j)*xw)/sin2w
+ r(j)= (-two*Q(j)*xw)/sin2w
+ enddo
+
+ le=(-1d0-two*(-1d0)*xw)/sin2w
+ re=(-two*(-1d0)*xw)/sin2w
+
+ ln=(+1d0-two*(+0d0)*xw)/sin2w
+ rn=0d0
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/preclus.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/preclus.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/preclus.f (revision 1338)
@@ -0,0 +1,100 @@
+ subroutine preclus(p,npar)
+ implicit double precision (a-h,o-z)
+ include 'constants.f'
+ double precision p(mxpart,4)
+ integer npar
+ common /jetdef/ etminj,etmaxj,delrjj,rapmaxj,rapminj
+ common /clusdef/ rsep,jalg1,jalg2
+c common /jetcom/ icol,ji,jj,jk
+ common /parmom/ ppar(4,10)
+ common /phypar/ w,ipp1,ipp2,rmw,rgw,rmz,rgz,sw2,qcdl
+ common/energy/sqrts
+ logical first
+ data first/.true./
+ save first
+ w=sqrts
+
+ if (first) then
+ first=.false.
+
+ open(unit=55,file='jetcuts.dat',status='old',err=99)
+ write(6,*) 'Reading cuts from jetcuts.dat'
+ read(55,*) etminj
+ write(6,*) 'etminj',etminj
+ read(55,*) etmaxj
+ write(6,*) 'etmaxj',etmaxj
+ read(55,*) delrjj
+ write(6,*) 'delrjj',delrjj
+ read(55,*) rapmaxj
+ write(6,*) 'rapmaxj',rapmaxj
+ read(55,*) rapminj
+ write(6,*) 'rapminj',rapminj
+ read(55,*) jalg1
+ write(6,*) 'jalg1',jalg1
+ read(55,*) jalg2
+ write(6,*) 'jalg2',jalg2
+ close(unit=55)
+ endif
+ rsep=1.3d0*delrjj
+ npar=3
+
+ do j=1,4
+ ppar(j,1) =p(1,j)
+ ppar(j,2) =p(2,j)
+ ppar(j,3) =p(6,j)
+ ppar(j,4) =p(7,j)
+ ppar(j,5) =p(4,j)
+ ppar(j,6) =p(5,j)
+ ppar(j,7) =p(3,j)
+ ppar(j,8) =0d0
+ ppar(j,9) =0d0
+ ppar(j,10)=0d0
+ enddo
+
+
+ return
+ 99 continue
+ write(6,*) 'Error reading jetscuts.dat'
+ stop
+ end
+c etminj=10d0
+c etmaxj=500d0
+c rapmaxj=3.5d0
+c rapminj=0d0
+*
+* clustering criterion
+* jalg1 = 1 ; deltaR(i,j) < delrjj
+* jalg1 = 2 ; deltaR(i,jet) < delrjj and deltaR(j,jet) < delrjj
+* jalg1 = 3 ; kt algorithm; R = delrjj
+* jalg1 = 4 ; deltaR(i,jet) < delrjj and deltaR(j,jet) < delrjj
+* but deltaR(i,j) < Rsep
+*
+c jalg1=4
+* recombination scheme
+* jalg2 = 1 is D0 eta/phi
+* jalg2 = 2 is Snowmass
+* jalg2 = 3 is 4 momentum - ET = sqrt(px**2+py**2)
+* jalg2 = 4 is 4 momentum - ET = E sin(theta)
+*
+c jalg2=1
+* conesize
+c delrjj=0.7d0
+
+*
+* if jalg1 = 4, must set rsep
+*
+c rsep=1.3d0*delrjj
+*
+* experimental lepton cuts
+*
+c etminl=25d0
+c etmis =25d0
+c delrjl=0.4d0
+c rapmaxl=1.1d0
+c rlepmin =60d0
+c rlepmax =100d0
+*
+* hadron rapidity coverage (missing E_t reconstruction)
+*
+c raphad=4d0
+*
Index: dynnlo-v1.5-applgrid/src/Need/ptyrap.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/ptyrap.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/ptyrap.f (revision 1338)
@@ -0,0 +1,154 @@
+ double precision function etarap(j,p)
+ implicit none
+C---returns the value of the pseudorapidity
+ include 'constants.f'
+ integer j
+ double precision p(mxpart,4)
+ etarap=dsqrt(p(j,1)**2+p(j,2)**2+p(j,3)**2)
+ etarap=(etarap+p(j,3))/(etarap-p(j,3))
+ if (etarap .lt. 1d-13) then
+C-- set to 100 if this is very close to or less than zero
+c-- rapidities of 100 will be rejected by any sensible cuts
+ etarap=100d0
+ else
+ etarap=0.5d0*dlog(etarap)
+ endif
+ return
+ end
+
+ double precision function aetarap(j,p)
+ implicit none
+C---returns the absolute value of the pseudorapidity
+ include 'constants.f'
+ integer j
+ double precision p(mxpart,4)
+ aetarap=dsqrt(p(j,1)**2+p(j,2)**2+p(j,3)**2)
+ aetarap=(aetarap+p(j,3))/(aetarap-p(j,3))
+ if (aetarap .lt. 1d-13) then
+C-- set to 100 if this is very close to or less than zero
+c-- rapidities of 100 will be rejected by any sensible cuts
+ aetarap=100d0
+ else
+ aetarap=0.5d0*abs(dlog(aetarap))
+ endif
+ return
+ end
+
+ double precision function yrap(j,p)
+ implicit none
+C---returns the value of the rapidity
+ include 'constants.f'
+ integer j
+ double precision p(mxpart,4)
+ yrap=(p(j,4)+p(j,3))/(p(j,4)-p(j,3))
+ if (yrap .lt. 1d-13) then
+C-- set to 100 if this is very close to or less than zero
+c-- rapidities of 100 will be rejected by any sensible cuts
+ yrap=100d0
+ else
+ yrap=0.5d0*dlog(yrap)
+ endif
+ return
+ end
+
+ double precision function ayrap(j,p)
+ implicit none
+C---returns the absolute value of the rapidity
+ include 'constants.f'
+ integer j
+ double precision p(mxpart,4)
+ ayrap=(p(j,4)+p(j,3))/(p(j,4)-p(j,3))
+ if (ayrap .lt. 1d-13) then
+C-- set to 100 if this is very close to or less than zero
+c-- rapidities of 100 will be rejected by any sensible cuts
+ ayrap=100d0
+ else
+ ayrap=0.5d0*dabs(dlog(ayrap))
+ endif
+ return
+ end
+
+ double precision function pt(j,p)
+ implicit none
+ include 'constants.f'
+ integer j
+ double precision p(mxpart,4)
+c--- This is the formula for pt
+ pt=dsqrt(p(j,1)**2+p(j,2)**2)
+c--- This is the formula for Et
+c pt=dsqrt(p(j,1)**2+p(j,2)**2)
+c . *p(j,4)/dsqrt(p(j,1)**2+p(j,2)**2+p(j,3)**2)
+ return
+ end
+
+ double precision function pttwo(j,k,p)
+ implicit none
+ include 'constants.f'
+ integer j,k
+ double precision p(mxpart,4)
+ pttwo=dsqrt((p(j,1)+p(k,1))**2+(p(j,2)+p(k,2))**2)
+ return
+ end
+
+c--- this is the rapidity of pair j,k
+ double precision function yraptwo(j,k,p)
+ implicit none
+ include 'constants.f'
+ integer j,k
+ double precision p(mxpart,4)
+ yraptwo=(p(j,4)+p(k,4)+p(j,3)+p(k,3))
+ . /(p(j,4)+p(k,4)-p(j,3)-p(k,3))
+ if (yraptwo .lt. 1d-13) then
+C-- set to 100 if this is very close to or less than zero
+c-- rapidities of 100 will be rejected by any sensible cuts
+ yraptwo=100d0
+ else
+ yraptwo=0.5d0*dlog(yraptwo)
+ endif
+
+ return
+ end
+
+c--- this is the pseudo-rapidity
+ double precision function etaraptwo(j,k,p)
+ implicit none
+ include 'constants.f'
+ integer j,k
+ double precision p(mxpart,4)
+
+ etaraptwo=dsqrt((p(j,1)+p(k,1))**2+(p(j,2)+p(k,2))**2
+ . +(p(j,3)+p(k,3))**2)
+ if (abs(etaraptwo)-abs(p(j,3)+p(k,3)) .lt. 1d-13) then
+C-- set to 100 if this is very close to or less than zero
+c-- rapidities of 100 will be rejected by any sensible cuts
+ etaraptwo=100d0
+ else
+ etaraptwo=(etaraptwo+p(j,3)+p(k,3))
+ . /(etaraptwo-p(j,3)-p(k,3))
+ etaraptwo=0.5d0*dlog(etaraptwo)
+ endif
+
+ return
+ end
+
+
+CC NEW
+
+c--- this is the rapidity of pair j,k,l,m
+ double precision function yrapfour(j,k,l,m,p)
+ implicit none
+ include 'constants.f'
+ integer j,k,l,m
+ double precision p(mxpart,4)
+ yrapfour=(p(j,4)+p(k,4)+p(l,4)+p(m,4)+p(j,3)+p(k,3)+p(l,3)+p(m,3))
+ . /(p(j,4)+p(k,4)+p(l,4)+p(m,4)-p(j,3)-p(k,3)-p(l,3)-p(m,3))
+ if (yrapfour .lt. 1d-13) then
+C-- set to 100 if this is very close to or less than zero
+c-- rapidities of 100 will be rejected by any sensible cuts
+ yrapfour=100d0
+ else
+ yrapfour=0.5d0*dlog(yrapfour)
+ endif
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/lnrat.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/lnrat.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/lnrat.f (revision 1338)
@@ -0,0 +1,17 @@
+ double complex function Lnrat(x,y)
+************************************************************************
+* Author: R.K. Ellis *
+* August, 1998. *
+c Lnrat(x,y)=log(x-i*ep)-log(y-i*ep) *
+c this function is hard-wired for sign of epsilon we must adjust *
+c sign of x and y to get the right sign for epsilon *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ double precision x,y,htheta
+C--- define Heaviside theta function (=1 for x>0) and (0 for x < 0)
+ htheta(x)=half+half*sign(one,x)
+ Lnrat=dcmplx(dlog(abs(x/y)))-impi*dcmplx((htheta(-x)-htheta(-y)))
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/ckmfill.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/ckmfill.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/ckmfill.f (revision 1338)
@@ -0,0 +1,145 @@
+ subroutine ckmfill(nwz)
+ implicit none
+ include 'constants.f'
+ include 'ckm.f'
+ include 'ckm1.f'
+ include 'ewcouple.f'
+ include 'zcouple.f'
+ integer nwz,j,k
+ double precision Vud,Vus,Vub,Vcd,Vcs,Vcb,rtxw
+ common/cabib/Vud,Vus,Vub,
+ & Vcd,Vcs,Vcb
+
+c---- initialize Vsq
+ do j=-nf,nf
+ do k=-nf,nf
+ Vsq(j,k)=0d0
+ enddo
+ enddo
+c set all other couplings (for W+2 jets) to zero too
+ flsq=0d0
+ frsq=0d0
+ fl=0d0
+ fr=0d0
+
+ do j=-nf,nf
+ do k=-nf,nf
+ gl(j,k)=0d0
+ gr(j,k)=0d0
+ glsq(j,k)=0d0
+ grsq(j,k)=0d0
+ enddo
+ enddo
+
+C case Z0
+ if (nwz .eq. 0) then
+ Vsq(1,-1)=1d0
+ Vsq(2,-2)=1d0
+ Vsq(3,-3)=1d0
+ Vsq(4,-4)=1d0
+ Vsq(5,-5)=1d0
+ rtxw=dsqrt(xw)
+ do j=1,5
+ gl(+j,-j)=l(j)*gw*rtxw
+ gr(+j,-j)=r(j)*gw*rtxw
+ enddo
+ fl=le*gw*rtxw
+ fr=re*gw*rtxw
+ do j=1,nf
+ glsq(j,-j)=gl(j,-j)**2
+ grsq(j,-j)=gr(j,-j)**2
+ enddo
+ flsq=fl**2
+ frsq=fr**2
+ return
+
+C case W+
+ elseif (nwz .eq. 1) then
+
+ Vsq(2,-1)=Vud**2
+ Vsq(2,-3)=Vus**2
+ Vsq(2,-5)=Vub**2
+ Vsq(4,-1)=Vcd**2
+ Vsq(4,-3)=Vcs**2
+ Vsq(4,-5)=Vcb**2
+
+ glsq(2,-1)=gwsq/2d0
+ glsq(2,-3)=gwsq/2d0
+ glsq(2,-5)=gwsq/2d0
+ glsq(4,-1)=gwsq/2d0
+ glsq(4,-3)=gwsq/2d0
+ glsq(4,-5)=gwsq/2d0
+ flsq=gwsq/2d0
+ fl=dsqrt(flsq)
+
+C case W-
+ elseif (nwz .eq. -1) then
+
+ Vsq(1,-2)=Vud**2
+ Vsq(3,-2)=Vus**2
+ Vsq(5,-2)=Vub**2
+ Vsq(1,-4)=Vcd**2
+ Vsq(3,-4)=Vcs**2
+ Vsq(5,-4)=Vcb**2
+
+ glsq(1,-2)=gwsq/2d0
+ glsq(3,-2)=gwsq/2d0
+ glsq(5,-2)=gwsq/2d0
+ glsq(1,-4)=gwsq/2d0
+ glsq(3,-4)=gwsq/2d0
+ glsq(5,-4)=gwsq/2d0
+ flsq=gwsq/2d0
+ fl=dsqrt(flsq)
+
+C case (W+ + W-)
+ elseif (nwz .eq. 2) then
+
+C case W+
+ Vsq(2,-1)=Vud**2
+ Vsq(2,-3)=Vus**2
+ Vsq(2,-5)=Vub**2
+ Vsq(4,-1)=Vcd**2
+ Vsq(4,-3)=Vcs**2
+ Vsq(4,-5)=Vcb**2
+ glsq(2,-1)=gwsq/2d0
+ glsq(2,-3)=gwsq/2d0
+ glsq(2,-5)=gwsq/2d0
+ glsq(4,-1)=gwsq/2d0
+ glsq(4,-3)=gwsq/2d0
+ glsq(4,-5)=gwsq/2d0
+C case W-
+ Vsq(1,-2)=Vud**2
+ Vsq(3,-2)=Vus**2
+ Vsq(5,-2)=Vub**2
+ Vsq(1,-4)=Vcd**2
+ Vsq(3,-4)=Vcs**2
+ Vsq(5,-4)=Vcb**2
+ glsq(1,-2)=gwsq/2d0
+ glsq(3,-2)=gwsq/2d0
+ glsq(5,-2)=gwsq/2d0
+ glsq(1,-4)=gwsq/2d0
+ glsq(3,-4)=gwsq/2d0
+ glsq(5,-4)=gwsq/2d0
+
+ flsq=gwsq/2d0
+ fl=dsqrt(flsq)
+
+ endif
+
+ do j=-nf,nf
+ do k=-nf,nf
+ Vsq(j,k)=Vsq(k,j)
+ glsq(j,k)=glsq(k,j)
+ grsq(j,k)=grsq(k,j)
+ VV(j,k)=dsqrt(Vsq(j,k))
+ gl(j,k)=dsqrt(glsq(j,k))
+ gr(j,k)=dsqrt(grsq(j,k))
+ enddo
+ enddo
+ do j=1,5
+ Vsum(+j)=Vsq(+j,-1)+Vsq(+j,-2)+Vsq(+j,-3)+Vsq(+j,-4)+Vsq(+j,-5)
+ Vsum(-j)=Vsq(-j,+1)+Vsq(-j,+2)+Vsq(-j,+3)+Vsq(-j,+4)+Vsq(-j,+5)
+ enddo
+ Vsum(0)=0
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/dips_mass.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dips_mass.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dips_mass.f (revision 1338)
@@ -0,0 +1,412 @@
+ subroutine dips_mass(nd,p,ip,jp,kp,sub,subv,msq,msqv,
+ . subr_born,subr_corr)
+ implicit none
+************************************************************************
+* Author: Keith Ellis *
+* June 2002 *
+* Calculates the nj-jet subtraction term corresponding to dipole *
+* nd with momentum p and dipole kinematics (ip,jp) wrt kp *
+* Automatically chooses dipole kind *
+* Returns the dipoles in sub,subv and matrix elements in msq,msqv *
+* nd labels the dipole configurations *
+* ip labels the emitter parton *
+* jp labels the emitted parton *
+* kp labels the spectator parton *
+* subr_born is the subroutine which call the born process *
+* subr_corr is the subroutine which call the born process dotted *
+* with vec for an emitted gluon only *
+************************************************************************
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'qqgg.f'
+ include 'ptilde.f'
+ include 'process.f'
+ include 'alfacut.f'
+ double precision p(mxpart,4),ptrans(mxpart,4),sub(4),subv,vecsq,
+ . x,omx,z,omz,y,omy,u,omu,pij,pik,pjk,dot,q(4),qsq,qij(4),qijsq,
+ . vec(4),root,vtilde,pold(mxpart,4),pext(mxpart,4)
+ double precision msq(-nf:nf,-nf:nf),msqv(-nf:nf,-nf:nf),zp,zm
+ double precision mksq,misq,mjsq,mijsq,muisq,mujsq,muksq,
+ . muijsq,kappa,vijk,vtijk,viji,ztmi,ztmj,muk,mqsq
+ double precision yp,mass2,width2,mass3,width3
+ integer nd,ip,jp,kp,nu,j,jproc,n2,n3
+ logical incldip(0:maxd)
+ common/incldip/incldip
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ external subr_born,subr_corr
+ parameter(kappa=0d0)
+ logical first
+ data first/.true./
+
+ if (first) then
+ first=.false.
+ write(6,*) 'dips_mass:mass2',mass2
+ endif
+ mqsq=mass2**2
+
+ do nu=1,4
+ do j=1,mxpart
+ ptrans(j,nu)=0d0
+ pold(j,nu)=p(j,nu)
+ enddo
+ enddo
+
+ if ((case .eq. 't_bbar') .or. (case .eq. 'bq_tpq')) then
+c--- if we're doing single-top, reduce # of momenta from 7 to 5
+ do nu=1,4
+ p(3,nu)=pold(3,nu)+pold(4,nu)+pold(5,nu)
+ p(4,nu)=pold(6,nu)
+ p(5,nu)=pold(7,nu)
+ p(6,nu)=0d0
+ p(7,nu)=0d0
+ enddo
+ endif
+
+C---Initialize the dipoles to zero
+ do j=1,4
+ sub(j)=0d0
+ enddo
+ subv=0d0
+ call zeromsq(msq,msqv)
+
+C--- default is all particles massless
+ misq=0d0
+ mjsq=0d0
+ mijsq=0d0
+
+ pij=two*dot(p,ip,jp)
+ pik=two*dot(p,ip,kp)
+ pjk=two*dot(p,jp,kp)
+
+ if ((ip .le. 2) .and. (kp .le. 2)) then
+***********************************************************************
+*************************** INITIAL-INITIAL ***************************
+***********************************************************************
+ omx=-(pij+pjk)/pik
+ x=one-omx
+ vtilde=pij/pik
+
+C---Modification so that only close to singular subtracted
+ if (-vtilde .gt. aii) then
+ incldip(nd)=.false.
+ goto 99
+ endif
+
+ call transform_mass(p,ptrans,x,ip,jp,kp,misq,mjsq,mksq,mijsq)
+
+ if ((case .eq. 't_bbar') .or. (case .eq. 'bq_tpq')) then
+ call extend_trans(pold,p,ptrans,pext)
+ do j=1,mxpart
+ do nu=1,4
+ ptrans(j,nu)=pext(j,nu)
+ enddo
+ enddo
+ endif
+
+ call storeptilde(nd,ptrans)
+
+ do nu=1,4
+ vec(nu)=p(jp,nu)-pij/pik*p(kp,nu)
+ enddo
+ vecsq=-pij*pjk/pik
+ call subr_born(ptrans,msq)
+ call subr_corr(ptrans,vec,ip,msqv)
+
+ sub(qq)=-gsq/x/pij*(two/omx-one-x)
+ sub(gq)=-gsq/pij
+ sub(qg)=-gsq/x/pij*(one-two*x*omx)
+ sub(gg)=-2d0*gsq/x/pij*(x/omx+x*omx)
+ subv =+4d0*gsq/x/pij*omx/x/vecsq
+
+***********************************************************************
+*************************** INITIAL-FINAL *****************************
+***********************************************************************
+ elseif ((ip .le. 2) .and. (kp .gt. 2)) then
+ omx=-pjk/(pij+pik)
+ x=one-omx
+ u=pij/(pij+pik)
+ omu=pik/(pij+pik)
+
+C---determine mass of spectator
+c mksq=max(p(kp,4)**2-p(kp,1)**2-p(kp,2)**2-p(kp,3)**2,0d0)
+c if (mksq.gt.0d0) then
+c muksq=mksq/2d0/(-dot(p,ip,jp)-dot(p,ip,kp))
+c zp=omx/(omx+muksq)
+c else
+c zp=1d0
+c endif
+
+C---Modification so that only close to singular subtracted
+ if (u .gt. aif) goto 99
+
+C---npart is the number of particles in the final state
+C---transform the momenta so that only the first npart+1 are filled
+ call transform_mass(p,ptrans,x,ip,jp,kp,misq,mjsq,mksq,mijsq)
+
+ if ((case .eq. 't_bbar') .or. (case .eq. 'bq_tpq')) then
+ call extend_trans(pold,p,ptrans,pext)
+ do j=1,mxpart
+ do nu=1,4
+ ptrans(j,nu)=pext(j,nu)
+ enddo
+ enddo
+ endif
+
+ call storeptilde(nd,ptrans)
+ do nu=1,4
+ vec(nu)=p(jp,nu)/u-p(kp,nu)/omu
+ enddo
+ call subr_born(ptrans,msq)
+ call subr_corr(ptrans,vec,ip,msqv)
+ sub(qq)=-gsq/x/pij*(two/(omx+u)-one-x)
+ sub(gq)=-gsq/pij
+ sub(qg)=-gsq/x/pij*(one-two*x*omx)
+ sub(gg)=-2d0*gsq/x/pij*(one/(omx+u)-one+x*omx)
+ subv =-4d0*gsq/x/pij*(omx/x*u*(one-u)/pjk)
+***********************************************************************
+*************************** FINAL-INITIAL *****************************
+***********************************************************************
+ elseif ((ip .gt. 2) .and. (kp .le. 2)) then
+ do jproc=1,4
+ if ((jproc.eq.qq) .and. (qqproc .eqv. .false.)) goto 79
+ if ((jproc.eq.gq) .and. (gqproc .eqv. .false.)) goto 79
+ if ((jproc.eq.qg) .and. (qgproc .eqv. .false.)) goto 79
+ if ((jproc.eq.gg) .and. (ggproc .eqv. .false.)) goto 79
+
+ if (jproc.eq.qq) then
+ mijsq=mqsq
+c--- the masses of i and j have been switched
+ misq=mqsq
+ mjsq=0d0
+ elseif (jproc.eq.qg) then
+ go to 79
+ elseif (jproc.eq.gq) then
+ mijsq=0d0
+ misq=mqsq
+ mjsq=mqsq
+ elseif (jproc.eq.gg) then
+ goto 79
+ endif
+ omx=(mijsq-misq-mjsq-pij)/(pjk+pik)
+ x=one-omx
+
+c---Modification so that only close to singular subtracted
+ if (omx .gt. afi) goto 99
+
+ do nu=1,4
+ qij(nu)=p(ip,nu)+p(jp,nu)
+ q(nu)=qij(nu)+p(kp,nu)
+ enddo
+ qsq=q(4)**2-q(1)**2-q(2)**2-q(3)**2
+ qijsq=qij(4)**2-qij(1)**2-qij(2)**2-qij(3)**2
+ call transform_mass(p,ptrans,x,ip,jp,kp,misq,mjsq,mksq,mijsq)
+
+ if ((case .eq. 't_bbar') .or. (case .eq. 'bq_tpq')) then
+ call extend_trans(pold,p,ptrans,pext)
+ do j=1,mxpart
+ do nu=1,4
+ ptrans(j,nu)=pext(j,nu)
+ enddo
+ enddo
+ endif
+
+ call storeptilde(nd,ptrans)
+ z=pik/(pik+pjk)
+ omz=pjk/(pik+pjk)
+c--- note that musq is related to msq by musq = msq/(2pij_tilde.pa)
+c--- and 2pij_tilde.pa = (Qsq-mijsq)/x
+ zp=omx*(Qsq-mijsq)/x+mijsq+misq-mjsq
+ root=dsqrt(zp**2-4d0*misq*mjsq)
+ zm=(zp-root)/(2d0*(omx*(Qsq-mijsq)/x+mijsq))
+ zp=(zp+root)/(2d0*(omx*(Qsq-mijsq)/x+mijsq))
+
+ call subr_born(ptrans,msq)
+
+c do nu=1,4
+c vec(nu)=z*p(ip,nu)-omz*p(jp,nu)
+c enddo
+
+c call subr_corr(ptrans,vec,5,msqv)
+
+ if (jproc .eq. qq) then
+ sub(qq)=+gsq/x/(qijsq-mijsq)*(two/(omz+omx)-one-z-2d0*mqsq/pij)
+ elseif (jproc .eq. gq) then
+ sub(gq)=+gsq/x/(qijsq-mijsq)
+ subv =+4d0*gsq/x/qijsq/(qijsq-mijsq)
+ endif
+ 79 continue
+ enddo
+
+***********************************************************************
+**************************** FINAL-FINAL ******************************
+***********************************************************************
+ elseif ((ip .gt. 2) .and. (kp .gt. 2)) then
+c------Eq-(5.2)
+
+C----Form momentum vectors
+ y=pij/(pij+pjk+pik)
+ z=pik/(pjk+pik)
+ omz=one-z
+ omy=one-y
+ do nu=1,4
+C create 4-momentum of sum emitter+emittee
+ qij(nu)=p(ip,nu)+p(jp,nu)
+C create 4-momentum of sum emitter+emittee+spectator
+ q(nu)=qij(nu)+p(kp,nu)
+ enddo
+C and square them
+ Qsq=q(4)**2-q(1)**2-q(2)**2-q(3)**2
+ qijsq=qij(4)**2-qij(1)**2-qij(2)**2-qij(3)**2
+
+
+
+C---determine mass of spectator
+ mksq=max(p(kp,4)**2-p(kp,1)**2-p(kp,2)**2-p(kp,3)**2,0d0)
+ if (mksq.gt.0d0) then
+ muk=sqrt(mksq/qsq)
+ yp=(1d0-muk)/(1d0+muk)
+ else
+ yp=1d0
+ endif
+
+ if (y .gt. yp) then
+ write(6,*) 'Problems with phase space in dips_mass.f'
+ stop
+ endif
+
+C---Modification so that only close to singular subtracted
+ if (y .gt. aff*yp) then
+ incldip(nd)=.false.
+ go to 99
+ endif
+
+C---loop over the different possibilities which have different kineamtics
+ do jproc=1,4
+ if ((jproc.eq.qq) .and. (qqproc .eqv. .false.)) goto 80
+ if ((jproc.eq.gq) .and. (gqproc .eqv. .false.)) goto 80
+ if ((jproc.eq.qg) .and. (qgproc .eqv. .false.)) goto 80
+ if ((jproc.eq.gg) .and. (ggproc .eqv. .false.)) goto 80
+
+
+ if (jproc.eq.qq) then
+C q->qg
+ mijsq=mqsq
+c--- the masses of i and j have been switched
+ misq=mqsq
+ mjsq=0d0
+ elseif (jproc.eq.qg) then
+C q->gq
+ go to 80
+ elseif (jproc.eq.gq) then
+C g->qqbar
+ mijsq=0d0
+ misq=mqsq
+ mjsq=mqsq
+ elseif (jproc.eq.gg) then
+C g->gg
+ mijsq=0d0
+ misq=0d0
+ mjsq=0d0
+ endif
+
+
+ muisq=misq/Qsq
+ mujsq=mjsq/Qsq
+ muksq=mksq/Qsq
+ muijsq=mijsq/Qsq
+ muk=dsqrt(muksq)
+
+
+c viji=sqrt((1d0-muijsq-muisq)**2-4d0*mijsq*muisq)
+c . /(1d0-muijsq-muisq)
+c write(6,*) 'viji',viji
+c vijk=sqrt((one-qijsq/Qsq-muksq)**2-4d0*qijsq/Qsq*muksq)
+c . /(one-qijsq/Qsq-muksq)
+c write(6,*) vijk
+
+ viji=dsqrt(((1d0-mujsq-muisq-muksq)*y)**2-4d0*muisq*mujsq)
+ . /((1d0-mujsq-muisq-muksq)*y+2d0*muisq)
+
+ vijk=dsqrt((2d0*muksq+(1d0-mujsq-muisq-muksq)*omy)**2-4d0*muksq)
+ . /((1d0-mujsq-muisq-muksq)*omy)
+
+
+c ym=2d0*mui*muj/(1d0-muisq-mujsq-muksq)
+ yp=1d0-2d0*muk*(1d0-muk)/(1d0-muisq-mujsq-muksq)
+
+ zp=(2d0*muisq+(1d0-muisq-mujsq-muksq)*y)
+ . /(2d0*(muisq+mujsq+(1d0-muisq-mujsq-muksq)*y))
+ zm=zp*(1d0-viji*vijk)
+ zp=zp*(1d0+viji*vijk)
+C---calculate the ptrans-momenta
+ call transform_mass(p,ptrans,y,ip,jp,kp,misq,mjsq,mksq,mijsq)
+
+ if ((case .eq. 't_bbar') .or. (case .eq. 'bq_tpq')) then
+ call extend_trans(pold,p,ptrans,pext)
+ do j=1,mxpart
+ do nu=1,4
+ ptrans(j,nu)=pext(j,nu)
+ enddo
+ enddo
+ endif
+
+c write(6,*) 'Dipole ',nd, 'ptrans'
+c call writeout(ptrans)
+
+C have to enhance the store so that it works
+ call storeptilde(nd,ptrans)
+
+ ztmi=z-0.5d0+0.5d0*vijk
+ ztmj=omz-0.5d0+0.5d0*vijk
+
+ call subr_born(ptrans,msq)
+
+ do nu=1,4
+ vec(nu)=ztmi*p(ip,nu)-ztmj*p(jp,nu)
+ enddo
+
+ if (ip .lt. kp) then
+ call subr_corr(ptrans,vec,5,msqv)
+ else
+ call subr_corr(ptrans,vec,6,msqv)
+ endif
+
+ if (jproc .eq. qq) then
+ vtijk=sqrt((one-muijsq-muksq)**2-4d0*muijsq*muksq)
+ . /(one-muijsq-muksq)
+
+ sub(qq)=gsq/(qijsq-mijsq)*(two/(one-z*omy)
+ . -vtijk/vijk*(one+z+2d0*mqsq/pij))
+
+c write(6,*) 'velocities ratio, vtijk/vijk=',vtijk/vijk
+c write(6,*) 'sub(qq)=',sub(qq)
+C---debug
+c sub(qq)=gsq/pij*(two/(one-omz*omy)
+c . -(one+omz+2d0*mqsq/pij))
+C---debug
+ elseif (jproc .eq. gq) then
+ sub(gq)=gsq/(qijsq-mijsq)*(one-two*kappa*(zp*zm-mqsq/qijsq))
+ subv =+4d0*gsq/pij/pij
+ elseif (jproc .eq. gg) then
+ vijk=sqrt((one-qijsq/Qsq-muksq)**2-4d0*qijsq/Qsq*muksq)
+ . /(one-qijsq/Qsq-muksq)
+ sub(gg)=two*gsq/(qijsq-mijsq)*(one/(one-z*omy)+one/(one-omz*omy)
+ . -(two-kappa*zp*zm)/vijk)
+ subv =+4d0*gsq/(qijsq-mijsq)/pij/vijk
+ endif
+ 80 continue
+ enddo
+ endif
+
+c--- fall through to here, so that p retains the value it entered with
+ 99 continue
+
+ do j=1,mxpart
+ do nu=1,4
+ p(j,nu)=pold(j,nu)
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/dsigdy.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/dsigdy.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/dsigdy.f (revision 1338)
@@ -0,0 +1,20 @@
+ real*8 function dsigdy(x)
+ implicit real*8 (a-h,o-z)
+ include 'nyy.f'
+ real*8 sig(nyy),xyy(nyy),err
+ logical first
+ data first/.true./
+ save sig,xyy
+ if (first) then
+ first=.false.
+ open(unit=47,file='outw+.dat',status='old')
+ do ny=1,nyy
+ read(47,*) xyy(ny),sig(ny),err
+c write(6,*) xyy(ny),sig(ny)
+ enddo
+ close(unit=47)
+ endif
+ mpot=3
+ dsigdy=1d3*ddvdif(sig,xyy,nyy,x,mpot)
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/pdfset_old.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/pdfset_old.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/pdfset_old.f (revision 1338)
@@ -0,0 +1,229 @@
+ subroutine pdfset
+ implicit none
+ include 'nlooprun.f'
+ include 'pdfiset.f'
+ double precision amz
+ common/couple/amz
+
+ character *50 prefix
+ character *36 pdfstring
+ integer nset
+ common/prefix/nset,prefix
+ common/pdfstring/pdfstring
+
+
+ if (iset.eq.61) then
+ amz=0.1197d0
+ nlooprun=2
+ pdfstring='MRST2002 NLO'
+ elseif (iset.eq.62) then
+ amz=0.1154d0
+ nlooprun=3
+ pdfstring='MRST2002 NNLO'
+ elseif (iset.eq.49) then
+ amz=0.130d0
+ nlooprun=1
+ pdfstring='MRST2002 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+ elseif (iset.eq.71) then
+ amz=0.1205d0
+ nlooprun=2
+ pdfstring='MRST2004 NLO'
+ elseif (iset.eq.72) then
+ amz=0.1167d0
+ nlooprun=3
+ pdfstring='MRST2004 NNLO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.41) then
+ amz=0.119d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO'
+ elseif (iset.eq.42) then
+ amz=0.117d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO lower alphas'
+ elseif (iset.eq.43) then
+ amz=0.121d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO higher alphas'
+ elseif (iset.eq.44) then
+ amz=0.121d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO better fit to jet data'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.45) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO'
+ elseif (iset.eq.46) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO fast evolution'
+ elseif (iset.eq.47) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO slow evolution'
+ elseif (iset.eq.48) then
+ amz=0.1180d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO better fit to jet data'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.2) then !CTEQ4 NLO
+ amz=0.116d0
+ nlooprun=2
+ pdfstring='CTEQ4 NLO'
+ elseif (iset.eq.1) then !CTEQ4 LO
+ amz=0.132d0
+ nlooprun=1
+ pdfstring='CTEQ4 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.11) then !MRS98 NLO central gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO'
+ elseif (iset.eq.12) then !MRS98 NLO higher gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO higher gluon'
+ elseif (iset.eq.13) then !MRS98 NLO lower gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO lower gluon'
+ elseif (iset.eq.14) then !MRS98 NLO lower as
+ amz=0.1125
+ nlooprun=2
+ pdfstring='MRST98 NLO lower alphas'
+ elseif (iset.eq.15) then !MRS98 NLO higher as
+ amz=0.1225
+ nlooprun=2
+ pdfstring='MRST98 NLO higher alphas'
+ elseif (iset.eq.16) then !MRST98 LO central gluon
+ amz=0.125
+ nlooprun=1
+ pdfstring='MRST98 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.21) then
+ Call SetCtq5(1)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5M NLO'
+ elseif (iset.eq.22) then
+ Call SetCtq5(2)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5D NLO DIS'
+ elseif (iset .eq.23) then
+ Call SetCtq5(3)
+ amz=0.127d0
+ nlooprun=1
+ pdfstring='CTEQ5L LO'
+ elseif (iset .eq.24) then
+ Call SetCtq5(4)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HJ NLO large x gluon enhanced'
+ elseif (iset .eq.25) then
+ Call SetCtq5(5)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HQ NLO Heavy quark'
+ elseif (iset .eq.28) then
+ Call SetCtq5(8)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5M1 NLO improved'
+ elseif (iset .eq.29) then
+ Call SetCtq5(9)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HQ1 NLO improved'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.30) then !MRS99 NLO central gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 NLO'
+ elseif (iset.eq.31) then !MRS99 NLO higher gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 higher gluon'
+ elseif (iset.eq.32) then !MRS99 NLO lower gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 lower gluon'
+ elseif (iset.eq.33) then !MRS99 NLO lower as
+ amz=0.1125
+ nlooprun=2
+ pdfstring='MRST99 lower alphas'
+ elseif (iset.eq.34) then !MRS99 NLO higher as
+ amz=0.1225
+ nlooprun=2
+ pdfstring='MRST99 higher alphas'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset .eq.53) then
+ amz=0.118d0
+ Call SetCtq6(1)
+ nlooprun=2
+ pdfstring='CTEQ6M NLO'
+ elseif (iset.eq.51) then
+ amz=0.118d0
+ Call SetCtq6(3)
+ nlooprun=1
+ pdfstring='CTEQ6L LO'
+ elseif (iset.eq.52) then
+ amz=0.130d0
+ Call SetCtq6(4)
+ nlooprun=1
+ pdfstring='CTEQ6L1 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCC CCCCCCC
+CCCCC NEW: MSTW2008 CCCCCCC
+
+ elseif (iset.eq.90) then
+ amz=0.13939d0
+ nlooprun=1
+ pdfstring='MSTW2008 LO'
+ prefix = "Pdfdata/mstw2008/mstw2008lo"
+ elseif (iset.eq.91) then
+ amz=0.12018
+ nlooprun=2
+ pdfstring='MSTW2008 NLO'
+ prefix = "Pdfdata/mstw2008/mstw2008nlo"
+ elseif (iset.eq.92) then
+ amz=0.11707
+ nlooprun=3
+ pdfstring='MSTW2008 NNLO'
+ prefix = "Pdfdata/mstw2008/mstw2008nnlo"
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: ALEKHIN06
+
+ elseif (iset.eq.75) then
+ amz=0.1128d0
+ nlooprun=3
+ pdfstring='ALEKHIN 2006'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: ALEKHIN09
+
+ elseif (iset.eq.85) then
+ amz=0.1129d0
+ nlooprun=3
+ pdfstring='ALEKHIN 2009'
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+ else
+ write(6,*) 'Unimplemented distribution= ',iset
+
+ stop
+ endif
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/getptildejet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/getptildejet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/getptildejet.f (revision 1338)
@@ -0,0 +1,16 @@
+ subroutine getptildejet(nd,pjet)
+ include 'constants.f'
+ include 'npart.f'
+ include 'ptilde.f'
+ integer nd,i,j
+ double precision pjet(mxpart,4)
+
+ do j=1,4
+ do i=1,npart+2
+ pjet(i,j)=ptildejet(nd,i,j)
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/conserve.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/conserve.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/conserve.f (revision 1338)
@@ -0,0 +1,60 @@
+ subroutine conserve(p)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),dot
+ integer nu
+
+ do nu=1,4
+ write(6,*) nu,p(1,nu)+p(2,nu)+p(3,nu)+p(4,nu)+p(5,nu)+p(6,nu)
+ . +p(7,nu)
+ enddo
+ write(6,*) 'dot',1,1,dot(p,1,1),p(1,4),p(1,3),p(1,2),p(1,1)
+ write(6,*) 'dot',2,2,dot(p,2,2),p(2,4),p(2,3),p(2,2),p(2,1)
+ write(6,*) 'dot',3,3,dot(p,3,3),p(4,4),p(4,3),p(4,2),p(4,1)
+ write(6,*) 'dot',4,4,dot(p,4,4),p(3,4),p(3,3),p(3,2),p(3,1)
+ write(6,*) 'dot',5,5,dot(p,5,5),p(5,4),p(5,3),p(5,2),p(5,1)
+ write(6,*) 'dot',6,6,dot(p,6,6),p(6,4),p(6,3),p(6,2),p(6,1)
+ write(6,*) 'dot',7,7,dot(p,7,7),p(7,4),p(7,3),p(7,2),p(7,1)
+
+ write(6,*)
+
+ pause
+ return
+ end
+
+ subroutine conserve5(p)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),dot
+ integer nu
+ write(6,*)
+ do nu=1,4
+ write(6,*) 'sum',
+ & p(1,nu)+p(2,nu)+p(3,nu)+p(4,nu)+p(5,nu)+p(6,nu)+p(7,nu)
+ enddo
+ write(6,*) 'dot',1,1,dot(p,1,1)
+ write(6,*) 'dot',2,2,dot(p,2,2)
+ write(6,*) 'dot',4,4,dot(p,4,4)
+ write(6,*) 'dot',3,3,dot(p,3,3)
+ write(6,*) 'dot',5,5,dot(p,5,5)
+ write(6,*) 'dot',6,6,dot(p,6,6)
+ write(6,*) 'dot',7,7,dot(p,7,7)
+ write(6,*)
+
+ pause
+ return
+ end
+
+ subroutine conserve8(p)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4)
+ integer nu
+ write(6,*)
+ do nu=1,4
+ write(6,*) 'sum',
+ & p(1,nu)+p(2,nu)+p(3,nu)+p(4,nu)+p(5,nu)+p(6,nu)+p(7,nu)+p(8,nu)
+ enddo
+ pause
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/lfunctions.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/lfunctions.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/lfunctions.f (revision 1338)
@@ -0,0 +1,228 @@
+************************************************************************
+* Author: R.K. Ellis *
+* July, 1998/July 2005/June 2007 *
+************************************************************************
+
+ double complex function L0(x,y)
+ implicit none
+ include 'constants.f'
+ double complex Lnrat
+ double precision x,y,denom
+ denom=one-x/y
+ if (abs(denom) .lt. 1d-7) then
+ L0=-cone-dcmplx(denom*(half+denom/3d0))
+ else
+ L0=Lnrat(x,y)/dcmplx(denom)
+ endif
+ return
+ end
+
+ double complex function L1(x,y)
+ implicit none
+ include 'constants.f'
+ double precision x,y,denom
+ double complex L0
+ denom=one-x/y
+ if (abs(denom) .lt. 1d-7) then
+ L1=-half*cone-dcmplx(denom/3d0*(one+0.75d0*denom))
+ else
+ L1=(L0(x,y)+cone)/dcmplx(denom)
+ endif
+ return
+ end
+
+ double complex function L2(x,y)
+ implicit none
+ include 'constants.f'
+ double complex Lnrat
+ double precision x,y,r,denom
+ r=x/y
+ denom=one-r
+ if (abs(denom) .lt. 1d-7) then
+ L2=(dcmplx(10d0)+denom*(dcmplx(15d0)+dcmplx(18d0)*denom))
+ . /dcmplx(60d0)
+ else
+ L2=(Lnrat(x,y)-dcmplx(0.5d0*(r-1d0/r)))/dcmplx(denom)**3
+ endif
+ return
+ end
+
+ double complex function L0old(x,y)
+ implicit none
+ include 'constants.f'
+ double complex Lnrat
+ double precision x,y,denom
+ denom=one-x/y
+ L0old=Lnrat(x,y)/dcmplx(denom)
+ return
+ end
+
+
+ double complex function L1old(x,y)
+ implicit none
+ include 'constants.f'
+ double precision x,y,denom
+ double complex L0old
+ denom=one-x/y
+ L1old=(L0old(x,y)+cone)/dcmplx(denom)
+ return
+ end
+
+ double complex function Ls0(x1,y1,x2,y2)
+ implicit none
+ include 'constants.f'
+ double precision x1,x2,y1,y2,r1,r2
+ double complex Lsm1
+ r1=x1/y1
+ r2=x2/y2
+ Ls0=Lsm1(x1,y1,x2,y2)/dcmplx(one-r1-r2)
+ return
+ end
+
+ double complex function Ls1(x1,y1,x2,y2)
+ implicit none
+ include 'constants.f'
+ double precision x1,x2,y1,y2,r1,r2
+ double complex Ls0,L0
+ r1=x1/y1
+ r2=x2/y2
+ Ls1=(Ls0(x1,y1,x2,y2)+L0(x1,y1)+L0(x2,y2))/dcmplx(one-r1-r2)
+ return
+ end
+
+
+
+ double complex function Lsm1(x1,y1,x2,y2)
+ implicit none
+ include 'constants.f'
+ double precision x1,x2,y1,y2,r1,r2,omr1,omr2,ddilog
+ double complex dilog1,dilog2,Lnrat
+ r1=x1/y1
+ r2=x2/y2
+ omr1=one-r1
+ omr2=one-r2
+ if (omr1 .gt. one) then
+ dilog1=dcmplx(pisqo6-ddilog(r1))-Lnrat(x1,y1)*dcmplx(log(omr1))
+ else
+ dilog1=dcmplx(ddilog(omr1))
+ endif
+ if (omr2 .gt. one) then
+ dilog2=dcmplx(pisqo6-ddilog(r2))-Lnrat(x2,y2)*dcmplx(log(omr2))
+ else
+ dilog2=dcmplx(ddilog(omr2))
+ endif
+ lsm1=dilog1+dilog2+Lnrat(x1,y1)*Lnrat(x2,y2)-dcmplx(pisqo6)
+ return
+ end
+
+ double complex function Lsm1_2mh(s,t,m1sq,m2sq)
+ implicit none
+ include 'constants.f'
+ double precision s,t,m1sq,m2sq
+ double complex lsm1_2mht,I3m
+ Lsm1_2mh=Lsm1_2mht(s,t,m1sq,m2sq)
+ & +(half*(s-m1sq-m2sq)+m1sq*m2sq/t)*I3m(s,m1sq,m2sq)
+ return
+ end
+
+ double complex function Lsm1_2mht(s,t,m1sq,m2sq)
+ implicit none
+ include 'constants.f'
+ double precision s,t,m1sq,m2sq,ddilog,r1,r2,omr1,omr2
+ double complex Lnrat,dilog1,dilog2
+ r1=m1sq/t
+ r2=m2sq/t
+ omr1=one-r1
+ omr2=one-r2
+
+ if (omr1 .gt. one) then
+ dilog1=dcmplx(pisqo6-ddilog(r1))-Lnrat(-m1sq,-t)*dcmplx(log(omr1))
+ else
+ dilog1=dcmplx(ddilog(omr1))
+ endif
+ if (omr2 .gt. one) then
+ dilog2=dcmplx(pisqo6-ddilog(r2))-Lnrat(-m2sq,-t)*dcmplx(log(omr2))
+ else
+ dilog2=dcmplx(ddilog(omr2))
+ endif
+ lsm1_2mht=-dilog1-dilog2
+ & +half*(Lnrat(-s,-m1sq)*Lnrat(-s,-m2sq)-Lnrat(-s,-t)**2)
+ return
+ end
+
+
+ double complex function Lsm1_2me(s,t,m1sq,m3sq)
+ implicit none
+c---- formula taken from G.~Duplancic and B~Nizic [arXiv:hep-ph/0006249 v2]
+c---- Eq 71
+c---- Lsm1_2me notation follows from
+c---- Z.~Bern, L.~J.~Dixon and D.~A.~Kosower,
+c---- %``Dimensionally regulated pentagon integrals,''
+c---- Nucl.\ Phys.\ B {\bf 412}, 751 (1994)
+c---- [arXiv:hep-ph/9306240].
+c---- %%CITATION = HEP-PH 9306240;%%
+c---- Eqs. (I.13)
+C---- analytic continuation has been checked by calculating numerically.
+ include 'constants.f'
+ integer j
+ double precision s,t,m1sq,m3sq,ddilog,arg(4),omarg(4),f2me,htheta
+ double complex Li2(4),wlog(4)
+C--- define Heaviside theta function (=1 for x>0) and (0 for x < 0)
+ htheta(s)=half+half*sign(one,s)
+
+ f2me=(s+t-m1sq-m3sq)/(s*t-m1sq*m3sq)
+
+ arg(1)=f2me*s
+ arg(2)=f2me*t
+ arg(3)=f2me*m1sq
+ arg(4)=f2me*m3sq
+
+ do j=1,4
+ omarg(j)=one-arg(j)
+ wlog(j)=log(abs(arg(j)))
+ . +impi*dcmplx(htheta(-arg(j))*sign(one,f2me))
+ if (omarg(j) .gt. one) then
+ Li2(j)=dcmplx(pisqo6-ddilog(arg(j)))
+ . -wlog(j)*dcmplx(log(omarg(j)))
+ else
+ Li2(j)=dcmplx(ddilog(omarg(j)))
+ endif
+ enddo
+ Lsm1_2me=Li2(1)+Li2(2)-Li2(3)-Li2(4)
+
+ return
+ end
+
+c double complex function Lsm1_2me(s,t,m1sq,m3sq)
+c implicit none
+c include 'constants.f'
+c integer j
+c double precision s,t,m1sq,m3sq,ddilog,arg(5),omarg(5)
+c double complex Lnrat,Li2(5),wlog(5)
+c arg(1)=m1sq/s
+c wlog(1)=Lnrat(-m1sq,-s)
+
+c arg(2)=m1sq/t
+c wlog(2)=Lnrat(-m1sq,-t)
+
+c arg(3)=m3sq/s
+c wlog(3)=Lnrat(-m3sq,-s)
+
+c arg(4)=m3sq/t
+c wlog(4)=Lnrat(-m3sq,-t)
+
+c arg(5)=arg(1)*arg(4)
+c wlog(5)=Lnrat(-m1sq,-s)+Lnrat(-m3sq,-t)
+
+c do j=1,5
+c omarg(j)=one-arg(j)
+c if (omarg(j) .gt. one) then
+c Li2(j)=dcmplx(pisqo6-ddilog(arg(j)))-wlog(j)*log(omarg(j))
+c else
+c Li2(j)=dcmplx(ddilog(omarg(j)))
+c endif
+c enddo
+c Lsm1_2me=Li2(5)-Li2(1)-Li2(2)-Li2(3)-Li2(4)-half*Lnrat(-s,-t)**2
+c return
+c end
+
Index: dynnlo-v1.5-applgrid/src/Need/itransform.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/itransform.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/itransform.f (revision 1338)
@@ -0,0 +1,44 @@
+ subroutine itransform(p,tp,x,ip,jp,kp)
+************************************************************************
+* Author: R.K. Ellis *
+* July, 1998. *
+* Given p ((n+1)-phase space) produce tp (n-phase space) *
+* by creating jp *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'npart.f'
+ double precision p(mxpart,4),tp(mxpart,4),k(4),kt(4),ks(4),
+ . kDp(3:mxpart),ksDp(3:mxpart),kDk,ksDks,x
+ integer ip,kp,j,nu,jp
+
+ do nu=1,4
+ tp(ip,nu)=x*p(ip,nu)
+ tp(kp,nu)=p(kp,nu)
+c---just so it is non-zero
+ tp(jp,nu)=p(jp,nu)
+
+ k(nu) =-p(ip,nu)-p(kp,nu)-p(jp,nu)
+ kt(nu) =-tp(ip,nu)-tp(kp,nu)
+ ks(nu)=k(nu)+kt(nu)
+ enddo
+
+ kDk=k(4)**2-k(1)**2-k(2)**2-k(3)**2
+ ksDks=ks(4)**2-ks(1)**2-ks(2)**2-ks(3)**2
+
+
+ do j=3,npart+2
+ if (j .eq. jp) goto 20
+ kDp(j)=k(4)*p(j,4)-k(1)*p(j,1)-k(2)*p(j,2)-k(3)*p(j,3)
+ ksDp(j)=ks(4)*p(j,4)-ks(1)*p(j,1)-ks(2)*p(j,2)-ks(3)*p(j,3)
+
+ do nu=1,4
+ tp(j,nu)=p(j,nu)-two*ksDp(j)*ks(nu)/ksDks+two*kDp(j)*kt(nu)/kDk
+ enddo
+ 20 continue
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/spinork.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/spinork.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/spinork.f (revision 1338)
@@ -0,0 +1,48 @@
+ subroutine spinork(N,p,zabikj,zbaikj,k)
+c---Calculate spinor products dotted in with a vector k
+c---extended to deal with negative energies ie with all momenta outgoing
+C zabikj=<i-|k|j-> zbaikj=<i+|k|j+>
+c---Arbitrary conventions of Bern, Dixon, Kosower, Weinzierl,
+c---za(i,j)*zb(j,i)=s(i,j)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),rt(mxpart),k(4),kp,km,flip(mxpart)
+ double complex pr(mxpart),pl(mxpart),f(mxpart),kr,kl,
+ & zabikj(mxpart,mxpart),zbaikj(mxpart,mxpart)
+ integer i,j,N
+
+C--setup components for vector which is contracted in
+ kp=+k(4)+k(1)
+ km=+k(4)-k(1)
+ kr=dcmplx(+k(3),-k(2))
+ kl=dcmplx(+k(3),+k(2))
+
+c---if one of the vectors happens to be zero this routine fails.
+ do j=1,N
+C-----positive energy case
+ if (p(j,4) .gt. 0d0) then
+ flip(j)=1d0
+ f(j)=cone
+ else
+ flip(j)=-1d0
+ f(j)=im
+ endif
+ rt(j)=dsqrt(flip(j)*(p(j,4)+p(j,1)))
+ pr(j)=dcmplx(flip(j)*p(j,3),-flip(j)*p(j,2))
+ pl(j)=Dconjg(pr(j))
+ enddo
+ do i=1,N
+ do j=1,i
+ zabikj(i,j)=f(i)*f(j)
+ & *(pr(i)*pl(j)*dcmplx(kp/(rt(i)*rt(j)))
+ & -pr(i)*kl*dcmplx(rt(j)/rt(i))
+ & -dcmplx(rt(i)/rt(j))*kr*pl(j)+dcmplx(rt(i)*rt(j)*km))
+ zbaikj(j,i)=zabikj(i,j)
+ zabikj(j,i)=flip(i)*flip(j)*Dconjg(zabikj(i,j))
+ zbaikj(i,j)=flip(i)*flip(j)*Dconjg(zbaikj(j,i))
+
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/pdfset.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/pdfset.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/pdfset.f (revision 1338)
@@ -0,0 +1,284 @@
+ subroutine pdfset
+ implicit none
+ include 'nlooprun.f'
+ include 'pdfiset.f'
+ double precision amz
+ common/couple/amz
+
+ character *50 prefix
+ character *36 pdfstring
+ integer nset,NREP
+ character nnpdfgrid*100
+ common/prefix/nset,prefix
+ common/pdfstring/pdfstring
+
+
+ if (iset.eq.61) then
+ amz=0.1197d0
+ nlooprun=2
+ pdfstring='MRST2002 NLO'
+ elseif (iset.eq.62) then
+ amz=0.1154d0
+ nlooprun=3
+ pdfstring='MRST2002 NNLO'
+ elseif (iset.eq.49) then
+ amz=0.130d0
+ nlooprun=1
+ pdfstring='MRST2002 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+ elseif (iset.eq.71) then
+ amz=0.1205d0
+ nlooprun=2
+ pdfstring='MRST2004 NLO'
+ elseif (iset.eq.72) then
+ amz=0.1167d0
+ nlooprun=3
+ pdfstring='MRST2004 NNLO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.41) then
+ amz=0.119d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO'
+ elseif (iset.eq.42) then
+ amz=0.117d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO lower alphas'
+ elseif (iset.eq.43) then
+ amz=0.121d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO higher alphas'
+ elseif (iset.eq.44) then
+ amz=0.121d0
+ nlooprun=2
+ pdfstring='MRST2001 NLO better fit to jet data'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.45) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO'
+ elseif (iset.eq.46) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO fast evolution'
+ elseif (iset.eq.47) then
+ amz=0.1155d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO slow evolution'
+ elseif (iset.eq.48) then
+ amz=0.1180d0
+ nlooprun=3
+ pdfstring='MRST2001 NNLO better fit to jet data'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.2) then !CTEQ4 NLO
+ amz=0.116d0
+ nlooprun=2
+ pdfstring='CTEQ4 NLO'
+ elseif (iset.eq.1) then !CTEQ4 LO
+ amz=0.132d0
+ nlooprun=1
+ pdfstring='CTEQ4 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.11) then !MRS98 NLO central gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO'
+ elseif (iset.eq.12) then !MRS98 NLO higher gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO higher gluon'
+ elseif (iset.eq.13) then !MRS98 NLO lower gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST98 NLO lower gluon'
+ elseif (iset.eq.14) then !MRS98 NLO lower as
+ amz=0.1125
+ nlooprun=2
+ pdfstring='MRST98 NLO lower alphas'
+ elseif (iset.eq.15) then !MRS98 NLO higher as
+ amz=0.1225
+ nlooprun=2
+ pdfstring='MRST98 NLO higher alphas'
+ elseif (iset.eq.16) then !MRST98 LO central gluon
+ amz=0.125
+ nlooprun=1
+ pdfstring='MRST98 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.21) then
+ Call SetCtq5(1)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5M NLO'
+ elseif (iset.eq.22) then
+ Call SetCtq5(2)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5D NLO DIS'
+ elseif (iset .eq.23) then
+ Call SetCtq5(3)
+ amz=0.127d0
+ nlooprun=1
+ pdfstring='CTEQ5L LO'
+ elseif (iset .eq.24) then
+ Call SetCtq5(4)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HJ NLO large x gluon enhanced'
+ elseif (iset .eq.25) then
+ Call SetCtq5(5)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HQ NLO Heavy quark'
+ elseif (iset .eq.28) then
+ Call SetCtq5(8)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5M1 NLO improved'
+ elseif (iset .eq.29) then
+ Call SetCtq5(9)
+ amz=0.118d0
+ nlooprun=2
+ pdfstring='CTEQ5HQ1 NLO improved'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.30) then !MRS99 NLO central gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 NLO'
+ elseif (iset.eq.31) then !MRS99 NLO higher gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 higher gluon'
+ elseif (iset.eq.32) then !MRS99 NLO lower gluon
+ amz=0.1175
+ nlooprun=2
+ pdfstring='MRST99 lower gluon'
+ elseif (iset.eq.33) then !MRS99 NLO lower as
+ amz=0.1125
+ nlooprun=2
+ pdfstring='MRST99 lower alphas'
+ elseif (iset.eq.34) then !MRS99 NLO higher as
+ amz=0.1225
+ nlooprun=2
+ pdfstring='MRST99 higher alphas'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset .eq.53) then
+ amz=0.118d0
+ Call SetCtq6(1)
+ nlooprun=2
+ pdfstring='CTEQ6M NLO'
+ elseif (iset.eq.51) then
+ amz=0.118d0
+ Call SetCtq6(3)
+ nlooprun=1
+ pdfstring='CTEQ6L LO'
+ elseif (iset.eq.52) then
+ amz=0.130d0
+ Call SetCtq6(4)
+ nlooprun=1
+ pdfstring='CTEQ6L1 LO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ elseif (iset.eq.55) then
+ amz=0.118d0
+ Call SetCtq6(400)
+ nlooprun=2
+ pdfstring='CTEQ6.6M NLO'
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCCC CCCCCCC
+CCCCC NEW: MSTW2008 CCCCCCC
+
+ elseif (iset.eq.90) then
+ amz=0.13939d0
+ nlooprun=1
+ pdfstring='MSTW2008 LO'
+ prefix = "Pdfdata/mstw2008/mstw2008lo"
+ elseif (iset.eq.91) then
+ amz=0.12018
+ nlooprun=2
+ pdfstring='MSTW2008 NLO'
+ prefix = "Pdfdata/mstw2008/mstw2008nlo"
+ elseif (iset.eq.92) then
+ amz=0.11707
+ nlooprun=3
+ pdfstring='MSTW2008 NNLO'
+ prefix = "Pdfdata/mstw2008/mstw2008nnlo"
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: ALEKHIN06
+
+ elseif (iset.eq.75) then
+ amz=0.1128d0
+ nlooprun=3
+ pdfstring='ALEKHIN 2006'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: ALEKHIN09
+
+ elseif (iset.eq.76) then
+ amz=0.1129d0
+ nlooprun=3
+ pdfstring='ALEKHIN 2009'
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: NNPDF 2.0
+
+ elseif (iset.eq.80) then
+ nnpdfgrid="Pdfdata/NNPDF20_100.grid"
+ call InitNNPDFwrap(nnpdfgrid,NREP)
+ amz=0.119d0
+ nlooprun=2
+ pdfstring='NNPDF 2.0'
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: REYA08 LO
+
+ elseif (iset.eq.65) then
+ Call GJR08VFNSinit
+ amz=0.1263d0
+ nlooprun=1
+ pdfstring='GJR08VF LO'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: REYA08 NLO
+
+ elseif (iset.eq.66) then
+ Call GJR08VFNSinit
+ amz=0.1145d0
+ nlooprun=2
+ pdfstring='GJR08VF NLO'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+CCCC
+CCCC NEW: REYA09 NNLO
+
+ elseif (iset.eq.67) then
+ Call JR09VFNNLOinit
+ amz=0.1124d0
+ nlooprun=3
+ pdfstring='JR09VF NNLO'
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+ else
+ write(6,*) 'Unimplemented distribution= ',iset
+
+ stop
+ endif
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/a09.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/a09.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/a09.f (revision 1338)
@@ -0,0 +1,341 @@
+ subroutine a09(xb,q2,PDFS,DPDFS,NFLV,IPAR)
+c
+c This is a code for the 3-, 4-, and 5-flavour NNLO nucleon parton
+c distributions generated from the fit [arXiv:09xx.xxxx]
+c using the matching conditions of [Eur.Phys.J.C1:301-320,1998]
+c with account of their uncertainties.
+c
+c The Q**2 range is 0.8d0 < Q**2 < 2d8, the x range is 1d-7 < x < 1d0.
+c
+c Input parameters:
+c XB is the parton momentum fraction
+c Q2 is the factorization scale
+c NFLV selects the PDFs sets with different number of flavours (3, 4, or 5)
+c IPAR controls output of the PDFs and \alpha_s uncertaintis (see
+c description of the output parameters below)
+
+c Output parameters:
+c The array PDFS contains fitted values of the strong coupling constant
+c and the parton distributions at given x and Q:
+c PDFS(0) -- \alpha_s
+c PDFS(1) -- valence u-quarks
+c PDFS(2) -- valence d-quarks
+c PDFS(3) -- gluons
+c PDFS(4) -- sea u-quarks
+c PDFS(5) -- s-quarks
+c PDFS(6) -- sea d-quarks
+c PDFS(7) -- c-quarks
+c PDFS(8) -- b-quarks
+c Output array DPDFS(0:8,NVAR) contains derivatives of \alpha_s and
+c the PDFs on the parameters corresponding to the independent
+c sources of the uncertainties, NVAR is the number of these sources,
+c equal to 25 in the current version. The input parameter IPAR is used to
+c optimize performance fo the code. If IPAR=0, no
+c uncertainties are returned in DPDFS; if 0<IPAR<=NVAR, only
+c the uncertainty due to the IPAR-th source is returned; if IPAR<0
+c all uncertainties for the sources from 1 to NVAR are returned.
+c Using derivatives returned in DPDFS one can take into account the
+c correlations between different PDFs and between PDFs and \alpha_s.
+c All derivatives are transformed to the orthonormal basis of eigenvectors
+c of the parameters error matrix therefore variation of the PDFs by
+c the values of DPDFS is performed independently. For example,
+c after the call of A09 with IPAR=-1 the dispersion of the i-th PDF can
+c be stored in DELPDF using the code
+c
+c-----------------
+c DELPDF=0.
+c do k=1,nvar
+c DELPDF=DELPDF+dpdfs(i,k)**2
+c end do
+c-----------------
+c and its random value can be stored in RPDF using the code
+c-----------------
+c RPDF=pdfs(i)
+c do k=1,nvar
+c s=0.
+c do l=1,96
+c s=s+(2*rndm(xxx)-1)/sqrt(32.)
+c end do
+c RPDF=RPDF+s*dpdfs(i,k)
+c end do
+c-----------------
+c Comments: Sergey.Alekhin@ihep.ru
+c
+c Initial version: Jul 2009
+
+ implicit none
+
+ integer nxb,nq,np,nvar
+ parameter(nxb=99,nq=20,np=8,nvar=25)
+
+ integer k,i,n,m,kx,nxbb
+ integer NPDF,NFLV
+
+ real*8 f(nxb,nq+1,0:np),xx(nxb)
+ real*8 fsp(nxb),bs(nxb),cs(nxb),ds(nxb)
+ real*8 bsp(nxb,nq+1,0:np),csp(nxb,nq+1,0:np),dsp(nxb,nq+1,0:np)
+ real*8 bspd(nvar,nxb,nq+1,0:np),cspd(nvar,nxb,nq+1,0:np)
+ , ,dspd(nvar,nxb,nq+1,0:np)
+ real*8 pdfs(0:np),dpdfs(0:np,nvar)
+ real*8 df(nvar,0:np,nxb,nq+1)
+ real*8 x,qsq,dels,delx,x1,delx1,xlog1,xd,b,aa,ss,f0,fp,fm
+ real*8 xb,q2,df0,dfp,dfm
+
+ character pdford*1
+ dimension pdford(3)
+
+ real*8 xmin,xmax,qsqmin,qsqmax
+ integer nflvs,npar1,npar2,ipar
+ integer lnblnk
+
+c I/O channel to read the data
+ integer nport
+ character locdir*128
+ data nport/1/
+
+ data pdford/'3','4','5'/
+ data xmin,xmax,qsqmin,qsqmax/1d-7,1d0,0.8d0,2d8/
+ data NFLVS /-1/
+
+ save nflvs,f,df,dels,delx,x1,delx1,xlog1,nxbb,xx
+
+c put in your local address of the PDFs files in LOCDIR
+ data locdir /' '/
+c or in the system variable GRIDS
+ CALL GETENV( 'GRIDS', locdir )
+ locdir=locdir(:LNBLNK(locdir))//'pdfs/a09/'
+
+ npdf=nflv+3
+
+ if (ipar.gt.nvar) write(*,*) 'Wrong call of the PDFs uncertainty'
+
+ if (ipar.eq.0) then
+ npar1=0
+ npar2=0
+ end if
+ if (ipar.ge.0) then
+ npar1=ipar
+ npar2=ipar
+ end if
+ if (ipar.lt.0) then
+ npar1=1
+ npar2=nvar
+ end if
+
+ if (nflvs.eq.nflv) goto 10
+
+ nflvs=nflv
+
+ dels=(dlog(dlog(qsqmax/0.04d0))-
+ + dlog(dlog(qsqmin/0.04d0)))/dble(nq-1)
+
+ nxbb=nxb/2
+ x1=0.3d0
+ xlog1=dlog(x1)
+ delx=(dlog(x1)-dlog(xmin))/dble(nxbb-1)
+ DELX1=(1.d0-x1)**2/dble(nxbb+1)
+
+*...X GRID
+ do kx=1,nxbb
+ xx(kx)=dexp(dlog(xmin)+delx*dble(kx-1))
+ end do
+ do kx=nxbb+1,nxb-1
+ xx(kx)=1.d0-dsqrt(dabs((1.d0-x1)**2-delx1*dble(kx-nxbb)))
+ end do
+ xx(nxb)=1d0
+
+*...Read input tables
+ print *,'***** Reading PDFs from tables *****'
+ open(unit=nport,status='old'
+ , ,file='Pdfdata/a09.dpdfs_'//pdford(nflv-2))
+ do n=1,nxb-1
+ do m=1,nq
+ do i=0,npdf
+ read (nport,*) (df(k,i,n,m),k=1,nvar)
+ end do
+ end do
+ end do
+ close(unit=nport)
+
+ do k=1,nvar
+ do i=0,npdf
+ do m=1,nq
+ if (i.ne.0) then
+ df(k,i,nxb,m)=0d0
+ else
+ df(k,i,nxb,m)=df(k,i,nxb-1,m)
+ end if
+ do n=1,nxb
+ fsp(n)=df(k,i,n,m)
+ end do
+ call spline (nxb,xx,fsp,bs,cs,ds)
+ do n=1,nxb
+ bspd(k,n,m,i)=bs(n)
+ cspd(k,n,m,i)=cs(n)
+ dspd(k,n,m,i)=ds(n)
+ end do
+ end do
+ end do
+ end do
+
+ open(unit=nport,status='old',err=199
+ , ,file='Pdfdata/a09.pdfs_'//pdford(nflv-2))
+ do n=1,nxb-1
+ do m=1,nq
+ read(nport,*) (f(n,m,i),i=0,npdf)
+ end do
+ end do
+ do i=0,npdf
+ do m=1,nq
+ if (i.ne.0) then
+ f(nxb,m,i)=0d0
+ else
+ f(nxb,m,i)=f(nxb-1,m,i)
+ end if
+ do n=1,nxb-1
+ f(n,m,i)=f(n,m,i)
+ end do
+ do n=1,nxb
+ fsp(n)=f(n,m,i)
+ end do
+ call spline (nxb,xx,fsp,bs,cs,ds)
+ do n=1,nxb
+ bsp(n,m,i)=bs(n)
+ csp(n,m,i)=cs(n)
+ dsp(n,m,i)=ds(n)
+ end do
+ end do
+ end do
+ close(unit=nport)
+
+ 10 continue
+
+ if((q2.lt.qsqmin).or.(q2.gt.qsqmax)) then
+ print 99,q2,qsqmin,qsqmax
+ return
+ end if
+ if((xb.lt.xmin).or.(xb.gt.xmax)) then
+ print 98,xb,xmin,xmax
+ return
+ end if
+ 99 format(' AGRIDS WARNING: Q^2 VALUE IS OUT OF RANGE ',3g12.3)
+ 98 format(' AGRIDS WARNING: X VALUE IS OUT OF RANGE ',3g12.3)
+
+ x=max(xb,xmin)
+ x=min(xb,xmax)
+ qsq=max(q2,qsqmin)
+ qsq=min(q2,qsqmax)
+
+ if (x.gt.x1) then
+ xd=(1d0-x1)**2-(1d0-x)**2
+ n=int(xd/delx1)+nxbb
+ else
+ xd=dlog(x)-xlog1
+ n=nxbb+int(xd/DELX)-1
+ end if
+ aa=x-xx(n)
+
+ ss=dlog(dlog(qsq/0.04d0))-dlog(dlog(qsqmin/0.04d0))
+ m=int(ss/dels)+1
+ b=ss/dels-dble(m)+1.d0
+
+ do i=0,npdf
+ f0=f(n,m,i) + aa*bsp(n,m,i) + aa**2*csp(n,m,i)
+ + + aa**3*dsp(n,m,i)
+ fp=f(n,m+1,i) + aa*bsp(n,m+1,i) + aa**2*csp(n,m+1,i)
+ + + aa**3*dsp(n,m+1,i)
+ if (m.ge.2) then
+ fm=f(n,m-1,i) + aa*bsp(n,m-1,i) + aa**2*csp(n,m-1,i)
+ + +aa**3*dsp(n,m-1,i)
+ pdfs(i)=fm*b*(b-1d0)/2d0 + f0*(1d0-b**2) + fp*b*(b+1d0)/2d0
+ else
+ pdfs(i)= f0*(1d0-b) + fp*b
+ end if
+ if (npar1.gt.0) then
+ do k=npar1,npar2
+ df0=df(k,i,n,m) + aa*bspd(k,n,m,i) + aa**2*cspd(k,n,m,i)
+ + + aa**3*dspd(k,n,m,i)
+ dfp=df(k,i,n,m+1)+aa*bspd(k,n,m+1,i)+aa**2*cspd(k,n,m+1,i)
+ + + aa**3*dspd(k,n,m+1,i)
+ if (m.ge.2) then
+ dfm=df(k,i,n,m-1)+aa*bspd(k,n,m-1,i)+aa**2*cspd(k,n,m-1,i)
+ + + aa**3*dspd(k,n,m-1,i)
+ dpdfs(i,k)=dfm*b*(b-1d0)/2d0
+ + + df0*(1d0-b**2) +dfp*b*(b+1d0)/2d0
+ else
+ dpdfs(i,k) = df0*(1d0-b) + dfp*b
+ end if
+ end do
+ end if
+ end do
+
+ return
+
+ 199 print *,'The PDFs set is inavailable'
+
+ return
+ end
+* ---------------------------------------------------------------------
+ SUBROUTINE SPLINE(N,X,Y,B,C,D)
+* ---------------------------------------------------------------------
+* CALCULATE THE COEFFICIENTS B,C,D IN A CUBIC SPLINE INTERPOLATION.
+* INTERPOLATION SUBROUTINES ARE TAKEN FROM
+* G.E. FORSYTHE, M.A. MALCOLM AND C.B. MOLER,
+* COMPUTER METHODS FOR MATHEMATICAL COMPUTATIONS (PRENTICE-HALL, 1977).
+*
+ IMPLICIT REAL*8(A-H,O-Z)
+
+ DIMENSION X(N), Y(N), B(N), C(N), D(N)
+*
+ NM1=N-1
+ IF(N.LT.2) RETURN
+ IF(N.LT.3) GO TO 250
+ D(1)=X(2)-X(1)
+ C(2)=(Y(2)-Y(1))/D(1)
+ DO 210 K=2,NM1
+ D(K)=X(K+1)-X(K)
+ B(K)=2.0D0*(D(K-1)+D(K))
+ C(K+1)=(Y(K+1)-Y(K))/D(K)
+ C(K)=C(K+1)-C(K)
+ 210 CONTINUE
+ B(1)=-D(1)
+ B(N)=-D(N-1)
+ C(1)=0.0D0
+ C(N)=0.0D0
+ IF(N.EQ.3) GO TO 215
+ C(1)=C(3)/(X(4)-X(2))-C(2)/(X(3)-X(1))
+ C(N)=C(N-1)/(X(N)-X(N-2))-C(N-2)/(X(N-1)-X(N-3))
+ C(1)=C(1)*D(1)**2.0D0/(X(4)-X(1))
+ C(N)=-C(N)*D(N-1)**2.0D0/(X(N)-X(N-3))
+ 215 CONTINUE
+ DO 220 K=2,N
+ T=D(K-1)/B(K-1)
+ B(K)=B(K)-T*D(K-1)
+ C(K)=C(K)-T*C(K-1)
+ 220 CONTINUE
+ C(N)=C(N)/B(N)
+ DO 230 IB=1,NM1
+ K=N-IB
+ C(K)=(C(K)-D(K)*C(K+1))/B(K)
+ 230 CONTINUE
+ B(N)=(Y(N)-Y(NM1))/D(NM1)
+ 1 +D(NM1)*(C(NM1)+2.0D0*C(N))
+ DO 240 K=1,NM1
+ B(K)=(Y(K+1)-Y(K))/D(K)
+ 1 -D(K)*(C(K+1)+2.0D0*C(K))
+ D(K)=(C(K+1)-C(K))/D(K)
+ C(K)=3.0D0*C(K)
+ 240 CONTINUE
+ C(N)=3.0D0*C(N)
+ D(N)=D(N-1)
+ RETURN
+ 250 CONTINUE
+ B(1)=(Y(2)-Y(1))/(X(2)-X(1))
+ C(1)=0.0D0
+ D(1)=0.0D0
+ B(2)=B(1)
+ C(2)=0.0D0
+ D(2)=0.0D0
+ RETURN
+ END
+
Index: dynnlo-v1.5-applgrid/src/Need/storedip.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/storedip.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/storedip.f (revision 1338)
@@ -0,0 +1,29 @@
+ subroutine storedip(msq_dip,msq_dipv,dsub,dsubv,
+ . sub_dip,sub_dipv,n)
+c--- this routine transfers the information on the colour
+c--- structure from a common block into separate arrays for
+c--- each parton configuration
+ implicit none
+ include 'constants.f'
+ include 'msq_cs.f'
+ include 'msqv_cs.f'
+ integer i,j,k,n
+ double precision msq_dip(6,0:2,-nf:nf,-nf:nf),dsub(4),sub_dip(6,4)
+ . ,msq_dipv(6,0:2,-nf:nf,-nf:nf),dsubv,sub_dipv(6)
+
+ do i=0,2
+ do j=-nf,nf
+ do k=-nf,nf
+ msq_dip(n,i,j,k)=msq_cs(i,j,k)
+ msq_dipv(n,i,j,k)=msqv_cs(i,j,k)
+ enddo
+ enddo
+ enddo
+
+ do i=1,4
+ sub_dip(n,i)=dsub(i)
+ enddo
+ sub_dipv(n)=dsubv
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/pdf_old2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/pdf_old2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/pdf_old2.f (revision 1338)
@@ -0,0 +1,7297 @@
+ SUBROUTINE fdist(ih,x,q,fx)
+ implicit none
+
+ include 'pdfiset.f'
+ include 'constants.f'
+ real * 8 FX(-nf:nf)
+ REAL * 8 X,Q,Q2,DUV,DDV,DDEL,DUDB,DSB,DGL,CHR,BOT,UB,DB,DQ1
+ REAL * 8 BBAR,CBAR,DSBAR,PHOT
+ REAL * 8 ctq4fn,ctq5pdf,ctq6pdf
+
+C For Alekhin pdfs
+
+ real*8 pdfs09(0:8),dpdfs09(0:8,25)
+ real*8 pdfs06(0:9),dpdfs06(0:9,23)
+C
+C For Reya pdfs
+ double precision JR09VFNNLOxuv,JR09VFNNLOxdv,JR09VFNNLOxgl,
+ & JR09VFNNLOxub,JR09VFNNLOxdb,JR09VFNNLOxsb,
+ & JR09VFNNLOxcb,JR09VFNNLOxbb,
+ & JR09VFNNLOalphas,
+ & xuv(-13:13),xdv(-13:13),xgl(-13:13),xub(-13:13),
+ & xdb(-13:13),xsb(-13:13),xcb(-13:13),xbb(-13:13),
+ & alphas(-13:13),
+ & exuv,exdv,exgl,exub,exdb,exsb,excb,exbb,ealphas
+ double precision GJR08VFNSxuv,GJR08VFNSxdv,GJR08VFNSxgl,
+ & GJR08VFNSxub,GJR08VFNSxdb,GJR08VFNSxsb,
+ & GJR08VFNSxcb,GJR08VFNSxbb,
+ & GJR08VFNSalphas
+C
+ integer j,mode,ih
+ integer NPDF,NPAR
+
+ character *50 prefix,prefix1
+ integer nset
+ common/prefix/nset,prefix
+
+
+
+
+ Q2=Q**2
+
+
+
+C Fix to prevent undefined math operations for x=1.
+C Assumes that all structure functions vanish for x=1.
+
+
+ IF(1-X.EQ.0) THEN
+ DO J=-NF,NF
+ FX(J) = 0
+ ENDDO
+ RETURN
+ ENDIF
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ4
+
+ if (iset.eq.1) then
+ mode=3
+ DGL=Ctq4Fn (mode,0, x, Q)*x
+ UB=Ctq4Fn (mode,-1, x, Q)*x
+ DB=Ctq4Fn (mode,-2, x, Q)*x
+ DSB=Ctq4Fn (mode,-3, x, Q)*x
+ CHR=Ctq4Fn (mode,-4, x, Q)*x
+ BOT=Ctq4Fn (mode,-5, x, Q)*x
+ DUV=Ctq4Fn (mode,1, x, Q)*x - UB
+ DDV=Ctq4Fn (mode,2, x, Q)*x - DB
+ elseif (iset.eq.2) then
+ mode=1
+ DGL=Ctq4Fn (mode,0, x, Q)*x
+ UB=Ctq4Fn (mode,-1, x, Q)*x
+ DB=Ctq4Fn (mode,-2, x, Q)*x
+ DSB=Ctq4Fn (mode,-3, x, Q)*x
+ CHR=Ctq4Fn (mode,-4, x, Q)*x
+ BOT=Ctq4Fn (mode,-5, x, Q)*x
+ DUV=Ctq4Fn (mode,1, x, Q)*x - UB
+ DDV=Ctq4Fn (mode,2, x, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST98
+ elseif ((ISET.LT.17).AND.(ISET.GT.10)) THEN
+ mode=iset-10
+ call mrs98(x,q2,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ5
+
+ elseif ((ISET.LE.29).AND.(ISET.GT.20)) THEN
+ DGL=Ctq5Pdf (0, X, Q)*x
+ UB=Ctq5Pdf (-1, X, Q)*x
+ DB=Ctq5Pdf (-2, X, Q)*x
+ DSB=Ctq5Pdf (-3, X, Q)*x
+ CHR=Ctq5Pdf (-4, X, Q)*x
+ BOT=Ctq5Pdf (-5, X, Q)*x
+ DUV=Ctq5Pdf (1, X, Q)*x - UB
+ DDV=Ctq5Pdf (2, X, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST99
+ elseif (iset.eq.30) then
+ mode=1
+ call mrs99(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2001
+
+ ELSEIF ((ISET.LT.45).AND.(ISET.GT.40)) THEN
+ mode=iset-40
+ call mrst2001(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+ ELSEIF ((ISET.LT.49).AND.(ISET.GT.44)) THEN
+ mode=iset-44
+ call mrstnnlo(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2002 LO
+
+ ELSEIF (ISET.eq.49) THEN
+ mode=iset-48
+ call mrstlo(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ6
+
+ elseif ((ISET.LE.54).AND.(ISET.GT.50)) THEN
+ DGL=Ctq6Pdf (0, X, Q)*x
+ UB=Ctq6Pdf (-1, X, Q)*x
+ DB=Ctq6Pdf (-2, X, Q)*x
+ DSB=Ctq6Pdf (-3, X, Q)*x
+ CHR=Ctq6Pdf (-4, X, Q)*x
+ BOT=Ctq6Pdf (-5, X, Q)*x
+ DUV=Ctq6Pdf (1, X, Q)*x - UB
+ DDV=Ctq6Pdf (2, X, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C CTEQ6.6
+
+ elseif ((ISET.LE.59).AND.(ISET.GT.54)) THEN
+ DGL=Ctq6Pdf (0, X, Q)*x
+ UB=Ctq6Pdf (-1, X, Q)*x
+ DB=Ctq6Pdf (-2, X, Q)*x
+ DSB=Ctq6Pdf (-3, X, Q)*x
+ CHR=Ctq6Pdf (-4, X, Q)*x
+ BOT=Ctq6Pdf (-5, X, Q)*x
+ DUV=Ctq6Pdf (1, X, Q)*x - UB
+ DDV=Ctq6Pdf (2, X, Q)*x - DB
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2002
+
+ elseif ((iset.eq.61).or.(iset.eq.62)) then
+ mode=iset-60
+ call mrst2002(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MRST2004
+
+ elseif ((iset.eq.71).or.(iset.eq.72)) then
+ mode=iset-70
+ call mrst2004(x,q,mode,DUV,DDV,UB,DB,DSB,CHR,BOT,DGL)
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Alekhin NNLO A06
+
+ elseif (iset.eq.75) then
+
+ call a06(x,q2,pdfs06,dpdfs06,npdf,npar)
+ if(nset.eq.0) then
+ duv=pdfs06(1)
+ ddv=pdfs06(2)
+ dgl=pdfs06(3)
+ ub=pdfs06(4)
+ dsb=pdfs06(5)
+ db=pdfs06(6)
+ chr=pdfs06(7)
+ bot=pdfs06(8)
+ else
+ duv=pdfs06(1)+dpdfs06(1,nset)
+ ddv=pdfs06(2)+dpdfs06(2,nset)
+ dgl=pdfs06(3)+dpdfs06(3,nset)
+ ub=pdfs06(4)+dpdfs06(4,nset)
+ dsb=pdfs06(5)+dpdfs06(5,nset)
+ db=pdfs06(6)+dpdfs06(6,nset)
+ chr=pdfs06(7)+dpdfs06(7,nset)
+ bot=pdfs06(8)+dpdfs06(8,nset)
+ endif
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C Alekhin NNLO A09
+
+ elseif (iset.eq.85) then
+ call a09(x,q2,pdfs09,dpdfs09,5,nset)
+ if(nset.eq.0) then
+ duv=pdfs09(1)
+ ddv=pdfs09(2)
+ dgl=pdfs09(3)
+ ub=pdfs09(4)
+ dsb=pdfs09(5)
+ db=pdfs09(6)
+ chr=pdfs09(7)
+ bot=pdfs09(8)
+ else
+ duv=pdfs09(1)+dpdfs09(1,nset)
+ ddv=pdfs09(2)+dpdfs09(2,nset)
+ dgl=pdfs09(3)+dpdfs09(3,nset)
+ ub=pdfs09(4)+dpdfs09(4,nset)
+ dsb=pdfs09(5)+dpdfs09(5,nset)
+ db=pdfs09(6)+dpdfs09(6,nset)
+ chr=pdfs09(7)+dpdfs09(7,nset)
+ bot=pdfs09(8)+dpdfs09(8,nset)
+ endif
+
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C MSTW 2008
+
+ elseif ((iset.gt.89).and.(iset.lt.93)) then
+
+ prefix1 = prefix(1:len_trim(prefix))//'.68cl' ! 68% C.L. errors
+
+ if(nset.eq.0)prefix1=prefix
+
+
+ CALL GetAllPDFs(prefix1,nset,x,q,
+ # DUV,DDV,UB,DB,DSB,DSBAR,CHR,Cbar,BOT,bbar,DGL,phot)
+
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C GJR08VFLO Dynamical Parton Distribution Functions
+
+ elseif ((iset.gt.64).and.(iset.lt.66)) then
+
+ DUV = GJR08VFNSxuv(x,Q2,14)
+ DDV = GJR08VFNSxdv(x,Q2,14)
+ DGL = GJR08VFNSxgl(x,Q2,14)
+ UB = GJR08VFNSxub(x,Q2,14)
+ DB = GJR08VFNSxdb(x,Q2,14)
+ DSB = GJR08VFNSxsb(x,Q2,14)
+ CHR = GJR08VFNSxcb(x,Q2,14)
+ BOT = GJR08VFNSxbb(x,Q2,14)
+! alphas(set) = GJR08VFNSalphas(Q2,14)
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C GJR08VFNLO Dynamical Parton Distribution Functions
+
+ elseif ((iset.gt.65).and.(iset.lt.67)) then
+
+ DUV = GJR08VFNSxuv(x,Q2,nset)
+ DDV = GJR08VFNSxdv(x,Q2,nset)
+ DGL = GJR08VFNSxgl(x,Q2,nset)
+ UB = GJR08VFNSxub(x,Q2,nset)
+ DB = GJR08VFNSxdb(x,Q2,nset)
+ DSB = GJR08VFNSxsb(x,Q2,nset)
+ CHR = GJR08VFNSxcb(x,Q2,nset)
+ BOT = GJR08VFNSxbb(x,Q2,nset)
+! alphas(set) = GJR08VFNSalphas(Q2,nset)
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+C JR09VFNNLO Dynamical Parton Distribution Functions
+
+ elseif ((iset.gt.66).and.(iset.lt.68)) then
+
+ DUV = JR09VFNNLOxuv(x,Q2,nset)
+ DDV = JR09VFNNLOxdv(x,Q2,nset)
+ DGL = JR09VFNNLOxgl(x,Q2,nset)
+ UB = JR09VFNNLOxub(x,Q2,nset)
+ DB = JR09VFNNLOxdb(x,Q2,nset)
+ DSB = JR09VFNNLOxsb(x,Q2,nset)
+ CHR = JR09VFNNLOxcb(x,Q2,nset)
+ BOT = JR09VFNNLOxbb(x,Q2,nset)
+! alphas(set) = JR09VFNNLOalphas(Q2,nset)
+
+
+
+ ELSE
+ WRITE(*,*)'NO SUCH DISTRIBUTION'
+ STOP
+ ENDIF
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+
+
+ if(iset.lt.90) then
+
+ DSBAR=DSB
+ CBAR=CHR
+ BBAR=BOT
+
+ endif
+
+CC BE CAREFUL !!
+
+CC Different from HNNLO:
+CC u->2 d->1
+
+
+c for protons
+ if (ih.eq.1) then
+ FX(0)=DGL/x
+ FX(2)=(DUV+UB)/x
+ FX(1)=(DDV+DB)/x
+ FX(3)=DSB/x
+ FX(4)=CHR/x
+ FX(5)=BOT/x
+ FX(-2)=UB/x
+ FX(-1)=DB/x
+ FX(-3)=DSBAR/x
+ FX(-4)=CBAR/x
+ FX(-5)=BBAR/x
+c for anti-protons
+ elseif (ih.eq.-1) then
+ FX(0)=DGL/x
+ FX(-2)=(DUV+UB)/x
+ FX(-1)=(DDV+DB)/x
+ FX(-3)=DSB/x
+ FX(-4)=CHR/x
+ FX(-5)=BOT/x
+ FX(2)=UB/x
+ FX(1)=DB/x
+ FX(3)=DSBAR/x
+ FX(4)=CBAR/x
+ FX(5)=BBAR/x
+ endif
+
+
+ RETURN
+ END
+
+
+
+ subroutine mrs98(x,q2,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C****************************************************************C
+C C
+C This is a package for the new MRS 1998 parton C
+C distributions. The format is similar to the previous C
+C (1996) MRS-R series. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, MSbar factorization is assumed, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 1 FT08A central gluon, a_s 300 0.1175 0.00561 C
+C 2 FT09A higher gluon 300 0.1175 0.00510 C
+C 3 FT11A lower gluon 300 0.1175 0.00408 C
+C 4 FT24A lower a_s 229 0.1125 0.00586 C
+C 5 FT23A higher a_s 383 0.1225 0.00410 C
+C C
+C C
+C The corresponding grid files are called ft08a.dat etc. C
+C C
+C The reference is: C
+C A.D. Martin, R.G. Roberts, W.J. Stirling, R.S Thorne C
+C Univ. Durham preprint DTP/98/??, hep-ph/??????? (1998) C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C
+c and for the LO sets
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C C
+C 6 LO05A central gluon, a_s 174 0.1250 0.01518 C
+C 7 LO09A higher gluon 174 0.1250 0.01616 C
+C 8 LO10A lower gluon 174 0.1250 0.01533 C
+C 9 LO01A lower a_s 136 0.1200 0.01652 C
+C 10 LO07A higher a_s 216 0.1300 0.01522 C
+C C
+C C
+C The corresponding grid files are called lt05a.dat etc. C
+c C
+C C
+C****************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ if(mode.eq.1) then
+ call mrs981(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrs982(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrs983(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrs984(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.5) then
+ call mrs985(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+c from here LO
+ elseif(mode.eq.6) then
+ call mrs986(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.7) then
+ call mrs987(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.8) then
+ call mrs988(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.9) then
+ call mrs989(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.10) then
+ call mrs9810(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ')
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ')
+ return
+ end
+
+ subroutine mrs981(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft08a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs982(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft09a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs983(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft11a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs984(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft24a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs985(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/ft23a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+C****************************************************************C
+C C
+C This is a package for the new MRS LO 1998 parton C
+C distributions. The format is similar to the previous C
+C (1996) MRS-R series. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C Reference Martin, Roberts, Stirling and Thorne C
+C Durham preprint DTP/98/52 (August 1998) C
+C C
+C TEMPORARY NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 6 LO05A central gluon, a_s 174 0.1250 0.01518 C
+C 7 LO09A higher gluon 174 0.1250 0.01616 C
+C 8 LO10A lower gluon 174 0.1250 0.01533 C
+C 9 LO01A lower a_s 136 0.1200 0.01652 C
+C 10 LO07A higher a_s 216 0.1300 0.01522 C
+C C
+C C
+
+ subroutine mrs986(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo05a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs987(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo09a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs988(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo10a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs989(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo01a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs9810(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/lo07a.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs99(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C****************************************************************C
+C C
+C This is a package for the new **corrected** MRST parton C
+C distributions. The format is similar to the previous C
+C (1998) MRST series. C
+C C
+C NOTE: 7 new sets are added here, corresponding to shifting C
+C the small x HERA data up and down by 2.5%, and by varying C
+C the charm and strange distributions, and by forcing a C
+C larger d/u ratio at large x. C
+C C
+C As before, x times the parton distribution is returned, C
+C q is the scale in GeV, MSbar factorization is assumed, C
+C and Lambda(MSbar,nf=4) is given below for each set. C
+C C
+C NAMING SCHEME: C
+C C
+C mode set comment L(4)/MeV a_s(M_Z) grid#1 C
+C ---- --- ------- -------- ------- ------ C
+C C
+C 1 COR01 central gluon, a_s 300 0.1175 0.00537 C
+C 2 COR02 higher gluon 300 0.1175 0.00497 C
+C 3 COR03 lower gluon 300 0.1175 0.00398 C
+C 4 COR04 lower a_s 229 0.1125 0.00585 C
+C 5 COR05 higher a_s 383 0.1225 0.00384 C
+C 6 COR06 quarks up 303.3 0.1178 0.00497 C
+C 7 COR07 quarks down 290.3 0.1171 0.00593 C
+C 8 COR08 strange up 300 0.1175 0.00524 C
+C 9 COR09 strange down 300 0.1175 0.00524 C
+C 10 C0R10 charm up 300 0.1175 0.00525 C
+C 11 COR11 charm down 300 0.1175 0.00524 C
+C 12 COR12 larger d/u 300 0.1175 0.00515 C
+C C
+C The corresponding grid files are called cor01.dat etc. C
+C C
+C The reference is: C
+C A.D. Martin, R.G. Roberts, W.J. Stirling, R.S Thorne C
+C Univ. Durham preprint DTP/99/64, hep-ph/9907231 (1999) C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C C
+C****************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+c write(6,*)q,q2
+c if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99
+c if(x.lt.xmin.or.x.gt.xmax) print 98
+ if(mode.eq.1) then
+ call mrs991(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrs992(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrs993(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrs994(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.5) then
+ call mrs995(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.6) then
+ call mrs996(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.7) then
+ call mrs997(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.8) then
+ call mrs998(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.9) then
+ call mrs999(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.10) then
+ call mrs9910(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.11) then
+ call mrs9911(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.12) then
+ call mrs9912(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ')
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ')
+ return
+ end
+
+ subroutine mrs991(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor01.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs992(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor02.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs993(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor03.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs994(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor04.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs995(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor05.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs996(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor06.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs997(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor07.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+ subroutine mrs998(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor08.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs999(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor09.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+ subroutine mrs9910(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor10.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+ subroutine mrs9911(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor11.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+ subroutine mrs9912(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,ntenth=23,np=8)
+ real*8 f(np,nx,nq+1),qq(nq),xx(nx),g(np),n0(np)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data n0/3,4,5,9,9,9,9,9/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=1,file='Pdfdata/cor12.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(1,50)f(1,n,m),f(2,n,m),f(3,n,m),f(4,n,m),
+ . f(5,n,m),f(7,n,m),f(6,n,m),f(8,n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ do 25 i=1,np
+ 25 f(i,n,m)=f(i,n,m)/(1d0-xx(n))**n0(i)
+ 20 continue
+ do 31 j=1,ntenth-1
+ xx(j)=dlog10(xx(j)/xx(ntenth))+xx(ntenth)
+ do 31 i=1,8
+ if(i.eq.5.or.i.eq.7) goto 31
+ do 30 k=1,nq
+ 30 f(i,j,k)=dlog10(f(i,j,k)/f(i,ntenth,k))+f(i,ntenth,k)
+ 31 continue
+ 50 format(8f10.5)
+ do 40 i=1,np
+ do 40 m=1,nq
+ 40 f(i,nx,m)=0d0
+ init=1
+ 10 continue
+ if(x.lt.xmin) x=xmin
+ if(x.gt.xmax) x=xmax
+ if(qsq.lt.qsqmin) qsq=qsqmin
+ if(qsq.gt.qsqmax) qsq=qsqmax
+ xxx=x
+ if(x.lt.xx(ntenth)) xxx=dlog10(x/xx(ntenth))+xx(ntenth)
+ n=0
+ 70 n=n+1
+ if(xxx.gt.xx(n+1)) goto 70
+ a=(xxx-xx(n))/(xx(n+1)-xx(n))
+ m=0
+ 80 m=m+1
+ if(qsq.gt.qq(m+1)) goto 80
+ b=(qsq-qq(m))/(qq(m+1)-qq(m))
+ do 60 i=1,np
+ g(i)= (1d0-a)*(1d0-b)*f(i,n,m) + (1d0-a)*b*f(i,n,m+1)
+ . + a*(1d0-b)*f(i,n+1,m) + a*b*f(i,n+1,m+1)
+ if(n.ge.ntenth) goto 65
+ if(i.eq.5.or.i.eq.7) goto 65
+ fac=(1d0-b)*f(i,ntenth,m)+b*f(i,ntenth,m+1)
+ g(i)=fac*10d0**(g(i)-fac)
+ 65 continue
+ g(i)=g(i)*(1d0-x)**n0(i)
+ 60 continue
+ upv=g(1)
+ dnv=g(2)
+ usea=g(4)
+ dsea=g(8)
+ str=g(6)
+ chm=g(5)
+ glu=g(3)
+ bot=g(7)
+ x=xsave
+ qsq=q2save
+ return
+ end
+
+
+
+
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+c
+c From now 2001 MRST sets
+c
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+
+
+ subroutine mrstlo(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2001 LO parton C
+C distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0201xxx C
+C C
+C There is 1 pdf set corresponding to mode = 1 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.220 C
+C corresponding to alpha_s(M_Z) of 0.130 C
+C This set reads a grid whose first number is 0.02868 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrstlo1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrstlo1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/lo2002.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+
+
+
+
+
+ subroutine mrst2001(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2001 NLO parton C
+C distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0110215 C
+C C
+C There are 4 pdf sets corresponding to mode = 1, 2, 3, 4 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.323 C
+C corresponding to alpha_s(M_Z) of 0.119 C
+C This set reads a grid whose first number is 0.00927 C
+C C
+C Mode=2 gives the set with Lambda(MSbar,nf=4) = 0.290 C
+C corresponding to alpha_s(M_Z) of 0.117 C
+C This set reads a grid whose first number is 0.00953 C
+C C
+C Mode=3 gives the set with Lambda(MSbar,nf=4) = 0.362 C
+C corresponding to alpha_s(M_Z) of 0.121 C
+C This set reads a grid whose first number is 0.00889 C
+C C
+C Mode=4 gives the set MRST2001J which gives better agreement C
+C with the Tevatron inclusive jet data but has unattractive C
+C gluon behaviour at large x (see discussion in paper) C
+C This set has Lambda(MSbar,nf=4) = 0.353(alpha_s(M_Z) = 0.121 C
+C This set reads a grid whose first number is 0.00826 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst20011(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst20012(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrst20013(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrst20014(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst20011(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf119.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20012(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf117.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20013(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/alf121.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst20014(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/j121.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+
+
+
+ subroutine mrstnnlo(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the MRST 2002 NNLO parton distributionsC
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0201127 C
+C C
+C There are 4 pdf sets corresponding to mode = 1, 2, 3, 4 C
+C C
+C Mode=1 gives the default set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the `average' of the slow and fast evolutions C
+C This set reads a grid whose first number is 0.00725 C
+C C
+C Mode=2 gives the set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the fast evolution C
+C This set reads a grid whose first number is 0.00734 C
+C C
+C Mode=3 gives the set with Lambda(MSbar,nf=4) = 0.235 C
+C corresponding to alpha_s(M_Z) of 0.1155 C
+C This set is the slow evolution C
+C This set reads a grid whose first number is 0.00739 C
+C C
+C Mode=4 gives the set MRSTNNLOJ which gives better agreement C
+C with the Tevatron inclusive jet data but has unattractive C
+C gluon behaviour at large x (see discussion in paper) C
+C This set has Lambda(MSbar,nf=4) = 0.267(alpha_s(M_Z) =0.1180 C
+C This set reads a grid whose first number is 0.00865 C
+C C
+C This subroutine uses an improved interpolation procedure C
+C for extracting values of the pdf's from the grid C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrstnnlo1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrstnnlo2(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.3) then
+ call mrstnnlo3(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.4) then
+ call mrstnnlo4(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrstnnlo1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo2(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo3(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1155b.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrstnnlo4(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/vnvalf1180j.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine jeppe1(nx,my,xx,yy,ff,cc)
+ implicit real*8(a-h,o-z)
+ PARAMETER(NNX=49,MMY=37)
+ dimension xx(nx),yy(my),ff(nx,my),ff1(NNX,MMY),ff2(NNX,MMY),
+ xff12(NNX,MMY),yy0(4),yy1(4),yy2(4),yy12(4),z(16),wt(16,16),
+ xcl(16),cc(nx,my,4,4),iwt(16,16)
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ x -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ x 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ x 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ x 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ x 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ x -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ x 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ x -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ x 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ x -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ x 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+
+ do 42 m=1,my
+ dx=xx(2)-xx(1)
+ ff1(1,m)=(ff(2,m)-ff(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff1(nx,m)=(ff(nx,m)-ff(nx-1,m))/dx
+ do 41 n=2,nx-1
+ ff1(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff(n-1,m),ff(n,m),
+ xff(n+1,m))
+ 41 continue
+ 42 continue
+
+ do 44 n=1,nx
+ dy=yy(2)-yy(1)
+ ff2(n,1)=(ff(n,2)-ff(n,1))/dy
+ dy=yy(my)-yy(my-1)
+ ff2(n,my)=(ff(n,my)-ff(n,my-1))/dy
+ do 43 m=2,my-1
+ ff2(n,m)=polderiv(yy(m-1),yy(m),yy(m+1),ff(n,m-1),ff(n,m),
+ xff(n,m+1))
+ 43 continue
+ 44 continue
+
+ do 46 m=1,my
+ dx=xx(2)-xx(1)
+ ff12(1,m)=(ff2(2,m)-ff2(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff12(nx,m)=(ff2(nx,m)-ff2(nx-1,m))/dx
+ do 45 n=2,nx-1
+ ff12(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff2(n-1,m),ff2(n,m),
+ xff2(n+1,m))
+ 45 continue
+ 46 continue
+
+ do 53 n=1,nx-1
+ do 52 m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(n,m)
+ yy0(2)=ff(n+1,m)
+ yy0(3)=ff(n+1,m+1)
+ yy0(4)=ff(n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do 47 k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ 47 continue
+
+ do 49 l=1,16
+ xxd=0.
+ do 48 k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ 48 continue
+ cl(l)=xxd
+ 49 continue
+ l=0
+ do 51 k=1,4
+ do 50 j=1,4
+ l=l+1
+ cc(n,m,k,j)=cl(l)
+ 50 continue
+ 51 continue
+ 52 continue
+ 53 continue
+ return
+ end
+
+ subroutine jeppe2(x,y,nx,my,xx,yy,cc,z)
+ implicit real*8(a-h,o-z)
+ dimension xx(nx),yy(my),cc(nx,my,4,4)
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.
+ do 1 l=4,1,-1
+ z=t*z+((cc(n,m,l,4)*u+cc(n,m,l,3))*u
+ . +cc(n,m,l,2))*u+cc(n,m,l,1)
+ 1 continue
+ return
+ end
+
+
+
+
+ real*8 function polderiv(x1,x2,x3,y1,y2,y3)
+ implicit real*8(a-h,o-z)
+ polderiv=(x3*x3*(y1-y2)-2.0*x2*(x3*(y1-y2)+x1*
+ .(y2-y3))+x2*x2*(y1-y3)+x1*x1*(y2-y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+
+ subroutine mrst2002(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2002 updated NLO and C
+C NNLO parton distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0211080 C
+C C
+C There are 2 pdf sets corresponding to mode = 1, 2 C
+C C
+C Mode=1 gives the NLO set with alpha_s(M_Z,NLO) = 0.1197 C
+C This set reads a grid whose first number is 0.00949 C
+C C
+C Mode=2 gives the NNLO set with alpha_s(M_Z,NNLO) = 0.1154 C
+C This set reads a grid whose first number is 0.00685 C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst2(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2002nlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst2(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2002nnlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe1(nx,nq,xxl,qql,f1,cc1)
+ call jeppe1(nx,nq,xxl,qql,f2,cc2)
+ call jeppe1(nx,nq,xxl,qql,f3,cc3)
+ call jeppe1(nx,nq,xxl,qql,f4,cc4)
+ call jeppe1(nx,nq,xxl,qql,f6,cc6)
+ call jeppe1(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst2004(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
+C***************************************************************C
+C C
+C This is a package for the new MRST 2004 'physical gluon' NLO C
+C and NNLO parton distributions. C
+C Reference: A.D. Martin, R.G. Roberts, W.J. Stirling and C
+C R.S. Thorne, hep-ph/0410230 C
+C C
+C There are 2 pdf sets corresponding to mode = 1, 2 C
+C C
+C Mode=1 gives the NLO set with Lambda(4) = 347 MeV C
+C This set reads a grid called mrst2004nlo.dat C
+C whose first number is 0.00910 C
+C C
+C Mode=2 gives the NNLO set with Lambda(4) = 251 MeV C
+C This set reads a grid called mrst2004nnlo.dat C
+C whose first number is 0.00673 C
+C C
+C These fits use a new, physically motivated parametrisation C
+C for the gluon at the starting scale, Q_0^2 = 1 GeV^2 C
+C C
+C Comments to : W.J.Stirling@durham.ac.uk C
+C C
+C***************************************************************C
+ implicit real*8(a-h,o-z)
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ q2=q*q
+ if(q2.lt.qsqmin.or.q2.gt.qsqmax) print 99,q2
+ if(x.lt.xmin.or.x.gt.xmax) print 98,x
+ if(mode.eq.1) then
+ call mrst12(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ elseif(mode.eq.2) then
+ call mrst22(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
+ endif
+ 99 format(' WARNING: Q^2 VALUE IS OUT OF RANGE ','q2= ',e10.5)
+ 98 format(' WARNING: X VALUE IS OUT OF RANGE ','x= ',e10.5)
+ return
+ end
+
+ subroutine mrst12(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2004nlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe12(nx,nq,xxl,qql,f1,cc1)
+ call jeppe12(nx,nq,xxl,qql,f2,cc2)
+ call jeppe12(nx,nq,xxl,qql,f3,cc3)
+ call jeppe12(nx,nq,xxl,qql,f4,cc4)
+ call jeppe12(nx,nq,xxl,qql,f6,cc6)
+ call jeppe12(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe12(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe12(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe22(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe22(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine mrst22(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
+ implicit real*8(a-h,o-z)
+ parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
+ real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
+ .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
+ real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
+ .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
+ .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
+ real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
+ data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
+ . 1d-4,2d-4,4d-4,6d-4,8d-4,
+ . 1d-3,2d-3,4d-3,6d-3,8d-3,
+ . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
+ . .8d0,.9d0,1d0/
+ data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
+ . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
+ . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ . 1.8d6,3.2d6,5.6d6,1d7/
+ data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
+ data init/0/
+ save
+ xsave=x
+ q2save=qsq
+ if(init.ne.0) goto 10
+ open(unit=33,file='Pdfdata/mrst2004nnlo.dat',status='old')
+ do 20 n=1,nx-1
+ do 20 m=1,nq
+ read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
+ . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
+c notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea
+ 20 continue
+ do 40 m=1,nq
+ f1(nx,m)=0.d0
+ f2(nx,m)=0.d0
+ f3(nx,m)=0.d0
+ f4(nx,m)=0.d0
+ f5(nx,m)=0.d0
+ f6(nx,m)=0.d0
+ f7(nx,m)=0.d0
+ f8(nx,m)=0.d0
+ 40 continue
+ do n=1,nx
+ xxl(n)=dlog(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=dlog(qq(m))
+ enddo
+
+ call jeppe12(nx,nq,xxl,qql,f1,cc1)
+ call jeppe12(nx,nq,xxl,qql,f2,cc2)
+ call jeppe12(nx,nq,xxl,qql,f3,cc3)
+ call jeppe12(nx,nq,xxl,qql,f4,cc4)
+ call jeppe12(nx,nq,xxl,qql,f6,cc6)
+ call jeppe12(nx,nq,xxl,qql,f8,cc8)
+
+ emc2=2.045
+ emb2=18.5
+
+ do 44 m=1,nqc
+ qqlc(m)=qql(m+nqc0)
+ do 44 n=1,nx
+ fc(n,m)=f5(n,m+nqc0)
+ 44 continue
+ qqlc(1)=dlog(emc2)
+ call jeppe12(nx,nqc,xxl,qqlc,fc,ccc)
+
+ do 45 m=1,nqb
+ qqlb(m)=qql(m+nqb0)
+ do 45 n=1,nx
+ fb(n,m)=f7(n,m+nqb0)
+ 45 continue
+ qqlb(1)=dlog(emb2)
+ call jeppe12(nx,nqb,xxl,qqlb,fb,ccb)
+
+
+ init=1
+ 10 continue
+
+ xlog=dlog(x)
+ qsqlog=dlog(qsq)
+
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
+ call jeppe22(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
+
+ chm=0.d0
+ if(qsq.gt.emc2) then
+ call jeppe22(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
+ endif
+
+ bot=0.d0
+ if(qsq.gt.emb2) then
+ call jeppe22(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
+ endif
+
+ x=xsave
+ qsq=q2save
+ return
+ 50 format(8f10.5)
+ end
+
+ subroutine jeppe12(nx,my,xx,yy,ff,cc)
+ implicit real*8(a-h,o-z)
+ parameter(nnx=49,mmy=37)
+ dimension xx(nx),yy(my),ff(nnx,mmy),ff1(nnx,mmy),ff2(nnx,mmy),
+ xff12(nnx,mmy),yy0(4),yy1(4),yy2(4),yy12(4),z(16),wt(16,16),
+ xcl(16),cc(nx,my,4,4),iwt(16,16)
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ x -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ x 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ x 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ x 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ x 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ x -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ x 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ x -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ x 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ x 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ x -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ x 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+
+ do 42 m=1,my
+ dx=xx(2)-xx(1)
+ ff1(1,m)=(ff(2,m)-ff(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff1(nx,m)=(ff(nx,m)-ff(nx-1,m))/dx
+ do 41 n=2,nx-1
+ ff1(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff(n-1,m),ff(n,m),
+ xff(n+1,m))
+ 41 continue
+ 42 continue
+
+ do 44 n=1,nx
+ dy=yy(2)-yy(1)
+ ff2(n,1)=(ff(n,2)-ff(n,1))/dy
+ dy=yy(my)-yy(my-1)
+ ff2(n,my)=(ff(n,my)-ff(n,my-1))/dy
+ do 43 m=2,my-1
+ ff2(n,m)=polderiv(yy(m-1),yy(m),yy(m+1),ff(n,m-1),ff(n,m),
+ xff(n,m+1))
+ 43 continue
+ 44 continue
+
+ do 46 m=1,my
+ dx=xx(2)-xx(1)
+ ff12(1,m)=(ff2(2,m)-ff2(1,m))/dx
+ dx=xx(nx)-xx(nx-1)
+ ff12(nx,m)=(ff2(nx,m)-ff2(nx-1,m))/dx
+ do 45 n=2,nx-1
+ ff12(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff2(n-1,m),ff2(n,m),
+ xff2(n+1,m))
+ 45 continue
+ 46 continue
+
+ do 53 n=1,nx-1
+ do 52 m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(n,m)
+ yy0(2)=ff(n+1,m)
+ yy0(3)=ff(n+1,m+1)
+ yy0(4)=ff(n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do 47 k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ 47 continue
+
+ do 49 l=1,16
+ xxd=0.
+ do 48 k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ 48 continue
+ cl(l)=xxd
+ 49 continue
+ l=0
+ do 51 k=1,4
+ do 50 j=1,4
+ l=l+1
+ cc(n,m,k,j)=cl(l)
+ 50 continue
+ 51 continue
+ 52 continue
+ 53 continue
+ return
+ end
+
+ subroutine jeppe22(x,y,nx,my,xx,yy,cc,z)
+ implicit real*8(a-h,o-z)
+ dimension xx(nx),yy(my),cc(nx,my,4,4)
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.
+ do 1 l=4,1,-1
+ z=t*z+((cc(n,m,l,4)*u+cc(n,m,l,3))*u
+ . +cc(n,m,l,2))*u+cc(n,m,l,1)
+ 1 continue
+ return
+ end
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 4
+C June 21, 1996
+C
+C By: H.L. Lai, J. Huston, S. Kuhlmann, F. Olness, J. Owens, D. Soper
+C W.K. Tung, H. Weerts
+C Ref: MSUHEP-60426, CTEQ-604, e-Print Archive: hep-ph/9606399
+C
+C This package contains 9 sets of CTEQ4 PDF's. Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz) Q0(GeV) Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ4M Standard MSbar scheme 0.116 1.6 cteq4m.tbl
+C 2 CTEQ4D Standard DIS scheme 0.116 1.6 cteq4d.tbl
+C 3 CTEQ4L Leading Order 0.116 1.6 cteq4l.tbl
+C 4 CTEQ4A1 Alpha_s series 0.110 1.6 cteq4a1.tbl
+C 5 CTEQ4A2 Alpha_s series 0.113 1.6 cteq4a2.tbl
+C 6 CTEQ4A3 same as CTEQ4M 0.116 1.6 cteq4m.tbl
+C 7 CTEQ4A4 Alpha_s series 0.119 1.6 cteq4a4.tbl
+C 8 CTEQ4A5 Alpha_s series 0.122 1.6 cteq4a5.tbl
+C 9 CTEQ4HJ High Jet 0.116 1.6 cteq4hj.tbl
+C 10 CTEQ4LQ Low Q0 0.114 0.7 cteq4lq.tbl
+C ---------------------------------------------------------------------------
+C
+C The available applied range is 10^-5 < x < 1 and 1.6 < Q < 10,000 (GeV)
+C except CTEQ4LQ for which Q starts at a lower value of 0.7 GeV.
+C The Table_Files are assumed to be in the working directory.
+C
+C The function Ctq4Fn (Iset, Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar)
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ4 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Hung-Liang Lai(Lai_H@pa.msu.edu) or Wu-Ki Tung(Tung@pa.msu.edu).
+C
+C===========================================================================
+
+ Function Ctq4Fn (Iset, Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Character Flnm(10)*11
+ Common
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / QCDtable / Alambda, Nfl, Iorder
+ Data (Flnm(I), I=1,10)
+ > / 'cteq4m.tbl ', 'cteq4d.tbl ', 'cteq4l.tbl '
+ > , 'cteq4a1.tbl', 'cteq4a2.tbl', 'cteq4m.tbl ', 'cteq4a4.tbl'
+ > , 'cteq4a5.tbl', 'cteq4hj.tbl', 'cteq4lq.tbl' /
+ Data Isetold, Isetmin, Isetmax / -987, 1, 10 /
+ save Flnm, Isetold, Isetmin, Isetmax
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ If (Iset.lt.Isetmin .or. Iset.gt.Isetmax) Then
+ Print *, 'Invalid Iset number in Ctq4Fn :', Iset
+ Stop
+ Endif
+ IU= NextUt()
+ Open(IU, File='Pdfdata/'//Flnm(Iset), Status='OLD', Err=100)
+ Call ReadTbl (IU)
+ Close (IU)
+ Isetold=Iset
+ Endif
+
+ If (X .lt. 0D0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq4Fn: ', X
+ Stop
+ Endif
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq4Fn: ', Q
+ Stop
+ Endif
+ If (Iparton .lt. -NfMx .or. Iparton .gt. NfMx) Then
+ Print *, 'Iparton out of range in Ctq4Fn: ', Iparton
+ Stop
+ Endif
+
+ Ctq4Fn = PartonX (Iparton, X, Q)
+ if(Ctq4Fn.lt.0.D0) Ctq4Fn = 0.D0
+
+ Return
+
+ 100 Print *, ' Data file ', Flnm(Iset), ' cannot be opened '
+ >//'in Ctq4Fn!!'
+ Stop
+C ********************
+ End
+
+ Function NextUt()
+C Returns an unallocated FORTRAN i/o unit.
+ Logical EX
+C
+ Do 10 N = 50, 300
+ INQUIRE (UNIT=N, OPENED=EX)
+ If (.NOT. EX) then
+ NextUt = N
+ Return
+ Endif
+ 10 Continue
+ Stop ' There is no available I/O unit. '
+C *************************
+ End
+C
+
+
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 5.0
+C Nov. 1, 1999
+C
+C Ref: "GLOBAL QCD ANALYSIS OF PARTON STRUCTURE OF THE NUCLEON:
+C CTEQ5 PPARTON DISTRIBUTIONS"
+C
+C hep-ph/9903282; to be published in Eur. Phys. J. C 1999.
+C
+C These PDF's use quadratic interpolation of attached tables. A parametrized
+C version of the same PDF's without external tables is under construction.
+C They will become available later.
+C
+C This package contains 7 sets of CTEQ5 PDF's; plus two updated ones.
+C The undated CTEQ5M1 and CTEQHQ1 use an improved evolution code.
+C Both the original and the updated ones fit current data with comparable
+C accuracy. The CTEQHQ1 set also involve a different choice of scale,
+C hence differs from CTEQHQ slightly more. It is preferred over CTEQ5HQ.
+
+C Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz) Lam4 Lam5 Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ5M Standard MSbar scheme 0.118 326 226 cteq5m.tbl
+C 2 CTEQ5D Standard DIS scheme 0.118 326 226 cteq5d.tbl
+C 3 CTEQ5L Leading Order 0.127 192 146 cteq5l.tbl
+C 4 CTEQ5HJ Large-x gluon enhanced 0.118 326 226 cteq5hj.tbl
+C 5 CTEQ5HQ Heavy Quark 0.118 326 226 cteq5hq.tbl
+C 6 CTEQ5F3 Nf=3 FixedFlavorNumber 0.106 (Lam3=395) cteq5f3.tbl
+C 7 CTEQ5F4 Nf=4 FixedFlavorNumber 0.112 309 XXX cteq5f4.tbl
+C --------------------------------------------------------
+C 8 CTEQ5M1 Improved CTEQ5M 0.118 326 226 cteq5m1.tbl
+C 9 CTEQ5HQ1 Improved CTEQ5HQ 0.118 326 226 ctq5hq1.tbl
+C ---------------------------------------------------------------------------
+C
+C The available applied range is 10^-5 << x << 1 and 1.0 << Q << 10,000 (GeV).
+C Lam5 (Lam4, Lam3) represents Lambda value (in MeV) for 5 (4,3) flavors.
+C The matching alpha_s between 4 and 5 flavors takes place at Q=4.5 GeV,
+C which is defined as the bottom quark mass, whenever it can be applied.
+C
+C The Table_Files are assumed to be in the working directory.
+C
+C Before using the PDF, it is necessary to do the initialization by
+C Call SetCtq5(Iset)
+C where Iset is the desired PDF specified in the above table.
+C
+C The function Ctq5Pdf (Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar),
+C whereas CTEQ5F3 has, by definition, only 3 flavors and gluon;
+C CTEQ5F4 has only 4 flavors and gluon.
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+C
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ5 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Hung-Liang Lai(lai@phys.nthu.edu.tw) or Wu-Ki Tung(Tung@pa.msu.edu).
+C
+C===========================================================================
+
+ Function Ctq5Pdf (Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Logical Warn
+ Common
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / QCDtable / Alambda, Nfl, Iorder
+
+ Data Warn /.true./
+ save Warn
+
+ If (X .lt. 0D0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq5Pdf: ', X
+ Stop
+ Endif
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq5Pdf: ', Q
+ Stop
+ Endif
+ If ((Iparton .lt. -NfMx .or. Iparton .gt. NfMx)) Then
+ If (Warn) Then
+C put a warning for calling extra flavor.
+ Warn = .false.
+ Print *, 'Warning: Iparton out of range in Ctq5Pdf: '
+ > , Iparton
+ Endif
+ Ctq5Pdf = 0D0
+ Return
+ Endif
+
+ Ctq5Pdf = PartonX (Iparton, X, Q)
+ if(Ctq5Pdf.lt.0.D0) Ctq5Pdf = 0.D0
+
+ Return
+
+C ********************
+ End
+
+ FUNCTION PartonX (IPRTN, X, Q)
+C
+C Given the parton distribution function in the array Upd in
+C COMMON / CtqPar_5_1 / , this routine fetches u(fl, x, q) at any value of
+C x and q using Mth-order polynomial interpolation for x and Ln(Q/Lambda).
+C
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C
+ PARAMETER (MXX = 105, MXQ = 25, MXF = 6)
+ PARAMETER (MXPQX = (MXF *2 +2) * MXQ * MXX)
+ PARAMETER (M= 2, M1 = M + 1)
+C
+ Logical First
+ Common
+ > / CtqPar_5_1 / Al, XV(0:MXX), QL(0:MXQ), UPD(MXPQX)
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / XQrange / Qini, Qmax, Xmin
+C
+ Dimension Fq(M1), Df(M1)
+
+ Data First /.true./
+ save First
+C Work with Log (Q)
+ QG = LOG (Q/AL)
+
+C Find lower end of interval containing X
+ JL = -1
+ JU = Nx+1
+ 11 If (JU-JL .GT. 1) Then
+ JM = (JU+JL) / 2
+ If (X .GT. XV(JM)) Then
+ JL = JM
+ Else
+ JU = JM
+ Endif
+ Goto 11
+ Endif
+
+ Jx = JL - (M-1)/2
+ If (X .lt. Xmin .and. First ) Then
+ First = .false.
+ Print '(A, 2(1pE12.4))',
+ > ' WARNING: X << Xmin, extrapolation used; X, Xmin =', X, Xmin
+ If (Jx .LT. 0) Jx = 0
+ Elseif (Jx .GT. Nx-M) Then
+ Jx = Nx - M
+ Endif
+C Find the interval where Q lies
+ JL = -1
+ JU = NT+1
+ 12 If (JU-JL .GT. 1) Then
+ JM = (JU+JL) / 2
+ If (QG .GT. QL(JM)) Then
+ JL = JM
+ Else
+ JU = JM
+ Endif
+ Goto 12
+ Endif
+
+ Jq = JL - (M-1)/2
+ If (Jq .LT. 0) Then
+ Jq = 0
+ If (Q .lt. Qini) Print '(A, 2(1pE12.4))',
+ > ' WARNING: Q << Qini, extrapolation used; Q, Qini =', Q, Qini
+ Elseif (Jq .GT. Nt-M) Then
+ Jq = Nt - M
+ If (Q .gt. Qmax) Print '(A, 2(1pE12.4))',
+ > ' WARNING: Q > Qmax, extrapolation used; Q, Qmax =', Q, Qmax
+ Endif
+
+ If (Iprtn .GE. 3) Then
+ Ip = - Iprtn
+ Else
+ Ip = Iprtn
+ EndIf
+C Find the off-set in the linear array Upd
+ JFL = Ip + NfMx
+ J0 = (JFL * (NT+1) + Jq) * (NX+1) + Jx
+C
+C Now interpolate in x for M1 Q's
+ Do 21 Iq = 1, M1
+ J1 = J0 + (Nx+1)*(Iq-1) + 1
+ Call Polint (XV(Jx), Upd(J1), M1, X, Fq(Iq), Df(Iq))
+ 21 Continue
+C Finish off by interpolating in Q
+ Call Polint (QL(Jq), Fq(1), M1, QG, Ftmp, Ddf)
+
+ PartonX = Ftmp
+C
+ RETURN
+C ****************************
+ END
+
+ Subroutine SetCtq5 (Iset)
+ Implicit Double Precision (A-H,O-Z)
+ Parameter (Isetmax=9)
+ Character Flnm(Isetmax)*12, Tablefile*40
+ Data (Flnm(I), I=1,Isetmax)
+ > / 'cteq5m.tbl', 'cteq5d.tbl', 'cteq5l.tbl', 'cteq5hj.tbl'
+ > , 'cteq5hq.tbl', 'cteq5f3.tbl', 'cteq5f4.tbl'
+ > , 'cteq5m1.tbl', 'ctq5hq1.tbl' /
+ Data Tablefile / 'test.tbl' /
+ Data Isetold, Isetmin, Isettest / -987, 1, 911 /
+ save
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ IU= NextUn()
+ If (Iset .eq. Isettest) then
+ Print* ,'Opening ', Tablefile
+ 21 Open(IU, File=Tablefile, Status='OLD', Err=101)
+ GoTo 22
+ 101 Print*, Tablefile, ' cannot be opened '
+ Print*, 'Please input the .tbl file:'
+ Read (*,'(A)') Tablefile
+ Goto 21
+ 22 Continue
+ ElseIf (Iset.lt.Isetmin .or. Iset.gt.Isetmax) Then
+ Print *, 'Invalid Iset number in SetCtq5 :', Iset
+ Stop
+ Else
+ Tablefile=Flnm(Iset)
+ Open(IU, File='Pdfdata/'//Tablefile, Status='OLD', Err=100)
+ Endif
+ Call ReadTbl (IU)
+ Close (IU)
+ Isetold=Iset
+ Endif
+ Return
+
+ 100 Print *, ' Data file ', Tablefile, ' cannot be opened '
+ >//'in SetCtq5!!'
+ Stop
+C ********************
+ End
+
+ Subroutine ReadTbl (Nu)
+ Implicit Double Precision (A-H,O-Z)
+ Character Line*80
+ PARAMETER (MXX = 105, MXQ = 25, MXF = 6)
+ PARAMETER (MXPQX = (MXF *2 +2) * MXQ * MXX)
+ Common
+ > / CtqPar_5_1 / Al, XV(0:MXX), QL(0:MXQ), UPD(MXPQX)
+ > / CtqPar_5_2 / Nx, Nt, NfMx
+ > / XQrange / Qini, Qmax, Xmin
+ > / QCDtable / Alambda, Nfl, Iorder
+ > / Masstbl / Amass(6)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, '(A)') Line
+ Read (Nu, *) Dr, Fl, Al, (Amass(I),I=1,6)
+ Iorder = Nint(Dr)
+ Nfl = Nint(Fl)
+ Alambda = Al
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) NX, NT, NfMx
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) QINI, QMAX, (QL(I), I =0, NT)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) XMIN, (XV(I), I =0, NX)
+
+ Do 11 Iq = 0, NT
+ QL(Iq) = Log (QL(Iq) /Al)
+ 11 Continue
+C
+C Since quark = anti-quark for nfl>2 at this stage,
+C we Read out only the non-redundent data points
+C No of flavors = NfMx (sea) + 1 (gluon) + 2 (valence)
+
+ Nblk = (NX+1) * (NT+1)
+ Npts = Nblk * (NfMx+3)
+ Read (Nu, '(A)') Line
+ Read (Nu, *, IOSTAT=IRET) (UPD(I), I=1,Npts)
+
+ Return
+C ****************************
+ End
+
+! Function NextUn()
+!C Returns an unallocated FORTRAN i/o unit.
+! Logical EX
+!C
+! Do 10 N = 10, 300
+! INQUIRE (UNIT=N, OPENED=EX)
+! If (.NOT. EX) then
+! NextUn = N
+! Return
+! Endif
+! 10 Continue
+! Stop ' There is no available I/O unit. '
+!C *************************
+! End
+!C
+
+ SUBROUTINE POLINT (XA,YA,N,X,Y,DY)
+
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C Adapted from "Numerical Recipes"
+ PARAMETER (NMAX=10)
+ DIMENSION XA(N),YA(N),C(NMAX),D(NMAX)
+ NS=1
+ DIF=ABS(X-XA(1))
+ DO 11 I=1,N
+ DIFT=ABS(X-XA(I))
+ IF (DIFT.LT.DIF) THEN
+ NS=I
+ DIF=DIFT
+ ENDIF
+ C(I)=YA(I)
+ D(I)=YA(I)
+11 CONTINUE
+ Y=YA(NS)
+ NS=NS-1
+ DO 13 M=1,N-1
+ DO 12 I=1,N-M
+ HO=XA(I)-X
+ HP=XA(I+M)-X
+ W=C(I+1)-D(I)
+ DEN=HO-HP
+ IF(DEN.EQ.0.)PAUSE
+ DEN=W/DEN
+ D(I)=HP*DEN
+ C(I)=HO*DEN
+12 CONTINUE
+ IF (2*NS.LT.N-M)THEN
+ DY=C(NS+1)
+ ELSE
+ DY=D(NS)
+ NS=NS-1
+ ENDIF
+ Y=Y+DY
+13 CONTINUE
+ RETURN
+ END
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: Version 6
+C January 24, 2002, v6.0
+C April 10, 2002, v6.1
+C
+C Ref: "New Generation of Parton Distributions with
+C Uncertainties from Global QCD Analysis"
+C By: J. Pumplin, D.R. Stump, J.Huston, H.L. Lai, P. Nadolsky, W.K. Tung
+C hep-ph/0201195
+C
+C This package contains 3 standard sets of CTEQ6 PDF's and 40 up/down sets
+C with respect to CTEQ6M PDF's. Details are:
+C ---------------------------------------------------------------------------
+C Iset PDF Description Alpha_s(Mz)**Lam4 Lam5 Table_File
+C ---------------------------------------------------------------------------
+C 1 CTEQ6M Standard MSbar scheme 0.118 326 226 cteq6m.tbl
+C 2 CTEQ6D Standard DIS scheme 0.118 326 226 cteq6d.tbl
+C 3 CTEQ6L Leading Order 0.118** 326** 226 cteq6l.tbl
+C 4 CTEQ6L1 Leading Order 0.130 215 165 cteq6l1.tbl
+C ------------------------------
+C 1xx CTEQ6M1xx +/- w.r.t. CTEQ6M 0.118 326 226 cteq6m1xx.tbl
+C (where xx=01--40)
+C ---------------------------------------------------------------------------
+C ** ALL fits are obtained by using the same coupling strength
+C \alpha_s(Mz)=0.118 and the NLO running \alpha_s formula, except CTEQ6L1
+C which uses the LO running \alpha_s and its value determined from the fit.
+C For the LO fits, the evolution of the PDF and the hard cross sections are
+C calculated at LO. More detailed discussions are given in hep-ph/0201195.
+C
+C The table grids are generated for 10^-6 < x < 1 and 1.3 < Q < 10,000 (GeV).
+C PDF values outside of the above range are returned using extrapolation.
+C Lam5 (Lam4) represents Lambda value (in MeV) for 5 (4) flavors.
+C The matching alpha_s between 4 and 5 flavors takes place at Q=4.5 GeV,
+C which is defined as the bottom quark mass, whenever it can be applied.
+C
+C The Table_Files are assumed to be in the working directory.
+C
+C Before using the PDF, it is necessary to do the initialization by
+C Call SetCtq6(Iset)
+C where Iset is the desired PDF specified in the above table.
+C
+C The function Ctq6Pdf (Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar),
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+C
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ6 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C Pumplin@pa.msu.edu or Tung@pa.msu.edu.
+C
+C===========================================================================
+!
+! Function Ctq6Pdf (Iparton, X, Q)
+! Implicit Double Precision (A-H,O-Z)
+! Logical Warn
+! Common
+! > / CtqPar_6_2 / Nx, Nt, NfMx
+! > / QCDtable / Alambda, Nfl, Iorder
+!
+! Data Warn /.true./
+! save Warn
+!
+! If (X .lt. 0D0 .or. X .gt. 1D0) Then
+! Print *, 'X out of range in Ctq6Pdf: ', X
+! Stop
+! Endif
+! If (Q .lt. Alambda) Then
+! Print *, 'Q out of range in Ctq6Pdf: ', Q
+! Stop
+! Endif
+! If ((Iparton .lt. -NfMx .or. Iparton .gt. NfMx)) Then
+! If (Warn) Then
+!C put a warning for calling extra flavor.
+! Warn = .false.
+! Print *, 'Warning: Iparton out of range in Ctq6Pdf: '
+! > , Iparton
+! Endif
+! Ctq6Pdf = 0D0
+! Return
+! Endif
+!
+! Ctq6Pdf = PartonX6 (Iparton, X, Q)
+! if(Ctq6Pdf.lt.0D0) Ctq6Pdf = 0D0
+!
+! Return
+!
+!C ********************
+! End
+!
+! Subroutine SetCtq6 (Iset)
+! Implicit Double Precision (A-H,O-Z)
+! Parameter (Isetmax0=4)
+! Character Flnm(Isetmax0)*6, nn*3, Tablefile*40
+! Data (Flnm(I), I=1,Isetmax0)
+! > / 'cteq6m', 'cteq6d', 'cteq6l', 'cteq6l'/
+! Data Isetold, Isetmin0, Isetmin1, Isetmax1 /-987,1,101,140/
+! save
+!
+!C If data file not initialized, do so.
+! If(Iset.ne.Isetold) then
+! IU= NextUn6()
+! If (Iset.ge.Isetmin0 .and. Iset.le.3) Then
+! Tablefile=Flnm(Iset)//'.tbl'
+! Elseif (Iset.eq.Isetmax0) Then
+! Tablefile=Flnm(Iset)//'1.tbl'
+! Elseif (Iset.ge.Isetmin1 .and. Iset.le.Isetmax1) Then
+! write(nn,'(I3)') Iset
+! Tablefile=Flnm(1)//nn//'.tbl'
+! Else
+! Print *, 'Invalid Iset number in SetCtq6 :', Iset
+! Stop
+! Endif
+! Open(IU, File='Pdfdata/'//Tablefile, Status='OLD', Err=100)
+! 21 Call ReadTbl6 (IU)
+! Close (IU)
+! Isetold=Iset
+! Endif
+! Return
+!
+! 100 Print *, ' Data file ', Tablefile, ' cannot be opened '
+! >//'in SetCtq6!!'
+! Stop
+!C ********************
+! End
+!
+! Subroutine ReadTbl6 (Nu)
+! Implicit Double Precision (A-H,O-Z)
+! Character Line*80
+! PARAMETER (MXX = 96, MXQ = 20, MXF = 5)
+! PARAMETER (MXPQX = (MXF + 3) * MXQ * MXX)
+! Common
+! > / CtqPar_6_1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+! > / CtqPar_6_2 / Nx, Nt, NfMx
+! > / XQrange / Qini, Qmax, Xmin
+! > / QCDtable / Alambda, Nfl, Iorder
+! > / Masstbl / Amass(6)
+!
+! Read (Nu, '(A)') Line
+! Read (Nu, '(A)') Line
+! Read (Nu, *) Dr, Fl, Al, (Amass(I),I=1,6)
+! Iorder = Nint(Dr)
+! Nfl = Nint(Fl)
+! Alambda = Al
+!
+! Read (Nu, '(A)') Line
+! Read (Nu, *) NX, NT, NfMx
+!
+! Read (Nu, '(A)') Line
+! Read (Nu, *) QINI, QMAX, (TV(I), I =0, NT)
+!
+! Read (Nu, '(A)') Line
+! Read (Nu, *) XMIN, (XV(I), I =0, NX)
+!
+! Do 11 Iq = 0, NT
+! TV(Iq) = Log(Log (TV(Iq) /Al))
+! 11 Continue
+!C
+!C Since quark = anti-quark for nfl>2 at this stage,
+!C we Read out only the non-redundent data points
+!C No of flavors = NfMx (sea) + 1 (gluon) + 2 (valence)
+!
+! Nblk = (NX+1) * (NT+1)
+! Npts = Nblk * (NfMx+3)
+! Read (Nu, '(A)') Line
+! Read (Nu, *, IOSTAT=IRET) (UPD(I), I=1,Npts)
+!
+! Return
+!C ****************************
+! End
+!
+! Function NextUn6()
+!C Returns an unallocated FORTRAN i/o unit.
+! Logical EX
+!C
+! Do 10 N = 10, 300
+! INQUIRE (UNIT=N, OPENED=EX)
+! If (.NOT. EX) then
+! NextUn6 = N
+! Return
+! Endif
+! 10 Continue
+! Stop ' There is no available I/O unit. '
+!C *************************
+! End
+!C
+!
+! SUBROUTINE POLINT6 (XA,YA,N,X,Y,DY)
+!
+! IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+!C Adapted from "Numerical Recipes"
+! PARAMETER (NMAX=10)
+! DIMENSION XA(N),YA(N),C(NMAX),D(NMAX)
+! NS=1
+! DIF=ABS(X-XA(1))
+! DO 11 I=1,N
+! DIFT=ABS(X-XA(I))
+! IF (DIFT.LT.DIF) THEN
+! NS=I
+! DIF=DIFT
+! ENDIF
+! C(I)=YA(I)
+! D(I)=YA(I)
+!11 CONTINUE
+! Y=YA(NS)
+! NS=NS-1
+! DO 13 M=1,N-1
+! DO 12 I=1,N-M
+! HO=XA(I)-X
+! HP=XA(I+M)-X
+! W=C(I+1)-D(I)
+! DEN=HO-HP
+! IF(DEN.EQ.0.)PAUSE
+! DEN=W/DEN
+! D(I)=HP*DEN
+! C(I)=HO*DEN
+!12 CONTINUE
+! IF (2*NS.LT.N-M)THEN
+! DY=C(NS+1)
+! ELSE
+! DY=D(NS)
+! NS=NS-1
+! ENDIF
+! Y=Y+DY
+!13 CONTINUE
+! RETURN
+! END
+!
+! Function PartonX6 (IPRTN, XX, QQ)
+!
+!c Given the parton distribution function in the array U in
+!c COMMON / PEVLDT / , this routine interpolates to find
+!c the parton distribution at an arbitray point in x and q.
+!c
+! Implicit Double Precision (A-H,O-Z)
+!
+! Parameter (MXX = 96, MXQ = 20, MXF = 5)
+! Parameter (MXQX= MXQ * MXX, MXPQX = MXQX * (MXF+3))
+!
+! Common
+! > / CtqPar_6_1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+! > / CtqPar_6_2 / Nx, Nt, NfMx
+! > / XQrange / Qini, Qmax, Xmin
+!
+! Dimension fvec(4), fij(4)
+! Dimension xvpow(0:mxx)
+! Data OneP / 1.00001d0 /
+! Data xpow / 0.3d0 / !**** choice of interpolation variable
+! Data nqvec / 4 /
+! Data ientry / 0 /
+! Save ientry,xvpow
+!
+!c store the powers used for interpolation on first call...
+! if(ientry .eq. 0) then
+! ientry = 1
+!
+! xvpow(0) = 0D0
+! do i = 1, nx
+! xvpow(i) = xv(i)**xpow
+! enddo
+! endif
+!
+! X = XX
+! Q = QQ
+! tt = dlog(dlog(Q/Al))
+!
+!c ------------- find lower end of interval containing x, i.e.,
+!c get jx such that xv(jx) .le. x .le. xv(jx+1)...
+! JLx = -1
+! JU = Nx+1
+! 11 If (JU-JLx .GT. 1) Then
+! JM = (JU+JLx) / 2
+! If (X .Ge. XV(JM)) Then
+! JLx = JM
+! Else
+! JU = JM
+! Endif
+! Goto 11
+! Endif
+!C Ix 0 1 2 Jx JLx Nx-2 Nx
+!C |---|---|---|...|---|-x-|---|...|---|---|
+!C x 0 Xmin x 1
+!C
+! If (JLx .LE. -1) Then
+! Print '(A,1pE12.4)', 'Severe error: x <= 0 in PartonX6! x = ', x
+! Stop
+! ElseIf (JLx .Eq. 0) Then
+! Jx = 0
+! Elseif (JLx .LE. Nx-2) Then
+!
+!C For interrior points, keep x in the middle, as shown above
+! Jx = JLx - 1
+! Elseif (JLx.Eq.Nx-1 .or. x.LT.OneP) Then
+!
+!C We tolerate a slight over-shoot of one (OneP=1.00001),
+!C perhaps due to roundoff or whatever, but not more than that.
+!C Keep at least 4 points >= Jx
+! Jx = JLx - 2
+! Else
+! Print '(A,1pE12.4)', 'Severe error: x > 1 in PartonX6! x = ', x
+! Stop
+! Endif
+!C ---------- Note: JLx uniquely identifies the x-bin; Jx does not.
+!
+!C This is the variable to be interpolated in
+! ss = x**xpow
+!
+! If (JLx.Ge.2 .and. JLx.Le.Nx-2) Then
+!
+!c initiation work for "interior bins": store the lattice points in s...
+! svec1 = xvpow(jx)
+! svec2 = xvpow(jx+1)
+! svec3 = xvpow(jx+2)
+! svec4 = xvpow(jx+3)
+!
+! s12 = svec1 - svec2
+! s13 = svec1 - svec3
+! s23 = svec2 - svec3
+! s24 = svec2 - svec4
+! s34 = svec3 - svec4
+!
+! sy2 = ss - svec2
+! sy3 = ss - svec3
+!
+!c constants needed for interpolating in s at fixed t lattice points...
+! const1 = s13/s23
+! const2 = s12/s23
+! const3 = s34/s23
+! const4 = s24/s23
+! s1213 = s12 + s13
+! s2434 = s24 + s34
+! sdet = s12*s34 - s1213*s2434
+! tmp = sy2*sy3/sdet
+! const5 = (s34*sy2-s2434*sy3)*tmp/s12
+! const6 = (s1213*sy2-s12*sy3)*tmp/s34
+!
+! EndIf
+!
+!c --------------Now find lower end of interval containing Q, i.e.,
+!c get jq such that qv(jq) .le. q .le. qv(jq+1)...
+! JLq = -1
+! JU = NT+1
+! 12 If (JU-JLq .GT. 1) Then
+! JM = (JU+JLq) / 2
+! If (tt .GE. TV(JM)) Then
+! JLq = JM
+! Else
+! JU = JM
+! Endif
+! Goto 12
+! Endif
+!
+! If (JLq .LE. 0) Then
+! Jq = 0
+! Elseif (JLq .LE. Nt-2) Then
+!C keep q in the middle, as shown above
+! Jq = JLq - 1
+! Else
+!C JLq .GE. Nt-1 case: Keep at least 4 points >= Jq.
+! Jq = Nt - 3
+!
+! Endif
+!C This is the interpolation variable in Q
+!
+! If (JLq.GE.1 .and. JLq.LE.Nt-2) Then
+!c store the lattice points in t...
+! tvec1 = Tv(jq)
+! tvec2 = Tv(jq+1)
+! tvec3 = Tv(jq+2)
+! tvec4 = Tv(jq+3)
+!
+! t12 = tvec1 - tvec2
+! t13 = tvec1 - tvec3
+! t23 = tvec2 - tvec3
+! t24 = tvec2 - tvec4
+! t34 = tvec3 - tvec4
+!
+! ty2 = tt - tvec2
+! ty3 = tt - tvec3
+!
+! tmp1 = t12 + t13
+! tmp2 = t24 + t34
+!
+! tdet = t12*t34 - tmp1*tmp2
+!
+! EndIf
+!
+!
+!c get the pdf function values at the lattice points...
+!
+! If (Iprtn .GE. 3) Then
+! Ip = - Iprtn
+! Else
+! Ip = Iprtn
+! EndIf
+! jtmp = ((Ip + NfMx)*(NT+1)+(jq-1))*(NX+1)+jx+1
+!
+! Do it = 1, nqvec
+!
+! J1 = jtmp + it*(NX+1)
+!
+! If (Jx .Eq. 0) Then
+!C For the first 4 x points, interpolate x^2*f(x,Q)
+!C This applies to the two lowest bins JLx = 0, 1
+!C We can not put the JLx.eq.1 bin into the "interrior" section
+!C (as we do for q), since Upd(J1) is undefined.
+! fij(1) = 0
+! fij(2) = Upd(J1+1) * XV(1)**2
+! fij(3) = Upd(J1+2) * XV(2)**2
+! fij(4) = Upd(J1+3) * XV(3)**2
+!C
+!C Use Polint6 which allows x to be anywhere w.r.t. the grid
+!
+! Call Polint6 (XVpow(0), Fij(1), 4, ss, Fx, Dfx)
+!
+! If (x .GT. 0D0) Fvec(it) = Fx / x**2
+!C Pdf is undefined for x.eq.0
+! ElseIf (JLx .Eq. Nx-1) Then
+!C This is the highest x bin:
+!
+! Call Polint6 (XVpow(Nx-3), Upd(J1), 4, ss, Fx, Dfx)
+!
+! Fvec(it) = Fx
+!
+! Else
+!C for all interior points, use Jon's in-line function
+!C This applied to (JLx.Ge.2 .and. JLx.Le.Nx-2)
+! sf2 = Upd(J1+1)
+! sf3 = Upd(J1+2)
+!
+! g1 = sf2*const1 - sf3*const2
+! g4 = -sf2*const3 + sf3*const4
+!
+! Fvec(it) = (const5*(Upd(J1)-g1)
+! & + const6*(Upd(J1+3)-g4)
+! & + sf2*sy3 - sf3*sy2) / s23
+!
+! Endif
+!
+! enddo
+!C We now have the four values Fvec(1:4)
+!c interpolate in t...
+!
+! If (JLq .LE. 0) Then
+!C 1st Q-bin, as well as extrapolation to lower Q
+! Call Polint6 (TV(0), Fvec(1), 4, tt, ff, Dfq)
+!
+! ElseIf (JLq .GE. Nt-1) Then
+!C Last Q-bin, as well as extrapolation to higher Q
+! Call Polint6 (TV(Nt-3), Fvec(1), 4, tt, ff, Dfq)
+! Else
+!C Interrior bins : (JLq.GE.1 .and. JLq.LE.Nt-2)
+!C which include JLq.Eq.1 and JLq.Eq.Nt-2, since Upd is defined for
+!C the full range QV(0:Nt) (in contrast to XV)
+! tf2 = fvec(2)
+! tf3 = fvec(3)
+!
+! g1 = ( tf2*t13 - tf3*t12) / t23
+! g4 = (-tf2*t34 + tf3*t24) / t23
+!
+! h00 = ((t34*ty2-tmp2*ty3)*(fvec(1)-g1)/t12
+! & + (tmp1*ty2-t12*ty3)*(fvec(4)-g4)/t34)
+!
+! ff = (h00*ty2*ty3/tdet + tf2*ty3 - tf3*ty2) / t23
+! EndIf
+!
+! PartonX6 = ff
+!
+! Return
+!C ********************
+! End
+!
+
+
+
+C============================================================================
+C CTEQ Parton Distribution Functions: version 6.0-6.6
+C April 10, 2002, v6.01
+C February 23, 2003, v6.1
+C August 6, 2003, v6.11
+C December 12, 2004, v6.12
+C December 4, 2006, v6.5 (CTEQ6.5M series added)
+C March 23, 2007, v6.51 (CTEQ6.5S/C series added)
+C April 24, 2007, v6.52 (minor improvement)
+C March 30, 2008, v6.6
+C
+C Ref[1]: "New Generation of Parton Distributions with Uncertainties from Global QCD Analysis"
+C By: J. Pumplin, D.R. Stump, J.Huston, H.L. Lai, P. Nadolsky, W.K. Tung
+C JHEP 0207:012(2002), hep-ph/0201195
+C
+C Ref[2]: "Inclusive Jet Production, Parton Distributions, and the Search for New Physics"
+C By : D. Stump, J. Huston, J. Pumplin, W.K. Tung, H.L. Lai, S. Kuhlmann, J. Owens
+C JHEP 0310:046(2003), hep-ph/0303013
+C
+C Ref[3]: "Neutrino dimuon Production and Strangeness Asymmetry of the Nucleon"
+C By: F. Olness, J. Pumplin, S. Stump, J. Huston, P. Nadolsky, H.L. Lai, S. Kretzer, J.F. Owens, W.K. Tung
+C Eur. Phys. J. C40:145(2005), hep-ph/0312323
+C
+C Ref[4]: "CTEQ6 Parton Distributions with Heavy Quark Mass Effects"
+C By: S. Kretzer, H.L. Lai, F. Olness, W.K. Tung
+C Phys. Rev. D69:114005(2004), hep-ph/0307022
+C
+C Ref[5]: "Heavy Quark Mass Effects in Deep Inelastic Scattering and Global QCD Analysis"
+C By : W.K. Tung, H.L. Lai, A. Belyaev, J. Pumplin, D. Stump, C.-P. Yuan
+C JHEP 0702:053(2007), hep-ph/0611254
+C
+C Ref[6]: "The Strange Parton Distribution of Nucleon: Global Analysis and Applications"
+C By : H.L. Lai, P. Nadolsky, J. Pumplin, D. Stump, W.K. Tung, C.-P. Yuan
+C JHEP 0704:089,2007, hep-ph/0702268
+C
+C Ref[7]: "The Charm Content of the Nucleon"
+C By : J. Pumplin, H.L. Lai, W.K. Tung
+C Phys.Rev.D75:054029,2007, hep-ph/0701220
+
+C Ref[8]: "Implications of CTEQ global analysis for collider observables"
+C By : P. M. Nadolsky, H.-L. Lai, Q.-H. Cao, J. Huston, J. Pumplin, D. R. Stump, W.-K. Tung, C.-P. Yuan
+C arXiv:0802.0007 [hep-ph], submitted to Phys. Rev. D.
+C
+
+C This package contains
+C (1) 4 standard sets of CTEQ6 PDF's (CTEQ6M, CTEQ6D, CTEQ6L, CTEQ6L1) ;
+C (2) 40 up/down sets (with respect to CTEQ6M) for uncertainty studies from Ref[1];
+C (3) updated version of the above: CTEQ6.1M and its 40 up/down eigenvector sets from Ref[2].
+C (4) 5 special sets for strangeness study from Ref[3].
+C (5) 1 special set for heavy quark study from Ref[4].
+C (6) CTEQ6.5M and its 40 up/down eigenvector sets from Ref[5].
+C (7) 8 sets of PDFs resulting from the strangeness study, Ref[6].
+C (8) 7 sets of PDFs resulting from the charm study, Ref[7].
+C (9) CTEQ6.6M and its 44 up/down eigenvector sets from Ref[8].
+C (10) Fits with nonperturbative charm from the study in Ref[8].
+C (11) Fits with alternative values of the strong coupling strength from the study in Ref[8].
+
+
+C Details about the calling convention are:
+C --------------------------------------------------------------------------------
+C Iset PDF-set Description Alpha_s(Mz)**Lam4 Lam5 Table_File Ref
+C ================================================================================
+C Standard, "best-fit", sets:
+C --------------------------
+C 1 CTEQ6M Standard MSbar scheme 0.118 326 226 cteq6m.tbl [1]
+C 2 CTEQ6D Standard DIS scheme 0.118 326 226 cteq6d.tbl [1]
+C 3 CTEQ6L Leading Order 0.118** 326** 226 cteq6l.tbl [1]
+C 4 CTEQ6L1 Leading Order 0.130** 215** 165 cteq6l1.tbl [1]
+C 200 CTEQ6.1M: updated CTEQ6M (see below, under "uncertainty" section) [2]
+C 400 CTEQ6.6M; the 2008 set (see below, under "uncertainty" section) [8]
+C
+C --------------------------
+C Special sets with nonperturbative charm at Q_0=1.3 GeV from Ref [8]
+C --------------------------
+C 450 CTEQ6.6C1 BHPS model for IC 0.118 326 226 ctq66.c1.pds
+C 451 CTEQ6.6C2 BHPS model for IC 0.118 326 226 ctq66.c2.pds
+C 452 CTEQ6.6C3 Sea-like model 0.118 326 226 ctq66.c3.pds
+C 453 CTEQ6.6C4 Sea-like model 0.118 326 226 ctq66.c4.pds
+C Momentum Fraction carried by c+cbar=2c at Q0=1.3 GeV:
+C Iset: 451 452 453 454
+C Mom. frac: 0.01 0.035 0.01 0.035
+
+
+C --------------------------
+C Special CTEQ6.6 sets with alternative values of strong coupling strength [8]
+C --------------------------
+C 460 CTEQ6.6A1 0.125 328 ctq66.a1.pds
+C 461 CTEQ6.6A2 0.122 281 ctq66.a2.pds
+C 462 CTEQ6.6A3 0.114 179 ctq66.a3.pds
+C 463 CTEQ6.6A4 0.112 159 ctq66.a4.pds
+
+C --------------------------
+C Special sets for strangeness study: Ref.[3]
+C --------------------------
+C 11 CTEQ6A Class A 0.118 326 226 cteq6sa.pds
+C 12 CTEQ6B Class B 0.118 326 226 cteq6sb.pds
+C 13 CTEQ6C Class C 0.118 326 226 cteq6sc.pds
+C 14 CTEQ6B+ Large [S-] 0.118 326 226 cteq6sb+.pds
+C 15 CTEQ6B- Negative [S-] 0.118 326 226 cteq6sb-.pds
+C --------------------------
+C Special set for Heavy Quark study: Ref.[4]
+C --------------------------
+C 21 CTEQ6HQ 0.118 326 226 cteq6hq.pds
+C --------------------------
+C Released sets for strangeness study: Ref.[6]
+C -------------------------- s=sbr
+C 30 CTEQ6.5S0 Best-fit 0.118 326 226 ctq65.s+0.pds
+C 31 CTEQ6.5S1 Low s+ 0.118 326 226 ctq65.s+1.pds
+C 32 CTEQ6.5S2 High s+ 0.118 326 226 ctq65.s+2.pds
+C 33 CTEQ6.5S3 Alt Low s+ 0.118 326 226 ctq65.s+3.pds
+C 34 CTEQ6.5S4 Alt High s+ 0.118 326 226 ctq65.s+4.pds
+C -------------------------- s!=sbr
+C strangeness asymmetry <x>_s-
+C 35 CTEQ6.5S-0 Best-fit 0.0014 0.118 326 226 ctq65.s-0.pds
+C 36 CTEQ6.5S-1 Low -0.0010 0.118 326 226 ctq65.s-1.pds
+C 37 CTEQ6.5S-2 High 0.0050 0.118 326 226 ctq65.s-2.pds
+C --------------------------
+C Released sets for charm study: Ref.[7]
+C --------------------------
+C 40 CTEQ6.5C0 no intrinsic charm 0.118 326 226 ctq65.c0.pds
+C 41 CTEQ6.5C1 BHPS model for IC 0.118 326 226 ctq65.c1.pds
+C 42 CTEQ6.5C2 BHPS model for IC 0.118 326 226 ctq65.c2.pds
+C 43 CTEQ6.5C3 Meson cloud model 0.118 326 226 ctq65.c3.pds
+C 44 CTEQ6.5C4 Meson cloud model 0.118 326 226 ctq65.c4.pds
+C 45 CTEQ6.5C5 Sea-like model 0.118 326 226 ctq65.c5.pds
+C 46 CTEQ6.5C6 Sea-like model 0.118 326 226 ctq65.c6.pds
+C
+C Momentum Fraction carried by c,cbar at Q0=1.3 GeV:
+C Iset:charm ,cbar | Iset:charm ,cbar | Iset:charm ,cbar
+C 41: 0.002857,0.002857 | 43: 0.003755,0.004817 | 45: 0.005714,0.005714
+C 42: 0.010000,0.010000 | 44: 0.007259,0.009312 | 46: 0.012285,0.012285
+C
+C ============================================================================
+C For uncertainty calculations using eigenvectors of the Hessian:
+C ---------------------------------------------------------------
+C central + 40 up/down sets along 20 eigenvector directions
+C -----------------------------
+C Original version, Ref[1]: central fit: CTEQ6M (=CTEQ6M.00)
+C -----------------------
+C 1xx CTEQ6M.xx +/- sets 0.118 326 226 cteq6m1xx.tbl
+C where xx = 01-40: 01/02 corresponds to +/- for the 1st eigenvector, ... etc.
+C e.g. 100 is CTEQ6M.00 (=CTEQ6M),
+C 101/102 are CTEQ6M.01/02, +/- sets of 1st eigenvector, ... etc.
+C ====================================================================
+C Updated version, Ref[2]: central fit: CTEQ6.1M (=CTEQ61.00)
+C -----------------------
+C 2xx CTEQ61.xx +/- sets 0.118 326 226 ctq61.xx.tbl
+C where xx = 01-40: 01/02 corresponds to +/- for the 1st eigenvector, ... etc.
+C e.g. 200 is CTEQ61.00 (=CTEQ6.1M),
+C 201/202 are CTEQ61.01/02, +/- sets of 1st eigenvector, ... etc.
+C ====================================================================
+C Version with mass effects, Ref[5]: central fit: CTEQ6.5M (=CTEQ65.00)
+C -----------------------
+C 3xx CTEQ65.xx +/- sets 0.118 326 226 ctq65.xx.pds
+C where xx = 01-40: 01/02 corresponds to +/- for the 1st eigenvector, ... etc.
+C e.g. 300 is CTEQ65.00 (=CTEQ6.5M),
+C 301/302 are CTEQ65.01/02, +/- sets of 1st eigenvector, ... etc.
+C ====================================================================
+C Version with mass effects and free strangeness, Ref[8]:
+C central fit: CTEQ6.6M (=CTEQ66.00)
+C -----------------------
+C 4xx CTEQ66.xx +/- sets 0.118 326 226 ctq66.xx.pds
+C where xx = 01-44: 01/02 corresponds to +/- for the 1st eigenvector, ... etc.
+C e.g. 400 is CTEQ66.00 (=CTEQ6.6M),
+C 401/402 are CTEQ66.01/02, +/- sets of 1st eigenvector, ... etc.
+
+C ===========================================================================
+C ** ALL fits are obtained by using the same coupling strength
+C \alpha_s(Mz)=0.118 and the NLO running \alpha_s formula, except CTEQ6L1
+C which uses the LO running \alpha_s and its value determined from the fit.
+C For the LO fits, the evolution of the PDF and the hard cross sections are
+C calculated at LO. More detailed discussions are given in the references.
+C
+C The table grids are generated for
+C * 10^-8 < x < 1 and 1.3 < Q < 10^5 (GeV) for CTEQ6.6 series;
+C * 10^-7 < x < 1 and 1.3 < Q < 10^5 (GeV) for CTEQ6.5S/C series;
+C * 10^-6 < x < 1 and 1.3 < Q < 10,000 (GeV) for CTEQ6, CTEQ6.1 series;
+C
+C PDF values outside of the above range are returned using extrapolation.
+C Lam5 (Lam4) represents Lambda value (in MeV) for 5 (4) flavors.
+C The matching alpha_s between 4 and 5 flavors takes place at Q=4.5 GeV,
+C which is defined as the bottom quark mass, whenever it can be applied.
+C
+C The Table_Files are assumed to be in the working directory.
+C
+C Before using the PDF, it is necessary to do the initialization by
+C Call SetCtq6(Iset)
+C where Iset is the desired PDF specified in the above table.
+C
+C The function Ctq6Pdf (Iparton, X, Q)
+C returns the parton distribution inside the proton for parton [Iparton]
+C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
+C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
+C for (b, c, s, d, u, g, u_bar, ..., b_bar),
+C
+C For detailed information on the parameters used, e.q. quark masses,
+C QCD Lambda, ... etc., see info lines at the beginning of the
+C Table_Files.
+C
+C These programs, as provided, are in double precision. By removing the
+C "Implicit Double Precision" lines, they can also be run in single
+C precision.
+C
+C If you have detailed questions concerning these CTEQ6 distributions,
+C or if you find problems/bugs using this package, direct inquires to
+C nadolsky@pa.msu.edu, pumplin@pa.msu.edu or tung@pa.msu.edu.
+C
+C===========================================================================
+
+ Function Ctq6Pdf (Iparton, X, Q)
+ Implicit Double Precision (A-H,O-Z)
+ Logical Warn
+ Common
+ > / CtqPar2 / Nx, Nt, NfMx, MxVal
+ > / QCDtable / Alambda, Nfl, Iorder
+
+ Data Warn /.true./
+ save Warn
+
+ If (X .lt. 0d0 .or. X .gt. 1D0) Then
+ Print *, 'X out of range in Ctq6Pdf: ', X
+ Ctq6Pdf = 0D0
+ Return
+ Endif
+
+ If (Q .lt. Alambda) Then
+ Print *, 'Q out of range in Ctq6Pdf: ', Q
+ Stop
+ Endif
+
+ If ((Iparton .lt. -NfMx .or. Iparton .gt. NfMx)) Then
+ If (Warn) Then
+C put a warning for calling extra flavor.
+ Warn = .false.
+ Print *, 'Warning: Iparton out of range in Ctq6Pdf! '
+ Print *, 'Iparton, MxFlvN0: ', Iparton, NfMx
+ Endif
+ Ctq6Pdf = 0D0
+ Return
+ Endif
+
+ Ctq6Pdf = PartonX6 (Iparton, X, Q)
+ if (Ctq6Pdf.lt.0.D0) Ctq6Pdf = 0.D0
+
+ Return
+
+C ********************
+ End
+
+ Subroutine SetCtq6 (Iset)
+ Implicit Double Precision (A-H,O-Z)
+ Parameter (Isetmax0=8)
+!CM Character Flnm(Isetmax0)*6, nn*3, Tablefile*40
+ Character Flnm(Isetmax0)*6, nn*3,nset2*2, Tablefile*40
+ Logical fmtpds
+ Data (Flnm(I), I=1,Isetmax0)
+ > / 'cteq6m', 'cteq6d', 'cteq6l', 'cteq6l','ctq61.','cteq6s'
+ > ,'ctq65.', 'ctq66.' /
+ Data Isetold, Isetmin0, Isetmin1, Isetmax1 /-987,1,100,140/
+ Data Isetmin2,Isetmax2 /200,240/
+ Data Isetmin3,Isetmax3 /300,340/
+ Data Isetmin4,Isetmax4 /400,444/
+ Data IsetminS,IsetmaxS /11,15/
+ Data IsetmnSp07,IsetmxSp07 /30,34/
+ Data IsetmnSm07,IsetmxSm07 /35,37/
+ Data IsetmnC07,IsetmxC07 /40,46/
+ Data IsetmnC08,IsetmxC08 /450,453/
+ Data IsetmnAS08,IsetmxAS08 /460,463/
+
+ Data IsetHQ /21/
+ Common /Setchange/ Isetch
+!CM
+ character *50 prefix,prefix1
+ integer nset
+ common/prefix/nset,prefix
+!CM
+ save
+
+C If data file not initialized, do so.
+ If(Iset.ne.Isetold) then
+ fmtpds=.true.
+
+ If (Iset.ge.Isetmin0 .and. Iset.le.3) Then
+C Iset = 1,2,3 for 6m, 6d, 6l
+ fmtpds=.false.
+ Tablefile=Flnm(Iset)//'.tbl'
+ Elseif (Iset.eq.4) Then
+C 4 (2nd LO fit)
+ fmtpds=.false.
+ Tablefile=Flnm(Iset)//'1.tbl'
+ Elseif (Iset.ge.Isetmin1 .and. Iset.le.Isetmax1) Then
+C 101 - 140
+ fmtpds=.false.
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(1)//nn//'.tbl'
+ Elseif (Iset.ge.Isetmin2 .and. Iset.le.Isetmax2) Then
+C 200 - 240
+ fmtpds=.false.
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(5)//nn(2:3)//'.tbl'
+ Elseif (Iset.ge.IsetminS .and. Iset.le.IsetmaxS) Then
+C 11 - 15
+ If(Iset.eq.11) then
+ Tablefile=Flnm(6)//'a.pds'
+ Elseif(Iset.eq.12) then
+ Tablefile=Flnm(6)//'b.pds'
+ Elseif(Iset.eq.13) then
+ Tablefile=Flnm(6)//'c.pds'
+ Elseif(Iset.eq.14) then
+ Tablefile=Flnm(6)//'b+.pds'
+ Elseif(Iset.eq.15) then
+ Tablefile=Flnm(6)//'b-.pds'
+ Endif
+ Elseif (Iset.eq.IsetHQ) Then
+C 21
+ TableFile='cteq6hq.pds'
+ Elseif (Iset.ge.IsetmnSp07 .and. Iset.le.IsetmxSp07) Then
+C (Cteq6.5S) 30 - 34
+ write(nn,'(I2)') Iset
+ Tablefile=Flnm(7)//'s+'//nn(2:2)//'.pds'
+ Elseif (Iset.ge.IsetmnSm07 .and. Iset.le.IsetmxSm07) Then
+C (Cteq6.5S) 35 - 37
+ Is = Iset - 5
+ write(nn,'(I2)') Is
+ Tablefile=Flnm(7)//'s-'//nn(2:2)//'.pds'
+ Elseif (Iset.ge.IsetmnC07 .and. Iset.le.IsetmxC07) Then
+C (Cteq6.5C) 40 - 46
+ write(nn,'(I2)') Iset
+ Tablefile=Flnm(7)//'c'//nn(2:2)//'.pds'
+ Elseif (Iset.ge.Isetmin3 .and. Iset.le.Isetmax3) Then
+C (Cteq6.5) 300 - 340
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(7)//nn(2:3)//'.pds'
+ Elseif (Iset.ge.Isetmin4 .and. Iset.le.Isetmax4) Then
+C (Cteq6.6) 400 - 444
+!CM write(nn,'(I3)') Iset
+ write(nset2,'(I2.2)') nset
+!CM Tablefile=Flnm(8)//nn(2:3)//'.pds'
+ Tablefile=Flnm(8)//nset2//'.pds'
+ Elseif (Iset.ge.IsetmnC08 .and. Iset.le.IsetmxC08) Then
+C (Cteq6.6C) 450 - 453
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(8)//'c'//nn(3:3)//'.pds'
+ Elseif (Iset.ge.IsetmnAS08 .and. Iset.le.IsetmxAS08) Then
+C (Cteq6.6AS) 460 - 463
+ write(nn,'(I3)') Iset
+ Tablefile=Flnm(8)//'a'//nn(3:3)//'.pds'
+ Else
+ Print *, 'Invalid Iset number in SetCtq6 :', Iset
+ Stop
+ Endif
+ IU= NextUn()
+ Open(IU, File='Pdfdata/'//Tablefile, Status='OLD', Err=100)
+ 21 Call Readpds (IU,fmtpds)
+ Close (IU)
+ Isetold=Iset
+ Isetch=1
+ Endif
+ Return
+
+ 100 Print *, ' Data file ', Tablefile, ' cannot be opened '
+ > //'in SetCtq6!!'
+ Stop
+C ********************
+ End
+
+ Subroutine Readpds (Nu,fmtpds)
+ Implicit Double Precision (A-H,O-Z)
+ Character Line*80
+ Logical fmtpds
+ PARAMETER (MXX = 201, MXQ = 25, MXF = 6, MaxVal=4)
+ PARAMETER (MXPQX = (MXF+1+MaxVal) * MXQ * MXX)
+ Common
+ > / CtqPar1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+ > / CtqPar2 / Nx, Nt, NfMx, MxVal
+ > / XQrange / Qini, Qmax, Xmin
+ > / QCDtable / Alambda, Nfl, Iorder
+ > / Masstbl / Amass(6)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, '(A)') Line
+ Read (Nu, *) Dr, Fl, Al, (Amass(I),I=1,6)
+ Iorder = Nint(Dr)
+ Nfl = Nint(Fl)
+ Alambda = Al
+
+ Read (Nu, '(A)') Line
+ If(fmtpds) then
+C This is the .pds (WKT) format
+ Read (Nu, *) N0, N0, N0, NfMx, MxVal, N0
+ If(MxVal.gt.MaxVal) MxVal=3 !old .pds format (read in KF, not MxVal)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) NX, NT, N0, NG, N0
+
+ Read (Nu, '(A)') (Line,I=1,NG+2)
+ Read (Nu, *) QINI, QMAX, (aa,TV(I), I =0, NT)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) XMIN, aa, (XV(I), I =1, NX)
+ XV(0)=0D0
+ Else
+C This is the old .tbl (HLL) format
+ MxVal=2
+ Read (Nu, *) NX, NT, NfMx
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) QINI, QMAX, (TV(I), I =0, NT)
+
+ Read (Nu, '(A)') Line
+ Read (Nu, *) XMIN, (XV(I), I =0, NX)
+
+ Do 11 Iq = 0, NT
+ TV(Iq) = Log(Log (TV(Iq) /Al))
+ 11 Continue
+ Endif
+
+ Nblk = (NX+1) * (NT+1)
+ Npts = Nblk * (NfMx+1+MxVal)
+ Read (Nu, '(A)') Line
+ Read (Nu, *, IOSTAT=IRET) (UPD(I), I=1,Npts)
+
+ Return
+C ****************************
+ End
+
+ Function PartonX6 (IPRTN, XX, QQ)
+
+c Given the parton distribution function in the array U in
+c COMMON / PEVLDT / , this routine interpolates to find
+c the parton distribution at an arbitray point in x and q.
+c
+ Implicit Double Precision (A-H,O-Z)
+
+ PARAMETER (MXX = 201, MXQ = 25, MXF = 6, MaxVal=4)
+ PARAMETER (MXPQX = (MXF+1+MaxVal) * MXQ * MXX)
+
+ Common
+ > / CtqPar1 / Al, XV(0:MXX), TV(0:MXQ), UPD(MXPQX)
+ > / CtqPar2 / Nx, Nt, NfMx, MxVal
+ > / XQrange / Qini, Qmax, Xmin
+ > /Setchange/ Isetch
+
+ Dimension fvec(4), fij(4)
+ Dimension xvpow(0:mxx)
+ Data OneP / 1.00001 /
+ Data xpow / 0.3d0 / !**** choice of interpolation variable
+ Data nqvec / 4 /
+ Data ientry / 0 /
+ Data X, Q, JX, JQ /-1D0, -1D0, 0, 0/
+ Save xvpow
+ Save X, Q, JX, JQ, JLX, JLQ
+ Save ss, const1, const2, const3, const4, const5, const6
+ Save sy2, sy3, s23, tt, t12, t13, t23, t24, t34, ty2, ty3
+ Save tmp1, tmp2, tdet
+
+ If((XX.eq.X).and.(QQ.eq.Q)) goto 99
+c store the powers used for interpolation on first call...
+ if(Isetch .eq. 1) then
+ Isetch = 0
+
+ xvpow(0) = 0D0
+ do i = 1, nx
+ xvpow(i) = xv(i)**xpow
+ enddo
+ endif
+
+ X = XX
+ Q = QQ
+ tt = log(log(Q/Al))
+
+c ------------- find lower end of interval containing x, i.e.,
+c get jx such that xv(jx) .le. x .le. xv(jx+1)...
+ JLx = -1
+ JU = Nx+1
+ 11 If (JU-JLx .GT. 1) Then
+ JM = (JU+JLx) / 2
+ If (X .Ge. XV(JM)) Then
+ JLx = JM
+ Else
+ JU = JM
+ Endif
+ Goto 11
+ Endif
+C Ix 0 1 2 Jx JLx Nx-2 Nx
+C |---|---|---|...|---|-x-|---|...|---|---|
+C x 0 Xmin x 1
+C
+ If (JLx .LE. -1) Then
+ Print '(A,1pE12.4)', 'Severe error: x <= 0 in PartonX6! x = ', x
+ Stop
+ ElseIf (JLx .Eq. 0) Then
+ Jx = 0
+ Elseif (JLx .LE. Nx-2) Then
+
+C For interrior points, keep x in the middle, as shown above
+ Jx = JLx - 1
+ Elseif (JLx.Eq.Nx-1 .or. x.LT.OneP) Then
+
+C We tolerate a slight over-shoot of one (OneP=1.00001),
+C perhaps due to roundoff or whatever, but not more than that.
+C Keep at least 4 points >= Jx
+ Jx = JLx - 2
+ Else
+ Print '(A,1pE12.4)', 'Severe error: x > 1 in PartonX6! x = ', x
+ Stop
+ Endif
+C ---------- Note: JLx uniquely identifies the x-bin; Jx does not.
+
+C This is the variable to be interpolated in
+ ss = x**xpow
+
+ If (JLx.Ge.2 .and. JLx.Le.Nx-2) Then
+
+c initiation work for "interior bins": store the lattice points in s...
+ svec1 = xvpow(jx)
+ svec2 = xvpow(jx+1)
+ svec3 = xvpow(jx+2)
+ svec4 = xvpow(jx+3)
+
+ s12 = svec1 - svec2
+ s13 = svec1 - svec3
+ s23 = svec2 - svec3
+ s24 = svec2 - svec4
+ s34 = svec3 - svec4
+
+ sy2 = ss - svec2
+ sy3 = ss - svec3
+
+c constants needed for interpolating in s at fixed t lattice points...
+ const1 = s13/s23
+ const2 = s12/s23
+ const3 = s34/s23
+ const4 = s24/s23
+ s1213 = s12 + s13
+ s2434 = s24 + s34
+ sdet = s12*s34 - s1213*s2434
+ tmp = sy2*sy3/sdet
+ const5 = (s34*sy2-s2434*sy3)*tmp/s12
+ const6 = (s1213*sy2-s12*sy3)*tmp/s34
+
+ EndIf
+
+c --------------Now find lower end of interval containing Q, i.e.,
+c get jq such that qv(jq) .le. q .le. qv(jq+1)...
+ JLq = -1
+ JU = NT+1
+ 12 If (JU-JLq .GT. 1) Then
+ JM = (JU+JLq) / 2
+ If (tt .GE. TV(JM)) Then
+ JLq = JM
+ Else
+ JU = JM
+ Endif
+ Goto 12
+ Endif
+
+ If (JLq .LE. 0) Then
+ Jq = 0
+ Elseif (JLq .LE. Nt-2) Then
+C keep q in the middle, as shown above
+ Jq = JLq - 1
+ Else
+C JLq .GE. Nt-1 case: Keep at least 4 points >= Jq.
+ Jq = Nt - 3
+
+ Endif
+C This is the interpolation variable in Q
+
+ If (JLq.GE.1 .and. JLq.LE.Nt-2) Then
+c store the lattice points in t...
+ tvec1 = Tv(jq)
+ tvec2 = Tv(jq+1)
+ tvec3 = Tv(jq+2)
+ tvec4 = Tv(jq+3)
+
+ t12 = tvec1 - tvec2
+ t13 = tvec1 - tvec3
+ t23 = tvec2 - tvec3
+ t24 = tvec2 - tvec4
+ t34 = tvec3 - tvec4
+
+ ty2 = tt - tvec2
+ ty3 = tt - tvec3
+
+ tmp1 = t12 + t13
+ tmp2 = t24 + t34
+
+ tdet = t12*t34 - tmp1*tmp2
+
+ EndIf
+
+
+c get the pdf function values at the lattice points...
+
+ 99 If (Iprtn .Gt. MxVal) Then
+ Ip = - Iprtn
+ Else
+ Ip = Iprtn
+ EndIf
+ jtmp = ((Ip + NfMx)*(NT+1)+(jq-1))*(NX+1)+jx+1
+
+ Do it = 1, nqvec
+
+ J1 = jtmp + it*(NX+1)
+
+ If (Jx .Eq. 0) Then
+C For the first 4 x points, interpolate x^2*f(x,Q)
+C This applies to the two lowest bins JLx = 0, 1
+C We can not put the JLx.eq.1 bin into the "interrior" section
+C (as we do for q), since Upd(J1) is undefined.
+ fij(1) = 0
+ fij(2) = Upd(J1+1) * XV(1)**2
+ fij(3) = Upd(J1+2) * XV(2)**2
+ fij(4) = Upd(J1+3) * XV(3)**2
+C
+C Use Polint which allows x to be anywhere w.r.t. the grid
+
+ Call Polint4F (XVpow(0), Fij(1), ss, Fx)
+
+ If (x .GT. 0D0) Fvec(it) = Fx / x**2
+C Pdf is undefined for x.eq.0
+ ElseIf (JLx .Eq. Nx-1) Then
+C This is the highest x bin:
+
+ Call Polint4F (XVpow(Nx-3), Upd(J1), ss, Fx)
+
+ Fvec(it) = Fx
+
+ Else
+C for all interior points, use Jon's in-line function
+C This applied to (JLx.Ge.2 .and. JLx.Le.Nx-2)
+ sf2 = Upd(J1+1)
+ sf3 = Upd(J1+2)
+
+ g1 = sf2*const1 - sf3*const2
+ g4 = -sf2*const3 + sf3*const4
+
+ Fvec(it) = (const5*(Upd(J1)-g1)
+ & + const6*(Upd(J1+3)-g4)
+ & + sf2*sy3 - sf3*sy2) / s23
+
+ Endif
+
+ enddo
+C We now have the four values Fvec(1:4)
+c interpolate in t...
+
+ If (JLq .LE. 0) Then
+C 1st Q-bin, as well as extrapolation to lower Q
+ Call Polint4F (TV(0), Fvec(1), tt, ff)
+
+ ElseIf (JLq .GE. Nt-1) Then
+C Last Q-bin, as well as extrapolation to higher Q
+ Call Polint4F (TV(Nt-3), Fvec(1), tt, ff)
+ Else
+C Interrior bins : (JLq.GE.1 .and. JLq.LE.Nt-2)
+C which include JLq.Eq.1 and JLq.Eq.Nt-2, since Upd is defined for
+C the full range QV(0:Nt) (in contrast to XV)
+ tf2 = fvec(2)
+ tf3 = fvec(3)
+
+ g1 = ( tf2*t13 - tf3*t12) / t23
+ g4 = (-tf2*t34 + tf3*t24) / t23
+
+ h00 = ((t34*ty2-tmp2*ty3)*(fvec(1)-g1)/t12
+ & + (tmp1*ty2-t12*ty3)*(fvec(4)-g4)/t34)
+
+ ff = (h00*ty2*ty3/tdet + tf2*ty3 - tf3*ty2) / t23
+ EndIf
+
+ PartonX6 = ff
+
+ Return
+C ********************
+ End
+
+ SUBROUTINE POLINT4F (XA,YA,X,Y)
+
+ IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+C The POLINT4 routine is based on the POLINT routine from "Numerical Recipes",
+C but assuming N=4, and ignoring the error estimation.
+C suggested by Z. Sullivan.
+ DIMENSION XA(*),YA(*)
+
+ H1=XA(1)-X
+ H2=XA(2)-X
+ H3=XA(3)-X
+ H4=XA(4)-X
+
+ W=YA(2)-YA(1)
+ DEN=W/(H1-H2)
+ D1=H2*DEN
+ C1=H1*DEN
+
+ W=YA(3)-YA(2)
+ DEN=W/(H2-H3)
+ D2=H3*DEN
+ C2=H2*DEN
+
+ W=YA(4)-YA(3)
+ DEN=W/(H3-H4)
+ D3=H4*DEN
+ C3=H3*DEN
+
+ W=C2-D1
+ DEN=W/(H1-H3)
+ CD1=H3*DEN
+ CC1=H1*DEN
+
+ W=C3-D2
+ DEN=W/(H2-H4)
+ CD2=H4*DEN
+ CC2=H2*DEN
+
+ W=CC2-CD1
+ DEN=W/(H1-H4)
+ DD1=H4*DEN
+ DC1=H1*DEN
+
+ If((H3+H4).lt.0D0) Then
+ Y=YA(4)+D3+CD2+DD1
+ Elseif((H2+H3).lt.0D0) Then
+ Y=YA(3)+D2+CD1+DC1
+ Elseif((H1+H2).lt.0D0) Then
+ Y=YA(2)+C2+CD1+DC1
+ ELSE
+ Y=YA(1)+C1+CC1+DC1
+ ENDIF
+
+ RETURN
+C *************************
+ END
+
+ Function NextUn()
+C Returns an unallocated FORTRAN i/o unit.
+ Logical EX
+C
+ Do 10 N = 10, 300
+ INQUIRE (UNIT=N, OPENED=EX)
+ If (.NOT. EX) then
+ NextUn = N
+ Return
+ Endif
+ 10 Continue
+ Stop ' There is no available I/O unit. '
+C *************************
+ End
+C
+
+
+
+C----------------------------------------------------------------------
+C-- Fortran interpolation code for MSTW PDFs, building on existing
+C-- MRST Fortran code and Jeppe Andersen's C++ code.
+C-- Three user interfaces:
+C-- call GetAllPDFs(prefix,ih,x,q,upv,dnv,usea,dsea,
+C-- str,sbar,chm,cbar,bot,bbar,glu,phot)
+C-- call GetAllPDFsAlt(prefix,ih,x,q,xpdf,xphoton)
+C-- xf = GetOnePDF(prefix,ih,x,q,f)
+C-- See enclosed example.f for usage.
+C-- Comments to Graeme Watt <watt(at)hep.ucl.ac.uk>.
+C----------------------------------------------------------------------
+
+C----------------------------------------------------------------------
+
+C-- Traditional MRST-like interface: return all flavours.
+C-- (Note the additional "sbar", "cbar", "bbar" and "phot"
+C-- compared to previous MRST releases.)
+ subroutine GetAllPDFs(prefix,ih,x,q,
+ & upv,dnv,usea,dsea,str,sbar,chm,cbar,bot,bbar,glu,phot)
+ implicit none
+ integer ih
+ double precision x,q,upv,dnv,usea,dsea,str,sbar,chm,cbar,
+ & bot,bbar,glu,phot,GetOnePDF,up,dn,sv,cv,bv
+ character*(*) prefix
+
+C-- Quarks.
+ dn = GetOnePDF(prefix,ih,x,q,1)
+ up = GetOnePDF(prefix,ih,x,q,2)
+ str = GetOnePDF(prefix,ih,x,q,3)
+ chm = GetOnePDF(prefix,ih,x,q,4)
+ bot = GetOnePDF(prefix,ih,x,q,5)
+
+C-- Valence quarks.
+ dnv = GetOnePDF(prefix,ih,x,q,7)
+ upv = GetOnePDF(prefix,ih,x,q,8)
+ sv = GetOnePDF(prefix,ih,x,q,9)
+ cv = GetOnePDF(prefix,ih,x,q,10)
+ bv = GetOnePDF(prefix,ih,x,q,11)
+
+C-- Antiquarks = quarks - valence quarks.
+ dsea = dn - dnv
+ usea = up - upv
+ sbar = str - sv
+ cbar = chm - cv
+ bbar = bot - bv
+
+C-- Gluon.
+ glu = GetOnePDF(prefix,ih,x,q,0)
+
+C-- Photon (= zero unless considering QED contributions).
+ phot = GetOnePDF(prefix,ih,x,q,13)
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+C-- Alternative LHAPDF-like interface: return PDFs in an array.
+ subroutine GetAllPDFsAlt(prefix,ih,x,q,xpdf,xphoton)
+ implicit none
+ integer ih,f
+ double precision x,q,xpdf(-6:6),xphoton,xvalence,GetOnePDF
+ character*(*) prefix
+
+ do f = 1, 6
+ xpdf(f) = GetOnePDF(prefix,ih,x,q,f) ! quarks
+ xvalence = GetOnePDF(prefix,ih,x,q,f+6) ! valence quarks
+ xpdf(-f) = xpdf(f) - xvalence ! antiquarks
+ end do
+ xpdf(0) = GetOnePDF(prefix,ih,x,q,0) ! gluon
+ xphoton = GetOnePDF(prefix,ih,x,q,13) ! photon
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+C-- Get only one parton flavour 'f', using PDG notation:
+C-- f = -6, -5, -4, -3, -2, -1,0,1,2,3,4,5,6
+C-- = tbar,bbar,cbar,sbar,ubar,dbar,g,d,u,s,c,b,t.
+C-- Can also get valence quarks directly:
+C-- f = 7, 8, 9,10,11,12.
+C-- = dv,uv,sv,cv,bv,tv.
+C-- Photon: f = 13.
+ double precision function GetOnePDF(prefix,ih,x,q,f)
+ implicit none
+ logical warn,fatal
+ parameter(warn=.false.,fatal=.true.)
+C-- Set warn=.true. to turn on warnings when extrapolating.
+C-- Set fatal=.false. to return zero instead of terminating when
+C-- invalid input values of x and q are used.
+ integer ih,f,nhess,nx,nq,np,nqc0,nqb0,nqc,nqb,n,m,ip,io,
+ & alphaSorder,nExtraFlavours
+ double precision x,q,xmin,xmax,qsqmin,qsqmax,mc2,mb2,eps,
+ & dummy,qsq,xlog,qsqlog,res,res1,anom,ExtrapolatePDF,
+ & InterpolatePDF,distance,tolerance,
+ & mCharm,mBottom,alphaSQ0,alphaSMZ
+ parameter(nx=64,nq=48,np=12,nqc0=4,nqb0=14,
+ & nqc=nq-nqc0,nqb=nq-nqb0)
+ parameter(xmin=1d-6,xmax=1d0,qsqmin=1d0,qsqmax=1d9,eps=1d-6)
+ parameter(nhess=2*20)
+ character set*2,prefix*(*),filename*60,oldprefix(0:nhess)*50
+ character dummyChar,dummyWord*50
+ double precision ff(np,nx,nq)
+ double precision qq(nq),xx(nx),cc(np,0:nhess,nx,nq,4,4)
+ double precision xxl(nx),qql(nq)
+C-- Store distance along each eigenvector, tolerance,
+C-- heavy quark masses and alphaS parameters in COMMON block.
+ common/mstwCommon/distance,tolerance,
+ & mCharm,mBottom,alphaSQ0,alphaSMZ,alphaSorder
+ save
+ data xx/1d-6,2d-6,4d-6,6d-6,8d-6,
+ & 1d-5,2d-5,4d-5,6d-5,8d-5,
+ & 1d-4,2d-4,4d-4,6d-4,8d-4,
+ & 1d-3,2d-3,4d-3,6d-3,8d-3,
+ & 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
+ & .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
+ & .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
+ & .5d0,.525d0,.55d0,.575d0,.6d0,.625d0,.65d0,.675d0,
+ & .7d0,.725d0,.75d0,.775d0,.8d0,.825d0,.85d0,.875d0,
+ & .9d0,.925d0,.95d0,.975d0,1d0/
+ data qq/1.d0,
+ & 1.25d0,1.5d0,0.d0,0.d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,
+ & 1d1,1.2d1,0.d0,0.d0,2.6d1,4d1,6.4d1,1d2,
+ & 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
+ & 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
+ & 1.8d6,3.2d6,5.6d6,1d7,1.8d7,3.2d7,5.6d7,1d8,
+ & 1.8d8,3.2d8,5.6d8,1d9/
+
+ if (f.lt.-6.or.f.gt.13) then
+ print *,"Error: invalid parton flavour = ",f
+ stop
+ end if
+
+ if (ih.lt.0.or.ih.gt.nhess) then
+ print *,"Error: invalid eigenvector number = ",ih
+ stop
+ end if
+
+C-- Check if the requested parton set is already in memory.
+ if (oldprefix(ih).ne.prefix) then
+
+C-- Start of initialisation for eigenvector set "i" ...
+C-- Do this only the first time the set "i" is called,
+C-- OR if the prefix has changed from the last time.
+
+C-- Check that the character arrays "oldprefix" and "filename"
+C-- are large enough.
+ if (len_trim(prefix).gt.len(oldprefix(ih))) then
+ print *,"Error in GetOnePDF: increase size of oldprefix"
+ stop
+ else if (len_trim(prefix)+7.gt.len(filename)) then
+ print *,"Error in GetOnePDF: increase size of filename"
+ stop
+ end if
+
+ write(set,'(I2.2)') ih ! convert integer to string
+C-- Remove trailing blanks from prefix before assigning filename.
+ filename = prefix(1:len_trim(prefix))//'.'//set//'.dat'
+C-- Line below can be commented out if you don't want this message.
+ print *,"Reading PDF grid from ",filename(1:len_trim(filename))
+ open(unit=33,file=filename,iostat=io,status='old')
+ if (io.ne.0) then
+ print *,"Error in GetOnePDF: can't open ",
+ & filename(1:len_trim(filename))
+ stop
+ end if
+
+C-- Read header containing heavy quark masses and alphaS values.
+ read(33,*)
+ read(33,*)
+ read(33,*) dummyChar,dummyWord,dummyWord,dummyChar,
+ & distance,tolerance
+ read(33,*) dummyChar,dummyWord,dummyChar,mCharm
+ read(33,*) dummyChar,dummyWord,dummyChar,mBottom
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSQ0
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSMZ
+ read(33,*) dummyChar,dummyWord,dummyChar,alphaSorder
+ read(33,*) dummyChar,dummyWord,dummyChar,nExtraFlavours
+ read(33,*)
+ read(33,*)
+ mc2=mCharm**2
+ mb2=mBottom**2
+ qq(4)=mc2
+ qq(5)=mc2+eps
+ qq(14)=mb2
+ qq(15)=mb2+eps
+
+C-- Check that the heavy quark masses are sensible.
+ if (mc2.lt.qq(3).or.mc2.gt.qq(6)) then
+ print *,"Error in GetOnePDF: invalid mCharm = ",mCharm
+ stop
+ end if
+ if (mb2.lt.qq(13).or.mb2.gt.qq(16)) then
+ print *,"Error in GetOnePDF: invalid mBottom = ",mBottom
+ stop
+ end if
+
+C-- The nExtraFlavours variable is provided to aid compatibility
+C-- with future grids where, for example, a photon distribution
+C-- might be provided (cf. the MRST2004QED PDFs).
+ if (nExtraFlavours.lt.0.or.nExtraFlavours.gt.1) then
+ print *,"Error in GetOnePDF: invalid nExtraFlavours = ",
+ & nExtraFlavours
+ stop
+ end if
+
+C-- Now read in the grids from the grid file.
+ do n=1,nx-1
+ do m=1,nq
+ if (nExtraFlavours.gt.0) then
+ if (alphaSorder.eq.2) then ! NNLO
+ read(33,'(12(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,12)
+ else ! LO or NLO
+ ff(10,n,m) = 0.d0 ! = chm-cbar
+ ff(11,n,m) = 0.d0 ! = bot-bbar
+ read(33,'(10(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,9),ff(12,n,m)
+ end if
+ else ! nExtraFlavours = 0
+ if (alphaSorder.eq.2) then ! NNLO
+ ff(12,n,m) = 0.d0 ! = photon
+ read(33,'(11(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,11)
+ else ! LO or NLO
+ ff(10,n,m) = 0.d0 ! = chm-cbar
+ ff(11,n,m) = 0.d0 ! = bot-bbar
+ ff(12,n,m) = 0.d0 ! = photon
+ read(33,'(9(1pe12.4))',iostat=io)
+ & (ff(ip,n,m),ip=1,9)
+ end if
+ end if
+ if (io.ne.0) then
+ print *,"Error in GetOnePDF reading ",filename
+ stop
+ end if
+ enddo
+ enddo
+
+C-- Check that ALL the file contents have been read in.
+ read(33,*,iostat=io) dummy
+ if (io.eq.0) then
+ print *,"Error in GetOnePDF: not at end of ",filename
+ stop
+ end if
+ close(unit=33)
+
+C-- PDFs are identically zero at x = 1.
+ do m=1,nq
+ do ip=1,np
+ ff(ip,nx,m)=0d0
+ enddo
+ enddo
+
+ do n=1,nx
+ xxl(n)=log10(xx(n))
+ enddo
+ do m=1,nq
+ qql(m)=log10(qq(m))
+ enddo
+
+C-- Initialise all parton flavours.
+ do ip=1,np
+ call InitialisePDF(ip,np,ih,nhess,nx,nq,nqc0,nqb0,
+ & xxl,qql,ff,cc)
+ enddo
+
+ oldprefix(ih) = prefix
+
+C-- ... End of initialisation for eigenvector set "ih".
+
+ end if ! oldprefix(ih).ne.prefix
+
+C----------------------------------------------------------------------
+
+ qsq=q*q
+C-- If mc2 < qsq < mc2+eps, then qsq = mc2+eps.
+ if (qsq.gt.qq(nqc0).and.qsq.lt.qq(nqc0+1)) qsq = qq(nqc0+1)
+C-- If mb2 < qsq < mb2+eps, then qsq = mb2+eps.
+ if (qsq.gt.qq(nqb0).and.qsq.lt.qq(nqb0+1)) qsq = qq(nqb0+1)
+
+ xlog=log10(x)
+ qsqlog=log10(qsq)
+
+ res = 0.d0
+
+ if (f.eq.0) then ! gluon
+ ip = 1
+ else if (f.ge.1.and.f.le.5) then ! quarks
+ ip = f+1
+ else if (f.le.-1.and.f.ge.-5) then ! antiquarks
+ ip = -f+1
+ else if (f.ge.7.and.f.le.11) then ! valence quarks
+ ip = f
+ else if (f.eq.13) then ! photon
+ ip = 12
+ else if (abs(f).ne.6.and.f.ne.12) then
+ if (warn.or.fatal) print *,"Error in GetOnePDF: f = ",f
+ if (fatal) stop
+ end if
+
+ if (x.le.0.d0.or.x.gt.xmax.or.q.le.0.d0) then
+
+ if (warn.or.fatal) print *,"Error in GetOnePDF: x,qsq = ",
+ & x,qsq
+ if (fatal) stop
+
+ else if (abs(f).eq.6.or.f.eq.12) then ! set top quarks to zero
+
+ res = 0.d0
+
+ else if (qsq.lt.qsqmin) then ! extrapolate to low Q^2
+
+ if (warn) then
+ print *, "Warning in GetOnePDF, extrapolating: f = ",f,
+ & ", x = ",x,", q = ",q
+ end if
+
+ if (x.lt.xmin) then ! extrapolate to low x
+
+ res = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = res1 - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ end if
+
+ else ! do usual interpolation
+
+ res = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(qsqmin),nx,nq,xxl,qql,cc)
+ res1 = res1 - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & log10(1.01D0*qsqmin),nx,nq,xxl,qql,cc)
+ end if
+
+ end if
+
+C-- Calculate the anomalous dimension, dlog(xf)/dlog(qsq),
+C-- evaluated at qsqmin. Then extrapolate the PDFs to low
+C-- qsq < qsqmin by interpolating the anomalous dimenion between
+C-- the value at qsqmin and a value of 1 for qsq << qsqmin.
+C-- If value of PDF at qsqmin is very small, just set
+C-- anomalous dimension to 1 to prevent rounding errors.
+ if (abs(res).ge.1.D-5) then
+ anom = (res1-res)/res/0.01D0
+ else
+ anom = 1.D0
+ end if
+ res = res*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin)
+
+ else if (x.lt.xmin.or.qsq.gt.qsqmax) then ! extrapolate
+
+ if (warn) then
+ print *, "Warning in GetOnePDF, extrapolating: f = ",f,
+ & ", x = ",x,", q = ",q
+ end if
+
+ res = ExtrapolatePDF(ip,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - ExtrapolatePDF(ip+5,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+ end if
+
+ else ! do usual interpolation
+
+ res = InterpolatePDF(ip,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+
+ if (f.le.-1.and.f.ge.-5) then ! antiquark = quark - valence
+ res = res - InterpolatePDF(ip+5,np,ih,nhess,xlog,
+ & qsqlog,nx,nq,xxl,qql,cc)
+ end if
+
+ end if
+
+ GetOnePDF = res
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ subroutine InitialisePDF(ip,np,ih,nhess,nx,my,myc0,myb0,
+ & xx,yy,ff,cc)
+ implicit none
+ integer nhess,ih,nx,my,myc0,myb0,j,k,l,m,n,ip,np
+ double precision xx(nx),yy(my),ff(np,nx,my),
+ & ff1(nx,my),ff2(nx,my),ff12(nx,my),ff21(nx,my),
+ & yy0(4),yy1(4),yy2(4),yy12(4),z(16),
+ & cl(16),cc(np,0:nhess,nx,my,4,4),iwt(16,16),
+ & polderiv1,polderiv2,polderiv3,d1,d2,d1d2,xxd
+
+ data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
+ & -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
+ & 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
+ & 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ & 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
+ & 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
+ & -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
+ & 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
+ & -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
+ & 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
+ & 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
+ & -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
+ & 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
+
+ do m=1,my
+ ff1(1,m)=polderiv1(xx(1),xx(2),xx(3),
+ & ff(ip,1,m),ff(ip,2,m),ff(ip,3,m))
+ ff1(nx,m)=polderiv3(xx(nx-2),xx(nx-1),xx(nx),
+ & ff(ip,nx-2,m),ff(ip,nx-1,m),ff(ip,nx,m))
+ do n=2,nx-1
+ ff1(n,m)=polderiv2(xx(n-1),xx(n),xx(n+1),
+ & ff(ip,n-1,m),ff(ip,n,m),ff(ip,n+1,m))
+ enddo
+ enddo
+
+C-- Calculate the derivatives at qsq=mc2,mc2+eps,mb2,mb2+eps
+C-- in a similar way as at the endpoints qsqmin and qsqmax.
+ do n=1,nx
+ do m=1,my
+ if (m.eq.1.or.m.eq.myc0+1.or.m.eq.myb0+1) then
+ ff2(n,m)=polderiv1(yy(m),yy(m+1),yy(m+2),
+ & ff(ip,n,m),ff(ip,n,m+1),ff(ip,n,m+2))
+ else if (m.eq.my.or.m.eq.myc0.or.m.eq.myb0) then
+ ff2(n,m)=polderiv3(yy(m-2),yy(m-1),yy(m),
+ & ff(ip,n,m-2),ff(ip,n,m-1),ff(ip,n,m))
+ else
+ ff2(n,m)=polderiv2(yy(m-1),yy(m),yy(m+1),
+ & ff(ip,n,m-1),ff(ip,n,m),ff(ip,n,m+1))
+ end if
+ end do
+ end do
+
+C-- Calculate the cross derivatives (d/dx)(d/dy).
+ do m=1,my
+ ff12(1,m)=polderiv1(xx(1),xx(2),xx(3),
+ & ff2(1,m),ff2(2,m),ff2(3,m))
+ ff12(nx,m)=polderiv3(xx(nx-2),xx(nx-1),xx(nx),
+ & ff2(nx-2,m),ff2(nx-1,m),ff2(nx,m))
+ do n=2,nx-1
+ ff12(n,m)=polderiv2(xx(n-1),xx(n),xx(n+1),
+ & ff2(n-1,m),ff2(n,m),ff2(n+1,m))
+ enddo
+ enddo
+
+C-- Calculate the cross derivatives (d/dy)(d/dx).
+ do n=1,nx
+ do m = 1, my
+ if (m.eq.1.or.m.eq.myc0+1.or.m.eq.myb0+1) then
+ ff21(n,m)=polderiv1(yy(m),yy(m+1),yy(m+2),
+ & ff1(n,m),ff1(n,m+1),ff1(n,m+2))
+ else if (m.eq.my.or.m.eq.myc0.or.m.eq.myb0) then
+ ff21(n,m)=polderiv3(yy(m-2),yy(m-1),yy(m),
+ & ff1(n,m-2),ff1(n,m-1),ff1(n,m))
+ else
+ ff21(n,m)=polderiv2(yy(m-1),yy(m),yy(m+1),
+ & ff1(n,m-1),ff1(n,m),ff1(n,m+1))
+ end if
+ end do
+ end do
+
+C-- Take the average of (d/dx)(d/dy) and (d/dy)(d/dx).
+ do n=1,nx
+ do m = 1, my
+ ff12(n,m)=0.5*(ff12(n,m)+ff21(n,m))
+ end do
+ end do
+
+ do n=1,nx-1
+ do m=1,my-1
+ d1=xx(n+1)-xx(n)
+ d2=yy(m+1)-yy(m)
+ d1d2=d1*d2
+
+ yy0(1)=ff(ip,n,m)
+ yy0(2)=ff(ip,n+1,m)
+ yy0(3)=ff(ip,n+1,m+1)
+ yy0(4)=ff(ip,n,m+1)
+
+ yy1(1)=ff1(n,m)
+ yy1(2)=ff1(n+1,m)
+ yy1(3)=ff1(n+1,m+1)
+ yy1(4)=ff1(n,m+1)
+
+ yy2(1)=ff2(n,m)
+ yy2(2)=ff2(n+1,m)
+ yy2(3)=ff2(n+1,m+1)
+ yy2(4)=ff2(n,m+1)
+
+ yy12(1)=ff12(n,m)
+ yy12(2)=ff12(n+1,m)
+ yy12(3)=ff12(n+1,m+1)
+ yy12(4)=ff12(n,m+1)
+
+ do k=1,4
+ z(k)=yy0(k)
+ z(k+4)=yy1(k)*d1
+ z(k+8)=yy2(k)*d2
+ z(k+12)=yy12(k)*d1d2
+ enddo
+
+ do l=1,16
+ xxd=0.d0
+ do k=1,16
+ xxd=xxd+iwt(k,l)*z(k)
+ enddo
+ cl(l)=xxd
+ enddo
+ l=0
+ do k=1,4
+ do j=1,4
+ l=l+1
+ cc(ip,ih,n,m,k,j)=cl(l)
+ enddo
+ enddo
+ enddo
+ enddo
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function InterpolatePDF(ip,np,ih,nhess,x,y,
+ & nx,my,xx,yy,cc)
+ implicit none
+ integer ih,nx,my,nhess,locx,l,m,n,ip,np
+ double precision xx(nx),yy(my),cc(np,0:nhess,nx,my,4,4),
+ & x,y,z,t,u
+
+ n=locx(xx,nx,x)
+ m=locx(yy,my,y)
+
+ t=(x-xx(n))/(xx(n+1)-xx(n))
+ u=(y-yy(m))/(yy(m+1)-yy(m))
+
+ z=0.d0
+ do l=4,1,-1
+ z=t*z+((cc(ip,ih,n,m,l,4)*u+cc(ip,ih,n,m,l,3))*u
+ . +cc(ip,ih,n,m,l,2))*u+cc(ip,ih,n,m,l,1)
+ enddo
+
+ InterpolatePDF = z
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function ExtrapolatePDF(ip,np,ih,nhess,x,y,
+ & nx,my,xx,yy,cc)
+ implicit none
+ integer ih,nx,my,nhess,locx,n,m,ip,np
+ double precision xx(nx),yy(my),cc(np,0:nhess,nx,my,4,4),
+ & x,y,z,f0,f1,z0,z1,InterpolatePDF
+
+ n=locx(xx,nx,x) ! 0: below xmin, nx: above xmax
+ m=locx(yy,my,y) ! 0: below qsqmin, my: above qsqmax
+
+C-- If extrapolation in small x only:
+ if (n.eq.0.and.m.gt.0.and.m.lt.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(1),y,nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(2),y,nx,my,xx,yy,cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z = exp(log(f0)+(log(f1)-log(f0))/(xx(2)-xx(1))*(x-xx(1)))
+ else
+ z = f0+(f1-f0)/(xx(2)-xx(1))*(x-xx(1))
+ end if
+C-- If extrapolation into large q only:
+ else if (n.gt.0.and.m.eq.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,x,yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,x,yy(my-1),nx,my,xx,yy,cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+C-- If extrapolation into large q AND small x:
+ else if (n.eq.0.and.m.eq.my) then
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(1),yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(1),yy(my-1),nx,my,xx,yy,
+ & cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z0 = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z0 = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+ f0 = InterpolatePDF(ip,np,ih,nhess,xx(2),yy(my),nx,my,xx,yy,cc)
+ f1 = InterpolatePDF(ip,np,ih,nhess,xx(2),yy(my-1),nx,my,xx,yy,
+ & cc)
+ if (f0.gt.0.d0.and.f1.gt.0.d0) then
+ z1 = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))*
+ & (y-yy(my)))
+ else
+ z1 = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my))
+ end if
+ if (z0.gt.0.d0.and.z1.gt.0.d0) then
+ z = exp(log(z0)+(log(z1)-log(z0))/(xx(2)-xx(1))*(x-xx(1)))
+ else
+ z = z0+(z1-z0)/(xx(2)-xx(1))*(x-xx(1))
+ end if
+ else
+ print *,"Error in ExtrapolatePDF"
+ stop
+ end if
+
+ ExtrapolatePDF = z
+
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ integer function locx(xx,nx,x)
+C-- returns an integer j such that x lies inbetween xx(j) and xx(j+1).
+C-- nx is the length of the array with xx(nx) the highest element.
+ implicit none
+ integer nx,jl,ju,jm
+ double precision x,xx(nx)
+ if(x.eq.xx(1)) then
+ locx=1
+ return
+ endif
+ if(x.eq.xx(nx)) then
+ locx=nx-1
+ return
+ endif
+ ju=nx+1
+ jl=0
+ 1 if((ju-jl).le.1) go to 2
+ jm=(ju+jl)/2
+ if(x.ge.xx(jm)) then
+ jl=jm
+ else
+ ju=jm
+ endif
+ go to 1
+ 2 locx=jl
+ return
+ end
+
+C----------------------------------------------------------------------
+
+ double precision function polderiv1(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x1 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv1=(x3*x3*(y1-y2)+2.d0*x1*(x3*(-y1+y2)+x2*(y1-y3))
+ & +x2*x2*(-y1+y3)+x1*x1*(-y2+y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+ double precision function polderiv2(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x2 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv2=(x3*x3*(y1-y2)-2.d0*x2*(x3*(y1-y2)+x1*(y2-y3))
+ & +x2*x2*(y1-y3)+x1*x1*(y2-y3))/((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+ double precision function polderiv3(x1,x2,x3,y1,y2,y3)
+C-- returns the estimate of the derivative at x3 obtained by a
+C-- polynomial interpolation using the three points (x_i,y_i).
+ implicit none
+ double precision x1,x2,x3,y1,y2,y3
+ polderiv3=(x3*x3*(-y1+y2)+2.d0*x2*x3*(y1-y3)+x1*x1*(y2-y3)
+ & +x2*x2*(-y1+y3)+2.d0*x1*x3*(-y2+y3))/
+ & ((x1-x2)*(x1-x3)*(x2-x3))
+ return
+ end
+
+C----------------------------------------------------------------------
+
+
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! JR09VFNNLO (To be published)
+!! (See also: Phys. Rev. D79 (2009) 074023 and arXiv:0810.4274)
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! This package contains the JR09 VFNS NNLO(MSbar) dynamical parton
+!! distributions of the nucleon and their associated exact iterative
+!! solutions for alpha_s.
+!!
+!! The sets resulting from displacements in the parameter space with
+!! respect to the central value of the NNLO(MSbar) fit along the plus
+!! (minus) directions of the (rescaled) eigenvectors of the hessian
+!! matrix are included. The tolerance parameter for these displacements
+!! was chosen to be T = 4.535 for a total of 1568 fitted points. Since
+!! alpha_s was included as a free parameter in the error estimation the
+!! use of the provided alpha_s solution for each set is mandatory for
+!! uncertainty studies (the difference on alpha_s for different
+!! eigenvector sets can be as large as 10% at low scales).
+!!
+!! The grids are generated for 10^-9 <= x <= 1 and Qo^2 <= Q^2 <= 10^8
+!! (GeV^2) where Qo^2 = 0.55 GeV^2 for the NNLO distributions. Outside
+!! these ranges the output is either set to NaN or obtained through
+!! extrapolation and should NOT be used.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! The routines use a modification of the standard multidimensional
+!! linear interpolation routine FINT (CERNLIB E104) distributed as the
+!! file 'dfint.f'.
+!! The file './JR09VFNNLO.grd', where ./ means the path from the working
+!! directory to the file, is read.
+!! For questions, comments, problems etc please contact:
+!! pjimenez@het.physik.uni-dortmund.de
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! JR09VFNNLOinit:
+!! Initialization routine of the package to be called (only once)
+!! before using any of the other subroutines.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! JR09VFNNLOx'parton'(x,Q2,set) with 'parton' = uv,dv,gl,ub,db,sb,cb,bb:
+!! Parton distribution 'parton' (times x).
+!! x == Bjorken-x.
+!! Q2 == Q**2 (GeV**2) == Factorization scale
+!! == Renormalization scale.
+!! set == set to be used.
+!! JR09VFNNLOalphas(Q2,set):
+!! Value of alpha_s (no additional 2pi or 4pi factors).
+!! Q2 == Q**2 (GeV**2) == Renormalization scale.
+!! set == set to be used.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! set == Index specifying the set to be used:
+!! 0 NNLO(MSbar).
+!! 1,2,...,13 set corresponding to a displacement +T with respect
+!! to the set 0 in the direction of the ith eigenvector.
+!! -1,-2,...,-13 the same for displacements -T.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ block data JR09VFNNLO
+ implicit none
+ integer shape(2)
+ double precision grid(217)
+ common /JR09VFNNLOgrid/ grid,shape
+ data shape /118,99/
+ data grid
+ & /1d-9,1.25d-9,1.6d-9,2d-9,2.5d-9,3.16d-9,4d-9,5d-9,6.3d-9,8d-9,
+ & 1d-8,1.25d-8,1.6d-8,2d-8,2.5d-8,3.16d-8,4d-8,5d-8,6.3d-8,8d-8,
+ & 1d-7,1.25d-7,1.6d-7,2d-7,2.5d-7,3.16d-7,4d-7,5d-7,6.3d-7,8d-7,
+ & 1d-6,1.25d-6,1.6d-6,2d-6,2.5d-6,3.16d-6,4d-6,5d-6,6.3d-6,8d-6,
+ & 1d-5,1.25d-5,1.6d-5,2d-5,2.5d-5,3.16d-5,4d-5,5d-5,6.3d-5,8d-5,
+ & 1d-4,1.25d-4,1.6d-4,2d-4,2.5d-4,3.16d-4,4d-4,5d-4,6.3d-4,8d-4,
+ & 1d-3,1.25d-3,1.6d-3,2d-3,2.5d-3,3.16d-3,4d-3,5d-3,6.3d-3,8d-3,
+ & 1d-2,1.25d-2,1.6d-2,2d-2,2.5d-2,3.16d-2,4d-2,5d-2,6.3d-2,8d-2,
+ & 0.10d0,0.125d0,0.15d0,0.175d0,0.20d0,0.225d0,0.25d0,0.275d0,
+ & 0.30d0,0.325d0,0.35d0,0.375d0,0.40d0,0.425d0,0.45d0,0.475d0,
+ & 0.50d0,0.525d0,0.55d0,0.575d0,0.60d0,0.625d0,0.65d0,0.675d0,
+ & 0.70d0,0.725d0,0.75d0,0.775d0,0.80d0,0.825d0,0.85d0,0.875d0,
+ & 0.9d0,0.920d0,0.94d0,0.960d0,0.98d0,1d0,
+ & 0.3d0,0.31d0,0.35d0,0.375d0,0.4d0,0.45d0,0.5d0,0.51d0,0.525d0,
+ & 0.55d0,0.575d0,0.6d0,0.65d0,0.7d0,0.75d0,0.8d0,0.85d0,0.9d0,
+ & 1d0,1.25d0,1.6d0,2d0,2.5d0,3.16d0,4d0,5d0,6.3d0,8d0,
+ & 1d1,1.25d1,1.6d1,2d1,2.5d1,3.16d1,4d1,5d1,6.3d1,8d1,
+ & 1d2,1.25d2,1.6d2,2d2,2.5d2,3.16d2,4d2,5d2,6.3d2,8d2,
+ & 1d3,1.25d3,1.6d3,2d3,2.5d3,3.16d3,4d3,5d3,6.3d3,8d3,
+ & 1d4,1.25d4,1.6d4,2d4,2.5d4,3.16d4,4d4,5d4,6.3d4,8d4,
+ & 1d5,1.25d5,1.6d5,2d5,2.5d5,3.16d5,4d5,5d5,6.3d5,8d5,
+ & 1d6,1.25d6,1.6d6,2d6,2.5d6,3.16d6,4d6,5d6,6.3d6,8d6,
+ & 1d7,1.25d7,1.6d7,2d7,2.5d7,3.16d7,4d7,5d7,6.3d7,8d7,1d8/
+ end block data JR09VFNNLO
+
+ subroutine JR09VFNNLOinit
+ implicit none
+ integer shape(2),i,j,k
+ double precision NaN,grid(217),
+ & alphas(99,-13:13),
+ & xuv(118,99,-13:13),
+ & xdv(118,99,-13:13),
+ & xgl(118,99,-13:13),
+ & xub(118,99,-13:13),
+ & xdb(118,99,-13:13),
+ & xsb(118,99,-13:13),
+ & xcb(118,99,-13:13),
+ & xbb(118,99,-13:13)
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOalphasc/ alphas
+ common /JR09VFNNLOxuvc/ xuv
+ common /JR09VFNNLOxdvc/ xdv
+ common /JR09VFNNLOxglc/ xgl
+ common /JR09VFNNLOxubc/ xub
+ common /JR09VFNNLOxdbc/ xdb
+ common /JR09VFNNLOxsbc/ xsb
+ common /JR09VFNNLOxcbc/ xcb
+ common /JR09VFNNLOxbbc/ xbb
+ NaN=0d0
+ NaN=0d0/NaN
+ open(10,file='Pdfdata/JR09VFNNLO.grd')
+ do 1 k=-13,13
+ do 2 j=1,99
+ read(10,*) alphas(j,k)
+ 2 continue
+ 1 continue
+ do 10 k=-13,13
+ do 11 j=1,99
+ do 12 i=1,118
+ read(10,*) xuv(i,j,k)
+ 12 continue
+ 11 continue
+ 10 continue
+ do 20 k=-13,13
+ do 21 j=1,99
+ do 22 i=1,118
+ read(10,*) xdv(i,j,k)
+ 22 continue
+ 21 continue
+ 20 continue
+ do 30 k=-13,13
+ do 31 j=1,99
+ do 32 i=1,118
+ read(10,*) xgl(i,j,k)
+ 32 continue
+ 31 continue
+ 30 continue
+ do 40 k=-13,13
+ do 41 j=1,99
+ do 42 i=1,118
+ read(10,*) xub(i,j,k)
+ 42 continue
+ 41 continue
+ 40 continue
+ do 50 k=-13,13
+ do 51 j=1,99
+ do 52 i=1,118
+ read(10,*) xdb(i,j,k)
+ 52 continue
+ 51 continue
+ 50 continue
+ do 60 k=-13,13
+ do 61 j=1,99
+ do 62 i=1,118
+ read(10,*) xsb(i,j,k)
+ 62 continue
+ 61 continue
+ 60 continue
+ do 70 k=-13,13
+ do 71 j=1,99
+ do 72 i=1,118
+ read(10,*) xcb(i,j,k)
+ 72 continue
+ 71 continue
+ 70 continue
+ do 80 k=-13,13
+ do 81 j=1,99
+ do 82 i=1,118
+ read(10,*) xbb(i,j,k)
+ 82 continue
+ 81 continue
+ 80 continue
+ close(10)
+ do 1000 k=-13,13
+ do 1001 j=1,9
+ do 1002 i=1,118
+ xuv(i,j,k)=NaN
+ xdv(i,j,k)=NaN
+ xgl(i,j,k)=NaN
+ xub(i,j,k)=NaN
+ xdb(i,j,k)=NaN
+ xsb(i,j,k)=NaN
+ xcb(i,j,k)=NaN
+ xbb(i,j,k)=NaN
+ 1002 continue
+ 1001 continue
+ 1000 continue
+ return
+ end subroutine JR09VFNNLOinit
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOalphas(Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),alphas(99,-13:13),arg,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOalphasc/ alphas
+ arg = Q2
+ JR09VFNNLOalphas = dfint(1,arg,shape(2),grid(119),alphas(1,nset))
+ return
+ end function JR09VFNNLOalphas
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxuv(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xuv(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxuvc/ xuv
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxuv = dfint(2,arg,shape,grid,xuv(1,1,nset))
+ return
+ end function JR09VFNNLOxuv
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxdv(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xdv(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxdvc/ xdv
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxdv = dfint(2,arg,shape,grid,xdv(1,1,nset))
+ return
+ end function JR09VFNNLOxdv
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxgl(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xgl(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxglc/ xgl
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxgl = dfint(2,arg,shape,grid,xgl(1,1,nset))
+ return
+ end function JR09VFNNLOxgl
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxub(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xub(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxubc/ xub
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxub = dfint(2,arg,shape,grid,xub(1,1,nset))
+ return
+ end function JR09VFNNLOxub
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxdb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xdb(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxdbc/ xdb
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxdb = dfint(2,arg,shape,grid,xdb(1,1,nset))
+ return
+ end function JR09VFNNLOxdb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxsb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xsb(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxsbc/ xsb
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxsb = dfint(2,arg,shape,grid,xsb(1,1,nset))
+ return
+ end function JR09VFNNLOxsb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxcb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xcb(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxcbc/ xcb
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxcb = dfint(2,arg,shape,grid,xcb(1,1,nset))
+ return
+ end function JR09VFNNLOxcb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function JR09VFNNLOxbb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xbb(118,99,-13:13),arg(2),x,Q2,dfint
+ common /JR09VFNNLOgrid/ grid,shape
+ common /JR09VFNNLOxbbc/ xbb
+ arg(1) = x
+ arg(2) = Q2
+ JR09VFNNLOxbb = dfint(2,arg,shape,grid,xbb(1,1,nset))
+ return
+ end function JR09VFNNLOxbb
+
+
+ block data GJR08VFNS
+ implicit none
+ integer shape(2)
+ double precision grid(217)
+ common /GJR08VFNSgrid/ grid,shape
+ data shape /118,99/
+ data grid
+ & /1d-9,1.25d-9,1.6d-9,2d-9,2.5d-9,3.16d-9,4d-9,5d-9,6.3d-9,8d-9,
+ & 1d-8,1.25d-8,1.6d-8,2d-8,2.5d-8,3.16d-8,4d-8,5d-8,6.3d-8,8d-8,
+ & 1d-7,1.25d-7,1.6d-7,2d-7,2.5d-7,3.16d-7,4d-7,5d-7,6.3d-7,8d-7,
+ & 1d-6,1.25d-6,1.6d-6,2d-6,2.5d-6,3.16d-6,4d-6,5d-6,6.3d-6,8d-6,
+ & 1d-5,1.25d-5,1.6d-5,2d-5,2.5d-5,3.16d-5,4d-5,5d-5,6.3d-5,8d-5,
+ & 1d-4,1.25d-4,1.6d-4,2d-4,2.5d-4,3.16d-4,4d-4,5d-4,6.3d-4,8d-4,
+ & 1d-3,1.25d-3,1.6d-3,2d-3,2.5d-3,3.16d-3,4d-3,5d-3,6.3d-3,8d-3,
+ & 1d-2,1.25d-2,1.6d-2,2d-2,2.5d-2,3.16d-2,4d-2,5d-2,6.3d-2,8d-2,
+ & 0.10d0,0.125d0,0.15d0,0.175d0,0.20d0,0.225d0,0.25d0,0.275d0,
+ & 0.30d0,0.325d0,0.35d0,0.375d0,0.40d0,0.425d0,0.45d0,0.475d0,
+ & 0.50d0,0.525d0,0.55d0,0.575d0,0.60d0,0.625d0,0.65d0,0.675d0,
+ & 0.70d0,0.725d0,0.75d0,0.775d0,0.80d0,0.825d0,0.85d0,0.875d0,
+ & 0.9d0,0.920d0,0.94d0,0.960d0,0.98d0,1d0,
+ & 0.3d0,0.31d0,0.35d0,0.375d0,0.4d0,0.45d0,0.5d0,0.51d0,0.525d0,
+ & 0.55d0,0.575d0,0.6d0,0.65d0,0.7d0,0.75d0,0.8d0,0.85d0,0.9d0,
+ & 1d0,1.25d0,1.6d0,2d0,2.5d0,3.16d0,4d0,5d0,6.3d0,8d0,
+ & 1d1,1.25d1,1.6d1,2d1,2.5d1,3.16d1,4d1,5d1,6.3d1,8d1,
+ & 1d2,1.25d2,1.6d2,2d2,2.5d2,3.16d2,4d2,5d2,6.3d2,8d2,
+ & 1d3,1.25d3,1.6d3,2d3,2.5d3,3.16d3,4d3,5d3,6.3d3,8d3,
+ & 1d4,1.25d4,1.6d4,2d4,2.5d4,3.16d4,4d4,5d4,6.3d4,8d4,
+ & 1d5,1.25d5,1.6d5,2d5,2.5d5,3.16d5,4d5,5d5,6.3d5,8d5,
+ & 1d6,1.25d6,1.6d6,2d6,2.5d6,3.16d6,4d6,5d6,6.3d6,8d6,
+ & 1d7,1.25d7,1.6d7,2d7,2.5d7,3.16d7,4d7,5d7,6.3d7,8d7,1d8/
+ end block data GJR08VFNS
+
+ subroutine GJR08VFNSinit
+ implicit none
+ integer shape(2),i,j,k
+ double precision NaN,grid(217),
+ & alphas(99,-13:14),
+ & xuv(118,99,-13:14),
+ & xdv(118,99,-13:14),
+ & xgl(118,99,-13:14),
+ & xub(118,99,-13:14),
+ & xdb(118,99,-13:14),
+ & xsb(118,99,-13:14),
+ & xcb(118,99,-13:14),
+ & xbb(118,99,-13:14)
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSalphasc/ alphas
+ common /GJR08VFNSxuvc/ xuv
+ common /GJR08VFNSxdvc/ xdv
+ common /GJR08VFNSxglc/ xgl
+ common /GJR08VFNSxubc/ xub
+ common /GJR08VFNSxdbc/ xdb
+ common /GJR08VFNSxsbc/ xsb
+ common /GJR08VFNSxcbc/ xcb
+ common /GJR08VFNSxbbc/ xbb
+ NaN=0d0
+ NaN=0d0/NaN
+ open(10,file='Pdfdata/GJR08VFNS.grd')
+ do 1 k=-13,14
+ do 2 j=1,99
+ read(10,*) alphas(j,k)
+ 2 continue
+ 1 continue
+ do 10 k=-13,14
+ do 11 j=1,99
+ do 12 i=1,118
+ read(10,*) xuv(i,j,k)
+ 12 continue
+ 11 continue
+ 10 continue
+ do 20 k=-13,14
+ do 21 j=1,99
+ do 22 i=1,118
+ read(10,*) xdv(i,j,k)
+ 22 continue
+ 21 continue
+ 20 continue
+ do 30 k=-13,14
+ do 31 j=1,99
+ do 32 i=1,118
+ read(10,*) xgl(i,j,k)
+ 32 continue
+ 31 continue
+ 30 continue
+ do 40 k=-13,14
+ do 41 j=1,99
+ do 42 i=1,118
+ read(10,*) xub(i,j,k)
+ 42 continue
+ 41 continue
+ 40 continue
+ do 50 k=-13,14
+ do 51 j=1,99
+ do 52 i=1,118
+ read(10,*) xdb(i,j,k)
+ 52 continue
+ 51 continue
+ 50 continue
+ do 60 k=-13,14
+ do 61 j=1,99
+ do 62 i=1,118
+ read(10,*) xsb(i,j,k)
+ 62 continue
+ 61 continue
+ 60 continue
+ do 70 k=-13,14
+ do 71 j=1,99
+ do 72 i=1,118
+ read(10,*) xcb(i,j,k)
+ 72 continue
+ 71 continue
+ 70 continue
+ do 80 k=-13,14
+ do 81 j=1,99
+ do 82 i=1,118
+ read(10,*) xbb(i,j,k)
+ 82 continue
+ 81 continue
+ 80 continue
+ close(10)
+ do 1000 k=-13,13
+ do 1001 j=1,6
+ do 1002 i=1,118
+ xuv(i,j,k)=NaN
+ xdv(i,j,k)=NaN
+ xgl(i,j,k)=NaN
+ xub(i,j,k)=NaN
+ xdb(i,j,k)=NaN
+ xsb(i,j,k)=NaN
+ xcb(i,j,k)=NaN
+ xbb(i,j,k)=NaN
+ 1002 continue
+ 1001 continue
+ 1000 continue
+ return
+ end subroutine GJR08VFNSinit
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSalphas(Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),alphas(99,-13:14),arg,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSalphasc/ alphas
+ arg = Q2
+ GJR08VFNSalphas = dfint(1,arg,shape(2),grid(119),alphas(1,nset))
+ return
+ end function GJR08VFNSalphas
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxuv(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xuv(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxuvc/ xuv
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxuv = dfint(2,arg,shape,grid,xuv(1,1,nset))
+ return
+ end function GJR08VFNSxuv
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxdv(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xdv(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxdvc/ xdv
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxdv = dfint(2,arg,shape,grid,xdv(1,1,nset))
+ return
+ end function GJR08VFNSxdv
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxgl(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xgl(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxglc/ xgl
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxgl = dfint(2,arg,shape,grid,xgl(1,1,nset))
+ return
+ end function GJR08VFNSxgl
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxub(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xub(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxubc/ xub
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxub = dfint(2,arg,shape,grid,xub(1,1,nset))
+ return
+ end function GJR08VFNSxub
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxdb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xdb(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxdbc/ xdb
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxdb = dfint(2,arg,shape,grid,xdb(1,1,nset))
+ return
+ end function GJR08VFNSxdb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxsb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xsb(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxsbc/ xsb
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxsb = dfint(2,arg,shape,grid,xsb(1,1,nset))
+ return
+ end function GJR08VFNSxsb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxcb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xcb(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxcbc/ xcb
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxcb = dfint(2,arg,shape,grid,xcb(1,1,nset))
+ return
+ end function GJR08VFNSxcb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ double precision function GJR08VFNSxbb(x,Q2,nset)
+ implicit none
+ integer shape(2),nset
+ double precision grid(217),xbb(118,99,-13:14),arg(2),x,Q2,dfint
+ common /GJR08VFNSgrid/ grid,shape
+ common /GJR08VFNSxbbc/ xbb
+ arg(1) = x
+ arg(2) = Q2
+ GJR08VFNSxbb = dfint(2,arg,shape,grid,xbb(1,1,nset))
+ return
+ end function GJR08VFNSxbb
+
+
+
+!! CERNLIB E104 modified to be used with (G)JR GRIDS:
+!! Name changed from fint to dfint.
+!! Real variables changed to double precision.
+!! External references to CERNLIB (error handling) routines removed.
+ DOUBLE PRECISION FUNCTION DFINT(NARG,ARG,NENT,ENT,TABLE)
+ INTEGER NENT(9), INDEX(32)
+ DOUBLE PRECISION ARG(9), ENT(9), TABLE(9), WEIGHT(32)
+ DFINT = 0d0
+ IF(NARG .LT. 1 .OR. NARG .GT. 5) GOTO 300
+ LMAX = 0
+ ISTEP = 1
+ KNOTS = 1
+ INDEX(1) = 1
+ WEIGHT(1) = 1d0
+ DO 100 N = 1, NARG
+ X = ARG(N)
+ NDIM = NENT(N)
+ LOCA = LMAX
+ LMIN = LMAX + 1
+ LMAX = LMAX + NDIM
+ IF(NDIM .GT. 2) GOTO 10
+ IF(NDIM .EQ. 1) GOTO 100
+ H = X - ENT(LMIN)
+ IF(H .EQ. 0.) GOTO 90
+ ISHIFT = ISTEP
+ IF(X-ENT(LMIN+1) .EQ. 0d0) GOTO 21
+ ISHIFT = 0
+ ETA = H / (ENT(LMIN+1) - ENT(LMIN))
+ GOTO 30
+ 10 LOCB = LMAX + 1
+ 11 LOCC = (LOCA+LOCB) / 2
+ IF(X-ENT(LOCC)) 12, 20, 13
+ 12 LOCB = LOCC
+ GOTO 14
+ 13 LOCA = LOCC
+ 14 IF(LOCB-LOCA .GT. 1) GOTO 11
+ LOCA = MIN0( MAX0(LOCA,LMIN), LMAX-1 )
+ ISHIFT = (LOCA - LMIN) * ISTEP
+ ETA = (X - ENT(LOCA)) / (ENT(LOCA+1) - ENT(LOCA))
+ GOTO 30
+ 20 ISHIFT = (LOCC - LMIN) * ISTEP
+ 21 DO 22 K = 1, KNOTS
+ INDEX(K) = INDEX(K) + ISHIFT
+ 22 CONTINUE
+ GOTO 90
+ 30 DO 31 K = 1, KNOTS
+ INDEX(K) = INDEX(K) + ISHIFT
+ INDEX(K+KNOTS) = INDEX(K) + ISTEP
+ WEIGHT(K+KNOTS) = WEIGHT(K) * ETA
+ WEIGHT(K) = WEIGHT(K) - WEIGHT(K+KNOTS)
+ 31 CONTINUE
+ KNOTS = 2*KNOTS
+ 90 ISTEP = ISTEP * NDIM
+ 100 CONTINUE
+ DO 200 K = 1, KNOTS
+ I = INDEX(K)
+ DFINT = DFINT + WEIGHT(K) * TABLE(I)
+ 200 CONTINUE
+ RETURN
+ 300 WRITE(*,1000) NARG
+ STOP
+1000 FORMAT( 7X, 24HFUNCTION DFINT... NARG =,I6,
+ + 17H NOT WITHIN RANGE)
+ END
+
Index: dynnlo-v1.5-applgrid/src/Need/storeptilde.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/storeptilde.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/storeptilde.f (revision 1338)
@@ -0,0 +1,15 @@
+ subroutine storeptilde(nd,p)
+ include 'constants.f'
+ include 'ptilde.f'
+ integer nd,i,j
+ double precision p(mxpart,4)
+
+ do j=1,4
+ do i=1,mxpart
+ ptilde(nd,i,j)=p(i,j)
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/transform_mass.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/transform_mass.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/transform_mass.f (revision 1338)
@@ -0,0 +1,132 @@
+ subroutine transform_mass(p,q,x,ip,jp,kp,misq,mjsq,mksq,mijsq)
+************************************************************************
+* Author: R.K. Ellis *
+* June, 2002. *
+* Given p (-p1 + -p2 --> p3 ... px .. p_(npart+2)) *
+* produce q (-q1 + -q2 --> q3 ... qx .. q_(npart+1)) *
+* by Lorentz transformation with jp denoting the vector *
+* which is removed (ie all components if q(jp) set to zero) *
+* ip is the emitter, kp is the spectator *
+* Correct branch chosen automatically *
+* x is x for ii,if,fi and y for ff *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'npart.f'
+ double precision p(mxpart,4),q(mxpart,4),BigQ(4),pij(4),
+ . x,omx,k(4),kt(4),ks(4),kDk,ksDks,kDp(3:mxpart),
+ . ksDp(3:mxpart),Qsq,rat,misq,mjsq,mksq,mijsq
+ double precision pijsq,QDpk,pktilde(4)
+ integer ip,kp,j,nu,jp,ipart
+
+ do j=1,mxpart
+ do nu=1,4
+ q(j,nu)=0d0
+ enddo
+ enddo
+
+ if ((ip .le. 2) .and. (kp .le. 2)) then
+c---initial-initial
+ do nu=1,4
+ q(ip,nu)=x*p(ip,nu)
+ q(kp,nu)=p(kp,nu)
+ k(nu) =-p(ip,nu)-p(kp,nu)-p(jp,nu)
+ kt(nu) =-x*p(ip,nu)-p(kp,nu)
+ ks(nu)=k(nu)+kt(nu)
+ enddo
+
+ kDk=k(4)**2-k(1)**2-k(2)**2-k(3)**2
+ ksDks=ks(4)**2-ks(1)**2-ks(2)**2-ks(3)**2
+
+ ipart=3
+ do j=3,npart+2
+ if (j .eq. jp) then
+ go to 18
+ else
+ kDp(j)=k(4)*p(j,4)-k(1)*p(j,1)-k(2)*p(j,2)-k(3)*p(j,3)
+ ksDp(j)=ks(4)*p(j,4)-ks(1)*p(j,1)-ks(2)*p(j,2)-ks(3)*p(j,3)
+ do nu=1,4
+ q(ipart,nu)=p(j,nu)-two*ksDp(j)*ks(nu)/ksDks
+ . +two*kDp(j)*kt(nu)/kDk
+ enddo
+ ipart=ipart+1
+ endif
+ 18 continue
+ enddo
+ return
+ elseif ((ip .le. 2) .and. (kp .gt. 2)) then
+c---initial-final
+ ipart=1
+ omx=one-x
+ do j=1,npart+2
+ do nu=1,4
+ if (j.eq.ip) then
+ q(ipart,nu)=x*p(ip,nu)
+ elseif (j.eq.jp) then
+ goto 19
+ elseif (j.eq.kp) then
+ q(ipart,nu)=p(jp,nu)+p(kp,nu)+omx*p(ip,nu)
+ else
+ q(ipart,nu)=p(j,nu)
+ endif
+ enddo
+ ipart=ipart+1
+ 19 continue
+ enddo
+ return
+
+ elseif ((ip .gt. 2) .and. (kp .le. 2)) then
+c---final-initial
+ ipart=1
+ omx=one-x
+ do j=1,npart+2
+ do nu=1,4
+ if (j.eq.kp) then
+ q(ipart,nu)=x*p(kp,nu)
+ elseif (j.eq.jp) then
+ goto 20
+ elseif (j.eq.ip) then
+ q(ipart,nu)=p(ip,nu)+p(jp,nu)+omx*p(kp,nu)
+ else
+ q(ipart,nu)=p(j,nu)
+ endif
+ enddo
+ ipart=ipart+1
+ 20 continue
+ enddo
+ return
+
+ elseif ((ip .gt. 2) .and. (kp .gt. 2)) then
+c---final-final
+ do nu=1,4
+ BigQ(nu)=p(ip,nu)+p(jp,nu)+p(kp,nu)
+ pij(nu)=p(ip,nu)+p(jp,nu)
+ enddo
+ Qsq=BigQ(4)**2-BigQ(1)**2-BigQ(2)**2-BigQ(3)**2
+ QDpk=
+ . +BigQ(4)*p(kp,4)-BigQ(1)*p(kp,1)-BigQ(2)*p(kp,2)-BigQ(3)*p(kp,3)
+ pijsq=pij(4)**2-pij(1)**2-pij(2)**2-pij(3)**2
+ rat=dsqrt((Qsq-mijsq-mksq)**2-4d0*mijsq*mksq)
+ rat=rat/dsqrt((Qsq-pijsq-mksq)**2-4d0*pijsq*mksq)
+ ipart=1
+ do j=1,npart+2
+ do nu=1,4
+ pktilde(nu)=rat*(p(kp,nu)-QDpk/Qsq*BigQ(nu))
+ . +(Qsq+mksq-mijsq)/(2d0*Qsq)*BigQ(nu)
+ if (j.eq.ip) then
+ q(ipart,nu)=BigQ(nu)-Pktilde(nu)
+ elseif (j.eq.jp) then
+ goto 21
+ elseif (j.eq.kp) then
+ q(ipart,nu)=pktilde(nu)
+ else
+ q(ipart,nu)=p(j,nu)
+ endif
+ enddo
+ ipart=ipart+1
+ 21 continue
+ enddo
+ return
+ endif
+
+ end
Index: dynnlo-v1.5-applgrid/src/Need/spinoru.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/spinoru.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/spinoru.f (revision 1338)
@@ -0,0 +1,50 @@
+ subroutine spinoru(N,p,za,zb)
+c---Calculate spinor products
+c---extended to deal with negative energies ie with all momenta outgoing
+c---Arbitrary conventions of Bern, Dixon, Kosower, Weinzierl,
+c---za(i,j)*zb(j,i)=s(i,j)
+ implicit none
+ include 'constants.f'
+ include 'zprods_decl.f'
+ include 'sprods_com.f'
+ double precision p(mxpart,4),rt(mxpart)
+ double complex c23(mxpart),f(mxpart)
+ integer i,j,N
+
+c---if one of the vectors happens to be zero this routine fails.
+ do j=1,N
+ za(j,j)=czip
+ zb(j,j)=za(j,j)
+
+C-----positive energy case
+ if (p(j,4) .gt. 0d0) then
+ rt(j)=dsqrt(p(j,4)+p(j,1))
+ c23(j)=dcmplx(p(j,3),-p(j,2))
+ f(j)=cone
+ else
+C-----negative energy case
+ rt(j)=dsqrt(-p(j,4)-p(j,1))
+ c23(j)=dcmplx(-p(j,3),p(j,2))
+ f(j)=im
+ endif
+ enddo
+ do i=2,N
+ do j=1,i-1
+ s(i,j)=two*(p(i,4)*p(j,4)-p(i,1)*p(j,1)
+ & -p(i,2)*p(j,2)-p(i,3)*p(j,3))
+ za(i,j)=f(i)*f(j)
+ & *(c23(i)*dcmplx(rt(j)/rt(i))-c23(j)*dcmplx(rt(i)/rt(j)))
+
+ if (abs(s(i,j)).lt.1d-5) then
+ zb(i,j)=-(f(i)*f(j))**2*dconjg(za(i,j))
+ else
+ zb(i,j)=-dcmplx(s(i,j))/za(i,j)
+ endif
+ za(j,i)=-za(i,j)
+ zb(j,i)=-zb(i,j)
+ s(j,i)=s(i,j)
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/pdfset_lhapdf.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/pdfset_lhapdf.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/pdfset_lhapdf.f (revision 1338)
@@ -0,0 +1,99 @@
+*****************
+* LHAPDF version*
+*****************
+ subroutine pdfset
+ implicit none
+ include 'masses.f'
+ include 'lhapdf.f'
+ include 'PDFerrors.f'
+ include 'pdlabel.f'
+ double precision amz,alphasPDF
+ logical validPDF
+ character*30 oldPDFname
+ integer i
+ logical lhapdfs
+ common/lhapdfs/lhapdfs
+
+ common/couple/amz
+
+ lhapdfs=.true.
+
+c if (newinput .eqv. .false.) then
+c open(unit=21,file='lhapdf.DAT',status='old',err=999)
+c call checkversion(21,'lhapdf.DAT')
+c read(21,*) PDFname
+c read(21,*) PDFmember
+c close(21)
+c endif
+
+ oldPDFname=PDFname
+ validPDF=.false.
+ i=0
+ 20 continue
+ i=i+1
+ if ((oldPDFname(i:i) .eq. '.') .or.
+ . (oldPDFname(i:i) .eq. ' ') .or.
+ . (oldPDFname(i:i) .eq. '[')) then
+ validPDF=.true.
+ if (oldPDFname(i:i+6) .eq. '.LHgrid') then
+ PDFname=oldPDFname(1:i-1)//'.LHgrid'
+ else
+ PDFname=oldPDFname(1:i-1)//'.LHpdf'
+ endif
+ endif
+ if ((i .lt. 20) .and. (validPDF .eqv. .false.)) goto 20
+
+ if (validPDF .eqv. .false.) then
+ write(6,*) 'Problem with PDFname'
+ write(6,*)
+ stop
+ endif
+
+
+ write(6,*) 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'
+ write(6,*) 'C C'
+ write(6,*) 'C DYNNLO now calling LHAPDF C'
+ write(6,*) 'C C'
+ write(6,98) 'PDFname',PDFname(1:20)
+ write(6,99) 'PDFmember',PDFmember
+ write(6,*) 'C C'
+ write(6,*) 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'
+ write(6,*)
+
+ call InitPDFset('PDFsets/'//PDFname)
+
+ if (PDFmember .lt. 0) then
+ PDFerrors=.true.
+ call numberPDF(maxPDFsets)
+ if (maxPDFsets .gt. 50) then
+ write(6,*) 'ERROR: Max. number of error sets is 50!'
+ stop
+ endif
+ write(6,*)
+ write(6,*) 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'
+ write(6,*) 'C Calculating errors using C'
+ write(6,*) 'C ',maxPDFsets,' sets of error PDFs C'
+ write(6,*) 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'
+ call InitPDF(0)
+ amz=alphasPDF(zmass)
+ currentPDF=0
+ else
+ call InitPDF(PDFmember)
+ amz=alphasPDF(zmass)
+ endif
+
+c--- rename pdlabel to get sensible output name
+ pdlabel=PDFname(1:7)
+
+ return
+
+ 98 format(' C ',a7,' ',a20,' C')
+ 99 format(' C ',a10,i3,' C')
+
+ 999 write(6,*) 'Error reading lhapdf.DAT'
+ call flush(6)
+ stop
+
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/Need/checkjets.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/checkjets.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/checkjets.f (revision 1338)
@@ -0,0 +1,74 @@
+ subroutine checkjets(jetsfound,qfinal,isub,failed)
+c--- performs checks on the jets that are found by the clustering algorithm,
+c--- to ensure that the correct number of heavy quark jets is found,
+c--- in the right invariant mass range
+c--- given integer 'jetsfound' jets with momenta 'qfinal', 'isub'
+c--- returns logical 'failed'
+ implicit none
+ include 'bbproc.f'
+ include 'constants.f'
+ include 'jetlabel.f'
+ include 'limits.f'
+ include 'process.f'
+ include 'removebr.f'
+ double precision qfinal(mxpart,4),m56,m57,m67
+ logical failed
+ integer nproc,countb,jetsfound,nbq,nba,isub
+ common/nproc/nproc
+
+ failed=.false.
+
+c--- check that particle 5 is a b for H+b, W+c, Z+Q and W+b+jet processes
+c--- also check for t-channel single top when the BR is not removed
+ if ( (case .eq. 'H_1jet')
+ . .or.(case .eq. 'W_cjet') .or. (case .eq. 'Wcjet0')
+ . .or.(case .eq. 'ttdkay')
+ . .or.(case .eq. 'gQ__ZQ') .or. (case .eq. 'W_bjet')
+ . .or.((case.eq. 'bq_tpq') .and. (removebr .eqv. .false.)) ) then
+ countb=0
+ if ((jetsfound .ge. 1) .and. ((jetlabel(1) .eq. 'bq')
+ . .or. (jetlabel(1) .eq. 'ba'))) countb=1
+ if ((jetsfound .ge. 2) .and. ((jetlabel(2) .eq. 'bq')
+ . .or. (jetlabel(2) .eq. 'ba'))) countb=countb+1
+ if ((jetsfound .ge. 3) .and. ((jetlabel(3) .eq. 'bq')
+ . .or. (jetlabel(3) .eq. 'ba'))) countb=countb+1
+ if ((jetsfound .eq. 1) .and. (countb .eq. 0)) failed=.true.
+ if ( ( (case .eq. 'bq_tpq') .or. (case .eq. 'ttdkay')
+ . .or. (case .eq. 'W_bjet') )
+ . .and. (countb .lt. 1) ) failed=.true.
+ if ((nproc .eq. 142) .and. (jetsfound .eq. 2)
+ . .and. (countb .ne. 1)) failed=.true.
+ if ((nproc .eq. 143) .and. (jetsfound .eq. 2)
+ . .and. (countb .ne. 2)) failed=.true.
+ endif
+
+c--- check that 5 and 6 are b and b-bar (if appropriate)
+ if (bbproc) then
+ call getbs(qfinal,nbq,nba)
+ if ((nbq .eq. 0) .or. (nba .eq. 0)) failed=.true.
+ endif
+
+c--- perform m56 mass cut if there are 2 or more jetsfound
+ if (jetsfound .ge. 2) then
+ m56=(qfinal(5,4)+qfinal(6,4))**2
+ . -(qfinal(5,1)+qfinal(6,1))**2
+ . -(qfinal(5,2)+qfinal(6,2))**2
+ . -(qfinal(5,3)+qfinal(6,3))**2
+ if (jetsfound .ge. 3) then
+ m57=(qfinal(5,4)+qfinal(7,4))**2
+ . -(qfinal(5,1)+qfinal(7,1))**2
+ . -(qfinal(5,2)+qfinal(7,2))**2
+ . -(qfinal(5,3)+qfinal(7,3))**2
+ m67=(qfinal(6,4)+qfinal(7,4))**2
+ . -(qfinal(6,1)+qfinal(7,1))**2
+ . -(qfinal(6,2)+qfinal(7,2))**2
+ . -(qfinal(6,3)+qfinal(7,3))**2
+ m56=max(m56,max(m57,m67))
+ endif
+ if ((m56 .lt. bbsqmin) .or. (m56 .gt. bbsqmax)) then
+ failed=.true.
+ endif
+ endif
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/sethparams.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/sethparams.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/sethparams.f (revision 1338)
@@ -0,0 +1,63 @@
+ subroutine sethparams(br0,gamgambr,wwbr,zzbr)
+c--- set up the necessary parameters for a Standard Model Higgs boson
+c--- hwidth : either the NLO value from Spira,
+c--- or the LO value valid for low Higgs masses only
+c--- br,wwbr,zzbr,tautaubr : the LO calculated values
+ implicit none
+ include 'constants.f'
+ include 'ewcouple.f'
+ include 'masses.f'
+ double precision br,br0,gamgambr,wwbr,zzbr,tautaubr,x_w,x_z
+
+ call higgsp(br,gamgambr,wwbr,zzbr)
+
+
+c--- branching ratio H->bb : note that the mass is mostly retained in the
+c--- coupling only, since mb=0 usually (the mass in the phase space)
+ br0=xn*gwsq/32d0/pi*mbsq*hmass/wmass**2
+ . *(1d0-4d0*mb**2/hmass**2)**1.5d0/hwidth
+
+
+c--- branching ratio H->tau^- tau^+ : this is obtained by a rescaling of
+c--- the H->bb BR since the tau mass is not included in the phase space
+ tautaubr=br*(mtausq/mbsq/xn)
+
+ x_w=4d0*wmass**2/hmass**2
+ x_z=4d0*zmass**2/hmass**2
+c--- branching ratio H-> WW
+ if (x_w .lt. 1d0) then
+ wwbr=gwsq/64d0/pi*hmass**3/wmass**2
+ . *dsqrt(1d0-x_w)*(1d0-x_w+0.75d0*x_w**2)/hwidth
+ else
+ wwbr=0d0
+ endif
+c--- branching ratio H-> ZZ
+ if (x_z .lt. 1d0) then
+ zzbr=gwsq/128d0/pi*hmass**3/wmass**2
+ . *dsqrt(1d0-x_z)*(1d0-x_z+0.75d0*x_z**2)/hwidth
+ else
+ zzbr=0d0
+ endif
+
+ write(6,99) hmass,hwidth,br,wwbr,zzbr,gamgambr
+
+
+ 99 format(' CCCCCCCCCCCCCCC SM Higgs parameters CCCCCCCCCCCCCCCC'/,
+ . ' C C'/,
+ . ' C Mh = ',f7.2,' GeV C'/,
+ . ' C Gamma(H)= ',f8.6,' GeV C'/,
+ . ' C C'/,
+ . ' C Br( H -> b bbar) = ',f8.6,' C'/,
+ . ' C Br( H -> W W) = ',f8.6,' C'/,
+ . ' C Br( H -> Z Z) = ',f8.6,' C'/,
+ . ' C Br( H -> 2gamma) = ',f8.6,' C'/,
+ . ' C C'/,
+ . ' CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC')
+
+
+
+ return
+
+
+ end
+
Index: dynnlo-v1.5-applgrid/src/Need/qqb_hww.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/qqb_hww.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/qqb_hww.f (revision 1338)
@@ -0,0 +1,39 @@
+ subroutine qqb_hww(p,msq)
+ implicit none
+c----Lowest order matrix element for H production
+c----in the heavy quark (mt=Infinity) limit.
+C----averaged over initial colours and spins
+c g(-p1)+g(-p2)-->H --> W^+ (nu(p3)+e^+(p4))+W^- (e^-(p5)+nubar(p6))
+c---
+ include 'constants.f'
+ include 'masses.f'
+ include 'qcdcouple.f'
+ include 'ewcouple.f'
+ integer j,k
+ double precision msq(-nf:nf,-nf:nf),p(mxpart,4),s,s12
+ double precision decay,gg,Asq
+ s(j,k)=2*(p(j,4)*p(k,4)-p(j,1)*p(k,1)-p(j,2)*p(k,2)-p(j,3)*p(k,3))
+
+c---set msq=0 to initialize
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ enddo
+ enddo
+
+ s12=s(1,2)
+
+ decay=gwsq**3*wmass**2*s(3,5)*s(4,6)
+ decay=decay/((s(3,4)-wmass**2)**2+(wmass*wwidth)**2)
+ decay=decay/((s(5,6)-wmass**2)**2+(wmass*wwidth)**2)
+ decay=decay/((s12-hmass**2)**2+(hmass*hwidth)**2)
+
+
+ Asq=(as/(3d0*pi))**2/vevsq
+ gg=0.5d0*V*Asq*s12**2
+
+c---calculate propagators
+ msq(0,0)=avegg*gg*decay
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/realvirt2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/realvirt2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/realvirt2.f (revision 1338)
@@ -0,0 +1,54 @@
+CC Attempt to put real and virtual together
+
+ double precision function realvirt2(vector,wgt)
+ implicit none
+ include 'vegas_common.f'
+ integer j,order
+ double precision wgt,realint,virtint,lowint,countint
+ double precision vector(mxdim),vv(mxdim),tmpr,tmpv,tmpc
+ external realint,virtint,lowint,countint
+
+ common/nnlo/order
+
+
+ do j=1,mxdim
+ vv(j)=vector(j)
+ enddo
+
+CC Mapping real <-> virtual
+
+ vv(1)=vector(2)
+ vv(2)=vector(3)
+ vv(3)=vector(4)
+ vv(4)=vector(7)
+ vv(5)=vector(8)
+ vv(6)=vector(9)
+ vv(7)=vector(10)
+CC Additional dimension for virtual
+ vv(8)=vector(1)
+CC Dummies
+ vv(9)=vector(5)
+ vv(10)=vector(6)
+
+ tmpr=0d0
+ tmpv=0d0
+ tmpc=0d0
+
+
+ if(order.eq.2) then
+ tmpr=realint(vector,wgt)
+ tmpv=virtint(vv,wgt)
+ else
+ tmpv=lowint(vv,wgt)
+
+
+ endif
+
+CC Counterterm
+
+ tmpc=countint(vv,wgt)
+
+ realvirt2=tmpr+tmpv+tmpc
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Need/transform.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/transform.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/transform.f (revision 1338)
@@ -0,0 +1,99 @@
+
+ subroutine transform(p,q,x,ip,jp,kp)
+************************************************************************
+* Author: R.K. Ellis *
+* September, 1999. *
+* Given p (-p1 + -p2 --> p3 ... px .. p_(npart+2)) *
+* produce q (-q1 + -q2 --> q3 ... qx .. q_(npart+1)) *
+* by Lorentz transformation with jp denoting the vector *
+* which is removed (ie all components if q(jp) set to zero) *
+* ip is the emitter, kp is the specatator *
+* Correct branch chosen automatically *
+* x is x for ii,if,fi and y for ff *
+************************************************************************
+ implicit none
+ include 'constants.f'
+ include 'npart.f'
+ double precision p(mxpart,4),q(mxpart,4),x,omx,y,omy,
+ . k(4),kt(4),ks(4),kDk,ksDks,kDp(3:mxpart),ksDp(3:mxpart)
+ integer ip,kp,j,nu,jp,ipart
+
+ do j=1,npart+2
+ do nu=1,4
+ q(j,nu)=0d0
+ enddo
+ enddo
+
+ if ((ip .le. 2) .and. (kp .le. 2)) then
+c---initial-initial
+ do nu=1,4
+ q(ip,nu)=x*p(ip,nu)
+ q(kp,nu)=p(kp,nu)
+ k(nu) =-p(ip,nu)-p(kp,nu)-p(jp,nu)
+ kt(nu) =-x*p(ip,nu)-p(kp,nu)
+ ks(nu)=k(nu)+kt(nu)
+ enddo
+
+ kDk=k(4)**2-k(1)**2-k(2)**2-k(3)**2
+ ksDks=ks(4)**2-ks(1)**2-ks(2)**2-ks(3)**2
+
+ ipart=3
+ do j=3,npart+2
+ if (j .eq. jp) then
+ go to 19
+ else
+ kDp(j)=k(4)*p(j,4)-k(1)*p(j,1)-k(2)*p(j,2)-k(3)*p(j,3)
+ ksDp(j)=ks(4)*p(j,4)-ks(1)*p(j,1)-ks(2)*p(j,2)-ks(3)*p(j,3)
+ do nu=1,4
+ q(ipart,nu)=p(j,nu)-two*ksDp(j)*ks(nu)/ksDks
+ . +two*kDp(j)*kt(nu)/kDk
+ enddo
+ ipart=ipart+1
+ endif
+ 19 continue
+ enddo
+ return
+ elseif (((ip .le. 2) .and. (kp .gt. 2)) .or.
+ . ((ip .gt. 2) .and. (kp .le. 2))) then
+c---initial-final or final-initial
+ ipart=1
+ omx=one-x
+ do j=1,npart+2
+ do nu=1,4
+ if (j.eq.ip) then
+ q(ipart,nu)=x*p(ip,nu)
+ elseif (j.eq.jp) then
+ goto 20
+ elseif (j.eq.kp) then
+ q(ipart,nu)=p(jp,nu)+p(kp,nu)+omx*p(ip,nu)
+ else
+ q(ipart,nu)=p(j,nu)
+ endif
+ enddo
+ ipart=ipart+1
+ 20 continue
+ enddo
+ return
+ elseif ((ip .gt. 2) .and. (kp .gt. 2)) then
+c---final-final
+ ipart=1
+ y=x
+ omy=one-y
+ do j=1,npart+2
+ do nu=1,4
+ if (j.eq.ip) then
+ q(ipart,nu)=p(jp,nu)+p(ip,nu)-y/omy*p(kp,nu)
+ elseif (j.eq.jp) then
+ goto 21
+ elseif (j.eq.kp) then
+ q(ipart,nu)=p(kp,nu)/omy
+ else
+ q(ipart,nu)=p(j,nu)
+ endif
+ enddo
+ ipart=ipart+1
+ 21 continue
+ enddo
+ return
+ endif
+ end
Index: dynnlo-v1.5-applgrid/src/Need/mcfm_vegasMIO.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Need/mcfm_vegasMIO.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Need/mcfm_vegasMIO.f (revision 1338)
@@ -0,0 +1,296 @@
+CC Modified to combine real and virtual together
+CC It is enough to choose 'real' in the imput file
+
+
+ subroutine mcfm_vegas(myinit,myitmx,myncall,mybin,xinteg,xerr)
+************************************************************************
+* *
+* This routine should perform the sweeps of vegasnr *
+* *
+* Input parameters: *
+* myinit : the vegasnr routine entry point *
+* myitmx : the number of vegasnr sweeps *
+* myncall : the number of iterations per sweep *
+* bin : whether or not the results should be histogrammed *
+* *
+* Returned variables: *
+* xinteg : value of integration *
+* xerr : integration error
+* *
+************************************************************************
+ implicit none
+ include 'gridinfo.f'
+ include 'realwt.f'
+ include 'scale.f'
+ include 'facscale.f'
+ include 'vegas_common.f'
+ include 'PDFerrors.f'
+ integer myitmx,myncall,myinit,i,j,k,nproc
+ logical mybin,bin
+ double precision sig,sd,chi,sigr,sdr,sigdk,sddk,chidk,
+ . xreal,xreal2,xinteg,xerr,adjust,myscale,myfacscale
+ character*4 part,mypart
+ common/nproc/nproc
+ common/part/part
+ common/mypart/mypart
+ common/bin/bin
+ common/xreal/xreal,xreal2
+ common/reset/reset,scalereset
+ double precision lowint,virtint,realint
+ double precision region(2*mxdim),lord_bypart(-1:1,-1:1)
+C
+ double precision realvirt
+C
+ logical first,reset,scalereset,myreadin
+ common/bypart/lord_bypart
+ external lowint,virtint,realint
+C
+ external realvirt
+C
+ data first/.true./
+ save first
+
+c--- Initialize all integration results to zero, so that the
+c--- total of virt and real may be combined at the end for 'tota'
+ sig=0d0
+ sigr=0d0
+ sigdk=0d0
+ sd=0d0
+ sdr=0d0
+ sddk=0d0
+ xreal=0d0
+ xreal2=0d0
+
+ do j=-1,1
+ do k=-1,1
+ lord_bypart(j,k)=0d0
+ enddo
+ enddo
+ if (PDFerrors) then
+ do i=0,maxPDFsets
+ PDFxsec(i)=0d0
+ enddo
+ endif
+
+c--- Controls behaviour of gen_njets: need to reset phase-space
+c--- boundaries when going from virt to real (using tota)
+c--- need to reset scale also, for special scalestart values
+ reset=.false.
+ scalereset=.false.
+
+c--- Put the vegasnr parameters in the common block
+ itmx=myitmx
+ ncall=myncall
+ bin=mybin
+
+c--- Basic lowest-order integration
+ if (part .eq. 'lord') then
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,lowint,myinit,myncall,myitmx,
+ . 0,sig,sd,chi)
+ endif
+
+c--- Store value of part in mypart, which will be retained;
+c--- also store value of scale in myscale, which will be retained;
+c--- part and scale can be changed to make sure that the tota option works.
+ mypart=part
+ myscale=scale
+ myfacscale=facscale
+
+c--- If we're doing the tota integration, then set up the grid info
+ if ((mypart .eq. 'tota') .or. (mypart .eq. 'todk')) then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for virtual grid
+ ingridfile='dvegas_virt_'//ingridfile
+ myreadin=readin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ outgridfile='dvegas_virt.grid'
+ else
+ readin=.true.
+ writeout=.false.
+ ingridfile='dvegas_virt.grid'
+ endif
+ endif
+ endif
+
+c--- Virtual integration should have one extra dimension
+c--- (added and then taken away)
+ if ( (mypart .eq. 'virt') .or. (mypart .eq. 'tota')
+ . .or. (mypart .eq. 'todk') ) then
+ part='virt'
+ reset=.true.
+ scalereset=.true.
+ ndim=ndim+1
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,virtint,myinit,myncall,myitmx,
+ . 0,sig,sd,chi)
+ ndim=ndim-1
+ endif
+
+CC Prepare the grid also for real only
+
+c--- If we're doing the tota integration, then set up the grid info
+CC if ((mypart .eq. 'tota') .or. (mypart .eq. 'todk')) then
+ if ((mypart .eq. 'tota') .or. (mypart .eq. 'real')) then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for real grid
+ ingridfile(8:11)='real'
+ readin=myreadin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ outgridfile='dvegas_real.grid'
+ else
+ readin=.true.
+ writeout=.false.
+ ingridfile='dvegas_real.grid'
+ endif
+ endif
+ endif
+
+CC Here real and virtual together
+
+
+c--- Real integration should have three extra dimensions
+c--- 'realwt' is a special option that in general should be false
+c--- ('realwt' true samples the integral according to the
+c--- unsubtracted real emission weight)
+ if (mypart .eq. 'real') then
+ part='real'
+ scalereset=.true.
+ ndim=ndim+3
+ if (realwt) then
+ nprn=0
+ endif
+ xreal=0d0
+ xreal2=0d0
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,realvirt,myinit,myncall,myitmx,
+ . 0,sigr,sdr,chi)
+ ndim=ndim-3
+ write(6,*)
+ ncall=myncall
+ if (realwt) then
+ sigr=xreal
+ sdr=dsqrt(abs((xreal2-xreal**2)/dfloat(ncall)))
+ write(6,*) itmx,' iterations of ',ncall,' calls'
+ write(6,*) 'Value of subtracted integral',sigr
+ write(6,*) 'Error on subtracted integral',sdr
+ endif
+ endif
+ if ((mypart .eq. 'tota') .or. (mypart .eq. 'todk')) then
+ scale=myscale
+ facscale=myfacscale
+ part='real'
+ reset=.true.
+ if (realwt) then
+ nprn=0
+ endif
+ xreal=0d0
+ xreal2=0d0
+ adjust=(dfloat(ndim+3))/(dfloat(ndim+1))
+ ncall=int(dfloat(myncall)**adjust)/2
+ write(6,*) 'Adjusting number of points for real to',ncall
+ ndim=ndim+3
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,realint,myinit,ncall,myitmx,
+ . 0,sigr,sdr,chi)
+ ndim=ndim-3
+ write(6,*)
+ ncall=myncall
+
+ if (realwt) then
+ sigr=xreal
+ sdr=dsqrt(abs((xreal2-xreal**2)/dfloat(ncall)))
+ write(6,*) itmx,' iterations of ',ncall,' calls'
+ write(6,*) 'Value of subtracted integral',sigr
+ write(6,*) 'Error on subtracted integral',sdr
+ endif
+ endif
+
+c--- If we're doing the todk integration, then set up the grid info
+ if (mypart .eq. 'todk') then
+ if (first .and. (myinit .eq. 1)) then
+c-- special input name for real grid
+ ingridfile(8:11)='redk'
+ readin=myreadin
+ else
+ if (first .eqv. .true.) then
+ readin=.false.
+ writeout=.true.
+ outgridfile='dvegas_redk.grid'
+ else
+ readin=.true.
+ writeout=.false.
+ ingridfile='dvegas_redk.grid'
+ endif
+ endif
+ endif
+
+ if (mypart .eq. 'todk') then
+ scale=myscale
+ nproc=nproc+1
+ call chooser
+ part='real'
+ reset=.true.
+ if (realwt) then
+ nprn=0
+ endif
+ xreal=0d0
+ xreal2=0d0
+ adjust=(dfloat(ndim+3))/(dfloat(ndim+1))
+ ncall=int(dfloat(myncall)**adjust)/2
+ write(6,*) 'Adjusting number of points for real to',ncall
+ ndim=ndim+3
+ call boundregion(ndim,region)
+ call vegasnr(region,ndim,realint,myinit,ncall,myitmx,
+ . 0,sigdk,sddk,chidk)
+ ndim=ndim-3
+ write(6,*)
+ ncall=myncall
+ nproc=nproc-1
+ call chooser
+
+ if (realwt) then
+ sigdk=xreal
+ sddk=dsqrt(abs((xreal2-xreal**2)/dfloat(ncall)))
+ write(6,*) itmx,' iterations of ',ncall,' calls'
+ write(6,*) 'Value of subtracted integral',sigdk
+ write(6,*) 'Error on subtracted integral',sddk
+ endif
+ endif
+
+c--- calculate integration variables to be returned
+ xinteg=sig+sigr+sigdk
+ xerr=dsqrt(sd**2+sdr**2+sddk**2)
+
+c--- return part and scale to their real values
+ part=mypart
+ scale=myscale
+ first=.false.
+
+ return
+ end
+
+
+ subroutine boundregion(idim,region)
+c--- Initializes integration region [0,1] for each variable
+c--- in the idim-dimensional integration range
+ implicit none
+ include 'mxdim.f'
+ integer i,idim
+ double precision region(2*mxdim)
+
+ do i=1,idim
+ region(i)=0d0
+ region(i+idim)=1d0
+ enddo
+
+ return
+ end
+
+
Index: dynnlo-v1.5-applgrid/src/User/genclust_cone.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/genclust_cone.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/genclust_cone.f (revision 1338)
@@ -0,0 +1,417 @@
+ subroutine genclust_cone(q,Rmin,qfinal,isub)
+c--- clusters momenta using plabel to determine which
+c--- particles should be clustered. Forms 'jets' jets according to
+c--- the Run II cone algorithm with cone size Rmin.
+c--- Furthermore, the clustered jets are only observed if
+c--- pT(jet) > ptjetmin and y(jet) < etajetmax
+c---
+c--- qfinal is the final vector q1,.... q(4+jets)
+c--- where non-jet four vectors are set equal to the incoming q
+ implicit none
+ include 'constants.f'
+ include 'npart.f'
+ include 'jetcuts.f'
+ include 'jetlabel.f'
+ double precision q(mxpart,4),qjet(mxpart,4),qfinal(mxpart,4)
+ double precision Rsep,Rmin,aetarap
+ integer i,j,k,l,nu,iter,maxjet,ajet,jetindex(mxpart),isub
+ character*2 plabel(mxpart),finallabel(mxpart)
+ double precision protoq(20,4),deltarq,deltarj,et,etmax,net,
+ . qshared(4),sharedet,getet
+ integer maxproto,protoc(20,0:mxpart),eti,shared,
+ . sharedc(20),ni
+ logical jetmerge,failed,first
+ parameter (Rsep=1d0)
+ common/plabel/plabel
+ common/jetmerge/jetmerge
+ data first/.true./
+ save first
+
+ if (first) then
+ write(6,*)
+ write(6,*) '******* Cone algorithm additional parameter *******'
+ write(6,*) '* *'
+ write(6,79) '* parton separation parameter, Rsep : ',Rsep
+ write(6,*) '* *'
+ write(6,*) '****************************************************'
+ call flush(6)
+ first=.false.
+ endif
+
+ jets=0
+ maxjet=0
+ jetmerge=.false.
+
+ do i=1,mxpart
+ do nu=1,4
+ qfinal(i,nu)=0d0
+ enddo
+ enddo
+
+
+c--- pick out jets: note that we search to npart+2-isub, to get the
+c--- number of particles right. Note that isub=0 for all calls except
+c--- the dipole contributions, where isub=1.
+ do i=3,npart+2-isub
+ if ( (plabel(i) .eq. 'pp') .or. (plabel(i) .eq. 'pj')
+ . .or.(plabel(i) .eq. 'bq') .or. (plabel(i) .eq. 'ba')
+ . .or.(plabel(i) .eq. 'qj') ) then
+ maxjet=maxjet+1
+ jetindex(maxjet)=i
+ jetlabel(maxjet)=plabel(i)
+ do nu=1,4
+ qjet(maxjet,nu)=q(i,nu)
+ enddo
+ endif
+ enddo
+
+c--- for no partons, just switch q into qfinal
+ if (maxjet .eq. 0) then
+ do i=1,mxpart
+ do nu=1,4
+ qfinal(i,nu)=q(i,nu)
+ enddo
+ enddo
+ jets=0
+ return
+ endif
+
+c--- skip clustering if we only have one parton
+ if (maxjet .eq. 1) then
+ jets=1
+ do nu=1,4
+ qfinal(1,nu)=qjet(1,nu)
+ enddo
+ finallabel(1)=jetlabel(1)
+ goto 2
+ endif
+
+c--- set up the proto-jets
+ maxproto=0
+ do i=1,maxjet
+ maxproto=maxproto+1
+ protoc(maxproto,0)=1
+ protoc(maxproto,1)=i
+ do nu=1,4
+ protoq(maxproto,nu)=qjet(i,nu)
+ enddo
+ enddo
+ do i=1,maxjet
+ do j=i+1,maxjet
+ maxproto=maxproto+1
+ protoc(maxproto,0)=2
+ protoc(maxproto,1)=i
+ protoc(maxproto,2)=j
+ do nu=1,4
+ protoq(maxproto,nu)=qjet(i,nu)+qjet(j,nu)
+ enddo
+ if ( (deltarq(maxproto,i,protoq) .gt. Rmin)
+ . .or. (deltarq(maxproto,j,protoq) .gt. Rmin)
+ . .or. (deltarq(i,j,protoq) .gt. Rmin*Rsep) ) then
+ maxproto=maxproto-1
+ endif
+ enddo
+ enddo
+ if (maxjet .gt. 2) then
+ do i=1,maxjet
+ do j=i+1,maxjet
+ do k=j+1,maxjet
+ maxproto=maxproto+1
+ protoc(maxproto,0)=3
+ protoc(maxproto,1)=i
+ protoc(maxproto,2)=j
+ protoc(maxproto,3)=k
+ do nu=1,4
+ protoq(maxproto,nu)=qjet(i,nu)+qjet(j,nu)+qjet(k,nu)
+ enddo
+ if ( (deltarq(maxproto,i,protoq) .gt. Rmin)
+ . .or. (deltarq(maxproto,j,protoq) .gt. Rmin)
+ . .or. (deltarq(maxproto,k,protoq) .gt. Rmin)
+ . .or. (deltarq(i,j,protoq) .gt. Rmin*Rsep)
+ . .or. (deltarq(i,k,protoq) .gt. Rmin*Rsep)
+ . .or. (deltarq(j,k,protoq) .gt. Rmin*Rsep)) then
+ maxproto=maxproto-1
+ endif
+ enddo
+ enddo
+ enddo
+ endif
+ if (maxjet .gt. 3) then
+ do i=1,maxjet
+ do j=i+1,maxjet
+ do k=j+1,maxjet
+ do l=k+1,maxjet
+ maxproto=maxproto+1
+ protoc(maxproto,0)=4
+ protoc(maxproto,1)=i
+ protoc(maxproto,2)=j
+ protoc(maxproto,3)=k
+ protoc(maxproto,4)=l
+ do nu=1,4
+ protoq(maxproto,nu)=qjet(i,nu)+qjet(j,nu)
+ . +qjet(k,nu)+qjet(l,nu)
+ enddo
+ if ( (deltarq(maxproto,i,protoq) .gt. Rmin)
+ . .or. (deltarq(maxproto,j,protoq) .gt. Rmin)
+ . .or. (deltarq(maxproto,k,protoq) .gt. Rmin)
+ . .or. (deltarq(maxproto,l,protoq) .gt. Rmin)
+ . .or. (deltarq(i,j,protoq) .gt. Rmin*Rsep)
+ . .or. (deltarq(i,k,protoq) .gt. Rmin*Rsep)
+ . .or. (deltarq(i,l,protoq) .gt. Rmin*Rsep)
+ . .or. (deltarq(j,k,protoq) .gt. Rmin*Rsep)
+ . .or. (deltarq(j,l,protoq) .gt. Rmin*Rsep)
+ . .or. (deltarq(k,l,protoq) .gt. Rmin*Rsep)) then
+ maxproto=maxproto-1
+ endif
+ enddo
+ enddo
+ enddo
+ enddo
+ endif
+ if (maxjet .gt. 4) then
+ write(6,*) 'Too many jets for this version of the cone algorithm'
+ stop
+ endif
+
+c write(6,*) 'Found ',maxproto,' proto-jets'
+
+ jets=0
+
+ iter=0
+c--- loops through all the iterations of the algorithm
+ 1 iter=iter+1
+
+ if (maxproto .eq. 0) goto 2
+
+c--- find the highest Et proto-jet
+ eti=0
+ etmax=-1d0
+ do i=1,maxproto
+ et=getet(protoq(i,4),protoq(i,1),protoq(i,2),protoq(i,3))
+c et=dsqrt(protoq(i,1)**2+protoq(i,2)**2)
+ if (et .gt. etmax) then
+ eti=i
+ etmax=et
+ endif
+ enddo
+
+c write(6,*) 'Max Et proto-jet is ',eti
+
+c--- check to see if any partons are shared by this proto-jet
+ shared=0
+ do i=1,maxproto
+ sharedc(i)=0
+ if (i .ne. eti) then
+ do j=1,protoc(i,0)
+ do k=1,protoc(eti,0)
+ if (protoc(i,j) .eq. protoc(eti,k)) then
+ shared=shared+1
+ sharedc(i)=1
+ endif
+ enddo
+ enddo
+ endif
+ enddo
+
+ if (shared .eq. 0) then
+c-- proto-jet does not share any partons - move it to qfinal and repeat
+ jets=jets+1
+ do nu=1,4
+ qfinal(jets,nu)=protoq(eti,nu)
+ enddo
+ finallabel(jets)='pp'
+ do i=1,protoc(eti,0)
+ if (jetlabel(protoc(eti,i)) .eq. 'bq') finallabel(jets)='bq'
+ if (jetlabel(protoc(eti,i)) .eq. 'ba') finallabel(jets)='ba'
+ enddo
+c--- shuffle down the proto-jets
+ do i=eti+1,maxproto
+ do nu=1,4
+ protoq(i-1,nu)=protoq(i,nu)
+ enddo
+ do j=0,mxpart
+ protoc(i-1,j)=protoc(i,j)
+ enddo
+ enddo
+ maxproto=maxproto-1
+c write(6,*) 'Found jet number ',jets
+ goto 1
+ endif
+
+c--- a parton is shared: perform split/merge procedure
+c write(6,*) 'Need to do split/merge'
+
+c--- calculate which proto-jet that shares has the highest Et
+ ni=0
+ net=-1d0
+ do i=1,maxproto
+ et=getet(protoq(i,4),protoq(i,1),protoq(i,2),protoq(i,3))
+ if ((sharedc(i) .eq. 1) .and. (et .gt. net)) then
+ ni=i
+ net=et
+ endif
+ enddo
+
+c--- calculate the shared Et
+ do nu=1,4
+ qshared(nu)=0d0
+ enddo
+ do j=1,protoc(eti,0)
+ do k=1,protoc(ni,0)
+ if (protoc(eti,j) .eq. protoc(ni,k)) then
+ do nu=1,4
+ qshared(nu)=qshared(nu)+qjet(protoc(eti,j),nu)
+ enddo
+ endif
+ enddo
+ enddo
+ sharedet=getet(qshared(4),qshared(1),qshared(2),qshared(3))
+
+c write(6,*) 'Proto-jet is',eti
+c write(6,*) 'Highest et neighbour is',ni
+c write(6,*) 'Shared Et is',sharedet
+c write(6,*) 'Neighbour Et is',net
+
+ if (sharedet/net .gt. 0.5d0) then
+c--- we should merge the proto-jets
+ do i=1,protoc(ni,0)
+ shared=0
+ do j=1,protoc(eti,0)
+ if (protoc(ni,i) .eq. protoc(eti,j)) shared=1
+ enddo
+c--- add cells that are not shared
+ if (shared .eq. 0) then
+ protoc(eti,0)=protoc(eti,0)+1
+ protoc(eti,protoc(eti,0))=protoc(ni,i)
+ do nu=1,4
+ protoq(eti,nu)=protoq(eti,nu)+qjet(protoc(ni,i),nu)
+ enddo
+ endif
+ enddo
+c--- shuffle down the proto-jets
+ do i=ni+1,maxproto
+ do nu=1,4
+ protoq(i-1,nu)=protoq(i,nu)
+ enddo
+ do j=0,mxpart
+ protoc(i-1,j)=protoc(i,j)
+ enddo
+ enddo
+ maxproto=maxproto-1
+c write(6,*) 'Merged proto-jets',eti,' and ',ni
+ else
+c--- we should split the proto-jets
+ do i=1,protoc(ni,0)
+ shared=0
+ do j=1,protoc(eti,0)
+ if (protoc(ni,i) .eq. protoc(eti,j)) shared=j
+ enddo
+c--- if a cell is shared, decide where to put it based on distance in Delta_R
+c--- update the contents list and momentum of the protojet it's removed from
+ if (shared .gt. 0) then
+ if (deltarj(protoc(ni,i),ni,qjet,protoq)
+ . .lt. deltarj(protoc(ni,i),eti,qjet,protoq)) then
+c--- shared cell is closer to neighbour, ni
+ do j=shared+1,protoc(eti,0)
+ protoc(eti,j-1)=protoc(eti,j)
+ enddo
+ protoc(eti,0)=protoc(eti,0)-1
+ do nu=1,4
+ protoq(eti,nu)=protoq(eti,nu)-qjet(protoc(ni,i),nu)
+ enddo
+ else
+c--- shared cell is closer to original proto-jet, eti
+ do j=i+1,protoc(ni,0)
+ protoc(ni,j-1)=protoc(ni,j)
+ enddo
+ protoc(ni,0)=protoc(ni,0)-1
+ do nu=1,4
+ protoq(ni,nu)=protoq(ni,nu)-qjet(protoc(ni,i),nu)
+ enddo
+ endif
+ endif
+ enddo
+c write(6,*) 'Split proto-jets',eti,' and ',ni
+ endif
+
+c pause
+ goto 1
+
+ 2 continue
+
+c---- transfer qfinal --> qjet
+ do i=1,jets
+ jetlabel(i)=finallabel(i)
+ do nu=1,4
+ qjet(i,nu)=qfinal(i,nu)
+ enddo
+ enddo
+
+c write(6,*) 'Finished finding jets: got ',jets
+c pause
+
+c--- restore incoming partons
+ do i=1,2
+ do nu=1,4
+ qfinal(i,nu)=q(i,nu)
+ enddo
+ enddo
+c--- set all other momenta to zero and restore leptons
+ do i=3,npart+2
+ do nu=1,4
+ qfinal(i,nu)=0d0
+ if ((plabel(i) .ne. 'pp') .and. (plabel(i) .ne. 'pj')
+ . .and.(plabel(i) .ne. 'bq') .and. (plabel(i) .ne. 'ba')
+ . .and.(plabel(i) .ne. 'qj')) then
+ qfinal(i,nu)=q(i,nu)
+ endif
+ enddo
+ enddo
+
+
+c----remove jets that are below the pT threhold or which lie outside
+c----the observable rapidity region
+
+c write(*,*) 'AFTER CLUSTERING: Obtained ',jets,' jets'
+
+c--- flag whether or not any jets have been merged
+ if (jets .eq. maxjet) then
+ jetmerge=.false.
+ else
+ jetmerge=.true.
+ endif
+
+c--- restore jets
+ ajet=0
+ do i=1,jets
+c write(*,*) 'Jet ',i,'(',jetlabel(i),')',jetindex(i)
+c write(*,*) 'pt: ',getet(qjet(i,4),qjet(i,1),
+c . qjet(i,2),qjet(i,3)),' vs min. ',ptjetmin
+c write(*,*) 'ay: ',aetarap(i,qjet),' vs max. ',etajetmax
+ if ((getet(qjet(i,4),qjet(i,1),qjet(i,2),qjet(i,3))
+ . .gt. ptjetmin) .and.
+ . (aetarap(i,qjet) .gt. etajetmin) .and.
+ . (aetarap(i,qjet) .lt. etajetmax)) then
+ ajet=ajet+1
+ do nu=1,4
+ qfinal(jetindex(ajet),nu)=qjet(i,nu)
+ enddo
+ jetlabel(ajet)=jetlabel(i)
+ endif
+ enddo
+
+c--- if no jets are removed by eta and pt cuts, then jets=ajet
+ if (ajet .lt. jets) then
+ do i=ajet+1,jets
+ do nu=1,4
+ qfinal(jetindex(i),nu)=0d0
+ enddo
+ enddo
+ jets=ajet
+ endif
+
+ return
+
+ 79 format(a42,f6.3,' *')
+
+ end
Index: dynnlo-v1.5-applgrid/src/User/getet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/getet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/getet.f (revision 1338)
@@ -0,0 +1,22 @@
+ double precision function getet(E,px,py,pz)
+c--- given (E,px,py,pz) for a four-vector, calculates the corresponding
+c--- Et or Pt, depending on the parameter that is set in this routine
+c--- Note that, at present, this routine is only called by
+c--- genclust_cone.f
+ implicit none
+ double precision E,px,py,pz,etsq
+ logical useEt
+ parameter (useEt=.true.)
+
+ if (useEt) then
+c--- this is the formula for Et
+ etsq=px**2+py**2
+ getet=dsqrt(etsq)*E/dsqrt(etsq+pz**2)
+ else
+c--- this is the formula for pt
+ getet=dsqrt(px**2+py**2)
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/User/plotter.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/plotter.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/plotter.f (revision 1338)
@@ -0,0 +1,222 @@
+ subroutine bookplot(n,tag,titlex,var,wt,xmin,xmax,dx,llplot)
+ implicit none
+ include 'nplot.f'
+ integer n
+ character*(*) titlex
+ character*3 llplot
+ character*4 tag,mypart
+ double precision var,wt,xmin,xmax,dx
+ common/mypart/mypart
+
+ if (tag.eq.'book') then
+ call mbook(n,titlex,dx,xmin,xmax)
+ call mbook(20+n,titlex,dx,xmin,xmax)
+ call mbook(40+n,titlex,dx,xmin,xmax)
+ call mbook(60+n,titlex,dx,xmin,xmax)
+ call mbook(80+n,titlex,dx,xmin,xmax)
+ call mbook(100+n,titlex,dx,xmin,xmax)
+ call mbook(120+n,titlex,dx,xmin,xmax)
+ elseif (tag .eq. 'plot') then
+ call mfill(n,var,wt)
+ linlog(n)=llplot
+ titlearray(n)=titlex
+ endif
+
+ return
+ end
+
+
+ subroutine plotter(p,wt,switch)
+ implicit none
+ include 'clustering.f'
+ include 'constants.f'
+ include 'cutoff.f'
+ include 'jetlabel.f'
+ include 'npart.f'
+ include 'mxdim.f'
+ include 'process.f'
+ include 'removebr.f'
+ include 'masses.f'
+c P.S. use of grids
+ include 'ptilde.f'
+ include 'APPLinclude.f'
+c P.S. end.
+
+
+ character*2 plabel(mxpart)
+ common/plabel/plabel
+
+ integer n,switch,nplotmax,i,j
+ character tag*4
+
+ double precision wt
+ double precision m34,p(mxpart,4),fphi,HT
+ double precision pt3,pt4,pt5,pt6,pt7,pt8
+ double precision eta3,eta4,eta5,eta6,eta7,eta8
+ double precision pt34,y34,pjm,pt3dpt4,tmass,ptmin,ptmax
+ double precision pt,etarap,yraptwo,yrapfour,pttwo,R
+ double precision cosphi45,deltaphi,pto(1:4),tmp(1:2)
+ integer eventpart,nqcdjets,nqcdstart
+
+ logical first,jetmerge
+ character*30 runstring
+ common/runstring/runstring
+ common/nplotmax/nplotmax
+ common/nqcdjets/nqcdjets,nqcdstart
+ common/jetmerge/jetmerge
+ double precision realeventp(mxpart,4)
+ common/realeventp/realeventp
+ integer order,nproc,ndec
+ common/nproc/nproc
+ common/nnlo/order
+ data first/.true./
+ save first
+ if (first) then
+ tag='book'
+c--- ensure we initialize all possible histograms
+ eventpart=npart+3
+ eta3=0d0
+ pt3=0d0
+ eta4=0d0
+ pt4=0d0
+ eta5=0d0
+ pt5=0d0
+ eta6=0d0
+ pt6=0d0
+ eta7=0d0
+ pt7=0d0
+ eta8=0d0
+ pt8=0d0
+
+ y34=0d0
+ pt34=0d0
+ m34=0d0
+
+
+
+ HT=0d0
+
+ deltaphi=0d0
+ pto(1)=0d0
+ pto(2)=0d0
+ pto(3)=0d0
+ pto(4)=0d0
+
+
+ jetmerge=.true.
+CC Here set jets to the maximum number of jets
+CC to book the necessary histograms: 0 at LO, 1 at NLO and 2 at NNLO
+ jets=order
+CC
+ goto 99
+ else
+ tag='plot'
+ endif
+
+C ndec is the number of decay products of the vector boson
+
+ ndec=2
+
+C enventpart is the total number of four momenta in the event
+C 2 for initial state + ndec=2 for the V decay + number of jets
+
+ eventpart=2+ndec+jets
+
+
+ eta3=etarap(3,p)
+ pt3=pt(3,p)
+ eta4=etarap(4,p)
+ pt4=pt(4,p)
+ y34=yraptwo(3,4,p)
+ pt34=pttwo(3,4,p)
+ m34=dsqrt((p(3,4)+p(4,4))**2-(p(3,1)+p(4,1))**2
+ . -(p(3,2)+p(4,2))**2-(p(3,3)+p(4,3))**2)
+
+ HT=pt3+pt4
+
+C Transverse mass
+
+ pt3dpt4=p(3,1)*p(4,1)+p(3,2)*p(4,2)
+
+ tmass=dsqrt(2*(pt3*pt4-pt3dpt4))
+
+ ptmin=min(pt3,pt4)
+ ptmax=max(pt3,pt4)
+
+
+
+ 99 continue
+
+ n=1
+
+ call bookplot(n,tag,'m34',m34,wt,50d0,400d0,20d0,'lin')
+ n=n+1
+ call bookplot(n,tag,'eta3',eta3,wt,-4d0,4d0,0.2d0,'lin')
+ n=n+1
+ call bookplot(n,tag,'pt3',pt3,wt,0d0,150d0,5d0,'lin')
+ n=n+1
+ call bookplot(n,tag,'eta4',eta4,wt,-4d0,4d0,0.2d0,'lin')
+ n=n+1
+ call bookplot(n,tag,'pt4',pt4,wt,0d0,150d0,5d0,'lin')
+ n=n+1
+ call bookplot(n,tag,'y34',y34,wt,-5d0,5d0,0.2d0,'lin')
+ n=n+1
+ call bookplot(n,tag,'pt34',pt34,wt,0d0,200d0,5d0,'lin')
+ n=n+1
+ if(nproc.ne.3) then
+ call bookplot(n,tag,'mt',tmass,wt,0d0,100d0,2d0,'lin')
+ n=n+1
+ else
+ call bookplot(n,tag,'ptmin',ptmin,wt,0d0,100d0,2d0,'lin')
+ n=n+1
+ call bookplot(n,tag,'ptmax',ptmax,wt,0d0,100d0,2d0,'lin')
+ n=n+1
+ endif
+
+
+
+ if(jets.eq.2) then
+ pt5=pt(5,p)
+ pt6=pt(6,p)
+ HT=HT+pt5+pt6
+ if(pt5.gt.pt6) then
+ pjm=pt6
+ pt6=pt5
+ pt5=pjm
+ endif
+ call bookplot(n,tag,'pt5',pt5,wt,0d0,500d0,5d0,'lin')
+ n=n+1
+ call bookplot(n,tag,'pt6',pt6,wt,0d0,500d0,5d0,'lin')
+ n=n+1
+ elseif(jets.eq.1) then
+ pt5=pt(5,p)
+ HT=HT+pt5
+ call bookplot(n,tag,'pt5',pt5,wt,0d0,500d0,5d0,'lin')
+ n=n+1
+ endif
+
+
+
+ n=n-1
+
+ if (n .gt. 20) then
+ write(6,*) 'WARNING - TOO MANY HISTOGRAMS!'
+ write(6,*) n,' > 20, which is the built-in maximum'
+ stop
+ endif
+c P.S. filling applgrid
+ if (creategrid) call fill_grid(p)
+c P.S. end
+
+c--- set the maximum number of plots, on the first call
+ if (first) then
+ first=.false.
+ nplotmax=n
+ endif
+
+
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/User/gridwrap.cxx
===================================================================
--- dynnlo-v1.5-applgrid/src/User/gridwrap.cxx (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/gridwrap.cxx (revision 1338)
@@ -0,0 +1,26 @@
+
+static const int mxpart = 14; // mcfm parameter : max number of partons in event record. defined in Inc/constants.f
+
+/// function pointer hooks - set to 0 when no functions defined and applgrid not linked
+void (*book_gridptr)() = 0;
+void (*fill_gridptr)(const double evt[][mxpart]) = 0;
+void (*write_gridptr)(double& ) = 0;
+
+//}
+
+/// generic user hooks - do nothing if external function pointers are not assigned
+
+/// book grids
+extern "C" void book_grid_() { if ( book_gridptr ) book_gridptr(); }
+extern "C" void book_grid__() { book_grid_(); }
+
+/// fill grids
+extern "C" void fill_grid_(const double evt[][mxpart]) { if ( fill_gridptr ) fill_gridptr(evt); }
+extern "C" void fill_grid__(const double evt[][mxpart]) { fill_grid_(evt); }
+
+/// write grids
+extern "C" void write_grid_(double& xstotal) { if ( write_gridptr ) write_gridptr(xstotal); }
+extern "C" void write_grid__(double& xstotal) { write_grid_(xstotal); }
+
+
+
Index: dynnlo-v1.5-applgrid/src/User/cuts.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/cuts.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/cuts.f (revision 1338)
@@ -0,0 +1,106 @@
+ logical function cuts(pjet,njets)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ integer i,j,k,njets
+ double precision pjet(mxpart,4),etvec(4)
+ double precision pt,etarap
+CC
+ double precision pt3,pt4,eta3,eta4,pt34,y34,m34,yraptwo
+ double precision pt5,eta5,eta6,ptjetmax,m45
+ double precision cosphi45,deltaphi,ptmin,pt3dpt4,tmass
+ double precision pte,ptmiss,etae
+ double precision ppt(1:4),pto(1:4),mz(1:4),dmz(1:4),tmp(1:2)
+
+ integer l(4),m(4),i1,i2,i3,i4
+
+ logical isol
+ common/isol/isol
+
+ integer nproc
+ common/nproc/nproc
+
+CC
+ cuts=.false.
+
+
+
+CC Insert here cuts
+
+ pt3=dsqrt(pjet(3,1)**2+pjet(3,2)**2)
+ pt4=dsqrt(pjet(4,1)**2+pjet(4,2)**2)
+ eta3=etarap(3,pjet)
+ eta4=etarap(4,pjet)
+
+ ptmin=min(pt3,pt4)
+
+ pt34=dsqrt((pjet(3,1)+pjet(4,1))**2+(pjet(3,2)+pjet(4,2))**2)
+
+ m34=dsqrt((pjet(3,4)+pjet(4,4))**2-(pjet(3,1)+pjet(4,1))**2
+ & -(pjet(3,2)+pjet(4,2))**2-(pjet(3,3)+pjet(4,3))**2)
+
+ y34=yraptwo(3,4,pjet)
+
+C Transverse mass
+
+ pt3dpt4=pjet(3,1)*pjet(4,1)+pjet(3,2)*pjet(4,2)
+
+ tmass=dsqrt(2*(pt3*pt4-pt3dpt4))
+
+
+C Cuts for Z production
+
+c if(ptmin.lt.20d0) cuts=.true.
+
+c if(dabs(eta3).gt.2.5d0.or.dabs(eta4).gt.2.5d0) cuts=.true.
+
+c if(m34.lt.70d0.or.m34.gt.110d0) cuts=.true.
+
+
+C Cuts for W production
+
+ if(nproc.eq.1) then
+ pte=pt4
+ etae=eta4
+ ptmiss=pt3
+ elseif(nproc.eq.2) then
+ pte=pt3
+ etae=eta3
+ ptmiss=pt4
+ endif
+
+C D0 0807.3367
+
+c if(pte.lt.25d0) cuts=.true.
+
+c if(ptmiss.lt.25d0) cuts=.true.
+
+c if(dabs(etae).gt.3.2d0) cuts=.true.
+
+c if(tmass.lt.50d0) cuts=.true.
+
+C CDF hep-ex/0501023
+
+c if(pte.lt.35d0.or.pte.gt.45d0) cuts=.true.
+
+c if(ptmiss.lt.25d0) cuts=.true.
+
+c if(tmass.lt.50d0.or.tmass.gt.100d0) cuts=.true.
+
+c if(dabs(etae).gt.(2.45d0)) cuts=.true.
+
+C D0 muon 0709.4254
+
+c if(tmass.lt.40d0) cuts=.true.
+
+c if(ptmiss.lt.20d0) cuts=.true.
+
+c if((pte.lt.20d0).or.(pte.gt.35d0)) cuts=.true.
+
+
+ return
+ end
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/User/isolation.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/isolation.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/isolation.f (revision 1338)
@@ -0,0 +1,54 @@
+C Lepton isolation for W and Z production
+
+ logical function isolation(p)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),Ris,pt,eps,Ehad
+ double precision Et5,Et6,R
+ integer i,i1,i2
+ common/isolabel/i1,i2
+
+ isolation=.true.
+
+
+c Leptons are isolated if total transverse energy in a cone
+c of radius Ris is smaller than eps*pt
+
+ Ris=0.4d0
+ eps=0.1d0
+
+ Et5=pt(5,p)
+ Et6=pt(6,p)
+
+
+C Loop over leptons
+
+ do i=i1,i2
+
+ Ehad=0d0
+
+C Energy around lepton i
+
+ if(Et6.eq.0d0) then
+ if(r(p,i,5).lt.Ris)Ehad=Et5
+ else
+ if((r(p,i,5).lt.Ris).and.(r(p,i,6).lt.Ris)) then
+ Ehad=Et5+Et6
+ elseif ((r(p,i,5).lt.Ris).and.(r(p,i,6).gt.Ris)) then
+ Ehad=Et5
+ elseif ((r(p,i,5).gt.Ris).and.(r(p,i,6).lt.Ris)) then
+ Ehad=Et6
+ endif
+ endif
+
+
+ if(Ehad.gt.eps*pt(i,p))then
+ isolation=.false.
+ return
+ endif
+
+ enddo
+
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/User/genclust_kt.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/genclust_kt.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/genclust_kt.f (revision 1338)
@@ -0,0 +1,184 @@
+ subroutine genclust_kt(q,Rmin,qfinal,isub,ipow)
+c--- Clusters momenta using plabel to determine which
+c--- particles should be clustered. Forms 'jets' jets according to
+c--- the standard kT algorithm with cone size Rmin.
+c--- Furthermore, the clustered jets are only observed if
+c--- pT(jet) >= ptjetmin and etajetmin <= |eta(jet)| <= etajetmax
+c---
+c--- qfinal is the final vector q1,.... q(4+jets)
+c--- where non-jet four vectors are set equal to the incoming q
+c---
+c--- Modified 23/11/09: generalized to include whole class of kt-like
+c--- algorithms with measures raised to the power
+c--- "ipow" passed into routine. In particular,
+c--- ipow = +1 (normal kt), ipow = -1 ("anti-kt")
+ implicit none
+ include 'constants.f'
+ include 'npart.f'
+ include 'jetcuts.f'
+ include 'jetlabel.f'
+ double precision q(mxpart,4),qjet(mxpart,4),qfinal(mxpart,4)
+ double precision pt,Rmin,dijmin,dkmin,aetarap
+ integer i,nu,iter,nmin1,nmin2,maxjet,nk,
+ . ajet,jetindex(mxpart),isub,ipow
+ character*2 plabel(mxpart)
+ logical jetmerge,failed
+ common/plabel/plabel
+ common/jetmerge/jetmerge
+
+ jets=0
+ maxjet=0
+ jetmerge=.false.
+
+ do i=1,mxpart
+ do nu=1,4
+ qfinal(i,nu)=0d0
+ enddo
+ enddo
+
+c--- pick out jets: note that we search to npart+2-isub, to get the
+c--- number of particles right. Note that isub=0 for all calls except
+c--- the dipole contributions, where isub=1.
+ do i=3,npart+2-isub
+ if ( (plabel(i) .eq. 'pp') .or. (plabel(i) .eq. 'pj')
+ . .or.(plabel(i) .eq. 'bq') .or. (plabel(i) .eq. 'ba')
+ . .or.(plabel(i) .eq. 'qj') ) then
+ maxjet=maxjet+1
+ jetindex(maxjet)=i
+ jetlabel(maxjet)=plabel(i)
+ do nu=1,4
+ qjet(maxjet,nu)=q(i,nu)
+ enddo
+ endif
+ enddo
+
+c--- for no partons, just switch q into qfinal
+ if (maxjet .eq. 0) then
+ do i=1,mxpart
+ do nu=1,4
+ qfinal(i,nu)=q(i,nu)
+ enddo
+ enddo
+ jets=0
+ return
+ endif
+
+c--- skip clustering if we only have one parton
+ if (maxjet .eq. 1) goto 2
+
+c--- for W+bbj, skip if b and b-bar are too close together
+c if ( ((nproc.eq.292) .or. (nproc.eq.297))
+c . .and. (isub .eq.0) .and. (R(q,5,6) .lt. Rmin) ) then
+c jets=-1
+c return
+c endif
+
+ iter=0
+c--- loops through all the iterations of the algorithm
+ 1 iter=iter+1
+
+c write(*,*) 'iter ',iter
+c write(*,*) 'jets ',jets
+c write(*,*) 'maxjet ',maxjet
+
+c--- step1: find (i,j) pair with lowest measure of all non-jets so far
+ call findmind(q,qjet,iter,maxjet,dijmin,nmin1,nmin2,ipow)
+
+c--- step2: find jet K with lowest Et
+ call findminet(q,qjet,iter,maxjet,dkmin,nk,ipow)
+ dkmin=dkmin*Rmin
+
+c write(*,*) 'Comparing pair (',nmin1,',',nmin2,') value of'
+c write(*,*) 'dijmin = ',dijmin,' with ',nk,' value of dk = ',dkmin
+
+c--- step3: compare the two ...
+ if (dijmin .lt. dkmin) then
+c--- ... if we should combine, go ahead
+c write(*,*) 'Clustered ',nmin1,nmin2
+ jetmerge=.true.
+ call combine(qjet,nmin1,nmin2)
+c--- combined object goes into nmin1, now shuffle nmin2 off the end
+ call swapjet(qjet,jetindex,nmin2,maxjet)
+ maxjet=maxjet-1
+ iter=iter-1
+c do i=1,maxjet
+c do j=1,4
+c write(*,*) 'qjet(',i,',',nu,') = ',qjet(i,nu)
+c enddo
+c enddo
+ else
+c--- ... we've finished a jet
+ jets=jets+1
+c write(*,*) 'Now swapping ',jets,' and ',nk
+ call swapjet(qjet,jetindex,jets,nk)
+ endif
+
+c--- in the next iteration we search for jets in pjet from iter+1...maxjet
+c--- so if this condition isn't true then there's one jet left at maxjet
+
+ if (iter .lt. maxjet-1) goto 1
+
+ 2 continue
+ jets=jets+1
+
+c--- restore incoming partons
+ do i=1,2
+ do nu=1,4
+ qfinal(i,nu)=q(i,nu)
+ enddo
+ enddo
+c--- set all other momenta to zero and restore leptons
+ do i=3,npart+2
+ do nu=1,4
+ qfinal(i,nu)=0d0
+ if ((plabel(i) .ne. 'pp') .and. (plabel(i) .ne. 'pj')
+ . .and.(plabel(i) .ne. 'bq') .and. (plabel(i) .ne. 'ba')
+ . .and.(plabel(i) .ne. 'qj')) then
+ qfinal(i,nu)=q(i,nu)
+ endif
+ enddo
+ enddo
+
+c----remove jets that are below the pT threhold or which lie outside
+c----the observable rapidity region
+
+c write(*,*) 'AFTER CLUSTERING: Obtained ',jets,' jets'
+
+c--- restore jets
+ ajet=0
+ do i=1,jets
+
+c write(*,*) 'Jet ',i,'(',jetlabel(i),')',jetindex(i)
+c write(*,*) 'pt: ',pt(i,qjet),' vs min. ',ptjetmin
+c write(*,*) 'aeta: ',aetarap(i,qjet),' vs min. ',etajetmin
+c write(*,*) 'aeta: ',aetarap(i,qjet),' vs max. ',etajetmax
+
+ if ((pt(i,qjet) .ge. ptjetmin) .and.
+ . (aetarap(i,qjet) .ge. etajetmin) .and.
+ . (aetarap(i,qjet) .le. etajetmax)) then
+ ajet=ajet+1
+ do nu=1,4
+ qfinal(jetindex(ajet),nu)=qjet(i,nu)
+ enddo
+ jetlabel(ajet)=jetlabel(i)
+ endif
+ enddo
+
+c--- if no jets are removed by eta and pt cuts, then jets=ajet
+ if (ajet .lt. jets) then
+ do i=ajet+1,jets
+ do nu=1,4
+ qfinal(jetindex(i),nu)=0d0
+ enddo
+ enddo
+ jets=ajet
+ endif
+
+c write(*,*) '... and ',jets,' jets after pt and eta cuts'
+c do i=1,jets
+c write(*,*) i,jetlabel(i)
+c enddo
+c pause
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/User/genclust.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/genclust.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/genclust.f (revision 1338)
@@ -0,0 +1,170 @@
+ subroutine genclust(q,nparti,npartf,R,njet,qfinal,jetlabel)
+c--- clusters momenta from momentum number nparti till
+c--- momentum number npartf in q into njet jets according to
+c--- standard kT algorithm with cone size R
+c--- furthermore, the clustered jets are only observed if
+c--- pT(jet) > ptjetmin and y(jet) < etajetmax
+c---
+c--- Quantities returned are qfinal, njet, parts
+c--- parton content of jets is encoded in parts(njet)
+c--- 10**n representing original parton label n
+c--- qfinal is the final vector q1,q2,q3,q4,.... q(4+njets)
+c--- first four vectors are set equal to the incoming q
+ implicit none
+ include 'constants.f'
+ include 'bbproc.f'
+ include 'npart.f'
+ double precision q(mxpart,4),qjet(mxpart,4),qfinal(mxpart,4)
+ double precision R,dijmin,dkmin,pt,aetarap,ptjetmin,etajetmax
+ double precision bclustmass
+ integer nparti,npartf,njet,i,nu,iter,nmin1,nmin2,maxjet,nk,
+ . nqcdjets,nqcdstart,nremoved,nproc
+ character*2 plabel(mxpart)
+ character*2 jetlabel(mxpart)
+ common/plabel/plabel
+ common/nqcdjets/nqcdjets,nqcdstart
+ common/nproc/nproc
+ parameter (ptjetmin=15d0,etajetmax=2.5d0)
+
+ maxjet=npartf-nparti+1
+ njet=0
+
+C---calculate the four-jet momenta from i to maxjet and label each in parts
+ do i=1,maxjet
+ jetlabel(i)=plabel(nparti+i-1)
+ do nu=1,4
+ qjet(i,nu)=q(nparti+i-1,nu)
+c write(*,*) 'qjet(',i,',',nu,') = ',qjet(i,nu)
+ enddo
+ enddo
+
+c--- for no partons, just switch q into qfinal
+ if (npartf .lt. nparti) then
+ do i=1,mxpart
+ do nu=1,4
+ qfinal(i,nu)=q(i,nu)
+ enddo
+ enddo
+ njet=0
+ return
+ endif
+
+c--- skip clustering if we only have one parton
+ if (npartf .eq. nparti) goto 2
+
+ iter=0
+c--- loops through all the iterations of the algorithm
+ 1 iter=iter+1
+
+c write(*,*) 'iter ',iter
+c write(*,*) 'njet ',njet
+c write(*,*) 'maxjet ',maxjet
+
+c--- step1: find (i,j) pair with lowest measure of all non-jets so far
+ call findmind(q,qjet,iter,maxjet,dijmin,nmin1,nmin2)
+
+c--- step2: find jet K with lowest Et
+ call findminet(q,qjet,iter,maxjet,dkmin,nk)
+ dkmin=dkmin*R
+
+c write(*,*) 'Comparing pair (',nmin1,',',nmin2,') value of'
+c write(*,*) 'dijmin = ',dijmin,' with ',nk,' value of dk = ',dkmin
+
+c--- step3: compare the two ...
+ if (dijmin .lt. dkmin) then
+c--- ... if we should combine, go ahead
+c write(*,*) 'Clustered ',nmin1,nmin2
+ call combine(qjet,nmin1,nmin2)
+c--- combined object goes into nmin1, now shuffle nmin2 off the end
+ call swap(qjet,jetlabel,nmin2,maxjet)
+ maxjet=maxjet-1
+ iter=iter-1
+c do i=1,maxjet
+c do j=1,4
+c write(*,*) 'qjet(',i,',',nu,') = ',qjet(i,nu)
+c enddo
+c enddo
+ else
+c--- ... we've finished a jet
+ njet=njet+1
+c write(*,*) 'Now swapping ',njet,' and ',nk
+ call swap(qjet,jetlabel,njet,nk)
+ endif
+
+c--- in the next iteration we search for jets in pjet from iter+1...maxjet
+c--- so if this condition isn't true then there's one jet left at maxjet
+
+ if (iter .lt. maxjet-1) goto 1
+
+ 2 continue
+ njet=njet+1
+
+C---store total result in
+ do nu=1,4
+ do i=1,mxpart
+ qfinal(i,nu)=0d0
+ enddo
+c----set first (nparti-1) momenta qfinal equal to original q's
+ do i=1,nparti-1
+ qfinal(i,nu)=q(i,nu)
+ enddo
+ do i=1,njet
+ qfinal(nparti+i-1,nu)=qjet(i,nu)
+ enddo
+c----make sure we also set lepton momenta for processes such as 151 and 181.
+c----(npart+2) is the total number of partons in the event, which can be
+c----greater than (4+nqcdjets) only for real events (when it is a gluon, in
+c----which case plabel='pp' and it is ignored) and events with trailing leptons
+c----such as 151 and 181. This should be generic enough to handle future
+c----extensions of process.DAT.
+ if (npart+2 .gt. nparti+nqcdjets) then
+ do i=nparti+nqcdjets,npart+2
+ if (plabel(i) .ne. 'pp') then
+ qfinal(i,nu)=q(i,nu)
+ endif
+ enddo
+ endif
+ enddo
+
+c----remove jets that are below the pT threhold or which lie outside
+c----the observable rapidity region
+
+c write(*,*) 'Tried to cluster ',nparti,' to ',npartf
+c write(*,*) 'Obtained ',njet,' jets'
+
+ nremoved=0
+ do i=1,njet
+ if ((pt(nparti+i-1,qfinal) .lt. ptjetmin) .or.
+ . (aetarap(nparti+i-1,qfinal) .gt. etajetmax)) then
+ nremoved=nremoved+1
+c write(*,*) ' pt ',pt(nparti+i-1,qfinal),ptjetmin
+c write(*,*) 'eta ',aetarap(nparti+i-1,qfinal),etajetmax
+ else
+ jetlabel(i-nremoved)=jetlabel(i)
+ do nu=1,4
+ qfinal(nparti+i-1-nremoved,nu)=qfinal(nparti+i-1,nu)
+ enddo
+ endif
+ enddo
+ njet=njet-nremoved
+
+c write(*,*) '... and ',njet,' jets after pt and eta cuts'
+c do i=1,njet
+c write(*,*) i,jetlabel(i)
+c enddo
+c pause
+
+c--- check that 5 and 6 are b and b-bar
+ if ((bbproc) .and. (bclustmass(njet,qfinal,jetlabel) .eq. 0d0))
+ . njet=-1
+
+c do i=1,njet
+c write(*,*) i,jetlabel(i)
+c enddo
+c pause
+c write(*,*) 'Started with ',njet+nremoved,' and now have ',njet
+c write(*,*) 'Found ',njet,' jets'
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/User/deltarj.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/deltarj.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/deltarj.f (revision 1338)
@@ -0,0 +1,54 @@
+c--- note that p has mxpart entries, pjet has 20
+ double precision function deltarj(i,j,p,pjet)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),pjet(20,4),phi1,phi2,etarap,dphi,
+ . etarap20
+ integer i,j
+
+ phi1=atan2(p(i,1),p(i,2))
+ phi2=atan2(pjet(j,1),pjet(j,2))
+ dphi=phi1-phi2
+ if (dphi .gt. pi) dphi=twopi-dphi
+ if (dphi .lt. -pi) dphi=twopi+dphi
+ deltarj=(etarap(i,p)-etarap20(j,pjet))**2+dphi**2
+ deltarj=dsqrt(deltarj)
+ return
+ end
+
+c--- note that p has 20 entries
+ double precision function deltarq(i,j,p)
+ implicit none
+ include 'constants.f'
+ double precision p(20,4),phi1,phi2,etarap20,dphi
+ integer i,j
+
+ phi1=atan2(p(i,1),p(i,2))
+ phi2=atan2(p(j,1),p(j,2))
+ dphi=phi1-phi2
+ if (dphi .gt. pi) dphi=twopi-dphi
+ if (dphi .lt. -pi) dphi=twopi+dphi
+ deltarq=(etarap20(i,p)-etarap20(j,p))**2+dphi**2
+ deltarq=dsqrt(deltarq)
+
+ return
+ end
+
+c--- note that p has 20 entries
+ double precision function etarap20(j,p)
+ implicit none
+C---returns the value of the pseudorapidity
+ integer j
+ double precision p(20,4)
+ etarap20=dsqrt(p(j,1)**2+p(j,2)**2+p(j,3)**2)
+ etarap20=(etarap20+p(j,3))/(etarap20-p(j,3))
+ if (etarap20 .lt. 1d-13) then
+C-- set to 100 if this is very close to or less than zero
+c-- rapidities of 100 will be rejected by any sensible cuts
+ etarap20=100d0
+ else
+ etarap20=0.5d0*dlog(etarap20)
+ endif
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/User/genclust2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/genclust2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/genclust2.f (revision 1338)
@@ -0,0 +1,28 @@
+ subroutine genclust2(q,R,qfinal,isub)
+c--- this is a wrapper routine for the jet clustering algorithm
+c--- either re-route to:
+c--- genclust_kt.f for kt clustering
+c--- genclust_cone.f for cone algorithm
+ implicit none
+ include 'constants.f'
+ include 'clustering.f'
+ double precision q(mxpart,4),qfinal(mxpart,4),R
+ integer nqcdjets,nqcdstart,isub
+ logical first
+ character*4 part
+ common/part/part
+ common/nqcdjets/nqcdjets,nqcdstart
+ data first/.true./
+ save first
+
+ if (algorithm .eq. 'ktal') then
+ call genclust_kt(q,R,qfinal,isub,1)
+ elseif (algorithm.eq. 'ankt') then
+ call genclust_kt(q,R,qfinal,isub,-1)
+ else
+ call genclust_cone(q,R,qfinal,isub)
+ endif
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/User/mdata.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/mdata.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/mdata.f (revision 1338)
@@ -0,0 +1,94 @@
+ block data electroweak_input
+************************************************************************
+* Calculational scheme for EW couplings *
+************************************************************************
+c
+c ewscheme=-1 : MCFM default
+c input values = Gf,alpha(m_Z),m_W,m_Z
+c output values = sin^2(theta_W),mtop
+c
+c ewscheme=1 : New Madevent default, "G_mu scheme"
+c = LUSIFER and AlpGen (iewopt=3) defaults
+c input values = G_F,m_Z,m_W
+c output values = sin^2(theta_W),alpha(m_Z).
+
+C PDG 2012
+
+ implicit none
+ include 'ewinput.f'
+ data ewscheme / 1 / ! Chooses EW scheme
+ data Gf_inp / 1.1663787d-5 / ! G_F
+ data aemmz_inp / 7.7585538055706d-03 / ! alpha_EM(m_Z)=1/128.89
+ data xw_inp / 0.2312d0 / ! sin^2(theta_W)
+ data wmass_inp / 80.385d0 / ! W mass
+ data zmass_inp / 91.1876d0 / ! Z mass
+ end
+************************************************************************
+
+
+************************************************************************
+* Masses, widths and initial-state flavour information *
+************************************************************************
+ block data block_properties
+ implicit none
+ include 'masses.f'
+c--- Masses: note that "mtausq", "mcsq" and "mbsq" are typically used
+c--- throughout the program to calculate couplings that depend on the
+c--- mass, while "mtau","mc" and "mb" are the masses that appear in
+c--- the rest of the matrix elements and phase space (and may be set
+c--- to zero in the program, depending on the process number)
+ data mtausq,mcsq,mbsq/3.157729d0,2.25d0,21.3444d0/
+ data mtau/1.777d0/
+ data mc,mb,mt/1.5d0,4.62d0,178d0/
+c--- Widths: note that the top width is calculated in the program
+ data wwidth,zwidth/2.085d0,2.4952d0/
+ data tauwidth/2.269d-12/
+c--- Masses below here are currently unused
+ data md,mu,ms/5d-3,5d-3,1d-1/
+ data mel,mmu/0.510997d-3,0.105658389d0/
+ end
+
+C CKM matrix entries
+C New values taken from PDG2012
+C Review, Tables and Plots, the CKM matrix
+
+ block data block_ckm
+ implicit none
+ double precision Vud,Vus,Vub,Vcd,Vcs,Vcb
+ common/cabib/Vud,Vus,Vub,Vcd,Vcs,Vcb
+ data Vud , Vus , Vub ,
+ . Vcd , Vcs , Vcb
+ . /0.97427d0,0.2253d0,0.00351d0,
+ . 0.2252d0,0.97344d0,0.0412d0/
+ end
+************************************************************************
+
+
+************************************************************************
+* Relevant for the H+b process only : *
+* mb_msbar: the value of the running b-mass, evaluated at the *
+* pole mass. For negative values, calculated from mb *
+* susycoup: the deviation of the Higgs coupling from the *
+* Standard Model value (S.M. = 1d0) *
+************************************************************************
+ block data block_bH
+ implicit none
+ include 'mb_msbar.f'
+ data mb_msbar/4.25d0/
+ end
+************************************************************************
+
+
+************************************************************************
+* Dim. Reg. parameter epsilon, used for checking the proper *
+* operation of the NLO code in the program *
+************************************************************************
+ block data block_epinv
+ implicit none
+ include 'epinv.f'
+ include 'epinv2.f'
+ data epinv/1d3/
+ data epinv2/1d3/
+ end
+************************************************************************
+
Index: dynnlo-v1.5-applgrid/src/User/miscclust.f
===================================================================
--- dynnlo-v1.5-applgrid/src/User/miscclust.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/User/miscclust.f (revision 1338)
@@ -0,0 +1,293 @@
+ subroutine findmind(p,pjet,pjetmin,pjetmax,dijmin,nmin1,nmin2,
+ . ipow)
+c--- this finds the minimum dij for pjet indices pjetmin through pjetmax
+c--- returns dijmin and indices of minimum in (nmin1,nmin2)
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),pjet(mxpart,4),dijmin,dij,d
+ integer pjetmin,pjetmax,nmin1,nmin2,i,j,ipow
+ logical dijerror
+
+ dijmin=1d9
+ dijerror=.true.
+
+ do i=pjetmin,pjetmax
+ do j=i+1,pjetmax
+ if (i .ne. j) then
+ d=dij(p,pjet,i,j,ipow)
+ if (d .lt. dijmin) then
+ dijmin=d
+ nmin1=i
+ nmin2=j
+ dijerror=.false.
+ endif
+ endif
+ enddo
+ enddo
+
+ if (dijerror) then
+ write(*,*) 'Error in dij minimum-finding routine'
+c call writeout(p)
+ stop
+ endif
+
+ return
+ end
+
+ subroutine findminet(p,pjet,pjetmin,pjetmax,dkmin,nk,ipow)
+c--- this finds the minimum dkmin for pjet indices pjetmin through pjetmax
+c--- returns dijmin and indices of minimum in (nmin1,nmin2)
+C--- calculate the beam proto-jet separation see NPB406(1993)187, Eqn. 7
+C--- S.~Catani, Y.~L.~Dokshitzer, M.~H.~Seymour and B.~R.~Webber
+C--- in practice this is just the minimum ptsq of protojets
+ implicit none
+ include 'constants.f'
+ double precision p(mxpart,4),pjet(mxpart,4),dkmin,dk,pt
+ integer pjetmin,pjetmax,nk,i,ipow
+ logical dkerror
+
+ dkmin=1d9
+ dkerror=.true.
+
+ do i=pjetmin,pjetmax
+ dk=pt(i,pjet)
+ if (ipow .ne. 1) dk=dk**(ipow)
+ if (dk .lt. dkmin) then
+ dkmin=dk
+ nk=i
+ dkerror=.false.
+ endif
+ enddo
+
+ if (dkerror) then
+ write(*,*) 'Error in dk minimum-finding routine'
+ stop
+ endif
+
+ return
+ end
+
+ double precision function dij(p,pjet,i,j,ipow)
+C---calculate the proto-jet separation see NPB406(1993)187, Eqn. 7
+ implicit none
+ include 'constants.f'
+ integer i,j,ipow
+ double precision p(mxpart,4),pjet(mxpart,4),pti,ptj,pt,r
+c double precision etarap,yi,yj,phii,phij
+
+ pti=pt(i,pjet)
+ ptj=pt(j,pjet)
+
+c--- old method - bad because (phii-phij) can be > pi
+c yi=etarap(i,pjet)
+c yj=etarap(j,pjet)
+
+c phii=atan2(pjet(i,1),pjet(i,2))
+c phij=atan2(pjet(j,1),pjet(j,2))
+
+c dij=dsqrt((yi-yj)**2+(phii-phij)**2)
+
+c--- new method - r() calculates true value of 0 < (phi-phij) < pi
+ dij=r(pjet,i,j)
+
+ if (ipow .ne. 1) then
+ pti=pti**(ipow)
+ ptj=ptj**(ipow)
+ endif
+ dij=dij*min(pti,ptj)
+
+ return
+ end
+
+ subroutine combine(pjet,i,j)
+ implicit none
+ include 'constants.f'
+ include 'jetlabel.f'
+ integer i,j
+ double precision pjet(mxpart,4)
+
+c--Run II prescription
+ pjet(i,1)=pjet(i,1)+pjet(j,1)
+ pjet(i,2)=pjet(i,2)+pjet(j,2)
+ pjet(i,3)=pjet(i,3)+pjet(j,3)
+ pjet(i,4)=pjet(i,4)+pjet(j,4)
+
+
+ if (((jetlabel(i) .eq. 'bq') .and. (jetlabel(j) .eq. 'pp'))
+ ..or.((jetlabel(j) .eq. 'bq') .and. (jetlabel(i) .eq. 'pp'))) then
+ jetlabel(i)='bq'
+ return
+ endif
+ if (((jetlabel(i) .eq. 'ba') .and. (jetlabel(j) .eq. 'pp'))
+ ..or.((jetlabel(j) .eq. 'ba') .and. (jetlabel(i) .eq. 'pp'))) then
+ jetlabel(i)='ba'
+ return
+ endif
+ if (((jetlabel(i) .eq. 'bq') .and. (jetlabel(j) .eq. 'ba'))
+ ..or.((jetlabel(j) .eq. 'bq') .and. (jetlabel(i) .eq. 'ba'))) then
+ jetlabel(i)='bq'
+ return
+ endif
+ if (((jetlabel(i) .eq. 'bq') .and. (jetlabel(j) .eq. 'qj'))
+ ..or.((jetlabel(j) .eq. 'bq') .and. (jetlabel(i) .eq. 'qj'))) then
+ jetlabel(i)='bq'
+ return
+ endif
+ if (((jetlabel(i) .eq. 'ba') .and. (jetlabel(j) .eq. 'qj'))
+ ..or.((jetlabel(j) .eq. 'ba') .and. (jetlabel(i) .eq. 'qj'))) then
+ jetlabel(i)='ba'
+ return
+ endif
+ if (((jetlabel(i) .eq. 'qj') .and. (jetlabel(j) .eq. 'pp'))
+ ..or.((jetlabel(j) .eq. 'pp') .and. (jetlabel(i) .eq. 'qj'))) then
+ jetlabel(i)='qj'
+ return
+ endif
+
+ return
+ end
+
+c subroutine combine_snowmass(p,pjet,i,j)
+c implicit none
+c include 'constants.f'
+c include 'jetlabel.f'
+c integer i,j
+c double precision p(mxpart,4),pjet(mxpart,4),ptjetij,yjet,phijet,
+c . ejet,pt,etarap,pti,ptj,yi,yj,phii,phij
+
+C----Snowmass style prescripton
+c pti=pt(i,pjet)
+c ptj=pt(j,pjet)
+
+c yi=etarap(i,pjet)
+c yj=etarap(j,pjet)
+
+c phii=atan2(pjet(i,1),pjet(i,2))
+c phij=atan2(pjet(j,1),pjet(j,2))
+c
+
+c ptjetij=pti+ptj
+c yjet=(pti*yi+ptj*yj)/ptjetij
+c phijet=(pti*phii+ptj*phij)/ptjetij
+c ejet=exp(yjet)
+
+c pjet(i,1)=ptjetij*dsin(phijet)
+c pjet(i,2)=ptjetij*dcos(phijet)
+c pjet(i,3)=ptjetij*(ejet-1d0/ejet)/2d0
+c pjet(i,4)=ptjetij*(ejet+1d0/ejet)/2d0
+
+
+c if (((jetlabel(i) .eq. 'bq') .and. (jetlabel(j) .eq. 'pp'))
+c ..or.((jetlabel(j) .eq. 'bq') .and. (jetlabel(i) .eq. 'pp'))) then
+c jetlabel(i)='bq'
+c return
+c endif
+c if (((jetlabel(i) .eq. 'ba') .and. (jetlabel(j) .eq. 'pp'))
+c ..or.((jetlabel(j) .eq. 'ba') .and. (jetlabel(i) .eq. 'pp'))) then
+c jetlabel(i)='ba'
+c return
+c endif
+c if (((jetlabel(i) .eq. 'bq') .and. (jetlabel(j) .eq. 'ba'))
+c ..or.((jetlabel(j) .eq. 'bq') .and. (jetlabel(i) .eq. 'ba'))) then
+c jetlabel(i)='pp'
+c return
+c endif
+c
+c return
+c end
+
+c subroutine shuffle(pjet,nmin,nmax)
+c--- shuffles jets nmin..nmax-1 in pjet down by 1 index
+c implicit none
+c include 'constants.f'
+c integer i,j,nmin,nmax
+c double precision pjet(mxpart,4)
+
+c if (nmin .eq. nmax) return
+
+c do i=nmin,nmax-1
+c do j=1,4
+c pjet(i,j)=pjet(i+1,j)
+c enddo
+c enddo
+
+c return
+c end
+
+ subroutine swap(pjet,i,j)
+c--- swaps jets i..j in pjet
+ implicit none
+ include 'constants.f'
+ include 'jetlabel.f'
+ integer i,j,k
+ double precision pjet(mxpart,4),tmp
+ character*2 chartmp
+
+ do k=1,4
+ tmp=pjet(i,k)
+ pjet(i,k)=pjet(j,k)
+ pjet(j,k)=tmp
+ enddo
+
+ chartmp=jetlabel(i)
+ jetlabel(i)=jetlabel(j)
+ jetlabel(j)=chartmp
+
+ return
+ end
+
+c double precision function ptjet(j,p,pjet)
+c implicit none
+c include 'constants.f'
+c integer j
+c double precision p(mxpart,4),pjet(mxpart,4)
+c--- This is the formula for pt
+c ptjet=dsqrt(pjet(j,1)**2+pjet(j,2)**2)
+c--- This is the formula for Et
+c ptjet=dsqrt(pjet(j,1)**2+pjet(j,2)**2)
+c . *pjet(j,4)/dsqrt(pjet(j,1)**2+pjet(j,2)**2+pjet(j,3)**2)
+c return
+c end
+
+ double precision function dotjet(p,i,pjet,j)
+C---Dot the ith vector p with the jth vector pjet
+ implicit none
+ include 'constants.f'
+ integer i,j
+ double precision p(mxpart,4),pjet(mxpart,4)
+
+ dotjet=p(i,4)*pjet(j,4)-p(i,1)*pjet(j,1)
+ . -p(i,2)*pjet(j,2)-p(i,3)*pjet(j,3)
+
+ return
+ end
+
+ double precision function bclustmass(pjet)
+ implicit none
+ include 'constants.f'
+ include 'jetlabel.f'
+ integer i,nbq,nba
+ double precision pjet(mxpart,4)
+
+c--- note: this function ASSUMES that there is at most one b-quark
+c--- and one anti-b-quark, returning zero if there are less than this
+
+ bclustmass=0d0
+ nbq=0
+ nba=0
+
+ do i=1,jets
+ if (jetlabel(i) .eq. 'bq') nbq=i+4
+ if (jetlabel(i) .eq. 'ba') nba=i+4
+ enddo
+
+ if ((nbq .eq. 0) .or. (nba .eq. 0)) return
+
+ bclustmass=(pjet(nbq,4)+pjet(nba,4))**2
+ do i=1,3
+ bclustmass=bclustmass-(pjet(nbq,i)+pjet(nba,i))**2
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase51.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase51.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase51.f (revision 1338)
@@ -0,0 +1,63 @@
+ subroutine phase51(r,p1,p2,p3,p4,p5,p6,p7,wt)
+c----phase space for qg--> t(\nu(3) b(5) e^+(4)) bbar(6) q'(7)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'mxdim.f'
+ include 'debug.f'
+c********* generate phase space for 2-->5 process
+c********* r(mxdim),p1(4),p2(4) are inputs
+c--------- incoming p1 and p2 reversed in sign from physical values
+c---- i.e. phase space for -p1-p2 --> p3+p4+p5+p6+p7
+c---- with all 2 pi's (ie 1/(2*pi)^11)
+
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision p127(4),p12(4),p345(4),p34(4),smin
+ double precision wt,wt127,wt3456,wt345,wt34,wt0,bmass
+
+ integer j,n2,n3
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=1d0/twopi**3)
+
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+
+ if (case .eq. 't_bbar') then
+ bmass=0d0
+ smin=0d0
+ else
+ bmass=mb
+ smin=4d0*bmass**2
+ endif
+ call
+ . phi1_2m_nobw(0d0,r(13),r(12),r(11),smin,p12,p7,p127,wt127,*99)
+
+ n2=0
+ n3=1
+ mass3=mt
+ width3=twidth
+ call phi1_2m(bmass,r(1),r(2),r(3),smin,p127,p6,p345,wt3456,*99)
+ n3=1
+ mass3=wmass
+ width3=wwidth
+
+ call phi1_2m(bmass,r(4),r(5),r(6),smin,p345,p5,p34,wt345,*99)
+
+ call phi3m0(r(7),r(8),p34,p3,p4,wt34,*99)
+ wt=wt0*wt127*wt3456*wt345*wt34
+
+ if (debug) write(6,*) 'wt123',wt127
+ if (debug) write(6,*) 'wt3456',wt3456
+ if (debug) write(6,*) 'wt345',wt345
+ if (debug) write(6,*) 'wt34',wt34
+
+ return
+ 99 continue
+ wt=0d0
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen6h.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen6h.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen6h.f (revision 1338)
@@ -0,0 +1,83 @@
+CC Same as gen6.f but phase6 replaced by phase6h
+
+ subroutine gen6h(r,q,wt6,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'debug.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim)
+ double precision wt6,q(mxpart,4)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),p8(4)
+ double precision pswt,xjac,p1ext(4),p2ext(4)
+ double precision xx(2),tau,x1mx2,surd
+ double precision lntaum
+ common/pext/p1ext,p2ext
+ common/x1x2/xx
+ data p3/0d0,0d0,0d0,0d0/
+
+ wt6=0d0
+
+ lntaum=dlog(taumin)
+ tau=dexp(lntaum*(one-r(9)))
+ xjac=-lntaum*tau
+
+c tau=(one-taumin)*r(14)**2+taumin
+c xjac=2*r(13)*(one-taumin)
+
+ x1mx2=two*r(10)-one
+ surd=dsqrt(x1mx2**2+four*tau)
+
+ xx(1)=half*(+x1mx2+surd)
+ xx(2)=half*(-x1mx2+surd)
+ xjac=xjac*two/surd
+
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ do nu=1,4
+ p1(nu)=xx(1)*p1ext(nu)
+ p2(nu)=xx(2)*p2ext(nu)
+ enddo
+
+
+ call phase6h(r,p1,p2,p3,p4,p5,p6,p7,p8,pswt,*999)
+c write(6,*) 'p1sq',p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+c write(6,*) 'p2sq',p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2
+c write(6,*) 'p4sq',p3(4)**2-p3(1)**2-p3(2)**2-p3(3)**2
+c write(6,*) 'p4sq',p4(4)**2-p4(1)**2-p4(2)**2-p4(3)**2
+c write(6,*) 'p5sq',p5(4)**2-p5(1)**2-p5(2)**2-p5(3)**2
+c write(6,*) 'p6sq',p6(4)**2-p6(1)**2-p6(2)**2-p6(3)**2
+c write(6,*) 'p7sq',p7(4)**2-p7(1)**2-p7(2)**2-p7(3)**2
+c write(6,*) 'p8sq',p8(4)**2-p8(1)**2-p8(2)**2-p8(3)**2
+
+c write(6,*) 'p34',2d0*(p3(4)*p4(4)-p3(3)*p4(3)
+c . -p3(2)*p4(2)-p3(1)*p4(1))
+
+c write(6,*) 'p78',2d0*(p8(4)*p7(4)-p8(3)*p7(3)
+c . -p8(2)*p7(2)-p8(1)*p7(1))
+c pause
+
+ do nu=1,4
+ q(1,nu)=p1(nu)
+ q(2,nu)=p2(nu)
+ q(3,nu)=p3(nu)
+ q(4,nu)=p4(nu)
+ q(5,nu)=p5(nu)
+ q(6,nu)=p6(nu)
+ q(7,nu)=p7(nu)
+ q(8,nu)=p8(nu)
+
+ enddo
+ wt6=xjac*pswt
+
+ if (debug) write(6,*) 'wt6 in gen6',wt6
+ return
+
+ 999 return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/genrff.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genrff.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genrff.f (revision 1338)
@@ -0,0 +1,61 @@
+ subroutine genrff(p,i1,i2,i7,r1,r2,phit,wt5_4,*)
+c----i1 is an initial state vector.
+c---final,final--i1 is the emitter
+ implicit none
+ include 'constants.f'
+ include 'debug.f'
+ integer i1,i2,i7,j
+ double precision p(mxpart,4),rtalbe,c(4),d(4),phi,phit,wt5_4
+ double precision dot,r1,r2,jacbit
+ double precision beta,alpha
+ double precision oma,y,omy,wt0
+ parameter(wt0=1d0/eight/pisq)
+
+c----final-final case
+
+c call writeout(p)
+ phi=twopi*phit
+
+C---for p soft set r1=0.9999d0 and r2=0.4999999999d0
+
+c write(6,*) 'setting r1=1d-7'
+c r1=9.999999999999d0
+c write(6,*) 'setting r2=0.49999999'
+c r2=1d-7
+
+
+ y=r1**2
+ omy=one-y
+ if (r2 .le. 0.5d0) oma=(two*r2)**2
+ if (r2 .gt. 0.5d0) oma=one-(two*r2-one)**2
+
+
+ alpha=one-oma
+ beta=y*oma
+ rtalbe=sqrt(beta*alpha)
+c write(6,*) 'i1',i1
+c write(6,*) 'i2',i2
+c write(6,*) 'i7',i7
+c write(6,*) 'alpha,beta,rtalbe',alpha,beta,rtalbe
+ jacbit=four*sqrt(y)/(half/sqrt(oma)+half/sqrt(alpha))
+
+ wt5_4=wt0*omy*dot(p,4,5)*jacbit
+
+ if (debug) write(6,*) 'wt5_4 in genrff',wt5_4
+
+c---generate n-1 momenta from n momenta
+c---sudakov in terms of original vectors
+ call gtperp(rtalbe,p,i1,i2,3,c,d)
+ do j=1,4
+c--define p(i7)
+ p(i7,j)=alpha*p(i1,j)+beta*p(i2,j)+cos(phi)*c(j)+sin(phi)*d(j)
+c--now-define modified p4 and p5
+ p(i1,j)=p(i1,j)+y*p(i2,j)-p(i7,j)
+ p(i2,j)=p(i2,j)*omy
+ enddo
+ call writeout(p)
+
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/wt4gen.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/wt4gen.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/wt4gen.f (revision 1338)
@@ -0,0 +1,70 @@
+ subroutine wt4gen(q,wt4)
+ implicit none
+ include 'constants.f'
+ include 'phasemin.f'
+ include 'debug.f'
+c----given a set of momenta generated calculate the weight
+c----which would have been assigned had it been generated by
+c----routine phase4
+ double precision q(mxpart,4),wt4,s1,m1,m2,s2,s2min,s2max,
+ . s3,s3min,s3max,dot,xx(2)
+ integer n2,n3
+ double precision mass2,width2,mass3,width3,w2,w3,wt0,lambda
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=one/eight/pi)
+ common/x1x2/xx
+ wt4=0d0
+ s1=two*dot(q,1,2)
+ s2=two*dot(q,4,5)
+ s3=two*dot(q,6,7)
+ m1=sqrt(s1)
+ s2min=0d0
+ s2max=s1
+ if (s2min .gt. s2max) then
+c write(6,*) 's2min > s2max in wt4gen'
+c write(6,*) 's2min in wt4gen',s2min
+c write(6,*) 's2max in wt4gen',s2max
+ return
+ endif
+ if (n2 .eq. 0) then
+ w2=s2max-s2min
+ elseif (n2 .eq. 1) then
+ call breitw1(s2,s2min,s2max,mass2,width2,w2)
+ endif
+
+ m2=sqrt(s2)
+ s3min=0d0
+ s3max=(m2-m1)**2
+ if (s3min .gt. s3max) then
+c write(6,*) 's3min > s3max in wt4gen'
+c write(6,*) 's3min in wt4gen',s3min
+c write(6,*) 's3max in wt4gen',s3max
+ return
+ endif
+
+ if (n3 .eq. 0) then
+ w3=s3max-s3min
+ elseif (n3 .eq. 1) then
+ call breitw1(s3,s3min,s3max,mass3,width3,w3)
+ endif
+ lambda=((s1-s2-s3)**2-4d0*s2*s3)
+
+ if (lambda .lt. 0d0) then
+ write(6,*) '(lambda .lt. 0d0) in wt4gen',lambda
+ pause
+ return
+ endif
+
+ lambda=dsqrt(lambda)
+ wt4=wt0*w2*w3*lambda/s1
+ wt4=-(wt0/twopi)**2*wt4*two*log(taumin)*xx(1)*xx(2)/(xx(1)+xx(2))
+ if (debug) write(6,*) 'wt4 in wt4gen',wt4
+
+ return
+ end
+
+
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen3m_rap.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen3m_rap.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen3m_rap.f (revision 1338)
@@ -0,0 +1,178 @@
+ subroutine gen3m_rap(r,p,m3,m4,wt,*)
+ implicit none
+
+ include 'constants.f'
+ include 'mxdim.f'
+c---- generate phase space for 2-->3 process
+c---- with 3 and 4 (masses m3,m4) and 5 massless.
+c---- r(mxdim) and
+c---- p1(4),p2(4) are input momenta reversed in sign from physical values
+c---- phase space for -p1-p2 --> p3+p4+p5
+c---- with all 2 pi)
+ double precision r(mxdim),y5starmin,y5starmax,plstar,plstarsq,
+ . Estar,p(mxpart,4),a,E34st,
+ . wt,p3(4),p4(4),p5(4),p345(4),p34(4),pstsq,
+ . xmin,sqrts,pt5,xx(2),ymin,ymax,phi,wt34,
+ . dely,sinhy,coshy,y,rtshat,pt2,
+ . vs,vsqmax,vsqmin,s34,sinhy5,coshy5,y5,y5max,s34max,s34min,
+ . m3,m4,xjac,w,wmax,wmin
+c double precision p3cm(4),beta,costh,sinth
+ integer j,nu
+ common/energy/sqrts
+ common/x1x2/xx
+ wt=0d0
+
+
+C---set all vectors to zero
+ do nu=1,4
+ p345(nu)=0d0
+ do j=1,mxpart
+ p(j,nu)=0d0
+ enddo
+ enddo
+
+
+ xjac=0.5d0/((twopi)**3*sqrts**2)
+
+
+C--- generate PT5
+ wmin=dlog(1d-5)
+ wmax=dlog((sqrts-m3-m4)/2d0)
+ w=wmin+(wmax-wmin)*r(1)
+ pt5=exp(w)
+ pt2=pt5*pt5
+C express in terms of dptsq
+ xjac=xjac*pt5**2*(wmax-wmin)
+C--generate rapidity
+c--- rapidity limited by sqrts=2*pT*coshy
+ a=sqrts/(pt5+dsqrt(pt2+(m3+m4)**2))
+ y5max=dlog(a+dsqrt(a**2-1d0))
+ y5=y5max*(2d0*r(2)-1d0)
+ sinhy5=dsinh(y5)
+ coshy5=dsqrt(1d0+sinhy5**2)
+ xjac=xjac*2d0*y5max
+
+C--generate phi
+ phi=twopi*r(3)
+ xjac=xjac*twopi
+
+C in lab frame
+ p5(4)=pt5*coshy5
+ p5(1)=pt5*dcos(phi)
+ p5(2)=pt5*dsin(phi)
+ p5(3)=pt5*sinhy5
+
+
+C s34=(p_1+p_2-p_5)^2
+ s34max=sqrts**2-2d0*sqrts*pt5
+ s34min=(m3+m4)**2
+ vsqmax=1d0/s34min
+ vsqmin=1d0/s34max
+ if (vsqmin .gt. vsqmax) then
+ write(6,*) 'gen3m:vsqmin',vsqmin
+ write(6,*) 'gen3m:vsqmax',vsqmax
+ return 1
+ endif
+ xmin=vsqmin/vsqmax
+ vs=(vsqmax-vsqmin)*r(4)+vsqmin
+ s34=1/vs
+ xjac=xjac*(vsqmax-vsqmin)*s34**2
+
+c--- invariant mass of jets
+
+C plstar is longitudinal momentum of p5 (and -p34) in 34-5 centre of mass
+C plstar is obtained by solving s=(p5+p34)^2
+ plstarsq=((sqrts**2-s34)**2-4d0*pt2*sqrts**2)/(4d0*sqrts**2)
+ if (plstarsq .le. 0d0) then
+ write(6,*) 'gen3m:plstarsq,s34,pt2',plstarsq,s34,pt2
+ return 1
+ endif
+
+ plstar=dsqrt(plstarsq)
+ Estar=dsqrt(plstarsq+pt2)
+ y5starmax=dlog((Estar+plstar)/pt5)
+
+ y5starmin=-y5starmax
+ ymax=y5-y5starmin
+ ymin=y5-y5starmax
+ dely=ymax-ymin
+ y=ymin+r(5)*dely
+ sinhy=dsinh(y)
+ coshy=dsqrt(1d0+sinhy**2)
+ xjac=xjac*dely
+c--- now calculate in the centre of mass
+ pstsq=pt2+(p5(3)*coshy-p5(4)*sinhy)**2
+ E34st=dsqrt(s34+pstsq)
+
+ rtshat=E34st+dsqrt(pstsq)
+
+c--- back in lab frame
+ p345(4)=rtshat*coshy
+ p345(3)=rtshat*sinhy
+
+ do j=1,4
+ p34(j)=p345(j)-p5(j)
+ enddo
+
+ xx(1)=(p345(4)+p345(3))/sqrts
+ xx(2)=(p345(4)-p345(3))/sqrts
+
+c if (xx(1)*xx(2) .gt. 1d0) then
+c write(6,*) 'gen3m:xx1*xx2,xx(1),xx(2)',xx(1)*xx(2),xx(1),xx(2)
+c endif
+
+ if ((xx(1) .gt. 1d0) .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin).or. (xx(2) .lt. xmin)) return 1
+
+ xjac=rtshat/E34st*xjac
+
+c--- now make the initial state momenta
+
+
+ p(1,4)=-xx(1)*sqrts/2d0
+ p(1,3)=p(1,4)
+
+ p(2,4)=-xx(2)*sqrts/2d0
+ p(2,3)=-p(2,4)
+
+c--- decay s34 lump into two particles with mass m3 and m4
+ call phi3m(r(6),r(7),p34,p3,p4,m3,m4,wt34,*99)
+
+c costh=2d0*r(6)-1d0
+c sinth=dsqrt(1d0-costh**2)
+c phi=2d0*pi*r(7)
+c beta=dsqrt(1d0-(m3+m4)**2/s34)
+c xjac=4d0*pi*xjac/8d0
+
+c p3cm(4)=dsqrt(s34+m3**2-m4**2)/2d0
+c p3cm(1)=p3cm(4)*beta*sinth*dcos(phi)
+c p3cm(2)=p3cm(4)*beta*sinth*dsin(phi)
+c p3cm(3)=p3cm(4)*beta*costh
+
+
+c--- boost into lab frame
+c call boost(dsqrt(s34),p34,p3cm,p3)
+
+ do j=1,4
+ p(3,j)=p3(j)
+ p(4,j)=p4(j)
+ p(5,j)=p5(j)
+ enddo
+
+ wt=xjac*wt34
+ return
+ 99 continue
+ wt=0d0
+ return 1
+ end
+
+
+
+
+
+
+
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/breitw1.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/breitw1.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/breitw1.f (revision 1338)
@@ -0,0 +1,24 @@
+ subroutine breitw1(msq,mminsq,mmaxsq,rmass,rwidth,wt)
+ implicit none
+c---- Given a mass-squared msq generate a weight wt
+c---- breit-wigner should still be included in the matrix element
+c double precision bw
+ include 'constants.f'
+ include 'zerowidth.f'
+ double precision mminsq,mmaxsq,rmass,rwidth,msq,wt
+ double precision almin,almax,tanal
+
+ if (zerowidth) then
+ tanal=0d0
+ almax=+pi/two
+ almin=-pi/two
+ else
+ almin=atan((mminsq-rmass**2)/rmass/rwidth)
+ almax=atan((mmaxsq-rmass**2)/rmass/rwidth)
+ tanal=(rmass**2-msq)/(rmass*rwidth)
+ endif
+
+ wt=(almax-almin)*rmass*rwidth*(1d0+tanal**2)
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen6hp.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen6hp.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen6hp.f (revision 1338)
@@ -0,0 +1,67 @@
+C My phase space for W(Z)+2partons
+C To be used for double real contribution
+
+ subroutine gen6h(r,q,wt6,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim)
+ double precision wt6,q(mxpart,4)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),p8(4)
+ double precision pswt,xjac,p1ext(4),p2ext(4)
+ double precision xx(2),tau,y,sqrts
+ common/pext/p1ext,p2ext
+ common/x1x2/xx
+ common/energy/sqrts
+
+
+ wt6=0d0
+
+ tau=dexp(dlog(taumin)*r(9))
+ y=0.5d0*dlog(tau)*(1d0-2d0*r(10))
+ xjac=dlog(taumin)*tau*dlog(tau)
+
+ xx(1)=dsqrt(tau)*dexp(+y)
+ xx(2)=dsqrt(tau)*dexp(-y)
+
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+ call phase6h(r,p1,p2,p3,p4,p5,p6,p7,p8,pswt,*999)
+
+
+ do nu=1,4
+ q(1,nu)=p1(nu)
+ q(2,nu)=p2(nu)
+ q(3,nu)=p3(nu)
+ q(4,nu)=p4(nu)
+ q(5,nu)=p5(nu)
+ q(6,nu)=p6(nu)
+ q(7,nu)=p7(nu)
+ q(8,nu)=p8(nu)
+
+ enddo
+
+ wt6=xjac*pswt
+
+
+ return
+
+ 999 return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase3MIO.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase3MIO.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase3MIO.f (revision 1338)
@@ -0,0 +1,52 @@
+C Limit on s34 added
+
+ subroutine phase3(r,p1,p2,p3,p4,p5,p6,p7,wt)
+c----generate phase space for 2-->3 process
+c----r(mxdim),p1(4),p2(4) are inputs
+c----incoming p1 and p2 reversed in sign from physical values
+c----i.e. phase space for -p1-p2 --> p3+p4+p5
+c----with all 2 pi's (ie 1/(2*pi)^5)
+c----(p4,p5) are dummies
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'mxdim.f'
+ include 'limits.f'
+
+ integer j
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision p12(4),p34(4),smin
+ double precision wt,wt125,wt34,wt0,m5
+ parameter(wt0=1d0/twopi)
+
+ m5=0d0
+ if (case .eq. 'W_cjet') then
+ m5=mc
+ elseif (case .eq. 'W_tndk') then
+ m5=mt
+ endif
+
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ p6(j)=0d0
+ p7(j)=0d0
+ enddo
+C smin=0d0
+ smin=wsqmin
+
+c---generate p5 and p34,
+c---smin is the minimum inv mass of 34 system
+c---m5 is the mass of p5
+ call phi1_2m(m5,r(1),r(2),r(3),smin,p12,p5,p34,wt125,*99)
+c---decay 34-system
+ call phi3m0(r(4),r(5),p34,p3,p4,wt34,*99)
+
+ wt=wt0*wt125*wt34
+ return
+ 99 continue
+ wt=0d0
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/genBORN.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genBORN.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genBORN.f (revision 1338)
@@ -0,0 +1,62 @@
+ subroutine genBORN(q2,yq,shat,r,p,wt,*)
+c----generate phase space weight and vectors p(i,4) for i=1,2,3,4
+c----and x1 and x2 given seven random numbers and q2
+c----all other four momenta must be zero
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer nu
+
+ double precision r(mxdim),sqrts,wt,wt34,
+ . p(mxpart,4),p1(4),p2(4),p3(4),p4(4),q(4)
+ double precision pswt,xjac,xx(2),tau,tau0,y,q2,yq,shat
+
+ common/energy/sqrts
+ common/xx0/xx
+
+ wt=0d0
+
+ tau=shat/sqrts**2
+ tau0=q2/sqrts**2
+c y=0.5d0*dlog(tau)*(1d0-2d0*r(7))
+ xjac=dabs(dlog(tau))
+
+ xx(1)=dsqrt(tau0)*dexp(+yq)
+ xx(2)=dsqrt(tau0)*dexp(-yq)
+
+c---if x's out of normal range alternative return
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 99
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+ do nu=1,4
+ q(nu)=-p1(nu)-p2(nu)
+ enddo
+
+ call phi3m0(r(4),r(5),q,p3,p4,wt34,*99)
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ enddo
+ wt=xjac*wt34
+ return
+ 99 continue
+ wt=0d0
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/genii.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genii.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genii.f (revision 1338)
@@ -0,0 +1,97 @@
+ subroutine genii(nperms,p,wt,msq)
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'debug.f'
+ include 'impsample.f'
+ include 'npart.f'
+ logical justjac
+ integer i1,i2,j,k,nperms,j1(2),j2(2)
+ double precision p(mxpart,4),x,xx(2),dot,q(mxpart,4),alpha,
+ . msq(-nf:nf,-nf:nf)
+ double precision omx,Pqq,Pqg,facq,facg,s13,omxmin,a,oma,jacbit
+ double precision wt4,wt,wt5_4,wt0
+ parameter(wt0=1d0/eight/pisq)
+ common/justjac/justjac
+ common/x1x2/xx
+
+ data j1/1,2/
+ data j2/2,1/
+
+ i1=j1(nperms)
+ i2=j2(nperms)
+
+c first of all calculate the variables with which one started
+c---NB all incoming
+
+ s13=2d0*dot(p,i1,3)
+ x=(dot(p,i1,i2)+dot(p,i1,3)+dot(p,i2,3))/dot(p,i1,i2)
+c write(6,*) 'impsample',impsample
+c omxmin=one-xmin
+ omxmin=one-xx(i1)
+ alpha=-dot(p,i2,3)/dot(p,i1,i2)
+ omx=one-x
+ a=alpha/omx
+ oma=1d0-a
+ if (impsample) then
+ jacbit=four*sqrt(omx*omxmin)/(half/sqrt(a)+half/sqrt(oma))
+ else
+ jacbit=omxmin
+ endif
+
+c---at this stage the p are momenta including radiation
+ wt5_4=wt0*dot(p,i1,i2)*omx/x*jacbit
+
+ call itransform(p,q,x,i1,3,i2)
+ call wtgen(npart,q,wt4)
+c---calculate total weight
+ wt=wt5_4*wt4
+
+
+c write(6,*) 'wt2 in genii.f',wt4
+c write(6,*) 'wt3_2 in genii.f',wt5_4
+c write(6,*) 'wt in genii.f',wt
+
+ if (debug) then
+ write(6,*) 'jacbit in genii',jacbit
+ write(6,*) 'omxmin in genii',omxmin
+ write(6,*) 'omx in genii',omx
+ write(6,*) 'wt5_4 in genii',wt5_4
+ write(6,*) 'wt4 in genii',wt4
+ write(6,*) 'wt in genii',wt
+ endif
+
+c---q are in Born level four momenta
+
+ if (justjac) return
+
+ call qqb_WH(q,msq)
+
+ Pqq=CF*(one+x**2)/omx
+ Pqg=TR*(one-two*x*omx)
+ facq=-2*gsq/x*Pqq
+ facg=-2*gsq/x*Pqg
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+
+
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=facq/s13*msq(j,k)
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=facq/s13*msq(j,k)
+ elseif ((j .eq. 0) .and. (k .gt. 0)) then
+ msq(j,k)=facg/s13*
+ &(msq(-1,k)+msq(-2,k)+msq(-3,k)+msq(-4,k)+msq(-5,k))
+ elseif ((j .eq. 0) .and. (k .lt. 0)) then
+ msq(j,k)=facg/s13*
+ &(msq(+1,k)+msq(+2,k)+msq(+3,k)+msq(+4,k)+msq(+5,k))
+
+ endif
+
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen3a.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen3a.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen3a.f (revision 1338)
@@ -0,0 +1,25 @@
+ subroutine gen3a(r,p3,wt,*)
+C---modified phase space generator, generating 2-2 and then 3 from 2
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'debug.f'
+
+ double precision p3(mxpart,4),p2(mxpart,4),r(mxdim),wt,wt2
+c----although wt2 is generated we will not use it
+ call gen2(r,p2,wt2,*999)
+c write(6,*) 'wt2 in gen3a',wt2
+
+c----this generates the full weight from both branchings
+ call gen3from2(p2,r(5),r(6),r(7),p3,wt,*999)
+c write(6,*)
+c pause
+ if (debug) then
+ write(6,*) 'wt in gen3a',wt
+ write(6,*) 'end of gen3a'
+ endif
+
+ return
+ 999 wt=0d0
+ return 1
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen3jet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen3jet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen3jet.f (revision 1338)
@@ -0,0 +1,90 @@
+ subroutine gen3jet(r,p,wt3,*)
+C---generate three particle phase space and x1,x2 integration
+C---p1+p2 --> p3+p4+p5
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer j,nu
+ double precision r(mxdim),p(mxpart,4),xx(2),
+ . sqrts,ymax,ymin,xjac,y3,y4,y5,phi,phi45,wt0,wt3,
+ . pt3,pt4,pt5,xt3,xt4,xt5,rtson2,cphi,sphi,cphi45,sphi45,deltay
+ common/energy/sqrts
+ parameter(wt0=1d0/512d0/pi**3)
+ common/x1x2/xx
+
+ do j=1,mxpart
+ do nu=1,4
+ p(j,nu)=0d0
+ enddo
+ enddo
+
+ phi=2d0*pi*r(1)
+ cphi=dcos(phi)
+ sphi=dsin(phi)
+ phi45=2d0*pi*r(2)
+ cphi45=dcos(phi45)
+ sphi45=dsin(phi45)
+ xjac=sqrts**2
+ ymax=5d0
+ ymin=-5d0
+ Deltay=ymax-ymin
+ y3=ymin+Deltay*r(3)
+ y4=ymin+Deltay*r(4)
+ y5=ymin+Deltay*r(5)
+
+ xjac=xjac*Deltay**3
+
+ xt4=r(6)
+ xt5=r(7)
+ xjac=xjac*xt4*xt5
+ rtson2=0.5d0*sqrts
+ pt4=rtson2*xt4
+ pt5=rtson2*xt5
+
+ p(4,1)=rtson2*xt4*sphi
+ p(4,2)=rtson2*xt4*cphi
+
+ p(5,1)=rtson2*xt5*(+cphi45*sphi+sphi45*cphi)
+ p(5,2)=rtson2*xt5*(-sphi45*sphi+cphi45*cphi)
+
+
+ p(3,1)=-p(4,1)-p(5,1)
+ p(3,2)=-p(4,2)-p(5,2)
+ pt3=dsqrt(p(3,1)**2+p(3,2)**2)
+ xt3=pt3/rtson2
+
+ xx(1)=half*(+xt3*exp(+y3)+xt4*exp(+y4)+xt5*exp(+y5))
+ xx(2)=half*(+xt3*exp(-y3)+xt4*exp(-y4)+xt5*exp(-y5))
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) then
+c write(6,*) 'problems with xx(1),xx(2) in gen3',xx(1),xx(2)
+ return 1
+ endif
+
+ p(1,4)=-0.5d0*xx(1)*sqrts
+ p(1,1)=0d0
+ p(1,2)=0d0
+ p(1,3)=-0.5d0*xx(1)*sqrts
+
+ p(2,4)=-0.5d0*xx(2)*sqrts
+ p(2,1)=0d0
+ p(2,2)=0d0
+ p(2,3)=+0.5d0*xx(2)*sqrts
+
+ p(3,4)=+pt3*cosh(y3)
+ p(3,3)=+pt3*sinh(y3)
+
+ p(4,4)=+pt4*cosh(y4)
+ p(4,3)=+pt4*sinh(y4)
+
+ p(5,4)=+pt5*cosh(y5)
+ p(5,3)=+pt5*sinh(y5)
+
+ wt3=wt0*xjac
+ return
+
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/phi1_2m.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi1_2m.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi1_2m.f (revision 1338)
@@ -0,0 +1,112 @@
+ subroutine phi1_2m(m2,x3,xth,xphi,s3min,p1,p2,p3,wt,*)
+c massive particle p1 decaying into p2 mass m2 and p3 mass-squared s3.
+c with invariant mass of particle three s3 integrated over.
+c s3min is the minimum value of s3.
+c Vectors returned p2 and p3 are in the same frame as p1 is supplied.
+c Expression evaluated is
+c ds3 d^4 p2 d^4 p3 (2 pi)^4 delta(p1-p2-p3)/(2 pi)^6
+c delta(p2^2-m2) delta(p3^2-s3)
+ implicit none
+ include 'constants.f'
+ double precision p1(4),p2(4),p3(4),p3cm(4)
+ double precision x3,xth,xphi,costh,sinth,phi,cphi,sphi
+ double precision wt,wt0,w3
+ double precision s3max,s3min,xx,xexp
+ double precision m1,m2,m3,s1,s2,s3,lambda,xjac,rtxth,
+ . mass2,width2,mass3,width3
+c double precision Eg
+ integer j,n2,n3
+ integer jbranch
+c logical first
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=one/8d0/pi)
+ data jbranch/1/
+ data xjac,rtxth/1d0,1d0/
+c data first/.true./
+ save jbranch,xexp,rtxth,xjac
+c if (first) then
+c first=.false.
+c write(6,*) 'Enter exponent for reweighting'
+c read(5,*) xexp
+c write(6,*) 'xexp',xexp
+c endif
+ xexp=1d0
+ wt=0d0
+ s1=p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+ if (s1 .lt. 0d0) return 1
+ m1=dsqrt(s1)
+ s2=m2**2
+ s3max=(m2-m1)**2
+ if (s3min .gt. s3max) return 1
+ if (n3 .eq. 0) then
+ w3=s3max-s3min
+ s3=s3max*x3+s3min*(1d0-x3)
+ xx=0d0
+ elseif (n3 .eq. 1) then
+ xx=1d0
+ call breitw(x3,s3min,s3max,mass3,width3,s3,w3)
+ endif
+
+ m3=dsqrt(s3)
+ if (m1-m2-m3.lt. 0d0) return 1
+
+
+ if (jbranch .eq. 1) then
+ jbranch=2
+ rtxth=xth**xexp
+ xjac=1d0/(xexp*xth**(xexp-1d0))
+ elseif (jbranch .eq. 2) then
+ jbranch=1
+ rtxth=1d0-xth**xexp
+ xjac=1d0/(xexp*xth**(xexp-1d0))
+ endif
+
+
+
+ costh=two*rtxth-one
+ phi=twopi*xphi
+ sinth=dsqrt(one-costh**2)
+ cphi=dcos(phi)
+ sphi=dsin(phi)
+ lambda=((s1-s2-s3)**2-4d0*s2*s3)
+ if (m1-m2-m3.lt. 0d0) then
+ write(6,*) 'lambda in phi1_2m',lambda
+ write(6,*) 's1 in phi1_2m',s1
+ write(6,*) 's2 in phi1_2m',s2
+ write(6,*) 's3 in phi1_2m',s3
+ write(6,*) 'm1 in phi1_2m',m1
+ write(6,*) 'm2 in phi1_2m',m2
+ write(6,*) 'm3 in phi1_2m',m3
+ write(6,*) 'm1-m2-m3 in phi1_2m',m1-m2-m3
+ write(6,*) 'xx in phi1_2m',xx
+ write(6,*) 'x3 in phi1_2m',x3
+ write(6,*) 'n3 in phi1_2m',n3
+ write(6,*) 'mass3 in phi1_2m',mass3
+ return 1
+ endif
+ lambda=dsqrt(lambda)
+
+ wt=wt0*w3*lambda/s1/xjac
+
+ p3cm(4)=m1/two*(s1+s3-s2)/s1
+ p3cm(1)=m1/two*lambda/s1*sinth*sphi
+ p3cm(2)=m1/two*lambda/s1*sinth*cphi
+ p3cm(3)=m1/two*lambda/s1*costh
+
+
+ call boost(m1,p1,p3cm,p3)
+ do j=1,4
+ p2(j)=p1(j)-p3(j)
+ enddo
+
+
+ if ( (p1(4) .lt. 0d0)
+ & .or. (p2(4) .lt. 0d0)
+ & .or. (p3(4) .lt. 0d0)) then
+ return 1
+ endif
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/genrad.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genrad.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genrad.f (revision 1338)
@@ -0,0 +1,46 @@
+ subroutine genrad(p,i1,i2,i7,r1,r2,phit,wt,*)
+c----this is only a switchyard routine.
+c----i1 is the initial state vector, except for final-final case
+c----i7 is the generated vector
+ implicit none
+ include 'constants.f'
+ integer i1,i2,i7,j
+ double precision p(mxpart,4),phit,wt
+ double precision r1,r2
+
+c---change sign of incoming momenta
+ wt=0d0
+ do j=1,4
+ p(1,j)=-p(1,j)
+ p(2,j)=-p(2,j)
+ enddo
+
+c----initial-initial case
+ if ((i1 .le. 2) .and. (i2 .le. 2)) then
+ call genrii(p,i1,i2,i7,r1,r2,phit,wt,*999)
+c******************************************************************
+c----final-final case
+ elseif ((i1 .gt. 2) .and. (i2 .gt. 2)) then
+ call genrff(p,i1,i2,i7,r1,r2,phit,wt,*999)
+c------initial final
+ elseif ((i1 .le. 2) .and. (i2 .gt. 2)) then
+ call genrif(p,i1,i2,i7,r1,r2,phit,wt,*999)
+c---protection
+ else
+ write(6,*) 'Unimplemented case'
+ stop
+ endif
+
+c---reverse signs of incoming momenta so that they are all incoming
+ do j=1,4
+ p(1,j)=-p(1,j)
+ p(2,j)=-p(2,j)
+ enddo
+
+ return
+ 999 continue
+ wt=0
+ return 1
+
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen4MIO.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen4MIO.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen4MIO.f (revision 1338)
@@ -0,0 +1,66 @@
+C My phase space for W(Z)+2partons
+C To be used for double real contribution
+
+ subroutine gen4(r,p,wt4,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'process.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim)
+ double precision wt4,p1(4),p2(4),p3(4),p4(4),p5(4),p6(4)
+ double precision p(mxpart,4)
+ double precision pswt,xjac,p1ext(4),p2ext(4)
+ double precision xx(2),tau,y,sqrts
+ common/pext/p1ext,p2ext
+ common/x1x2/xx
+ common/energy/sqrts
+
+
+ wt4=0d0
+
+ tau=dexp(dlog(taumin)*r(9))
+ y=0.5d0*dlog(tau)*(1d0-2d0*r(10))
+ xjac=dlog(taumin)*tau*dlog(tau)
+
+ xx(1)=dsqrt(tau)*dexp(+y)
+ xx(2)=dsqrt(tau)*dexp(-y)
+
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+ call phase4(r,p1,p2,p3,p4,p5,p6,pswt,*999)
+
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ p(6,nu)=p6(nu)
+ p(7,nu)=0d0
+
+ enddo
+
+ wt4=xjac*pswt
+
+ return
+
+ 999 return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen7_rap.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen7_rap.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen7_rap.f (revision 1338)
@@ -0,0 +1,64 @@
+ subroutine gen7_rap(r,p,wt7,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ integer nu
+
+ double precision r(mxdim)
+ double precision wt7,p(mxpart,4),tp(4),tm(4),bp(4),bm(4),
+ . nn(4),nb(4)
+ double precision wtepnn,wtnbem,ep(4),em(4),pg(4)
+ double precision wp(4),wm(4),m3,m4
+ double precision wt0,wtttg,wtwp,wtwm,s3min
+ parameter(wt0=1d0/twopi**4)
+
+
+ integer n2,n3
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ data wp,wm,ep,em,nn,nb,bp,bm/32*0d0/
+* q(-p1) +qbar(-p2)=t(nu(p3)+e^+(p4)+b(p5)) *
+* +t~(b~(p6)+e^-(p7)+nu(p8))+g(p9) *
+* *
+ wt7=0d0
+ m3=mt
+ m4=mt
+ call gen3m_rap(r,p,m3,m4,wtttg,*999)
+ wtttg=(pi*mt*twidth)**2*wtttg
+ do nu=1,4
+ tp(nu)=p(3,nu)
+ tm(nu)=p(4,nu)
+ pg(nu)=p(5,nu)
+ enddo
+ s3min=0d0
+ n3=1
+ mass3=wmass
+ width3=wwidth
+
+ call phi1_2m(mb,r(8),r(9),r(10),s3min,tp,bm,wp,wtwp,*999)
+ call phi1_2m(mb,r(11),r(12),r(13),s3min,tm,bp,wm,wtwm,*999)
+ call phi3m0(r(14),r(15),wp,nn,ep,wtepnn,*999)
+ call phi3m0(r(16),r(17),wm,em,nb,wtnbem,*999)
+
+ wt7=wt0*wtepnn*wtnbem*wtwp*wtwm*wtttg
+* q(-p1) +qbar(-p2)=t(nu(p3)+e^+(p4)+b(p5)) *
+* +t~(b~(p6)+e^-(p7)+nu(p8))+g(p9) *
+* *
+ do nu=1,4
+ p(3,nu)=nn(nu)
+ p(4,nu)=ep(nu)
+ p(5,nu)=bm(nu)
+
+ p(6,nu)=bp(nu)
+ p(7,nu)=em(nu)
+ p(8,nu)=nb(nu)
+
+ p(9,nu)=pg(nu)
+ enddo
+ return
+ 999 wt7=0d0
+ return 1
+
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen4from3.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen4from3.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen4from3.f (revision 1338)
@@ -0,0 +1,80 @@
+ subroutine gen4from3(q,z,rtalpha,phit,p,jac,*)
+c----jac is the total wt of the whole business (2) and (3 from 2)
+c----q are the input momenta
+c----p are the output momenta
+ implicit none
+ include 'constants.f'
+ include 'debug.f'
+ integer nmin,nmax,j,iseed,i1(8),i2(8),k
+ double precision p(mxpart,4),q(mxpart,4),z,rtalpha,phit,
+ . wt3_2,msq(-nf:nf,-nf:nf)
+ double precision sum(0:8),wtc(8),apweight(8),jac,ran0,myran
+ common/apwt/apweight
+ common/nmin/nmin
+ common/nmax/nmax
+ data iseed/1768/
+ data i1/1,2,1,2,1,2,5,6/
+ data i2/2,1,5,5,6,6,6,5/
+
+c if (debug) call writeout(q)
+
+ do j=1,7
+ do k=1,4
+ p(j,k)=q(j,k)
+ enddo
+ enddo
+
+ sum(nmin-1)=0d0
+
+ do j=nmin,nmax
+ apweight(j)=1d0/dfloat(nmax-nmin+1)
+ sum(j)=sum(j-1)+apweight(j)
+ if (debug) then
+ write(6,*) 'j',j
+ write(6,*) 'apweight(j)',apweight(j)
+ write(6,*) 'sum(j)',sum(j)
+ endif
+ enddo
+
+ myran=ran0(iseed)
+
+ do j=nmin,nmax
+ if ((myran .gt. sum(j-1)) .and. (myran .lt. sum(j))) then
+c---genrad is a switchyard routine routing to genrii,genrif,genrff
+c---genrad modifies the vector p to provide new ones
+ call genrad(p,i1(j),i2(j),6,z,rtalpha,phit,wt3_2,*999)
+c---although genrad returns wt3_2 we shall not use it
+c---in this step we have generated the new p's (only one set)
+c---only one option is pursued in this do-loop
+ endif
+ enddo
+ if (debug) then
+ write(6,*) 'wt3_2 in gen3from2.f',wt3_2
+ call writeout(p)
+ endif
+
+c---Sum over channels
+c---Initialize jac
+ jac=0d0
+ do j=nmin,nmax
+ if ((j .eq. 1) .or. (j .eq. 2))
+ . call genii(j,p,wtc(j),msq)
+ if ((j .eq. 3) .or. (j .eq. 4))
+ . call genif(j-2,p,wtc(j),msq)
+ if ((j .eq. 5) .or. (j .eq. 6) .or. (j .eq. 7) .or. (j .eq. 8))
+ . call genff(j-4,p,wtc(j),msq)
+c jac=jac+apweight(j)/wtc(j)
+ jac=jac+1d0/wtc(j)
+ enddo
+ jac=1d0/jac
+
+ if (debug) write(6,*)
+ if (debug) write(6,*) 'this is the result of reconstruction'
+ if (debug) write(6,*) 'jac in gen3from2',jac
+ if (debug) pause
+ return
+
+ 999 jac=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase41.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase41.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase41.f (revision 1338)
@@ -0,0 +1,52 @@
+ subroutine phase41(r,p1,p2,p3,p4,p5,p6,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'limits.f'
+ include 'mxdim.f'
+c********* generate phase space for 2-->4 process
+c********* r(mxdim),p1(4),p2(4) are inputs reversed in sign from physical values
+c---- phase space for -p1-p2 --> p4+p5+p6+p7
+c---- with all 2 pi's (ie 1/(2*pi)^8)
+ integer n2,n3
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4)
+ double precision p12(4),p345(4),p34(4),s345min
+ double precision wt,wt3456,wt345,wt34,wt0
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ double precision Mbbsq
+
+ integer j
+ parameter(wt0=1d0/twopi**2)
+ wt=0d0
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+ s345min=mb**2
+c---- calculate momenta of top and bbbar
+
+ n2=0
+ n3=1
+ mass3=mt
+ width3=twidth
+
+ call phi1_2m(mb,r(1),r(2),r(3),s345min,p12,p6,p345,wt3456,*99)
+
+ n3=1
+ mass3=wmass
+ width3=wwidth
+ call phi1_2m(mb,r(4),r(5),r(6),zip,p345,p5,p34,wt345,*99)
+
+ Mbbsq=2*(mb**2+p5(4)*p6(4)-p5(1)*p6(1)-p5(2)*p6(2)-p5(3)*p6(3))
+ if ((Mbbsq .gt. bbsqmax) .or. (Mbbsq .lt. bbsqmin)) return 1
+
+ call phi3m0(r(7),r(8),p34,p3,p4,wt34,*99)
+
+ wt=wt0*wt3456*wt345*wt34
+
+ return
+ 99 wt=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen3m.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen3m.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen3m.f (revision 1338)
@@ -0,0 +1,72 @@
+ subroutine gen3m(r,p,m3,m4,m5,wt3,*)
+c----generate 3 dimensional phase space weight and vectors p(mxpart,4)
+c---- p1+p2+p3+p4+p5=0
+c----and x1 and x2 given seven random numbers
+c----p(6,i) and p(7,i) are set equal to zero
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'phasemin.f'
+ integer nu,j
+ double precision r(mxdim),sqrts,wt3
+ double precision p(mxpart,4),
+ . p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),m3,m4,m5
+ double precision pswt,xjac,xx(2),tau,y
+
+ common/energy/sqrts
+ common/x1x2/xx
+
+ do nu=1,4
+ do j=1,mxpart
+ p(j,nu)=0d0
+ enddo
+ enddo
+
+ wt3=0d0
+ tau=exp(log(taumin)*r(6))
+ y=0.5d0*log(tau)*(1d0-2d0*r(7))
+ xjac=log(taumin)*tau*log(tau)
+
+ xx(1)=dsqrt(tau)*exp(+y)
+ xx(2)=dsqrt(tau)*exp(-y)
+
+c---if x's out of normal range alternative return
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+ if (case .eq. 'tottth') then
+ m3=mt
+ m4=mt
+ m5=hmass
+ endif
+
+ call phase3m(r,p1,p2,p3,p4,p5,p6,p7,m3,m4,m5,pswt)
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ enddo
+ wt3=xjac*pswt
+
+
+
+ if(wt3 .eq. 0d0) return 1
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/genrif.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genrif.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genrif.f (revision 1338)
@@ -0,0 +1,49 @@
+ subroutine genrif(p,i1,i2,i7,r1,r2,phit,wt5_4,*)
+c----i1 is an initial state vector.
+ implicit none
+ include 'constants.f'
+ include 'debug.f'
+ include 'xmin.f'
+ integer i1,i2,i7,j
+ double precision p(mxpart,4),rtalbe,c(4),d(4),phi,phit,wt5_4,
+ . jacbit,dot,r1,r2
+ double precision beta,alpha
+ double precision x,omx,omxmin,wt0
+ parameter(wt0=1d0/eight/pisq)
+
+c------initial final
+
+ phi=twopi*phit
+ omxmin=one-xmin
+
+c -xx(i1)
+ omx=omxmin*r1**2
+ x=one-omx
+ if (r2 .lt. 0.5d0) alpha=(two*r2)**2
+ if (r2 .gt. 0.5d0) alpha=one-(two*r2-one)**2
+
+ jacbit=four*r1/(half/sqrt(alpha)+half/sqrt(one-alpha))
+
+ wt5_4=wt0*dot(p,i1,i2)/x**2*omxmin*jacbit
+ if (debug) write(6,*) 'i1 in genrif',i1
+ if (debug) write(6,*) 'i2 in genrif',i2
+ if (debug) write(6,*) 'x in genrif',x
+ if (debug) write(6,*) 'omxmin in genrif',omxmin
+ if (debug) write(6,*) 'wt5_4 in genrif',wt5_4
+ beta=omx*(1d0-alpha)/x
+ rtalbe=sqrt(beta*alpha)
+c---generate transverse vectors c and d with length^2=rtalbe^2*2*p1Dp2
+c-- with direction in transverse plane picked by 6
+ call gtperp(rtalbe,p,i1,i2,6,c,d)
+
+ do j=1,4
+c---sudakov in terms of original variables
+ p(i7,j)=alpha*p(i2,j)+beta*p(i1,j)+cos(phi)*c(j)+sin(phi)*d(j)
+ p(i1,j)=p(i1,j)/x
+ p(i2,j)=p(i2,j)-p(i7,j)+omx*p(i1,j)
+ enddo
+
+c---we have now finished generating momenta and can return
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/kingen.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/kingen.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/kingen.f (revision 1338)
@@ -0,0 +1,99 @@
+ subroutine kingen(p)
+ implicit none
+ include 'constants.f'
+ integer iout
+ double precision p(mxpart,4),s(mxpart,mxpart)
+ call dotem(10,p,s)
+ write(6,*) 'p1',p(1,1),p(1,2),p(1,3),p(1,4)
+ write(6,*) 'p2',p(2,1),p(2,2),p(2,3),p(2,4)
+ write(6,*) 'p3',p(3,1),p(3,2),p(3,3),p(3,4)
+ write(6,*) 'p4',p(4,1),p(4,2),p(4,3),p(4,4)
+ write(6,*) 'p5',p(5,1),p(5,2),p(5,3),p(5,4)
+ write(6,*) 'p6',p(6,1),p(6,2),p(6,3),p(6,4)
+ write(6,*) 'p7',p(7,1),p(7,2),p(7,3),p(7,4)
+ write(6,*) 'p8',p(8,1),p(8,2),p(8,3),p(8,4)
+ write(6,*) 'p9',p(9,1),p(9,2),p(9,3),p(9,4)
+ write(6,*) 'p0',p(10,1),p(10,2),p(10,3),p(10,4)
+
+ open(unit=7,file='kin.blo',status='unknown')
+ do iout=7,7
+ write(iout,*)'P ninput'
+ write(iout,*)'Id,Numer,p1Dp1,',0
+ write(iout,*)'Al,Numer,p1Dp2,',half*s(1,2)
+ write(iout,*)'Al,Numer,p1Dp3,',half*s(1,3)
+ write(iout,*)'Al,Numer,p1Dp4,',half*s(1,4)
+ write(iout,*)'Al,Numer,p1Dp5,',half*s(1,5)
+ write(iout,*)'Al,Numer,p1Dp6,',half*s(1,6)
+ write(iout,*)'Al,Numer,p1Dp7,',half*s(1,7)
+ write(iout,*)'Al,Numer,p1Dp8,',half*s(1,8)
+ write(iout,*)'Al,Numer,p1Dp9,',half*s(1,9)
+ write(iout,*)'Al,Numer,p1Dp0,',half*s(1,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p2Dp2,',0
+ write(iout,*)'Al,Numer,p2Dp3,',half*s(2,3)
+ write(iout,*)'Al,Numer,p2Dp4,',half*s(2,4)
+ write(iout,*)'Al,Numer,p2Dp5,',half*s(2,5)
+ write(iout,*)'Al,Numer,p2Dp6,',half*s(2,6)
+ write(iout,*)'Al,Numer,p2Dp7,',half*s(2,7)
+ write(iout,*)'Al,Numer,p2Dp8,',half*s(2,8)
+ write(iout,*)'Al,Numer,p2Dp9,',half*s(2,9)
+ write(iout,*)'Al,Numer,p2Dp0,',half*s(2,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p3Dp3,',0
+ write(iout,*)'Al,Numer,p3Dp4,',half*s(3,4)
+ write(iout,*)'Al,Numer,p3Dp5,',half*s(3,5)
+ write(iout,*)'Al,Numer,p3Dp6,',half*s(3,6)
+ write(iout,*)'Al,Numer,p3Dp7,',half*s(3,7)
+ write(iout,*)'Al,Numer,p3Dp8,',half*s(3,8)
+ write(iout,*)'Al,Numer,p3Dp9,',half*s(3,9)
+ write(iout,*)'Al,Numer,p3Dp0,',half*s(3,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p4Dp4,',0
+ write(iout,*)'Al,Numer,p4Dp5,',half*s(4,5)
+ write(iout,*)'Al,Numer,p4Dp6,',half*s(4,6)
+ write(iout,*)'Al,Numer,p4Dp7,',half*s(4,7)
+ write(iout,*)'Al,Numer,p4Dp8,',half*s(4,8)
+ write(iout,*)'Al,Numer,p4Dp9,',half*s(4,9)
+ write(iout,*)'Al,Numer,p4Dp0,',half*s(4,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p5Dp5,',0
+ write(iout,*)'Al,Numer,p5Dp6,',half*s(5,6)
+ write(iout,*)'Al,Numer,p5Dp7,',half*s(5,7)
+ write(iout,*)'Al,Numer,p5Dp8,',half*s(5,8)
+ write(iout,*)'Al,Numer,p5Dp9,',half*s(5,9)
+ write(iout,*)'Al,Numer,p5Dp0,',half*s(5,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p6Dp6,',0
+ write(iout,*)'Al,Numer,p6Dp7,',half*s(6,7)
+ write(iout,*)'Al,Numer,p6Dp8,',half*s(6,8)
+ write(iout,*)'Al,Numer,p6Dp9,',half*s(6,9)
+ write(iout,*)'Al,Numer,p6Dp0,',half*s(6,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p7Dp7,',0
+ write(iout,*)'Al,Numer,p7Dp8,',half*s(7,8)
+ write(iout,*)'Al,Numer,p7Dp9,',half*s(7,9)
+ write(iout,*)'Al,Numer,p7Dp0,',half*s(7,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p8Dp8,',0
+ write(iout,*)'Al,Numer,p8Dp9,',half*s(8,9)
+ write(iout,*)'Al,Numer,p8Dp0,',half*s(8,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p9Dp9,',0
+ write(iout,*)'Al,Numer,p9Dp0,',half*s(9,10)
+ write(iout,*)'*yep'
+ write(iout,*)'Id,Numer,p0Dp0,',0
+ write(iout,*)'P input'
+ write(iout,*)'End'
+ enddo
+C q1=p2+p3+p4+p5
+C r1=p2+p3+p6+p7
+C q2=p2+p4+p5
+C r2=p2+p6+p7
+C t1=p3+p4+t5
+C t3=p4+p5
+C t4=p3+p5
+C t5=p3+t4
+
+ close(unit=7)
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen_stop.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen_stop.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen_stop.f (revision 1338)
@@ -0,0 +1,226 @@
+ subroutine gen_stop(r,njets,p,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'limits.f'
+ include 'xmin.f'
+ include 'zerowidth.f'
+ include 'process.f'
+c---- Generate phase space for 2-->2+n process
+c---- with (345) being a top and 6,..,5+n the jets
+c---- r(mxdim),p1(4),p2(4) are inputs reversed in sign
+c---- from physical values
+c---- phase space for -p1-p2 --> p3+p4+p5+p6
+c---- with all 2 pi's (ie 1/(2*pi)^(3n-4), where n is the number
+c---- of final state particles)
+c---- This routine has a minimum of 4 final state particles, hence
+c---- the twopi**2 correction factor is given by the ratio of
+c---- (1/twopi)**(3n-4) present in the phase space and the factor
+c---- of [(1/twopi)**2]**(n-1) from the number of branchings
+c---- For the specific case 'ttdkay' where one of the jets is
+c---- associated with the top quark decay, we must add an extra
+c---- factor of (1/twopi) since the number of jets generated is
+c---- larger than the value of 'njets' passed
+ double precision r(mxdim)
+ double precision p(mxpart,4),psumjet(4),pcm(4),Q(4)
+ double precision wt,wt0,wtbg
+ double precision hmin,hmax,delh,h,sqrts,pt,etamax,etamin,xx(2)
+ double precision y,sinhy,coshy,phi,mv2,wtbw,mjets
+ double precision ybar,ptsumjet2,ycm,sumpst,q0st,rshat,dely
+ double precision ptjetmin,etajetmin,etajetmax,pbreak
+ double precision plstar,estar,plstarsq,y5starmax,y5starmin
+ double precision bm(4),wp(4),nn(4),ep(4),pbg(4),g(4),wtwp,wtepnn
+ integer j,nu,njets,ijet,in
+ logical first,oldzerowidth,xxerror
+ character*4 part
+ parameter(wt0=1d0/twopi**2)
+ common/part/part
+ common/energy/sqrts
+ common/x1x2/xx
+ common/reset/reset,scalereset
+ logical reset,scalereset
+ data first/.true./,xxerror/.false./
+ save first,ptjetmin,etajetmin,etajetmax,pbreak,xxerror
+
+ if (first .or. reset) then
+ first=.false.
+ reset=.false.
+ call read_jetcuts(ptjetmin,etajetmin,etajetmax)
+ if (part .eq. 'real') then
+c--- if we're generating phase space for real emissions, then we need
+c--- to produce partons spanning the whole phase space pt>0,eta<10;
+c--- in this case, pbreak=ptjetmin simply means that we
+c--- generate pt approx. 1/x for pt > pbreak and
+c--- pt approx. uniformly for pt < pbreak
+ pbreak=ptjetmin
+ ptjetmin=0d0
+ etajetmax=10d0
+ else
+c--- for lord and virt, the partons produced here can be generated
+c--- right up to the jet cut boundaries and there is no need for pbreak
+ pbreak=0d0
+ endif
+c--- in case this routine is used for very small values of ptjetmin
+ if (ptjetmin .lt. 5d0) pbreak=5d0
+ endif
+
+ do nu=1,4
+ do j=1,5+njets
+ p(j,nu)=0d0
+ enddo
+ psumjet(nu)=0d0
+ pcm(nu)=0d0
+ enddo
+
+ wt=2d0*pi
+
+ do ijet=1,njets
+c--- generate the pt of jet number ijet
+c--- rapidity limited by E=pT*coshy
+ wt=wt/16d0/pi**3
+c xmin=2d0/sqrts
+c xmax=1d0/ptjetmin
+ hmin=1d0/dsqrt((sqrts/2d0)**2+pbreak**2)
+ hmax=1d0/dsqrt(ptjetmin**2+pbreak**2)
+ delh=hmax-hmin
+ h=hmin+r(ijet)*delh
+ pt=dsqrt(1d0/h**2-pbreak**2)
+ etamax=sqrts/2d0/pt
+ if (etamax**2 .le. 1d0) then
+ write(6,*) 'etamax**2 .le. 1d0 in gen_stop.f',etamax**2
+ wt=0d0
+ return 1
+ endif
+ etamax=dlog(etamax+dsqrt(etamax**2-1d0))
+
+ etamax=min(etamax,etajetmax)
+ y=etamax*(2d0*r(njets+ijet)-1d0)
+ wt=wt*2d0*etamax
+
+ sinhy=dsinh(y)
+ coshy=dsqrt(1d0+sinhy**2)
+
+ p(5+ijet,4)=pt*coshy
+ wt=wt*delh/h**3
+
+ phi=2d0*pi*r(2*njets+ijet)
+ wt=wt*2d0*pi
+
+ p(5+ijet,1)=pt*dcos(phi)
+ p(5+ijet,2)=pt*dsin(phi)
+ p(5+ijet,3)=pt*sinhy
+
+ do nu=1,4
+ psumjet(nu)=psumjet(nu)+p(5+ijet,nu)
+ enddo
+ enddo
+
+c--- now generate Breit-Wigner, but always with zero width
+ oldzerowidth=zerowidth
+ zerowidth=.true.
+ call breitw(one,wsqmin,wsqmax,mt,twidth,mv2,wtbw)
+ zerowidth=oldzerowidth
+ wt=wt*wtbw
+c--- invariant mass of jets
+ mjets=psumjet(4)**2-psumjet(1)**2-psumjet(2)**2-psumjet(3)**2
+ mjets=dsqrt(dabs(mjets))
+
+ ybar=0.5d0*dlog((psumjet(4)+psumjet(3))/(psumjet(4)-psumjet(3)))
+ ptsumjet2=psumjet(1)**2+psumjet(2)**2
+ plstarsq=((sqrts**2-mv2-mjets**2)**2
+ . -4d0*(mjets**2*mv2+ptsumjet2*sqrts**2))/(4d0*sqrts**2)
+ if (plstarsq .le. 0d0) then
+ wt=0d0
+ return 1
+ endif
+ plstar=dsqrt(plstarsq)
+ Estar=dsqrt(plstarsq+ptsumjet2+mjets**2)
+ y5starmax=0.5d0*dlog((Estar+plstar)/(Estar-plstar))
+ y5starmin=-y5starmax
+
+ etamax=ybar-y5starmin
+ etamin=ybar-y5starmax
+ dely=etamax-etamin
+ ycm=etamin+r(3*njets+1)*dely
+ sinhy=dsinh(ycm)
+ coshy=dsqrt(1d0+sinhy**2)
+
+c--- now make the initial state momenta
+ sumpst=ptsumjet2+(psumjet(3)*coshy-psumjet(4)*sinhy)**2
+ q0st=dsqrt(mv2+sumpst)
+ rshat=q0st+dsqrt(mjets**2+sumpst)
+ pcm(4)=rshat*coshy
+ pcm(3)=rshat*sinhy
+
+ xx(1)=(pcm(4)+pcm(3))/sqrts
+ xx(2)=(pcm(4)-pcm(3))/sqrts
+
+ if ((xx(1)*xx(2) .gt. 1d0) .and. (xxerror .eqv. .false.)) then
+ xxerror=.true.
+ write(6,*) 'gen_stop: xx(1)*xx(2),xx(1),xx(2)',
+ . xx(1)*xx(2),xx(1),xx(2)
+ endif
+
+ if ((xx(1) .gt. 1d0) .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin).or. (xx(2) .lt. xmin)) then
+ wt=0d0
+ return 1
+ endif
+
+ wt=wt*dely
+ do j=1,4
+ Q(j)=pcm(j)-psumjet(j)
+ enddo
+
+ p(1,4)=-xx(1)*sqrts/2d0
+ p(1,3)=p(1,4)
+ p(2,4)=-xx(2)*sqrts/2d0
+ p(2,3)=-p(2,4)
+
+ wt=wt*rshat/(sqrts**2*q0st)
+
+c--- If we're calculating top decay then generate the additional jet
+c--- for the real contribution here, after the decay
+ if ( ((case .eq. 'ttdkay') .or. (case .eq. 'tdecay'))
+ . .and. (part .eq. 'real') ) then
+ in=3*njets+2
+ call phi1_2(r(in),r(in+1),r(in+2),r(in+3),Q,pbg,wp,wtwp,*999)
+ in=in+4
+ call phi3m0(r(in),r(in+1),pbg,bm,g,wtbg,*999)
+ call phi3m0(r(in+2),r(in+3),wp,nn,ep,wtepnn,*999)
+ wt=wt0*wt*wtwp*wtbg*wtepnn/twopi
+ do nu=1,4
+ p(7,nu)=g(nu)
+ enddo
+ else
+ call phi1_2m(zip,r(3*njets+2),r(3*njets+3),r(3*njets+4),zip,
+ . Q,bm,wp,wtwp,*999)
+ call phi3m0(r(3*njets+5),r(3*njets+6),wp,nn,ep,wtepnn,*999)
+ wt=wt0*wt*wtwp*wtepnn
+ endif
+
+ do nu=1,4
+ p(3,nu)=nn(nu)
+ p(4,nu)=ep(nu)
+ p(5,nu)=bm(nu)
+ enddo
+
+
+ return
+
+ 999 wt=0d0
+ return 1
+
+ end
+
+
+
+
+
+
+
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase3.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase3.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase3.f (revision 1338)
@@ -0,0 +1,43 @@
+ subroutine phase3(r,p1,p2,p3,p4,p5,p6,p7,wt)
+c----generate phase space for 2-->3 process
+c----r(mxdim),p1(4),p2(4) are inputs
+c----incoming p1 and p2 reversed in sign from physical values
+c----i.e. phase space for -p1-p2 --> p3+p4+p5
+c----with all 2 pi's (ie 1/(2*pi)^5)
+c----(p4,p5) are dummies
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'mxdim.f'
+
+ integer j
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision p12(4),p34(4),smin
+ double precision wt,wt125,wt34,wt0,m5
+ parameter(wt0=1d0/twopi)
+
+ m5=0d0
+
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ p6(j)=0d0
+ p7(j)=0d0
+ enddo
+ smin=0d0
+
+c---generate p5 and p34,
+c---smin is the minimum inv mass of 34 system
+c---m5 is the mass of p5
+ call phi1_2m(m5,r(1),r(2),r(3),smin,p12,p5,p34,wt125,*99)
+c---decay 34-system
+ call phi3m0(r(4),r(5),p34,p3,p4,wt34,*99)
+
+ wt=wt0*wt125*wt34
+ return
+ 99 continue
+ wt=0d0
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/genff.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genff.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genff.f (revision 1338)
@@ -0,0 +1,74 @@
+ subroutine genff(nperms,p,wt,msq)
+c--- final-final subtraction.
+c--- nperms is an argument between 1 and 2
+c--- this routine calculates the jacobian associated with calculating
+c--- a given final state, by contracting a final-final dipole
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'debug.f'
+ integer i4,i5,j4(2),j5(2),j,k,nperms
+ double precision p(mxpart,4),z,dot,q(mxpart,4),
+ . msq(-nf:nf,-nf:nf),wt4,wt5_4
+ double precision facq,wt,s3i4,y,omy,jacbit,wt0
+ parameter(wt0=1d0/eight/pisq)
+ data j4/4,5/
+ data j5/5,4/
+
+ i4=j4(nperms)
+ i5=j5(nperms)
+
+c write(6,*) 'genff:nperms',nperms
+c write(6,*) 'genff:i4',i4
+c write(6,*) 'genff:i5',i5
+
+c first of calculate the variable's which one started with
+c---nb all incoming
+ s3i4=two*dot(p,3,i4)
+ y=dot(p,3,i4)/(dot(p,3,i4)+dot(p,3,i5)+dot(p,i4,i5))
+ z=dot(p,3,i5)/(dot(p,3,i5)+dot(p,i4,i5))
+ omy=one-y
+
+ do j=1,4
+ q(1,j)=p(1,j)
+ q(2,j)=p(2,j)
+ q(3,j)=p(3,j)
+ q(6,j)=p(6,j)
+ q(7,j)=p(7,j)
+ q(i4,j)=p(i4,j)+p(3,j)-p(i5,j)*y/omy
+ q(i5,j)=p(i5,j)/omy
+ enddo
+
+ jacbit=four*sqrt(y)/(0.5d0/sqrt(z)+0.5d0/sqrt(1d0-z))
+ wt5_4=wt0*omy*dot(q,4,5)*jacbit
+
+ call wt4gen(q,wt4)
+c---calculate total weight
+ wt=wt4*wt5_4
+
+ if (debug) then
+ write(6,*) 'wt5_4 in genff',wt5_4
+ write(6,*) 'wt4 in genff',wt4
+ write(6,*) 'wt in genff',wt
+ endif
+
+
+ call qqb_wbb(q,msq)
+
+
+ facq=-gsq/s3i4*(two/(one-z*(one-y))-one-z)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=facq*msq(j,k)
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=facq*msq(j,k)
+ endif
+ enddo
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase5.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase5.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase5.f (revision 1338)
@@ -0,0 +1,55 @@
+ subroutine phase5(r,p1,p2,p3,p4,p5,p6,p7,wt)
+c----phase space for signal
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'mxdim.f'
+c********* generate phase space for 2-->5 process
+c********* r(mxdim),p1(4),p2(4) are inputs
+c--------- incoming p1 and p2 reversed in sign from physical values
+c---- i.e. phase space for -p1-p2 --> p3+p4+p5+p6+p7
+c---- with all 2 pi's (ie 1/(2*pi)^11)
+
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision p127(4),p12(4),p56(4),p34(4),smin
+ double precision wt,wt127,wt3456,wt34,wt56,wt0
+ integer j
+
+ parameter(wt0=1d0/twopi**3)
+
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+
+
+ smin=mb**2
+
+c--- In the case of HVV_4l, we should generate s127 according to
+c--- a Breit-Wigner at mH, otherwise just linearly
+
+CC if ((case .eq. 'HWW_4l') .or. (case .eq. 'HZZ_4l')) then
+ call phi1_2m_bw(zip,r(13),r(12),r(11),smin,p12,p7,p127,
+ . hmass,hwidth,wt127,*99)
+CC else
+CC call phi1_2m_nobw(zip,r(13),r(12),r(11),
+CC . smin,p12,p7,p127,wt127,*99)
+CC endif
+
+ call phi1_2(r(1),r(2),r(3),r(4),p127,p56,p34,wt3456,*99)
+
+ call phi3m0(r(5),r(6),p56,p5,p6,wt56,*99)
+
+ call phi3m0(r(7),r(8),p34,p3,p4,wt34,*99)
+
+ wt=wt0*wt127*wt3456*wt56*wt34
+
+
+
+ return
+ 99 continue
+ wt=0d0
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase5a.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase5a.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase5a.f (revision 1338)
@@ -0,0 +1,38 @@
+ subroutine phase5a(r,p1,p2,p3,p4,p5,p6,p7,wt)
+c----phase space for signal
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+c********* generate phase space for 2-->5 process
+c********* r(mxdim),p1(4),p2(4) are inputs
+c--------- incoming p1 and p2 reversed in sign from physical values
+c---- i.e. phase space for -p1-p2 --> p3+p4+p5+p6+p7
+c---- with all 2 pi's (ie 1/(2*pi)^11)
+
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision p12(4),p56(4),p34(4),p567(4),smin
+ double precision wt,wt34567,wt567,wt34,wt56,wt0
+ integer j
+
+ parameter(wt0=1d0/twopi**3)
+
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+ smin=0d0
+ call phi1_2(r(1),r(2),r(3),r(4),p12,p34,p567,wt34567,*99)
+ call phi3m0(r(5),r(6),p34,p3,p4,wt34,*99)
+ call phi1_2m_bw(zip,r(9),r(10),r(11),smin,p567,p7,p56,
+ . wmass,wwidth,wt567,*99)
+ call phi3m0(r(12),r(13),p56,p5,p6,wt56,*99)
+
+ wt=wt0*wt34567*wt34*wt567*wt56
+
+ return
+ 99 continue
+ wt=0d0
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase7.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase7.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase7.f (revision 1338)
@@ -0,0 +1,88 @@
+ subroutine phase7(r,p1,p2,p3,p4,p5,p6,p7,p8,p9,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'process.f'
+c******* generate phase space for 2-->4 process
+c******* r(mxdim),p1(4),p2(4) are inputs reversed in sign from physical values
+c---- phase space for -p1-p2 --> p3+p4+p5+p6+p7+p8+p9+p10
+c---- with all 2 pi's (ie 1/(2*pi)^20)
+ integer n2,n3,nu,iflip,j
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),p8(4),
+ . p9(4),p12(4),pa(4),pb(4),
+ . p345(4),p678(4),p34(4),p78(4),
+ . smin,wt,wt0,wt12,wt345,wt678,wt34,wt78,wt9,
+ . mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=1d0/twopi**5)
+ data iflip/0/
+ save iflip
+ wt=0d0
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+ smin=100d0
+
+ n2=0
+ n3=0
+ if ((case .eq. 'qq_ttg')
+ . .or.(case .eq. 'tt_bbl')
+ . .or.(case .eq. 'tt_bbh')) then
+ mass2=mt
+ width2=twidth
+ mass3=mt
+ width3=twidth
+ elseif (case .eq. 'hlljet') then
+ mass2=mtau
+ width2=tauwidth
+ mass3=mtau
+ width3=tauwidth
+ else
+ write(*,*) 'Bad case in phase7.f'
+ stop
+ endif
+
+c massive particle p12 decaying into pa pb
+c with invariant mass
+c of particle two s2 and particle three s3 integrated over.
+c vectors returned p2 and p3 are in the same frame as p1 is supplied
+ call phi1_2(r(1),r(2),r(3),r(4),p12,pa,pb,wt12,*99)
+
+ if (iflip .eq. 0) then
+C----emission of parton p9
+ iflip=1
+ call phi1_2m(0d0,r(5),r(6),r(7),smin,pa,p9,p345,wt9,*99)
+ do nu=1,4
+ p678(nu)=pb(nu)
+ enddo
+ elseif (iflip .eq. 1) then
+C----emission of parton p9
+ iflip=0
+ call phi1_2m(0d0,r(5),r(6),r(7),smin,pa,p9,p678,wt9,*99)
+ do nu=1,4
+ p345(nu)=pb(nu)
+ enddo
+ endif
+
+ mass3=wmass
+ width3=wwidth
+c--decay of p345 into p5 and p34
+ call phi1_2m(mb,r(8),r(9),r(10),smin,p345,p5,p34,wt345,*99)
+c--decay of p678 into p6 and p78
+ call phi1_2m(mb,r(11),r(12),r(13),smin,p678,p6,p78,wt678,*99)
+
+ if ((p5(4).le.0d0).or.(p6(4).le.0d0)) goto 99
+ call phi3m0(r(14),r(15),p34,p3,p4,wt34,*99)
+ if ((p3(4).le.0d0).or.(p4(4).le.0d0)) goto 99
+ call phi3m0(r(16),r(17),p78,p7,p8,wt78,*99)
+ if ((p7(4).le.0d0).or.(p8(4).le.0d0)) goto 99
+
+ wt=wt0*wt12*wt9*wt345*wt678*wt34*wt78
+
+ return
+ 99 wt=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen2a.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen2a.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen2a.f (revision 1338)
@@ -0,0 +1,51 @@
+ subroutine gen2a(r,p,wt2,*)
+c----1+2 --> 3+4
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim),p(mxpart,4),wt2,xx(2),sqrts
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ common/energy/sqrts
+ common/x1x2/xx
+
+ data p5/0d0,0d0,0d0,0d0/
+ data p6/0d0,0d0,0d0,0d0/
+ data p7/0d0,0d0,0d0,0d0/
+
+
+ xx(1)=xmin+(1d0-xmin)*r(1)
+ xx(2)=xmin+(1d0-xmin)*r(2)
+
+ p1(4)=-0.5d0*xx(1)*sqrts
+ p1(1)=0d0
+ p1(2)=0d0
+ p1(3)=-0.5d0*xx(1)*sqrts
+
+ p2(4)=-0.5d0*xx(2)*sqrts
+ p2(1)=0d0
+ p2(2)=0d0
+ p2(3)=+0.5d0*xx(2)*sqrts
+
+
+
+ call phase2(r,p1,p2,p3,p4,wt2,*999)
+
+c---5,6,7=dummies -- just so nothing crashes
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ p(6,nu)=p6(nu)
+ p(7,nu)=p7(nu)
+ enddo
+ wt2=wt2*(1d0-xmin)**2
+ return
+
+ 999 continue
+ wt2=0d0
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen3.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen3.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen3.f (revision 1338)
@@ -0,0 +1,63 @@
+ subroutine gen3(r,p,wt3,*)
+c----generate 3 dimensional phase space weight and vectors p(7,4)
+c----and x1 and x2 given seven random numbers
+c----p(5,i) and p(4,i) are set equal to zero
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer nu
+
+ double precision r(mxdim),sqrts,wt3,
+ . p(mxpart,4),p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision pswt,xjac,xx(2),tau,y
+
+ common/energy/sqrts
+ common/x1x2/xx
+ data p6/0d0,0d0,0d0,0d0/
+ data p7/0d0,0d0,0d0,0d0/
+
+ wt3=0d0
+ tau=dexp(dlog(taumin)*r(6))
+ y=0.5d0*dlog(tau)*(1d0-2d0*r(7))
+ xjac=dlog(taumin)*tau*dlog(tau)
+
+ xx(1)=dsqrt(tau)*dexp(+y)
+ xx(2)=dsqrt(tau)*dexp(-y)
+
+
+c---if x's out of normal range alternative return
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+
+ call phase3(r,p1,p2,p3,p4,p5,p6,p7,pswt)
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ p(6,nu)=p6(nu)
+ p(7,nu)=p7(nu)
+ enddo
+ wt3=xjac*pswt
+
+
+ if(wt3 .eq. 0d0) return 1
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen5.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen5.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen5.f (revision 1338)
@@ -0,0 +1,57 @@
+ subroutine gen5(r,p,wt5,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'process.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim),sqrts,wt5,
+ . p(mxpart,4),p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision pswt,xjac
+ double precision xx(2),tau,y
+ common/energy/sqrts
+ common/x1x2/xx
+
+ wt5=0d0
+ tau=dexp(dlog(taumin)*r(9))
+ y=0.5d0*dlog(tau)*(1d0-2d0*r(10))
+ xjac=dlog(taumin)*tau*dlog(tau)
+
+ xx(1)=dsqrt(tau)*dexp(+y)
+ xx(2)=dsqrt(tau)*dexp(-y)
+
+c---if x's out of normal range alternative return
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+
+ call phase5(r,p1,p2,p3,p4,p5,p6,p7,pswt)
+
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ p(6,nu)=p6(nu)
+ p(7,nu)=p7(nu)
+ enddo
+ wt5=xjac*pswt
+
+ if (wt5 .eq. 0d0) return 1
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen7.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen7.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen7.f (revision 1338)
@@ -0,0 +1,75 @@
+ subroutine gen7(r,q,wt7,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'process.f'
+ include 'phasemin.f'
+ include 'debug.f'
+ integer nu
+ double precision r(mxdim)
+ double precision wt7,q(mxpart,4)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),p8(4),
+ . p9(4),pswt,xjac,p1ext(4),p2ext(4)
+ double precision xx(2),tau,x1mx2,surd
+ double precision lntaum
+ common/pext/p1ext,p2ext
+ common/x1x2/xx
+ data p1,p2,p3,p4,p5,p6,p7,p8,p9/36*0d0/
+
+ wt7=0d0
+
+ lntaum=dlog(taumin)
+ tau=dexp(lntaum*(one-r(18)))
+ xjac=-lntaum*tau
+
+c tau=(one-taumin)*r(14)**2+taumin
+c xjac=2*r(13)*(one-taumin)
+
+ x1mx2=two*r(19)-one
+ surd=dsqrt(x1mx2**2+four*tau)
+
+ xx(1)=half*(+x1mx2+surd)
+ xx(2)=half*(-x1mx2+surd)
+ xjac=xjac*two/surd
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ do nu=1,4
+ p1(nu)=xx(1)*p1ext(nu)
+ p2(nu)=xx(2)*p2ext(nu)
+ enddo
+
+ if ((case .eq. 'qq_ttg')
+ ..or.(case .eq. 'tt_bbl')
+ ..or.(case .eq. 'tt_bbh')) then
+ call phase7(r,p1,p2,p3,p4,p5,p6,p7,p8,p9,pswt,*999)
+ elseif (case .eq. 'hlljet') then
+ call phase7m(r,p1,p2,p3,p4,p5,p6,p7,p8,p9,pswt,*999)
+ else
+ write(*,*) 'Bad process name in gen7.f'
+ stop
+ endif
+
+ do nu=1,4
+ q(1,nu)=p1(nu)
+ q(2,nu)=p2(nu)
+ q(3,nu)=p3(nu)
+ q(4,nu)=p4(nu)
+ q(5,nu)=p5(nu)
+ q(6,nu)=p6(nu)
+ q(7,nu)=p7(nu)
+ q(8,nu)=p8(nu)
+ q(9,nu)=p9(nu)
+ q(10,nu)=0d0
+
+ enddo
+ wt7=xjac*pswt
+ if (debug) write(6,*) 'wt7 in gen7',wt7
+ return
+
+ 999 return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phi3m0.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi3m0.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi3m0.f (revision 1338)
@@ -0,0 +1,64 @@
+ subroutine phi3m0(xth,xphi,p0,p1,p2,wt,*)
+c massive particle p0 in rest frame
+c decaying into p1 fixed mass 0 and p2 fixed mass 0.
+c vectors returned p1 and p2 are in the frame in which
+C p0 is supplied
+c result is 1/8/pi * 2|p|/sqrts * domega/(4*pi)
+c factor of (2*pi)^4 included in definition of phase space
+c Expression evaluated is
+c d^4 p1 d^4 p2 (2 pi)^4 delta(p0-p1-p2)/(2 pi)^6
+c delta(p2^2) delta(p3^2)
+ implicit none
+ include 'constants.f'
+ include 'process.f'
+ double precision p0(4),p1(4),p2(4),p1cm(4)
+ double precision xth,xphi,phi,s,roots,costh,sinth
+ double precision wt0,wt
+ integer j
+ parameter(wt0=one/eight/pi)
+ wt=0d0
+
+ s=p0(4)**2-p0(1)**2-p0(2)**2-p0(3)**2
+ if (s .lt. zip) then
+ if (case(1:5) .ne. 'vlchk') then
+ write(6,*) 's<0 in phi3m0',s
+ endif
+ return 1
+ endif
+
+ roots=dsqrt(s)
+ costh=two*xth-one
+ sinth=dsqrt(one-costh**2)
+ phi=twopi*xphi
+
+ wt=wt0
+
+ p1cm(4)=roots/two
+ p1cm(1)=roots/two*sinth*dsin(phi)
+ p1cm(2)=roots/two*sinth*dcos(phi)
+ p1cm(3)=roots/two*costh
+
+c write(6,*) 'e',roots/two*(s+m1sq-m2sq)/s
+c write(6,*) 'p',roots/two*lambda/s
+
+c write(6,*) 'sinth',sinth
+c write(6,*) 'costh',costh
+c write(6,*) 'p1cm**2',p1cm(4)**2-p1cm(1)**2-p1cm(2)**2-p1cm(3)**2
+c pause
+
+ call boost(roots,p0,p1cm,p1)
+ do j=1,4
+ p2(j)=p0(j)-p1(j)
+ enddo
+
+ if ( (p0(4) .lt. 0d0)
+ & .or. (p1(4) .lt. 0d0)
+ & .or. (p2(4) .lt. 0d0)) then
+ write(6,*) 'p0',p0(4),p0(4)**2-p0(1)**2-p0(2)**2-p0(3)**2,s
+ write(6,*) 'p1',p1(4),p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+ write(6,*) 'p2',p2(4),p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2
+ write(6,*) 'in phi3m0'
+ endif
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen4h.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen4h.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen4h.f (revision 1338)
@@ -0,0 +1,66 @@
+c--- Generates 2->4 phase space with (3456) a Breit-Wigner around
+c--- the Higgs mass
+ subroutine gen4h(r,p,wt4,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'masses.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim)
+ double precision wt4,p1(4),p2(4),p3(4),p4(4),p5(4),p6(4)
+ double precision p(mxpart,4),sqrts,rtshat
+ double precision pswt,xjac
+ double precision xx(2),s3456,wt3456,ymax,yave
+ common/energy/sqrts
+ common/x1x2/xx
+
+ wt4=0d0
+
+ call breitw(r(9),0d0,sqrts**2,hmass,hwidth,s3456,wt3456)
+
+ rtshat=dsqrt(s3456)
+ ymax=dlog(sqrts/rtshat)
+ yave=ymax*(two*r(10)-1d0)
+ xjac=two*ymax*wt3456
+
+ xx(1)=rtshat/sqrts*exp(+yave)
+ xx(2)=rtshat/sqrts*exp(-yave)
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) then
+c write(6,*) 'problems with xx(1),xx(2) in gen4h',xx(1),xx(2)
+ return 1
+ endif
+
+ p1(4)=-0.5d0*xx(1)*sqrts
+ p1(1)=0d0
+ p1(2)=0d0
+ p1(3)=-0.5d0*xx(1)*sqrts
+
+ p2(4)=-0.5d0*xx(2)*sqrts
+ p2(1)=0d0
+ p2(2)=0d0
+ p2(3)=+0.5d0*xx(2)*sqrts
+
+ call phase4(r,p1,p2,p3,p4,p5,p6,pswt,*999)
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ p(6,nu)=p6(nu)
+ p(7,nu)=0d0
+ enddo
+
+ wt4=xjac*pswt/sqrts**2
+
+ return
+
+ 999 return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/wt2gen.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/wt2gen.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/wt2gen.f (revision 1338)
@@ -0,0 +1,36 @@
+ subroutine wt2gen(q,wt2)
+ implicit none
+ include 'constants.f'
+ include 'limits.f'
+c----given a set of momenta generated calculate the weight
+c----which would have been assigned had it been generated by
+c----routine phase4
+ double precision q(mxpart,4),wt2,s3,ymax,dot
+ integer n2,n3
+ double precision mass2,width2,mass3,width3,w3,wt0,sqrts
+ common/energy/sqrts
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=one/16d0/pi)
+ s3=two*dot(q,6,7)
+ ymax=log(sqrts/sqrt(s3))
+ if (n3 .eq. 0) then
+ w3=wsqmax-wsqmin
+ elseif (n3 .eq. 1) then
+ call breitw1(s3,wsqmin,wsqmax,mass3,width3,w3)
+ endif
+ wt2=wt0*four*ymax*w3/sqrts**2
+c write(6,*) 'x1*x2=',s3/sqrts**2
+c pause
+c write(6,*) 'ymax',ymax
+c write(6,*) 'w3',w3
+c write(6,*) 'sqrts',sqrts
+c write(6,*) 'wt2',wt2
+
+ return
+ end
+
+
+
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen5from4.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen5from4.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen5from4.f (revision 1338)
@@ -0,0 +1,69 @@
+ subroutine gen5from4(q,z,rtalpha,phit,p,jac,*)
+c----jac is the total wt of the whole business (4) and (5 from 4)
+ implicit none
+ include 'constants.f'
+ include 'debug.f'
+ integer nmin,nmax,j,iseed,i1(8),i2(8),k
+ double precision p(mxpart,4),q(mxpart,4),z,rtalpha,phit,
+ . wt5_4,msq(-nf:nf,-nf:nf)
+ double precision sum(0:8),wtc(8),apweight(8),jac,ran0,myran
+ common/apwt/apweight
+ common/nmin/nmin
+ common/nmax/nmax
+ data iseed/1768/
+ data i1/1,2,1,1,2,2,5,6/
+ data i2/2,1,5,6,5,6,6,5/
+
+c call writeout(p)
+
+ do j=1,7
+ do k=1,4
+ p(j,k)=q(j,k)
+ enddo
+ enddo
+
+ sum(nmin-1)=0d0
+
+ do j=nmin,nmax
+ apweight(j)=1d0/dfloat(nmax-nmin+1)
+ sum(j)=sum(j-1)+apweight(j)
+ if (debug) then
+ write(6,*) 'j',j
+ write(6,*) 'apweight(j)',apweight(j)
+ write(6,*) 'sum(j)',sum(j)
+ endif
+ enddo
+
+ myran=ran0(iseed)
+
+ do j=nmin,nmax
+ if ((myran .gt. sum(j-1)) .and. (myran .lt. sum(j))) then
+c---genrad is a switchyard routine routing to genrii,genrif,genrff
+ call genrad(p,i1(j),i2(j),7,z,rtalpha,phit,wt5_4,*999)
+c---although genrad returns wt5_4 we shall not use it
+c---in this step we have generated the new p's (only one set)
+c---only one option is pursued in this do-loop
+ endif
+ enddo
+
+c---Sum over channels
+c---Initialize jac
+ jac=0d0
+ do j=nmin,nmax
+ if ((j .eq. 1) .or. (j .eq. 2))
+ . call genii(j,p,wtc(j),msq)
+ if ((j .eq. 3) .or. (j .eq. 4))
+ . call genff(j-2,p,wtc(j),msq)
+ if ((j .eq. 5) .or. (j .eq. 6) .or. (j .eq. 7) .or. (j .eq. 8))
+ . call genif(j-4,p,wtc(j),msq)
+ jac=jac+apweight(j)/wtc(j)
+ enddo
+ jac=1d0/jac
+
+
+ return
+
+ 999 jac=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen2m.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen2m.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen2m.f (revision 1338)
@@ -0,0 +1,98 @@
+ subroutine gen2m(r,p,wt2,*)
+C---generate two particle phase space and x1,x2 integration
+C---p1+p2 --> p3+p4
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ integer n2,n3,j,nu
+
+ double precision r(mxdim),p(mxpart,4),xx(2)
+ double precision sqrts,ymax,yave,ydif,xjac,y3,y4,phi,wt0,wt2,w3,vs
+ double precision vsqmin,vsqmax,pt,s34,xmin,rtshat,udif,trmass,beta
+ common/energy/sqrts
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=1d0/16d0/pi)
+ common/x1x2/xx
+
+ do j=1,mxpart
+ do nu=1,4
+ p(j,nu)=0d0
+ enddo
+ enddo
+ vsqmax=1d0/(4d0*mass2**2)
+ vsqmin=1d0/sqrts**2
+ xmin=vsqmin/vsqmax
+ wt2=0d0
+ vs=(vsqmax-vsqmin)*r(3)+vsqmin
+ s34=1/vs
+ w3=(vsqmax-vsqmin)*s34**2
+ rtshat=dsqrt(s34)
+ ymax=dlog(sqrts/rtshat)
+ yave=ymax*(two*r(1)-1d0)
+
+c----udif=tanh(ydif)
+ beta=dsqrt(1d0-4d0*mass2**2/s34)
+ udif=beta*(two*r(2)-1d0)
+ ydif=half*dlog((1d0+udif)/(1d0-udif))
+ xjac=four*ymax*beta
+
+ y3=yave+ydif
+ y4=yave-ydif
+
+ xjac=xjac*w3
+ phi=2d0*pi*r(4)
+
+ xx(1)=rtshat/sqrts*exp(+yave)
+ xx(2)=rtshat/sqrts*exp(-yave)
+ trmass=rtshat/(2d0*dcosh(ydif))
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) then
+ write(6,*) 'problems with xx(1),xx(2) in gen2',xx(1),xx(2)
+ return 1
+ endif
+
+ pt=dsqrt(trmass**2-mass2**2)
+
+ p(1,4)=-0.5d0*xx(1)*sqrts
+ p(1,1)=0d0
+ p(1,2)=0d0
+ p(1,3)=-0.5d0*xx(1)*sqrts
+
+ p(2,4)=-0.5d0*xx(2)*sqrts
+ p(2,1)=0d0
+ p(2,2)=0d0
+ p(2,3)=+0.5d0*xx(2)*sqrts
+
+ p(3,4)=+trmass*dcosh(y3)
+ p(3,1)=+pt*dsin(phi)
+ p(3,2)=+pt*dcos(phi)
+ p(3,3)=+trmass*dsinh(y3)
+
+ p(4,4)=+trmass*dcosh(y4)
+ p(4,1)=-pt*dsin(phi)
+ p(4,2)=-pt*dcos(phi)
+ p(4,3)=+trmass*dsinh(y4)
+
+ wt2=wt0*xjac/sqrts**2
+
+c write(6,*) 's34',s34
+c write(6,*) 's34-4d0*mass2**2',s34-4d0*mass2**2
+c write(6,*) 'wsqmax',wsqmax
+c write(6,*) 'ymax',ymax
+c write(6,*) 'wsqmin',wsqmin
+c write(6,*) 'y3',y3
+c write(6,*) 'y4',y4
+c write(6,*) 'xx(1)',xx(1)
+c write(6,*) 'xx(2)',xx(2)
+c write(6,*) 'trmass',trmass
+c write(6,*) 'mass2',mass2
+c write(6,*) 'pt',pt
+c write(6,*) 's12',2d0*(p(1,4)*p(2,4)-p(1,3)*p(2,3))
+
+ return
+
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/rangen.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/rangen.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/rangen.f (revision 1338)
@@ -0,0 +1,32 @@
+C-----------------------------------------------------------------------
+C-----------------------------------------------------------------------
+C-----------------------------------------------------------------------
+ SUBROUTINE RANGEN(N,R)
+ IMPLICIT NONE
+C---RANDOM NUMBER GENERATOR
+C USES METHOD OF l'Ecuyer, (VIA F.JAMES, COMP PHYS COMM 60(1990)329)
+C RETURNS A VECTOR OF N RANDOM VALUES
+C IF (N.EQ.0) THE FIRST TWO VALUES IN R SET THE SEEDS
+C IF (N.LT.0) PRINT THE CURRENT VALUES OF THE SEEDS
+ DOUBLE PRECISION R(*)
+ INTEGER N,I,ISEED(2),K,IZ
+ DATA ISEED/12345,678900/
+ IF (N.LT.0) WRITE (*,'(I10,A,I10,I11)') -N-1,', ISEED=',ISEED
+ IF (N.GT.0) THEN
+ DO I=1,N
+ K=ISEED(1)/53668
+ ISEED(1)=40014*(ISEED(1)-K*53668)-K*12211
+ IF (ISEED(1).LT.0) ISEED(1)=ISEED(1)+2147483563
+ K=ISEED(2)/52774
+ ISEED(2)=40692*(ISEED(2)-K*52774)-K*3791
+ IF (ISEED(2).LT.0) ISEED(2)=ISEED(2)+2147483399
+ IZ=ISEED(1)-ISEED(2)
+ IF (IZ.LT.1) IZ=IZ+2147483562
+ R(I)=DBLE(IZ)*4.656613D-10
+ ENDDO
+ ELSEIF (N.EQ.0) THEN
+ ISEED(1)=NINT(R(1))
+ ISEED(2)=NINT(R(2))
+ ENDIF
+ END
+C-----------------------------------------------------------------------
Index: dynnlo-v1.5-applgrid/src/Phase/genBORN2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genBORN2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genBORN2.f (revision 1338)
@@ -0,0 +1,63 @@
+ subroutine genBORN2(q2,shat,r,p,wt,*)
+c----generate phase space weight and vectors p(i,4) for i=1,2,3,4
+c----and x1 and x2 given seven random numbers and q2
+c----all other four momenta must be zero
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer nu
+
+ double precision r(mxdim),sqrts,wt,wt34,
+ . p(mxpart,4),p1(4),p2(4),p3(4),p4(4),q(4)
+ double precision pswt,xjac,xx(2),tau,tau0,y,q2,yq,shat
+
+ common/energy/sqrts
+ common/xx0/xx
+
+ wt=0d0
+
+ tau=shat/sqrts**2
+ tau0=q2/sqrts**2
+ y=0.5d0*dlog(tau0)*(1d0-2d0*r(7))
+ xjac=dabs(dlog(tau0))
+
+ xx(1)=dsqrt(tau0)*dexp(+y)
+ xx(2)=dsqrt(tau0)*dexp(-y)
+
+c---if x's out of normal range alternative return
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 99
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+ do nu=1,4
+ q(nu)=-p1(nu)-p2(nu)
+ enddo
+
+
+ call phi3m0(r(4),r(5),q,p3,p4,wt34,*99)
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ enddo
+ wt=xjac*wt34
+ return
+ 99 continue
+ wt=0d0
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/genBORN4.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genBORN4.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genBORN4.f (revision 1338)
@@ -0,0 +1,61 @@
+ subroutine genBORN4(q2,shat,r,p,wt,*)
+c----generate phase space weight and vectors p(i,4) for i=1,2,3,4,5,6
+C q2 and shat are input
+C
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer nu
+
+ double precision r(mxdim),sqrts,wt,wt34,
+ . p(mxpart,4),p1(4),p2(4),p3(4),p4(4),p5(4),p6(4)
+ double precision pswt,xjac,xx(2),tau,tau0,y,q2,yq,shat
+
+ common/energy/sqrts
+ common/xx0/xx
+
+ wt=0d0
+
+ tau=shat/sqrts**2
+ tau0=q2/sqrts**2
+ y=0.5d0*dlog(tau0)*(1d0-2d0*r(10))
+ xjac=dabs(dlog(tau0))
+
+ xx(1)=dsqrt(tau0)*dexp(+y)
+ xx(2)=dsqrt(tau0)*dexp(-y)
+
+c---if x's out of normal range alternative return
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 99
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+
+ call phase4(r,p1,p2,p3,p4,p5,p6,pswt,*99)
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ p(6,nu)=p6(nu)
+ enddo
+ wt=xjac*pswt
+ return
+ 99 continue
+ wt=0d0
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/phase6hp.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase6hp.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase6hp.f (revision 1338)
@@ -0,0 +1,54 @@
+CC NEW: generate p12->(p3+p4+p5+p6)+p7+p8
+CC where p3,p4,p5,p6 come from the decay of the Higgs boson
+
+ subroutine phase6hp(r,p1,p2,p3,p4,p5,p6,p7,p8,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'zerowidth.f'
+ include 'process.f'
+
+ logical oldzerowidth
+ integer n2,n3
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p5(4),p6(4),p3(4),p4(4),p7(4),p8(4)
+ double precision p12(4),p3456(4),p34(4),p56(4),p78(4),smin
+ double precision wt,wt0,wt12,wt3456,wt78,wt34,wt56
+
+
+ integer j
+ parameter(wt0=1d0/twopi**4)
+ wt=0d0
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+
+CC p12->p3456+p78
+
+ call phi1_2m(hmass,r(2),r(3),r(4),1d-10,p12,p3456,p78,wt12,*99)
+
+
+CC p3456->p34+p56
+
+ call phi1_2(r(5),r(6),r(7),r(8),p3456,p34,p56,wt3456,*99)
+
+CC p34->p3+p4
+
+ call phi3m0(r(11),r(12),p34,p3,p4,wt34,*99)
+
+CC p56->p5+p6
+
+ call phi3m0(r(13),r(14),p56,p5,p6,wt56,*99)
+
+CC p78->p7+p8
+
+ call phi3m0(r(15),r(16),p78,p7,p8,wt78,*99)
+
+ wt=wt0*wt12*wt3456*wt34*wt56*wt78
+
+ return
+ 99 wt=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phi3m.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi3m.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi3m.f (revision 1338)
@@ -0,0 +1,78 @@
+ subroutine phi3m(xth,xphi,p0,p1,p2,m1,m2,wt,*)
+c massive particle p0 in rest frame
+c decaying into p1 fixed mass m1 and p2 fixed mass m2.
+c vectors returned p1 and p2 are in the frame in which
+C p0 is supplied
+c result is 1/8/pi * 2|p|/sqrts * domega/(4*pi)
+c factor of (2*pi)^4 included in definition of phase space
+ implicit none
+ include 'constants.f'
+ include 'process.f'
+ double precision p0(4),p1(4),p2(4),p1cm(4)
+ double precision xth,xphi,phi,s,roots,costh,sinth
+ double precision wt0,wt
+ double precision m1,m2,m1sq,m2sq,lambda,lambda2,smin
+ integer j
+ common/smin/smin
+ parameter(wt0=one/eight/pi)
+ wt=0d0
+
+ s=p0(4)**2-p0(1)**2-p0(2)**2-p0(3)**2
+
+ smin=(m1+m2)**2
+ if (s .lt. smin) then
+ if (case(1:4) .ne. 'vlch') then
+ write(6,*) 's<smin',s,smin
+ endif
+ return 1
+ endif
+
+ if (dsqrt(s)-m1-m2 .lt. 0d0) return 1
+
+ roots=dsqrt(s)
+ m1sq=m1**2
+ m2sq=m2**2
+ costh=two*xth-one
+ sinth=dsqrt(one-costh**2)
+ phi=twopi*xphi
+
+ lambda2=((s+m1sq-m2sq)**2-4d0*m1sq*s)
+
+ if (lambda2 .lt. 0d0) then
+ write(6,*) 'phi3m:lambda2=', lambda2
+ return 1
+ endif
+ lambda=dsqrt(lambda2)
+
+ wt=wt0*lambda/s
+
+ p1cm(4)=roots/two*(s+m1sq-m2sq)/s
+ p1cm(1)=roots/two*lambda/s*sinth*dsin(phi)
+ p1cm(2)=roots/two*lambda/s*sinth*dcos(phi)
+ p1cm(3)=roots/two*lambda/s*costh
+
+c write(6,*) 'e',roots/two*(s+m1sq-m2sq)/s
+c write(6,*) 'p',roots/two*lambda/s
+
+c write(6,*) 'sinth',sinth
+c write(6,*) 'costh',costh
+c write(6,*) 'p1cm**2',p1cm(4)**2-p1cm(1)**2-p1cm(2)**2-p1cm(3)**2
+c pause
+
+ call boost(roots,p0,p1cm,p1)
+ do j=1,4
+ p2(j)=p0(j)-p1(j)
+ enddo
+
+
+ if ( (p0(4) .lt. 0d0)
+ & .or. (p1(4) .lt. 0d0)
+ & .or. (p2(4) .lt. 0d0)) then
+ write(6,*) 'p0',p0(4),p0(4)**2-p0(1)**2-p0(2)**2-p0(3)**2,s
+ write(6,*) 'p1',p1(4),p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2,m1sq
+ write(6,*) 'p2',p2(4),p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2,m2sq
+ write(6,*) 'in phi3m'
+ endif
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phi1_2test.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi1_2test.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi1_2test.f (revision 1338)
@@ -0,0 +1,108 @@
+ subroutine phi1_2(x1,x2,x3,x4,p1,p2,p3,wt,*)
+c massive particle p1 decaying into p2 mass m2 and p3 mass m3.
+c with invariant mass
+c of particle two s2 and particle three s3 integrated over.
+c vectors returned p2 and p3 are in the same frame as p1 is supplied
+c Expression evaluate is
+c ds2 ds3 d^4 p2 d^4 p3 (2 pi)^4 delta(p1-p2-p3)/(2 pi)^6
+c delta(p2^2-s2) delta(p3^2-s3)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'zerowidth.f'
+ double precision p1(4),p2(4),p3(4),p3cm(4),aa,xjac,wwt0
+ double precision x1,x2,x3,x4,costh,sinth,phi,cphi,sphi
+ double precision wt,wt0,w2,w3
+ double precision s2max,s2min,s3max,s3min
+ double precision m1,m2,s1,s2,s3,lambda,mass2,width2,mass3,width3
+ integer j,n2,n3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ common/lambda/lambda,s1,s2,s3
+ parameter(wt0=one/8d0/pi)
+
+
+
+ wt=0d0
+ s1=p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+ if (s1 .lt. 0d0) return 1
+ m1=dsqrt(s1)
+ if (
+ . zerowidth
+ . .and. (m1 .lt. mass2*dfloat(n2)+mass3*dfloat(n3))
+ . ) return 1
+c s2min=bbsqmin
+c s2max=min(s1,bbsqmax)
+ s2min=0d0
+ s2max=s1
+ if (s2min .gt. s2max) return 1
+ if (n2 .eq. 0) then
+ w2=s2max-s2min
+ s2=s2max*x1+s2min*(1d0-x1)
+ elseif (n2 .eq. 1) then
+ call breitw(x1,s2min,s2max,mass2,width2,s2,w2)
+ endif
+
+ m2=dsqrt(s2)
+ s3min=1d-15
+ s3max=(m2-m1)**2
+ if (s3max-s3min .lt. 1d-12) return 1
+ if (n3 .eq. 0) then
+ w3=s3max-s3min
+ s3=s3max*x2+s3min*(1d0-x2)
+ elseif (n3 .eq. 1) then
+ call breitw(x2,s3min,s3max,mass3,width3,s3,w3)
+ endif
+
+ costh=two*x3-one
+
+ aa=10d0
+CC costh=datan((x3-0.5d0)*aa)/datan(aa/2)
+CC xjac=aa/atan(aa/2)/(1+aa**2*(x3-0.5d0)**2)
+ wwt0=wt0
+ wwt0=wt0*xjac/2d0
+
+
+ phi=twopi*x4
+ sinth=dsqrt(one-costh**2)
+ cphi=dcos(phi)
+ sphi=dsin(phi)
+ lambda=((s1-s2-s3)**2-4d0*s2*s3)
+
+ if (lambda .lt. 0d0) then
+c write(6,*) '(lambda .lt. 0) in phi1_2.f',lambda
+c write(6,*) 'sqrt(s1)',sqrt(s1)
+c write(6,*) 'sqrt(s2)',sqrt(s2)
+c write(6,*) 'sqrt(s3)',sqrt(s3)
+c write(6,*) s3min,s3,s3max,m1,m2,sqrt(s1),sqrt(s2)
+ return 1
+ endif
+ lambda=dsqrt(lambda)
+ wt=wwt0*w2*w3*lambda/s1
+
+
+ p3cm(4)=m1/two*(s1+s3-s2)/s1
+ p3cm(1)=m1/two*lambda/s1*sinth*sphi
+ p3cm(2)=m1/two*lambda/s1*sinth*cphi
+ p3cm(3)=m1/two*lambda/s1*costh
+ call boost(m1,p1,p3cm,p3)
+ do j=1,4
+ p2(j)=p1(j)-p3(j)
+ enddo
+ if ( (p1(4) .lt. 0d0)
+ & .or. (p2(4) .lt. 0d0)
+ & .or. (p3(4) .lt. 0d0)) then
+ if (case(1:5) .ne. 'vlchk') then
+ write(6,*) 'p1',p1(4),p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2,s1
+ write(6,*) 'p2',p2(4),p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2,s2
+ write(6,*) 'p3',p3(4),p3(4)**2-p3(1)**2-p3(2)**2-p3(3)**2,s3
+ write(6,*) n2,n3
+ endif
+ return 1
+ endif
+
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/wtgen.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/wtgen.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/wtgen.f (revision 1338)
@@ -0,0 +1,11 @@
+ subroutine wtgen(npart,q,wt)
+ include 'constants.f'
+ double precision q(mxpart,4),wt
+ integer npart
+ if (npart .eq. 5) then
+ call wt4gen(q,wt)
+ elseif (npart .eq. 3) then
+ call wt2gen(q,wt)
+ endif
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/phase6test.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase6test.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase6test.f (revision 1338)
@@ -0,0 +1,65 @@
+ subroutine phase6new(r,p1,p2,p3,p4,p5,p6,p7,p8,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'heavyflav.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'debug.f'
+ include 'process.f'
+c---- generate phase space for 2-->6 process
+c---- r(mxdim),p1(4),p2(4) are inputs reversed in sign
+c---- from physical values
+c---- phase space for -p1-p2 --> p3+p4+p5+p6+p7+p8
+c---- with all 2 pi's (ie 1/(2*pi)^8)
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),p8(4)
+ double precision p12(4),p34(4),p56(4),p3456(4),p78(4)
+ double precision wt,wt3456,wt34,wt56,wt78,wt0,wt12,tmp
+ double precision mass2,width2,mass3,width3
+ integer n2,n3,n2old,n3old
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ integer j
+ parameter(wt0=1d0/twopi**4)
+
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+
+
+ n2=0
+ mass3=hmass
+ width3=hwidth
+
+ call phi1_2(r(1),r(2),r(3),r(4),p12,p78,p3456,wt12,*99)
+
+
+ n2=1
+ mass3=wmass
+ width3=wwidth
+
+ call phi1_2(r(5),r(6),r(7),r(8),p3456,p34,p56,wt3456,*99)
+
+CC p34->p3+p4
+
+ call phi3m0(r(11),r(12),p34,p3,p4,wt34,*99)
+
+CC p56->p5+p6
+
+ call phi3m0(r(13),r(14),p56,p5,p6,wt56,*99)
+
+CC p78->p7+p8
+
+ call phi3m0(r(15),r(16),p78,p7,p8,wt78,*99)
+
+
+
+ tmp=dsqrt(p78(4)**2-p78(1)**2-p78(2)**2-p78(3)**2)
+c if(tmp.lt.10d0)write(*,*)tmp
+
+ wt=wt0*wt12*wt3456*wt34*wt56*wt78
+ if (debug) write(6,*) 'wt in phase4',wt
+ return
+
+ 99 wt=0d0
+ return 1
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/genif.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genif.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genif.f (revision 1338)
@@ -0,0 +1,99 @@
+ subroutine genif(nperms,p,wt,msq)
+c----initial-final subtraction.
+ implicit none
+ include 'constants.f'
+ include 'qcdcouple.f'
+ include 'xmin.f'
+ include 'debug.f'
+ logical justjac
+
+ integer i1,i2,i3,i4,i5,j,k,nperms
+ integer j1(4),j2(4),j3(4),j4(4),j5(4)
+ double precision p(mxpart,4),u,z,dot,q(mxpart,4),
+ . msq(-nf:nf,-nf:nf),omxmin
+ double precision facq,si1i3,si1i4,si3i4,x,omx,wt0,
+ . wt5_4,wt4,wt,jacbit
+ parameter(wt0=one/eight/pisq)
+ common/justjac/justjac
+ data j1/1,1,2,2/
+ data j2/2,2,1,1/
+ data j3/3,3,3,3/
+ data j4/4,5,4,5/
+ data j5/5,4,5,4/
+
+ i1=j1(nperms)
+ i2=j2(nperms)
+ i3=j3(nperms)
+ i4=j4(nperms)
+ i5=j5(nperms)
+
+c first of calculate the variable's which one started with
+c---nb all incoming
+ si1i3=two*dot(p,i1,i3)
+ si1i4=two*dot(p,i1,i4)
+ si3i4=two*dot(p,i3,i4)
+c----note momenta all incoming
+ x=one+si3i4/(si1i3+si1i4)
+ u=si1i3/(si1i3+si1i4)
+ z=one-u
+ omx=one-x
+ omxmin=one-xmin
+c -xx(i1)
+c---at this stage the p are momenta including radiation
+
+ do j=1,4
+ q(i1,j)=x*p(i1,j)
+ q(i2,j)=p(i2,j)
+ q(i3,j)=p(i3,j)
+ q(i4,j)=p(i4,j)+p(i3,j)+omx*p(i1,j)
+ q(i5,j)=p(i5,j)
+ q(6,j)=p(6,j)
+ q(7,j)=p(7,j)
+ enddo
+
+ jacbit=four*sqrt(omx)/(half/sqrt(z)+half/sqrt(u))
+ wt5_4=-wt0*dot(q,i1,i4)/x**2*omxmin*jacbit
+ call wt4gen(q,wt4)
+
+c---calculate total weight
+ wt=wt5_4*wt4
+
+
+
+ if (debug) then
+ write(6,*) 'x in genif',x
+ write(6,*) 'omxmin in genif',omxmin
+ write(6,*) 'i1 in genif',i1
+ write(6,*) 'i2 in genif',i2
+ write(6,*) 'i3 in genif',i3
+ write(6,*) 'i4 in genif',i4
+ write(6,*) 'i5 in genif',i5
+ write(6,*) 'wt5_4 in genif',wt5_4
+ write(6,*) 'wt4 in genif',wt4
+ write(6,*) 'wt in genif',wt
+ endif
+
+ if (justjac) return
+
+
+ call qqb_wbb(q,msq)
+
+
+c----initial wrt to final
+ facq=-gsq/(x*si1i3)*(two/(one-x+u)-one-x)
+ & -gsq/(x*si3i4)*(two/(one-x+u)-one-z)
+
+ do j=-nf,nf
+ do k=-nf,nf
+ msq(j,k)=0d0
+ if ((j .gt. 0) .and. (k .lt. 0)) then
+ msq(j,k)=facq*msq(j,k)
+ elseif ((j .lt. 0) .and. (k .gt. 0)) then
+ msq(j,k)=facq*msq(j,k)
+ endif
+
+ enddo
+ enddo
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/phi1_2h.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi1_2h.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi1_2h.f (revision 1338)
@@ -0,0 +1,88 @@
+ subroutine phi1_2h(x1,x2,x3,x4,p1,p2,p3,wt,*)
+c massive particle p1 decaying into p2 mass m2 and p3 mass m3.
+c with invariant mass
+c of particle two s2 and particle three s3 integrated over.
+c NEW: s2 generated with Breit Wigner around MH
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'zerowidth.f'
+ double precision p1(4),p2(4),p3(4),p3cm(4)
+ double precision x1,x2,x3,x4,costh,sinth,phi,cphi,sphi
+ double precision wt,wt0,w2,w3
+ double precision s2max,s2min,s3max,s3min
+ double precision m1,m2,s1,s2,s3,lambda,mass2,width2,mass3,width3
+ integer j,n2,n3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ common/lambda/lambda,s1,s2,s3
+ parameter(wt0=one/8d0/pi)
+
+ wt=0d0
+ s1=p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+ if (s1 .lt. 0d0) return 1
+ m1=dsqrt(s1)
+ if (
+ . zerowidth
+ . .and. (m1 .lt. mass2*dfloat(n2)+mass3*dfloat(n3))
+ . ) return 1
+ s2min=0d0
+ s2max=s1
+ if (s2min .gt. s2max) return 1
+CC
+CC Generate s2 according to BW around Higgs mass
+CC
+ call breitw(x1,s2min,s2max,hmass,hwidth,s2,w2)
+ m2=dsqrt(s2)
+ s3min=1d-15
+ s3max=(m2-m1)**2
+ if (s3max-s3min .lt. 1d-12) return 1
+
+ w3=s3max-s3min
+ s3=s3max*x2+s3min*(1d0-x2)
+
+
+ costh=two*x3-one
+ phi=twopi*x4
+ sinth=dsqrt(one-costh**2)
+ cphi=dcos(phi)
+ sphi=dsin(phi)
+ lambda=((s1-s2-s3)**2-4d0*s2*s3)
+
+ if (lambda .lt. 0d0) then
+c write(6,*) '(lambda .lt. 0) in phi1_2.f',lambda
+c write(6,*) 'sqrt(s1)',sqrt(s1)
+c write(6,*) 'sqrt(s2)',sqrt(s2)
+c write(6,*) 'sqrt(s3)',sqrt(s3)
+c write(6,*) s3min,s3,s3max,m1,m2,sqrt(s1),sqrt(s2)
+ return 1
+ endif
+
+ lambda=dsqrt(lambda)
+ wt=wt0*w2*w3*lambda/s1
+
+ p3cm(4)=m1/two*(s1+s3-s2)/s1
+ p3cm(1)=m1/two*lambda/s1*sinth*sphi
+ p3cm(2)=m1/two*lambda/s1*sinth*cphi
+ p3cm(3)=m1/two*lambda/s1*costh
+ call boost(m1,p1,p3cm,p3)
+ do j=1,4
+ p2(j)=p1(j)-p3(j)
+ enddo
+ if ( (p1(4) .lt. 0d0)
+ & .or. (p2(4) .lt. 0d0)
+ & .or. (p3(4) .lt. 0d0)) then
+ if (case(1:5) .ne. 'vlchk') then
+ write(6,*) 'p1',p1(4),p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2,s1
+ write(6,*) 'p2',p2(4),p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2,s2
+ write(6,*) 'p3',p3(4),p3(4)**2-p3(1)**2-p3(2)**2-p3(3)**2,s3
+ write(6,*) n2,n3
+ endif
+ return 1
+ endif
+
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/phi1_2prova.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi1_2prova.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi1_2prova.f (revision 1338)
@@ -0,0 +1,146 @@
+ subroutine phi1_2(x1,x2,x3,x4,p1,p2,p3,wt,*)
+c massive particle p1 decaying into p2 mass m2 and p3 mass m3.
+c with invariant mass
+c of particle two s2 and particle three s3 integrated over.
+c vectors returned p2 and p3 are in the same frame as p1 is supplied
+c Expression evaluate is
+c ds2 ds3 d^4 p2 d^4 p3 (2 pi)^4 delta(p1-p2-p3)/(2 pi)^6
+c delta(p2^2-s2) delta(p3^2-s3)
+ implicit none
+ include 'constants.f'
+ include 'heavyflav.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'zerowidth.f'
+ include 'verbose.f'
+ double precision p1(4),p2(4),p3(4),p3cm(4)
+ double precision x1,x2,x3,x4,costh,sinth,phi,cphi,sphi
+ double precision wt,wt0,w2,w3
+ double precision s2max,s2min,s3max,s3min
+ double precision m1,m2,s1,s2,s3,lambda,mass2,width2,mass3,width3
+ integer j,n2,n3
+ logical first,oldzerowidth
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ common/lambda/lambda,s1,s2,s3
+ parameter(wt0=one/8d0/pi)
+ data first/.true./
+ save first
+ if (verbose) then
+ if(first) then
+c if (n2 .eq. 1) write(6,*) 'generating phase space with bw,n2=',n2
+c if (n3 .eq. 1) write(6,*) 'generating phase space with bw,n3=',n3
+ first=.false.
+ endif
+ endif
+
+ wt=0d0
+ s1=p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+ if (s1 .lt. 0d0) return 1
+ m1=dsqrt(s1)
+
+c--- if both particles are produced on-shell, reject if m1 too small
+ if (
+ . zerowidth
+ . .and. (m1 .lt. mass2*dfloat(n2)+mass3*dfloat(n3))
+ . ) return 1
+
+c--- top is on-shell for W+t processes, so reject if m1 too small
+ if ( ((case .eq. 'W_twdk') .or. (case .eq. 'Wtdkay')
+ . .or.(case .eq. 'Wtbwdk'))
+ . .and. (m1 .lt. mass2) ) return 1
+c s2min=bbsqmin
+c s2max=min(s1,bbsqmax)
+ s2min=1d-15
+ s2max=s1
+ if (((case .eq. 'Wbbmas') .and. (flav .eq. 5))
+ ..or. (case .eq. 'Zbbmas')
+ ..or.(case .eq. 'Zccmas') .or. (case .eq. 'vlchkm')
+ ..or.(case .eq. 'Wbbjet') .or. (case .eq. 'Wbbjem')) then
+ s2min=4d0*mb**2
+ elseif ((case .eq. 'Wbbmas') .and. (flav .eq. 4)) then
+ s2min=4d0*mc**2
+ elseif (case .eq. 'W_cjet') then
+ s2min=mc**2
+ elseif (case .eq. 'W_tndk') then
+ s2min=mt**2
+ elseif (case .eq. 'Wtbndk') then
+ s2min=(mt+mb)**2
+ elseif ((case .eq. 'W_twdk') .or. (case .eq. 'Wtdkay')
+ . .or. (case .eq. 'Wtbwdk')) then
+ oldzerowidth=zerowidth
+ zerowidth=.true.
+ endif
+ if (s2min .gt. s2max) return 1
+ if (n2 .eq. 0) then
+ w2=s2max-s2min
+ s2=s2max*x1+s2min*(1d0-x1)
+ elseif (n2 .eq. 1) then
+ call breitw(x1,s2min,s2max,mass2,width2,s2,w2)
+ endif
+
+ if ((case .eq. 'W_twdk') .or. (case .eq. 'Wtdkay')
+ ..or.(case .eq. 'Wtbwdk')) then
+ zerowidth=oldzerowidth
+ endif
+
+ m2=dsqrt(s2)
+ s3min=1d-15
+ s3max=(m2-m1)**2
+c if (s3max-s3min .lt. 1d-9) return 1
+ if (n3 .eq. 0) then
+ w3=s3max-s3min
+ s3=s3max*x2+s3min*(1d0-x2)
+ elseif (n3 .eq. 1) then
+ call breitw(x2,s3min,s3max,mass3,width3,s3,w3)
+ endif
+
+ costh=two*x3-one
+ phi=twopi*x4
+ sinth=dsqrt(one-costh**2)
+ cphi=dcos(phi)
+ sphi=dsin(phi)
+ lambda=((s1-s2-s3)**2-4d0*s2*s3)
+
+ if (lambda .lt. 0d0) then
+c write(6,*) '(lambda .lt. 0) in phi1_2.f',lambda
+c write(6,*) 'sqrt(s1)',sqrt(s1)
+c write(6,*) 'sqrt(s2)',sqrt(s2)
+c write(6,*) 'sqrt(s3)',sqrt(s3)
+c write(6,*) s3min,s3,s3max,m1,m2,sqrt(s1),sqrt(s2)
+ return 1
+ endif
+ lambda=dsqrt(lambda)
+ wt=wt0*w2*w3*lambda/s1
+
+
+ p3cm(4)=m1/two*(s1+s3-s2)/s1
+ p3cm(1)=m1/two*lambda/s1*sinth*sphi
+ p3cm(2)=m1/two*lambda/s1*sinth*cphi
+ p3cm(3)=m1/two*lambda/s1*costh
+ call boost(m1,p1,p3cm,p3)
+ do j=1,4
+ p2(j)=p1(j)-p3(j)
+ enddo
+ if ( (p1(4) .lt. 0d0)
+ & .or. (p2(4) .lt. 0d0)
+ & .or. (p3(4) .lt. 0d0)) then
+ if (case(1:5) .ne. 'vlchk') then
+ write(6,*) ' m1=',m1
+ write(6,*) 's2min=',s2min
+ write(6,*) 's2max=',s2max
+ write(6,*) 's3min=',s3min
+ write(6,*) 's3max=',s3max
+ write(6,*) 'p1',p1(4),p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2,s1
+ write(6,*) 'p2',p2(4),p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2,s2
+ write(6,*) 'p3',p3(4),p3(4)**2-p3(1)**2-p3(2)**2-p3(3)**2,s3
+ write(6,*) 'n2,n3',n2,n3
+ write(6,*) 'in phi1_2.f'
+ endif
+ return 1
+ endif
+
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/breitw.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/breitw.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/breitw.f (revision 1338)
@@ -0,0 +1,30 @@
+ subroutine breitw(x1,mminsq,mmaxsq,rmass,rwidth,msq,wt)
+ implicit none
+ include 'constants.f'
+c---- Given a number 0<x<1 generate a mass-squared msq and a weight wt
+c---- such that mminsq<msq<mmaxsq
+c---- points are generated around resonance position rmass, but
+c---- breit-wigner should still be included in the matrix element
+c wt is the jacobian between integration in msq and integration in x1
+ double precision x1,mminsq,mmaxsq,rmass,rwidth,msq,wt
+ double precision almin,almax,al,tanal
+ include 'zerowidth.f'
+
+
+ if (zerowidth) then
+ tanal=0d0
+ almax=+pi/two
+ almin=-pi/two
+ else
+ almin=datan((mminsq-rmass**2)/rmass/rwidth)
+ almax=datan((mmaxsq-rmass**2)/rmass/rwidth)
+ al=(almax-almin)*x1+almin
+ tanal=dtan(al)
+ endif
+
+ msq=rmass**2+rmass*rwidth*tanal
+c---- bw=(1d0+tanal**2)*rmass**2*rwidth**2
+ wt=(almax-almin)*rmass*rwidth*(1d0+tanal**2)
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phi1_2new.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi1_2new.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi1_2new.f (revision 1338)
@@ -0,0 +1,107 @@
+ subroutine phi1_2(x1,x2,x3,x4,p1,p2,p3,wt,*)
+c massive particle p1 decaying into p2 mass m2 and p3 mass m3.
+c with invariant mass
+c of particle two s2 and particle three s3 integrated over.
+c vectors returned p2 and p3 are in the same frame as p1 is supplied
+c Expression evaluate is
+c ds2 ds3 d^4 p2 d^4 p3 (2 pi)^4 delta(p1-p2-p3)/(2 pi)^6
+c delta(p2^2-s2) delta(p3^2-s3)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'zerowidth.f'
+ double precision p1(4),p2(4),p3(4),p3cm(4)
+ double precision x1,x2,x3,x4,costh,sinth,phi,cphi,sphi
+ double precision wt,wt0,w2,w3,wwt0,aa,xjac
+ double precision s2max,s2min,s3max,s3min
+ double precision m1,m2,s1,s2,s3,lambda,mass2,width2,mass3,width3
+ integer j,n2,n3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ common/lambda/lambda,s1,s2,s3
+ parameter(wt0=one/8d0/pi)
+
+
+ wt=0d0
+ s1=p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+ if (s1 .lt. 0d0) return 1
+ m1=dsqrt(s1)
+ if (
+ . zerowidth
+ . .and. (m1 .lt. mass2*dfloat(n2)+mass3*dfloat(n3))
+ . ) return 1
+c s2min=bbsqmin
+c s2max=min(s1,bbsqmax)
+ s2min=0d0
+ s2max=s1
+ if (s2min .gt. s2max) return 1
+ if (n2 .eq. 0) then
+ w2=s2max-s2min
+ s2=s2max*x1+s2min*(1d0-x1)
+ elseif (n2 .eq. 1) then
+ call breitw(x1,s2min,s2max,mass2,width2,s2,w2)
+ endif
+
+ m2=dsqrt(s2)
+ s3min=1d-15
+ s3max=(m2-m1)**2
+ if (s3max-s3min .lt. 1d-12) return 1
+ if (n3 .eq. 0) then
+ w3=s3max-s3min
+ s3=s3max*x2+s3min*(1d0-x2)
+ elseif (n3 .eq. 1) then
+ call breitw(x2,s3min,s3max,mass3,width3,s3,w3)
+ endif
+
+
+CC costh=two*x3-one
+ aa=10d0
+ costh=datan((x3-0.5d0)*aa)/datan(aa/2d0)
+ xjac=aa/datan(aa/2)/(1+aa**2*(x3-0.5d0)**2)
+ wwt0=wt0*xjac/2d0
+CC
+
+
+ phi=twopi*x4
+ sinth=dsqrt(one-costh**2)
+ cphi=dcos(phi)
+ sphi=dsin(phi)
+ lambda=((s1-s2-s3)**2-4d0*s2*s3)
+
+ if (lambda .lt. 0d0) then
+c write(6,*) '(lambda .lt. 0) in phi1_2.f',lambda
+c write(6,*) 'sqrt(s1)',sqrt(s1)
+c write(6,*) 'sqrt(s2)',sqrt(s2)
+c write(6,*) 'sqrt(s3)',sqrt(s3)
+c write(6,*) s3min,s3,s3max,m1,m2,sqrt(s1),sqrt(s2)
+ return 1
+ endif
+ lambda=dsqrt(lambda)
+ wt=wwt0*w2*w3*lambda/s1
+
+
+ p3cm(4)=m1/two*(s1+s3-s2)/s1
+ p3cm(1)=m1/two*lambda/s1*sinth*sphi
+ p3cm(2)=m1/two*lambda/s1*sinth*cphi
+ p3cm(3)=m1/two*lambda/s1*costh
+ call boost(m1,p1,p3cm,p3)
+ do j=1,4
+ p2(j)=p1(j)-p3(j)
+ enddo
+ if ( (p1(4) .lt. 0d0)
+ & .or. (p2(4) .lt. 0d0)
+ & .or. (p3(4) .lt. 0d0)) then
+ if (case(1:5) .ne. 'vlchk') then
+ write(6,*) 'p1',p1(4),p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2,s1
+ write(6,*) 'p2',p2(4),p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2,s2
+ write(6,*) 'p3',p3(4),p3(4)**2-p3(1)**2-p3(2)**2-p3(3)**2,s3
+ write(6,*) n2,n3
+ endif
+ return 1
+ endif
+
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen3b.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen3b.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen3b.f (revision 1338)
@@ -0,0 +1,60 @@
+ subroutine gen3b(r,p,wt3,*)
+c----generate 3 dimensional phase space weight and vectors p(7,4)
+c---- p1+p2+p3+p4+p5=0
+c----and x1 and x2 given seven random numbers
+c----p(6,i) and p(7,i) are set equal to zero
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim),sqrts,wt3
+ double precision p(mxpart,4),
+ . p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision pswt,xjac,xx(2),tau,y
+ common/energy/sqrts
+ common/x1x2/xx
+ data p6/0d0,0d0,0d0,0d0/
+ data p7/0d0,0d0,0d0,0d0/
+
+ wt3=0d0
+ tau=exp(log(taumin)*r(6))
+ y=0.5d0*log(tau)*(1d0-2d0*r(7))
+ xjac=log(taumin)*tau*log(tau)
+
+ xx(1)=sqrt(tau)*exp(+y)
+ xx(2)=sqrt(tau)*exp(-y)
+
+c---if x's out of normal range alternative return
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+
+ call phase3(r,p1,p2,p3,p4,p5,p6,p7,pswt)
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ p(6,nu)=p6(nu)
+ p(7,nu)=p7(nu)
+ enddo
+
+ wt3=xjac*pswt
+ if(wt3 .eq. 0d0) return 1
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/phase6h.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase6h.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase6h.f (revision 1338)
@@ -0,0 +1,54 @@
+CC NEW: generate p12->(p3+p4+p5+p6)+p7+p8
+CC where p3,p4,p5,p6 come from the decay of the Higgs boson
+
+ subroutine phase6h(r,p1,p2,p3,p4,p5,p6,p7,p8,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'zerowidth.f'
+ include 'process.f'
+
+ logical oldzerowidth
+ integer n2,n3
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p5(4),p6(4),p3(4),p4(4),p7(4),p8(4)
+ double precision p12(4),p3456(4),p34(4),p56(4),p78(4),smin
+ double precision wt,wt0,wt12,wt3456,wt78,wt34,wt56
+
+
+ integer j
+ parameter(wt0=1d0/twopi**4)
+ wt=0d0
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+
+CC p12->p3456+p78
+
+ call phi1_2h(r(1),r(2),r(3),r(4),p12,p3456,p78,wt12,*99)
+
+
+CC p3456->p34+p56
+
+ call phi1_2(r(5),r(6),r(7),r(8),p3456,p34,p56,wt3456,*99)
+
+CC p34->p3+p4
+
+ call phi3m0(r(11),r(12),p34,p3,p4,wt34,*99)
+
+CC p56->p5+p6
+
+ call phi3m0(r(13),r(14),p56,p5,p6,wt56,*99)
+
+CC p78->p7+p8
+
+ call phi3m0(r(15),r(16),p78,p7,p8,wt78,*99)
+
+ wt=wt0*wt12*wt3456*wt34*wt56*wt78
+
+ return
+ 99 wt=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen5a.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen5a.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen5a.f (revision 1338)
@@ -0,0 +1,21 @@
+ subroutine gen5a(r,p5,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'debug.f'
+ double precision p5(mxpart,4),p4(mxpart,4),r(mxdim),wt,wt4
+c----although wt4 is generated we will not use it
+ call gen4(r,p4,wt4,*999)
+c write(6,*) 's45',2d0
+c .*(p4(4,4)*p4(5,4)-p4(4,1)*p4(5,1)-p4(4,2)*p4(5,2)-p4(4,3)*p4(5,3))
+ if (debug) write(6,*) 'wt4 in gen5a',wt4
+
+c----this generates the full weight from both branchings
+ call gen5from4(p4,r(11),r(12),r(13),p5,wt,*999)
+c write(6,*) 's45',2d0
+c .*(p5(4,4)*p5(5,4)-p5(4,1)*p5(5,1)-p5(4,2)*p5(5,2)-p5(4,3)*p5(5,3))
+c pause
+ return
+ 999 wt=0d0
+ return 1
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/phase6new.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase6new.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase6new.f (revision 1338)
@@ -0,0 +1,82 @@
+ subroutine phase6new(r,p1,p2,p3,p4,p5,p6,p7,p8,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'zerowidth.f'
+ include 'process.f'
+c******* generate phase space for 2-->4 process
+c******* r(mxdim),p1(4),p2(4) are inputs reversed in sign from physical values
+c---- phase space for -p1-p2 --> p5+p6+p3+p4+p7+p8
+c---- with all 2 pi's (ie 1/(2*pi)^14)
+ logical oldzerowidth
+ integer n2,n3
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p5(4),p6(4),p3(4),p4(4),p7(4),p8(4)
+ double precision p12(4),p3456(4),p56(4),p78(4),p34(4),smin
+ double precision wt,wt0,wt12,wt78,wt3456,wt34,wt56
+ double precision mass2,width2,mass3,width3
+ double precision mass2old,width2old,mass3old,width3old,tmp
+
+ common/breit/n2,n3,mass2,width2,mass3,width3
+
+ integer j,n2old,n3old
+
+ parameter(wt0=1d0/twopi**4)
+
+ wt=0d0
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+
+ n2old=n2
+ n3old=n3
+ mass2old=mass2
+ mass3old=mass3
+ width2old=width2
+ width3old=width3
+
+ smin=0d0
+
+
+ n2=0
+ n3=1
+
+ mass3=hmass
+ width3=hwidth
+
+CC p12->p3456+p78
+
+ call phi1_2(r(1),r(2),r(3),r(4),p12,p78,p3456,wt12,*99)
+
+ n2=n2old
+ n3=n3old
+ mass2=mass2old
+ mass3=mass3old
+ width2=width2old
+ width3=width3old
+
+CC p3456->p34+p56
+
+ call phi1_2(r(5),r(6),r(7),r(8),p3456,p34,p56,wt3456,*99)
+
+CC p34->p3+p4
+
+ call phi3m0(r(11),r(12),p34,p3,p4,wt34,*99)
+
+CC p56->p5+p6
+
+ call phi3m0(r(13),r(14),p56,p5,p6,wt56,*99)
+
+CC p78->p7+p8
+
+ call phi3m0(r(15),r(16),p78,p7,p8,wt78,*99)
+
+
+ wt=wt0*wt12*wt3456*wt34*wt56*wt78
+
+ return
+ 99 wt=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen6_rap.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen6_rap.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen6_rap.f (revision 1338)
@@ -0,0 +1,62 @@
+ subroutine gen6_rap(r,p,wt6,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ integer nu
+
+ double precision r(mxdim)
+ double precision wt6,p(mxpart,4),tp(4),tm(4),bp(4),bm(4)
+ double precision wtepnn,wtnbem,ep(4),em(4),nn(4),nb(4),wp(4),wm(4)
+ double precision wtttb,wtwp,wtwm,s3min,wt0
+ integer n2,n3
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=1d0/twopi**4)
+ data wp,wm,ep,em,nn,nb,bp,bm/32*0d0/
+
+
+* q(-p1) +qbar(-p2)=t(nu(p3)+e^+(p4)+b(p5)) *
+* +t~(b~(p6)+e^-(p7)+nu(p8))+g(p9) *
+* *
+
+
+ wt6=0d0
+ mass2=mt
+ mass3=mt
+ call gen2m(r,p,wtttb,*999)
+ wtttb=(mt*twidth*pi)**2*wtttb
+ do nu=1,4
+ tp(nu)=p(3,nu)
+ tm(nu)=p(4,nu)
+ enddo
+ s3min=0d0
+ n3=1
+ mass3=wmass
+ width3=wwidth
+
+ call phi1_2m(mb,r(5),r(6),r(7),s3min,tp,bm,wp,wtwp,*999)
+ call phi1_2m(mb,r(8),r(9),r(10),s3min,tm,bp,wm,wtwm,*999)
+ call phi3m0(r(11),r(12),wp,nn,ep,wtepnn,*999)
+ call phi3m0(r(13),r(14),wm,em,nb,wtnbem,*999)
+ wt6=wt0*wtepnn*wtnbem*wtwp*wtwm*wtttb
+* q(-p1) +qbar(-p2)=t(nu(p3)+e^+(p4)+b(p5)) *
+* +t~(b~(p6)+e^-(p7)+nu(p8)) *
+* *
+ do nu=1,4
+ p(3,nu)=nn(nu)
+ p(4,nu)=ep(nu)
+ p(5,nu)=bm(nu)
+
+ p(6,nu)=bp(nu)
+ p(7,nu)=em(nu)
+ p(8,nu)=nb(nu)
+
+ enddo
+
+ return
+ 999 wt6=0d0
+ return 1
+
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase4m.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase4m.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase4m.f (revision 1338)
@@ -0,0 +1,43 @@
+ subroutine phase4m(r,p1,p2,p3,p4,p5,p6,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'debug.f'
+c---- generate phase space for 2-->4 process
+c---- r(mxdim),p1(4),p2(4) are inputs reversed in sign
+c---- from physical values
+c---- phase space for -p1-p2 --> p3+p4+p5+p6
+c---- with all 2 pi's (ie 1/(2*pi)^8)
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4)
+ double precision p12(4),p56(4),p456(4),s3min
+ double precision wt,wt3456,wt456,wt56,wt0
+ integer j,iflag
+ parameter(wt0=1d0/twopi**2)
+ data iflag/0/
+ save iflag
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+ s3min=mt
+ if (iflag .eq. 1) then
+ iflag=0
+ call phi1_2m(mt,r(1),r(2),r(3),s3min,p12,p3,p456,wt3456,*99)
+ call phi1_2m(mt,r(4),r(5),r(6),s3min,p456,p4,p56,wt456,*99)
+ else
+ iflag=1
+ call phi1_2m(mt,r(1),r(2),r(3),s3min,p12,p4,p456,wt3456,*99)
+ call phi1_2m(mt,r(4),r(5),r(6),s3min,p456,p3,p56,wt456,*99)
+ endif
+
+c p56 is the b-bbar system
+C--decay 56 into massless b quarks
+ call phi3m0(r(7),r(8),p56,p5,p6,wt56,*99)
+ wt=wt0*wt3456*wt456*wt56
+ if (debug) write(6,*) 'wt in phase4',wt
+ return
+ 99 wt=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gencol.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gencol.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gencol.f (revision 1338)
@@ -0,0 +1,21 @@
+ subroutine gencol(x,xjac,xmin,emit,r)
+ implicit none
+c---Generate an x value and store it for later retrieval
+ integer emit,lemit
+ double precision x,xjac,xmin,xl,xljac,xlmin,r
+ save xl,xljac,xlmin,lemit
+ x=1d0-(1d0-xmin)*abs(1d0-2d0*r)
+ xjac=2d0*(1d0-xmin)
+ xl=x
+ xljac=xjac
+ xlmin=xmin
+ lemit=emit
+ return
+
+ entry getcol(x,xjac,xmin,emit)
+c---return the same values as last time
+ x=xl
+ xjac=xljac
+ xmin=xlmin
+ emit=lemit
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/genrii.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genrii.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genrii.f (revision 1338)
@@ -0,0 +1,92 @@
+ subroutine genrii(p,i1,i2,i7,r1,r2,phit,wt5_4,*)
+c----i1,i2 initial state vectors.
+c----i7 label of generated vector
+ implicit none
+ include 'constants.f'
+ include 'debug.f'
+ include 'impsample.f'
+ integer i1,i2,i7,j,k
+ double precision p(mxpart,4),rtalbe,c(4),d(4),phi,phit,jacbit
+ double precision qtDp(mxpart),qsDp(mxpart),dot,xx(2),r1,r2
+ double precision q(4),qs(4),qt(4),beta,alpha,qsDqs,qtDqt
+ double precision a,oma,x,omx,omxmin,wt0,wt5_4
+ parameter(wt0=1d0/8d0/pisq)
+ common/x1x2/xx
+
+ phi=twopi*phit
+c omxmin=one-xmin
+ omxmin=one-xx(i1)
+ r1=0.5d0
+c write(6,*) 'Enter r1'
+c read(5,*) r1
+ write(6,*) 'Enter r2'
+ read(5,*) r2
+ if (impsample) then
+ omx=omxmin*r1**2
+ x=one-omx
+ if (r2 .lt. 0.5d0) oma=(two*r2)**2
+ if (r2 .ge. 0.5d0) oma=one-(two*r2-one)**2
+ a=one-oma
+ jacbit=four*sqrt(omx*omxmin)/(half/sqrt(oma)+half/sqrt(a))
+ else
+ omx=omxmin*r1
+ x=one-omx
+ oma=r2
+ a=one-oma
+ jacbit=omxmin
+ endif
+
+ alpha=omx*a
+ beta=omx-alpha
+ rtalbe=sqrt(beta*alpha)
+
+ wt5_4=wt0*dot(p,i1,i2)/x**2*omx*jacbit
+
+c write(6,*) 'wt5_4 in genrii',wt5_4
+
+ if (debug) write(6,*) 'jacbit in genrii',jacbit
+ if (debug) write(6,*) 'wt0 in genrii',wt0
+ if (debug) write(6,*) 'omxmin in genrii',omxmin
+ if (debug) write(6,*) 'omx in genrii',omx
+ if (debug) write(6,*) 'x in genrii',x
+ if (debug) write(6,*) 'i1 in genrii',i1
+ if (debug) write(6,*) 'i2 in genrii',i2
+ if (debug) write(6,*) 'omxmin in genrii',omxmin
+ if (debug) write(6,*) 'wt5_4 in genrii',wt5_4
+ if (debug) write(6,*)
+
+c---rescale p(i1)
+ do j=1,4
+ p(i1,j)=p(i1,j)/x
+ enddo
+
+c---Sudakov wrt new vectors
+c---generate transverse vectors c and d with length^2=rtalbe^2*2*p1Dp2
+c-- with direction in transverse plane picked by 3
+ call gtperp(rtalbe,p,i1,i2,3,c,d)
+
+c---generate p7 and auxiliary vectors
+ do j=1,4
+ p(i7,j)=alpha*p(i1,j)+beta*p(i2,j)+cos(phi)*c(j)+sin(phi)*d(j)
+ q(j) =p(i1,j)+p(i2,j)-p(i7,j)
+ qt(j)=x*p(i1,j)+p(i2,j)
+ qs(j)=q(j)+qt(j)
+ enddo
+
+ qtDqt=qt(4)**2-qt(1)**2-qt(2)**2-qt(3)**2
+ qsDqs=qs(4)**2-qs(1)**2-qs(2)**2-qs(3)**2
+
+C--generate the remaining vectors 3 through i7-1
+ do k=3,i7-1
+ qtDp(k)=qt(4)*p(k,4)-qt(1)*p(k,1)-qt(2)*p(k,2)-qt(3)*p(k,3)
+ qsDp(k)=qs(4)*p(k,4)-qs(1)*p(k,1)-qs(2)*p(k,2)-qs(3)*p(k,3)
+ do j=1,4
+ p(k,j)=p(k,j)+two*(qtDp(k)*q(j)/qtDqt-qsDp(k)*qs(j)/qsDqs)
+ enddo
+ enddo
+c----this completes the generation of the new momenta;
+c----we can now return
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase2.f (revision 1338)
@@ -0,0 +1,58 @@
+ subroutine phase2(r,p1,p2,p3,p4,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+c---- generate phase space for 2-->2 process
+c---- r(mxdim),p1(4),p2(4) are inputs reversed in sign
+c---- from physical values
+c---- phase space for -p1-p2 --> p3+p4
+c---- with all 2 pi's (ie 1/(2*pi)^2)
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4)
+ double precision xx(2),cosphi,sinphi,u,phi,rtshat,costh,sinth
+ double precision wt,wt0,sqrts
+ common/x1x2/xx
+ common/energy/sqrts
+ parameter(wt0=1d0/8d0/pi)
+ rtshat=dsqrt(xx(1)*xx(2))*sqrts
+C write out vectors in +,-,T,T notation
+ u=r(3)
+ costh=2d0*u-1d0
+ sinth=dsqrt(1d0-costh**2)
+ phi=two*pi*r(4)
+ sinphi=dsin(phi)
+ cosphi=dcos(phi)
+
+ p3(4)=+half*sqrts*(u*xx(1)+(1d0-u)*xx(2))
+ p3(1)=+half*sinth*sinphi*rtshat
+ p3(2)=+half*sinth*cosphi*rtshat
+ p3(3)=+half*sqrts*(u*xx(1)-(1d0-u)*xx(2))
+
+
+ p4(4)=+half*sqrts*((1d0-u)*xx(1)+u*xx(2))
+ p4(1)=-half*sinth*sinphi*rtshat
+ p4(2)=-half*sinth*cosphi*rtshat
+ p4(3)=+half*sqrts*((1d0-u)*xx(1)-u*xx(2))
+
+c---debug
+ write(6,*) 'p3',p3(4),p3(3),p3(2),p3(1)
+ write(6,*) 'p4',p4(4),p4(3),p4(2),p4(1)
+
+ p3(4)=+u*p1(4)+(one-u)*p2(4)
+ p3(1)=+half*sinth*sinphi*rtshat
+ p3(2)=+half*sinth*cosphi*rtshat
+ p3(4)=+u*p1(3)+(one-u)*p2(3)
+
+
+ p4(4)=+(one-u)*p1(4)+u*p2(4)
+ p4(1)=-half*sinth*sinphi*rtshat
+ p4(2)=-half*sinth*cosphi*rtshat
+ p4(3)=+(one-u)*p1(3)+u*p2(3)
+
+ write(6,*) 'p3',p3(4),p3(3),p3(2),p3(1)
+ write(6,*) 'p4',p4(4),p4(3),p4(2),p4(1)
+ pause
+ wt=wt0
+
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phi1_2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi1_2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi1_2.f (revision 1338)
@@ -0,0 +1,100 @@
+ subroutine phi1_2(x1,x2,x3,x4,p1,p2,p3,wt,*)
+c massive particle p1 decaying into p2 mass m2 and p3 mass m3.
+c with invariant mass
+c of particle two s2 and particle three s3 integrated over.
+c vectors returned p2 and p3 are in the same frame as p1 is supplied
+c Expression evaluate is
+c ds2 ds3 d^4 p2 d^4 p3 (2 pi)^4 delta(p1-p2-p3)/(2 pi)^6
+c delta(p2^2-s2) delta(p3^2-s3)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'process.f'
+ include 'zerowidth.f'
+ double precision p1(4),p2(4),p3(4),p3cm(4)
+ double precision x1,x2,x3,x4,costh,sinth,phi,cphi,sphi
+ double precision wt,wt0,w2,w3
+ double precision s2max,s2min,s3max,s3min
+ double precision m1,m2,s1,s2,s3,lambda,mass2,width2,mass3,width3
+ integer j,n2,n3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ common/lambda/lambda,s1,s2,s3
+ parameter(wt0=one/8d0/pi)
+
+
+ wt=0d0
+ s1=p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+ if (s1 .lt. 0d0) return 1
+ m1=dsqrt(s1)
+ if (
+ . zerowidth
+ . .and. (m1 .lt. mass2*dfloat(n2)+mass3*dfloat(n3))
+ . ) return 1
+c s2min=bbsqmin
+c s2max=min(s1,bbsqmax)
+ s2min=0d0
+ s2max=s1
+ if (s2min .gt. s2max) return 1
+ if (n2 .eq. 0) then
+ w2=s2max-s2min
+ s2=s2max*x1+s2min*(1d0-x1)
+ elseif (n2 .eq. 1) then
+ call breitw(x1,s2min,s2max,mass2,width2,s2,w2)
+ endif
+
+ m2=dsqrt(s2)
+ s3min=1d-15
+ s3max=(m2-m1)**2
+ if (s3max-s3min .lt. 1d-12) return 1
+ if (n3 .eq. 0) then
+ w3=s3max-s3min
+ s3=s3max*x2+s3min*(1d0-x2)
+ elseif (n3 .eq. 1) then
+ call breitw(x2,s3min,s3max,mass3,width3,s3,w3)
+ endif
+
+
+ costh=two*x3-one
+ phi=twopi*x4
+ sinth=dsqrt(one-costh**2)
+ cphi=dcos(phi)
+ sphi=dsin(phi)
+ lambda=((s1-s2-s3)**2-4d0*s2*s3)
+
+ if (lambda .lt. 0d0) then
+c write(6,*) '(lambda .lt. 0) in phi1_2.f',lambda
+c write(6,*) 'sqrt(s1)',sqrt(s1)
+c write(6,*) 'sqrt(s2)',sqrt(s2)
+c write(6,*) 'sqrt(s3)',sqrt(s3)
+c write(6,*) s3min,s3,s3max,m1,m2,sqrt(s1),sqrt(s2)
+ return 1
+ endif
+ lambda=dsqrt(lambda)
+ wt=wt0*w2*w3*lambda/s1
+
+
+ p3cm(4)=m1/two*(s1+s3-s2)/s1
+ p3cm(1)=m1/two*lambda/s1*sinth*sphi
+ p3cm(2)=m1/two*lambda/s1*sinth*cphi
+ p3cm(3)=m1/two*lambda/s1*costh
+ call boost(m1,p1,p3cm,p3)
+ do j=1,4
+ p2(j)=p1(j)-p3(j)
+ enddo
+ if ( (p1(4) .lt. 0d0)
+ & .or. (p2(4) .lt. 0d0)
+ & .or. (p3(4) .lt. 0d0)) then
+ if (case(1:5) .ne. 'vlchk') then
+ write(6,*) 'p1',p1(4),p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2,s1
+ write(6,*) 'p2',p2(4),p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2,s2
+ write(6,*) 'p3',p3(4),p3(4)**2-p3(1)**2-p3(2)**2-p3(3)**2,s3
+ write(6,*) n2,n3
+ endif
+ return 1
+ endif
+
+ return
+ end
+
+
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase4.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase4.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase4.f (revision 1338)
@@ -0,0 +1,34 @@
+ subroutine phase4(r,p1,p2,p3,p4,p5,p6,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'process.f'
+c---- generate phase space for 2-->4 process
+c---- r(mxdim),p1(4),p2(4) are inputs reversed in sign
+c---- from physical values
+c---- phase space for -p1-p2 --> p3+p4+p5+p6
+c---- with all 2 pi's (ie 1/(2*pi)^8)
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4)
+ double precision p12(4),p34(4),p56(4)
+ double precision wt,wt3456,wt34,wt56,wt0
+ integer j
+ parameter(wt0=1d0/twopi**2)
+
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+c p56 is the b-bbar system
+ call phi1_2(r(1),r(2),r(3),r(4),p12,p56,p34,wt3456,*99)
+ call phi3m0(r(7),r(8),p34,p3,p4,wt34,*99)
+
+
+ call phi3m0(r(5),r(6),p56,p5,p6,wt56,*99)
+
+ wt=wt0*wt3456*wt34*wt56
+ return
+
+ 99 wt=0d0
+ return 1
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/phase6.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase6.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase6.f (revision 1338)
@@ -0,0 +1,92 @@
+ subroutine phase6(r,p1,p2,p3,p4,p5,p6,p7,p8,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'zerowidth.f'
+ include 'process.f'
+c******* generate phase space for 2-->4 process
+c******* r(mxdim),p1(4),p2(4) are inputs reversed in sign from physical values
+c---- phase space for -p1-p2 --> p5+p6+p3+p4+p7+p8
+c---- with all 2 pi's (ie 1/(2*pi)^14)
+ logical oldzerowidth
+ integer n2,n3
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p5(4),p6(4),p3(4),p4(4),p7(4),p8(4)
+ double precision p12(4),p345(4),p678(4),p78(4),p34(4),smin
+ double precision wt,wt0,wt12,wt678,wt345,wt34,wt78
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+
+ integer j
+ parameter(wt0=1d0/twopi**4)
+ wt=0d0
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+ smin=mb**2
+c---- calculate momenta of top and bbbar
+
+ n2=1
+ n3=1
+ if (
+ . (case .eq. 'tt_bbh')
+ . .or. (case .eq. 'tt_bbl')
+ . .or. (case .eq. 'ttbdkl')
+ . .or. (case .eq. 'ttbdkh')
+ . .or. (case .eq. 'Httbar')
+ . .or. (case .eq. 'vlchk6')) then
+ mass2=mt
+ width2=twidth
+ mass3=mt
+ width3=twidth
+ call phi1_2(r(1),r(2),r(3),r(4),p12,p345,p678,wt12,*99)
+ elseif (case .eq. 'tautau') then
+ mass2=mtau
+ width2=tauwidth
+ mass3=mtau
+ width3=tauwidth
+ oldzerowidth=zerowidth
+ zerowidth=.true.
+ call phi1_2(r(1),r(2),r(3),r(4),p12,p345,p678,wt12,*99)
+ zerowidth=oldzerowidth
+ else
+ write(*,*) 'Case not supported in phase6.f'
+ stop
+ endif
+
+c write(6,*) '345',(p345(4)**2-p345(3)**2-p345(2)**2-p345(1)**2)
+c write(6,*) '678',(p678(4)**2-p678(3)**2-p678(2)**2-p678(1)**2)
+c pause
+
+ mass3=wmass
+ width3=wwidth
+ if ( (case .eq. 'tt_bbh')
+ . .or. (case .eq. 'tt_bbl')
+ . .or. (case .eq. 'ttbdkl')
+ . .or. (case .eq. 'ttbdkh')
+ . .or. (case .eq. 'Httbar')
+ . .or. (case .eq. 'vlchk6')) then
+ n3=1
+ call phi1_2m(mb,r(5),r(6),r(7),smin,p345,p5,p34,wt345,*99)
+ call phi1_2m(mb,r(8),r(11),r(12),smin,p678,p6,p78,wt678,*99)
+ elseif (case .eq. 'tautau') then
+ n3=0
+ smin=0d0
+ call phi1_2m(smin,r(5),r(6),r(7),smin,p345,p5,p34,wt345,*99)
+ call phi1_2m(smin,r(8),r(11),r(12),smin,p678,p6,p78,wt678,*99)
+ endif
+
+c write(6,*) '34',(p34(4)**2-p34(3)**2-p34(2)**2-p34(1)**2)
+c write(6,*) '78',(p78(4)**2-p78(3)**2-p78(2)**2-p78(1)**2)
+
+ call phi3m0(r(13),r(14),p34,p3,p4,wt34,*99)
+ call phi3m0(r(15),r(16),p78,p7,p8,wt78,*99)
+
+ wt=wt0*wt12*wt345*wt678*wt34*wt78
+
+ return
+ 99 wt=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase8.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase8.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase8.f (revision 1338)
@@ -0,0 +1,79 @@
+ subroutine phase8(r,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+ include 'process.f'
+c******* generate phase space for 2-->4 process
+c******* r(mxdim),p1(4),p2(4) are inputs reversed in sign from physical values
+c---- phase space for -p1-p2 --> p3+p4+p5+p6+p7+p8+p9+p10
+c---- with all 2 pi's (ie 1/(2*pi)^20)
+ integer n2,n3,nu,iflip,j
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),p8(4)
+ . ,p9(4),p10(4),p12(4),pa(4),pb(4),
+ . p345(4),p678(4),p34(4),p78(4),
+ . ph(4),smin,wt,wt0,wt12,wtxh,wt345,wt678,wt34,wt78,wth,
+ . mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=1d0/twopi**6)
+ data iflip/0/
+ save iflip
+ wt=0d0
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+ smin=100d0
+ n2=0
+ n3=1
+ mass3=mt
+ width3=twidth
+ call phi1_2(r(1),r(2),r(3),r(4),p12,pa,pb,wt12,*99)
+
+ n2=1
+ n3=1
+ mass2=mt
+ width2=twidth
+
+ if (case .eq. 'qq_tth') then
+ mass3=hmass
+ width3=hwidth
+ elseif (case .eq. 'qq_ttz') then
+ mass3=zmass
+ width3=zwidth
+ endif
+
+ if (iflip .eq. 0) then
+ iflip=1
+ call phi1_2(r(5),r(6),r(7),r(8),pa,p345,ph,wtxh,*99)
+ do nu=1,4
+ p678(nu)=pb(nu)
+ enddo
+ elseif (iflip .eq. 1) then
+ iflip=0
+ call phi1_2(r(5),r(6),r(7),r(8),pa,p678,ph,wtxh,*99)
+ do nu=1,4
+ p345(nu)=pb(nu)
+ enddo
+ endif
+
+ mass3=wmass
+ width3=wwidth
+ call phi1_2m(mb,r(9),r(10),r(11),smin,p345,p5,p34,wt345,*99)
+ call phi1_2m(mb,r(12),r(13),r(14),smin,p678,p6,p78,wt678,*99)
+
+ if ((p5(4).le.0d0).or.(p6(4).le.0d0)) goto 99
+ call phi3m0(r(15),r(16),p34,p3,p4,wt34,*99)
+ if ((p3(4).le.0d0).or.(p4(4).le.0d0)) goto 99
+ call phi3m0(r(17),r(18),p78,p7,p8,wt78,*99)
+ if ((p7(4).le.0d0).or.(p8(4).le.0d0)) goto 99
+ call phi3m0(r(19),r(20),ph,p9,p10,wth,*99)
+ if ((p9(4).le.0d0).or.(p10(4).le.0d0)) goto 99
+
+ wt=wt0*wt12*wtxh*wt345*wt678*wt34*wt78*wth
+
+ return
+ 99 wt=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/genBORNtest.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/genBORNtest.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/genBORNtest.f (revision 1338)
@@ -0,0 +1,63 @@
+ subroutine genBORN(q2,shat,r,p,wt,*)
+c----generate phase space weight and vectors p(i,4) for i=1,2,3,4
+c----and x1 and x2 given seven random numbers and q2
+c----all other four momenta must be zero
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer nu
+
+ double precision r(mxdim),sqrts,wt,wt34,
+ . p(mxpart,4),p1(4),p2(4),p3(4),p4(4),q(4)
+ double precision pswt,xjac,xx(2),tau,tau0,y,q2,yq,shat
+
+ common/energy/sqrts
+ common/xx0/xx
+
+ wt=0d0
+
+ tau=shat/sqrts**2
+ tau0=q2/sqrts**2
+ y=0.5d0*dlog(tau0)*(1d0-2d0*r(7))
+ xjac=dabs(dlog(tau0))
+
+ xx(1)=dsqrt(tau0)*dexp(+y)
+ xx(2)=dsqrt(tau0)*dexp(-y)
+
+c---if x's out of normal range alternative return
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 99
+
+ p1(4)=-xx(1)*sqrts*half
+ p1(1)=zip
+ p1(2)=zip
+ p1(3)=-xx(1)*sqrts*half
+
+ p2(4)=-xx(2)*sqrts*half
+ p2(1)=zip
+ p2(2)=zip
+ p2(3)=+xx(2)*sqrts*half
+
+ do nu=1,4
+ q(nu)=-p1(nu)-p2(nu)
+ enddo
+
+
+ call phi3m0(r(4),r(5),q,p3,p4,wt34,*99)
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ enddo
+ wt=xjac*wt34
+ return
+ 99 continue
+ wt=0d0
+
+ return
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen2.f (revision 1338)
@@ -0,0 +1,83 @@
+ subroutine gen2(r,p,wt2,*)
+C---generate two particle phase space and x1,x2 integration
+C---p1+p2 --> p3+p4
+ implicit none
+ include 'constants.f'
+ include 'limits.f'
+ include 'mxdim.f'
+ include 'phasemin.f'
+ integer n2,n3,j,nu
+ double precision r(mxdim),p(mxpart,4),xx(2)
+ double precision sqrts,ymax,yave,ydif,xjac,y3,y4,phi,wt0,wt2,w3
+ double precision pt,s34,rtshat,udif
+ common/energy/sqrts
+ double precision mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=1d0/16d0/pi)
+ common/x1x2/xx
+
+ do j=1,mxpart
+ do nu=1,4
+ p(j,nu)=0d0
+ enddo
+ enddo
+
+ wt2=0d0
+ if (n3.eq.0) then
+ w3=(wsqmax-wsqmin)
+ s34=(wsqmax-wsqmin)*r(3)+wsqmin
+ elseif (n3.eq.1) then
+ call breitw(r(3),wsqmin,wsqmax,mass3,width3,s34,w3)
+ endif
+
+ rtshat=dsqrt(s34)
+ ymax=dlog(sqrts/rtshat)
+ yave=ymax*(two*r(1)-1d0)
+
+c----udif==tanh(ydif)
+ udif=(two*r(2)-1d0)
+ ydif=half*dlog((1d0+udif)/(1d0-udif))
+ xjac=four*ymax
+
+ y3=yave+ydif
+ y4=yave-ydif
+
+ xjac=xjac*w3
+ phi=2d0*pi*r(4)
+
+ pt=rtshat/(2d0*dcosh(ydif))
+ xx(1)=rtshat/sqrts*dexp(+yave)
+ xx(2)=rtshat/sqrts*dexp(-yave)
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) then
+ write(6,*) 'problems with xx(1),xx(2) in gen2',xx(1),xx(2)
+ return 1
+ endif
+
+ p(1,4)=-0.5d0*xx(1)*sqrts
+ p(1,1)=0d0
+ p(1,2)=0d0
+ p(1,3)=-0.5d0*xx(1)*sqrts
+
+ p(2,4)=-0.5d0*xx(2)*sqrts
+ p(2,1)=0d0
+ p(2,2)=0d0
+ p(2,3)=+0.5d0*xx(2)*sqrts
+
+ p(3,4)=+pt*dcosh(y3)
+ p(3,1)=+pt*dsin(phi)
+ p(3,2)=+pt*dcos(phi)
+ p(3,3)=+pt*dsinh(y3)
+
+ p(4,4)=+pt*dcosh(y4)
+ p(4,1)=-pt*dsin(phi)
+ p(4,2)=-pt*dcos(phi)
+ p(4,3)=+pt*dsinh(y4)
+
+ wt2=wt0*xjac/sqrts**2
+ return
+
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen4.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen4.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen4.f (revision 1338)
@@ -0,0 +1,68 @@
+ subroutine gen4(r,p,wt4,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'debug.f'
+ include 'process.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim)
+ double precision wt4,p1(4),p2(4),p3(4),p4(4),p5(4),p6(4)
+ double precision p(mxpart,4)
+ double precision pswt,xjac,p1ext(4),p2ext(4)
+ double precision xx(2),tau,x1mx2,surd
+ double precision lntaum
+ common/pext/p1ext,p2ext
+ common/x1x2/xx
+
+
+ wt4=0d0
+
+ lntaum=dlog(taumin)
+ tau=dexp(lntaum*(one-r(9)))
+ xjac=-lntaum*tau
+
+c tau=(one-taumin)*r(9)**2+taumin
+c xjac=2*r(9)*(one-taumin)
+
+ x1mx2=two*r(10)-one
+ surd=dsqrt(x1mx2**2+four*tau)
+
+ xx(1)=half*(+x1mx2+surd)
+ xx(2)=half*(-x1mx2+surd)
+
+ xjac=xjac*two/surd
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ do nu=1,4
+ p1(nu)=xx(1)*p1ext(nu)
+ p2(nu)=xx(2)*p2ext(nu)
+ enddo
+
+
+ call phase4(r,p1,p2,p3,p4,p5,p6,pswt,*999)
+
+
+ do nu=1,4
+ p(1,nu)=p1(nu)
+ p(2,nu)=p2(nu)
+ p(3,nu)=p3(nu)
+ p(4,nu)=p4(nu)
+ p(5,nu)=p5(nu)
+ p(6,nu)=p6(nu)
+ p(7,nu)=0d0
+
+ enddo
+
+ wt4=xjac*pswt
+
+ if (debug) write(6,*) 'wt4 in gen4',wt4
+ return
+
+ 999 return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen4a.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen4a.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen4a.f (revision 1338)
@@ -0,0 +1,18 @@
+ subroutine gen4a(r,p4,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'debug.f'
+ double precision p4(mxpart,4),p3(mxpart,4),r(mxdim),wt,wt3
+c----although wt4 is generated we will not use it
+ call gen3(r,p3,wt3,*999)
+ if (debug) write(6,*) 'wt3 in gen4a',wt3
+c----this generates the full weight from both branchings
+ call gen4from3(p3,r(8),r(9),r(10),p4,wt,*999)
+c write(6,*) 's45',2d0
+c .*(p5(4,4)*p5(5,4)-p5(4,1)*p5(5,1)-p5(4,2)*p5(5,2)-p5(4,3)*p5(5,3))
+c pause
+ return
+ 999 wt=0d0
+ return 1
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen2jet.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen2jet.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen2jet.f (revision 1338)
@@ -0,0 +1,111 @@
+ subroutine gen2jet(r,p,wt2,*)
+C---generate two particle phase space and x1,x2 integration
+C---p1+p2 --> p3+p4
+ implicit none
+ include 'constants.f'
+ include 'cutoff.f'
+ include 'mxdim.f'
+ include 'jetcuts.f'
+ include 'phasemin.f'
+ character*4 part
+ common/part/part
+ integer j,nu
+
+ double precision r(mxdim),p(mxpart,4),xx(2),zmin,zmax,z
+ double precision sqrts,yave,ydif,xjac,y3,y4,phi,wt0,wt2,
+ . ydifmin,ydifmax,yavemin,yavemax,xtsq,pt,xt
+ logical first
+ parameter(wt0=1d0/16d0/pi)
+ common/energy/sqrts
+ common/x1x2/xx
+ data first/.true./
+ save first
+
+ if (first) then
+ first=.false.
+ call read_jetcuts(ptjetmin,etajetmin,etajetmax)
+ if (part .eq. 'real') then
+ ptjetmin=dsqrt(cutoff)
+ etajetmax=10d0
+ endif
+ endif
+
+C PS = 1/(16 pi) dxt^2 d phi/(2 pi) dyave dystar
+
+ do j=1,mxpart
+ do nu=1,4
+ p(j,nu)=0d0
+ enddo
+ enddo
+
+ wt2=0d0
+
+c xtsqmin=(2d0*ptjetmin/sqrts)**2
+c xjac=1d0-xtsqmin
+c xtsq=xtsqmin+xjac*r(3)
+
+ zmax=(0.5d0*sqrts/ptjetmin)**2
+ zmin=1d0
+ z=zmin+(zmax-zmin)*r(3)
+ xtsq=1d0/z
+ xjac=xtsq**2*(zmax-zmin)
+
+ xt=dsqrt(xtsq)
+ pt=0.5d0*sqrts*xt
+ ydifmax=0.5d0*log((2d0-xtsq+2d0*dsqrt(1d0-xtsq))/xtsq)
+ ydifmin=-ydifmax
+
+ ydif=ydifmin+(ydifmax-ydifmin)*r(1)
+ xjac=xjac*(ydifmax-ydifmin)
+
+ yavemin=dlog(xt*cosh(ydif))
+ yavemax=-yavemin
+ yave=yavemin+(yavemax-yavemin)*r(2)
+ xjac=xjac*(yavemax-yavemin)
+
+ y3=yave+ydif
+ y4=yave-ydif
+
+ phi=2d0*pi*r(4)
+
+ xx(1)=0.5d0*xt*(exp(+y3)+exp(+y4))
+ xx(2)=0.5d0*xt*(exp(-y3)+exp(-y4))
+
+ if (xx(1)*xx(2) .gt. 1d0) then
+ write(6,*) 'problems with xx(1),xx(2) in gen2',xx(1)*xx(2)
+ write(6,*) 'xx(1),xx(2)',xx(1),xx(2)
+ return 1
+ endif
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)
+ & ) then
+c write(6,*) 'problems with xx(1),xx(2) in gen2',xx(1),xx(2)
+ return 1
+ endif
+
+ p(1,4)=-0.5d0*xx(1)*sqrts
+ p(1,1)=0d0
+ p(1,2)=0d0
+ p(1,3)=-0.5d0*xx(1)*sqrts
+
+ p(2,4)=-0.5d0*xx(2)*sqrts
+ p(2,1)=0d0
+ p(2,2)=0d0
+ p(2,3)=+0.5d0*xx(2)*sqrts
+
+ p(3,4)=+pt*cosh(y3)
+ p(3,1)=+pt*sin(phi)
+ p(3,2)=+pt*cos(phi)
+ p(3,3)=+pt*sinh(y3)
+
+ p(4,4)=+pt*cosh(y4)
+ p(4,1)=-pt*sin(phi)
+ p(4,2)=-pt*cos(phi)
+ p(4,3)=+pt*sinh(y4)
+
+ wt2=wt0*xjac
+ return
+
+ end
Index: dynnlo-v1.5-applgrid/src/Phase/gen6.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen6.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen6.f (revision 1338)
@@ -0,0 +1,80 @@
+ subroutine gen6(r,q,wt6,*)
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+ include 'debug.f'
+ include 'phasemin.f'
+ integer nu
+ double precision r(mxdim)
+ double precision wt6,q(mxpart,4)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),p8(4)
+ double precision pswt,xjac,p1ext(4),p2ext(4)
+ double precision xx(2),tau,x1mx2,surd
+ double precision lntaum
+ common/pext/p1ext,p2ext
+ common/x1x2/xx
+ data p3/0d0,0d0,0d0,0d0/
+
+ wt6=0d0
+
+ lntaum=dlog(taumin)
+ tau=dexp(lntaum*(one-r(9)))
+ xjac=-lntaum*tau
+
+c tau=(one-taumin)*r(14)**2+taumin
+c xjac=2*r(13)*(one-taumin)
+
+ x1mx2=two*r(10)-one
+ surd=dsqrt(x1mx2**2+four*tau)
+
+ xx(1)=half*(+x1mx2+surd)
+ xx(2)=half*(-x1mx2+surd)
+ xjac=xjac*two/surd
+
+ if ((xx(1) .gt. 1d0)
+ & .or. (xx(2) .gt. 1d0)
+ & .or. (xx(1) .lt. xmin)
+ & .or. (xx(2) .lt. xmin)) return 1
+
+ do nu=1,4
+ p1(nu)=xx(1)*p1ext(nu)
+ p2(nu)=xx(2)*p2ext(nu)
+ enddo
+
+
+ call phase6(r,p1,p2,p3,p4,p5,p6,p7,p8,pswt,*999)
+c write(6,*) 'p1sq',p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+c write(6,*) 'p2sq',p2(4)**2-p2(1)**2-p2(2)**2-p2(3)**2
+c write(6,*) 'p4sq',p3(4)**2-p3(1)**2-p3(2)**2-p3(3)**2
+c write(6,*) 'p4sq',p4(4)**2-p4(1)**2-p4(2)**2-p4(3)**2
+c write(6,*) 'p5sq',p5(4)**2-p5(1)**2-p5(2)**2-p5(3)**2
+c write(6,*) 'p6sq',p6(4)**2-p6(1)**2-p6(2)**2-p6(3)**2
+c write(6,*) 'p7sq',p7(4)**2-p7(1)**2-p7(2)**2-p7(3)**2
+c write(6,*) 'p8sq',p8(4)**2-p8(1)**2-p8(2)**2-p8(3)**2
+
+c write(6,*) 'p34',2d0*(p3(4)*p4(4)-p3(3)*p4(3)
+c . -p3(2)*p4(2)-p3(1)*p4(1))
+
+c write(6,*) 'p78',2d0*(p8(4)*p7(4)-p8(3)*p7(3)
+c . -p8(2)*p7(2)-p8(1)*p7(1))
+c pause
+
+ do nu=1,4
+ q(1,nu)=p1(nu)
+ q(2,nu)=p2(nu)
+ q(3,nu)=p3(nu)
+ q(4,nu)=p4(nu)
+ q(5,nu)=p5(nu)
+ q(6,nu)=p6(nu)
+ q(7,nu)=p7(nu)
+ q(8,nu)=p8(nu)
+
+ enddo
+ wt6=xjac*pswt
+
+ if (debug) write(6,*) 'wt6 in gen6',wt6
+ return
+
+ 999 return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase3m.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase3m.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase3m.f (revision 1338)
@@ -0,0 +1,40 @@
+ subroutine phase3m(r,p1,p2,p3,p4,p5,p6,p7,m3,m4,m5,wt)
+c----generate phase space for 2-->3 process with masses m3,m4,m5
+c----r(mxdim),p1(4),p2(4) are inputs
+c----incoming p1 and p2 reversed in sign from physical values
+c----i.e. phase space for -p1-p2 --> p3+p4+p5
+c----with all 2 pi's (ie 1/(2*pi)^5)
+c----(p4,p5) are dummies
+ implicit none
+ include 'constants.f'
+ include 'mxdim.f'
+
+ integer j
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4)
+ double precision p12(4),p34(4),smin
+ double precision wt,wt125,wt34,wt0,m3,m4,m5
+ parameter(wt0=1d0/twopi)
+
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ p6(j)=0d0
+ p7(j)=0d0
+ enddo
+ smin=(m3+m4)**2
+
+c---generate p5 and p34,
+c---smin is the minimum inv mass of 34 system
+c---m5 is the mass of p5
+ call phi1_2m(m5,r(1),r(2),r(3),smin,p12,p5,p34,wt125,*99)
+
+c---decay 34-system
+ call phi3m(r(4),r(5),p34,p3,p4,m3,m4,wt34,*99)
+
+ wt=wt0*wt125*wt34
+ return
+ 99 continue
+ wt=0d0
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/gen3from2.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/gen3from2.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/gen3from2.f (revision 1338)
@@ -0,0 +1,79 @@
+ subroutine gen3from2(q,z,rtalpha,phit,p,jac,*)
+c----jac is the total wt of the whole business (2) and (3 from 2)
+c----q are the input momenta
+c----p are the output momenta
+ implicit none
+ include 'constants.f'
+ include 'debug.f'
+ integer nmin,nmax,j,iseed,i1(8),i2(8),k
+ double precision p(mxpart,4),q(mxpart,4),z,rtalpha,phit,
+ . wt3_2,msq(-nf:nf,-nf:nf)
+ double precision sum(0:8),wtc(8),apweight(8),jac,ran0,myran
+ common/apwt/apweight
+ common/nmin/nmin
+ common/nmax/nmax
+ data iseed/1768/
+ data i1/1,2,4,5,1,1,2,2/
+ data i2/2,1,5,4,4,5,4,5/
+
+
+ do j=1,7
+ do k=1,4
+ p(j,k)=q(j,k)
+ enddo
+ enddo
+
+ sum(nmin-1)=0d0
+
+ do j=nmin,nmax
+ apweight(j)=1d0/dfloat(nmax-nmin+1)
+ sum(j)=sum(j-1)+apweight(j)
+ if (debug) then
+ write(6,*) 'j',j
+ write(6,*) 'apweight(j)',apweight(j)
+ write(6,*) 'sum(j)',sum(j)
+ endif
+ enddo
+
+ myran=ran0(iseed)
+
+ do j=nmin,nmax
+ if ((myran .gt. sum(j-1)) .and. (myran .lt. sum(j))) then
+c---genrad is a switchyard routine routing to genrii,genrif,genrff
+c---genrad modifies the vector p to provide new ones
+ call genrad(p,i1(j),i2(j),5,z,rtalpha,phit,wt3_2,*999)
+c---although genrad returns wt3_2 we shall not use it
+c---in this step we have generated the new p's (only one set)
+c---only one option is pursued in this do-loop
+ endif
+ enddo
+ if (debug) then
+ write(6,*) 'wt3_2 in gen3from2.f',wt3_2
+ call writeout(p)
+ endif
+
+c---Sum over channels
+c---Initialize jac
+ jac=0d0
+ do j=nmin,nmax
+ if ((j .eq. 1) .or. (j .eq. 2))
+ . call genii(j,p,wtc(j),msq)
+ if ((j .eq. 3) .or. (j .eq. 4))
+ . call genff(j-2,p,wtc(j),msq)
+ if ((j .eq. 5) .or. (j .eq. 6) .or. (j .eq. 7) .or. (j .eq. 8))
+ . call genif(j-4,p,wtc(j),msq)
+c jac=jac+apweight(j)/wtc(j)
+ jac=jac+1d0/wtc(j)
+ enddo
+ jac=1d0/jac
+
+ if (debug) write(6,*)
+ if (debug) write(6,*) 'this is the result of reconstruction'
+ if (debug) write(6,*) 'jac in gen3from2',jac
+ if (debug) pause
+ return
+
+ 999 jac=0d0
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phi3.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phi3.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phi3.f (revision 1338)
@@ -0,0 +1,33 @@
+ subroutine phi3(xth,xphi,p1,p2,p3,wt)
+c d^4 p2 d^4 p3 (2 pi)^4 delta(p1-p2-p3)/(2 pi)^6
+c particle (p1) with mass s decaying into p2 and p3 massless.
+c vectors p2 and p3 are returned in the same frame as p1 is supplied.
+c result is 1/8/pi * 2|p|/sqrts * domega/(4*pi)
+ implicit none
+ double precision p1(4),p2(4),p3(4),p3cm(4)
+ double precision xth,xphi,s,roots,costh,sinth,phi,cphi,sphi,pi
+ double precision wt0,wt
+ integer j
+ parameter(pi=3.141592654d0,wt0=1d0/8d0/pi)
+ s=p1(4)**2-p1(1)**2-p1(2)**2-p1(3)**2
+ roots=dsqrt(s)
+ costh=2d0*xth-1d0
+ phi=2d0*pi*xphi
+ sinth=dsqrt(1d0-costh**2)
+ cphi=dcos(phi)
+ sphi=dsin(phi)
+ wt=wt0
+
+ p3cm(4)=roots/2d0
+ p3cm(1)=p3cm(4)*sinth*sphi
+ p3cm(2)=p3cm(4)*sinth*cphi
+ p3cm(3)=p3cm(4)*costh
+
+ call boost(roots,p1,p3cm,p3)
+ do j=1,4
+ p2(j)=p1(j)-p3(j)
+ enddo
+
+ return
+ end
+
Index: dynnlo-v1.5-applgrid/src/Phase/phase7m.f
===================================================================
--- dynnlo-v1.5-applgrid/src/Phase/phase7m.f (revision 0)
+++ dynnlo-v1.5-applgrid/src/Phase/phase7m.f (revision 1338)
@@ -0,0 +1,68 @@
+ subroutine phase7m(r,p1,p2,p3,p4,p5,p6,p7,p8,p9,wt,*)
+ implicit none
+ include 'constants.f'
+ include 'masses.f'
+ include 'mxdim.f'
+c******* generate phase space for 2-->4 process
+c******* r(mxdim),p1(4),p2(4) are inputs reversed in sign from physical values
+c---- phase space for -p1-p2 --> p3+p4+p5+p6+p7+p8+p9+p10
+c---- with all 2 pi's (ie 1/(2*pi)^20)
+ integer n2,n3,j
+ double precision r(mxdim)
+ double precision p1(4),p2(4),p3(4),p4(4),p5(4),p6(4),p7(4),p8(4),
+ . p9(4),p12(4),
+ . p345(4),p678(4),p45(4),p78(4),p345678(4),
+ . smin,wt,wt0,wt129,wt345678,wt345,wt678,wt45,wt78,
+ . mass2,width2,mass3,width3
+ common/breit/n2,n3,mass2,width2,mass3,width3
+ parameter(wt0=1d0/twopi**5)
+ wt=0d0
+ do j=1,4
+ p12(j)=-p1(j)-p2(j)
+ enddo
+ smin=100d0
+
+ n2=1
+ n3=1
+
+ mass3=hmass
+ width3=hwidth
+ call phi1_2m(0d0,r(1),r(2),r(3),smin,p12,p9,p345678,wt129,*99)
+
+ n2=0
+ n3=0
+
+ mass2=mtau
+ width2=tauwidth
+ mass3=mtau
+ width3=tauwidth
+
+ call phi1_2(r(4),r(5),r(6),r(7),p345678,p345,p678,wt345678,*99)
+
+ n2=1
+ n3=1
+
+ mass3=wmass
+ width3=wwidth
+ call phi1_2m(0d0,r(8),r(9),r(10),smin,p345,p3,p45,wt345,*99)
+ call phi1_2m(0d0,r(11),r(12),r(13),smin,p678,p6,p78,wt678,*99)
+
+ if ((p3(4).le.0d0).or.(p6(4).le.0d0)) goto 99
+ call phi3m0(r(14),r(15),p45,p4,p5,wt45,*99)
+ if ((p4(4).le.0d0).or.(p5(4).le.0d0)) goto 99
+ call phi3m0(r(16),r(17),p78,p7,p8,wt78,*99)
+ if ((p7(4).le.0d0).or.(p8(4).le.0d0)) goto 99
+
+ wt=wt0*wt129*wt345678*wt345*wt678*wt45*wt78
+
+ return
+ 99 wt=0d0
+c write(*,*) 'wt129',wt129
+c write(*,*) 'wt345678',wt345678
+c write(*,*) 'wt345',wt345
+c write(*,*) 'wt678',wt678
+c write(*,*) 'wt45',wt45
+c write(*,*) 'wt78',wt78
+ return 1
+ end
+
Index: dynnlo-v1.5-applgrid/bin/infileW
===================================================================
--- dynnlo-v1.5-applgrid/bin/infileW (revision 0)
+++ dynnlo-v1.5-applgrid/bin/infileW (revision 1338)
@@ -0,0 +1,16 @@
+8d3 ! sroot
+1 1 ! ih1, ih2
+1 ! nproc
+80.4d0 80.4d0 ! mur, muf
+2 ! order
+'tota' ! part
+.true. ! zerowidth
+66d0 116d0 ! mwmin, mwmax
+5 1000 ! itmx1, ncall1
+10 1000 ! itmx2, ncall2
+113 ! rseed
+92 0 ! set, member (native PDFs)
+'MSTW2008nnlo68cl.LHgrid' 0 ! set, member (LHAPDFs)
+'nnlo' ! runstring
+.true. ! creategrid flag for APPLgrid
+
Index: dynnlo-v1.5-applgrid/bin/dynnlo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: dynnlo-v1.5-applgrid/bin/dynnlo
===================================================================
--- dynnlo-v1.5-applgrid/bin/dynnlo (revision 1337)
+++ dynnlo-v1.5-applgrid/bin/dynnlo (revision 1338)
Property changes on: dynnlo-v1.5-applgrid/bin/dynnlo
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: dynnlo-v1.5-applgrid/bin/infile
===================================================================
--- dynnlo-v1.5-applgrid/bin/infile (revision 0)
+++ dynnlo-v1.5-applgrid/bin/infile (revision 1338)
@@ -0,0 +1,16 @@
+8d3 ! sroot
+1 1 ! ih1, ih2
+1 ! nproc
+91.1876d0 91.1876d0 ! mur, muf
+0 ! order
+'virt' ! part
+.true. ! zerowidth
+66d0 116d0 ! mwmin, mwmax
+15 1000 ! itmx1, ncall1
+30 1000 ! itmx2, ncall2
+113 ! rseed
+92 0 ! set, member (native PDFs)
+'MSTW2008nnlo68cl.LHgrid' 0 ! set, member (LHAPDFs)
+'nnlo' ! runstring
+.true. ! creategrid flag for APPLgrid
+
Index: dynnlo-v1.5-applgrid/bin/nnlo_dvegas_real.grid
===================================================================
--- dynnlo-v1.5-applgrid/bin/nnlo_dvegas_real.grid (revision 0)
+++ dynnlo-v1.5-applgrid/bin/nnlo_dvegas_real.grid (revision 1338)
@@ -0,0 +1,120 @@
+
+ 03F5C7A0AEACA20AB3F6D1C903203289B3F76D5DED78EA2423F800303E0883E82
+3F8776E7808ED4243F8DBAB98ECE73A03F9401E0146BEE0E3F9A4B2A6B3CDF583FA48C27F5C927D3
+3FA85189A23596783FACC095F0F5EE5E3FB0AAF9CB9456D03FB37502C30C67A43FB5C890F6FCFC21
+3FB8E1FDD9417C3B3FC03025222042BB3FC4166865B44E2D3FC702B584936C2A3FC91BAB9C70E31D
+3FCBC32B58BEFBDC3FCF2FC5E0DDD9913FD3350B7EDC67813FD4B64200BD17CF3FD59B8A4D63DFD9
+3FD66E0236FDF1CA3FD76555F05E00C13FD883F0CE2FFB893FD92F881E4660C03FD9AFF5F4487D4E
+3FDA2A922B1F33E83FDACDD46FFBE0AD3FDCAA1F871C601C3FE05E6470BBE9503FE226ECA4355E0F
+3FE40387D73767503FE630A85CD07A903FE6F5BEDB5072623FE7BAD559D06A333FE87936E03235F6
+3FE935EF05BACE393FE9D4EB77BB47693FEA46731DF0EA423FEAB7FAC4268D1C3FEB3206C6E35B4A
+3FEBBD854E0C09A53FEC3DB96BC29F813FECAD07A81CE1F53FED52922E0B2CFA3FEE8124D5D7E585
+3FF0000000000000
+
+ 03FA095C4495FFDAA3FA9EC9079F2BC803FAF7A4DBDBFD3873FB4C9B0697E1CD0
+3FB9B579C1718BEC3FBD1651D2A3FE333FC02E453D84DA543FC472CF2E218E7C3FC787E9B453AE76
+3FC9D88D29C544263FCC909874BB082A3FCF4BE79F4945DF3FD07C4C648FF7663FD23F926BF8858F
+3FD3FCBD06D21DE63FD5EBA3700D9A653FD81A9B96AD35EE3FD96E4213E028C13FDAB3CBB03692AF
+3FDB8A86BA92F1F03FDC2624472799B43FDCBC8CFFB79E063FDD50ED8F5512513FDE99C6333BC985
+3FDF5B3273CA14293FDF9863198BC4913FDFCCEC0DC0DC793FE00322DCC1787E3FE023CD84C9ECDB
+3FE044782CD261383FE05FFF116E37413FE07B24C111A4B53FE0C2A2033495073FE179E8B4B33BAC
+3FE2453FCAC8549D3FE2FBC0D417290E3FE3BA178DF76F6D3FE483F3497322543FE532D673CCD876
+3FE5D4561BFFF66C3FE672BEACD5C9133FE7200F2FA1EC803FE80E43E03DCB063FE92C960A121FC4
+3FEA7937955FC8F63FEBC84E983820DF3FEC59001DAB2DEB3FECEB581C1BBE3C3FEDCFD95997ADD0
+3FF0000000000000
+
+ 03F4721188D522A9F3F5843B3F31930943F62F698AA7662543F6C134849549CCC
+3F790BC3872CB9A33F815BEC54ECCF393F9018FB29108FDE3FA196A0FF2077D03FAB0853B866E5C5
+3FB19C0081A7C7F03FB9560ED776DABC3FC1174D6B09596A3FC50EB3913FE3803FC9604F4D9A8DB6
+3FD00614B9EA1C133FD1BB7B5B624A513FD39BE591EF89623FD57C4FC87CC8733FD8787C74F67988
+3FDB889FADEA1DC93FDE4DD55361A2A33FE077510B81BAE73FE200E9BD3765183FE3ABB74E11335F
+3FE54337E9A8E0A43FE75ABEB62963483FE97D8325C285EA3FEAAA5D1C25917E3FEB65331984BA54
+3FEBA70064505B4F3FEBE8CDAF1BFC4B3FEC4F313647F0733FECBAD9974DEEFF3FED205499204C08
+3FED7CB68D8BD5C43FEDD91881F75F813FEE1C29315C2B1A3FEE43A2B7FE48B23FEE95FC5822F0E1
+3FEEBB2A969F17303FEEE3D88BC741E03FEF08D1201E15773FEF2EA2D8440DFE3FEF591A4A3EFE81
+3FEF7D5B83B031953FEF9CCD96FF53153FEFBC97737E74523FEFE13FB3B1529B3FEFF0EE88C37B94
+3FF0000000000000
+
+ 03F8CB57AB3FD84A23FA206CAF54DF8993FB1F7AAABCA8E0F3FB708860F799799
+3FBAA4F1C8C29F9C3FBD67B5315CFFD83FBF790C35114FFF3FC0D9322B1292A63FC21CE0BC97CB85
+3FC42D776A4E41073FC6D5A4453483413FCA5FAC4719C1763FCEC19E42A4EEEF3FD0E55205462034
+3FD16CBCF0CA04FC3FD1F3377058A50D3FD279B1EFE7451E3FD30BBF00580E473FD3A19E98E88758
+3FD4377E317900693FD4B075B0E66BBC3FD51574710FAA1A3FD57A733138E8773FD676D316325A66
+3FD8659924E59F613FDA5A4F351DC4CB3FDB9125A77889E03FDCDF0B2A9472293FDEFCAB045F9361
+3FE018E05FEAB5F03FE0DD4E5E63F4FA3FE1BEC13E531D353FE2AA6AB1C86A3B3FE3CE68EEBECB57
+3FE4ECB3D494922B3FE5786CD1E238823FE636D7761D99CE3FE6B61191D1DE793FE7E90F851BEDE1
+3FE91DAD69F341893FEA04F217DC18B63FEAD051213AE9A83FEB85FFDE0979543FEC62614BD2F632
+3FED9253DEE5FBBC3FEE517A416B45FD3FEE94337CC1D7633FEEE519D918D8333FEF3F1A34E783C9
+3FF0000000000000
+
+ 03F90B64768C417803FA0483B3FAEA9423FA89D9CBC6F18653FB09C772825BE82
+3FB445EB32F448743FB8B0C83B849DC33FBC139856311C5D3FBF161F481186EF3FC10C531CF8F8C0
+3FC31B91D75B7F3A3FC53494AD6AB3EB3FC81CD7B604C56B3FCC67D877647ABB3FD0596C9C621806
+3FD40AD23AEFF1F03FD7196F9FB5161C3FD8C7E5E781F1F93FDA259229A540443FDB381E973DD8E2
+3FDC6E0918CCEBA13FDE11A56D1094643FDF1B8973586CCB3FE004D407788E8F3FE0A52C74FE19E4
+3FE111AB3FBA00C03FE15D944CA626F33FE20D1081C476133FE271599E504C7C3FE2EE6D8ECBFC1D
+3FE367B100D3C5D13FE4788071F3DB1E3FE596E1EB4D7E823FE7889AEEF124823FE8FEBF806EE589
+3FE9A07CC23C425F3FE9DF1D3160D68F3FEA0B84564F67E23FEA8BB55C198C573FEB20A99E772B56
+3FEB84C6434D6D5D3FEBDE6A3BACF5AC3FEC3967ABB1C1D53FEC9C0CDC5DF08D3FED0397AA7458A5
+3FED762572AE869D3FEDF0005C332C113FEE722A512F58363FEEE84C64A08C613FEF5B7D79040437
+3FF0000000000000
+
+ 03FC205EF835ABAAC3FC7EDFFAE7804C63FCB5779D2E9886B3FCE4A056E577C8B
+3FD08DCB4A2683A33FD37502A6A6A23C3FD6CD6DFB3AFD353FD8A2701A83EAE23FDA0BC5159175F7
+3FDB9E88CC730AD83FDD0C161A1766143FDE58804AD7C6823FDFC5D1C93ED3E93FE07E6D566E409F
+3FE16319A2461D8D3FE1F020DC4709F53FE2621C7A9A8B6D3FE27C67CA39899C3FE296255166CC33
+3FE2AEF723DCCF763FE31A55B6DE57A53FE3F319B9A481DA3FE49673EA0E13363FE4FC418710D3F2
+3FE57FC5E94409DD3FE5E98632015ACB3FE64CDF995ECB703FE6B682C8054EEE3FE742E6A614F90B
+3FE812223BAFF9CB3FE8C48E9886AFB03FE9587BB94591E53FE9DFA8C12C5C863FEAAD1F49D10C60
+3FEB9F29FB0A87583FEC2C3CFD8FF4BD3FEC908BD3B232ED3FECD8DCDAEF03283FED08DCF219430F
+3FED366EF8DCB1153FED66ACC07B182A3FED9DDADE5C185F3FEDD508FC3D18943FEDF90A34AC11CE
+3FEE1A74EB270C8B3FEE45D5852DE6CA3FEE80D1F44E53F23FEED37609307C1E3FEF506D60347B5F
+3FF0000000000000
+
+ 03FA1AF86564D33DB3FADC07E8719681B3FB2C837EAFC3DB53FB7473C0C77D21C
+3FBC3C266BDB4F763FBFFF802E2EE4AF3FC13B0313426F273FC36F7E0C7DA03D3FC6FCB17B0852E9
+3FC9D843AE8A4AA73FCC56F27552E5F73FCF13FB0CFFAADB3FD10094D8D0B3773FD2911AAEAEBB10
+3FD4688B27F0EF1A3FD6D399605DF20A3FD9C1D88DCBE5333FDD5A2A8EDD2E303FE00F6DDC232BE6
+3FE13E1DECDC6CAE3FE258123370AFAE3FE33C18286A77593FE3F58B83FC25D93FE49A749E002790
+3FE5B2A896160D8C3FE6DD8B09D756B03FE7EDAF7B187CBB3FE885414DB854523FE90227BB0E8BE3
+3FE99F7079F45AC03FEA11487AAE01FB3FEB142FF30B4F323FEBC039B2B06B543FEC20670E8936A5
+3FEC8F1649E3E19C3FED04B46F75D76E3FED4F51C6685A673FED8B1207C15C2A3FEDE0F57190F340
+3FEE6BBC347FC2E93FEEE391134713423FEF05A1E95A99503FEF27B2BF6E1F5D3FEF3E49A4F07373
+3FEF52D7EFAA6D593FEF66B24EAC4BBA3FEF798D8AC324EC3FEF8C68C6D9FE1D3FEFC728E5FD8075
+3FF0000000000000
+
+ 03FA0E26549C9AB1C3FB0E26549C9AB1B3FB95397EEAE80A83FBD995938EB21DC
+3FC0E26A5A0D17843FC2F82817A49E193FC5101F1BA9B4B13FC72DF31C036FDF3FC94BC71C5D2B0C
+3FCB62E7ABFF9E103FCD71BEEE64BB823FCF809630C9D8F63FD161BCFF4A85873FD3DE06B7E45D24
+3FD7292004F86CA13FDA7B515E91501E3FDCFAFB2EC1E6DB3FDE7D0C6CE850A73FDFDB3C7A250B9C
+3FE0CF2489495F983FE15CF347C07FBF3FE1928FBF3F61A93FE1CBB9C7B1AA883FE1F776E21612B7
+3FE22D4F5CFF19DF3FE270C30D08BB183FE2FA732901B7D03FE39802C38BDE8C3FE4232E8B251E0F
+3FE486FFE717D5073FE4B8CCB7D3E5173FE4F73A072342A43FE53B5AFED07F0D3FE584DE2C32CCF4
+3FE5FA6FB9950B823FE6C9F45B8EECF13FE78AE748A152603FE87249BF193B9A3FE987F81A7B4AB3
+3FEA1BDB0ABE15203FEAABAB29F0D0673FEB39B54F10EA733FEBF26FAD559AF13FEC97FDCEC7B0AA
+3FED127AA306C6DA3FEDAE991F4800C23FEE6533D2DA5E303FEF3B29E44E8C093FEF8B7401F6A849
+3FF0000000000000
+
+ 03FCA06842216F6483FD402148BA545A73FD90DCD07E0A29E3FDE4FD326E6CB89
+3FE1EC9FB72997653FE4E221A86FF2253FE5296A9C4946653FE571BD1E63057A3FE5BD14D008EC5E
+3FE607F49B149D7E3FE6507D881E816F3FE69B7378983E783FE70A59C8933E2F3FE7BBEFB03E9A32
+3FE832ED2203F5233FE85EF3E0A5B7EC3FE8A6AE7FEC3D533FE908CD55CC116E3FE9967D54917EE2
+3FEA11E5BA228D953FEAEBB9D33103E93FEBC3A551F3F62A3FEC28569B10DD093FEC5A0CB8FB191E
+3FECB472991D4B0A3FED10C70B6D82B33FED775FEBA07F113FEDB1E7B7F8E8AA3FEDE9045CD1AAF7
+3FEE1E2D100C43263FEE522B2A970A573FEE85FDFC9DE30D3FEEB4F3ECF094C33FEEE289D4F53A8B
+3FEF0D9706A244453FEF356997E8D3983FEF5816E17E166E3FEF74B0E10390EE3FEF87BE2A76B600
+3FEF97F24F7634923FEF9E41246F10F53FEFA48FF967ED583FEFAADC126DBEB03FEFB127E15591EB
+3FEFB73D70A4E57E3FEFBD021D09953E3FEFC2C6C96E44FF3FEFD080009FCE0B3FEFE6374F2D6070
+3FF0000000000000
+
+ 03FC5F75C483C66883FC80CF1E131BE133FC9D7006A38890B3FCB91B8D99A3F05
+3FCDD76D4EA9126D3FCEF94088582E3D3FD087F350AF3F9F3FD19C83C64F0DDE3FD2F4F5A46D9898
+3FD406AE489AD4793FD4BBDA89BE51913FD56BA36E54E4AD3FD608B4B2856F113FD6E3D3B0A6912F
+3FD7FDDB73CD79033FD92FFC8FEA86803FDA4AC842B9B2AC3FDBB3369E024E703FDD80E67F659947
+3FDE62492EC37BAF3FDED9FAD2014D183FDFB6992230B0AA3FE054A8312C62913FE0E537C73017FF
+3FE1725589CC78693FE1D591AF78C9B63FE24307706C5E913FE269891E13E8563FE2D7C0484C069D
+3FE37DB30D4586993FE3E03093DCAC523FE4393C90F1D3C33FE4BB928082224F3FE57B0D7702A624
+3FE5D3A1C2595C833FE628A4161AA3173FE68C7E183E217C3FE715296891A0C23FE79DD4B8E52008
+3FE8268009389F4D3FE857D3D8F9AC263FE8889832DAE99A3FE8B95C8CBC270E3FE8DD485DC1019A
+3FE8FD7D0AB73FB33FE993284C5411753FE9D940FA90E0413FEA3CC79FF0D1BA3FEB47E72FB2E3F0
+3FF0000000000000
Index: dynnlo-v1.5-applgrid/bin/nnlo.top
===================================================================
--- dynnlo-v1.5-applgrid/bin/nnlo.top (revision 0)
+++ dynnlo-v1.5-applgrid/bin/nnlo.top (revision 1338)
@@ -0,0 +1,704 @@
+ ( Cross-section is: 4160486.9227592670 +/- 1793521.7259765235 )
+
+ ( Run corresponds to this input file)
+
+ (sqrts= 8000.0000000000000
+ (ih1= 1 ih2= 1
+ (nproc: 0
+ (dynamicscale= F
+ (muf= 80.400000000000006
+ (mur= 80.400000000000006
+ (order= 2
+ (part= tota
+ (zerowidth= T
+ (Mwmin= 66.000000000000000 Mwmax= 116.00000000000000
+ (itmx1= 5
+ (ncall1= 1000
+ (itmx2= 10
+ (ncall2= 1000
+ (rnd seed= 113
+ (iset= 92 nset= 0
+ (PDFname=MSTW2008nnlo68cl.LHgrid PDFmember= 0
+ (runstring=nnlo
+
+ ( td -b filename.top
+ SET DEVICE POSTSCRIPT SIDEWAYS
+ SET SIZE SIDEWAYS
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "m34 distribution"
+ TITLE BOTTOM "m34 "
+ TITLE LEFT "dS/dm34 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X 50.00000 400.00000
+ SET ORDER X Y DY
+ 80.0000 148483. 257506.
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.29697E+07 AVGE = 0.80000E+02 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 1159774 U`flow = 0 O`flow = 0"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "eta3 distribution"
+ TITLE BOTTOM "eta3 "
+ TITLE LEFT "dS/deta3 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X -4.00000 4.00000
+ SET ORDER X Y DY
+ -3.90000 0.165711E+07 414222.
+ -3.70000 -0.102512E+08 0.744826E+07
+ -3.50000 991913. 0.121150E+07
+ -3.30000 -0.121003E+07 0.116815E+07
+ -3.10000 -0.242222E+07 0.615656E+07
+ -2.90000 606672. 799026.
+ -2.70000 785814. 366930.
+ -2.50000 0.199484E+07 0.566830E+07
+ -2.30000 0.111468E+07 796738.
+ -2.10000 819952. 546258.
+ -1.90000 0.170258E+07 841712.
+ -1.70000 222235. 0.117923E+07
+ -1.50000 -198276. 856143.
+ -1.30000 -0.117435E+07 786450.
+ -1.10000 0.106061E+07 0.142581E+07
+ -0.900000 523985. 629131.
+ -0.700000 0.161679E+07 786568.
+ -0.500000 0.300483E+07 0.384665E+07
+ -0.300000 0.160852E+07 593450.
+ -0.100000 -0.167251E+07 0.242153E+07
+ 0.100000 0.107971E+07 985168.
+ 0.300000 -0.207066E+07 0.531125E+07
+ 0.500000 -0.356171E+07 0.352220E+07
+ 0.700000 0.152087E+07 740556.
+ 0.900000 0.101357E+07 0.175871E+07
+ 1.10000 0.167929E+07 521832.
+ 1.30000 -0.114837E+08 0.119390E+08
+ 1.50000 -86260.4 0.119124E+07
+ 1.70000 -721932. 0.142119E+07
+ 1.90000 -0.432018E+07 0.464113E+07
+ 2.10000 -0.117320E+07 0.110530E+07
+ 2.30000 -0.412339E+07 0.794954E+07
+ 2.50000 0.120346E+07 869777.
+ 2.70000 0.317386E+07 0.258001E+07
+ 2.90000 916302. 469055.
+ 3.10000 0.140997E+07 543552.
+ 3.30000 0.281027E+07 0.277583E+07
+ 3.50000 779955. 537043.
+ 3.70000 0.120500E+07 566810.
+ 3.90000 361956. 395267.
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL =-0.19210E+07 AVGE =-0.22421E+01 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 3410440 U`flow = 112960 O`flow = 125480"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "pt3 distribution"
+ TITLE BOTTOM "pt3 "
+ TITLE LEFT "dS/dpt3 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X 0.00000 150.00000
+ SET ORDER X Y DY
+ 2.50000 42283.7 29482.1
+ 7.50000 -14747.2 41584.0
+ 12.5000 974139. 643398.
+ 17.5000 -268937. 218303.
+ 22.5000 123056. 321707.
+ 27.5000 419403. 389925.
+ 32.5000 -665266. 614360.
+ 37.5000 -115009. 525205.
+ 42.5000 179474. 96793.1
+ 47.5000 -117179. 153970.
+ 52.5000 7797.78 2894.85
+ 57.5000 2214.20 5079.52
+ 62.5000 10430.8 7795.34
+ 67.5000 6245.30 3667.38
+ 72.5000 3009.31 2865.05
+ 77.5000 40.7323 649.522
+ 82.5000 684.206 305.079
+ 87.5000 175.235 124.101
+ 92.5000 2218.61 1756.57
+ 97.5000 825.583 606.067
+ 102.500 220.903 97.8927
+ 107.500 135.641 124.459
+ 112.500 221.384 151.431
+ 117.500 28.7504 19.9610
+ 122.500 42.6496 18.1554
+ 127.500 73.9575 40.3069
+ 132.500 93.0740 46.9222
+ 137.500 -2.57744 21.3268
+ 142.500 526.539 502.233
+ 147.500 22.5006 20.4987
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.29611E+07 AVGE = 0.43047E+00 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 2127240 U`flow = 0 O`flow = 309420"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "eta4 distribution"
+ TITLE BOTTOM "eta4 "
+ TITLE LEFT "dS/deta4 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X -4.00000 4.00000
+ SET ORDER X Y DY
+ -3.90000 -956241. 954338.
+ -3.70000 444860. 306383.
+ -3.50000 -0.363892E+07 0.456755E+07
+ -3.30000 0.186521E+07 0.223717E+07
+ -3.10000 774465. 553869.
+ -2.90000 942895. 358487.
+ -2.70000 290429. 564878.
+ -2.50000 0.195015E+07 919506.
+ -2.30000 -0.826260E+07 0.836377E+07
+ -2.10000 -0.420776E+07 0.651396E+07
+ -1.90000 0.188163E+07 399323.
+ -1.70000 0.186710E+07 0.457702E+07
+ -1.50000 151306. 854971.
+ -1.30000 -452194. 0.112072E+07
+ -1.10000 -0.182191E+07 0.190325E+07
+ -0.900000 387815. 937409.
+ -0.700000 0.489479E+07 0.321664E+07
+ -0.500000 0.260150E+07 705534.
+ -0.300000 0.603245E+07 0.517125E+07
+ -0.100000 0.246659E+07 0.549525E+07
+ 0.100000 -0.399253E+07 0.438116E+07
+ 0.300000 0.184279E+08 0.161003E+08
+ 0.500000 -0.502957E+07 0.458977E+07
+ 0.700000 0.203390E+07 825765.
+ 0.900000 0.582592E+07 0.295195E+07
+ 1.10000 -0.394562E+07 0.452422E+07
+ 1.30000 0.118452E+07 0.185338E+07
+ 1.50000 -543578. 0.140194E+07
+ 1.70000 -0.315432E+07 0.472531E+07
+ 1.90000 -0.743965E+07 0.698310E+07
+ 2.10000 0.425059E+07 0.290778E+07
+ 2.30000 -0.896746E+07 0.121427E+08
+ 2.50000 153042. 0.315580E+07
+ 2.70000 594740. 0.170147E+07
+ 2.90000 0.571810E+07 0.620670E+07
+ 3.10000 545967. 374511.
+ 3.30000 531680. 191409.
+ 3.50000 566288. 242581.
+ 3.70000 257199. 138152.
+ 3.90000 94218.4 197845.
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.28646E+07 AVGE = 0.97615E+00 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 3434080 U`flow = 100520 O`flow = 114280"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "pt4 distribution"
+ TITLE BOTTOM "pt4 "
+ TITLE LEFT "dS/dpt4 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X 0.00000 150.00000
+ SET ORDER X Y DY
+ 2.50000 52714.6 28685.0
+ 7.50000 182068. 205801.
+ 12.5000 822838. 627794.
+ 17.5000 -106582. 351903.
+ 22.5000 35410.2 281626.
+ 27.5000 478710. 358443.
+ 32.5000 -897068. 594210.
+ 37.5000 -88053.8 500351.
+ 42.5000 260145. 183416.
+ 47.5000 -197992. 153623.
+ 52.5000 16849.7 6419.29
+ 57.5000 16889.8 8404.38
+ 62.5000 8854.57 7482.06
+ 67.5000 856.751 708.478
+ 72.5000 2734.54 2280.48
+ 77.5000 -770.151 469.784
+ 82.5000 1341.98 847.194
+ 87.5000 -108.613 265.303
+ 92.5000 1872.06 1639.11
+ 97.5000 154.578 88.3010
+ 102.500 1666.22 1289.60
+ 107.500 93.9916 101.440
+ 112.500 14.5257 8.43051
+ 117.500 83.3237 44.5738
+ 122.500 1238.01 1130.02
+ 127.500 -633.273 948.732
+ 132.500 214.844 202.368
+ 137.500 -21.6140 48.1716
+ 142.500 89.2631 99.8870
+ 147.500 90.8097 40.4662
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.29685E+07 AVGE =-0.62599E+01 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 2174730 U`flow = 0 O`flow = 261930"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "y34 distribution"
+ TITLE BOTTOM "y34 "
+ TITLE LEFT "dS/dy34 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X -5.00000 5.00000
+ SET ORDER X Y DY
+ -4.50000 -152.347 585.173
+ -4.30000 52995.6 43313.6
+ -4.10000 81045.2 57139.9
+ -3.90000 384038. 635101.
+ -3.70000 722545. 534848.
+ -3.50000 -0.669582E+07 0.630113E+07
+ -3.30000 -0.332163E+07 0.454593E+07
+ -3.10000 482305. 281818.
+ -2.90000 -0.670979E+07 0.869276E+07
+ -2.70000 0.128811E+07 867342.
+ -2.50000 0.209261E+07 0.565002E+07
+ -2.30000 0.283427E+07 0.365228E+07
+ -2.10000 0.216475E+07 0.156842E+07
+ -1.90000 773504. 618620.
+ -1.70000 461538. 890160.
+ -1.50000 0.151351E+07 0.211805E+07
+ -1.30000 0.541776E+07 0.396145E+07
+ -1.10000 0.127921E+07 944600.
+ -0.900000 -0.390537E+07 0.459212E+07
+ -0.700000 449219. 0.128597E+07
+ -0.500000 0.290009E+07 0.347294E+07
+ -0.300000 0.168763E+07 803980.
+ -0.100000 364992. 449933.
+ 0.100000 0.103841E+07 0.170596E+07
+ 0.300000 -0.171585E+07 0.368478E+07
+ 0.500000 867617. 857931.
+ 0.700000 0.240098E+07 855677.
+ 0.900000 -0.241338E+07 0.464958E+07
+ 1.10000 -0.611398E+07 0.510801E+07
+ 1.30000 944544. 395237.
+ 1.50000 -0.129474E+07 0.124383E+07
+ 1.70000 0.406077E+07 0.227929E+07
+ 1.90000 -0.116602E+08 0.118849E+08
+ 2.10000 -0.389257E+07 0.803491E+07
+ 2.30000 0.162753E+08 0.160496E+08
+ 2.50000 0.361187E+07 0.284767E+07
+ 2.70000 -0.166837E+07 0.499843E+07
+ 2.90000 0.130276E+07 603244.
+ 3.10000 0.219502E+07 0.298249E+07
+ 3.30000 645808. 291242.
+ 3.50000 151537. 174859.
+ 3.70000 -316275. 0.111040E+07
+ 3.90000 0.608408E+07 0.601560E+07
+ 4.10000 36999.4 23788.2
+ 4.30000 -11816.4 14206.5
+ 4.50000 2394.36 1536.92
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.29697E+07 AVGE = 0.42177E+01 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 5061100 U`flow = 0 O`flow = 0"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "pt34 distribution"
+ TITLE BOTTOM "pt34 "
+ TITLE LEFT "dS/dpt34 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X 0.00000 200.00000
+ SET ORDER X Y DY
+ 2.50000 148224. 890150.
+ 7.50000 -98554.7 275820.
+ 12.5000 250386. 188274.
+ 17.5000 2203.05 30939.3
+ 22.5000 154867. 76346.0
+ 27.5000 18993.3 19351.5
+ 32.5000 168299. 136608.
+ 37.5000 -134384. 142440.
+ 42.5000 36263.7 24902.9
+ 47.5000 51.8092 6840.79
+ 52.5000 -5012.96 4857.51
+ 57.5000 17798.3 6421.32
+ 62.5000 -303.661 1042.41
+ 67.5000 3807.43 2231.95
+ 72.5000 6153.78 1948.41
+ 77.5000 3970.50 2325.42
+ 82.5000 1524.30 749.707
+ 87.5000 8646.19 7258.15
+ 92.5000 529.998 451.712
+ 97.5000 3082.39 2503.89
+ 102.500 55.9728 193.305
+ 107.500 142.640 176.096
+ 112.500 1148.93 957.741
+ 117.500 2201.38 1288.73
+ 122.500 -396.956 986.256
+ 127.500 202.991 258.904
+ 132.500 177.720 124.381
+ 137.500 414.318 256.987
+ 142.500 239.328 135.944
+ 147.500 226.099 158.299
+ 152.500 7.70288 22.8753
+ 157.500 -145.631 324.987
+ 162.500 581.910 549.256
+ 167.500 134.620 48.2844
+ 172.500 -11.8616 53.2421
+ 177.500 79.4287 62.0758
+ 182.500 78.2947 62.3616
+ 187.500 15.8955 14.2900
+ 192.500 80.1337 55.4103
+ 197.500 -21.9661 16.0216
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.29588E+07 AVGE = 0.21013E+02 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 3111280 U`flow = 0 O`flow = 537600"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "mt distribution"
+ TITLE BOTTOM "mt "
+ TITLE LEFT "dS/dmt [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X 0.00000 100.00000
+ SET ORDER X Y DY
+ 1.00000 5135.85 2832.98
+ 3.00000 3348.34 4910.76
+ 5.00000 18565.3 57055.2
+ 7.00000 103162. 92561.1
+ 9.00000 4039.92 7457.09
+ 11.0000 -20364.5 24338.4
+ 13.0000 8096.59 9992.07
+ 15.0000 260116. 191761.
+ 17.0000 -84988.6 116228.
+ 19.0000 519886. 476800.
+ 21.0000 64231.6 53281.3
+ 23.0000 78255.0 152501.
+ 25.0000 0.175946E+07 0.158660E+07
+ 27.0000 -48216.1 29959.5
+ 29.0000 11593.2 13323.8
+ 31.0000 40897.1 59689.0
+ 33.0000 255.587 56410.2
+ 35.0000 -319881. 362303.
+ 37.0000 -359277. 497418.
+ 39.0000 -157705. 204442.
+ 41.0000 -685384. 628702.
+ 43.0000 86436.6 63281.5
+ 45.0000 804698. 478614.
+ 47.0000 140031. 59562.9
+ 49.0000 429030. 287977.
+ 51.0000 35330.0 55760.9
+ 53.0000 302263. 796822.
+ 55.0000 99598.1 80845.3
+ 57.0000 155190. 61825.1
+ 59.0000 146407. 87365.0
+ 61.0000 -30051.7 177303.
+ 63.0000 6805.04 628124.
+ 65.0000 -570975. 760869.
+ 67.0000 81315.7 247949.
+ 69.0000 -924928. 0.119708E+07
+ 71.0000 152224. 80365.6
+ 73.0000 166586. 117912.
+ 75.0000 -186048. 326054.
+ 77.0000 115120. 147351.
+ 79.0000 -871343. 908101.
+ 81.0000 145916. 154522.
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.29697E+07 AVGE =-0.17459E+02 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 5061100 U`flow = 0 O`flow = 0"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "pt5 distribution"
+ TITLE BOTTOM "pt5 "
+ TITLE LEFT "dS/dpt5 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X 0.00000 500.00000
+ SET ORDER X Y DY
+ 2.50000 0.221546E+07 792572.
+ 7.50000 -335066. 283308.
+ 12.5000 47873.7 266469.
+ 17.5000 173426. 183182.
+ 22.5000 44642.8 89776.7
+ 27.5000 10855.9 19342.3
+ 32.5000 -66104.5 54467.8
+ 37.5000 -147220. 140612.
+ 42.5000 -12275.5 14143.7
+ 47.5000 -10519.0 7128.02
+ 52.5000 -4190.33 5653.43
+ 57.5000 -5343.87 9673.83
+ 62.5000 -5816.07 4553.26
+ 67.5000 650.391 1934.23
+ 72.5000 5338.18 2070.85
+ 77.5000 2764.42 2549.14
+ 82.5000 887.366 415.865
+ 87.5000 7636.32 7477.50
+ 92.5000 920.085 672.539
+ 97.5000 2478.89 2551.36
+ 102.500 -92.9003 160.401
+ 107.500 2.33374 169.185
+ 112.500 -506.848 618.866
+ 117.500 1554.46 1344.49
+ 122.500 -1416.49 1297.91
+ 127.500 101.189 278.472
+ 132.500 131.838 144.699
+ 137.500 122.347 250.594
+ 142.500 -23.5210 103.884
+ 147.500 107.939 156.299
+ 152.500 237.048 235.800
+ 157.500 -261.982 297.770
+ 162.500 618.985 551.049
+ 167.500 -368.847 611.897
+ 172.500 0.469154 45.9234
+ 177.500 73.7506 62.3581
+ 182.500 110.386 64.2754
+ 187.500 17.6990 14.1745
+ 192.500 37.5703 56.7409
+ 197.500 343.973 347.240
+ 202.500 53.6650 37.8049
+ 207.500 111.599 121.777
+ 212.500 984.300 966.905
+ 217.500 38.3443 22.7436
+ 222.500 12.4393 19.5043
+ 227.500 8.13830 13.5077
+ 232.500 462.811 413.796
+ 237.500 48.0515 45.3033
+ 242.500 8.17075 5.79770
+ 247.500 69.5504 70.7596
+ 252.500 432.739 415.413
+ 257.500 1.00611 1.53514
+ 262.500 -17.3127 23.1000
+ 267.500 -0.644551 0.770489
+ 272.500 30.0640 30.0305
+ 277.500 57.9532 29.5615
+ 282.500 7.56567 5.29212
+ 287.500 -1.00390 1.72572
+ 292.500 4.66566 33.8822
+ 297.500 1.90443 1.71004
+ 302.500 -71.8005 69.0852
+ 307.500 290.084 271.562
+ 312.500 -35.0098 33.3771
+ 317.500 -67.5706 60.7374
+ 322.500 -241.938 267.103
+ 327.500 4.81175 4.38158
+ 332.500 0.903366 1.86864
+ 337.500 -1.39822 5.54677
+ 342.500 0.357344 1.10206
+ 347.500 -39.2447 36.1078
+ 352.500 0.829650 0.574876
+ 357.500 0.320821 0.189205
+ 362.500 6.30262 5.56558
+ 367.500 2.04314 1.73680
+ 372.500 93.1361 89.1996
+ 377.500 12.5324 11.3380
+ 382.500 1.30345 0.851456
+ 387.500 -1.62545 2.54482
+ 392.500 0.440437 0.380389
+ 397.500 31.2028 25.1991
+ 402.500 0.802748E-02 1.61319
+ 407.500 0.532959 0.710215
+ 412.500 7.24035 5.81060
+ 417.500 -0.776169E-01 0.173746
+ 422.500 0.294079 0.218984
+ 427.500 0.992080 0.953823
+ 432.500 0.713592E-01 0.945623E-01
+ 437.500 27.9156 26.3572
+ 442.500 1.26527 0.582340
+ 447.500 -0.569401E-01 0.132605
+ 452.500 -1.05194 1.06558
+ 457.500 1.45928 1.24266
+ 462.500 0.934566E-01 0.345115E-01
+ 467.500 0.615554 1.03698
+ 472.500 0.423918 0.400490
+ 477.500 0.151534E-02 0.116591E-01
+ 482.500 4.30216 3.86817
+ 487.500 0.423456 0.548314
+ 492.500 -0.431669 0.445487
+ 497.500 -0.234134E-01 0.296994E-01
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.96477E+07 AVGE = 0.40889E+00 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 3249300 U`flow = 0 O`flow = 789800"
+ SET TITLE SIZE -2
+ NEW PLOT
+
+ SET WINDOW Y 2.5 TO 7.
+ SET WINDOW X 2.5 TO 10.
+ SET SYMBOL 5O SIZE 1.8
+ TITLE TOP "pt6 distribution"
+ TITLE BOTTOM "pt6 "
+ TITLE LEFT "dS/dpt6 [fb]"
+ CASE " G"
+ SET SCALE Y lin
+ (SET TICKS TOP OFF)
+ SET LIMITS X 0.00000 500.00000
+ SET ORDER X Y DY
+ 2.50000 0.290405E+07 0.128399E+07
+ 7.50000 468574. 130526.
+ 12.5000 188346. 116393.
+ 17.5000 112065. 60700.8
+ 22.5000 130763. 106895.
+ 27.5000 31926.1 14709.0
+ 32.5000 53705.3 34582.5
+ 37.5000 44079.5 38144.7
+ 42.5000 215955. 178124.
+ 47.5000 12353.1 5800.92
+ 52.5000 8254.66 4246.60
+ 57.5000 10944.4 5274.56
+ 62.5000 2710.17 1713.44
+ 67.5000 3998.07 2305.54
+ 72.5000 780.317 372.697
+ 77.5000 1823.51 1241.69
+ 82.5000 1529.21 726.909
+ 87.5000 469.288 273.792
+ 92.5000 1862.60 1353.32
+ 97.5000 1680.31 775.393
+ 102.500 91.8247 43.6435
+ 107.500 152.701 114.301
+ 112.500 194.426 152.939
+ 117.500 1828.18 949.247
+ 122.500 206.194 130.606
+ 127.500 1742.15 1640.86
+ 132.500 273.380 130.837
+ 137.500 121.162 80.6891
+ 142.500 719.913 663.921
+ 147.500 304.873 208.958
+ 152.500 123.704 75.3583
+ 157.500 204.551 177.481
+ 162.500 82.6368 61.7276
+ 167.500 854.636 546.754
+ 172.500 198.903 112.801
+ 177.500 101.419 76.0254
+ 182.500 43.8764 36.5003
+ 187.500 230.452 212.772
+ 192.500 4.12768 2.34841
+ 197.500 290.542 231.763
+ 202.500 10.4905 8.29529
+ 207.500 3.36332 2.18525
+ 212.500 13.9539 9.85628
+ 217.500 5.77048 5.40666
+ 222.500 12.8870 4.80489
+ 227.500 32.2109 26.6398
+ 232.500 8.94806 7.07072
+ 237.500 15.2348 14.4479
+ 242.500 40.3947 30.9169
+ 247.500 8.71665 3.73116
+ 252.500 435.437 409.018
+ 257.500 0.282913 0.194244
+ 262.500 5.09780 2.60682
+ 267.500 0.469050 0.295037
+ 272.500 74.1637 70.3577
+ 277.500 366.790 345.340
+ 282.500 29.3583 23.4051
+ 287.500 5.46453 4.97731
+ 292.500 0.486372 0.209229
+ 297.500 304.207 288.328
+ 302.500 76.1008 69.3157
+ 307.500 108.970 94.3106
+ 312.500 3.84950 2.16504
+ 317.500 0.165245 0.128472
+ 322.500 4.67629 2.16677
+ 327.500 43.5712 31.9453
+ 332.500 0.895924E-01 0.343144E-01
+ 337.500 0.159782 0.749521E-01
+ 342.500 2.87236 2.08729
+ 347.500 4.75744 3.93312
+ 352.500 438.785 414.981
+ 357.500 0.211364 0.143881
+ 362.500 0.398733 0.220808
+ 367.500 3.39097 3.11684
+ 372.500 1.18190 0.775375
+ 377.500 0.953748E-01 0.646543E-01
+ 382.500 3.98057 2.57979
+ 387.500 0.357977 0.217009
+ 392.500 0.362446E-01 0.321145E-01
+ 397.500 0.206523 0.126199
+ 402.500 0.823135 0.720478
+ 407.500 0.621419E-01 0.217273E-01
+ 412.500 1.89365 1.65940
+ 417.500 0.435185E-01 0.363896E-01
+ 422.500 0.490904E-01 0.264211E-01
+ 427.500 28.3200 22.2269
+ 432.500 0.157644 0.134353
+ 437.500 7.95312 7.31954
+ 442.500 30.5247 26.1470
+ 447.500 0.808930 0.497769
+ 452.500 0.451493 0.422446
+ 457.500 0.399507E-01 0.249317E-01
+ 462.500 0.909495E-01 0.472712E-01
+ 467.500 0.242640E-01 0.207198E-01
+ 472.500 0.203005E-01 0.187095E-01
+ 477.500 0.169168 0.153060
+ 482.500 0.513826 0.402778
+ 487.500 6.23574 5.79646
+ 492.500 4.15695 3.88048
+ 497.500 0.284702 0.265465
+ PLOT
+
+ BOX 7. 0.75 SIZE 9. 1.5
+ SET WINDOW Y 0. TO 2.
+ SET TITLE SIZE -1.5
+ TITLE 2.8 1.2 "INTGRL = 0.21029E+08 AVGE = 0.85587E+01 RMS = 0.00000E+00"
+ TITLE 2.8 0.8 "Entries = 266900 U`flow = 0 O`flow = 163400"
+ SET TITLE SIZE -2
+ NEW PLOT
Index: dynnlo-v1.5-applgrid/bin/nnlo_dvegas_virt.grid
===================================================================
--- dynnlo-v1.5-applgrid/bin/nnlo_dvegas_virt.grid (revision 0)
+++ dynnlo-v1.5-applgrid/bin/nnlo_dvegas_virt.grid (revision 1338)
@@ -0,0 +1,72 @@
+
+ 03FC0355D0B0ECAEA3FC427BCA4C010A63FC72C15355631D83FC98E3A4AECDF4A
+3FCBAE2BC4888C4E3FCEBF62C376F8223FD095ADAF9E25EE3FD17AC5074A60493FD25B1F9B593F28
+3FD380C55909AFD73FD471A415F9B0D53FD53F792370FABD3FD6868F4F38D8AD3FD875B058516CCF
+3FD97CB8D610CF413FDA4CA70F91B5433FDB0DD0E815B43F3FDBF5825AF02C293FDD5F94F9AF3A84
+3FDEB963A749A5023FDFD7EA576C7C9C3FE0934B1CBAC7D23FE10CB71B5760DC3FE17ABB32598243
+3FE1E94FDF64E3A03FE26714FA951FB43FE2D8980B3968883FE357AD64ED642A3FE3EBB49B14AF3F
+3FE4FEA61CDFF4203FE5BDCE98CBF8793FE65F7B5CF0B1FC3FE6DD83E94B588C3FE73E1592B95ECC
+3FE7E648D9C5B89D3FE8A19C4665C6863FE96907361921B23FE9FF6C4F59B25D3FEA88E382D36873
+3FEAFEAE7A685AF13FEB56677E8EBBB23FEB8DBE3561C9A63FEBB33487C0F1863FEBD8AADA201966
+3FEBFE212C7F41473FECA42B326893153FED7B2065CE6E4F3FEE52159934498A3FEF290ACC9A24C4
+3FF0000000000000
+
+ 03F962B2481EC11983FA42E57673933733FAF5BD10FA0A6763FB52A4E4285791A
+3FBB3BFB8B9483EF3FC05AE36B51F0EB3FC30FA072F67B833FC5D562D2A881E03FC87F2F944DD1BF
+3FCB12C9DCE2A4F23FCECEDE337B9B9A3FD163FCDDEB53A53FD2F22CF623E1343FD457DCA3EBAA29
+3FD569B3D97E9AA03FD6A9A5747F97613FD8615F768C2ADA3FDA41AD7FBE52AE3FDBCDF769B20C76
+3FDDAD36D2895C943FDF814C25A4AC4D3FE09EBA67E2E96E3FE0E6FF972C50D93FE12A65664FA544
+3FE16DCB3572F9AF3FE1B6EA0241C50F3FE20A85EEA620DD3FE25E21DB0A7CAC3FE2B1BDC76ED87B
+3FE3033F198941AB3FE35399F0141B623FE3A3F4C69EF5193FE3F44F9D29CED03FE4BEC9281EFF71
+3FE5CE05BD44866B3FE6EC8F9D49DC613FE7EE96C1A66BA53FE8BCBEA36FA4863FE986B2CE57335C
+3FEA7F67458765C23FEB35C8C8A4162E3FEBB9869EC974903FEC255CFC1733423FECC76EA5EB6897
+3FEDA303AEDB5A2C3FEE6124C998AF4B3FEED2591A6765153FEF28B2CEE60AF83FEF85269E18421F
+3FF0000000000000
+
+ 03FA30168D522C2163FAE5A4203CE43DA3FB826275F60DD043FBC94424FCF2707
+3FC03082B035C1A43FC265AB0437F9CC3FC4C6D40640A1703FC6B2675C0D6E8A3FC73B5A713544CA
+3FC7C44D865D1B0B3FC84D409B84F14C3FC8FCEC9E12D0153FC9C37F5FD490CF3FCA8A1221965189
+3FCB58361631BBD73FCC6E20CCF87F1A3FCD840B83BF425E3FCE99F63A8605A23FD10204C0E46409
+3FD2EFDCD1D673B13FD468D4CD699AB53FD55D2BC36720A43FD680E60170FD213FD84E24B771B29C
+3FDAE8489D5E1DFE3FDD848BC6DA273B3FE0053C8766916B3FE0DACB7554BA753FE185D84CB8B715
+3FE262F1DAEB10103FE32203E24B5BF93FE3D9AF7E0A67DE3FE47EFDF20EEE1C3FE4E1DE59B2DC3E
+3FE57AB8D30B2C033FE654DB9E16623C3FE76DAFC542091B3FE8316CA61A8A983FE897603303D9D8
+3FE91AC3A608E3623FE9B6A09AFA7D613FEA60592FA39CA43FEB125DC3A2A94A3FEBE743D60B2647
+3FECE6A8E082692D3FED62401ABB997B3FEDD985CBCBD0D73FEE67FF3D102BE73FEF1D21265F4614
+3FF0000000000000
+
+ 03F96409F263268B23FA462A08C23F72C3FACDF57F5F9403B3FB3F7B75495A802
+3FB9264FD8A24B923FBD97809A8FA44F3FC2831E2C2136E63FC56247B209274A3FC7FBF2A06A8AB4
+3FCA85435E1ED4D83FCCEF2F013B97993FCF181293DF45AA3FD091188D833EF83FD1A61F8F0E07F8
+3FD2B1E7CE63C0CA3FD390BAA1EBF94B3FD48D83C95ECBC33FD602BE81CE0CE73FD990BF647B696F
+3FDB283CD67A80C63FDC79DAB7C685EA3FDDD2336D5BA2CC3FDF4E2723CCEA9B3FE06AD906CFDDD3
+3FE0F5033FCDE8E83FE2222C4869540B3FE39E1752E8ACB53FE4E74538EE20AE3FE5836431FF9705
+3FE612606C0BAD8D3FE6C25D181A5C153FE789ADFED8A4613FE891203579B9713FE98C82908E9A77
+3FEA65048E289E553FEB3696151A9A9A3FEB65F6BCA71F6C3FEB95576433A43D3FEBC4B80BC0290F
+3FEBFD7FFED5F7593FEC40BD807470FF3FEC83FB0212EAA63FECC73883B1644C3FED21B58DC6EA67
+3FED7D569B464A063FEDD8F7A8C5A9A53FEE4B17DB355B2F3FEED00EA67A68A03FEF32A02BFB8FC8
+3FF0000000000000
+
+ 03F8D64C0FF2231CD3FA103BC65574EE23FB0748571BA27583FB83DFAD042D89D
+3FBEFB9FD087DD653FC25D930838D2C63FC5BA638894570C3FC6E3C4054DDF4B3FC796A30035B32F
+3FC84981FB1D87133FC8FCE1A220DF733FC9B1C0BC639A053FCA669FD6A654973FCB1B7EF0E90F28
+3FCBDB42AB8547D63FCCA0BC1B633D893FCD66358B41333B3FCE628B600F46073FD15FEEA04B6C3A
+3FD3B66B3B69DE673FD5661ABEFD3BAE3FD6C18480F917C53FD7D03ED704B1EA3FD8D83EECE119E0
+3FDA27C562077ACB3FDB93534F34296C3FDDD09C70BB724B3FE058B0F4EC5FD23FE1E67B21A2239B
+3FE335B3F1C790303FE47E07C0F5EF933FE5A56A788F4C053FE641469A288ABF3FE6A7B593318067
+3FE70ABD4EFD07893FE780BA10C58E613FE7D19BD2C07B8F3FE830E557961A223FE8CEECCBADB31A
+3FE97C9F112E84AF3FEA183BA8C4F9063FEA754BB4D1E8743FEADD8183A52A983FEB55E459DDF4C3
+3FEBD12417D1CC703FEC75917A1470513FED28F68C5062213FEDD469B898C9653FEE9890F683D4D7
+3FF0000000000000
+
+ 03FA3A4826810F7C33FADE02F8F0DBF743FB41B1BBA2F64EC3FB9FAB2C1E2B4D2
+3FC0A2E0DB2DA0C93FC4502BF5E4ADBD3FC6E5E5DA83CCB53FC90740B41768DF3FCBE2724F9688CD
+3FCF37218CE066683FD14BA77D5E73313FD3161282441DBA3FD54808881A242A3FD741159B69C705
+3FD9119E491844353FDAC83D2ADD17833FDBF5887A617D943FDD04E321BCF9C93FDEAA599B01E89F
+3FE029D545DEA8F43FE0E4181E39C3293FE1927AFE4CD1923FE21D586619EE763FE2AA7EA288F5B6
+3FE32EE3327C79623FE39884D99CFCFB3FE406AA8A96F45B3FE49C8CBCAB3AB63FE558CD615B9EB4
+3FE608F718691F173FE6427CCA2493443FE67C027BE007703FE6B5882D9B7B9D3FE6EB01DA9E7F50
+3FE71D75677E4A6B3FE74FE8F45E15873FE7825C813DE0A23FE7A7D29170DC8C3FE7CB85826736FA
+3FE7EF38735D91683FE825B537238F823FE89A7DFA4FED333FE92352FBABB6313FE9A7002E84CC50
+3FEA2F3E3BB48D5B3FEAD3CBC7C7A5F63FEBC2A257E8BC5B3FECAF80991BAFEA3FEE36B2114F5B28
+3FF0000000000000

File Metadata

Mime Type
text/x-diff
Expires
Wed, May 14, 11:29 AM (13 h, 13 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ac/8a/1edaf373e982237c1fe6bbda7eec
Default Alt Text
(2 MB)

Event Timeline