Page MenuHomeHEPForge

No OneTemporary

Size
660 KB
Referenced Files
None
Subscribers
None
This file is larger than 256 KB, so syntax highlighting was skipped.
Index: FeynRulesInterface/README
===================================================================
--- FeynRulesInterface/README (revision 0)
+++ FeynRulesInterface/README (revision 3973)
@@ -0,0 +1,32 @@
+This directory contains the preliminary interface between FeynRules and
+WHIZARD. Please use the provided install.sh script to install the interface
+into a FeynRules 1.4.0 - 1.4.8 tree (which is the most recent version at the time
+of writing).
+
+The interface can be accessed via WriteWOOutput in the same way as the other
+interfaces already provided with FeynRules. In addition to the common interface
+options, it also takes some special options like e.g. WOWhizardVersion. To get a
+list of all the options, use
+
+ ?WO*
+
+in a FeynRules session, and a description of any particular option can be
+obtained via "?" in the usual way, e.g.
+
+ ?WOWhizardVersion
+
+The interface can generate output for WHIZARD versions 1.92, 1.93 and 2.0 (the
+latter being the default). The output for both 1.9x and 2.0 is complete and has
+been verified for a number of model.
+
+If you are generating output for 1.9x, use the "inject" script (which is
+copied to the output) directory to merge the generated model files into
+the WHIZARD tree. After reconfiguring WHIZARD, the new models can be used just
+like the built-in ones.
+
+In order to use the interface with WHIZARD2, you need at least 2.0.rc4 (or
+a SVN checkout of >= r2034). In the FeynRules output directory, perform the usual
+"./configure; make clean; make install" magic to install the model files into
+~/.whizard (see "configure --help", especially the part on WO_CONFIG, if
+WHIZARD is not included in $PATH). After "make install", the generated models
+can be used like the built-in ones.
Index: FeynRulesInterface/examples/wo_test_sm_1.92.m
===================================================================
--- FeynRulesInterface/examples/wo_test_sm_1.92.m (revision 0)
+++ FeynRulesInterface/examples/wo_test_sm_1.92.m (revision 3973)
@@ -0,0 +1,4 @@
+$FeynRulesPath = SetDirectory["."];
+<< FeynRules`;
+LoadModel["Models/SM/SM.fr"];
+WriteWOOutput[LSM, WOWhizardVersion->"1.92"];
Index: FeynRulesInterface/examples/wo_test_sm_1.93.m
===================================================================
--- FeynRulesInterface/examples/wo_test_sm_1.93.m (revision 0)
+++ FeynRulesInterface/examples/wo_test_sm_1.93.m (revision 3973)
@@ -0,0 +1,4 @@
+$FeynRulesPath = SetDirectory["."];
+<< FeynRules`;
+LoadModel["Models/SM/SM.fr"];
+WriteWOOutput[LSM, WOWhizardVersion->"1.93"];
Index: FeynRulesInterface/examples/wo_test_sm_2.00.m
===================================================================
--- FeynRulesInterface/examples/wo_test_sm_2.00.m (revision 0)
+++ FeynRulesInterface/examples/wo_test_sm_2.00.m (revision 3973)
@@ -0,0 +1,4 @@
+$FeynRulesPath = SetDirectory["."];
+<< FeynRules`;
+LoadModel["Models/SM/SM.fr"];
+WriteWOOutput[LSM, WOWhizardVersion->"2.0"];
Index: FeynRulesInterface/install.sh
===================================================================
--- FeynRulesInterface/install.sh (revision 0)
+++ FeynRulesInterface/install.sh (revision 3973)
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+die() {
+ [ -n "$1" ] && echo $1
+ exit 1
+}
+
+mrmkdir() {
+ echo "creating directory \"$1\" ..."
+ mkdir -p "$1" || die "ERROR creating directory \"$1\" !"
+}
+
+mrcp() {
+ echo "copying file \"$1\" to \"$2\" ..."
+ cp "$1" "$2" || die "ERROR copying file \"$1\" !"
+}
+
+usage() {
+ test -n "$1" && echo "$1"
+ cat << EOI
+usage: install.sh [options] path_to_feyrules
+
+valid options are:
+
+ -h, --help : show this help screen
+ -f, --force : override version check
+EOI
+ test -n "$1" && exit 1
+ exit
+}
+
+if test -z "$1"; then
+ usage
+fi
+
+while test -z "$break"; do
+ case $1 in
+ "-h"|"--help") usage ;;
+ "-f"|"--force") force=1 ;;
+ *)
+ test -z "$2" || usage "unknown option: \"$1\""
+ break=1
+ ;;
+ esac
+ test -z "$break" && shift
+done
+
+[ -f "./FeynRulesPackage.patch" ] || die \
+ "ERROR: please call from the FeynRules installation directory!"
+
+[ -f "$1/FeynRulesPackage.m" ] || die \
+ "ERROR: \"$1\" does not point to a FeynRules installation!"
+
+vstring=`grep 'FR$VersionNumber =' "$1/FeynRulesPackage.m" |
+ sed 's/^ *FR\$VersionNumber *= *"\(.*\)";/\1/'`
+test -z "$force" && test `echo $vstring | sed "s/\.//g"` -ge 149 && die \
+ 'ERROR: Unsupported FeynRules version - please use 1.4.0 - 1.4.8
+(or try "-f" to override the versio check)!'
+
+[ -f "$1/Interfaces/WhizardOmegaInterface.m" ] && die \
+ "ERROR: Interface is already installed, please use a fresh FeynRules installation!"
+
+#
+cat <<EOI
+copying files...
+===
+EOI
+dirs=`find ./Interfaces -not -regex '.*\.svn.*' -type d`
+files=`find ./Interfaces -not -regex '.*\.svn.*' -type f`
+efiles=`find ./examples -not -regex '.*\.svn.*' -type f`
+for dir in $dirs; do
+ [ -d "$1/$dir" ] || mrmkdir "$1/$dir"
+done
+for file in $files; do
+ mrcp "$file" "${1%/}/${file%/*}"
+done
+for file in $efiles; do
+ mrcp "$file" "$1"
+done
+
+#
+cat <<EOI
+===
+
+patching files...
+===
+EOI
+patch -d "$1" -p1 < "FeynRulesPackage.patch" || die \
+ "ERROR applying patch"
+
+#
+cat << EOI
+===
+
+... all done! In order to verify the installation, you can run the examples
+which have been copied to "$1" like e.g.
+
+ cd "$1"
+ math < wo_test_sm_1.93.m
+
+(remember to wipe StandardModelWO prior to running any of the tests).
+EOI
Property changes on: FeynRulesInterface/install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmegaInterface.m
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmegaInterface.m (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmegaInterface.m (revision 3973)
@@ -0,0 +1,164 @@
+(*
+
+ $Id$
+
+ This is the sugar coating of WOMathematicaInterface.m which restores its
+ functionality as a FR interface.
+
+ Christian Speckner, 2011
+*)
+
+Catch[Module[{path, importedopts, importedmisc, symrules},
+
+ (* We override those. *)
+ WO`HC[p_] := HC[p] /. {Dot[x_,Ga[0]] :> x, Dot[Ga[0], x_] :> x};
+
+ (* Try to load the module. *)
+ WO`InterfacePath = Null;
+ If[StringQ[Global`$WOInterfacePath] && Length[FileNames[
+ {"WOMathematicaInterface.m"}, Global`$WOInterfacePath]] == 1,
+ WO`InterfacePath = Global`$WOInterfacePath
+ ];
+ If[!StringQ[WO`InterfacePath] && StringQ[Global`$FeynRulesPath] && Length[FileNames[
+ {"WOMathematicaInterface.m"},
+ path = ToFileName[{Global`$FeynRulesPath, "Interfaces", "WhizardOmega"}]]] == 1,
+ WO`InterfacePath = path
+ ];
+ If[!StringQ[WO`InterfacePath], Throw[Null, "Unable to locate WOMathematicaInterface.m"]];
+ Get[ToFileName[WO`InterfacePath, "WOMathematicaInterface.m"]];
+
+ (* Version check *)
+ If[WO`APIversion != 2, Throw[Null, "Invalid API version."]];
+
+ (* Import the options for WriteWOOutput. *)
+ importedopts = {
+ "WOModelName", "WOMaxNcf", "WOGauge", "WOGaugeParameter", "WOVerbose",
+ "WOAutoGauge", "WOMaxCouplingsPerFile",
+ "WORunParameters", "WOOplotter", "WOFast", "WOWhizardVersion", "WOProgress"
+ };
+ importedmisc = {"WOUnitarity", "WOFeynman", "WORxi"};
+ symrules = (
+ MessageName[Evaluate[Symbol["FeynRules`" <> #]], "usage"] = MessageName[Evaluate[Symbol["WO`" <> #]], "usage"];
+ Protect[Evaluate[Symbol["FeynRules`" <> #]]];
+ Evaluate[Symbol["FeynRules`" <> #]] -> Evaluate[Symbol["WO`" <> #]]
+ )& /@ Join[importedopts, importedmisc];
+ Options[FeynRules`WriteWOOutput] = Join[(Symbol["FeynRules`" <> #] -> (Symbol["FeynRules`" <> #]
+ /. symrules /. Options[WO`WriteOutput]) /. (symrules /. Rule[a_, b_] :> Rule[b, a]))&
+ /@ importedopts, {Input -> Null, Output -> Null}
+ ];
+
+ (* Dito, but for WriteWOExtParams. *)
+ Options[FeynRules`WriteWOExtParams] =
+ {FeynRules`WOWhizardVersion -> (FeynRules`WOWhizardVersion /. Options[FeynRules`WriteWOOutput])};
+
+ (* Frontend to WO`WriteOutput *)
+ FeynRules`WriteWOOutput[lags___, options___] :=
+ FeynRules`WriteWOOutput[{lags}, options] /;
+ (And @@ ((Head[#] =!= Rule &) /@ {lags})) &&
+ (And @@ ((Head[#] === Rule &)/@ {options})) &&
+ (And @@ ((Head[#] =!= List &) /@ {lags}));
+ FeynRules`WriteWOOutput[lags_List, options___] := Module[{
+ fropts, backendopts, knownopts, unknownopts, vlist, modelname, opts, Addpar, output
+ },
+
+
+ (* Disentangle the different options. I. *)
+ opts = {options};
+ fropts = Select[opts, !FreeQ[#[[1]]& /@ Options[FeynmanRules], #[[1]]]&];
+ knownopts = #[[1]]& /@ Join[Options[WriteWOOutput], Options[FeynmanRules]];
+ unknownopts = Select[#[[1]]& /@ opts, FreeQ[knownopts, #]&];
+ If[Length[unknownopts] > 0,
+ Print["ERROR: unknown option(s): " <> WO`Concat[ToString /@ unknownopts, " , "]];
+ Return[Null];
+ ];
+
+ (* Prepare options to FeynmanRules. *)
+ Addpar[Rule[par_, val_]] := If[FreeQ[fropts, par], AppendTo[fropts, par -> val]];
+ Addpar[ScreenOutput -> False];
+ If[Length[Names["FeynRules`FlavorExpansion"]] == 0,
+ Addpar[FlavorExpand -> True]
+ ,
+ Addpar[FlavorExpand -> FR$AutoFlavorExpand]
+ ];
+
+ (* Advertisement. *)
+ Print[" - - - FeynRules interface to WHIZARD/O'Mega - - -"];
+ Print[" - - - Authors: C. Speckner, N. Christensen - - -"];
+ Print[" - - - Please cite arXiv:1010.3251 - - -"];
+ Print[""];
+
+ (* The model name - we have our own default here.*)
+ modelname = If[FreeQ[#[[1]]& /@ opts, FeynRules`WOModelName],
+ "fr_" <> ToString[M$ModelName]
+ ,
+ WOModelName /. opts
+ ];
+ opts = Select[opts, (#[[1]] =!= FeynRules`WOModelName)&];
+
+ (* Output directory *)
+ output = If[FreeQ[#[[1]]& /@ opts, Output], {}, {WO`WOOutputDir -> Output} /. opts];
+
+ (* Create vertex list. *)
+ vlist = Input /. opts /. ParamRules;
+ If[Head[vlist] =!= List,
+ (* We put this on hold to allow the backend to check the settings for consistency
+ before doing the expensive generation of the vertex list. *)
+ fropts /. List[pars__] :> (vlist = Hold[Module[{list},
+ Print["---"];
+ Print["Calculating feynman rules..."];
+ FeynRules`FR$AbbIndexSumExpanded = {};
+ list = FeynRules`MergeVertices @@ (FeynRules`FeynmanRules[#, pars]& /@ lags);
+ If[Length[Names["FeynRules`FlavorExpansion"]] > 0,
+ Print["Expanding flavors..."];
+ list = Symbol["FeynRules`FlavorExpansion"][list]
+ ];
+ WO`VertexRules = (#[[1]] -> #[[2]])& /@ FeynRules`FR$AbbIndexSumExpanded;
+ Print["---"];
+ list /. FeynRules`ParamRules
+ ]]);
+ ,
+ If[Head[FR$AbbIndexSumExpanded] === List,
+ WO`VertexRules = (#[[1]] -> #[[2]])& /@ FeynRules`FR$AbbIndexSumExpanded];
+ ];
+
+ (* Call backend. *)
+ backendopts = Join[
+ Select[opts /. symrules, !FreeQ[#[[1]]& /@ Options[WO`WriteOutput], #[[1]]]&]
+ ,
+ {WO`WOModelName -> modelname, WO`WOVertexList -> vlist,
+ WO`WOMassList -> MassList[[2]] /. {NoValue[x_] :> x, NoPDG[x_] :> x} /. ParamRules,
+ WO`WOWidthList -> WidthList[[2]] /. {NoValue[x_] :> x, NoPDG[x_] :> x} /. ParamRules,
+ WO`WOPartList -> PartList /. {NoValue[x_] :> x, NoPDG[x_] :> x} /. ParamRules,
+ WO`WOEParamList -> EParamList /. NoValue[x_] :> x /. ParamRules,
+ WO`WOIParamList -> IParamList /. NoValue[x_] :> x /. ParamRules,
+ WO`WOExtraComment -> ("FeynRules model: " <> ToString[M$ModelName] <> "\n"
+ <> "FeynRules version: " <> ToString[FR$VersionNumber])}
+ , output];
+
+ backendopts /. {o___} :> WO`WriteOutput[o];
+ ];
+ FeynRules`WriteWOOutput::usage = "Write WHIZARD / O'Mega model files.";
+ Protect[FeynRules`WriteWOOutput];
+
+ (* The frontend to WO`WriteExtParams. *)
+ FeynRules`WriteWOExtParams[file_String, opts___] := Module[{unknownopts},
+ (* Check options. *)
+ If[Length[unknownopts =
+ Select[#[[1]]& /@ {opts}, FreeQ[#[[1]]& /@ Options[FeynRules`WriteWOExtParams], #]&]],
+ Print["ERROR: unknown option(s): " <> WO`Concat[ToString /@ unknownopts, " , "]];
+ Return[Null];
+ ];
+
+ (* Call WO`WriteExtParams *)
+ Join[{opts} /. symrules, {
+ WO`WOModelName -> ToString[M$ModelName],
+ WO`WOEParamList -> EParamList /. NoValue[x_] :> x /. ParamRules,
+ WO`WOMassList -> MassList[[2]] /. NoValue[x_] :> x /. ParamRules,
+ WO`WOWidthList -> WidthList[[2]] /. NoValue[x_] :> x /. ParamRules
+ }] /. {x___} :> WO`WriteExtParams[file, x];
+ ];
+ FeynRules`WriteWOExtParams[opts___] := FeynRules`WriteWOExtParams["", opts];
+ FeynRules`WriteWOExtParams::usage = "Write parameter file for WHIZARD.";
+ Protect[FeynRules`WriteWOExtParams];
+
+], _?StringQ, Print[#2 <> "\nERROR initializing Whizard / O'Mega interface."]&];
Property changes on: FeynRulesInterface/Interfaces/WhizardOmegaInterface.m
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmega/1.92/omega.feynrules.patch
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/1.92/omega.feynrules.patch (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/1.92/omega.feynrules.patch (revision 3973)
@@ -0,0 +1,129 @@
+diff --recursive -u a/src/.depend b/src/.depend
+--- a/src/.depend 2009-06-14 21:58:40.000000000 +0200
++++ b/src/.depend 2009-06-14 23:19:14.000000000 +0200
+@@ -333,3 +333,16 @@
+ ogiga.cmx: thoList.cmx thoGWindow.cmx thoGMenu.cmx thoGDraw.cmx \
+ thoGButton.cmx targets.cmx rCS.cmx omega.cmx momentum.cmx models.cmx \
+ model.cmi fusion.cmx coupling.cmi color.cmx
++
++# FeynRules preliminary
++$(FR_MODULES:.ml=.cmi) : model.cmi coupling.cmi
++
++$(FR_MODULES:.ml=.cmo) : thoList.cmi rCS.cmi product.cmi options.cmi model.cmi \
++ coupling.cmi combinatorics.cmi color.cmi $(FR_MODULES:.ml=.cmi)
++
++$(FR_MODULES:.ml=.cmx) : thoList.cmx rCS.cmx product.cmx options.cmx model.cmi \
++ coupling.cmi combinatorics.cmx color.cmx $(FR_MODULES:.ml=.cmi)
++
++$(FR_BINARIES:.ml=.cmo) : targets.cmo omega.cmo $(FR_MODULES:.ml=.cmo) fusion.cmo colorize.cmo
++
++$(FR_BINARIES:.ml=.cmx) : targets.cmx omega.cmx $(FR_MODULES:.ml=.cmx) fusion.cmx colorize.cmx
+diff --recursive -u a/src/Makefile.src b/src/Makefile.src
+--- a/src/Makefile.src 2009-06-14 22:00:50.000000000 +0200
++++ b/src/Makefile.src 2009-06-14 23:16:58.000000000 +0200
+@@ -38,6 +38,11 @@
+ MODEL_MODULES =
+ endif
+
++# Feynrules preliminary
++FR_MODULES = $(shell find . -name 'fr*.ml')
++FR_BINARIES = $(shell find . -name 'f90_fr*.ml')
++
++
+ MODULES = \
+ pmap.ml thoList.ml thoArray.ml thoString.ml rCS.ml \
+ cache.ml trie.ml lapack.ml linalg.ml \
+@@ -51,7 +56,8 @@
+ oVM.ml whizard.ml \
+ comphep_syntax.ml comphep_lexer.mll comphep_parser.mly comphep.ml \
+ $(MODEL_MODULES) colorize.ml \
+- omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml
++ omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml \
++ $(FR_MODULES)
+
+ GUI_MODULES = \
+ thoGButton.ml thoGWindow.ml thoGMenu.ml thoGDraw.ml
+@@ -79,7 +85,8 @@
+ f90_Simplest f90_Simplest_univ \
+ f90_Xdim f90_GravTest \
+ f90_SM_km f90_UED f90_Zprime \
+- f90_Template
++ f90_Template \
++ $(FR_BINARIES:.ml=)
+
+ # Colorized for WHiZard
+ PROGRAMS_released += \
+diff --recursive -u a/src/colorize.ml b/src/colorize.ml
+--- a/src/colorize.ml 2009-08-04 17:25:28.000000000 +0200
++++ b/src/colorize.ml 2009-08-04 17:26:34.000000000 +0200
+@@ -102,6 +102,8 @@
+ | Prop_Majorana -> Prop_Col_Majorana (* Spin 1/2 octets. *)
+ | Prop_Feynman -> Prop_Col_Feynman (* Spin 1 states, massless. *)
+ | Prop_Unitarity -> Prop_Col_Unitarity (* Spin 1 states, massive. *)
++ | Prop_Gauge x -> Prop_Col_Gauge x
++ | Prop_Rxi x -> Prop_Col_Rxi x
+ | _ -> failwith ("Colorize.It().colorize_propagator: not possible!")
+
+ let propagator = function
+diff --recursive -u a/src/coupling.mli b/src/coupling.mli
+--- a/src/coupling.mli 2009-08-04 17:25:28.000000000 +0200
++++ b/src/coupling.mli 2009-08-04 17:26:34.000000000 +0200
+@@ -130,7 +130,7 @@
+ | Prop_Unitarity | Prop_Feynman | Prop_Gauge of 'a | Prop_Rxi of 'a
+ | Prop_Tensor_2 | Prop_Vectorspinor
+ | Prop_Col_Scalar | Prop_Col_Feynman | Prop_Col_Majorana
+- | Prop_Col_Unitarity
++ | Prop_Col_Unitarity | Prop_Col_Gauge of 'a | Prop_Col_Rxi of 'a
+ | Aux_Scalar | Aux_Vector | Aux_Tensor_1
+ | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
+ | Only_Insertion
+diff --recursive -u a/src/targets.ml b/src/targets.ml
+--- a/src/targets.ml 2009-08-04 17:25:28.000000000 +0200
++++ b/src/targets.ml 2009-08-04 17:26:34.000000000 +0200
+@@ -1430,8 +1430,12 @@
+ | Prop_Col_Feynman ->
+ printf "(-1.0_omega_prec/3.0_omega_prec) * pr_feynman(%s," p
+ | Prop_Gauge xi -> printf "pr_gauge(%s,%s," p (M.gauge_symbol xi)
++ | Prop_Col_Gauge xi ->
++ printf "(-1.0_omega_prec/3.0_omega_prec) * pr_gauge(%s,%s," p (M.gauge_symbol xi)
+ | Prop_Rxi xi ->
+ printf "pr_rxi(%s,%s,%s,%s," p m w (M.gauge_symbol xi)
++ | Prop_Col_Rxi xi ->
++ printf "(-1.0_omega_prec/3.0_omega_prex) * pr_rxi(%s,%s,%s,%s," p m w (M.gauge_symbol xi)
+ | Prop_Tensor_2 -> printf "pr_tensor(%s,%s,%s," p m w
+ | Prop_Vectorspinor -> printf "pr_grav(%s,%s,%s,"
+ p m w
+@@ -1459,8 +1463,8 @@
+ printf "(-1.0_omega_prec/3.0_omega_prec) * pj_unitarity(%s,%s,%s," p m gamma
+ | Prop_Feynman | Prop_Col_Feynman ->
+ invalid_arg "no on-shell Feynman propagator!"
+- | Prop_Gauge xi -> invalid_arg "no on-shell massless gauge propagator!"
+- | Prop_Rxi xi -> invalid_arg "no on-shell Rxi propagator!"
++ | Prop_Gauge _ | Prop_Col_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!"
++ | Prop_Rxi _ | Prop_Col_Rxi _ -> invalid_arg "no on-shell Rxi propagator!"
+ | Prop_Vectorspinor -> printf "pj_grav(%s,%s,%s," p m gamma
+ | Prop_Tensor_2 -> printf "pj_tensor(%s,%s,%s," p m gamma
+ | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
+@@ -1483,8 +1487,8 @@
+ | Prop_Unitarity -> printf "pg_unitarity(%s,%s,%s," p m gamma
+ | Prop_Feynman | Prop_Col_Feynman ->
+ invalid_arg "no on-shell Feynman propagator!"
+- | Prop_Gauge xi -> invalid_arg "no on-shell massless gauge propagator!"
+- | Prop_Rxi xi -> invalid_arg "no on-shell Rxi propagator!"
++ | Prop_Gauge _ | Prop_Col_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!"
++ | Prop_Rxi _ | Prop_Col_Rxi _ -> invalid_arg "no on-shell Rxi propagator!"
+ | Prop_Tensor_2 -> printf "pg_tensor(%s,%s,%s," p m gamma
+ | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
+ | Aux_Vector | Aux_Tensor_1 -> printf "("
+@@ -4557,8 +4561,11 @@
+ failwith "print_fusion: Prop_Col_Feynman not implemented yet!"
+ | Prop_Gauge xi ->
+ failwith "print_fusion: Prop_Gauge not implemented yet!"
++ | Prop_Col_Gauge _ -> failwith "print_fusion: Prop_Col_Gauge not implemented yet!"
+ | Prop_Rxi xi ->
+ failwith "print_fusion: Prop_Rxi not implemented yet!"
++ | Prop_Col_Rxi _ ->
++ failwith "print_fusion: Prop_Col_Rxi not implemented yet!"
+ | Prop_Vectorspinor ->
+ failwith "print_fusion: Prop_Vectorspinor not implemented yet!"
+ | Prop_Tensor_2 -> propagate ovm_PROPAGATE_TENSOR2
Index: FeynRulesInterface/Interfaces/WhizardOmega/1.92/whizard.feynrules.patch
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/1.92/whizard.feynrules.patch (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/1.92/whizard.feynrules.patch (revision 3973)
@@ -0,0 +1,123 @@
+diff -u --recursive a/bin/make-include.pl.in b/bin/make-include.pl.in
+--- a/bin/make-include.pl.in 2009-06-11 03:32:45.000000000 +0200
++++ b/bin/make-include.pl.in 2009-06-11 03:32:27.000000000 +0200
+@@ -830,7 +830,8 @@
+ $inc_slha_prt .=
+ " call handle ($particle)\n";
+ $inc_slha_def_mass .=
+- " real(kind=default) :: $mass{$particle}\n";
++ " real(kind=default) :: $mass{$particle}\n"
++ unless ($inc_slha_def_mass =~ m/:: $mass{$particle}\n/);
+ $inc_slha_set_mass .=
+ " case ($particle); mass%$mass{$particle} = value\n";
+ $inc_slha_get_mass .=
+@@ -844,7 +845,8 @@
+ $inc_prt_widths .=
+ " case ($particle); width = par%$width{$particle}\n";
+ $inc_slha_def_decay .=
+- " real(kind=default) :: $width{$particle}\n";
++ " real(kind=default) :: $width{$particle}\n"
++ unless ($inc_slha_def_decay =~ m/:: $width{$particle}\n/);
+ $inc_slha_set_decay .=
+ " case ($particle); decay%$width{$particle} = value\n";
+ $inc_slha_get_decay .=
+diff -u --recursive a/omega-src/insert-color.pl.in b/omega-src/insert-color.pl.in
+--- a/omega-src/insert-color.pl.in 2009-06-11 03:33:51.000000000 +0200
++++ b/omega-src/insert-color.pl.in 2009-06-11 03:36:35.000000000 +0200
+@@ -1089,7 +1089,7 @@
+
+ foreach $prt (@prt) {
+ if ($prt =~ /^($col_pattern)$/) {
+- $prt =~ m/^\w+\/(\d)\/(\d)?$/;
++ $prt =~ m/^[\w\+\-~]+\/(\d)\/(\d)?$/;
+ # $prt =~ m/^\w+\/(\d)(\d)?$/;
+ $col = $1;
+ if ($col_index{$col}) {
+@@ -1101,9 +1101,9 @@
+ }
+ foreach $prt (@prt) {
+ if ($prt =~ /^($col_pattern|$acl_pattern)$/) {
+- $prt =~ s/^(\w+\/)(\d)(\/)$/$1$col_index{$2}\//;
+- $prt =~ s/^(\w+\/\/)(\d)$/$1$col_index{$2}/;
+- $prt =~ s/^(\w+\/)(\d)(\/)(\d)$/$1$col_index{$2}\/$col_index{$4}/;
++ $prt =~ s/^([\w\+\-~]+\/)(\d)(\/)$/$1$col_index{$2}\//;
++ $prt =~ s/^([\w\+\-~]+\/\/)(\d)$/$1$col_index{$2}/;
++ $prt =~ s/^([\w\+\-~]+\/)(\d)(\/)(\d)$/$1$col_index{$2}\/$col_index{$4}/;
+ ### OLD VERSION FOR EXPLICIT SCRIPTING
+ ### if ($prt =~ /^($col_pattern|$acl_pattern)$/) {
+ ### $prt =~ s/^(\w+\/)(\d)$/$1$col_index{$2}/;
+@@ -1127,13 +1127,13 @@
+
+ foreach $prt (@prt) {
+ if ($prt =~ /^($col_pattern)$/ and $prt =~ /^($acl_pattern)$/) {
+- $prt =~ /^\w+\/(\d)\/(\d)$/;
++ $prt =~ /^[\w\+\-~]+\/(\d)\/(\d)$/;
+ push @col, $1; push @acl, $2;
+ } elsif ($prt =~ /^($col_pattern)$/) {
+- $prt =~ /^\w+\/(\d)\/$/;
++ $prt =~ /^[\w\+\-~]+\/(\d)\/$/;
+ push @col, $1; push @acl, 0;
+ } elsif ($prt =~ /^($acl_pattern)$/) {
+- $prt =~ /^\w+\/\/(\d)$/;
++ $prt =~ /^[\w\+\-~]+\/\/(\d)$/;
+ push @acl, $1; push @col, 0;
+ } else {
+ push @col, 0; push @acl, 0;
+diff -ur a/bin/make-proc.pl.in b/bin/make-proc.pl.in
+--- a/bin/make-proc.pl.in 2009-09-05 23:41:02.000000000 +0200
++++ b/bin/make-proc.pl.in 2009-09-05 23:41:12.000000000 +0200
+@@ -117,6 +117,7 @@
+ ($omegabin_col = $omegabin) =~ s/\.opt/_Col.opt/;
+ if (-x "$omegabin" or -x "$omegabin_col") {
+ $omega_parameters = "$mdldir/parameters.$model.omega.f90";
++ $omega_parameters_stem = "$mdldir/parameters.$model.omega";
+ unless (-f $omega_parameters) {
+ print "$0: Can\'t find $omega_parameters -- disabling omega.\n";
+ $omega = "no";
+@@ -170,9 +171,22 @@
+ # Copy the model- and method-dependent files
+ unless ($keep_model) {
+ if ($omega ne "no") {
+- $stat = system ("cp", $omega_parameters,
+- "results/omega_parameters_whizard.f90");
+- $stat==0 or die "Can\'t copy $omega_parameters into results directory";
++ $omega_parameters_files = `ls $omega_parameters_stem*`;
++ @omega_parameters_files = split /\n/, $omega_parameters_files;
++ $omega_parameters_files = "";
++ foreach (@omega_parameters_files) {
++ my $target;
++ if (m/.*global.f90/)
++ {$target = "omega_parameters_whizard_global.f90"}
++ elsif (m/.*cpl(\d+).f90/)
++ {$target = "omega_parameters_whizard_cpl$1.f90"}
++ elsif (m/.*local.f90/)
++ {$target = "omega_parameters_whizard_local.f90"}
++ else {$target = "omega_parameters_whizard.f90"};
++ $omega_parameters_files .= "$target ";
++ system ("cp", $_, "results/$target") == 0 or die
++ "Can\'t copy $_ into the results directory";
++ }
+ }
+ }
+
+@@ -1506,7 +1520,7 @@
+
+ # List files
+ $src = "parameters.f90 file_utils.f90 process_interface.f90 ";
+- if ($omega ne "no") { $src .= "omega_parameters_whizard.f90 "; }
++ if ($omega ne "no") { $src .= "$omega_parameters_files"; }
+ foreach $ext(sort keys %ext) {
+ $src .= "$ext*.f90 ";
+ }
+diff -ur a/bin/make-include.pl.in b/bin/make-include.pl.in
+--- a/bin/make-include.pl.in 2010-01-12 12:30:34.000000000 +0100
++++ b/bin/make-include.pl.in 2010-01-12 12:30:42.000000000 +0100
+@@ -50,7 +50,7 @@
+ }
+
+ # The allowed lengths for parameter/particle strings
+-$len_parameter = 8;
++$len_parameter = 20;
+ $len_value = 20;
+ $len_particle = 20;
+ $len_chep_name = 6;
Index: FeynRulesInterface/Interfaces/WhizardOmega/all_19x/INSTALL
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/all_19x/INSTALL (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/all_19x/INSTALL (revision 3973)
@@ -0,0 +1,16 @@
+This directory contains model definitions for WHIZARD / O'Mega generated by the
+WHIZARD - FeynRules interface. In order to use them, please copy the necessary
+files to a WHIZARD 1.9x tree using the included "inject" script like
+
+ ./inject path/to/whizard
+
+Remember to reconfigure and recompile WHIZARD after this step.
+
+The script provides several command line options to accommodate special cases
+where the above procedure may not be enough. Please do
+
+ ./inject -h
+
+to see a list of all command line options. In particular, inject will not
+overwrite already existing files by default. This behavior can be overridden by
+using the "-f" option.
Index: FeynRulesInterface/Interfaces/WhizardOmega/all_19x/inject
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/all_19x/inject (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/all_19x/inject (revision 3973)
@@ -0,0 +1,248 @@
+#!/bin/sh
+
+# $Id$
+
+# TODO
+# - Make sure this is free of bashisms and runs on other implemetations of sh
+# without problems.
+
+# Print usage information
+usage() {
+ [ -n "$1" ] && echo $@
+ cat <<EOI
+Usage: inject [options] path
+
+Injects the WHIZARD/O'Mega model files generated by FeynRules into the
+respective program trees and applies the necessary patches if necessary. After
+this step, these models will work like the built-in ones. By default, "path"
+points to a WHIZARD installation, and both the WHIZARD and the integrated O'Mega
+tree will be patched.
+
+Options:
+
+--whizard-only WHIZARD only
+--omega-only O'Mega only, assume that "path" points to a O'Mega tree
+--no-patch just copy the model files, don't apply patches
+--patch-only just apply the patches, don't copy model files
+--force-patch try to apply patches even when the stamps suggest that this
+ already been done
+-f, --force force overwriting of existing model files (these get skipped
+ by default)
+--skip-check don't check whether "path" indeed points to a valid
+ installation
+--basedir dir look for the FeynRules output in "dir" (default: ".")
+--cleanup remove conflicting potentially files from the WHIZARD
+ directory
+-h, --help this help text
+EOI
+ [ -n "$1" ] && exit 1
+ exit
+}
+
+die() {
+ [ -n "$1" ] && echo $@
+ exit 1
+}
+
+# global variables
+cwd=`pwd`
+
+# Print usage if no parameters are given
+[ -z "$1" ] && usage
+
+# Setup variables
+basedir="."
+
+# Parse the command line
+while [ -n "$1" ]; do
+ case "$1" in
+ '-h'|'--help') usage;;
+ '--whizard-only') whizard_only=1;;
+ '--omega-only') omega_only=1;;
+ '--no-patch') no_patch=1;;
+ '--patch-only') patch_only=1;;
+ '-f'|'--force') force=1;;
+ '--skip_check') nocheck=1;;
+ '--force-patch') patch_force=1;;
+ '--cleanup') cleanup=1;;
+ '--basedir')
+ [ -z "$2" ] && usage "ERROR: \"--base-dir\" expects a path"
+ basedir="$2"
+ shift
+ ;;
+ *)
+ [ -z "$2" ] && destdir="$1" || die "ERROR: unknown option \"$1\""
+ ;;
+ esac
+ shift
+done
+
+delimiter="################################################################################"
+
+# Absolutify basedir
+cd $basedir
+basedir=`pwd`
+cd $cwd
+
+# Dito, but destdir
+[ -d "$destdir" ] || die "ERROR: \"$destdir\" is no directory!"
+cd $destdir || die "ERROR: can't change to \"$destdir\"!"
+destdir=`pwd`
+cd $cwd
+
+# Sanity checks
+[ -n "$omega_only" ] && [ -n "$whizard_only" ] && \
+ die "ERROR: --whizard-only and --omega-only don't go together..."
+
+# See what has do be done
+copy_whizard=""
+[ -z "$omega_only" ] && [ -z "$patch_only" ] && copy_whizard=1
+patch_whizard=""
+[ -z "$omega_only" ] && [ -z "$no_patch" ] && patch_whizard=1
+copy_omega=""
+[ -z "$whizard_only" ] && [ -z "$patch_only" ] && copy_omega=1
+patch_omega=""
+[ -z "$whizard_only" ] && [ -z "$no_patch" ] && patch_omega=1
+
+# Set paths
+if [ -n "$omega_only" ]; then
+ omegapath="$destdir"
+ whizpath=""
+elif [ -n "$whizard_only" ]; then
+ whizpath="$destdir"
+ omegapath=""
+else
+ whizpath="$destdir"
+ omegapath="$whizpath/omega-src/bundle"
+fi
+fr_whizdir="$basedir/whizard"
+fr_omegadir="$basedir/omega"
+fr_whizpatch="$basedir/whizard.feynrules.patch"
+fr_omegapatch="$basedir/omega.feynrules.patch"
+
+# Sanity check directories and files
+[ -n "$whizpath" ] && { [ -f "$whizpath/whizard.nw" ] \
+ || die "ERROR: \"$whizpath\" doesn' seem to contain a valid WHIZARD installation..."; }
+[ -n "$omegapath" ] && { [ -f "$omegapath/src/omega.ml" ] \
+ || die "ERROR: \"$omegapath\" doesn' seem to contain a valid O'Mega installation..."; }
+[ -n "$copy_whizard" ] && { [ -d "$fr_whizdir" ] \
+ || die "ERROR \"$fr_whizdir\" not found!"; }
+[ -n "$patch_whizard" ] && { [ -f "$fr_whizpatch" ] \
+ || die "ERROR \"$fr_whizpatch\" not found!"; }
+[ -n "$copy_omega" ] && { [ -d "$fr_omegadir" ] \
+ || die "ERROR \"$fr_omegadir\" not found!"; }
+[ -n "$patch_omega" ] && { [ -f "$fr_omegapatch" ] \
+ || die "ERROR \"$fr_omegapatch\" not found!"; }
+
+# Patch WHIZARD if desired
+if [ -n "$patch_whizard" ]; then
+ echo $delimiter
+ echo
+ echo "Patching WHIZARD..."
+ if [ -f "$whizpath/patched.feynrules.stamp" ] && [ -z "$patch_force" ]; then
+ echo "...seems like WHIZARD is already patched."
+ else
+ cd $whizpath
+ patch -p1 < $fr_whizpatch || { cd $cwd; die "ERROR applying the WHIZARD patch!"; }
+ touch patched.feynrules.stamp
+ echo "...done. Remember to (re)run configure for the changes to take effect."
+ fi
+ echo
+
+fi
+
+# Copy the WHIZARD model files if desired
+if [ -n "$copy_whizard" ]; then
+ echo $delimiter
+ echo
+ echo "Copying WHIZARD files to \"$whizpath/conf/models\":"
+ for file in `ls $fr_whizdir`; do
+ if [ -f "$whizpath/conf/models/$file" ] && [ -z "$force" ]; then
+ echo " \"$file\" already exists in destination directory, skipping..."
+ skipped=1
+ else
+ echo " copying \"$file\"..."
+ cp "$fr_whizdir/$file" "$whizpath/conf/models" || die "ERROR copying file!"
+ fi
+ done
+ # Check for potential conflicts with existing files
+ for file in `ls $fr_whizdir/*cpl1.f90`; do
+ file="${file##*/}"
+ filepat="-name ${file%cpl1.f90}cpl[0-9].f90"
+ filepat="$filepat -or -name ${file%cpl1.f90}cpl[0-9][0-9].f90"
+ filepat="$filepat -or -name ${file%cpl1.f90}cpl[0-9][0-9][0-9].f90"
+ for file2 in `find $whizpath/conf/models $filepat`; do
+ if [ ! -f "$fr_whizdir/${file2##*/}" ]; then
+ if [ -z "$cleanup" ]; then
+ conflicts="$conflicts $file2"
+ else
+ echo " deleting \"$file2\"..."
+ rm -f $file2 || die "ERROR deleting file!"
+ fi
+ fi
+ done
+ done
+ echo "Done. Please recompile WHIZARD for any changes to the model files to take effect."
+ echo
+ if [ -n "$conflicts" ]; then
+ cat <<EOI
+WARNING: conflicting files have been found in the target directory which might
+ screw up the WHIZARD compile. The conflicting files are:
+
+EOI
+ for file in $conflicts; do
+ echo $file
+ done
+ echo
+ fi
+fi
+
+# Patch O'Mega if desired
+if [ -n "$patch_omega" ]; then
+ echo $delimiter
+ echo
+ echo "Patching O'Mega..."
+ if [ -f "$omegapath/patched.omega.stamp" ] && [ -z "$patch_force" ]; then
+ echo "...seems like O'Mega is already patched."
+ else
+ cd $omegapath
+ patch -p1 < $fr_omegapatch || { cd $cwd; die "ERROR applying the WHIZARD patch!"; }
+ touch patched.omega.stamp
+ fi
+ echo
+fi
+
+# Copy the O'Mega model files if desired
+if [ -n "$copy_omega" ]; then
+ echo $delimiter
+ echo
+ echo "Copying O'Mega files to \"$omegapath/src\":"
+ for file in `ls $fr_omegadir`; do
+ if [ -f "$omegapath/src/$file" ] && [ -z "$force" ]; then
+ echo " \"$file\" already exists in destination directory, skipping..."
+ skipped=1
+ else
+ echo " copying \"$file\"..."
+ cp "$fr_omegadir/$file" "$omegapath/src" || die "ERROR copying file!"
+ fi
+ done
+ echo "Done. Remember you have to recompile O'Mega for any changes to the model files to"
+ echo "take effect (recompiling WHIZARD automatically recompiles the internal O'Mega tree)."
+ echo
+fi
+
+# Say goodby
+echo "All Done!"
+if [ -n "$conflicts" ]; then
+cat <<EOI
+
+WARNING: conflicting files found (see above). Please remove these files either
+manually or by running this script with the "--cleanup" option in order to
+make sure that the model works as expected.
+EOI
+fi
+if [ -n "$skipped" ]; then
+ echo
+ echo "WARNING: some files were skipped (see above); consider using \"--force\""
+ echo "to force overwriting."
+fi
Property changes on: FeynRulesInterface/Interfaces/WhizardOmega/all_19x/inject
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmega/1.93/omega.feynrules.patch
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/1.93/omega.feynrules.patch (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/1.93/omega.feynrules.patch (revision 3973)
@@ -0,0 +1,144 @@
+diff -ur a/src/.depend b/src/.depend
+--- a/src/.depend 2009-07-03 17:14:48.000000000 +0200
++++ b/src/.depend 2009-07-03 17:15:32.000000000 +0200
+@@ -318,4 +318,17 @@
+ f90_SM_clones.cmo: targets.cmi omega.cmi models.cmi fusion.cmi
+ f90_SM_clones.cmx: targets.cmx omega.cmx models.cmx fusion.cmx
+ count.cmo: topology.cmi thoList.cmi combinatorics.cmi
+-count.cmx: topology.cmx thoList.cmx combinatorics.cmx
++count.cmx: topology.cmx thoList.cmx combinatorics.cmx
++
++# FeynRules preliminary
++$(FR_MODULES:.ml=.cmi) : model.cmi coupling.cmi
++
++$(FR_MODULES:.ml=.cmo) : thoList.cmi rCS.cmi product.cmi options.cmi model.cmi \
++ coupling.cmi combinatorics.cmi color.cmi $(FR_MODULES:.ml=.cmi)
++
++$(FR_MODULES:.ml=.cmx) : thoList.cmx rCS.cmx product.cmx options.cmx model.cmi \
++ coupling.cmi combinatorics.cmx color.cmx $(FR_MODULES:.ml=.cmi)
++
++$(FR_BINARIES:.ml=.cmo) : targets.cmo omega.cmo $(FR_MODULES:.ml=.cmo) fusion.cmo colorize.cmo
++
++$(FR_BINARIES:.ml=.cmx) : targets.cmx omega.cmx $(FR_MODULES:.ml=.cmx) fusion.cmx colorize.cmx
+diff -ur a/src/Makefile.src b/src/Makefile.src
+--- a/src/Makefile.src 2009-07-03 17:14:48.000000000 +0200
++++ b/src/Makefile.src 2009-07-03 17:17:28.000000000 +0200
+@@ -38,6 +38,10 @@
+ MODEL_MODULES =
+ endif
+
++# Feynrules preliminary
++FR_MODULES = $(shell find . -name 'fr*.ml')
++FR_BINARIES = $(shell find . -name 'f90_fr*.ml')
++
+ MODULES = \
+ pmap.ml thoList.ml thoArray.ml thoString.ml rCS.ml \
+ cache.ml trie.ml lapack.ml linalg.ml \
+@@ -51,7 +55,8 @@
+ oVM.ml whizard.ml \
+ comphep_syntax.ml comphep_lexer.mll comphep_parser.mly comphep.ml \
+ $(MODEL_MODULES) colorize.ml \
+- omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml
++ omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml \
++ $(FR_MODULES)
+
+ GUI_MODULES = \
+ thoGButton.ml thoGWindow.ml thoGMenu.ml thoGDraw.ml
+@@ -80,7 +85,8 @@
+ f90_Simplest f90_Simplest_univ \
+ f90_Xdim f90_GravTest \
+ f90_SM_km f90_UED f90_Zprime \
+- f90_Template
++ f90_Template \
++ $(FR_BINARIES:.ml=)
+
+ # Colorized for WHiZard
+ PROGRAMS_released += \
+diff --recursive -u a/src/colorize.ml b/src/colorize.ml
+--- a/src/colorize.ml 2009-08-04 17:28:10.000000000 +0200
++++ b/src/colorize.ml 2009-08-04 17:28:22.000000000 +0200
+@@ -102,6 +102,8 @@
+ | Prop_Majorana -> Prop_Col_Majorana (* Spin 1/2 octets. *)
+ | Prop_Feynman -> Prop_Col_Feynman (* Spin 1 states, massless. *)
+ | Prop_Unitarity -> Prop_Col_Unitarity (* Spin 1 states, massive. *)
++ | Prop_Gauge x -> Prop_Col_Gauge x
++ | Prop_Rxi x -> Prop_Col_Rxi x
+ | _ -> failwith ("Colorize.It().colorize_propagator: not possible!")
+
+ let propagator = function
+diff --recursive -u a/src/coupling.mli b/src/coupling.mli
+--- a/src/coupling.mli 2009-08-04 17:28:10.000000000 +0200
++++ b/src/coupling.mli 2009-08-04 17:28:22.000000000 +0200
+@@ -131,7 +131,7 @@
+ | Prop_Unitarity | Prop_Feynman | Prop_Gauge of 'a | Prop_Rxi of 'a
+ | Prop_Tensor_2 | Prop_Vectorspinor
+ | Prop_Col_Scalar | Prop_Col_Feynman | Prop_Col_Majorana
+- | Prop_Col_Unitarity
++ | Prop_Col_Unitarity | Prop_Col_Gauge of 'a | Prop_Col_Rxi of 'a
+ | Aux_Scalar | Aux_Vector | Aux_Tensor_1
+ | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
+ | Only_Insertion
+diff --recursive -u a/src/omega.ml b/src/omega.ml
+--- a/src/omega.ml 2009-08-04 17:28:10.000000000 +0200
++++ b/src/omega.ml 2009-08-04 17:28:22.000000000 +0200
+@@ -511,8 +511,10 @@
+ | Color.AdjSUN _ -> Some ("gluon", lbl)
+ | _ -> Some ("photon", lbl)
+ end;
++ | Coupling.Prop_Col_Gauge _ -> Some ("dashes", lbl)
+ | Coupling.Prop_Unitarity
+ | Coupling.Prop_Rxi _ -> Some ("photon", lbl)
++ | Coupling.Prop_Col_Rxi _ -> Some ("dashes", lbl)
+ | Coupling.Prop_Majorana -> Some ("plain", lbl)
+ | Coupling.Prop_Scalar
+ | Coupling.Prop_Col_Scalar -> Some ("dashes", lbl)
+diff --recursive -u a/src/targets.ml b/src/targets.ml
+--- a/src/targets.ml 2009-08-04 17:28:10.000000000 +0200
++++ b/src/targets.ml 2009-08-04 17:28:22.000000000 +0200
+@@ -1435,8 +1435,12 @@
+ | Prop_Col_Feynman ->
+ printf "(-1.0_omega_prec/3.0_omega_prec) * pr_feynman(%s," p
+ | Prop_Gauge xi -> printf "pr_gauge(%s,%s," p (M.gauge_symbol xi)
++ | Prop_Col_Gauge xi ->
++ printf "(-1.0_omega_prec/3.0_omega_prec) * pr_gauge(%s,%s," p (M.gauge_symbol xi)
+ | Prop_Rxi xi ->
+ printf "pr_rxi(%s,%s,%s,%s," p m w (M.gauge_symbol xi)
++ | Prop_Col_Rxi xi ->
++ printf "(-1.0_omega_prec/3.0_omega_prex) * pr_rxi(%s,%s,%s,%s," p m w (M.gauge_symbol xi)
+ | Prop_Tensor_2 -> printf "pr_tensor(%s,%s,%s," p m w
+ | Prop_Vectorspinor -> printf "pr_grav(%s,%s,%s,"
+ p m w
+@@ -1464,8 +1468,8 @@
+ printf "(-1.0_omega_prec/3.0_omega_prec) * pj_unitarity(%s,%s,%s," p m gamma
+ | Prop_Feynman | Prop_Col_Feynman ->
+ invalid_arg "no on-shell Feynman propagator!"
+- | Prop_Gauge xi -> invalid_arg "no on-shell massless gauge propagator!"
+- | Prop_Rxi xi -> invalid_arg "no on-shell Rxi propagator!"
++ | Prop_Gauge _ | Prop_Col_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!"
++ | Prop_Rxi _ | Prop_Col_Rxi _ -> invalid_arg "no on-shell Rxi propagator!"
+ | Prop_Vectorspinor -> printf "pj_grav(%s,%s,%s," p m gamma
+ | Prop_Tensor_2 -> printf "pj_tensor(%s,%s,%s," p m gamma
+ | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
+@@ -1488,8 +1492,8 @@
+ | Prop_Unitarity -> printf "pg_unitarity(%s,%s,%s," p m gamma
+ | Prop_Feynman | Prop_Col_Feynman ->
+ invalid_arg "no on-shell Feynman propagator!"
+- | Prop_Gauge xi -> invalid_arg "no on-shell massless gauge propagator!"
+- | Prop_Rxi xi -> invalid_arg "no on-shell Rxi propagator!"
++ | Prop_Gauge _ | Prop_Col_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!"
++ | Prop_Rxi _ | Prop_Col_Rxi _ -> invalid_arg "no on-shell Rxi propagator!"
+ | Prop_Tensor_2 -> printf "pg_tensor(%s,%s,%s," p m gamma
+ | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
+ | Aux_Vector | Aux_Tensor_1 -> printf "("
+@@ -4674,8 +4678,11 @@
+ failwith "print_fusion: Prop_Col_Feynman not implemented yet!"
+ | Prop_Gauge xi ->
+ failwith "print_fusion: Prop_Gauge not implemented yet!"
++ | Prop_Col_Gauge _ -> failwith "print_fusion: Prop_Col_Gauge not implemented yet!"
+ | Prop_Rxi xi ->
+ failwith "print_fusion: Prop_Rxi not implemented yet!"
++ | Prop_Col_Rxi _ ->
++ failwith "print_fusion: Prop_Col_Rxi not implemented yet!"
+ | Prop_Vectorspinor ->
+ failwith "print_fusion: Prop_Vectorspinor not implemented yet!"
+ | Prop_Tensor_2 -> propagate ovm_PROPAGATE_TENSOR2
Index: FeynRulesInterface/Interfaces/WhizardOmega/1.93/whizard.feynrules.patch
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/1.93/whizard.feynrules.patch (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/1.93/whizard.feynrules.patch (revision 3973)
@@ -0,0 +1,123 @@
+diff -u --recursive a/bin/make-include.pl.in b/bin/make-include.pl.in
+--- a/bin/make-include.pl.in 2009-06-11 03:32:45.000000000 +0200
++++ b/bin/make-include.pl.in 2009-06-11 03:32:27.000000000 +0200
+@@ -830,7 +830,8 @@
+ $inc_slha_prt .=
+ " call handle ($particle)\n";
+ $inc_slha_def_mass .=
+- " real(kind=default) :: $mass{$particle}\n";
++ " real(kind=default) :: $mass{$particle}\n"
++ unless ($inc_slha_def_mass =~ m/:: $mass{$particle}\n/);
+ $inc_slha_set_mass .=
+ " case ($particle); mass%$mass{$particle} = value\n";
+ $inc_slha_get_mass .=
+@@ -844,7 +845,8 @@
+ $inc_prt_widths .=
+ " case ($particle); width = par%$width{$particle}\n";
+ $inc_slha_def_decay .=
+- " real(kind=default) :: $width{$particle}\n";
++ " real(kind=default) :: $width{$particle}\n"
++ unless ($inc_slha_def_decay =~ m/:: $width{$particle}\n/);
+ $inc_slha_set_decay .=
+ " case ($particle); decay%$width{$particle} = value\n";
+ $inc_slha_get_decay .=
+diff -u --recursive a/omega-src/insert-color.pl.in b/omega-src/insert-color.pl.in
+--- a/omega-src/insert-color.pl.in 2009-06-11 03:33:51.000000000 +0200
++++ b/omega-src/insert-color.pl.in 2009-06-11 03:36:35.000000000 +0200
+@@ -1089,7 +1089,7 @@
+
+ foreach $prt (@prt) {
+ if ($prt =~ /^($col_pattern)$/) {
+- $prt =~ m/^\w+\/(\d)\/(\d)?$/;
++ $prt =~ m/^[\w\+\-~]+\/(\d)\/(\d)?$/;
+ # $prt =~ m/^\w+\/(\d)(\d)?$/;
+ $col = $1;
+ if ($col_index{$col}) {
+@@ -1101,9 +1101,9 @@
+ }
+ foreach $prt (@prt) {
+ if ($prt =~ /^($col_pattern|$acl_pattern)$/) {
+- $prt =~ s/^(\w+\/)(\d)(\/)$/$1$col_index{$2}\//;
+- $prt =~ s/^(\w+\/\/)(\d)$/$1$col_index{$2}/;
+- $prt =~ s/^(\w+\/)(\d)(\/)(\d)$/$1$col_index{$2}\/$col_index{$4}/;
++ $prt =~ s/^([\w\+\-~]+\/)(\d)(\/)$/$1$col_index{$2}\//;
++ $prt =~ s/^([\w\+\-~]+\/\/)(\d)$/$1$col_index{$2}/;
++ $prt =~ s/^([\w\+\-~]+\/)(\d)(\/)(\d)$/$1$col_index{$2}\/$col_index{$4}/;
+ ### OLD VERSION FOR EXPLICIT SCRIPTING
+ ### if ($prt =~ /^($col_pattern|$acl_pattern)$/) {
+ ### $prt =~ s/^(\w+\/)(\d)$/$1$col_index{$2}/;
+@@ -1127,13 +1127,13 @@
+
+ foreach $prt (@prt) {
+ if ($prt =~ /^($col_pattern)$/ and $prt =~ /^($acl_pattern)$/) {
+- $prt =~ /^\w+\/(\d)\/(\d)$/;
++ $prt =~ /^[\w\+\-~]+\/(\d)\/(\d)$/;
+ push @col, $1; push @acl, $2;
+ } elsif ($prt =~ /^($col_pattern)$/) {
+- $prt =~ /^\w+\/(\d)\/$/;
++ $prt =~ /^[\w\+\-~]+\/(\d)\/$/;
+ push @col, $1; push @acl, 0;
+ } elsif ($prt =~ /^($acl_pattern)$/) {
+- $prt =~ /^\w+\/\/(\d)$/;
++ $prt =~ /^[\w\+\-~]+\/\/(\d)$/;
+ push @acl, $1; push @col, 0;
+ } else {
+ push @col, 0; push @acl, 0;
+diff -ur a/bin/make-proc.pl.in b/bin/make-proc.pl.in
+--- a/bin/make-proc.pl.in 2009-09-05 23:41:02.000000000 +0200
++++ b/bin/make-proc.pl.in 2009-09-05 23:41:12.000000000 +0200
+@@ -117,6 +117,7 @@
+ ($omegabin_col = $omegabin) =~ s/\.opt/_Col.opt/;
+ if (-x "$omegabin" or -x "$omegabin_col") {
+ $omega_parameters = "$mdldir/parameters.$model.omega.f90";
++ $omega_parameters_stem = "$mdldir/parameters.$model.omega";
+ unless (-f $omega_parameters) {
+ print "$0: Can\'t find $omega_parameters -- disabling omega.\n";
+ $omega = "no";
+@@ -170,9 +171,22 @@
+ # Copy the model- and method-dependent files
+ unless ($keep_model) {
+ if ($omega ne "no") {
+- $stat = system ("cp", $omega_parameters,
+- "results/omega_parameters_whizard.f90");
+- $stat==0 or die "Can\'t copy $omega_parameters into results directory";
++ $omega_parameters_files = `ls $omega_parameters_stem*`;
++ @omega_parameters_files = split /\n/, $omega_parameters_files;
++ $omega_parameters_files = "";
++ foreach (@omega_parameters_files) {
++ my $target;
++ if (m/.*global.f90/)
++ {$target = "omega_parameters_whizard_global.f90"}
++ elsif (m/.*cpl(\d+).f90/)
++ {$target = "omega_parameters_whizard_cpl$1.f90"}
++ elsif (m/.*local.f90/)
++ {$target = "omega_parameters_whizard_local.f90"}
++ else {$target = "omega_parameters_whizard.f90"};
++ $omega_parameters_files .= "$target ";
++ system ("cp", $_, "results/$target") == 0 or die
++ "Can\'t copy $_ into the results directory";
++ }
+ }
+ }
+
+@@ -1506,7 +1520,7 @@
+
+ # List files
+ $src = "parameters.f90 file_utils.f90 process_interface.f90 ";
+- if ($omega ne "no") { $src .= "omega_parameters_whizard.f90 "; }
++ if ($omega ne "no") { $src .= "$omega_parameters_files"; }
+ foreach $ext(sort keys %ext) {
+ $src .= "$ext*.f90 ";
+ }
+diff -ur a/bin/make-include.pl.in b/bin/make-include.pl.in
+--- a/bin/make-include.pl.in 2010-01-12 12:30:34.000000000 +0100
++++ b/bin/make-include.pl.in 2010-01-12 12:30:42.000000000 +0100
+@@ -50,7 +50,7 @@
+ }
+
+ # The allowed lengths for parameter/particle strings
+-$len_parameter = 8;
++$len_parameter = 20;
+ $len_value = 20;
+ $len_particle = 20;
+ $len_chep_name = 6;
Index: FeynRulesInterface/Interfaces/WhizardOmega/1.96/omega.feynrules.patch
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/1.96/omega.feynrules.patch (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/1.96/omega.feynrules.patch (revision 3973)
@@ -0,0 +1,56 @@
+diff -ur a/src/.depend b/src/.depend
+--- a/src/.depend 2009-07-03 17:14:48.000000000 +0200
++++ b/src/.depend 2009-07-03 17:15:32.000000000 +0200
+@@ -318,4 +318,17 @@
+ f90_SM_clones.cmo: targets.cmi omega.cmi models.cmi fusion.cmi
+ f90_SM_clones.cmx: targets.cmx omega.cmx models.cmx fusion.cmx
+ count.cmo: topology.cmi thoList.cmi combinatorics.cmi
+-count.cmx: topology.cmx thoList.cmx combinatorics.cmx
++count.cmx: topology.cmx thoList.cmx combinatorics.cmx
++
++# FeynRules preliminary
++$(FR_MODULES:.ml=.cmi) : model.cmi coupling.cmi
++
++$(FR_MODULES:.ml=.cmo) : thoList.cmi rCS.cmi product.cmi options.cmi model.cmi \
++ coupling.cmi combinatorics.cmi color.cmi $(FR_MODULES:.ml=.cmi)
++
++$(FR_MODULES:.ml=.cmx) : thoList.cmx rCS.cmx product.cmx options.cmx model.cmi \
++ coupling.cmi combinatorics.cmx color.cmx $(FR_MODULES:.ml=.cmi)
++
++$(FR_BINARIES:.ml=.cmo) : targets.cmo omega.cmo $(FR_MODULES:.ml=.cmo) fusion.cmo colorize.cmo
++
++$(FR_BINARIES:.ml=.cmx) : targets.cmx omega.cmx $(FR_MODULES:.ml=.cmx) fusion.cmx colorize.cmx
+diff -ur a/src/Makefile.src b/src/Makefile.src
+--- a/src/Makefile.src 2009-07-03 17:14:48.000000000 +0200
++++ b/src/Makefile.src 2009-07-03 17:17:28.000000000 +0200
+@@ -38,6 +38,10 @@
+ MODEL_MODULES =
+ endif
+
++# Feynrules preliminary
++FR_MODULES = $(shell find . -name 'fr*.ml')
++FR_BINARIES = $(shell find . -name 'f90_fr*.ml')
++
+ MODULES = \
+ pmap.ml thoList.ml thoArray.ml thoString.ml rCS.ml \
+ cache.ml trie.ml lapack.ml linalg.ml \
+@@ -51,7 +55,8 @@
+ oVM.ml whizard.ml \
+ comphep_syntax.ml comphep_lexer.mll comphep_parser.mly comphep.ml \
+ $(MODEL_MODULES) colorize.ml \
+- omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml
++ omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml \
++ $(FR_MODULES)
+
+ GUI_MODULES = \
+ thoGButton.ml thoGWindow.ml thoGMenu.ml thoGDraw.ml
+@@ -80,7 +85,8 @@
+ f90_Simplest f90_Simplest_univ \
+ f90_Xdim f90_GravTest \
+ f90_SM_km f90_UED f90_Zprime \
+- f90_Template
++ f90_Template \
++ $(FR_BINARIES:.ml=)
+
+ # Colorized for WHiZard
+ PROGRAMS_released += \
Index: FeynRulesInterface/Interfaces/WhizardOmega/1.96/whizard.feynrules.patch
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/1.96/whizard.feynrules.patch (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/1.96/whizard.feynrules.patch (revision 3973)
@@ -0,0 +1,46 @@
+diff -ur a/bin/make-proc.pl.in b/bin/make-proc.pl.in
+--- a/bin/make-proc.pl.in 2009-09-05 23:41:02.000000000 +0200
++++ b/bin/make-proc.pl.in 2009-09-05 23:41:12.000000000 +0200
+@@ -117,6 +117,7 @@
+ ($omegabin_col = $omegabin) =~ s/\.opt/_Col.opt/;
+ if (-x "$omegabin" or -x "$omegabin_col") {
+ $omega_parameters = "$mdldir/parameters.$model.omega.f90";
++ $omega_parameters_stem = "$mdldir/parameters.$model.omega";
+ unless (-f $omega_parameters) {
+ print "$0: Can\'t find $omega_parameters -- disabling omega.\n";
+ $omega = "no";
+@@ -170,9 +171,22 @@
+ # Copy the model- and method-dependent files
+ unless ($keep_model) {
+ if ($omega ne "no") {
+- $stat = system ("cp", $omega_parameters,
+- "results/omega_parameters_whizard.f90");
+- $stat==0 or die "Can\'t copy $omega_parameters into results directory";
++ $omega_parameters_files = `ls $omega_parameters_stem*`;
++ @omega_parameters_files = split /\n/, $omega_parameters_files;
++ $omega_parameters_files = "";
++ foreach (@omega_parameters_files) {
++ my $target;
++ if (m/.*global.f90/)
++ {$target = "omega_parameters_whizard_global.f90"}
++ elsif (m/.*cpl(\d+).f90/)
++ {$target = "omega_parameters_whizard_cpl$1.f90"}
++ elsif (m/.*local.f90/)
++ {$target = "omega_parameters_whizard_local.f90"}
++ else {$target = "omega_parameters_whizard.f90"};
++ $omega_parameters_files .= "$target ";
++ system ("cp", $_, "results/$target") == 0 or die
++ "Can\'t copy $_ into the results directory";
++ }
+ }
+ }
+
+@@ -1506,7 +1520,7 @@
+
+ # List files
+ $src = "parameters.f90 file_utils.f90 process_interface.f90 ";
+- if ($omega ne "no") { $src .= "omega_parameters_whizard.f90 "; }
++ if ($omega ne "no") { $src .= "$omega_parameters_files"; }
+ foreach $ext(sort keys %ext) {
+ $src .= "$ext*.f90 ";
+ }
Index: FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure (revision 3973)
@@ -0,0 +1,3287 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for this FeynRules model for WHIZARD 2.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='this FeynRules model'
+PACKAGE_TARNAME='this-feynrules-model'
+PACKAGE_VERSION='for WHIZARD 2.0'
+PACKAGE_STRING='this FeynRules model for WHIZARD 2.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_default_prefix=${HOME}/.whizard
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+OCAMLFLAGS
+OCAMLOPT
+OMEGA_LIBPATH
+LIBTOOL
+FC_MODEXT
+FC
+WHIZARD_DATAPATH
+WHIZARD_LIBPATH
+omega_config
+whizard_config
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+FCFLAGS
+WO_CONFIG
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+WO_CONFIG
+FCFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this FeynRules model for WHIZARD 2.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root
+ [DATAROOTDIR/doc/this-feynrules-model]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of this FeynRules model for WHIZARD 2.0:";;
+ esac
+ cat <<\_ACEOF
+
+Some influential environment variables:
+ WO_CONFIG path to whizard-config and omega-config (searched _before_ the
+ system-wide search path)
+ FCFLAGS override FORTRAN compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+this FeynRules model configure for WHIZARD 2.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by this FeynRules model $as_me for WHIZARD 2.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# The default is to install locally
+
+
+# Track down the WHIZARD / O'Mega installation
+
+
+# Allow to append compiler flags
+
+
+delimiter="################################################################################"
+
+echo ${delimiter}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: collecting information" >&5
+$as_echo "$as_me: collecting information" >&6;}
+echo ${delimiter}
+echo
+
+###############################################################################
+# Check for a working install
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+###############################################################################
+# Look for whizard-config and omega-config
+
+wo_confpath=""
+test -n "${WO_CONFIG}" && wo_confpath="${WO_CONFIG}:"
+wo_confpath="${wo_confpath}${PATH}"
+
+
+# whizard-config ?
+# Extract the first word of "whizard-config", so it can be a program name with args.
+set dummy whizard-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_whizard_config+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $whizard_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_whizard_config="$whizard_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in path = ${wo_confpath}
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_whizard_config="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_whizard_config" && ac_cv_path_whizard_config="not found"
+ ;;
+esac
+fi
+whizard_config=$ac_cv_path_whizard_config
+if test -n "$whizard_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $whizard_config" >&5
+$as_echo "$whizard_config" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "${whizard_config}" = "not found"; then
+ as_fn_error $? "couldn't locate whizard-config: consider setting WO_CONFIG..." "$LINENO" 5
+fi
+
+# omega-config ?
+# Extract the first word of "omega-config", so it can be a program name with args.
+set dummy omega-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_omega_config+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $omega_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_omega_config="$omega_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in path = ${wo_confpath}
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_omega_config="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_omega_config" && ac_cv_path_omega_config="not found"
+ ;;
+esac
+fi
+omega_config=$ac_cv_path_omega_config
+if test -n "$omega_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $omega_config" >&5
+$as_echo "$omega_config" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "${omega_config}" = "not found"; then
+ as_fn_error $? "couldn't locate omega-config: consider setting WO_CONFIG..." "$LINENO" 5
+fi
+
+###############################################################################
+# Query whizard-config and omega-config for the relevant settings
+
+# WHIZARD library path
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the WHIZARD library path" >&5
+$as_echo_n "checking for the WHIZARD library path... " >&6; }
+WHIZARD_LIBPATH=$(${whizard_config} --libdir)
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WHIZARD_LIBPATH}" >&5
+$as_echo "${WHIZARD_LIBPATH}" >&6; }
+
+# WHIZARD data path
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the WHIZARD data directory" >&5
+$as_echo_n "checking for the WHIZARD data directory... " >&6; }
+WHIZARD_DATAPATH=$(${whizard_config} --datadir)
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WHIZARD_DATAPATH}" >&5
+$as_echo "${WHIZARD_DATAPATH}" >&6; }
+
+# FORTRAN compiler
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the FORTRAN compiler WHIZARD was built with" >&5
+$as_echo_n "checking for the FORTRAN compiler WHIZARD was built with... " >&6; }
+FC=$(${whizard_config} --fc)
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FC}" >&5
+$as_echo "${FC}" >&6; }
+
+# FORTRAN flags
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the FORTRAN compiler options" >&5
+$as_echo_n "checking for the FORTRAN compiler options... " >&6; }
+test -z "$FCFLAGS" && FCFLAGS=$(${whizard_config} --fcflags)
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FCFLAGS}" >&5
+$as_echo "${FCFLAGS}" >&6; }
+
+# FORTRAN module extension
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the file extension used for FORTRAN modules" >&5
+$as_echo_n "checking for the file extension used for FORTRAN modules... " >&6; }
+FC_MODEXT=$(${whizard_config} --fcmodext)
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FC_MODEXT}" >&5
+$as_echo "${FC_MODEXT}" >&6; }
+
+# libtool
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the WHIZARD libtool" >&5
+$as_echo_n "checking for the WHIZARD libtool... " >&6; }
+LIBTOOL="${WHIZARD_LIBPATH}/libtool"
+if test ! -x "${LIBTOOL}"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "${LIBTOOL}
+not found or not executable! It seems WHIZARD was built without libtool
+support which, however, is mandatory for using FeynRules with W2." "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBTOOL}" >&5
+$as_echo "${LIBTOOL}" >&6; }
+
+
+# O'Mega library path
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the O'Mega library path" >&5
+$as_echo_n "checking for the O'Mega library path... " >&6; }
+OMEGA_LIBPATH=$(${omega_config} --libdir)
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OMEGA_LIBPATH}" >&5
+$as_echo "${OMEGA_LIBPATH}" >&6; }
+
+# ocamlopt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocamlopt (taken from the O'Mega configuration)" >&5
+$as_echo_n "checking for ocamlopt (taken from the O'Mega configuration)... " >&6; }
+OCAMLOPT=$(${omega_config} --ocamlopt)
+if test -z "${OCAMLOPT}"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "It seems O'Mega was built without O'Caml which is mandatory for using
+FeynRules!" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OCAMLOPT}" >&5
+$as_echo "${OCAMLOPT}" >&6; }
+
+
+# additional ocaml flags
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for any additional O'Caml flags" >&5
+$as_echo_n "checking for any additional O'Caml flags... " >&6; }
+OCAMLFLAGS=$(${omega_config} --ocamlflags)
+
+screenflags=${OCAMLFLAGS}
+test -z "${screenflags}" && screenflags="none"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${screenflags}" >&5
+$as_echo "${screenflags}" >&6; }
+
+###############################################################################
+# Create output files
+
+echo
+echo ${delimiter}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: writing Makefiles" >&5
+$as_echo "$as_me: writing Makefiles" >&6;}
+echo $delimiter
+echo
+
+ac_config_files="$ac_config_files omega/Makefile whizard/Makefile Makefile"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by this FeynRules model $as_me for WHIZARD 2.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+this FeynRules model config.status for WHIZARD 2.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "omega/Makefile") CONFIG_FILES="$CONFIG_FILES omega/Makefile" ;;
+ "whizard/Makefile") CONFIG_FILES="$CONFIG_FILES whizard/Makefile" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES "
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+ esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+###############################################################################
+# Generate Makefile includes
+
+echo
+echo ${delimiter}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: collecting models" >&5
+$as_echo "$as_me: collecting models" >&6;}
+echo $delimiter
+echo
+
+lfeed="
+"
+for mdl in whizard/*mdl; do
+ model=${mdl%.mdl}
+ model=${model##*/}
+ echo "found: $model"
+
+ # WHIZARD
+ libraries="${libraries}\\${lfeed} libparameters_$model.la"
+ models="${models}\\${lfeed} ${model}.mdl"
+ cplsrc="${cplsrc}${lfeed}cplsrc_${model} = "
+ for file in whizard/*${model}*cpl*f90; do
+ cplsrc="${cplsrc}\\${lfeed} ${file##*/}"
+ done
+ cplobj="${cplobj}${lfeed}cplobj = \$(cplsrc_${model}:.f90=.lo)"
+ globsrc="${globsrc}${lfeed}globsrc_${model} = parameters.${model}.global.f90"
+ globobj="${globobj}${lfeed}globobj_${model} = \$(globsrc_${model}:.f90=.lo)"
+ locsrc="${locsrc}${lfeed}locsrc_${model} = parameters.${model}.local.f90"
+ locobj="${locobj}${lfeed}locobj_${model} = \$(locsrc_{$model}:.f90=.lo)"
+ mainsrc="${mainsrc}${lfeed}mainsrc_${model} = parameters.${model}.f90"
+ mainobj="${mainobj}${lfeed}mainobj_${model} = \$(mainsrc_${model}:.f90=.lo)"
+ allsrc="${allsrc}${lfeed}src_${model} = \$(globsrc_${model}) \$(locsrc_${model})"
+ allsrc="${allsrc} \$(cplsrc_${model}) \$(mainsrc_${model})"
+ allobj="${allobj}${lfeed}obj_${model} = \$(src_${model}:.f90=.lo)"
+ modules="${modules}\\${lfeed} \$(patsubst %_f90,%.mod,\$(subst .,_,\$(src_${model})))"
+ whizrules="${whizrules}${lfeed}
+\$(locobj_${model}): \$(globobj_${model})
+\$(cplobj_${model}): \$(globobj_${model}) \$(locobj_${model})
+\$(mainobj_${model}): \$(globobj_${model}) \$(locobj_${model}) \$(cplobj_${model})
+parameters_${model}.\$(fc_modext): \$(mainobj_${model})
+libparameters_$model.la: \$(obj_${model})
+ \$(libtool) --tag=FC --mode=link \$(fc) -all-static \\
+ -rpath \$(prefix)/lib/whizard/models -o \$@ \$(obj_${model})"
+
+ # O'Mega
+ binaries="${binaries}\\${lfeed} omega_${model}.opt"
+ oint="${oint}${lfeed}int_${model} = ${model}_mdl.cmi"
+ omdl="${omdl}${lfeed}mdl_${model} = ${model}_mdl.cmx"
+ obin="${obin}${lfeed}bin_${model} = omega_${model}.cmx"
+ orules="${orules}${lfeed}
+\$(mdl_${model}): \$(int_${model})
+\$(bin_${model}): \$(int_${model}) \$(mdl_${model})
+omega_${model}.opt: \$(int_${model}) \$(mdl_${model}) \$(bin_${model})
+ \$(ocamlopt) \$(ocamlflags) -I \$(libdir) -o \$@ omega_core.cmxa omega_targets.cmxa \\
+ \$(mdl_${model}) \$(bin_${model})"
+done
+
+echo
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: writing whizard/Makefile.src" >&5
+$as_echo "$as_me: writing whizard/Makefile.src" >&6;}
+cat <<EOI > whizard/Makefile.src || exit 1
+models = ${models}
+libraries = ${libraries}
+modules = ${modules}
+${globsrc}${globobj}
+${locsrc}${locobj}
+${cplsrc}${cplobj}
+${mainsrc}${mainobj}
+${allsrc}${allobj}
+${whizrules}
+EOI
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: writing omega/Makefile.src" >&5
+$as_echo "$as_me: writing omega/Makefile.src" >&6;}
+cat <<EOI > omega/Makefile.src || exit 1
+binaries = ${binaries}
+${oint}
+${omdl}
+${obin}
+${orules}
+EOI
+
+###############################################################################
+# Done
+
+cat <<EOI
+
+${delimiter}
+
+Your configure finished, and you're now ready to compile and install the
+model via make install.
+EOI
Property changes on: FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.in
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.in (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.in (revision 3973)
@@ -0,0 +1,17 @@
+# $Id$
+
+prefix = @prefix@
+subdirs = omega whizard
+
+all:
+ for dir in $(subdirs); do make -C$${dir} all || exit 1; done
+
+install:
+ for dir in $(subdirs); do make -C$${dir} install || exit 1; done
+ @echo
+ @echo 'The model has been installed in "$(prefix)" and is ready for use.'
+
+clean:
+ for dir in $(subdirs); do make -C$${dir} clean || exit 1; done
+
+.PHONY: all install clean
Property changes on: FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.in
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure.ac
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure.ac (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure.ac (revision 3973)
@@ -0,0 +1,230 @@
+# Configure the build system for the W2 model files written out by the
+# FeynRules WO interface. Most information is directly obtained from the
+# whizard-config / omega-config scripts. After the Makefiles have been
+# generated, the models contained in the output directory are scanned and
+# the model-specific Makefile.src are generated.
+
+# $Id$
+
+AC_INIT([this FeynRules model], [for WHIZARD 2.0])
+
+# The default is to install locally
+AC_PREFIX_DEFAULT([${HOME}/.whizard])
+
+# Track down the WHIZARD / O'Mega installation
+AC_ARG_VAR([WO_CONFIG], dnl
+[path to whizard-config and omega-config (searched _before_ the system-wide
+search path)])
+
+# Allow to append compiler flags
+AC_ARG_VAR([FCFLAGS], dnl
+[override FORTRAN compiler flags])
+
+delimiter="################################################################################"
+
+echo ${delimiter}
+AC_MSG_NOTICE([collecting information])
+echo ${delimiter}
+echo
+
+###############################################################################
+# Check for a working install
+AC_PROG_INSTALL
+
+###############################################################################
+# Look for whizard-config and omega-config
+[
+wo_confpath=""
+test -n "${WO_CONFIG}" && wo_confpath="${WO_CONFIG}:"
+wo_confpath="${wo_confpath}${PATH}"
+]
+
+# whizard-config ?
+AC_PATH_PROG([whizard_config], [whizard-config], [not found], dnl
+ [path = ${wo_confpath}])
+if test "${whizard_config}" = "not found"; then
+ AC_MSG_ERROR([couldn't locate whizard-config: consider setting WO_CONFIG...])
+fi
+
+# omega-config ?
+AC_PATH_PROG([omega_config], [omega-config], [not found], dnl
+ [path = ${wo_confpath}])
+if test "${omega_config}" = "not found"; then
+ AC_MSG_ERROR([couldn't locate omega-config: consider setting WO_CONFIG...])
+fi
+
+###############################################################################
+# Query whizard-config and omega-config for the relevant settings
+
+# WHIZARD library path
+AC_MSG_CHECKING([for the WHIZARD library path])
+WHIZARD_LIBPATH=$(${whizard_config} --libdir)
+AC_SUBST([WHIZARD_LIBPATH])
+AC_MSG_RESULT([${WHIZARD_LIBPATH}])
+
+# WHIZARD data path
+AC_MSG_CHECKING([for the WHIZARD data directory])
+WHIZARD_DATAPATH=$(${whizard_config} --datadir)
+AC_SUBST([WHIZARD_DATAPATH])
+AC_MSG_RESULT([${WHIZARD_DATAPATH}])
+
+# FORTRAN compiler
+AC_MSG_CHECKING([for the FORTRAN compiler WHIZARD was built with])
+FC=$(${whizard_config} --fc)
+AC_SUBST([FC])
+AC_MSG_RESULT([${FC}])
+
+# FORTRAN flags
+AC_MSG_CHECKING([for the FORTRAN compiler options])
+test -z "$FCFLAGS" && FCFLAGS=$(${whizard_config} --fcflags)
+AC_SUBST([FCFLAGS])
+AC_MSG_RESULT([${FCFLAGS}])
+
+# FORTRAN module extension
+AC_MSG_CHECKING([for the file extension used for FORTRAN modules])
+FC_MODEXT=$(${whizard_config} --fcmodext)
+AC_SUBST([FC_MODEXT])
+AC_MSG_RESULT([${FC_MODEXT}])
+
+# libtool
+AC_MSG_CHECKING([for the WHIZARD libtool])
+LIBTOOL="${WHIZARD_LIBPATH}/libtool"
+if test ! -x "${LIBTOOL}"; then
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR(dnl
+[${LIBTOOL}
+not found or not executable! It seems WHIZARD was built without libtool
+support which, however, is mandatory for using FeynRules with W2.])
+fi
+AC_MSG_RESULT([${LIBTOOL}])
+AC_SUBST([LIBTOOL])
+
+# O'Mega library path
+AC_MSG_CHECKING([for the O'Mega library path])
+OMEGA_LIBPATH=$(${omega_config} --libdir)
+AC_SUBST([OMEGA_LIBPATH])
+AC_MSG_RESULT([${OMEGA_LIBPATH}])
+
+# ocamlopt
+AC_MSG_CHECKING([for ocamlopt (taken from the O'Mega configuration)])
+OCAMLOPT=$(${omega_config} --ocamlopt)
+if test -z "${OCAMLOPT}"; then
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR(dnl
+[It seems O'Mega was built without O'Caml which is mandatory for using
+FeynRules!])
+fi
+AC_MSG_RESULT([${OCAMLOPT}])
+AC_SUBST([OCAMLOPT])
+
+# additional ocaml flags
+AC_MSG_CHECKING([for any additional O'Caml flags])
+OCAMLFLAGS=$(${omega_config} --ocamlflags)
+AC_SUBST([OCAMLFLAGS])
+screenflags=${OCAMLFLAGS}
+test -z "${screenflags}" && screenflags="none"
+AC_MSG_RESULT([${screenflags}])
+
+###############################################################################
+# Create output files
+
+echo
+echo ${delimiter}
+AC_MSG_NOTICE([writing Makefiles])
+echo $delimiter
+echo
+
+AC_CONFIG_FILES([omega/Makefile] [whizard/Makefile] [Makefile])
+
+AC_OUTPUT
+
+###############################################################################
+# Generate Makefile includes
+
+echo
+echo ${delimiter}
+AC_MSG_NOTICE([collecting models])
+echo $delimiter
+echo
+
+lfeed="
+"
+for mdl in whizard/*mdl; do
+ model=${mdl%.mdl}
+ model=${model##*/}
+ echo "found: $model"
+
+ # WHIZARD
+ libraries="${libraries}\\${lfeed} libparameters_$model.la"
+ models="${models}\\${lfeed} ${model}.mdl"
+ cplsrc="${cplsrc}${lfeed}cplsrc_${model} = "
+ for file in whizard/*${model}*cpl*f90; do
+ cplsrc="${cplsrc}\\${lfeed} ${file##*/}"
+ done
+ cplobj="${cplobj}${lfeed}cplobj = \$(cplsrc_${model}:.f90=.lo)"
+ globsrc="${globsrc}${lfeed}globsrc_${model} = parameters.${model}.global.f90"
+ globobj="${globobj}${lfeed}globobj_${model} = \$(globsrc_${model}:.f90=.lo)"
+ locsrc="${locsrc}${lfeed}locsrc_${model} = parameters.${model}.local.f90"
+ locobj="${locobj}${lfeed}locobj_${model} = \$(locsrc_{$model}:.f90=.lo)"
+ mainsrc="${mainsrc}${lfeed}mainsrc_${model} = parameters.${model}.f90"
+ mainobj="${mainobj}${lfeed}mainobj_${model} = \$(mainsrc_${model}:.f90=.lo)"
+ allsrc="${allsrc}${lfeed}src_${model} = \$(globsrc_${model}) \$(locsrc_${model})"
+ allsrc="${allsrc} \$(cplsrc_${model}) \$(mainsrc_${model})"
+ allobj="${allobj}${lfeed}obj_${model} = \$(src_${model}:.f90=.lo)"
+ modules="${modules}\\${lfeed} \$(patsubst %_f90,%.mod,\$(subst .,_,\$(src_${model})))"
+ whizrules="${whizrules}${lfeed}
+\$(locobj_${model}): \$(globobj_${model})
+\$(cplobj_${model}): \$(globobj_${model}) \$(locobj_${model})
+\$(mainobj_${model}): \$(globobj_${model}) \$(locobj_${model}) \$(cplobj_${model})
+parameters_${model}.\$(fc_modext): \$(mainobj_${model})
+libparameters_$model.la: \$(obj_${model})
+ \$(libtool) --tag=FC --mode=link \$(fc) -all-static \\
+ -rpath \$(prefix)/lib/whizard/models -o \$@ \$(obj_${model})"
+
+ # O'Mega
+ binaries="${binaries}\\${lfeed} omega_${model}.opt"
+ oint="${oint}${lfeed}int_${model} = ${model}_mdl.cmi"
+ omdl="${omdl}${lfeed}mdl_${model} = ${model}_mdl.cmx"
+ obin="${obin}${lfeed}bin_${model} = omega_${model}.cmx"
+ orules="${orules}${lfeed}
+\$(mdl_${model}): \$(int_${model})
+\$(bin_${model}): \$(int_${model}) \$(mdl_${model})
+omega_${model}.opt: \$(int_${model}) \$(mdl_${model}) \$(bin_${model})
+ \$(ocamlopt) \$(ocamlflags) -I \$(libdir) -o \$@ omega_core.cmxa omega_targets.cmxa \\
+ \$(mdl_${model}) \$(bin_${model})"
+done
+
+echo
+
+AC_MSG_NOTICE([writing whizard/Makefile.src])
+cat <<EOI > whizard/Makefile.src || exit 1
+models = ${models}
+libraries = ${libraries}
+modules = ${modules}
+${globsrc}${globobj}
+${locsrc}${locobj}
+${cplsrc}${cplobj}
+${mainsrc}${mainobj}
+${allsrc}${allobj}
+${whizrules}
+EOI
+
+AC_MSG_NOTICE([writing omega/Makefile.src])
+cat <<EOI > omega/Makefile.src || exit 1
+binaries = ${binaries}
+${oint}
+${omdl}
+${obin}
+${orules}
+EOI
+
+###############################################################################
+# Done
+
+cat <<EOI
+
+${delimiter}
+
+Your configure finished, and you're now ready to compile and install the
+model via make install.
+EOI
Property changes on: FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure.ac
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmega/2.0/INSTALL
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/2.0/INSTALL (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/2.0/INSTALL (revision 3973)
@@ -0,0 +1,22 @@
+This directory contains model definitions for WHIZARD / O'Mega generated by the
+FeynRules - WHIZARD interface. In order to use them, you need a working
+installation of WHIZARD 2.x and must compile and install the files using the
+included build system.
+
+To this end, configure the sources using the configure script
+
+ ./configure --prefix=/installation/prefix WO_CONFIG=/path/to/wo/binaries
+
+where "--prefix" and "WO_CONFIG" are optional. The latter must be set to the
+path containing the WHIZARD binaries if they can't be found in any of the paths
+in the PATH environment variable, while the first can be used to tune the
+installation directory of the model files (${HOME}/.whizard by default).
+
+After configuration, compile and install the source by doing
+
+ make clean && make install
+
+If the model was either installed into the default prefix or into the WHIZARD
+prefix, it will be found WHIZARD without any further intervention. If a
+different prefix was chosen, please use the "--localprefix" to point the
+"whizard" executable to the correct path.
Index: FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.omega.in
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.omega.in (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.omega.in (revision 3973)
@@ -0,0 +1,29 @@
+# $Id$
+
+prefix = @prefix@
+install = @INSTALL@
+libpath = @OMEGA_LIBPATH@
+ocamlopt = @OCAMLOPT@
+ocamlflags = @OCAMLFLAGS@
+
+libdir = $(libpath)/caml
+
+default: all
+
+include Makefile.src
+
+all: $(binaries)
+
+install: all
+ $(install) -d -m 755 $(prefix)/bin
+ $(install) -m 755 $(binaries) $(prefix)/bin
+
+clean:
+ -rm -f $(binaries) *.cmx *.cmi *.o
+
+%.cmi: %.mli
+ $(ocamlopt) $(ocamlflags) -I $(libdir) -c $<
+%.cmx: %.ml
+ $(ocamlopt) $(ocamlflags) -I $(libdir) -c $<
+
+.PHONY: all install clean
Property changes on: FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.omega.in
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.whizard.in
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.whizard.in (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.whizard.in (revision 3973)
@@ -0,0 +1,38 @@
+# $Id$
+
+prefix = @prefix@
+install = @INSTALL@
+fc = @FC@
+fcflags = @FCFLAGS@
+fc_modext = @FC_MODEXT@
+libtool = @LIBTOOL@
+libpath = @WHIZARD_LIBPATH@
+datapath = @WHIZARD_DATAPATH@
+
+moddir = $(libpath)/mod/misc
+modeldir = $(datapath)/models
+
+default: all
+
+include Makefile.src
+
+all: $(libraries) $(models)
+
+install: all
+ $(install) -d -m 755 $(prefix)/share/whizard/models
+ $(install) -d -m 755 $(prefix)/lib/whizard/models
+ $(install) -d -m 755 $(prefix)/lib/whizard/mod/models
+ $(install) -m 644 $(models) $(prefix)/share/whizard/models
+ $(install) -m 644 $(modules) $(prefix)/lib/whizard/mod/models
+ $(libtool) --tag=FC --mode=install $(install) -m 644 $(libraries) \
+ $(prefix)/lib/whizard/models
+ $(libtool) --tag=FC --mode=finish $(prefix)/lib/whizard/models
+
+clean:
+ -rm -fr *.mod *.lo .libs *.o *.la
+
+%.lo: %.f90
+ $(libtool) --tag=FC --mode=compile $(fc) -prefer-pic -static -c \
+ -I $(moddir) $(fcflags) $<
+
+.PHONY: all install clean default
Property changes on: FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.whizard.in
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmega/2.0/install-sh
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/2.0/install-sh (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/2.0/install-sh (revision 3973)
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
Property changes on: FeynRulesInterface/Interfaces/WhizardOmega/2.0/install-sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: FeynRulesInterface/Interfaces/WhizardOmega/WOMathematicaInterface.m
===================================================================
--- FeynRulesInterface/Interfaces/WhizardOmega/WOMathematicaInterface.m (revision 0)
+++ FeynRulesInterface/Interfaces/WhizardOmega/WOMathematicaInterface.m (revision 3973)
@@ -0,0 +1,3017 @@
+(*
+
+ $Id$
+
+ This is a mathematica model file generator for WHIZARD / O'Mega; its task
+ is to translate an abstraction of the model data into a model file package.
+ Other codes can tap into this library and use it to implement interfaces to WO.
+ As the code is a near 1-to-1 copy of the FR interface atm, this "abstraction"
+ currently are the FR data structures, but I plan to refine this as I find time.
+
+ Christian Speckner, 2009 - 2011
+*)
+
+(*
+TODO
+ - Sanitize the handling of kinds in FORTRAN real constants.
+ - Remove "open coupling" and qualify all identifiers from this module instead
+ - Add verbosity, more sensible messages (don't complain about every ghost vertex etc.) *partly done*
+ - Make sure that all functions commonly appearing in parameters and couplings get treated correctly.
+ - Allow vertices which are sums of known structures.
+ - Win paths to different drives like "c:\foo" are broken atm.
+*)
+
+(*
+ "API" version to ensure that the top level code gets what it deserves
+*)
+WO`APIversion = 2;
+
+(*
+The backend can query the revision
+*)
+WO`BackendRevision = "$Id$";
+
+(*
+ Option handling: all options are defined within the WO namespace - some magic must
+ be played to create copies in other namespaces if desired.
+*)
+
+Options[WO`WriteOutput] = {
+ WO`WOVertexList -> {},
+ WO`WOModelName -> "unknown",
+ WO`WOMaxNcf -> 4,
+ WO`WOGauge -> WO`WOUnitarity,
+ WO`WOGaugeParameter -> "Rxi",
+ WO`WOWhizardVersion -> "2.0.3",
+ WO`WOVerbose -> False,
+ WO`WOAutoGauge -> True,
+ WO`WOMaxCouplingsPerFile -> 500,
+ WO`WORunParameters -> {aS, G},
+ WO`WOOutputDir -> Null,
+ WO`WOOplotter -> False,
+ WO`WOFast -> True,
+ WO`WOMassList -> {},
+ WO`WOWidthList -> {},
+ WO`WOEParamList -> {},
+ WO`WOIParamList -> {},
+ WO`WOPartList -> {},
+ WO`WOProgress -> 10,
+ WO`WOExtraComment -> ""
+};
+
+Options[WO`WriteExtParams] = {
+ WO`WOWhizardVersion -> "2.0.3",
+ WO`WOEParamList -> {},
+ WO`WOModelName -> "unknown",
+ WO`WOMassList -> {},
+ WO`WOWidthList -> {}
+};
+
+Protect @@ (Options[WP`WriteOutput] /. Rule[a_, b_] :> a);
+Protect[WO`WORxi, WO`WOFeynman, WO`WOUnitarity];
+
+WO`WriteOutput::usage = "Write O'Mega / WHIZARD model files.";
+WO`WriteWOExtParams::usage = "Write external parameters to a file suitable for inclusion by WHIZARD.";
+WO`WOVertexList::usage = "Directly pass a vertex list to WriteWOOutput; overrides any Lagrians";
+WO`WOModelName::usage = "override model name; will be lowercased.";
+WO`WOMaxNcf::usage = (""
+ <> "The maximum number of color flows provided for in "
+ <> "O'mega. Irrelevant for WHIZARD 2+. Default: 4");
+WO`WOGauge::usage = (""
+ <> "Choose a gauge, choices: WOUnitarity (default), WOFeynman, WORxi");
+WO`WOUnitarity::usage = WO`WOFeynman::usage = "see WOGauge";
+WO`WORxi::usage = (""
+ <> "see WOGauge; if you specify Rxi gauge, then you MUST implement a parameter that "
+ <> "represents the gauge parameter \\xi; you can pass it to WriteWOOutput via "
+ <> "WOGaugeParameter (default: \"Rxi\").");
+WO`WOGaugeParameter::usage = "see WORxi, WOGauge";
+WO`WOWhizardVersion::usage = (""
+ <> "Version of WHIZARD / O'Mega to generate code for; possible values are:\n"
+ <> " \"1.92\" : <= 1.92\n"
+ <> " \"1.93\" : >= 1.93\n"
+ <> " \"1.96\" : >= 1.96\n"
+ <> " \"2.0\" : 2.0 - 2.0.2\n"
+ <> " \"2.0.3\": 2.0.3 (default)");
+WO`WOVerbose::usage = (""
+ <> "Verbose output. At the moment, this enables more detailed information "
+ <> "on skipped vertices. Default: False");
+WO`WOAutoGauge::usage = (""
+ <> "Automagically assign goldstone boson masses and add gauge parameter if necessary. Default: True");
+WO`WOMaxCouplingsPerFile::usage = (""
+ <> "Maximum number of couplings that get calculated in one FORTRAN module. Default: 500");
+WO`WORunParameters::usage = (""
+ <> "A list of all derived parameters which should be evolved together with the strong coupling. "
+ <> "Default: {aS, G}");
+WO`WOOplotter::usage = (""
+ <> "Generate model files for oplotter. Default: false");
+WO`WOFast::usage = (""
+ <> "Avoid time-consuming checks when translating the vertices, at the danger of missing "
+ <> "some structures. Retry with this option enabled if you encounter unidentified vertices. Default: True");
+WO`WOOutputDir::usage = "Set the output directory. Default: derifed from model name";
+WO`WOExtraComment::usage = "Additional comment prepended to the generated files. Default: empty";
+WO`WOProgress::usage = "Granularity for the progress meter. Default: 10"
+
+(* Create a directory if nonexistent *)
+WO`CautiousMd[dir_] := If[Length[FileNames[
+ StringReplace[dir, RegularExpression[WO`fileSlashRE <> "\\s*$"] -> ""]]] == 0,
+ If[CreateDirectory[dir] == $Failed, Throw["FATAL: unable to create directory " <> dir, WO`EAbort]]];
+
+(* Global setup.
+ For clarities sake, all global variables should be defined here, even if they are
+ overridden later. *)
+WO`GlobalSetup := Module[{},
+ WO`cpldeflist = {};
+ WO`maxarity = 3;
+ WO`havemajoranas = False;
+ WO`taglist = {};
+ WO`masslist = {};
+ WO`widthlist = {};
+ WO`PartList = {};
+ WO`IParamList = {};
+ WO`EParamList = {};
+ WO`ncfmax = 4;
+ WO`maxiter = 1000;
+ WO`runningcouplings = {};
+ WO`appendAlphas = False;
+ WO`gauge = WO`WOUnitarity;
+ WO`gsym = "Rxi";
+ WO`whizv = "2.0.3";
+ WO`verbose = False;
+ WO`autogauge = False;
+ WO`MaxCouplingsPerFile = 500;
+ WO`RunParameters = {};
+ WO`fast = True;
+ WO`vlist = {};
+ WO`fileheader = "";
+ WO`progress = 10;
+ WO`WOForm = False;
+ Clear[WO`hash];
+ If[$OperatingSystem === "Windows",
+ WO`fileSlash = "\\";
+ WO`fileSlashRE = "\\\\";
+ WO`absolutePathPattern = "^?:\\.*"
+ ,
+ WO`fileSlash = "/";
+ WO`fileSlashRE ="/";
+ WO`absolutePathPattern = "^/.*"
+ ];
+ WO`f2sin = Join[
+ Rule[RegularExpression["(^|\\W)" <> #[[1]] <> "(\\s*)\\("], "$1" <> #[[2]] <> "$2("]& /@
+ { {"Sqrt", "sqrt"}, {"Abs", "abs"}, {"WOxexp", "exp"}, {"Log", "log"}, {"Sin", "sin"},
+ {"Cos", "cos"}, {"Tan", "tan"}, {"ACOS", "acos"}, {"ASIN", "asin"}, {"ATAN", "atan"},
+ {"Sinh", "sinh"}, {"Cosh", "cosh"}, {"Tanh", "tanh"}, {"WOxsin", "sin"}, {"WOxcos", "cos"},
+ {"WOxsinh", "sinh"}, {"WOxcosh", "cosh"}} /. Rule -> RuleDelayed
+ ,
+ Rule[RegularExpression["(^|\\W)" <> #[[1]] <> "(\\W|$)"], "$1" <> #[[2]] <> "$2"]& /@
+ { {"Pi", "pi"} } /. Rule -> RuleDelayed
+ ];
+ WO`StringRules =
+ Rule[RegularExpression[#[[1]]], #[[2]]]& /@ {
+ (* + is replaced by "plus" *)
+ {"^\\+$", "plus"}, {"^\\+", "plus_"}, {"\\+$", "_plus"}, {"\\+", "_plus_"},
+ (* - is replaced by "minus" *)
+ {"^\\-$", "minus"}, {"^\\-", "minus_"}, {"\\-$", "_minus"}, {"\\-", "_minus_"},
+ (* ~ is replaced by "bar" *)
+ {"^~$", "bar"}, {"^~", "bar_"}, {"~$", "_bar"}, {"~", "_bar_"},
+ (* leading digits are moved to the end *)
+ {"^(\\d+)(_*)(.*)$", "$3$2$1"},
+ (* All other non-word characters, including whitespaces, are replaced by "_" *)
+ {"[^\\w\\+\\-~]", "_"},
+ (* Multiple underscores are concatenated. *)
+ {"_{2}", "_"},
+ (* Leading underscores are moved to the end. *)
+ {"^(_+)(.*)$", "$2$1"}} /. Rule -> RuleDelayed;
+ Print["WOMathematicaInterface.m running, revision: $Id$"];
+];
+
+(* Conditionally redefine FortranForm *)
+Unprotect[Re];
+Format[Re, FortranForm] /; WO`WOForm := REAL;
+Protect[Re];
+Unprotect[Im];
+Format[Im, FortranForm] /; WO`WOForm := AIMAG;
+Protect[Im];
+Unprotect[ArcTan];
+Format[ArcTan,FortranForm] /; WO`WOForm := ATAN;
+Protect[ArcTan];
+Unprotect[ArcSin];
+Format[ArcSin,FortranForm] /; WO`WOForm := ASIN;
+Protect[ArcSin];
+Unprotect[ArcCos];
+Format[ArcCos,FortranForm] /; WO`WOForm := ACOS;
+Protect[ArcCos];
+Unprotect[ArcCot];
+Format[ArcCot,FortranForm] /; WO`WOForm := ACOT;
+Protect[ArcCot];
+Format[FortranSec[x_], FortranForm] /; WO`WOForm := 1/FortranCos[x];
+Format[FortranCsc[x_], FortranForm] /; WO`WOForm := 1/FortranSin[x];
+Format[FortranSin[x_], FortranForm] /; WO`WOForm := Sin[x];
+Format[FortranCos[x_], FortranForm] /; WO`WOForm := Cos[x];
+Unprotect[Csc];
+Format[Csc[x_], FortranForm] /; WO`WOForm := FortranCsc[x];
+Protect[Csc];
+Unprotect[Sec];
+Format[Sec[x_], FortranForm] /; WO`WOForm := FortranSec[x];
+Protect[Sec];
+Unprotect[Conjugate];
+Format[Conjugate, FortranForm] /; WO`WOForm := conjg;
+Protect[Conjugate];
+Unprotect[Sqrt, Power];
+Format[Sqrt[x_Integer], FortranForm] /; WO`WOForm := Format["Sqrt (" <> ToString[N[x]] <> ")", OutputForm];
+Protect[Sqrt, Power];
+
+
+WO`WriteOutput[options___]:=Module[{dirName, modelname, onames, frpars, Addpar,
+ reclimit, itlimit, gsymfixed, opts, omegadir, whizdir, opldir, oplotter},
+ (* Global initializations. *)
+ WO`GlobalSetup[];
+
+ (* Insert default options *)
+ opts = Join[{options}, Select[Options[WO`WriteOutput], FreeQ[#[[1]]& /@ {options}, #[[1]]]&]];
+
+ (* Check for unknown options. *)
+ onames = Select[#[[1]]& /@ opts, FreeQ[#[[1]]& /@ Options[WO`WriteOutput], #]&];
+ If[Length[onames] > 0,
+ Print["ERROR: WO`WriteOutput: unknown options: " <> WO`Concat[ToString /@ onames, " , "]];
+ Return[Null];
+ ];
+
+ (* Handle options; model short name *)
+ modelname = WO`SanitizeString[ToLowerCase[WO`WOModelName /. opts]];
+ Print["Short model name is \"" <> modelname <> "\""];
+
+ (* The diverse lists *)
+ WO`masslist = WO`WOMassList /. opts;
+ WO`widthlist = WO`WOWidthList /. opts;
+ WO`EParamList = WO`WOEParamList /. opts;
+ WO`IParamList = WO`WOIParamList /. opts;
+ WO`PartList = WO`WOPartList /. opts;
+
+ (* Maximum number of color flows *)
+ WO`ncfmax = WO`WOMaxNcf /. opts;
+ If[Not[IntegerQ[WO`ncfmax]] || WO`ncfmax < 2,
+ Print["ERROR: WOMaxNcf must be a integer >= 2!"];
+ Return[Null];
+ ];
+
+ (* Gauge *)
+ WO`gauge = WO`WOGauge /. opts;
+ If[Not[MatchQ[WO`gauge, WO`WOUnitarity|WO`WOFeynman|WO`WORxi]],
+ Print["ERROR: unknown gauge requested, take a look at ?WOGauge."];
+ Return[Null];
+ ];
+ Print["Gauge: " <> Switch[WO`gauge, WO`WOUnitarity, "Unitarity", WO`WOFeynman,
+ "Feynman", WO`WORxi, "Rxi", _, "unknown - BUG!"]];
+
+ (* Gauge Symbol *)
+ WO`gsym = Symbol[ToString[WO`WOGaugeParameter /. opts]];
+ If[WO`gauge === WO`WORxi, Print["Gauge symbol: \"" <> ToString[WO`gsym] <> "\""]];
+
+ (* WHIZARD version *)
+ WO`whizv = ToString[WO`WOWhizardVersion /. opts];
+ Print["Generating code for WHIZARD / O'Mega version " <> WO`whizv];
+
+ (* Verbosity *)
+ WO`verbose = WO`WOVerbose /. opts;
+ If[WO`verbose =!= True && WO`verbose =!= False,
+ Print["ERROR: WOVerbose must be either True or False."];
+ Return[Null];
+ ];
+ If[WO`verbose, Print["Verbose output enabled."]];
+
+ (* Vertex processing progress meter *)
+ WO`progress = WO`WOProgress /. opts;
+
+ (* Automagic goldstone masses *)
+ WO`autogauge = WO`WOAutoGauge /. opts;
+ If[WO`autogauge =!= True && WO`autogauge =!= False,
+ Print["ERROR: WOAutoGauge must be either True or False"];
+ Return[Null];
+ ];
+ If[Not[FreeQ[{WO`WOFeynman, WO`WORxi}, WO`gauge]] && WO`autogauge,
+ Print["Automagically assigning Goldstone boson masses..."];
+ ];
+ If[WO`gauge === WO`WORxi && WO`autogauge === True,
+ Print["Adding gauge symbol to parameter list..."];
+ gsymfixed = WO`RegisterEParam[WO`gsym, 1, "Rxi gauge parameter"];
+ If [ToString[gsymfixed] =!= ToString[WO`gsym],
+ Print[""
+ <> "WARNING: parameter name \"" <> ToString[WO`gsym] <> "\" already taken; "
+ <> "substituting \"" <> ToString[gsymfixed] <> "\"!"
+ ];
+ WO`gsym = gsymfixed;
+ ];
+ ];
+
+ (* oplotter ? *)
+ oplotter = WO`WOOplotter /. opts;
+ If[oplotter =!= True && oplotter =!= False,
+ Print["ERROR: WOOplotter must be either True or False"];
+ Return[Null];
+ ];
+
+ (* Maximum number of couplings per file. *)
+ WO`MaxCouplingsPerFile = WO`WOMaxCouplingsPerFile /. opts;
+ If[Not[IntegerQ[WO`MaxCouplingsPerFile]] || WO`MaxCouplingsPerFile <= 0,
+ Print["ERROR: WOMaxCouplingsPerFile must be an positive integer!"];
+ Return[Null];
+ ];
+ Print["Maximum number of couplings per FORTRAN module: " <> ToString[WO`MaxCouplingsPerFile]];
+
+ (* Which parameters should we run if \alpha_s is evolved? *)
+ WO`RunParameters = WO`WORunParameters /. opts;
+
+ (* Be pendantic? *)
+ WO`fast = WO`WOFast /. opts;
+ If[WO`fast =!= True && WO`fast =!= False,
+ Print["ERROR: WOFast must be either True or False"];
+ Return[Null];
+ ];
+ If[WO`fast, Print["Extensive lorentz structure checks disabled."]];
+
+ (* Check if the version is OK *)
+ Catch[WO`whizvn[], WO`EAbort, (Print["ERROR: invalid WHIZARD version"]; Return[])&];
+
+ (* -> Now it is time for version-dependent checks and status messages *)
+ If[WO`whizv19x[], Print["Maximum number of color flows: " <> ToString[WO`ncfmax]]];
+ Switch[{oplotter, WO`whizv19x[]},
+ {True, False},
+ Print["WARNING: oplotter output is not supported with WOWhizardVersion->\"2.0\", disabling..."];
+ oplotter = False,
+ {False, True},
+ Print["Oplotter output disabled."],
+ {True, _},
+ Print["Oplotter output enabled."]
+ ];
+
+ (* Check if the model name is OK. *)
+ If[Not[StringMatchQ[ToLowerCase[modelname], RegularExpression["^fr.*"]]] && WO`whizv19x[],
+ Print[""
+ <> "WARNING: Short Model name doesn't start with \"fr\". O'Mega won't pick "
+ <> "up this model automatically, you will have to add it to the build system "
+ <> "yourself!"]
+ ];
+
+ (* This will be prepended as a comment to every file. *)
+ WO`fileheader = ""
+ <> "--------------------------------------------------------------------------------\n"
+ <> "Autogenerated by the happy scrappy WHIZARD model file generator on " <> Module[{d, s},
+ d = Date[];
+ s = ToString[Round[d[[6]]]];
+ d = ToString /@ d;
+ d[[2]] <> "/" <> d[[3]] <> "/" <> d[[1]] <> " , " <> d[[4]] <> ":" <> d[[5]] <> ":" <> s] <> "\n"
+ <> "WHIZARD interface svn revision info: $Id$\n"
+ <> "Code generated for WHIZARD / O'Mega version " <> WO`whizv <> "\n"
+ <> "Model name: " <> modelname <> "\n"
+ <> "Gauge: " <> WO`GaugeName[] <> "\n"
+ <> "Maximum number of couplings per FORTRAN module: " <> ToString[WO`MaxCouplingsPerFile] <> "\n"
+ <> "--------------------------------------------------------------------------------" <> "\n"
+ <> ToString[WO`WOExtraComment /. opts] <> "\n"
+ <> "--------------------------------------------------------------------------------";
+
+ (*Create directory if not present.*)
+ dirName=WO`WOOutputDir /. opts /. Null :> (
+ ToFileName[{Directory[], StringReplace[modelname, " " ->"-"] <> "-WO"}]);
+ If[!StringMatchQ[dirName, RegularExpression[WO`absolutePathPattern]],
+ dirName = ToFileName[{Directory[], dirName}]];
+
+ (* Save and adjust iteration and recursion limits *)
+ $IterationLimit = Max[itlimit = $IterationLimit, 100000];
+ $RecursionLimit = Max[reclimit = $RecursionLimit, 100000];
+
+ (* Activate our FortranForm rules *)
+ WO`WOForm = True;
+
+ Catch[
+ WO`CautiousMd[dirName];
+ WO`VersionCheck[dirName];
+
+ (* Create vertex list. *)
+ WO`vlist = Evaluate[ReleaseHold[WO`WOVertexList /. opts]];
+ If[Head[WO`vlist] =!= List,
+ Print[WO`vlist];
+ Print["ERROR: vertex list invalid!"];
+ Return[];
+ ];
+ If[Length[WO`vlist] == 0,
+ Print["Vertex list empty; nothing to, aborting..."];
+ Return[];
+ ];
+
+ WO`CautiousMd[omegadir = ToFileName[{dirName, "omega"}]];
+ WO`CautiousMd[whizdir = ToFileName[{dirName, "whizard"}]];
+ If[oplotter,
+ WO`CautiousMd[opldir = ToFileName[{dirName, "oplotter"}]];
+ ];
+ WO`omeganame = WO`oplname = WO`whizname = ToLowerCase[modelname];
+
+ Print["Writing files to ",dirName,"\n"];
+
+ WO`WriteOmega[omegadir];
+ If[oplotter, WO`WriteOpl[opldir]];
+ WO`WriteWhiz[whizdir];
+ WO`CopyAux[WO`InterfacePath, dirName];
+
+ Print["Done!"];
+ If[WO`whizv19x[], Print[""
+ <> "Most likely your next step should to use the \"inject\" script which has been copied "
+ <> "to the output directory to inject the model files into WHIZARD / O'Mega..."
+ ]];
+ If[WO`whizv2x[], Print [""
+ <> "You should now use the configure script which has been copied to the output "
+ <> "directory to configure the build system (use the variable WO_CONFIG and consult "
+ <> "\"configure --help\" if WHIZARD is not installed in the system search path). Afterwards, "
+ <> "the model files can be compiled and installed via \"make install\"."
+ ]];
+
+ , WO`EAbort, Function[{val, tag},
+ If[Head[val] === String, Print[val]];
+ Print["Aborting..."];
+ ]];
+
+ (* Restore Limits *)
+ $IterationLimit = itlimit;
+ $RecursionLimit = reclimit;
+ WO`WOForm = False;
+];
+
+(* Get the name of a gauge. *)
+WO`GaugeName[g_] := Switch[g, WO`WOUnitarity, "Unitarity", WO`WOFeynman, "Feynman", WO`WORxi, "Rxi",
+ _, Throw[WO`EAbort, "BUG: WO`GaugeName: illegal gauge " <> ToString[g]]];
+WO`GaugeName[] := WO`GaugeName[WO`gauge];
+
+(* Version query helpers *)
+WO`whizvn[v_] := Switch[v, "1.93", 193, "1.95", 195, "1.96", 196, "2.0", 200, "2.0.3", 203, _,
+ Throw["BUG: invalid version in WO`whizvn, please report", WO`EAbort]];
+WO`whizvn[] := WO`whizvn[WO`whizv];
+WO`whizv2x[] := WO`whizvn[] >= WO`whizvn["2.0"];
+WO`whizv19x[] := !WO`whizv2x[];
+
+
+(* Those should be overwritten when called from FR. *)
+WO`tmp = Length[Names["WO`HC"]];
+If[WO`tmp < 1,
+ WO`HC[p_] := Symbol[ToString[WO`hash["HC", ToString[p]]]];
+];
+
+(* Conditional Simplify and FullSimplify *)
+WO`Simplify[x_, o___] := If[WO`fast, x, Simplify[x, o]];
+WO`FullSimplify[x_, o___] := If[WO`fast, x, FullSimplify[x, o]];
+
+(* Return a list of all symbols that have already been defined. *)
+WO`SymbolsList[] := WO`WeedOutList[Join[
+ #[[2, 1]]& /@ Flatten[#[[2]]& /@ WO`EParamList, 1],
+ #[[1]]& /@ WO`IParamList,
+ #[[2]]& /@ WO`masslist,
+ #[[2]]& /@ WO`widthlist]];
+
+(* Append a new parameter to WO`EParamList *)
+WO`RegisterEParam[par_, val_, descr_] := Module[{EPLCopy, params, blocks, i, bname, bdata, index, pname},
+ EPLCopy = WO`EParamList;
+ (* All already defined parameters. *)
+ params = ToUpperCase /@ (ToString /@ WO`SymbolsList[]);
+ (* All already defined block names. *)
+ blocks = ToString /@ (#[[1]]& /@ EPLCopy);
+ If[Not[StringMatchQ[ToString[EPLCopy[[-1, 1]]], RegularExpression["^WOAUTOGEN(_\\d+)?"]]],
+ (* If no WOAUTOGEN block exists, create one. As out block always will be the last one,
+ we have to provide disambiguations in case another WOAUTOGENx block has been defined
+ further up in the list (though admittedly unlikely), *)
+ bname = "WOAUTOGEN";
+ i = 0;
+ While[Not[FreeQ[blocks, bname]],
+ bname = "WOAUTOGEN" <> ToString[i];
+ i++;
+ ];
+ bdata = {};
+ index = 1;
+ ,
+ (* If the block exists, copy name and data and delete it. *)
+ bname = ToString[EPLCopy[[-1, 1]]];
+ bdata = EPLCopy[[-1, 2]];
+ index = bdata[[-1, 1, 1]] + 1;
+ EPLCopy = Take[EPLCopy, {1, -2}];
+ ];
+ pname = ToString[par];
+ i = 0;
+ (* Disambiguate the parameter name if necessary. *)
+ While[Not[FreeQ[params, ToUpperCase[pname]]],
+ pname = ToString[par] <> ToString[i];
+ i++;
+ ];
+ (* Put together the block with the new parameter appended and reappend it. *)
+ AppendTo[bdata, {{index}, {Symbol[pname], val, False, descr}}];
+ AppendTo[EPLCopy, {Symbol[bname], bdata}];
+ WO`EParamList = EPLCopy;
+ (* Return the parameter name to allow the calling code to check whether it has been changed. *)
+ Return[Symbol[pname]];
+];
+
+(* Append a parameter to WO`IParamList. *)
+WO`RegisterIParam[par_, expr_, descr_, da_] := Module[{params, i, pname},
+ params = ToUpperCase /@ (ToString /@ WO`SymbolsList[]);
+ pname = ToString[par];
+ If[da,
+ i = 0;
+ While[Not[FreeQ[params, ToUpperCase[pname]]],
+ pname = ToString[par] <> ToString[i];
+ i++;
+ ];
+ ];
+ AppendTo[WO`IParamList, {Symbol[pname], expr, False, descr}];
+ Return[Symbol[pname]];
+];
+WO`RegisterIParam[par_, expr_, descr_] := WO`RegisterIParam[par, expr, descr, True];
+
+(* Append a mass to WO`masslist. *)
+WO`RegisterMass[mass_, val_, pdg_, da_] := Module[{masses, i, mname},
+ masses = ToUpperCase /@ (ToString /@ WO`SymbolsList[]);
+ mname = ToString[mass];
+ If[da,
+ i = 0;
+ While[Not[FreeQ[masses, ToUpperCase[mname]]],
+ mname = ToString[mass] <> ToString[i];
+ i++;
+ ];
+ ];
+ AppendTo[WO`masslist,{{pdg}, Symbol[mname], val}];
+ Return[Symbol[mname]];
+];
+WO`RegisterMass[mass_, val_, pdg_] := WO`RegisterMass[mass, val, pdg, True];
+
+(* Sanitize a string, putting it into a form suitable for Caml and FORTRAN *)
+WO`SanitizeString[s_] := WO`StringReplaceAll[s, WO`StringRules];
+
+(* Convert a string into a comment. *)
+WO`CommentMaker[s_, beg_, line_, end_] :=
+ StringReplace[s, {RegularExpression["^"] -> beg, RegularExpression["\n"] -> ("\n" <> line),
+ RegularExpression["$"] -> end}];
+
+(* Replace patterns until the result doesn't change anymore. *)
+WO`StringReplaceAll[s_, l_List] := FixedPoint[StringReplace[#, l]&, s];
+WO`StringReplaceAll[s_, l_] := WO`StringReplaceAll[s, {l}];
+
+(* Split a FORTRAN statement into lines of approximately 80 characters, indenting by 3 blanks and adding "&" *)
+WO`FortranSplit[s_] := WO`FortranSplit[s, 80, 3];
+WO`FortranSplit[str_, min_, ni_] := Module[{spacer, helper},
+ spacer = StringJoin @@ Table[" ", {i, 1, ni}];
+
+ helper[s_, l_, {}] := s;
+ helper[s_, l_, {head_, tail___}] := If[
+ (l + StringLength[head] <= min) || s == "",
+ helper[s <> head, l + StringLength[head], {tail}]
+ ,
+ helper[s <> " &\n" <> spacer <> head, 0, {tail}]
+ ];
+
+ helper["", 0, StringSplit[str, RegularExpression["([^\\w\\.]+)"] :> "$1"]]
+];
+
+
+(* Split a string into lines of approximately n characters, prepending p and appending a *)
+WO`StringSplit[s_, n_, p_, a_] := StringJoin @@
+ StringSplit[s, {
+ RegularExpression["(.{" <> ToString[n] <> "})\\s+(\\S)"] :> ("$1" <> a <> "\n" <> p <> "$2")
+ ,
+ "\n" -> "\n" <> p
+ }];
+
+(* Remove double occurences of list elements, based on a predicate function. *)
+WO`WeedOutList[{hd_, tl__}, pred_] :=
+ If[pred[hd, {tl}], Prepend[WO`WeedOutList[{tl}, pred], hd], WO`WeedOutList[{tl}, pred]];
+WO`WeedOutList[{hd_}, pred_] := {hd};
+WO`WeedOutList[{}, _] := {};
+WO`WeedOutList[l_] := WO`WeedOutList[l, FreeQ[#2, #1]&];
+
+(* Render a FORTRAN double precision complex number. *)
+WO`FortranComplex[n_] := "(" <> ToString[Re[n]] <> "_double, " <> ToString[Im[n]] <> "_double)";
+
+(* Extends a string using spaces. *)
+WO`ExtendString[s_, n_] := If[StringLength[s] < n,
+ s <> StringJoin @@ Table[" ", {i, 1, n - StringLength[s]}], s];
+
+(* Concatenate two strings smartly, inserting a linebreak if the resulting *
+ * l line would exceed 80 characters, and optionally indenting the new line. *
+ * Lines don't get broken if this would intruduce a blank line. *)
+WO`SmartAppend[source_, target_, n_, cont_] := Module[{spacer, lastline, firstline},
+ If[n > 1, spacer = StringJoin @@ Table[" ", {i, 1, n}], spacer = ""];
+ lastline = StringCases[target, RegularExpression["[^\n]*$"]][[1]];
+ firstline = StringCases[source, RegularExpression["^[^\n]*"]][[1]];
+ If[StringLength[lastline <> firstline] <= 80 || StringMatchQ[lastline, RegularExpression["^\\s*$"]],
+ target <> source, target <> cont <> "\n" <> spacer <> source]
+];
+WO`SmartAppend[source_, target_, n_] := WO`SmartAppend[source, target, n, ""];
+WO`SmartAppend[source_, target_] := WO`SmartAppend[source, target, 0];
+
+
+(* Indent the lines of a text by n blanks *)
+WO`Indent[s_, n_] := Module[{spacer},
+ spacer = StringJoin @@ Table[" ", {i, 1, n}];
+ StringReplace[s, {RegularExpression["(?m)^(.+)$"] :> spacer <> "$1",
+ RegularExpression["\n(.+)"] :> ("\n" <> spacer <> "$1")}]
+] /; n > 1;
+
+(* Uppercase the first letter *)
+WO`FirstUpper[s_] := StringReplace[s, RegularExpression["^(.)"] :> ToUpperCase["$1"]];
+
+(* Lowercase the first letter *)
+WO`FirstLower[s_] := StringReplace[s, RegularExpression["^(.)"] :> ToLowerCase["$1"]];
+
+(* Smart concatenation of a string list to a target introducing spacers *)
+WO`SmartConcatRev[List[hd_, tl__], spacer_, i_, cont_] := WO`SmartAppend[spacer <> hd,
+ WO`SmartConcatRev[List[tl], spacer, i, cont], i, cont];
+WO`SmartConcatRev[List[hd_], spacer_, i_, cont_] := hd;
+WO`SmartConcatRev[l_, s_, i_] := WO`SmartConcatRev[l, s, i, ""];
+WO`SmartConcatRev[l_, s_] := WO`SmartConcatRev[l, s, 0];
+WO`SmartConcat[l_,o___] := WO`SmartConcatRev[Reverse[l], o];
+WO`SmartConcat[{}, ___] := "";
+
+(* Not so smart concatenation, not taking care of breaking lines *)
+WO`Concat[List[hd_, tl__], spacer_] := hd <> spacer <> WO`Concat[{tl}, spacer];
+WO`Concat[{hd_}, _] := hd;
+WO`Concat[{}, _] := "";
+
+(* Transform a expression into sindarin via a piece of cheatery using FORTRAN form and
+ regular expressions. *)
+WO`SindarinForm[e_] := Module[{},
+ If[Not[FreeQ[e, Re] && FreeQ[e, Im] && FreeQ[e, Complex]],
+ Print[""
+ <> "WARNING: complex calculus is not yet implemented in sindarin. Continuing operation, "
+ <> "but the output is most likely dysfunctional."
+ ]];
+ WO`StringReplaceAll[ToString[FortranForm[e /.
+ { Power[E, x_] :> WO`exp[x], Sec[x_] :> 1/WO`cos[x], Csc[x_] :> 1/WO`sin[x],
+ Sech[x_] :> 1/WO`cosh[x], Csch[x_] :> 1/WO`sinh[x] }
+ ]], WO`f2sin]
+];
+
+(* Split a sindarin expression into multiple lines. *)
+WO`SindarinSplit[s_] := WO`FortranSplit[s, 80, 3];
+WO`SindarinSplit[str_, min_, ni_] := Module[{spacer, helper},
+ spacer = StringJoin @@ Table[" ", {i, 1, ni}];
+
+ helper[s_, l_, {}] := s;
+ helper[s_, l_, {head_, tail___}] := If[
+ (l + StringLength[head] <= min) || s == "",
+ helper[s <> head, l + StringLength[head], {tail}]
+ ,
+ helper[s <> " \n" <> spacer <> head, 0, {tail}]
+ ];
+
+ helper["", 0, StringSplit[str, RegularExpression["([^\\w\\.]+)"] :> "$1"]]
+];
+
+(* Check if a version stamp exists; if it does, read it and check if matches. *)
+WO`VersionCheck[dir_] := Module[{handle, v},
+ If[Length[FileNames[{"WhizardVersion"}, dir]] != 1,
+ handle = OpenWrite[ToFileName[dir, "WhizardVersion"]];
+ WriteString[handle, WO`whizv];
+ Close[handle];
+ ,
+ handle = OpenRead[ToFileName[dir, "WhizardVersion"]];
+ v = StringReplace[Read[handle, String], RegularExpression["\\s+"] -> ""];
+ Close[handle];
+ If[v != WO`whizv,
+ Throw["ERROR: output directory already contains files generated for a differen WHIZARD / O'Mega version",
+ WO`EAbort]
+ ];
+ ];
+];
+
+(* Copy the auxiliary files. *)
+WO`CopyAux[srcdir_, destdir_] := Module[{CopyHelper},
+ If[WO`whizv19x[],
+ CopyHelper[stem_] := Module[{srcfiles, filenames, destfiles},
+ srcfiles = Select[FileNames[{"*"}, ToFileName[{srcdir, stem}]],
+ Not[StringMatchQ[#, "*.svn*"]]&];
+ filenames =
+ StringReplace[#, RegularExpression[
+ "^.*" <> WO`fileSlashRE <> "([^" <> WO`fileSlashRE <> "]+)$"] :> "$1"]& /@ srcfiles;
+ destfiles = Select[FileNames[{"*"}, destdir], (!FreeQ[filenames,
+ StringReplace[#, RegularExpression[
+ "^.*" <> WO`fileSlashRE <> "([^" <> WO`fileSlashRE <> "]+)$"] :> "$1"]])&];
+ Catch[
+ If[(Print["Deleting " <> # <> " ..."]; DeleteFile[#]) === $Failed,
+ Throw[Null, WO`EFileSystem]]& /@ destfiles;
+ If[(Print["Copying " <> # <> " ..."];
+ CopyFile[ToFileName[{srcdir, stem}, #], ToFileName[destdir, #]]) === $Failed,
+ Throw[Null, WO`EFileSystem]]& /@ filenames;
+ , WO`EFileSystem,
+ Throw["ERROR copying auxiliary files...", WO`EAbort]&
+ ];
+ ];
+ CopyHelper /@ {"all_19x", WO`whizv};
+ ];
+ If[WO`whizv2x[],
+ CopyHelper[{filea_, fileb_}] := Module[{src, dest, sdir, sfile, ddir, dfile},
+ src = ToFileName[{srcdir, "2.0"}, filea];
+ dest = ToFileName[destdir, fileb];
+ StringReplace[src, RegularExpression[
+ "^(.*" <> WO`fileSlashRE <> ")([^" <> WO`fileSlashRE <> "]+)$"] :>
+ (sdir = "$1"; sfile = "$2"; "")];
+ StringReplace[dest, RegularExpression[
+ "^(.*" <> WO`fileSlashRE <> ")([^" <> WO`fileSlashRE <> "]+)$"] :>
+ (ddir = "$1"; dfile = "$2"; "")];
+ Catch[
+ If[Length[FileNames[{dfile}, ddir]] != 0,
+ If[(Print["Deleting " <> dest <> " ..."]; DeleteFile[dest]) === $Failed,
+ Throw[Null, WO`EFileSystem]]
+ ];
+ If[(Print["Copying " <> sfile <> " ..."]; CopyFile[src, dest]) === $Failed,
+ Throw[Null, WO`EFileSystem]];
+ ,
+ WO`EFileSystem, Throw["ERROR copying auxiliary files...", WO`EAbort]&
+ ];
+ ];
+ CopyHelper /@ {
+ {"configure.ac", "configure.ac"},
+ {"configure", "configure"},
+ {"install-sh", "install-sh"},
+ {"Makefile.in", "Makefile.in"},
+ {"Makefile.omega.in", ToFileName["omega", "Makefile.in"]},
+ {"Makefile.whizard.in", ToFileName["whizard", "Makefile.in"]},
+ {"INSTALL", "INSTALL"}
+ };
+ ];
+];
+
+(* Write the O'Mega model files *)
+WO`WriteOmega[dir_] := Module[{prefix, drvname, cdrvname},
+ prefix = ToFileName[dir, WO`omeganame];
+ If [WO`whizv2x[],
+ Print["Writing O'Mega module signature to " <> prefix <> "_mdl.mli ..."];
+ WO`WriteOmegaSig[prefix <> "_mdl.mli"];
+ Print["Writing O'Mega module to " <> prefix <> "_mdl.ml ..."];
+ WO`WriteOmegaStruct[prefix <> "_mdl.ml"];
+ drvname = ToFileName[dir, "omega_" <> WO`omeganame <> ".ml"];
+ Print["Writing O'Mega binary driver to " <> drvname <> " ..."];
+ WO`WriteOmegaBinary[drvname, "", WO`ncfmax];
+ ,
+ Print["Writing O'Mega module signature to " <> prefix <> ".mli ..."];
+ WO`WriteOmegaSig[prefix <> ".mli"];
+ Print["Writing O'Mega module to " <> prefix <> ".ml ..."];
+ WO`WriteOmegaStruct[prefix <> ".ml"];
+ drvname = ToFileName[dir, "f90_" <> WO`omeganame <> ".ml"];
+ cdrvname = ToFileName[dir, "f90_" <> WO`omeganame <> "_Col.ml"];
+ Print["Writing O'Mega binary drivers to " <> drvname <> " and " <> cdrvname <> " ..."];
+ WO`WriteOmegaBinary[drvname, cdrvname, WO`ncfmax];
+ ];
+];
+
+(* Write the oplotter part. *)
+WO`WriteOpl[dir_] := Module[{gluefile, prefix},
+ gluefile = ToFileName[dir, "opl_" <> WO`oplname <> ".f90"];
+ Print["Writing oplotter FORTRAN glue to " <> gluefile " ..."];
+ WO`WriteOplGlue[WO`opldir <> gluefile];
+ prefix = ToFileName[dir, WO`oplname <> ".f90"];
+ Print["Writing oplotter model definitions to " <> prefix <> ".mdl and " <> prefix <> ".grb ..."];
+ WO`WriteOplMdl[prefix <> ".mdl", prefix <> ".grb"];
+];
+
+(* Write the WHIZARD part. *)
+WO`WriteWhiz[dir_] := Module[{whizmdl, whizglue},
+ whizmdl = ToFileName[dir, WO`whizname <> ".mdl"];
+ Print["Writing WHIZARD model file to " <> whizmdl <> " ..."];
+ WO`WriteWhizMdl[whizmdl];
+ whizglue = ToFileName[dir, "parameters." <> WO`whizname <> If[WO`whizv19x[], ".omega", ""]];
+ Print["Writing WHIZARD FORTRAN glue..."];
+ WO`WriteWhizGlue[whizglue];
+];
+
+(* Write the O'Mega model signature *)
+WO`WriteOmegaSig[file_] := Module[{handle, contents},
+ handle = OpenWrite[file];
+ contents = ""
+ <> WO`CommentMaker[WO`fileheader, "(* ", " ", " *)"] <> "\n"
+ <> "\n"
+ <> "type gauge = Unitarity | Feynman | Rxi\n"
+ <> "\n"
+ <> "module type Frules_options = \n"
+ <> "sig\n"
+ <> " val gauge: gauge\n"
+ <> " val color: bool\n"
+ <> "end\n"
+ <> "\n"
+ <> "module Implementation: functor (Opts: Frules_options) -> Model.T\n"
+ <> If[WO`whizvn[] >= WO`whizvn["2.0.3"], " with module Ch = Charges.Null\n", ""];
+ WriteString[handle, contents];
+ Close[handle];
+];
+
+(* During the initial particle list parsing, a number of hashes is filled for later use. These are: *
+ * "constr" O'Mega constructor / "lrep" lorentz representation / "oname" O'Mega name / *
+ * "colrep" SU(3) representation / "pdg" pdg number / "mass" mass / "revpdg" pdg -> tag, *
+ * "whizname" WHIZARD name, "conj" conjugation, "cpl" coupling <-> symbol *
+ * "oids" omega identifier register, "goldstone" goldstone flag, "HC": WO`HC helper *)
+
+(* Write the O'Mega module structure *)
+WO`WriteOmegaStruct[file_] := Module[{handle, contents, preamble, flavor, color, pdg, lorentz,
+ gauge, propagator, width, conjugate, fermion, colsymm, constant, maxdegree, vertices, fusions,
+ flavors, extflavor, goldstone, parameters, flavortostring, flavorofstring, flavorsym, gaugesym,
+ masssym, widthsym, texsym, constsym, options, rcs, ParsePList, sanscolorstubs, charges},
+
+ (* Parse the Particle List *)
+ ParsePList[] := Module[{classtypes, ltypes, ftype, trampolines, mlists, clists, ltdict,
+ taglists, pdglists, cconjugators, lconjugators, creplists, lreplists, fsymlists,
+ nonecolored, gslists, msymlists, wsymlists, tsymlists, ParsePart, ParseClass, OmegaConstructor,
+ LTHelper, gsmasses},
+
+ (* Remap PDGs which have been assigne multiple times. But remapping these induces other issues, so *
+ * we just warn the user. *)
+ FixPDG[pdg_, tag_] := Module[{mtag},
+ If[FreeQ[mtag = WO`hash["revpdg", pdg], WO`hash],
+ Print[""
+ <> "WARNING: PDG " <> ToString[pdg] <> " has been assigned both to \""
+ <> ToString[tag] <> "\" and \"" <> ToString[mtag] <> "\". This will NOT work with "
+ <> "WHIZARD, you'll have to fix your model before plugging it into WHIZARD. "
+ <> "O'Mega will and oplotter might work though..."];
+ ];
+ ];
+
+ ltdict[x_] := Switch[x, 1, "scalar", 2, "fermion", 3, "vector", 4, "tensor",
+ "S", 1, "F", 2, "V", 3, "T", 4];
+ classtypes = "";
+ ltypes = {"", "", "", ""};
+ trampolines = "";
+ mlists = "";
+ clists = {"", "", "", ""};
+ cconjugators = "";
+ lconjugators = {"", "", "", ""};
+ nonecolored = {True, True, True, True};
+ (* These nested lists warrant some explanation: each sublist is a list of pattern *
+ * matching associations, each of the type "A -> B", with B possible extending over *
+ * multiple lines. They get glued together to form the query functions required by *
+ * O'Mega. *)
+ taglists = pdglists = creplists = lreplists = gslists = msymlists = wsymlists = fsymlists = tsymlists =
+ {{}, {}, {}, {}};
+ gsmasses = {};
+
+ (* Generates a mass identifier for a goldstone boson and adds it to the gsmasses. *)
+ RegisterGoldstone[name_, gboson_, pdg_] := Module[{msym},
+ msym = "m" <> StringReplace[ToString[name], RegularExpression["[^a-zA-Z\\d]"] -> ""];
+ msym = WO`RegisterMass[msym, Null, pdg];
+ AppendTo[gsmasses, {name, msym, gboson}];
+ Return[msym];
+ ];
+
+ (* Generate the actual expression for a goldstone boson mass. To be mapped on gsmasses. *)
+ ProcessGoldstone[{name_, msym_, gboson_}] :=
+ WO`RegisterIParam[msym,
+ If[WO`gauge === WO`WORxi,Sqrt[WO`gsym] * WO`hash["mass", gboson], WO`hash["mass", gboson]],
+ ToString[name] <> " mass (autogenerated by the interface)", False];
+
+ (* Create a valid constructor. *)
+ OmegaConstructor[s_] := Module[{i, c},
+ c = WO`FirstUpper[WO`SanitizeString[s]];
+ i = 1;
+ If[WO`hash["oids", ToLowerCase[c]] === True,
+ While[WO`hash["oids", ToLowerCase[c] <> "_" <> ToString[i]] === True, i++];
+ c = c <> "_" <> ToString[i];
+ ];
+ WO`hash["oids", ToLowerCase[c]] = True;
+ c
+ ];
+
+ (* Parse class description *)
+ ParseClass[{cdesc_, plist_}] := Module[{cname, LTHelper, classtype, mlist, cconjugator, taglist, pdglist,
+ creplist, lreplist, allcharged, majoranas, spinors, cspinors, vectors, hvectors, tensors, htensors, allcolored,
+ fsu3s, afsu3s, asu3s, gslist, msymlist, wsymlist, tsymlist, allmassive, allnzw, allgoldstones, fsymlist},
+ classtype = "";
+ mlist = "";
+ cconjugator = "";
+ allcharged = allcolored = allgoldstones = allmassive = allnzw = True;
+ majoranas = spinors = cspinors = vectors = hvectors = tensors = htensors = {};
+ fsu3s = afsu3s = asu3s = {};
+ (* See above; lists of mattern matching associations that get glued together with *
+ * the class constructors to form new pattern matching associations *)
+ taglist = pdglist = creplist = lreplist = gslist = msymlist = wsymlist = fsymlist = tsymlist = {};
+
+ (* Parse particle description *)
+ ParsePart[{name_, aname_, spin_, prop_, msym_, wsym_, crep_, plabel_, pdg_, descr_, tex_, atex_, gs_}] :=
+ Module[{sname, saname, RegisterParticle},
+
+ (* Register a particle *)
+ RegisterParticle[pname_, ptag_, ppdg_, anti_, sconj_] := Module[{realmsym},
+ (* This can be dynamically changed, so initialize it here *)
+ realmsym = msym;
+ (* Add particle to global list. *)
+ AppendTo[WO`taglist, ptag];
+ (* Append constructor for particle to class type *)
+ classtype = WO`SmartAppend[" | " <> WO`FirstUpper[pname], classtype];
+ (* Append constructor to class member list *)
+ mlist = WO`SmartAppend[" " <> WO`FirstUpper[pname] <> ";", mlist];
+ (* add a hash from the particle tag to the full ocaml type *)
+ WO`hash["constr", ptag] = "FR" <> ToString[spin] <> " (" <> WO`FirstUpper[cname] <> " " <> WO`FirstUpper[pname] <> ")";
+ (* Add translation from flavor to tag *)
+ AppendTo[taglist, WO`FirstUpper[pname] <> " -> \"" <> ptag <> "\""];
+ (* The TeX symbol *)
+ AppendTo[tsymlist, WO`FirstUpper[pname] <> " -> \"" <> StringReplace[If[anti, atex, tex], "\\" -> "\\\\"] <> "\""];
+ (* PDG number *)
+ FixPDG[ppdg, ptag];
+ AppendTo[pdglist, WO`FirstUpper[pname] <> " -> " <> ToString[ppdg]];
+ WO`hash["pdg", ptag] = ppdg;
+ WO`hash["revpdg", ppdg] = ptag;
+ (* Color representation *)
+ Switch[crep,
+ S, (allcolored = False; WO`hash["colrep", ptag] = "S"),
+ T, If[anti, AppendTo[afsu3s, WO`FirstUpper[pname]]; WO`hash["colrep", ptag] = "f",
+ AppendTo[fsu3s , WO`FirstUpper[pname]]; WO`hash["colrep", ptag] = "F"],
+ O, AppendTo[asu3s, WO`FirstUpper[pname]]; WO`hash["colrep", ptag] = "O";
+ ];
+ (* If a lorentz type contains no colored particles, the pattern matching may be *
+ * shortened *)
+ nonecolored[[ltdict[ToString[spin]]]] = nonecolored[[ltdict[ToString[spin]]]] && (crep == S);
+ (* Lorentz representation *)
+ Switch[spin,
+ V, Switch[msym,
+ ZERO, AppendTo[vectors, WO`FirstUpper[pname]],
+ _, AppendTo[hvectors, WO`FirstUpper[pname]]],
+ T, Switch[msym,
+ ZERO, AppendTo[tensors, WO`FirstUpper[pname]],
+ _, AppendTo[htensors, WO`FirstUpper[pname]]],
+ F, Switch[{sconj, anti},
+ {True, _}, (AppendTo[majoranas, WO`FirstUpper[pname]]; WO`havemajoranas=True),
+ {False, False}, AppendTo[spinors, WO`FirstUpper[pname]],
+ {False, True}, AppendTo[cspinors, WO`FirstUpper[pname]]]
+ ];
+ (* Goldstone boson? As we most likely don't know the gauge boson constructor at ths point, *
+ * we have to treat this special, sigh, again. If we are using Feynman or Rxi gauge and are*
+ * expected to assign the goldstone masses automatically, we must invoke the handler. *)
+ If[spin == S && ToString[gs] != "NoGS",
+ AppendTo[gslist, {WO`FirstUpper[pname] <> " -> Some ", ToString[PartName[If[anti, WO`HC[gs], gs]]]}];
+ If[WO`autogauge && Not[FreeQ[{WO`WOFeynman, WO`WORxi}, WO`gauge]],
+ realmsym = RegisterGoldstone[ptag, ToString[PartName[If[anti, WO`HC[gs], gs]]], ppdg]
+ ];
+ WO`hash["goldstone", ToString[ptag]] = True;
+ ,
+ allgoldstones = False;
+ WO`hash["goldstone", ToString[ptag]] = False;
+ ];
+ (* Mass *)
+ Switch[realmsym,
+ ZERO, allmassive = False,
+ _?NumericQ, AppendTo[msymlist, WO`FirstUpper[pname] <> " -> " <> "\""
+ <> ToString[realmsym] <> "\""],
+ _, AppendTo[msymlist, WO`FirstUpper[pname] <> " -> \"" <> ToLowerCase[ToString[realmsym]] <> "\""]
+ ];
+ WO`hash["mass", ptag] = realmsym;
+ (* Width *)
+ Switch[wsym,
+ ZERO, allnzw = False,
+ _?NumericQ, AppendTo[wsymlist, WO`FirstUpper[pname] <> " -> " <> "\""
+ <> ToString[wsym] <> "\""],
+ _, AppendTo[wsymlist, WO`FirstUpper[pname] <> " -> \"" <> ToLowerCase[ToString[wsym]] <> "\""]
+ ];
+ (* Add a Lorentz type code to the hash *)
+ WO`hash["lrep", ptag] = Switch[spin,
+ S, "S", V, "V", T, "T",
+ F, Switch[{sconj, anti}, {True, _}, "M", {False, False}, "F", _, "f"]
+ ];
+ (* Add a hash from the particle tag to the O'Mega name *)
+ WO`hash["oname", ptag] = pname;
+ (* Almost forgot this one: flavor symbol *)
+ AppendTo[fsymlist, WO`FirstUpper[pname] <> " -> \"" <> ToLowerCase[pname] <> "\""];
+ ];
+
+ (* Construct sane names *)
+ sname = OmegaConstructor[name];
+ saname = OmegaConstructor[aname];
+ WO`hash["conj", name] = aname;
+ WO`hash["conj", aname] = name;
+ RegisterParticle[sname, name, pdg, False, name == aname];
+ allcharged = allcharged && (name != aname);
+ If[name != aname,
+ RegisterParticle[saname, aname, -pdg, True, False];
+ cconjugator = WO`SmartAppend[" | " <> WO`FirstUpper[sname] <> " -> "
+ <> WO`FirstUpper[saname], cconjugator];
+ cconjugator = WO`SmartAppend[" | " <> WO`FirstUpper[saname] <> " -> "
+ <> WO`FirstUpper[sname], cconjugator];
+ ];
+ ];
+
+ (* A helper digesting the lorentz type *)
+ LTHelper[idx_] := Module[{trampoline, MakePMatcher},
+
+ (* Step up one level in a pattern matcher. Take care to treat a several patterns *
+ * matching to one value as multiple matching pairs (use match x with) *)
+ MakePMatcher[Hold[lists_], list_] := Module[{text},
+ Switch[Length[list] + If[And @@ (StringFreeQ[#, "|"]& /@ Append[list, "a"]), 0, 1] ,
+ 0, Null,
+ 1, (
+ text = list[[1]];
+ AppendTo[lists[[idx]], WO`FirstUpper[cname] <> " " <> text];),
+ _Integer, (
+ text = " | " <> WO`SmartConcat[list, " | "];
+ AppendTo[lists[[idx]], WO`FirstUpper[cname] <> " x -> (match x with \n"
+ <> WO`Indent[text, 2] <> ")"] ;)
+ ];
+ ];
+
+ (* Add the class constructor to the lorentz type *)
+ ltypes[[idx]] = WO`SmartAppend[" | " <> WO`FirstUpper[cname] <> " of " <> WO`FirstLower[cname], ltypes[[idx]]];
+ (* Add the trampoline to class -> lorentz type *)
+ trampoline = WO`FirstLower[ltdict[idx]] <> "_of_" <> WO`FirstLower[cname];
+ trampolines = trampolines <> "let " <> trampoline <> " c = " <> WO`FirstUpper[cname] <> " c\n";
+ (* Add the class members to the lorentz level particle list*)
+ clists[[idx]] = WO`SmartAppend[" @ (List.map " <> trampoline <> " " <> WO`FirstLower[cname] <> "_members)", clists[[idx]]];
+ (* Add the class conjugator to the lorentz conjugator *)
+ lconjugators[[idx]] = lconjugators[[idx]] <> "| " <> WO`FirstUpper[cname] <> " x -> " <> WO`FirstUpper[cname]
+ <> " (conjugate_" <> WO`FirstLower[cname] <> " x)\n";
+ (* Construct class level of the flavor -> tag translation *)
+ MakePMatcher[Hold[taglists], taglist];
+ (* Dito, TeX symbol *)
+ MakePMatcher[Hold[tsymlists], tsymlist];
+ (* Dito, PDG *)
+ MakePMatcher[Hold[pdglists], pdglist];
+ (* Color Representation *)
+ If[Not[allcolored], AppendTo[creplist, "_ -> Color.Singlet"]];
+ MakePMatcher[Hold[creplists], creplist];
+ (* Lorentz Representation *)
+ MakePMatcher[Hold[lreplists], lreplist];
+ (* Goldstone Bosons *)
+ (* TODO: defunct atm *)
+ (*
+ gslist = (#[[1]] <> "(" <> WO`hash["constr", #[[2]]] <> ", Const 1)")& /@ gslist;
+ If[idx == 1 && Not[allgoldstones], AppendTo[gslist, "_ -> None"]];
+ MakePMatcher[Hold[gslists], gslist];
+ *)
+ (* Mass *)
+ If[Not[allmassive], AppendTo[msymlist, "_ -> \"fr_zero\""]];
+ MakePMatcher[Hold[msymlists], msymlist];
+ (* Width *)
+ If[Not[allnzw], AppendTo[wsymlist, "_ -> \"fr_zero\""]];
+ MakePMatcher[Hold[wsymlists], wsymlist];
+ (* Flavor *)
+ MakePMatcher[Hold[fsymlists], fsymlist];
+ ];
+
+ (* Construct the class name... *)
+ cname = StringReplace[ToString[cdesc[[1]]], {"[" -> "", "]" -> ""}] <> "_" <> OmegaConstructor[ToString[cdesc[[2]]]];
+ (* Don't want no ghosts *)
+ If[StringMatchQ[cname, RegularExpression["^[SFVT].*"]],
+ (* ... loop over members ... *)
+ ParsePart /@ plist;
+ (* Put to gether the lorentz rep patterns *)
+ (If[Length[#[[1]]] != 0, AppendTo[lreplist, WO`SmartConcat[#1[[1]], " | "] <> " -> " <> #[[2]]]])&
+ /@ {{majoranas, "Majorana"}, {spinors, "Spinor"}, {cspinors, "ConjSpinor"},
+ {vectors, "Vector"}, {hvectors, "Massive_Vector"}, {tensors, "Tensor_1"}, {htensors, "Tensor_2"}};
+ (* Dito, color rep patterns *)
+ (If[Length[#[[1]]] != 0, AppendTo[creplist, WO`SmartConcat[#1[[1]], " | "] <> " -> " <> #[[2]]]])&
+ /@ {{fsu3s, "Color.SUN 3"}, {afsu3s, "Color.SUN (-3)"}, {asu3s, "Color.AdjSUN 3"}};
+ (* ...Add a constructor for the class to the proper lorentz type... *)
+ LTHelper[ltdict[StringTake[cname, {1}]]];
+ (* Create the class member list ...*)
+ mlists = mlists <> "let " <> WO`FirstLower[cname] <> "_members =\n" <>
+ WO`Indent[StringReplace[mlist, RegularExpression["^ "] -> "["] <> "]", 3] <> "\n";
+ (* Create new class type... *)
+ classtypes = classtypes <> "type " <> WO`FirstLower[cname] <> " =\n" <> WO`Indent[classtype, 2] <> "\n";
+ (* Add the class conjugator *)
+ cconjugators = cconjugators <> "let conjugate_" <> WO`FirstLower[cname] <> " = function \n";
+ If [cconjugator != "", cconjugators = cconjugators <> WO`Indent[cconjugator, 2] <> "\n"];
+ If [Not[allcharged], cconjugators = cconjugators <> " | x -> x\n";];
+ ,
+ (* Ghosts still get hashed w.r.t. their lorentz rep. *)
+ (WO`hash["lrep", #[[1]]] = WO`hash["lrep", #[[2]]] = "U")& /@ plist;
+ ];
+ ];
+
+ (* A helper for digesting a lorentz type *)
+ LTHelper[idx_] := Module[{constructor},
+
+ (* Step up one level in a pattern matcher *)
+ MakePMatcher[Hold[matcher_], list_] := Module[{text},
+ Switch[Length[list],
+ 0, Null,
+ 1, (
+ text = list[[1]];
+ matcher = matcher <> WO`Indent["| " <> constructor <> " " <> text <> "\n", 3];),
+ _Integer, (
+ text = "| " <> WO`SmartConcat[list, "\n| "];
+ matcher = matcher <> WO`Indent[""
+ <> "| " <> constructor <> " x -> (match x with \n"
+ <> WO`Indent[text, 3] <> ")\n" ,3];)
+ ];
+ ];
+
+ If [ltypes[[idx]] != "",
+ (* Construct the lorentz constructor *)
+ constructor = "FR" <> ToUpperCase[StringTake[ltdict[idx], {1}]];
+ (* Assemble the lorentz type definition *)
+ ltypes[[idx]] = "type " <> WO`FirstLower[ltdict[idx]] <> " =\n" <> WO`Indent[ltypes[[idx]], 2] <> "\n";
+ (* Append the constructor to the flavor type *)
+ ftype = WO`SmartAppend[" | " <> constructor <> " of " <> WO`FirstLower[ltdict[idx]], ftype, 2];
+ (* Add a trampoline lorentz -> flavor *)
+ trampolines = trampolines <> "let flavor_of_" <> WO`FirstLower[ltdict[idx]]
+ <> " lt = " <> constructor <> " lt\n";
+ (* Assemble the particle list *)
+ clists[[idx]] = "let all_" <> WO`FirstLower[ltdict[idx]] <> "s = []\n" <> WO`Indent[clists[[idx]], 2] <> "\n";
+ (* Add the all particles of this lorentz rep to the flavor list *)
+ flavors = WO`SmartAppend[" @ (List.map flavor_of_" <> WO`FirstLower[ltdict[idx]]
+ <> " all_" <> WO`FirstLower[ltdict[idx]] <> "s)", flavors, 2];
+ (* Assemble the conjugation operation for the lorentz type *)
+ lconjugators[[idx]] = "let conjugate_" <> WO`FirstLower[ltdict[idx]] <> " = function \n"
+ <> WO`Indent[lconjugators[[idx]], 3];
+ (* Add to the conjugation function *)
+ conjugate = conjugate <> " | " <> constructor
+ <> " x -> " <> constructor <> " (conjugate_"
+ <> WO`FirstLower[ltdict[idx]] <> " x)\n";
+ (* Construct lorentz level of the flavor -> tag translation *)
+ MakePMatcher[Hold[flavortostring], taglists[[idx]]];
+ (* Dito, TeX symbol *)
+ MakePMatcher[Hold[texsym], tsymlists[[idx]]];
+ (* Dito, PDG *)
+ MakePMatcher[Hold[pdg], pdglists[[idx]]];
+ (* Color Rep *)
+ If[nonecolored[[idx]], creplists[[idx]] = {"_ -> Color.Singlet"}];
+ MakePMatcher[Hold[color], creplists[[idx]]];
+ (* Lorentz Rep *)
+ MakePMatcher[Hold[lorentz], lreplists[[idx]]];
+ (* Goldstone mapper *)
+ (* TODO: defunct atm *)
+ (*
+ MakePMatcher[Hold[goldstone], gslists[[idx]]];
+ *)
+ (* Mass *)
+ MakePMatcher[Hold[masssym], msymlists[[idx]]];
+ (* Width *)
+ MakePMatcher[Hold[widthsym], wsymlists[[idx]]];
+ (* Flavor *)
+ MakePMatcher[Hold[flavorsym], fsymlists[[idx]]];
+ ];
+ ];
+
+ (* We need this hack if the default WO`HC implementation is active. *)
+ ((WO`hash["HC", ToString[#[[1]]]] = #[[2]]; WO`hash["HC", ToString[#[[2]]]] = #[[1]])&
+ /@ #[[2]])& /@ WO`PartList;
+ ParseClass /@ WO`PartList;
+ ProcessGoldstone /@ gsmasses;
+ ftype = "type flavor =\n ";
+ flavors = "let flavors () = []\n ";
+ flavortostring = "let flavor_to_string = function\n";
+ pdg = "let pdg = function\n";
+ conjugate = "let conjugate = function\n";
+ color = "let color = function\n";
+ lorentz = "let lorentz = function\n";
+ goldstone = "let goldstone = function\n";
+ masssym = "let mass_symbol = function\n";
+ widthsym = "let width_symbol = function\n";
+ flavorsym = "let flavor_symbol = function\n";
+ texsym = "let flavor_to_TeX = function\n";
+ LTHelper /@ {1, 2, 3, 4};
+ goldstone = goldstone <> " | _ -> None\n";
+ If[ltypes[[1]] != "", lorentz = lorentz <> " | FRS _ -> Scalar\n"];
+ flavors = flavors <> "\n";
+ ftype = ftype <> "\n";
+ flavor = ""
+ <> "(* Classes with their members *)\n\n"
+ <> classtypes
+ <> "\n(* Lorentz types with the corresponding classes *)\n\n"
+ <> (StringJoin /@ ltypes)
+ <> "\n(* The actual flavor type *)\n\n"
+ <> ftype
+ <> "\n(* Trampoline functions *)\n\n"
+ <> trampolines
+ <> "\n(* Particle lists *)\n\n"
+ <> mlists <> (StringJoin /@ clists);
+ conjugate = ""
+ <> "(* The conjugation operation on a single class *)\n\n"
+ <> cconjugators
+ <> "\n(* The conjugation operation on a lorentz type *)\n\n"
+ <> StringJoin @@ lconjugators
+ <> "\n(* Conjugation for the masses *)\n\n"
+ <> conjugate;
+ propagator = ""
+ <> "let propagator = \n"
+ <> " let msg = \"" <> WO`omeganame <> ".Implementation: invalid lorentz rep in propagator\" in function\n"
+ <> If[ltypes[[1]] != "", " | FRS _ -> Prop_Scalar\n", ""]
+ <> If[ltypes[[2]] != "", ""
+ <>" | FRF x -> (match lorentz (FRF x) with\n"
+ <> " | Spinor -> Prop_Spinor\n"
+ <> " | ConjSpinor -> Prop_ConjSpinor\n"
+ <> " | Majorana -> Prop_Majorana\n"
+ <> " | _ -> invalid_arg msg)\n",
+ ""]
+ <> If[ltypes[[3]] != "", ""
+ <>" | FRV x -> (match Opts.gauge with\n"
+ <> " | Unitarity -> (match lorentz (FRV x) with\n"
+ <> " | Vector -> Prop_Feynman\n"
+ <> " | Massive_Vector -> Prop_Unitarity\n"
+ <> " | _ -> invalid_arg msg)\n"
+ <> " | Feynman -> (match lorentz (FRV x) with\n"
+ <> " | Vector -> Prop_Feynman\n"
+ <> " | Massive_Vector -> Prop_Rxi Xi\n"
+ <> " | _ -> invalid_arg msg)\n"
+ <> " | Rxi -> (match lorentz (FRV x) with\n"
+ <> " | Vector -> Prop_Gauge Xi\n"
+ <> " | Massive_Vector -> Prop_Rxi Xi\n"
+ <> " | _ -> invalid_arg msg))\n",
+ ""]
+ <> If[ltypes[[4]] != ""," | FRT _ -> Prop_Tensor_2\n", ""];
+ ];
+
+ (* Digest the vertices *)
+ DigestVertices[] := Module[{vlist, sort, tagger, v3deflist={}, v4deflist={}, vndeflist={},
+ v3deflist$c={}, v4deflist$c={}, cplhash, cplrevhash, DigestVertex, RegisterCoupling,
+ vndeflist$c={}, ID, VlistMaker, VlistSmartMaker, StripColor, nproc=0, nskipped=0, nghost=0},
+
+ (* Register a coupling constant and return the caml constructor *)
+ RegisterCoupling[plist_, cpl_] := Module[{cname, suffix=1, mycpl},
+ (* Sanity check *)
+ If[Not[FreeQ[cpl, Index]],
+ Throw["WARNING: a coupling still has a index structure, something is badly wrong...", WO`ESkip]];
+ (* If applicable, apply any vertex rules *)
+ mycpl = If[Head[WO`VertexRules] === List, cpl /. WO`VertexRules, cpl];
+ (* Have we already encountered this coupling? *)
+ If[MatchQ[WO`hash["cpl", mycpl], _String],
+ (* -> Do nothing, return the constructor *)
+ WO`hash["cpl", mycpl]
+ ,
+ (* otherwise, suggest a constructor... *)
+ cname = "G_" <> ToLowerCase[WO`Concat[WO`hash["oname", PartName[#[[1]] ]]& /@ plist, "_"]];
+ (* ...and refine it if necessary with an index *)
+ If[cplrevhash[cname] === True,
+ While[cplrevhash[cname <> "_" <> ToString[suffix]] === True, suffix++];
+ cname = cname <> "_" <> ToString[suffix];
+ ];
+ (* Append to coupling list, register in hashes *)
+ AppendTo[WO`cpldeflist, {cname, mycpl}];
+ cplrevhash[cname] = True;
+ (* If the coupling contains aS or G, it will be evolved *)
+ If[WO`whizv2x[] && (Or @@ (Not[FreeQ[mycpl, #]]& /@ WO`RunParameters)),
+ AppendTo[WO`runningcouplings, Length[WO`cpldeflist]]];
+ WO`hash["cpl", mycpl] = cname
+ ]
+ ];
+
+ (* This function strips the color structure from a colored vertex. It works by calculating *
+ * all color flows and then throwing away all but one flow ("keyflow"). *
+ * Tricky and propably still wrong in some cases :) *)
+ StripColor[cpl_, plist_] := Module[{expc, MakeReallyLong, CalcCflow, Cflow,
+ FlowArrow, GetFlowList, taglist, tag, k, ConnectedQ, flowlist, keyflow},
+ SetAttributes[Cflow, Orderless];
+
+ (* Replace structure constants and apply completeness relation *)
+ MakeReallyLong[xpr_] := Module[{fundi=0, adji=0, expterm, tmp1, tmp2, tmp3, i=0, GetCRep},
+ (* Get the color representation of a particle. *)
+ GetCRep[i_] := Module[{part},
+ part = Flatten[Select[plist, (#[[2]] == i)&]][[1]];
+ WO`hash["colrep",PartName[part]]
+ ];
+
+ (* Start by expanding the expression *)
+ expterm = Expand[xpr];
+ (* Determine the highest internal fundamental and adjoint indices. *)
+ expterm /. {Index[Gluon, _, i_] :> (adji = Max[adji, i]),
+ Index[Colour, _, i_] :> (fundi = Max[fundi, i])};
+ fundi++; adji++;
+ (* Expand TensDots. *)
+ expterm = expterm //. {
+ TensDot[T[a_], o__][i_, j_] :>
+ T[a, i, tmp1 = Index[Colour, z, fundi++]] * TensDot[o][tmp1, j],
+ TensDot[T[a_]][i_, j_] :> T[a, i, j]
+ };
+ (* Expand the structure constants to traces over the generators. *
+ * TODO: Find out whether the execution order in mathematica is well defined *
+ * in this case. *)
+ expterm = Expand[expterm /. {f[a_, b_, c_] :>
+ -I * 2 * (T[a, Index[Colour, z, tmp1=fundi++], Index[Colour, z, tmp2=fundi++]] *
+ T[b, Index[Colour, z, tmp2], Index[Colour, z, tmp3=fundi++]] *
+ T[c, Index[Colour, z, tmp3], Index[Colour, z, tmp1]] -
+ T[b, Index[Colour, z, tmp1=fundi++], Index[Colour, z, tmp2=fundi++]] *
+ T[a, Index[Colour, z, tmp2], Index[Colour, z, tmp3=fundi++]] *
+ T[c, Index[Colour, z, tmp3], Index[Colour, z, tmp1]])}];
+ (* Replace IndexDeltas of gluons via normalization condition. *)
+ expterm = expterm /. IndexDelta[Index[Gluon, a_], Index[Gluon, b_]] :>
+ 2 * T[Index[Gluon, a], Index[Colour, z, tmp1 = fundi++], Index[Colour, z, tmp2 = fundi++]] *
+ T[Index[Gluon, b], Index[Colour, z, tmp2], Index[Colour, z, tmp1]];
+ (* Replace IndexDeltas with FlowArrows, restoring the correct direction. This is necessary *
+ because IndexDelta is orderless. *)
+ expterm = expterm /.
+ IndexDelta[Index[Colour, Ext[i_]], Index[Colour, Ext[j_]]] :>
+ If[GetCRep[i] === "f",
+ FlowArrow[Index[Colour, Ext[i]], Index[Colour, Ext[j]]],
+ FlowArrow[Index[Colour, Ext[j]], Index[Colour, Ext[i]]]
+ ];
+ (* Apply completeness relation to generators. TODO: this loop may be infinite in pathological cases. *)
+ While[Not[FreeQ[expterm, Index[Gluon, _, _]]],
+ expterm = Expand[expterm /.
+ Times[p___, T[Index[Gluon, x1_, i_], a_, b_], T[Index[Gluon, x2_, j_], c_, d_]]/; (i===j && x1===x2)
+ :> Times[p, 1/2, FlowArrow[a, d] * FlowArrow[c, b] -
+ 1/3 * FlowArrow[a, b] * FlowArrow[c, d]]];
+ If[i++ > WO`maxiter,
+ Print[""
+ <> "WARNING: I might be stuck in a loop in StripColor (BUG!), you might consider "
+ <> "to abort the calculation...."];
+ i = 0;
+ ];
+ ];
+ expterm
+ ];
+
+ (* Extract the flow from a monomial *)
+ CalcCflow[term_] := Module[{flow, Ic},
+
+ flow = {};
+ (* Converts an index into something simpler *)
+ ConvertIndex[i_] := i/.{Index[_, Ext[j_]] :> j, Index[Colour, x_, j_] :> Ic[x, j]};
+ (* Extract the colour flow pairs and append them to flow *)
+ term /. {
+ FlowArrow[a_, b_] :>
+ (AppendTo[flow, {ConvertIndex[a], ConvertIndex[b]}]; Null),
+ T[a_, b_, c_] :> (AppendTo[flow, {ConvertIndex[b], ConvertIndex[a]}];
+ AppendTo[flow, {ConvertIndex[a], ConvertIndex[c]}];)};
+ (* Contract indices until only the physical flow is left. Using an orderless symbol *
+ * would be more elegant but puts mathematica (at least V5) into an endless loop... *
+ * (at least for me). *)
+ flow = flow
+ //.
+ {{p1___, {a_, Ic[t1_, x_]}, p2___, {Ic[t2_, y_], b_}, p3___}/;(x==y && t1===t2) :> {p1, {a, b}, p2, p3},
+ {p1___, {Ic[t1_, x_], b_}, p2___, {a_, Ic[t2_, y_]}, p3___}/;(x==y && t1===t2) :> {p1, {a, b}, p2, p3}};
+ If[Not[FreeQ[flow, Ic[___]] && FreeQ[flow, Index[Gluon, _, _]]],
+ Throw["WARNING: Unable to calculate color flow for vertex, skipping this one...\n"
+ <> " This is almost certainly a BUG...", WO`ESkip];
+ ];
+ Cflow @@ flow
+ ];
+
+ (* Extract the different flows and their coefficents. *)
+ GetFlowList[expr_] := Module[{key},
+ If[TrueQ[expr == 0],
+ {}
+ ,
+ key = Null;
+ expr /. Cflow[a___] :> (key = Cflow[a]);
+ If[key === Null, Throw[Futile[
+ "BUG: colored vertex contains terms without associated flow, skipping..."], WO`ESkip]];
+ Append[GetFlowList[expr /. key -> 0], {key, (expr /. key -> 1) /. Cflow[___] -> 0 }]
+ ]
+ ];
+
+ ConnectedQ[flow_] := Module[{s, ReplaceNCheck},
+ ReplaceNCheck[x_, list_] := Module[{rules, nx, nlist},
+ rules = Select[list, MatchQ[#, {x, _}]&];
+ If[Length[rules] != 1, Return[False]];
+ nx = rules[[1, 2]];
+ nlist = Complement[list, rules];
+ If[nx == s, Return[Length[nlist] == 0]];
+ ReplaceNCheck[nx, nlist]
+ ];
+
+ s = flow[[1, 1]];
+ ReplaceNCheck[s, List @@ flow]
+ ];
+
+ GetKeyflow[tag_, k1_, k2_, k3_, k4_] := Module[{flows, keyflow},
+ flows = {
+ {"fFS", {{k1, k2}}}, {"fFO", {{k1, k3}, {k3, k2}}}, {"OOS", {{k1, k2}, {k2, k1}}},
+ {"OOO", {{k1, k3}, {k3, k2}, {k2, k1}}}, {"SSS", {}},
+ {"fFSS", {{k1, k2}}}, {"fFOS", {{k1, k3}, {k3, k2}}}, {"fFOO", {{k1, k3}, {k3, k4}, {k4, k2}}},
+ {"OOSS", {{k1, k2}, {k2, k1}}}, {"OOOS", {{k1, k3}, {k3, k2}, {k2, k1}}},
+ {"OOOO", {{k1, k4}, {k4, k3}, {k3, k2}, {k2, k1}}}, {"SSSS", {}}};
+ keyflow = Null;
+ If[tag == #[[1]], keyflow = #[[2]]]& /@ flows;
+ If[keyflow === Null, Throw[Futile[
+ "BUG in GetKeyFlow --- please report. Skipping vertex..."], WO`ESkip]];
+ Cflow @@ keyflow
+ ];
+
+ (* If the vertex is colorless, skip the lengthy algebra. *)
+ If[FreeQ[cpl, Index[Gluon, ___]] && FreeQ[cpl, Index[Colour, ___]], Return[cpl]];
+ (* Enforce color constraints, part I *)
+ taglist = Sort[{WO`hash["colrep", PartName[#[[1]]]], PartName[#[[1]]], #[[2]]}& /@ plist,
+ OrderedQ[{#1[[1]], #2[[1]]}]&];
+ tag = StringJoin @@ (#[[1]]& /@ taglist);
+ k = Append[#[[3]]& /@ taglist, Null];
+ Switch[tag,
+ "fff"|"FFF"|"fffS"|"FFFS"|"ffFF",
+ Throw[Futile["WARNING: unsupported color structure, skipping this vertex..."], WO`ESkip],
+ "fFOO", If[taglist[[3, 2]] != taglist[[4, 2]], Throw[Futile[
+ "WARNING: Color: 3388 is only supported for identical octets, skipping this vertex..."],
+ WO`ESkip]],
+ "OOS"|"OOSS", If[WO`whizvn[] < WO`whizvn["1.96"], Throw[Futile[
+ "WARNING: Color: 8811 and 881 are only supported for WHIZARD 1.96 and higher, skipping this vertex..."],
+ WO`ESkip]],
+ "OOO"|"OOOS", If[
+ !(taglist[[1 ,2]] == taglist[[2, 2]] || taglist[[1, 2]] == taglist[[3, 2]]
+ || taglist[[2, 2]] == taglist[[3, 2]]),
+ Throw[Futile["Warning: Color: 888 and 8881 are only supported if at least two of the octets "
+ <> "are identical; skipping this vertex..."], WO`ESkip]]
+ ];
+ (* Start by expanding and applying the completeness relation. *)
+ expc = MakeReallyLong[cpl];
+ (* Replace all coulour structures by the corresponding flows. *)
+ expc = If[Head[expc] === Plus, ((CalcCflow[#] * #)& /@ expc), CalcCflow[expc] * expc] /.
+ {T[Index[Gluon, ___], ___] -> 1, FlowArrow[Index[Gluon, ___], ___] -> 1,
+ FlowArrow[Index[Colour, ___], ___] -> 1};
+ (* Build the flow list *)
+ flowlist = GetFlowList[expc];
+ (* Enforce color constraints, part II --- revenge of the octets *)
+ If[tag == "OOOO", If[!Catch[
+ Module[{key, keys, perms, Permute, PermuteExt, fact1, facts, factsref},
+ (* Apply the permutations that generate the different flows *)
+ Permute[x_, {}] := x;
+ Permute[x_, {{a_, b_}, more___}] := Permute[x /. {a -> b, b -> a}, {more}];
+
+ PermuteExt[x_, {}] := x;
+ PermuteExt[x_, {{a_, b_}, more___}] := PermuteExt[x /. {Ext[a] -> Ext[b], Ext[b] -> Ext[a]}, {more}];
+
+ (* Check whether all flows are there and whether they are connected *)
+ If[Length[flowlist] != 6, Throw[False]];
+ If[! (And @@ (ConnectedQ[#[[1]]]& /@ flowlist)), Throw[False]];
+ (* The permutations *)
+ perms = {{}, {{3, 4}}, {{2, 3}}, {{2, 3}, {2, 4}}, {{2, 4}}, {{2, 4}, {2, 3}}};
+ key = Cflow[{1, 2}, {2, 3}, {3, 4}, {4, 1}];
+ (* The flows. *)
+ keys = Permute[key, #]& /@ perms;
+ (* The coefficients *)
+ factsref = Flatten[Function[x, #[[2]]& /@ Select[flowlist, (#[[1]] === x)&]] /@ keys, 1];
+ (* Reference coefficients *)
+ fact1 = (#[[2]]& /@ Select[flowlist, (#[[1]] === key)&])[[1]];
+ facts = PermuteExt[fact1, #]& /@ perms;
+ (* Equality? *)
+ Throw[And @@ MapThread[TrueQ[WO`Simplify[#1 - #2, Trig -> False] == 0]&, {factsref, facts}]];
+ ]], Throw["WARNING: Color: OOOO only supported if all six flows are present "
+ <> "and properly related by permutations, skipping...", WO`ESkip]];
+ ];
+ (* Weed out the flows. *)
+ keyflow = GetKeyflow[tag, k[[1]], k[[2]], k[[3]], k[[4]]];
+ expc = #[[2]]& /@ Select[flowlist, (#[[1]] === keyflow)&];
+ If[Length[expc] != 1, Throw[Futile[
+ "WARNING: None of the expected color flows matches, skipping this vertex...\n"
+ <> " This is possibly a BUG..."], WO`ESkip];
+ ];
+ expc[[1]]
+ ];
+
+
+ (* Digest a single vertex *);
+ DigestVertex[vspec_] := Module[{tag, partlist, coupling, arity, Digest3ary, Digets4ary,
+ Digestnary, CheckLorentz, LInd, SInd, Met, CheckLorentzBackend, RegisterVertex, ID, Futile},
+
+ (* This tries to decompose a lorentz sructure in a given set of structures ("bricks"). *
+ * These are assumed to decompose into disjunct sums of atoms, as is the structure. If *
+ * successfull, a list if the resulting coefficients is returned. *)
+ CheckLorentzBackend[lego_List, struct_] := Module[{Div, Onestep, coeffs={}, Iterate},
+ (* Divide by a lorentz structure, return the factor if no more indices remain, 0 otherwise. *)
+ Div[num_, den_] := Module[{quot},
+ quot = WO`Simplify[num / den, Trig -> False];
+ If[FreeQ[quot, Index] && FreeQ[quot, SP[_, _]], quot, 0]
+ ];
+
+ (* Take one brick, try to decompose and return the remainder. *)
+ Onestep[brick_, mstruct_] := Module[{ebrick, estruct, key, coeff},
+ ebrick = Expand[brick];
+ (* Take the first monomial as key. *)
+ key = If[MatchQ[ebrick, _Plus], ebrick[[1]], ebrick];
+ estruct = Expand[mstruct];
+ (* Divide target monomials by key, build list of coefficients. *)
+ estruct = If[MatchQ[estruct, _Plus], List @@ estruct, {estruct}];
+ coeff = Plus @@ (Div[#, key]& /@ estruct);
+ (* Push total coefficient to the coefficient list *)
+ AppendTo[coeffs, coeff];
+ (* Return remainder. *)
+ Simplify[mstruct - coeff * brick, Trig -> False]
+ ];
+ (* Iterate this procedure over all bricks on the respective remainders. *)
+ Iterate[{hd_, tl__}, mstruct_] := Iterate[{tl}, Onestep[hd, mstruct]];
+ Iterate[{hd_}, mstruct_] := Onestep[hd, mstruct];
+ (* If we were successfull, the remainder must be zero. *)
+ If[TrueQ [Iterate[lego, struct] == 0], coeffs, Null]
+ ];
+ CheckLorentzBackend[brick_, struct_] := Module[{cpl},
+ cpl = CheckLorentzBackend[{brick}, struct];
+ Switch[cpl, Null, Null, _, cpl[[1]]]
+ ];
+
+ (* Multiplies the coupling with the overall -i and also accounts for the modified *
+ * normalization of color octets in the color flow basis. *)
+ CheckLorentz[brick_, struct_, fact_] := Module[{cpl},
+ cpl = CheckLorentzBackend[brick, struct];
+ If [cpl =!= Null, Throw[
+ Simplify[(-I)
+ * 1 / Sqrt[2^(Plus @@ (Switch[WO`hash["colrep", PartName[#[[1]]]], "O", 1, _, 0]& /@ partlist))]
+ * fact * cpl, Trig -> False
+ ]
+ ]];
+ ];
+ CheckLorentz[brick_, fact_] := CheckLorentz[brick, coupling, fact];
+ CheckLorentz[brick_] := CheckLorentz[brick, 1];
+
+ (* Some helpers to ease writing the patterns *)
+ LInd[x__] := Index[Lorentz, Ext[x]];
+ SInd[x_] := Index[Spin, Ext[x]];
+ Met[List[x__], List[y__]] := ME[Index[Lorentz, Ext[x]], Index[Lorentz, Ext[y]]];
+ Met[x_, y_] := ME[Index[Lorentz, Ext[x]], Index[Lorentz, Ext[y]]];
+
+ (* Register a vertex. If given a list of lorentz structures and couplings, we interpret *
+ * these as a list of vertices. *)
+ RegisterVertex[Hold[list_], perm_List, struct_List, cpl_List] :=
+ MapThread[RegisterVertex[Hold[list], #1, #2, #3]&, {perm, struct, cpl}];
+ RegisterVertex[Hold[list_], struct_List, cpl_List] :=
+ MapThread[RegisterVertex[Hold[list], #1, #2]&, {struct, cpl}];
+ (* 3 arguments -> trivial permutation *)
+ RegisterVertex[Hold[list_], struct_, cpl_] :=
+ RegisterVertex[Hold[list], {}, struct, cpl];
+ (* 4 arguments -> permute the particles, {} means trivial permutation *)
+ RegisterVertex[Hold[list_], perm_List, struct_, cpl_] :=
+ Module[{plist},
+ plist = If[perm === {}, partlist, (partlist[[#]]& /@ perm)];
+ AppendTo[list, {WO`Concat[WO`hash["constr", PartName[#[[1]] ]]& /@ plist, ", "], struct,
+ RegisterCoupling[partlist, cpl]}];
+ ];
+
+ Digest3ary := Module[{i1, i2, i3, cpl, struct, PermuteParticles, perm = {}, futile = False},
+
+ (* This function MUST be called prior to checking the lorentz structures. It performs *
+ * a final permutation of the particles to place them in the proper order for O'Mega *
+ * to work. It then strips the color structure. Remaining IndexDeltas are replaced by *
+ * ID as the Einstein convention awareness of IndexDelts causes nasty issues with the *
+ * Lorentz matcher. *)
+ PermuteParticles[j1_, j2_, j3_] := Module[{},
+ (* Permute... *)
+ partlist = {partlist[[j1]], partlist[[j2]], partlist[[j3]]};
+ (* ... and save new indices. *)
+ i1 = partlist[[1, 2]]; i2 = partlist[[2, 2]]; i3 = partlist[[3, 2]];
+ coupling = StripColor[coupling, partlist];
+ coupling = coupling /. {IndexDelta[x_, y_] -> ID[x, y]};
+ If[Not[FreeQ[coupling, Gluon] && FreeQ[coupling, Colour]],
+ Throw[Futile[
+ "WARNING: I have failed to strip the color structure from a vertex, it will be skipped..."], WO`ESkip]];
+ ];
+
+ (* We proceed like this: first identify the spins that are meeting; then, for each spin, *
+ * we go through all the known lorentz structures. If none matches, we print a warning and *
+ * skip the vertex. This would be the point to insert a hook for generating new lorentz *
+ * structures on the fly... *)
+ cpl = Switch[tag,
+ (* The case of trilinear couplings between two fermions and a boson can be *
+ * streamlined. The clashing-arrows-code is not active at the moment as *
+ * O'Mega only knows a subset of the required interactions. *)
+ "fFV"|"fMV"|"FMV"|"fFS"|"fMS"|"FMS"|"MMS"|"MMV",
+ Module[{descr, ferm1, ferm2, Genstruct},
+ Genstruct = (""
+ <> "Coupling." <> descr <> " (1, Coupling." <> ferm1 <> ", Coupling."
+ <> # <> ", Coupling." <> ferm2 <> ")")&;
+ (* Put the particles into the correct ordering required by O'Mega. *)
+ If[MatchQ[StringTake[tag, 2], "fF"|"fG"|"fM"|"MM"],
+ PermuteParticles[1, 3, 2]
+ ,
+ PermuteParticles[2, 3, 1]
+ ];
+ (* Adjust the coupling type and fermion descriptors. *)
+ {descr, ferm1, ferm2} = Switch[StringTake[tag, 2],
+ "fF", {"FBF", "Psibar", "Psi"},
+ "fG", {"BBB", "Psibar", "Psibar"},
+ "Fg", {"PBP", "Psi", "Psi"},
+ "fM", {"FBF", "Psibar", "Chi"},
+ "FM", {"FBF", "Chibar", "Psi"},
+ "MM", {"FBF", "Chibar", "Chi"},
+ _, Throw[WO`EAbort, "Internal..."]
+ ];
+ Catch[
+ (* Distinguish the cases of scalar vs. vector couplings here. *)
+ If[StringTake[tag, {3, 3}] == "V",
+ struct = Genstruct["V"];
+ CheckLorentz[Ga[LInd[i2], SInd[i1], SInd[i3]]];
+ struct = Genstruct["VL"];
+ (* The factor 1/2 is due to the different definitions of P_+- in O'Mega and FeynRules. *)
+ CheckLorentz[TensDot[Ga[LInd[i2]], ProjM][SInd[i1], SInd[i3]], 1/2];
+ struct = Genstruct["VR"];
+ CheckLorentz[TensDot[Ga[LInd[i2]], ProjP][SInd[i1], SInd[i3]], 1/2];
+ struct = Genstruct["VLR"];
+ CheckLorentz[{TensDot[Ga[LInd[i2]], ProjM][SInd[i1], SInd[i3]],
+ TensDot[Ga[LInd[i2]], ProjP][SInd[i1], SInd[i3]]}, 1/2];
+ struct = Genstruct["A"];
+ CheckLorentz[- TensDot[Ga[LInd[i2]], Ga[5]][SInd[i1], SInd[i3]]];
+ struct = Genstruct["VA"];
+ CheckLorentz[{Ga[LInd[i2], SInd[i1], SInd[i2]],
+ - TensDot[Ga[Lind[i2]], Ga[5]][Sind[i2], SInd[i2]]}];
+ ,
+ struct = "Coupling.FBF (1, Coupling.Psibar, Coupling.S, Coupling.Psi)";
+ CheckLorentz[ID[SInd[i1], SInd[i3]]];
+ (* Wondering about 1/2? See above. *)
+ struct = "Coupling.FBF (1, Coupling.Psibar, Coupling.SL, Coupling.Psi)";
+ CheckLorentz[ProjM[SInd[i1], SInd[i3]], 1/2];
+ struct = "Coupling.FBF (1, Coupling.Psibar, Coupling.SR, Coupling.Psi)";
+ CheckLorentz[ProjP[SInd[i1], SInd[i3]], 1/2];
+ struct = "Coupling.FBF (1, Coupling.Psibar, Coupling.SLR, Coupling.Psi)";
+ CheckLorentz[{ProjM[SInd[i1], SInd[i3]], ProjP[SInd[i1], SInd[i3]]}, 1/2];
+ struct = "Coupling.FBF (1, Coupling.Psibar, P, Coupling.Psi)";
+ CheckLorentz[Ga[5, SInd[i1], SInd[i3]]];
+ ];
+ (* If nothing has matched we print a warning. *)
+ Throw["WARNING: " <> tag <> " type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ]
+ ],
+ "fGS", Catch[
+ PermuteParticles[1, 3, 2];
+ struct = "Coupling.BBB (1, Coupling.Psibar, Coupling.SL, Coupling.Psibar)";
+ CheckLorentz[ProjM[SInd[i1], SInd[i3]], 1/2];
+ struct = "Coupling.BBB (1, Coupling.Psibar, Coupling.SR, Coupling.Psibar)";
+ CheckLorentz[ProjP[SInd[i1], SInd[i3]], 1/2];
+ struct = "Coupling.BBB (1, Coupling.Psibar, Coupling.SLR, Coupling.Psibar)";
+ CheckLorentz[{ProjM[SInd[i1], SInd[i3]], ProjP[SInd[i1], SInd[i3]]}, 1/2];
+ Module[{c},
+ c = Catch[CheckLorentz[{ID[SInd[i1], SInd[i3]], -Ga[5, SInd[i1], SInd[i3]]}]];
+ If[c =!= Null, Throw[{c[[1]] + c[[2]], c[[1]] - c[[2]]}]];
+ ];
+ Throw["WARNING: " <> tag <> " type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "FgS", Catch[
+ PermuteParticles[2, 3, 1];
+ struct = "Coupling.PBP (1, Coupling.Psi, Coupling.SL, Coupling.Psi)";
+ CheckLorentz[ProjM[SInd[i1], SInd[i3]], 1/2];
+ struct = "Coupling.PBP (1, Coupling.Psi, Coupling.SR, Coupling.Psi)";
+ CheckLorentz[ProjP[SInd[i1], SInd[i3]], 1/2];
+ struct = "Coupling.PBP (1, Coupling.Psi, Coupling.SLR, Coupling.Psi)";
+ CheckLorentz[{ProjM[SInd[i1], SInd[i3]], ProjP[SInd[i1], SInd[i3]]}, 1/2];
+ Module[{c},
+ c = Catch[CheckLorentz[{ID[SInd[i1], SInd[i3]], -Ga[5, SInd[i1], SInd[i3]]}]];
+ If[c =!= Null, Throw[{c[[1]] + c[[2]], c[[1]] - c[[2]]}]];
+ ];
+ Throw["WARNING: " <> tag <> " type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "VVV", Catch[
+ PermuteParticles[1, 2, 3];
+ struct = "Gauge_Gauge_Gauge 1";
+ (* Another O'Mega special: the vertex is multiplied by I internally, so we must *
+ * compensate for it. *)
+ CheckLorentz[
+ - Met[i1, i2] * (2 * FV[i2, LInd[i3]] + FV[i3, LInd[i3]])
+ + Met[i1, i3] * (2 * FV[i3, LInd[i2]] + FV[i2, LInd[i2]])
+ + Met[i2, i3] * (FV[i2, LInd[i1]] - FV[i3, LInd[i1]]),
+ coupling /. {FV[i1, j_] :> - FV[i2, j] - FV[i3, j]}, -I];
+ (* Anomalous dimension 4 TVCs are a bit more tricky: we have to decompose them *
+ * in a unique basis and translate the result into the O'Mega basis of *
+ * permuted longitudinal / transverse aTGC operators. *
+ * *
+ * Limitation: this does not work if identical fields meet at the *
+ * vertex due to the asymmetric nature of the couplings in O'Mega - the only *
+ * way to get the necessary permutations is permuting the particles at the *
+ * vertex, but if those are identical... you get the idea :) *
+ * *
+ * Another tricky point are color flows. As we are permuting the particles *
+ * after stripping color, we have to take care not to change the flow. *
+ * While I can't see a reliable way of doing this in the n-point case, the *
+ * only potentially problematic color structure in the three-point case is OOO.*
+ * There, we have a cyclic and a anticyclic flow, and if we only perform *
+ * cyclic permutations, the flow is unchanged -> take care to only do cyclic *
+ * permutations. *)
+ Module[{a}, If [(a = Catch[Module[{dec, all},
+ If[partlist[[1, 1]] === partlist[[2, 1]] || partlist[[1, 1]] == partlist[[3, 1]] ||
+ partlist[[2, 1]] === partlist[[3, 1]],
+ futile = True;
+ Print[""
+ <> "LIMITATION: O'Mega only handles anomalous triple vector couplings "
+ <> "if the fields are mutually different."];
+ Throw[Null]];
+ dec = Catch[CheckLorentz[{
+ FV[i1, LInd[i1]] * Met[i2, i3], FV[i1, LInd[i2]] * Met[i1, i3],
+ FV[i1, LInd[i3]] * Met[i1, i2], FV[i2, LInd[i1]] * Met[i2, i3],
+ FV[i2, LInd[i2]] * Met[i1, i3], FV[i2, LInd[i3]] * Met[i1, i2]
+ },
+ coupling /. {FV[i3, j_] :> - FV[i1, j] - FV[i2, j]}
+ , -I
+ ]];
+ If[dec === Null, Throw[Null]];
+ all = Select[Simplify[Join[
+ {#[[1]], "Dim4_Vector_Vector_Vector_L 1", #[[2]]}& /@ {
+ {{1, 2, 3}, dec[[1]] - dec[[4]] / 2}, {{2, 3, 1}, dec[[5]] - dec[[2]] / 2},
+ {{3, 1, 2}, - (dec[[3]] + dec[[6]]) / 2}},
+ {#[[1]], "Dim4_Vector_Vector_Vector_T 1", #[[2]]}& /@ {
+ {{2, 3, 1}, dec[[2]] / 2}, {{3, 1, 2}, (dec[[6]] - dec[[3]]) / 2},
+ {{1, 2, 3}, - dec[[4]] / 2}}
+ ], Trig -> False], !TrueQ[#[[3]] == 0]&];
+ perm = #[[1]]& /@ all;
+ struct = #[[2]]& /@ all;
+ Throw[#[[3]]& /@ all];
+ ]]) =!= Null,
+ If[Length[a] > 1,
+ Print[partlist];
+ Print[""
+ <> "WARNING: splitting vertex into " <> ToString[Length[a]] <> " pieces, "
+ <> "the diagram count reported by O'Mega will not be accurate anymore."];
+ ];
+ Throw[a]]];
+ Throw[If[futile, Futile[#], #]&("WARNING: VVV type vertex with unknown lorentz structure, skipping..."), WO`ESkip];
+ ],
+ "SVV", Catch[
+ PermuteParticles[1, 2, 3];
+ struct = "Scalar_Vector_Vector 1";
+ CheckLorentz[Met[i2, i3]];
+ struct = "Dim5_Scalar_Gauge2 1";
+ CheckLorentz[FV[i2, LInd[i3]] * FV[i3, LInd[i2]] - SP[i2, i3] * Met[i2, i3],
+ coupling /. {FV[i1, i_] :> - FV[i2, i] - FV[i3, i]}, 1];
+ Throw["WARNING: SVV type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "SSS", Catch[
+ PermuteParticles[1, 2, 3];
+ struct = "Scalar_Scalar_Scalar 1";
+ CheckLorentz[1];
+ Throw["WARNING: SSS type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "SSV", Catch[
+ PermuteParticles[3, 1, 2];
+ struct = "Coupling.Vector_Scalar_Scalar 1";
+ CheckLorentz[FV[i3, LInd[i1]] - FV[i2, LInd[i1]],
+ coupling /. {FV[i1, j_] :> - FV[i2, j] - FV[i3, j]}, 1];
+ Throw["WARNING: SSV type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "SST", Catch[
+ PermuteParticles[3, 1, 2];
+ struct = "Coupling.Graviton_Scalar_Scalar 1";
+ Module[{c},
+ c = Catch[CheckLorentz[
+ {
+ - Met[{i1, 1}, {i1, 2}]
+ ,
+ - Met[{i1, 1}, {i1, 2}] * SP[i2, i3] +
+ FV[i2, LInd[i1, 1]] * FV[i3, LInd[i1, 2]] +
+ FV[i2, LInd[i1, 2]] * FV[i3, LInd[i1, 1]]
+ }, coupling /. {FV[i1, j_] :> - FV[i2, j] - FV[i3, j]}, 1]
+ ];
+ If[(c = Catch[
+ If[c === Null, Throw[Null]];
+ If[WO`hash["mass", PartName[partlist[[2, 1]]]] =!= WO`hash["mass", PartName[partlist[[3, 1]]]],
+ Throw[Null]];
+ If[c[[2]] == 0, Throw[Null]];
+ If[Simplify[
+ (c[[1]] / c[[2]] - WO`hash["mass", PartName[partlist[[2, 1]]]]^2)
+ //. (Rule[#[[1]], #[[2]]]& /@ WO`IParamList) /. ZERO -> Null
+ ] == 0, Throw[c[[2]]]
+ ];
+ ]) =!= Null, Throw[c]
+ ];
+ ];
+ Throw["WARNING: SST type vertix with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "TVV", Catch[
+ PermuteParticles[1, 2, 3];
+ struct = "Coupling.Graviton_Vector_Vector 1";
+ Module[{c, csym, dsym},
+ csym[m_, n_, r_, s_] :=
+ ME[m, r] * ME[n, s] + ME[m, s] * ME[n, r] - ME[m, n] * ME[r, s];
+ dsym[m_, n_, r_, s_, p1_, p2_] := ME[m, n] * FV[p1, s] * FV[p2, r]
+ - (Plus @@ ((ME[#[[1]], s] * FV[p1, #[[2]]] * FV[p2, r] + ME[#[[1]], r] * FV[p1, s] * FV[p2, #[[2]]]
+ - ME[r, s] * FV[p1, #[[1]]] * FV[p2, #[[2]]])& /@ {{m, n}, {n, m}} ));
+ c = Catch[CheckLorentz[
+ {
+ - csym[LInd[i1, 1], LInd[i1, 2], LInd[i2], LInd[i3]]
+ ,
+ - SP[i2, i3] * csym[LInd[i1, 1], LInd[i1, 2], LInd[i2], LInd[i3]]
+ - dsym[LInd[i1, 1], LInd[i1, 2], LInd[i2], LInd[i3], i2, i3]
+ }, coupling /. {FV[i1, j_] :> - FV[i2, j] - FV[i3, j]}, 1];
+ ];
+ If[(c = Catch[
+ If[c === Null, Throw[Null]];
+ If[WO`hash["mass", PartName[partlist[[2, 1]]]] =!= WO`hash["mass", PartName[partlist[[3, 1]]]],
+ Throw[Null]];
+ If[c[[2]] == 0, Throw[Null]];
+ If[Simplify[
+ (c[[1]] / c[[2]] - WO`hash["mass", PartName[partlist[[2, 1]]]]^2)
+ //. (Rule[#[[1]], #[[2]]]& /@ WO`IParamList) /. ZERO -> 0
+ ]== 0, Throw[c[[2]]]];
+ ]) =!= Null, Throw[c]
+ ];
+ ];
+ Throw["WARNING: VVT type vertix with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "fFT", Catch[
+ PermuteParticles[1, 3, 2];
+ struct = "Coupling.Graviton_Spinor_Spinor 1";
+ Module[{c},
+ c = Catch[CheckLorentz[
+ {
+ - Met[{i2, 1}, {i2, 2}] * ID[SInd[i1], SInd[i3]]/ 2
+ ,
+ Ga[LInd[i2, 1], SInd[i1], SInd[i3]] * (FV[i3, LInd[i2, 2]] - FV[i1, LInd[i2, 2]]) / 8 +
+ Ga[LInd[i2, 2], SInd[i1], SInd[i3]] * (FV[i3, LInd[i2, 1]] - FV[i1, LInd[i2, 1]]) / 8 +
+ Met[{i2, 1}, {i2, 2}] * (SlashedP[i1, SInd[i1], SInd[i3]] - SlashedP[i3, SInd[i1], SInd[i3]]) / 4
+ }, coupling /. {FV[i2, j_] :> - FV[i1, j] - FV[i3, j]}, 1];
+ ];
+ If[(c = Catch[
+ If[c === Null, Throw[Null]];
+ If[WO`hash["mass", PartName[partlist[[1, 1]]]] =!= WO`hash["mass", PartName[partlist[[3, 1]]]],
+ Throw[Null]];
+ If[c[[2]] == 0, Throw[Null]];
+ If[Simplify[
+ (c[[1]] / c[[2]] + WO`hash["mass", PartName[partlist[[1, 1]]]])
+ //. (Rule[#[[1]], #[[2]]]& /@ WO`IParamList) /. ZERO -> 0
+ ]== 0, Throw[c[[2]]]];
+ ]) =!= Null, Throw[c]
+ ];
+
+ ];
+ Throw["WARNING: fFT type vertix with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ _, Throw[Futile["WARNING: unidentified vertex of arity 3 (spin structure: " <> tag <> "), skipping..."], WO`ESkip];
+ ];
+ (* If we have identified our friend, we append it to the definition list. *)
+ If [perm === {} && MatchQ[struct, _List], perm = {}& /@ struct];
+ If[cpl =!= Null, RegisterVertex[
+ If[FreeQ[WO`hash["colrep", PartName[#[[1]]]]& /@ partlist, "O"], Hold[v3deflist], Hold[v3deflist$c]], perm, struct, cpl]];
+ ];
+
+
+ Digest4ary := Module[{i1, i2, i3, i4, cpl, struct, PermuteParticles},
+
+ (* See above, MUST be called under all circumstances. *)
+ PermuteParticles[j1_, j2_, j3_, j4_] := Module[{},
+ partlist = {partlist[[j1]], partlist[[j2]], partlist[[j3]], partlist[[j4]]};
+ i1 = partlist[[1, 2]]; i2 = partlist[[2, 2]]; i3 = partlist[[3, 2]]; i4 = partlist[[4, 2]];
+ coupling = StripColor[coupling, partlist];
+ coupling = coupling /. {IndexDelta[x_, y_] -> ID[x, y]};
+ If[Not[FreeQ[coupling, Gluon] && FreeQ[coupling, Colour]],
+ Throw["WARNING: I have failed to strip the color structure from a vertex, it will be skipped...", WO`ESkip]];
+ ];
+
+ cpl = Switch[tag,
+ "SSSS", Catch[
+ PermuteParticles[1, 2, 3, 4];
+ struct = "Scalar4 1";
+ CheckLorentz[1];
+ Throw["WARNING: SSSS type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "SSVV", Catch[
+ PermuteParticles[1, 2, 3, 4];
+ struct = "Scalar2_Vector2 1";
+ CheckLorentz[Met[i3, i4]];
+ Throw["WARNING: SSVV type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ "VVVV", Catch[
+ PermuteParticles[1, 2, 3, 4];
+ Catch[Module[{i, cpl, nums, dens, fact},
+ (* Try to decompose the vertex structure in terms of inequivalent contractions. *)
+ cpl = Catch[CheckLorentz[{Met[i1, i2] * Met[i3, i4], Met[i1, i3] * Met[i2, i4],
+ Met[i1, i4] * Met[i2, i3]}]];
+ If[cpl === Null, Throw[Null]];
+ (* If it worked, check if the decomposition can be split in a prefactor and *
+ * a list of integers. *)
+ If[!TrueQ[cpl[[1]] == 0],
+ fact = Simplify[cpl / cpl[[1]], Trig -> False];
+ nums = Numerator[fact];
+ dens = Denominator[fact];
+ ];
+ If[And @@ (IntegerQ /@ Join [nums, dens]) && !TrueQ[cpl[[1]] == 0],
+ (* We can? -> Assemble a single coupling. *)
+ cpl = cpl[[1]] / (LCM @@ dens);
+ fact = fact * (LCM @@ dens);
+ struct = "Vector4 [" <> WO`Concat[{
+ If[fact[[1]] != 0, ToString[fact[[1]]] <> ", Coupling.C_12_34", ""],
+ If[fact[[2]] != 0, ToString[fact[[2]]] <> ", Coupling.C_13_42", ""],
+ If[fact[[3]] != 0, ToString[fact[[3]]] <> ", Coupling.C_14_23", ""]}, "; "] <> "]";
+ Throw[cpl];,
+ (* We cannot? -> Generate several couplings then. *)
+ struct = ("Vector4 [" <> # <> "]")& /@
+ {"1, Coupling.C_12_34", "1, Coupling.C_13_42", "1, Coupling.C_14_23"};
+ (* Drop all pieces that are zero. *)
+ Module[{tmp},
+ tmp = Select[MapThread[{#1, #2}&, {struct, cpl}], !TrueQ[#[[2]] == 0]&];
+ struct = #[[1]]& /@ tmp;
+ cpl = #[[2]]& /@ tmp;
+ ];
+ If[Length[cpl] > 1,
+ Print[partlist];
+ Print[""
+ <> "WARNING: splitting vertex into " <> ToString[Length[cpl]] <> " pieces, "
+ <> "the diagram count reported by O'Mega will not be accurate anymore."];
+ ];
+ Throw[cpl];
+ ];
+ ], Null];
+ Throw["WARNING: VVVV type vertex with unknown lorentz structure, skipping...", WO`ESkip];
+ ],
+ _, Throw[Futile["WARNING: unidentified vertex of arity 4 (spin structure: " <> tag <> "), skipping..."], WO`ESkip];
+ ];
+ (* If we have identified our friend, we append it to the definition list and record its arity. *)
+ If[cpl =!= Null,
+ RegisterVertex[
+ If[FreeQ[WO`hash["colrep", PartName[#[[1]]]]& /@ partlist, "O"], Hold[v4deflist], Hold[v4deflist$c]], struct, cpl];
+ WO`maxarity = Max[arity, WO`maxarity];
+ ];
+ ];
+
+ Digestnary := Module[{},
+ Throw[Futile["Vertices of arity > 4 are not implemented yet, skipping vertex...."], WO`ESkip];
+ ];
+
+ SetAttributes[ID, Orderless];
+ tag = vspec[[1]];
+ (* We map charge conjugation to hermitian conjugation. *)
+ partlist = vspec[[2]] /. CC -> WO`HC;
+ coupling = vspec[[3]];
+ arity = Length[partlist];
+ Catch[
+ If[Or @@ (((GhostFieldQ[#[[1]]] === True) ||
+ (WO`gauge === WO`WOUnitarity && WO`hash["goldstone", PartName[#[[1]]]]))&/@ partlist),
+ nghost++; nskipped++ ,
+ Switch[arity, 3, Digest3ary[], 4, Digest4ary[], _, Digestnary[]]
+ ],
+ (* Retry with the simplified structure if WOFast is off*)
+ WO`ESkip, Function[{val, tag},
+ Catch[
+ Switch[{WO`fast, val},
+ {True, Futile[_]}, Throw[val, tag],
+ {True, _},
+ Print[""
+ <> "Vertex could not be identified (see below), but setting WOFast -> False "
+ <> "might help..."];
+ Throw[val, tag],
+ {False, Futile[_]}, Throw[val, tag],
+ {False, _},
+ partlist = vspec[[2]] /. CC -> WO`HC;
+ coupling = FullSimplify[vspec[[3]], ExcludedForms->{x_/;(FreeQ[x, Index] && FreeQ[x, Dot])}];
+ Switch[arity, 3, Digest3ary[], 4, Digest4ary[], _, Digestnary[]]
+ ],
+ WO`ESkip, Function[{val, tag},
+ val /. {s_String :> Print[s], Futile[s_String]:> Print[s]};
+ Print["Skipped vertex: " <> WO`Concat[ToString[PartName[#[[1]]]]& /@ partlist, " , "]];
+ Print[partlist];
+ If[WO`verbose,
+ Print["Verbose vertex structure:"];
+ Print[coupling];
+ ];
+ nskipped++;
+ ]];
+ ]];
+ nproc++;
+ If[WO`progress > 0 && Mod[nproc, WO`progress] == 0,
+ Print[" " <> ToString[nproc] <> " of " <> ToString[Length[WO`vlist]] <> " vertices processed..."]
+ ];
+ ];
+
+ (* Put the particle lists into a canonical order w.r.t. their lorentz representations. *
+ * This works by assigning a tag to every representation: *
+ * Scalar : S - Fermion : F - A-Fermion : f - Majorana : M - Vector : V - Tensor : T *
+ * The particles are then ordered lexicographically w.r.t. these tags; the tags are *
+ * joined for each vertex to give a sort of "fingerprint" of the lorentz structure. *
+ * Charge-conjugated fermions are tagged with G and g to allow the identification of *
+ * clashing-arrow type vertices. *)
+ Module[{prepend, sort, tag, remove},
+ prepend = If[FreeQ[#[[1]], CC],
+ Prepend[#, WO`hash["lrep", PartName[ #[[1]] ]]]
+ ,
+ (* We _need_ the majorana modules for clashing arrow type stuff... *)
+ WO`havemajoranas = True;
+ Prepend[#, Switch[WO`hash["lrep", PartName[#[[1]] /. CC -> WO`HC]],
+ (* As we have mapped CC to HC, we have an extra conjugation. *)
+ "f", "G", "F", "g",
+ _, Throw[WO`EAbort, "Charge conjugation appearing for a field other than a dirac fermion!"]
+ ]]
+ ]&;
+ sort = Sort[#, Function[{x, y}, OrderedQ[{x[[1]], y[[1]]}]]]&;
+ tagger = StringJoin[Function[{x}, x[[1]]] /@ #]&;
+ remove = Take[#, {2, 3}]&;
+ vlist = {sort[prepend /@ #[[1]]], #[[2]]}& /@ WO`vlist;
+ vlist = {tagger[#[[1]]], remove /@ #[[1]], #[[2]]}& /@ vlist;
+ ];
+ (* Process the vertices. *)
+ DigestVertex /@ vlist;
+ Print["processed a total of " <> ToString[nproc] <> " vertices, kept "
+ <> ToString[nproc - nskipped] <> " of them and threw away " <> ToString[nskipped]
+ <> ", " <> ToString[nghost] <> " of which contained ghosts"
+ <> If[WO`gauge === WO`WOUnitarity, " or goldstone bosons", ""] <> "."];
+ (* Create constant type and translator. *)
+ constant = ""
+ <> "type constant =\n"
+ <> WO`Indent[" | " <> WO`SmartConcat[#[[1]]& /@ WO`cpldeflist, " | "], 2]
+ <> "\n";
+ Module[{c},
+ c = (#[[1]] <> " -> \"" <> WO`FirstUpper[ToLowerCase[#[[1]]]] <> "\"")& /@ WO`cpldeflist;
+ constsym = ""
+ <> "let constant_symbol = function\n"
+ <> WO`Indent[" | " <> WO`SmartConcat[c, " | "], 2]
+ <> "\n";
+ ];
+
+ (* Generate the actual vertex list. *)
+ VlistMaker[Hold[list_]] := WO`Concat[
+ ("(" <> #[[1]] <> "),\n " <> #[[2]] <> ",\n " <> #[[3]])& /@ list, "\n;\n"];
+ VlistSmartMaker[Hold[list_], lname_] :=
+ If[Length[list] > 0,
+ "let " <> lname <> " = [\n" <> WO`Indent[VlistMaker[Hold[list]], 3] <> "\n]\n",
+ "let " <> lname <> " = []\n"
+ ];
+
+ vertices = ""
+ <> VlistSmartMaker[Hold[v3deflist], "vertices_3"]
+ <> "\n"
+ <> VlistSmartMaker[Hold[v3deflist$c], "vertices_3_qcd"]
+ <> "\n"
+ <> VlistSmartMaker[Hold[v4deflist], "vertices_4"]
+ <> "\n"
+ <> VlistSmartMaker[Hold[v4deflist$c], "vertices_4_qcd"]
+ <> "\n"
+ <> VlistSmartMaker[Hold[vndeflist], "vertices_n"]
+ <> "\n"
+ <> VlistSmartMaker[Hold[vndeflist$c], "vertices_n_qcd"]
+ <> "\n"
+ <> "let vertices () = (\n"
+ <> " vertices_3 @ (match Opts.color with true -> vertices_3_qcd | false -> []),\n"
+ <> " vertices_4 @ (match Opts.color with true -> vertices_4_qcd | false -> []),\n"
+ <> " vertices_n @ (match Opts.color with true -> vertices_n_qcd | false -> [])\n"
+ <> ")\n"
+ ];
+
+ handle = OpenWrite[file];
+ (* Parse the particle list. *)
+ ParsePList[];
+ (* Generate the vertex definitions *)
+ DigestVertices[];
+ (* The preamble *)
+ preamble = ""
+ <> WO`CommentMaker[WO`fileheader, "(* ", " ", " *)"] <> "\n"
+ <> "\n"
+ <> "type gauge = Unitarity | Feynman | Rxi\n"
+ <> "\n"
+ <> "module type Frules_options =\n"
+ <> "sig\n"
+ <> " val gauge: gauge\n"
+ <> " val color: bool\n"
+ <> "end\n"
+ <> "\n"
+ <> "module Implementation (Opts: Frules_options) =\n"
+ <> "struct\n"
+ <> "\n"
+ <> " open Coupling\n";
+ (* Stuff independent of the actual model *)
+ gauge = "type gauge = Xi\n";
+ width = ""
+ <> "let width x = match width_symbol x with \n"
+ <> " | \"fr_zero\" -> Vanishing\n"
+ <> " | _ -> Timelike\n";
+ fermion = ""
+ <> "let fermion x = (match lorentz x with\n"
+ <> " | Spinor -> 1 | ConjSpinor -> -1 | Majorana -> 2 | _ -> 0)\n";
+ colsymm = "let colsymm _ = (0, false), (0, false)\n";
+ maxdegree = "let max_degree () = " <> ToString[WO`maxarity] <> "\n";
+ fusions = ""
+ <> "module F = " <> If[WO`whizv2x[], "Modeltools", "Models"] <> ".Fusions (struct\n"
+ <> " type f = flavor\n"
+ <> " type c = constant\n"
+ <> " let compare = compare\n"
+ <> " let conjugate = conjugate\n"
+ <> "end)\n"
+ <> "\n"
+ <> "let table = F.of_vertices (vertices ())\n"
+ <> "let fuse2 = F.fuse2 table\n"
+ <> "let fuse3 = F.fuse3 table\n"
+ <> "let fuse = F.fuse table\n";
+ extflavors = "let external_flavors () = [\"Autogenerated flavors\", flavors ()]\n";
+ parameters = "let parameters () = {input = []; derived = []; derived_arrays = []}\n";
+ flavorofstring = ""
+ <> "let flavor_of_string x =\n"
+ <> " let dict = List.map (fun x -> (x, flavor_to_string x)) (flavors ())\n"
+ <> " in try\n"
+ <> " fst (List.find (fun (_, y) -> (x = y)) dict)\n"
+ <> " with\n"
+ <> " Not_found -> invalid_arg \"" <> WO`omeganame <> ".Implementation: flavor_of_string: invalid particle?\"\n";
+ gaugesym = ""
+ <> "let gauge_symbol = function\n"
+ <> " Xi -> (match Opts.gauge with\n"
+ <> " | Unitarity -> invalid_arg\n"
+ <> " \"" <> WO`omeganame <> ".Implementation: requesting gauge symbol in unitarity gauge!\"\n"
+ <> " | Feynman -> \"one\"\n"
+ <> " | Rxi -> \"" <> ToString[WO`gsym] <> "\")\n";
+ options = "let options = Options.empty\n";
+ rcs = ""
+ <> "let rcs = RCS.parse \"" <> WO`omeganame <> "\" [\"automatically generated model\"] {\n"
+ <> " RCS.revision = \"Revision: Noop\";\n"
+ <> " RCS.date = \"Date: Noop\";\n"
+ <> " RCS.author = \"Author: Mathematica automaton\";\n"
+ <> " RCS.source = \"Source: Noop\"\n"
+ <> "}\n";
+ goldstone = "let goldstone _ = None\n";
+ sanscolorstubs = ""
+ <> "type flavor_sans_color = flavor\n"
+ <> "let flavor_sans_color x = x\n"
+ <> "let conjugate_sans_color = conjugate\n"
+ <> "let flavor_sans_color_of_string = flavor_of_string\n"
+ <> "let flavor_sans_color_to_string = flavor_to_string\n"
+ <> "let flavor_sans_color_to_TeX = flavor_to_TeX\n"
+ <> "let flavor_sans_color_symbol = flavor_symbol\n";
+ charges = ""
+ <> "module Ch = Charges.Null\n"
+ <> "let charges _ = ()\n";
+ finalwords = "end\n";
+ (* Assemble the module. *)
+ WriteString[handle, ""
+ <> preamble <> "\n" <> WO`Indent [ ""
+ <> flavor <> "\n" <> conjugate <> "\n" <> color <> "\n" <> pdg <> "\n" <> lorentz <> "\n" <> gauge <> "\n"
+ <> propagator <> "\n" <> widthsym <> "\n" <> width <> "\n" <> fermion <> "\n"
+ <> colsymm <> "\n" <> flavors <> "\n" <> extflavors <> "\n" <> goldstone <> "\n"
+ <> flavortostring <> "\n" <> If[FreeQ[{"1.92"}, WO`whizv], texsym <> "\n", ""]
+ <> flavorofstring <> "\n" <> flavorsym <> "\n" <> gaugesym <> "\n"
+ <> masssym <> "\n"
+ <> "(* Coupling constants and parameters *)\n\n"
+ <> constant <> "\n" <> parameters <> "\n" <> constsym <> "\n"
+ <> "(* Vertices and fusions *)\n\n"
+ <> maxdegree <> "\n" <> vertices <> "\n" <> fusions <> "\n"
+ <> If[WO`whizvn[] >= WO`whizvn["2.0.3"], ""
+ <> "(* Charge (stubbed) *)\n\n"
+ <> charges
+ <> "\n"
+ , ""]
+ <> "(* Misc. infrastructure *)\n\n"
+ <> options <> "\n" <> rcs <> "\n"
+ <> If[WO`whizv2x[], sanscolorstubs <> "\n", ""]
+ , 3] <> finalwords
+ ];
+ Close[handle];
+];
+
+(* Write the O'Mega binary driver *)
+WO`WriteOmegaBinary[file_, cfile_, ncf_] := Module[{handle, contents, fusions, modname, gauge,
+ header, target, colorinvanilla},
+ (* The fusions module. *)
+ fusions = Switch[WO`maxarity, _?(#<=3&), "Binary", _?(#<=4&), "Mixed23", _?(#>4&), "Nary"]
+ <> If[WO`havemajoranas, "_Majorana", ""];
+ (* The module name. *)
+ modname = WO`FirstUpper[WO`omeganame] <> If[WO`whizv2x[], "_mdl", ""];
+ (* The gauge constructor. *)
+ gauge = modname <> "." <> WO`GaugeName[];
+ colorinvanilla = If[WO`whizv2x[], "true", "false"];
+ target = "Targets.Fortran" <> If[WO`havemajoranas, "_Majorana", ""];
+ header = WO`CommentMaker[WO`fileheader, "(* ", " ", " *)"] <> "\n";
+ contents = ""
+ <> header
+ <> "\n"
+ <> "module O = Omega.Make (Fusion." <> fusions <> ") (" <> target <> ")\n"
+ <> " (" <> modname <> ".Implementation (struct let gauge = " <> gauge <> " let color = " <> colorinvanilla <> " end))\n"
+ <> "\n"
+ <> "let _ = O.main ()\n";
+ handle = OpenWrite[file];
+ WriteString[handle, contents];
+ Close[handle];
+ contents = ""
+ <> header
+ <> "\n"
+ <> "module O = Omega.Make (Fusion." <> fusions <> ") (" <> target <> ")\n"
+ <> " (Colorize.It (struct let max_num = " <> ToString[ncf] <> " end)\n"
+ <> " (" <> modname <> ".Implementation\n"
+ <> " (struct let gauge = " <> gauge <> " let color = true end)))\n"
+ <> "\n"
+ <> "let _ = O.main ()\n";
+ If[WO`whizv19x[],
+ handle = OpenWrite[cfile];
+ WriteString[handle, contents];
+ Close[handle];
+ ];
+];
+
+(* Write the oplotter glue library. *)
+WO`WriteOplGlue[file_] := Module[{header, footer, contents, pardefs, namelist, DoParams,
+ DoTranslators, translators, contains, initparams},
+
+ (* Generate the parameter definitions and the namelist. *)
+ DoParams[] := Module[{realparams, cmplxparams, realvars, cmplxvars, realchecklist, isreal, rendercpl},
+ (* Real parameters are all numerical masses, widths and externals which are flagged as real. *)
+ realparams = Join [
+ {#[[2]], #[[3]]}& /@ Select[Join[WO`masslist, WO`widthlist], (NumericQ[#[[3]]])&],
+ ({#[[1]], #[[2]]} & /@ Select[
+ {#[[2, 1]], #[[2, -3]], #[[2, -2]]} & /@ Flatten[#[[2]] & /@ WO`EParamList, 1],
+ Not[#[[3]]] &])];
+ (* There are some double occurances of widths and masses I don't understand (TODO: Neil?), *
+ * so weed them out here. The same applies below. *)
+ realparams = WO`WeedOutList[realparams, FreeQ[#2, #1[[1]]]&];
+ If[realparams != {},
+ pardefs = WO`FortranSplit["real(kind=double), public :: " <> WO`Concat[
+ (ToString[#[[1]]] <> "=" <> ToString[#[[2]]] <> "_double")& /@ realparams, ", "]
+ <> "\n"];
+ ];
+ (* Complex parameters are all externals flagged as complex (obviously). *)
+ cmplxparams =
+ ({#[[1]], #[[2]]} & /@ Select[
+ {#[[2, 1]], #[[2, -3]], #[[2, -2]]} & /@ Flatten[#[[2]] & /@ WO`EParamList, 1],
+ #[[3]]&]);
+ cmplxparams = WO`WeedOutList[cmplxparams, FreeQ[#2, #1[[1]]]&];
+ If[cmplxparams != {},
+ pardefs = pardefs <> WO`FortranSplit["\ncomplex(kind=double), public :: " <> WO`Concat[
+ (ToString[#[[1]]] <> "=" <> WO`FortranComplex[#[[2]]])& /@ cmplxparams, ", "]
+ <> "\n"];
+ ];
+ (* Real variables are all nonumerical masses, widths and internals flagged as real. Actually, *
+ * we have to separate internals and masses/widths to make the latter private and the others *
+ * public *)
+ realvars = WO`WeedOutList[
+ #[[2]]& /@ Select[Join[WO`masslist, WO`widthlist], (Not[NumericQ[#[[3]]]])&]];
+ If[realvars != {},
+ pardefs = pardefs <>
+ WO`FortranSplit["\nreal(kind=double), public :: " <> WO`Concat[ToString /@ realvars, ", "]
+ <> "\n"];
+ ];
+ (* Take also care to include nothing that has already been declared. *)
+ realvars = Select[WO`WeedOutList[
+ #[[1]]& /@ Select[{#[[1]], #[[-2]]}& /@ WO`IParamList, Not[#[[2]]]&]], FreeQ[realvars, #]&];
+ If[realvars != {},
+ pardefs = pardefs <>
+ WO`FortranSplit["\nreal(kind=double) :: " <> WO`Concat[ToString /@ realvars, ", "]
+ <> "\n"];
+ ];
+
+ (* Internals flagged as complex. *)
+ cmplxvars = WO`WeedOutList[
+ #[[1]]& /@ Select[{#[[1]], #[[-2]]}& /@ WO`IParamList, #[[2]]&]];
+ If[cmplxvars != {},
+ pardefs = pardefs <>
+ WO`FortranSplit["\ncomplex(kind=double) :: " <> WO`Concat[ToString /@ cmplxvars, ", "]
+ <> "\n"];
+ ];
+ (* The namelist presented to oplotter. *)
+ namelist = WO`FortranSplit[""
+ <> "namelist /parameters/ "
+ <> WO`Concat[ToString[#[[1]]]& /@ Join[realparams, cmplxparams], ", "]
+ <> "\n"];
+ (* A list of functions, each checking if an expression is free of respective complex quantities. *)
+ realchecklist =
+ Function[{par}, Function[{exp}, FreeQ[exp, par]]] /@ (Join[#[[1]]& /@ cmplxparams, cmplxvars]);
+ AppendTo[realchecklist, FreeQ[#, Complex]&];
+ (* A function is constructed from this list checking if an expression should be considered as real. *)
+ isreal = Function[{exp}, And @@ (Function[{checker}, checker[exp]] /@ realchecklist)];
+ (* As some of the couplings are lists, we have to be smart and render to arrays where necessary. *)
+ rendercpl = If[Head[#[[2]]] === List, ToString[#[[1]]] <> "(" <> ToString[Length[#[[2]]]] <> ")",
+ ToString[#[[1]]]]&;
+ (* In the hope that this allows better compiler optimization, the couplings are divided into real and *
+ * complex ones. But as FORTRAN isn't capable of automatically casting complex to double, this is too *
+ * smart, so I remove it again... *)
+ pardefs = pardefs <>
+ WO`FortranSplit["\ncomplex(kind=double), public :: " <> WO`Concat[rendercpl /@ WO`cpldeflist, ", "]];
+ ];
+
+ DoTranslators[] := Module[{pdglist, tospin, tomass, toname, MakeSelect, lr},
+
+ (* Render a select case ... end select structure *)
+ MakeSelect[l_, d_] := Module[{},
+ "select case (pdg)\n" <> WO`Indent[WO`Concat[
+ ("case(" <> ToString[#[[1]]] <> "); res = " <> ToString[#[[2]]])& /@ l, "\n"], 3]
+ <> "\n case default; " <> d <> "\nend select\n"];
+
+ translators = ""
+ <> "function pdg_to_mass (pdg) result (res)\n"
+ <> "integer, intent(in) :: pdg\n"
+ <> "real(kind=double) :: res\n"
+ <> WO`Indent[MakeSelect[{WO`hash["pdg", #], WO`hash["mass", #]}&
+ /@ Select[WO`taglist, WO`hash["mass", #] =!= ZERO&], "res = 0._double"], 3]
+ <> "end function pdg_to_mass\n"
+ <> "\n"
+ <> "function pdg_to_ident (pdg) result (res)\n"
+ <> "integer, intent(in) :: pdg\n"
+ <> "character(len=256) :: res\n"
+ <> WO`Indent[MakeSelect[{WO`hash["pdg", #], "\"" <> ToString[#] <> "\""}& /@ WO`taglist,
+ "call panic (\"FATAL: out of range in pdg_to_mass\")"], 3]
+ <> "end function pdg_to_ident\n"
+ <> "\n"
+ <> "function pdg_to_spin (pdg) result(res)\n"
+ <> "integer, intent(in) :: pdg\n"
+ <> "integer :: res\n"
+ <> WO`Indent[MakeSelect[{WO`hash["pdg", #],
+ Switch[lr = WO`hash["lrep", #], "S", "0", "f"|"F"|"M", "1", "V", "2", _,
+ Print["WARNING: oplotter can't deal with lrep " <> lr <> " , will treat as scalar..."];
+ "0"]}& /@ WO`taglist, "call panic (\"FATAL: out of range in pdg_to_spin\")"], 3]
+ <> "end function pdg_to_spin\n";
+ ];
+
+ DoCouplings[] := Module[{i, RenderCoupling, ProcessCoupling, pardefs},
+
+ (* Renders a name / expression pair to a string *)
+ RenderCoupling[name_, cpl_] :=
+ WO`FortranSplit[name <> " = " <> ToString[FortranForm[cpl]]];
+
+ (* Renders a coupling, taking care of the possibility of an array *)
+ ProcessCoupling[cpl_] :=
+ If[Head[cpl[[2]]] === List,
+ WO`Concat[
+ RenderCoupling[ToString[cpl[[1]]] <> "(" <> ToString[#[[1]]] <> ")", #[[2]]]& /@
+ MapThread[{#1, #2}&, {Range[1, Length[cpl[[2]]]], cpl[[2]]}]
+ , "\n"],
+ RenderCoupling[ToString[cpl[[1]]], cpl[[2]]]
+ ];
+
+ (* Internal parameter definitions. *)
+ pardefs = {#[[1]], #[[2]]}& /@ WO`IParamList;
+ initparams = "subroutine init_parameters\n";
+ (* The imperative approach grantees the correct order of execution. *)
+ For[i = 1, i <= Length[pardefs], i++,
+ initparams = initparams <> WO`Indent[ProcessCoupling[pardefs[[i]]], 3] <> "\n"];
+ (* The order of the couplings is irrelevant, so we use the functional approach... :) *)
+ initparams = initparams <> WO`Indent[WO`Concat[ProcessCoupling /@ WO`cpldeflist, "\n"], 3] <>
+ "\nend subroutine init_parameters\n";
+ initparams = StringReplace[initparams, RegularExpression["(\\d+\\.\\d*)"] -> "$1_double"];
+ ];
+
+ header = ""
+ <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
+ <> "\n"
+ <> "module opl_" <> WO`oplname <> "\n"
+ <> "implicit none\n"
+ <> "save\n"
+ <> "private\n"
+ <> "\n"
+ <> "public :: parameters, init_parameters, pdg_to_mass, pdg_to_spin, pdg_to_ident\n"
+ <> "\n"
+ <> "integer, parameter :: double=selected_real_kind (precision(1.) + 1, range(1.) + 1)\n"
+ <> "real(kind=double), parameter, public :: fr_zero=0._double, one=1._double\n";
+ footer = ""
+ <> "end module opl_" <> WO`oplname <> "\n";
+ contains = ""
+ <> "contains\n"
+ <> "\n"
+ <> "subroutine panic (msg)\n"
+ <> "character(len=*), intent(in) :: msg\n"
+ <> " print *, msg\n"
+ <> " call exit (1)\n"
+ <> "end subroutine panic\n";
+ DoParams[];
+ DoTranslators[];
+ DoCouplings[];
+ contents = header <> "\n" <> namelist <> "\n" <> pardefs <> "\n" <> contains <> "\n"
+ <> initparams <> "\n" <> translators <> "\n" <> footer;
+ handle = OpenWrite [file];
+ WriteString[handle, contents];
+ Close[handle];
+];
+
+WO`WriteOplMdl[mdlfile_, grbfile_] := Module[{handle, contents},
+ contents = ""
+ <> WO`CommentMaker[WO`fileheader, "# ", "# ", ""] <> "\n\n"
+ <>"models=\"$models " <> WO`oplname <> "\"\n"
+ <> "\n"
+ <> WO`oplname <> "_tag=\"" <> WO`omeganame <> "\"\n"
+ <> "\n"
+ <> WO`oplname <> "_name=\""
+ <> StringReplace[M$ModelName, {"\"" -> "_", "'" -> "_"}] <> " (Mathematica interface)\"\n"
+ <> "\n"
+ <> WO`oplname <> "_mod=\"opl_" <> WO`oplname <> "\"\n"
+ <> "\n"
+ <> WO`oplname <> "_settings=\"OMEGA_DIR : directory containing the omega95 library and includes; mandadatory\"\n"
+ <> WO`oplname <> "_setup() {\n"
+ <> "\tLDFLAGS=\"$LDFLAGS -L$OMEGA_DIR -lomega95\"\n"
+ <> "\tsrcfiles=\"$models_dir/opl_" <> WO`oplname <> ".f90 $srcfiles\"\n"
+ <> "\tobjfiles=\"opl_" <> WO`oplname <> ".o $objfiles\"\n"
+ <> "\tF95FLAGS=\"$F95FLAGS -I$OMEGA_DIR\"\n"
+ <> "\tif grep -e \"use omega_parameters\" $amp; then\n"
+ <> "\t\techo\n"
+ <> "\t\techo \"patching $amp to include the correct modules...\"\n"
+ <> "\t\trun \"sed -i -e 's/use omega_parameters/use opl_" <> WO`oplname <> "/' $amp\"\n"
+ <> "\tfi\n"
+ <> "}\n";
+ handle = OpenWrite[mdlfile];
+ WriteString[handle, contents];
+ Close[handle];
+ handle = OpenWrite[grbfile];
+ WriteString[handle, WO`CommentMaker[WO`fileheader, "# ", "# ", ""] <> "\n\n" <>
+ "opl_" <> WO`oplname <> ".mod opl_" <> WO`oplname <> ".o\n"];
+ Close[handle];
+];
+
+
+(* Write the WHIZARD model file. *)
+WO`WriteWhizMdl[file_] := Module[{handle, content, header, params, DoParams, reprules={}, delimit,
+ RegisterCvar, parts, vertices, DoParticles, DoVertices},
+
+ (* A delimiter for prettyprinting. *)
+ delimit = StringJoin @@ Table["#", {i, 1, 70}] <> "\n";
+
+ (* Register a complex veriable in the replacement rules list (for 1.9x), noop for 2.0. *)
+ RegisterCvar[var_] := If[WO`whizv19x[], AppendTo[reprules, RuleDelayed[
+ RegularExpression["(\\W|^)" <> ToString[var] <> "(\\W|$)"],
+ "$1(" <> ToString[var] <> "_r + " <> ToString[var] <> "_i * (0., 1.))$2"]]];
+
+ (* Digest the parameters. Complex quantities are split into real and imaginary part as WHIZARD only *
+ * handles real parameters. *)
+ DoParams[] = Module[{epars, eparsc, ipars, i, tmp, cpars, cdecrules, formatNumber},
+ (* Format a number *)
+ formatNumber = ToString[FortranForm[SetPrecision[N[#], 10]]]&;
+ (* External parameters from the list. *)
+ epars = {#[[2, 1]], N[#[[2, -3]]], #[[2, -2]], #[[2, -1]]}& /@ Flatten[#[[2]]& /@ WO`EParamList, 1];
+ (* Check whether we have to append alphas *)
+ If[WO`whizv2x[],
+ If[FreeQ[ToUpperCase[ToString[#]]& /@ WOSymbolsList, "ALPHAS"],
+ WO`appendAlphas = ! FreeQ[#[[1]]& /@ epars, aS]
+ ,
+ WO`appendAlphas = False;
+ Print[""
+ <> "WARNING: A symbol called \"alphas\" has already been defined. "
+ <> "As WHIZARD expect this to contain the value of \\alpha_s at the Z "
+ <> "pole, running the strong coupling will not work as expected."
+ ];
+ ]
+ ];
+
+ (* Append the numerical masses and widths. *)
+ AppendTo[epars,
+ {#[[2]], N[#[[3]]], False,
+ If[FreeQ[tmp = WO`hash["revpdg", #[[1, 1]]], WO`hash], ToString[tmp] <> " mass", "unknown mass, unphysical?"]}]& /@
+ Select[WO`masslist, NumericQ[#[[3]]]&];
+ AppendTo[epars,
+ {#[[2]], N[#[[3]]], False,
+ If[FreeQ[tmp = WO`hash["revpdg", #[[1, 1]]], WO`hash], ToString[tmp] <> " width", "unknown width, unphysical?"]}]& /@
+ Select[WO`widthlist, NumericQ[#[[3]]]&];
+ (* Remove duplicates. *)
+ epars = WO`WeedOutList[epars, FreeQ[#2, #1[[1]]]&];
+ (* Generate code and glue together. *)
+ params = ""
+ <> If[WO`whizv2x[], "# NEVER CHANGE THE ORDER OF THE PARAMETERS!!!\n\n", ""]
+ <> delimit
+ <> "# External Parameters\n"
+ <> delimit
+ <> "\n";
+ (* For >= 2.0, the order must be consistent between the model file and the glue code -> use a loop. *)
+ For[i = 1, i <= Length[epars], i++,
+ If [epars[[i, 3]],
+ params = params
+ <> WO`ExtendString[WO`ExtendString["parameter " <> ToString[epars[[i, 1]]] <> "_r", 20]
+ <> If[WO`whizv2x[], " = ", " "] <> formatNumber[Re[epars[[i, 2]]]], 35]
+ <> " # " <> WO`StringSplit[
+ epars[[i, 4]] <> " (real part)", 40, (StringJoin @@ Table[" ", {n, 1, 36}]) <> "# ", ""]
+ <> "\n"
+ <> WO`ExtendString[WO`ExtendString["parameter " <> ToString[epars[[i, 1]]] <> "_i", 20]
+ <> If[WO`whizv2x[], " = ", " "] <> formatNumber[Im[epars[[i, 2]]]], 35]
+ <> " # " <> WO`StringSplit[
+ epars[[i, 4]] <> " (imaginary part)", 40, (StringJoin @@ Table[" ", {n, 1, 36}]) <> "# ", ""]
+ <> "\n\n"
+ ,
+ params = params
+ <> WO`ExtendString[WO`ExtendString["parameter " <> ToString[epars[[i, 1]]], 20]
+ <> If[WO`whizv2x[], " = ", " "] <> formatNumber[epars[[i, 2]]], 35]
+ <> " # " <> WO`StringSplit[
+ epars[[i, 4]] <> If[WO`whizv2x[] && Not[FreeQ[{aS}, epars[[i, 1]]]],
+ "\n(will be reset if \\alpha_S is evolved)", ""]
+ , 40, (StringJoin @@ Table[" ", {n, 1, 36}]) <> "# ", ""]
+ <> "\n\n";
+ ]
+ ];
+ (* Generate replacement rules for the complex parameters. *)
+ eparsc = Select[epars, #[[3]]&];
+ RegisterCvar[#[[1]]]& /@ eparsc;
+ (* The following hacks are specific to WHIZARD v1.9x *)
+ If[WO`whizv19x[],
+ (* Hack: WHIZARDs perl scripts won't accept the assignment of a number to a derived parameter, so *
+ * rewrite this case as 1. * x *)
+ AppendTo[reprules, RegularExpression["^\\s*(-?\\d+.?\\d*)\\s*$"] :> "1. * ($1)"];
+ (* Another Hack: aimag expects a complex argument, but most intrinsic functions are defined as *
+ * real. This hack forces FORTRAN to typecast. *)
+ AppendTo[reprules, RegularExpression["AIMAG\\s*\\(\\s*-"] :> "aimag((-1., 0.) * "];
+ AppendTo[reprules, RegularExpression["AIMAG\\s*\\("] :> "aimag((1., 0.) * "];
+ ];
+ params = params
+ <> delimit
+ <> "# Internal Parameters\n"
+ <> delimit
+ <> "\n";
+ (* Digest the internal parameter. We use a loop to gurantee the correct order of execution. *)
+ ipars = {#[[1]], #[[2]], #[[-2]], #[[-1]]}& /@ WO`IParamList;
+ (* All complex parameters *)
+ cpars = Join[#[[1]]& /@ eparsc, #[[1]]& /@ Select[ipars, #[[3]]&]];
+ cdecrules = Flatten[({Rule[#, WO`real[#] + WO`I * WO`imag[#]], Rule[Conjugate[#], WO`real[#] - WO`I* WO`imag[#]]}&
+ /@ cpars), 1] /. Rule -> RuleDelayed;
+ For[i = 1, i <= Length[ipars], i++,
+ If[WO`whizv2x[],
+ If[ipars[[i, 3]],
+ (* Preliminary handling of complex derived parameters in W2. Only works with polynomials. *)
+ Catch[Module[{eepr, clist, ipart, rpart},
+ eepr = Expand[ipars[[i, 2]] /. Join[cdecrules, {Complex[r_, i_] :> r + i * WO`I}]];
+ clist = CoefficientList[eepr, WO`I];
+ clist = Table[{i - 1, clist[[i]]}, {i, 1, Length[clist]}];
+ rpart = Plus @@ (If[EvenQ[#[[1]]], I^#[[1]] * #[[2]], 0]& /@ clist);
+ ipart = Plus @@ (If[OddQ[#[[1]]], I^(#[[1]] - 1) * #[[2]], 0]& /@ clist);
+ If[Not[FreeQ[{rpart, ipart}, WO`I]],
+ Print[""
+ <> "Unable to extract real and imaginary parts from derived complex parameter "
+ <> "\"" <> ToString[ipars[[i, 1]]] <> "\". The interface currently support a "
+ <> "polynomial dependence on complex quantities. If you are sure that your "
+ <> "derived parameters meet this requirement, it is time to file a BUG report..."
+ ];
+ Throw[Null];
+ ];
+ params = params <> StringReplace[
+ WO`StringSplit["# " <> ipars[[i, 4]] <>
+ If[Not[FreeQ[WO`RunParameters, ipars[[i, 1]]]],
+ "\n(will be reset if \\alpha_S is evolved)", ""]
+ , 68, "# ", ""] <> "\n"
+ <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]] <> "_r", 15] <> " = "
+ <> WO`SindarinSplit[WO`SindarinForm[rpart], 55, 18] <> "\n"
+ <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]] <> "_i", 15] <> " = "
+ <> WO`SindarinSplit[WO`SindarinForm[ipart], 55, 18] <> "\n\n",
+ {RegularExpression["WOxreal\\((.*?)\\)"] :> "$1_r",
+ RegularExpression["WOximag\\((.*?)\\)"] :> "$1_i"}];
+ ]];
+ ,
+ If[Not[And @@ (FreeQ[ipars[[i, 2]], #]& /@ cpars)],
+ Print[""
+ <> "WARNING: the real derived parameter \"" <> ToString[ipars[[i, 1]]] <> "\" depends "
+ <> "on a complex quantity. This is currently not supported with WHIZARD 2 and will be "
+ <> "skipped - prepare for broken output..."
+ ]
+ ,
+ params = params
+ <> WO`StringSplit["# " <> ipars[[i, 4]] <>
+ If[Not[FreeQ[WO`RunParameters, ipars[[i, 1]]]],
+ "\n(will be reset if \\alpha_S is evolved)", ""]
+ , 68, "# ", ""] <> "\n"
+ <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]], 15] <> " = "
+ <> WO`SindarinSplit[WO`SindarinForm[ipars[[i, 2]]], 55, 18] <> "\n\n"
+ ];
+ ];
+ ,
+ If[ipars[[i, 3]],
+ params = params <> WO`StringSplit["# " <> ipars[[i, 4]], 68, "# ", ""] <> "\n"
+ <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]] <> "_r", 15] <> " " <> WO`FortranSplit[
+ "\"" <> WO`StringReplaceAll[ToString[FortranForm[Re[ipars[[i, 2]]]]], reprules] <> "\"",
+ 55, 17] <> "\n"
+ <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]] <> "_i", 15] <> " " <> WO`FortranSplit[
+ "\" " <> WO`StringReplaceAll[ToString[FortranForm[Im[ipars[[i, 2]]]]], reprules] <> "\"",
+ 55, 17] <> "\n\n";
+ RegisterCvar[ipars[[i, 1]]];
+ ,
+ params = params <> WO`StringSplit["# " <> ipars[[i, 4]], 68, "# ", ""] <> "\n"
+ <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]], 15] <> " " <> WO`FortranSplit
+ ["\"" <> WO`StringReplaceAll[ToString[FortranForm[ipars[[i, 2]]]], reprules] <> "\"",
+ 55, 17] <> "\n\n";
+ ];
+ ];
+ ];
+ (* Append alphas if requested *)
+ If[WO`appendAlphas,
+ params = params
+ <> "# Strong coupling at the Z pole (required by WHIZARD)\n"
+ <> "derived alphas = aS\n\n"
+ ];
+ (* W2: We need this to ensure the correct ordering in the glue interface. *)
+ WO`paramlist = {#[[1]], #[[3]]}& /@ Join[epars, ipars];
+ ];
+
+ (* Build the particle list. *)
+ DoParticles[] = Module[{plist, AppendParticle, WhizPname, AppendClass},
+
+ (* Construct a sane name. *)
+ WhizPname[s_] := Module[{i, c},
+ c = "wp_" <> ToLowerCase[WO`SanitizeString[s]];
+ i = 1;
+ If[WO`hash["wpns", c] === True,
+ While[WO`hash["wpns", c <> "_" <> ToString[i]] === True, i++];
+ c = c <> "_" <> ToString[i];
+ ];
+ WO`hash["wpns", c] = True;
+ c
+ ];
+
+ (* Build the definition block for one particle. TODO: the "parton" property is derived from color, *
+ * singlets are no partons, all other particles are partons. This is hackish, but I see no other *
+ * way to do this. *)
+ AppendParticle[{name_, aname_, spin_, prop_, msym_, wsym_, crep_, plabel_, pdg_, descr_, tex_, atex_, gs_}] := Module[
+ {thename, thetex, theaname, theatex},
+ (* Make sure that we record the particle with positive PDG. *)
+ If[pdg > 0,
+ thename = name; thetex = tex; theaname = aname; theatex = atex
+ ,
+ thename = aname; thetex = atex; theaname = name; theatex = tex
+ ];
+ If[MatchQ[spin, U], Return[Null]];
+ If[WO`hash["goldstone", ToString[thename]] && WO`gauge === WO`WOUnitarity, Return[Null]];
+ WO`hash["whizname", name] = WO`hash["whizname", aname] = WhizPname[ToString[thename]];
+ parts = parts <> "# particle: " <> ToString[descr] <> "\n"
+ <> "particle " <> WO`ExtendString[WO`hash["whizname", thename], 10] <> " "
+ <> WO`ExtendString[ToString[Abs[pdg]], 8] <> If[MatchQ[crep, T|O], " parton", ""] <> "\n"
+ <> WO`Indent[""
+ <> "spin " <> WO`ExtendString[Switch[spin, S, "0", F, "1/2", V, "1", T, "2"], 3]
+ <> Switch[crep, T, " color 3", O, " color 8", _, ""] <> "\n"
+ <> If[WO`whizv2x[], ""
+ <> "name \"" <> ToString[thename] <> "\""
+ <> "\ntex_name \"" <> ToString[thetex] <> "\"\n"
+ <> If[name =!= aname, ""
+ <> "anti \"" <> ToString[theaname] <> "\""
+ <> "\ntex_anti \"" <> ToString[theatex] <> "\"\n", ""]
+ , ""
+ <> "name " <> WO`ExtendString["\"" <> ToString[thename] <> "\"", 7]
+ <> If[thetex != thename, " tex:\"" <> ToString[thetex] <> "\"", ""] <> "\n"
+ <> If[name =!= aname, ""
+ <> "anti omega:" <> WO`ExtendString["\"" <> ToString[theaname] <> "\"", 7]
+ <> If[theatex != theaname, " tex:\"" <> ToString[atex] <> "\"", ""] <> "\n",
+ ""]
+ ]
+ <> If[msym =!= ZERO, "mass " <> ToString[WO`hash["mass", thename]] <> "\n", ""]
+ <> If[wsym =!= ZERO, "width " <> ToString[wsym] <> "\n", ""]
+ , 3] <> "\n";
+ ];
+
+ (* Adds a comment with the class name and then appends all particles in this class. *)
+ AppendClass[{{cdef_, cname_}, partlist_}] := Module[{},
+ (* Filter out ghosts and unphysical particles. *)
+ If[Select[partlist, (#[[3]] =!= U)&] == {}, Return[Null]];
+ parts = parts <> "# class: " <> ToString[cname] <> "\n" <> delimit <> "\n";
+ AppendParticle /@ partlist;
+ ];
+
+ parts = ""
+ <> delimit
+ <> "# Particle definitions\n"
+ <> delimit
+ <> "\n";
+ AppendClass /@ WO`PartList;
+ If[WO`whizv2x[],
+ parts = parts <> ""
+ <> "# Hadrons\n"
+ <> delimit
+ <> "\n"
+ <> "particle PROTON 2212\n"
+ <> " spin 1/2 charge 1\n"
+ <> " name p \"p+\"\n"
+ <> " anti pbar \"p-\"\n"
+ <> "\n"
+ <> "particle HADRON_REMNANT 90\n"
+ <> "\n"
+ <> "particle HADRON_REMNANT_SINGLET 91\n"
+ <> "\n"
+ <> "particle HADRON_REMNANT_TRIPLET 92\n"
+ <> " color 3\n"
+ <> "\n"
+ <> "particle HADRON_REMNANT_OCTET 93\n"
+ <> " color 8"
+ <> "\n\n";
+ ];
+ ];
+
+ (* Construct the vertex list. *)
+ DoVertices[] := Module[{nmasses, reprules, massrules, verts, Weight, i},
+
+ (* Get the numeric mass of particle(s) . *)
+ Weight[plist_List] := Plus @@ (Weight /@ plist);
+ Weight[part_] := Module[{m},
+ If[NumericQ[m = (part /. massrules)], m,
+ If[WO`hash["mass", part] =!= ZERO,
+ Print["WARNING: mass of particle " <> ToString[part] <> " could not be detemined, assuming 0..."]];
+ 0
+ ]
+ ];
+
+ (* Convert Parameters and numeric masses / widths into a replacement list. *)
+ reprules = WO`WeedOutList[Join[{},
+ Rule[#[[1]], #[[-3]]]& /@
+ (#[[2]]& /@ Flatten[#[[2]]& /@ WO`EParamList, 1]),
+ RuleDelayed[#[[1]], Evaluate[#[[2]]]]& /@ WO`IParamList,
+ Rule[#[[2]], #[[3]]]& /@ Select[Join[WO`masslist, WO`widthlist], NumericQ[#[[3]]]&]
+ ]];
+ (* Try to calculate all masses by applying the replacement list. *)
+ massrules =
+ Select[{WO`hash["revpdg", #[[1, 1]]], #[[2]]}& /@ Simplify[WO`masslist //. reprules],
+ NumericQ[#[[2]]]&];
+ (* Make sure that the conjugated particles are also part of the game. *)
+ massrules = Flatten[{#, {WO`hash["conj", ToString[#[[1]]]], #[[2]]}}& /@ massrules, 1];
+ (* Weed out duplicates and create replacement list. *)
+ massrules = WO`WeedOutList[(Rule @@ #)& /@ massrules];
+ (* Get the vertex list, take care to replace CC with HC *)
+ verts = Select[(PartName[#[[1]] /. CC -> WO`HC]& /@ #[[1]])& /@ WO`vlist, (Length[#] == 3)&];
+ (* Drop all particles not known to WHIZARD. *)
+ verts = Select[verts, (And @@ ((Head[WO`hash["whizname", #]] === String)& /@ #))&];
+ (* Sort the list w.r.t. the total mass at the vertex. *)
+ verts = Sort[verts, (Weight[#1] < Weight[#2])&];
+ (* Write out the list; the For[] loop ensures the correct ordering. *)
+ vertices = ""
+ <> delimit
+ <> "# vertex list (arity 3 only)\n"
+ <> delimit
+ <> "\n";
+ For[i=1, i <= Length[verts], i++,
+ vertices = vertices <> "vertex " <>
+ WO`Concat[
+ If[WO`whizv2x[], ("\"" <> # <> "\"")& /@ verts[[i]], verts[[i]]],
+ " "] <> "\n"
+ ];
+ ];
+
+ header = WO`CommentMaker[WO`fileheader, "# ", "# ", ""] <> "\n\n";
+ DoParams[];
+ DoParticles[];
+ DoVertices[];
+ content = header <> "\n" <>
+ If[WO`whizv2x[],
+ "model \"" <> WO`whizname <> "\"\n\n"
+ ,
+ ""
+ ]
+ <> params <> parts <> vertices;
+ handle = OpenWrite[file];
+ WriteString[handle, content];
+ Close[handle];
+];
+
+WO`WriteWhizGlue[filestem_] := Module[{handle, content, pubdefs, header, footer, DoPubdefs, DoImport,
+ global, local, master, couplings={}, i, VOpen, kind, preamble, namepre, import, run, DoRun,
+ RenderCoupling},
+
+ (* Verbose open a file. *)
+ VOpen[file_] := (Print["Writing \"" <> file <> "\"..."]; OpenWrite[file]);
+
+ (* These depends on the WHIZARD version. *)
+ kind = If[WO`whizv2x[], "default", "omega_prec"];
+ preamble = If[WO`whizv2x[],
+ "use kinds\nuse constants, only: pi\n",
+ "use omega_kinds !NODEP!\nuse omega_constants !NODEP!\nuse parameters\n"];
+ namepre = If[WO`whizv2x[], "parameters_" <> WO`whizname, "omega_parameters_whizard"];
+
+ (* Create the public definitions. *)
+ DoPubdefs[] := Module[{reals, cmplxs},
+ (* Reals are widths and masses. *)
+ reals = WO`WeedOutList[ToString[#[[2]]]& /@ Join[WO`masslist, WO`widthlist]];
+ (* If we are in Rxi gauge, we need to add the Rxi symbol. *)
+ If[WO`gauge === WO`WORxi, AppendTo[reals, ToString[WO`gsym]]];
+ (* Couplings are complex. *)
+ cmplxs = (ToString[#[[1]]] <> If[Head[#[[2]]] === List, "(" <> ToString[Length[#[[2]]]] <> ")", ""])&
+ /@ WO`cpldeflist;
+ pubdefs = "real(kind="<> kind <> "), parameter :: fr_zero=0." <> If[WO`whizv19x[], ", one=1.\n", "\n"] <>
+ If[reals != {}, ""
+ <> "! masses and widths:\n"
+ <> WO`FortranSplit["real(kind=" <> kind <> ") :: " <> WO`Concat[reals, ", "]] <> "\n",
+ ""
+ ] <> If[cmplxs != {}, ""
+ <> "! vertex factors:\n"
+ <> WO`FortranSplit["complex(kind=" <> kind <> ") :: " <> WO`Concat[cmplxs, ", "]] <> "\n",
+ ""
+ ];
+ ];
+
+ (* Render a coupling. *)
+ RenderCoupling[{cpl_, defs_List}] := StringJoin @@
+ (RenderCoupling[{cpl <> "(" <> ToString[#] <> ")", defs[[#]]}]& /@ Range[Length[defs]]);
+ RenderCoupling[{cpl_, def_}] :=
+ WO`FortranSplit[cpl <> " = " <>
+ StringReplace[ToString[FortranForm[def]], RegularExpression["(\\d+\\.\\d*)"] :> ("$1_" <> kind)]
+ ] <> "\n";
+
+ DoImport[] := Module[{mwlist, pars, realdefs, reals, cmplxs, cpltmp={}},
+
+ (* All external and internal parameters. *)
+ pars = Join[
+ {#[[2, 1]], #[[2, -2]]}& /@ Flatten[#[[2]]& /@ WO`EParamList, 1],
+ {#[[1]], #[[-2]]}& /@ WO`IParamList
+ ];
+ (* All masses and widths. *)
+ mwlist = #[[2]]& /@ Join[WO`masslist, WO`widthlist];
+ (* We have to salvage all real parameters from the WHIZARD par structure (1.9x) resp. the array (2x). *)
+ reals = WO`WeedOutList[Join[
+ ToString[#[[1]]]& /@ Select[pars, Not[#[[2]]]&], ToString /@ mwlist]];
+ (* Only the parameters which haven't already been declared globally (which excludes masses and widths) *
+ * have to be declared locally. *)
+ realdefs = WO`WeedOutList[ToString[#[[1]]]& /@ Select[pars, (Not[#[[2]]] && FreeQ[mwlist, #[[1]]])&]];
+ (* If we are using Rxi gauge, we must filter out the Rxi symbol, which is already declared globally. *)
+ If[WO`gauge === WO`WORxi,
+ realdefs = Select[realdefs, (# != ToString[WO`gsym])&];
+ ];
+ (* All complex parameters have to be salvaged from WHIZARD, recombining real and imaginary parts. *)
+ cmplxs = WO`WeedOutList[ToString[#[[1]]]& /@ Select[pars, #[[2]]&]];
+ (* Build the expressions for calculating the couplings, splitting this properly in several blocks.*)
+ For[i = 1, i <= Length[WO`cpldeflist], i++,
+ AppendTo[cpltmp, RenderCoupling[WO`cpldeflist[[i]]]];
+ If[Length[cpltmp] == WO`MaxCouplingsPerFile,
+ AppendTo[couplings, cpltmp];
+ cpltmp = {};
+ ];
+ ];
+ If[Length[cpltmp] != 0, AppendTo[couplings, cpltmp]];
+ (* Build the local declaration module. *)
+ local = ""
+ <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
+ <> "\n"
+ <> "module " <> namepre <> "_local\n"
+ <> "use " <> namepre <> "_global\n"
+ <> "implicit none\n"
+ <> "public\n"
+ <> "save\n"
+ <> "\n"
+ <> If[reals != {},
+ WO`FortranSplit["real(kind=" <> kind <> ") :: " <> WO`Concat[realdefs, ", "]] <> "\n",
+ ""]
+ <> If[cmplxs != {},
+ WO`FortranSplit["complex(kind=" <> kind <> ") :: " <> WO`Concat[cmplxs, ", "]] <> "\n",
+ ""]
+ <> "\n"
+ <> "end module " <> namepre <> "_local";
+ (* Build the import function. *)
+ import = ""
+ <> "subroutine import_from_whizard (par)\n"
+ <> "use " <> namepre <> "_local\n"
+ <> WO`Concat[Table["use " <> namepre <> "_cpl" <> ToString[i], {i, 1, Length[couplings]}], "\n"] <> "\n"
+ <> If[WO`whizv19x[], ""
+ <> "type(parameter_set), intent(in) :: par\n"
+ <> "\n"
+ <> WO`Indent[""
+ <> StringJoin @@ ((# <> " = par%" <> # <> "\n")& /@ reals)
+ <> StringJoin @@
+ ((# <> " = par%" <> # <> "_r + par%" <> # <> "_i * (0._omega_prec, 1._omega_prec)\n")& /@ cmplxs), 3]
+ , ""
+ <> "real(kind=default), dimension("
+ <> ToString[Plus @@ (If[#[[2]], 2, 1]& /@ WO`paramlist) + If[WO`appendAlphas, 1, 0]]
+ <> "), intent(in) :: par\n"
+ <> WO`Indent[Module[{val, j, par},
+ val = "";
+ j = 1;
+ For[i = 1, i <= Length[WO`paramlist], i++,
+ par = ToString[WO`paramlist[[i, 1]]];
+ val = val <>
+ If[WO`paramlist[[i, 2]],
+ j = j + 2;
+ par <> " = par(" <> ToString[j - 2] <> ") + par(" <> ToString[j - 1] <> ") * (0._default, 1._default)\n"
+ ,
+ j++;
+ par <> " = par(" <> ToString[j - 1] <> ")\n"
+ ]
+ ];
+ val
+ ], 3]
+ ]
+ <> WO`Indent[WO`Concat[
+ Table["call calc_cpl" <> ToString[i], {i, 1 Length[couplings]}], "\n"] <> "\n", 3]
+ <> "end subroutine import_from_whizard\n";
+ ];
+
+ DoRun[] := Module[{epars, ipars, redefext, redefint, calcpl},
+ epars = #[[2, 1]]& /@ Flatten[#[[2]]& /@ WO`EParamList, 1];
+ ipars = {#[[1]], #[[2]]}& /@ WO`IParamList;
+ redefext = StringJoin @@ Append[Switch[#
+ , aS, " aS = alpha_s\n"
+ , _, ""]& /@ epars, ""];
+ redefint = StringJoin @@ Append[If[Not[FreeQ[WO`RunParameters, #[[1]]]]
+ , WO`FortranSplit[" " <> ToString[#[[1]]] <> " = " <> StringReplace[
+ ToString[FortranForm[#[[2]]]] <> "\n", RegularExpression["(\\d+\\.\\d*)"] :> ("$1_" <> kind)], 67, 3]
+ , ""]& /@ ipars, ""];
+ calcpl = If[Length[WO`runningcouplings] > 0
+ , WO`Indent[StringJoin @@ (RenderCoupling[WO`cpldeflist[[WO`runningcouplings[[#]]]]]& /@
+ Range[Length[WO`runningcouplings]]), 3]
+ , ""
+ ];
+ run = ""
+ <> "subroutine model_update_alpha_s (alpha_s)\n"
+ <> "use " <> namepre <> "_local\n"
+ <> "real(kind=default), intent(in) :: alpha_s\n"
+ <> ""
+ <> redefext
+ <> redefint
+ <> calcpl
+ <> "end subroutine model_update_alpha_s\n"
+ ];
+
+ DoPubdefs[];
+ DoImport[];
+ DoRun[];
+ global = ""
+ <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
+ <> "\n"
+ <> "module " <> namepre <> "_global\n"
+ <> preamble
+ <> "implicit none\n"
+ <> "public\n"
+ <> "private :: sec_re, sec_cmplx, csc_re, csc_cmplx\n"
+ <> "save\n"
+ <> "\n"
+ <> pubdefs
+ <> "\n"
+ <> "interface sec\n"
+ <> " module procedure sec_re\n"
+ <> " module procedure sec_cmplx\n"
+ <> "end interface sec\n"
+ <> "\n"
+ <> "interface csc\n"
+ <> " module procedure csc_re\n"
+ <> " module procedure csc_cmplx\n"
+ <> "end interface csc\n"
+ <> "\n"
+ <> "contains\n"
+ <> "\n"
+ <> "function sec_re (x) result (y)\n"
+ <> "real(kind=" <> kind <> "), intent(in) :: x\n"
+ <> "real(kind=" <> kind <> ") :: y\n"
+ <> " y = 1._" <> kind <> " / cos (x)\n"
+ <> "end function sec_re\n"
+ <> "\n"
+ <> "function sec_cmplx (x) result (y)\n"
+ <> "complex(kind=" <> kind <> "), intent(in) :: x\n"
+ <> "complex(kind=" <> kind <> ") :: y\n"
+ <> " y = 1._" <> kind <> " / cos (x)\n"
+ <> "end function sec_cmplx\n"
+ <> "\n"
+ <> "function csc_re (x) result (y)\n"
+ <> "real(kind=" <> kind <> "), intent(in) :: x\n"
+ <> "real(kind=" <> kind <> ") :: y\n"
+ <> " y = 1._" <> kind <> " / cos (x)\n"
+ <> "end function csc_re\n"
+ <> "\n"
+ <> "function csc_cmplx (x) result (y)\n"
+ <> "complex(kind=" <> kind <> "), intent(in) :: x\n"
+ <> "complex(kind=" <> kind <> ") :: y\n"
+ <> " y = 1._" <> kind <> " / cos (x)\n"
+ <> "end function csc_cmplx\n"
+ <> "\n"
+ <> "end module " <> namepre <> "_global";
+ master = ""
+ <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
+ <> "\n"
+ <> "module " <> namepre <> "\n"
+ <> "use " <> namepre <> "_global\n"
+ <> "implicit none\n"
+ <> "public\n"
+ <> "private :: sec, csc\n"
+ <> "save\n"
+ <> "\n"
+ <> "contains\n"
+ <> "\n"
+ <> import
+ <> "\n"
+ <> If[WO`whizv2x[], run <> "\n", ""]
+ <> "end module " <> namepre;
+ handle = VOpen[filestem <> ".global.f90"];
+ WriteString[handle, global];
+ Close[handle];
+ (* Make sure no old coupling modules are lying around. *)
+ (
+ Print["Deleting " <> # <> " ..."];
+ If [DeleteFile[#] === $Failed, Throw["ERROR: unable to delete " <> #, WO`EAbort]];
+ )& /@ Select[FileNames[filestem <> "*f90"], StringMatchQ[#,
+ RegularExpression[StringReplace[filestem, "." -> "\\."] <> "\\.cpl\\d+\\.f90"]]&];
+
+ For[i=1, i <= Length[couplings], i++,
+ handle = VOpen[filestem <> ".cpl" <> ToString[i] <> ".f90"];
+ WriteString[handle, ""
+ <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
+ <> "\n"
+ <> "module " <> namepre <> "_cpl" <> ToString[i] <> "\n"
+ <> "use " <> namepre <> "_global\n"
+ <> "use " <> namepre <> "_local\n"
+ <> "implicit none\n"
+ <> "\n"
+ <> "contains\n"
+ <> "\n"
+ <> "subroutine calc_cpl" <> ToString[i] <> "\n"
+ <> WO`Indent[StringJoin @@ couplings[[i]], 3]
+ <> "end subroutine calc_cpl" <> ToString[i] <> "\n"
+ <> "\n"
+ <> "end module " <> namepre <> "_cpl" <> ToString[i]
+ ];
+ Close[handle];
+ ];
+ handle = VOpen[filestem <> ".local.f90"];
+ WriteString[handle, local];
+ Close[handle];
+ handle = VOpen[filestem <> ".f90"];
+ WriteString[handle, master];
+ Close[handle];
+];
+
+
+(* ********************************************************************
+ The functions below are for im- and export of external parameters.
+ ******************************************************************** *)
+
+WO`WriteExtParams[file_String, options___] := Module[{parlist, outfile, omode, content,
+ epars, handle, unknownopts, modelname},
+ (* Check for unknown options. *)
+ If[Length[unknownopts =
+ Select[#[[1]]& /@ {options}, FreeQ[#[[1]]& /@ Options[WO`WriteExtParams], #]&]] > 0,
+ Print["ERROR: WO`WriteExtParams: unknown option(s) " <> WO`Concat[ToString /@ unknownopts, " , "]];
+ Return[Null];
+ ];
+
+ (* Setup environment *)
+ WO`GlobalSetup[];
+ WO`EParamList = WO`WOEParamList /. {options} /. Options[WO`WriteExtParams];
+ WO`masslist = WO`WOMassList /. {options} /. Options[WO`WriteExtParams];
+ WO`widthlist = WO`WOWidthList /. {options} /. Options[WO`WriteExtParams];
+ WO`whizv = WO`WOWhizardVersion /. {options} /. Options[WO`WriteExtParams];
+ modelname = WO`WOModelName /. {options} /. Options[WO`WriteExtParams];
+ Catch[WO`whizvn[], WO`EAbort, (Print["ERROR: invalid WHIZARD version"]; Return[])&];
+
+ (* Determine the output file. *)
+ outfile = If[file == "",
+ WO`SanitizeString[modelname] <> If[WO`whizv2x[], ".sin", ".in"], file];
+ outfile = If[StringMatchQ[file, RegularExpression["^\\s*" <> WO`fileSlashRE <> ".*"]], outfile,
+ Directory[] <> WO`fileSlash <> outfile];
+ Print[""
+ <> "Writing external parameters to file\n"
+ <> " \"" <> outfile <> "\"\n"
+ <> "in " <> If[WO`whizv2x[], "WHIZARD 2.x sindarin", "WHIZARD 1.9x namelist"] <> " format..."
+ ];
+
+ (* Prepare the parameter list. *)
+ epars = {#[[2, 1]], #[[2, -3]], #[[2, -2]]}& /@ Flatten[#[[2]] & /@ WO`EParamList, 1];
+ parlist = WO`WeedOutList[Join[
+ ({ToString[#[[1]]], #[[2]]}& /@ Select[epars, (! #[[3]])&]),
+ Flatten[{
+ {ToString[#[[1]]] <> "_r", N[Re[#[[2]]]]}, {ToString[#[[1]]] <> "_i", N[Im[#[[2]]]]}
+ }& /@ Select[epars, #[[3]]&], 1],
+ Select[{ToString[#[[2]]], #[[3]]} & /@ Join[WO`masslist, WO`widthlist], NumericQ[#[[2]]]&]
+ ], FreeQ[#2, #1[[1]]]&];
+
+ (* Create the contents of the parameter file *)
+ content = If[WO`whizv2x[], "", "&parameter_input\n"];
+ (
+ content = content <> If[WO`whizv2x[], "", " "] <> #[[1]] <> " = " <> ToString[#[[2]]] <> "\n"
+ )& /@ parlist;
+ content = content <> If[WO`whizv2x[], "", "/\n"];
+
+ (* Write out. *)
+ handle = OpenWrite[outfile];
+ WriteString[handle, content];
+ Close[handle];
+ (* Finito. *)
+ Print["... done!"];
+];
+WO`WriteExtParams[options___] := WO`WriteExtParams["", options];
Property changes on: FeynRulesInterface/Interfaces/WhizardOmega/WOMathematicaInterface.m
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: FeynRulesInterface/FeynRulesPackage.patch
===================================================================
--- FeynRulesInterface/FeynRulesPackage.patch (revision 0)
+++ FeynRulesInterface/FeynRulesPackage.patch (revision 3973)
@@ -0,0 +1,17 @@
+--- a/FeynRulesPackage.m 2010-01-07 12:59:46.000000000 +0100
++++ b/FeynRulesPackage.m 2010-01-07 12:59:47.000000000 +0100
+@@ -1024,6 +1024,7 @@
+ << "CalcHepInterface.m";
+ << "TeXInterface.m";
+ << "FeynArtsInterface.m";
++ << "WhizardOmegaInterface.m";
+
+ End[]
+ ];
+@@ -1069,5 +1070,5 @@
+ AntiParticleName, Goldstone, Ghost, QuantumNumbers, TeXParticleName, TeXAntiParticleName, Abelian, GaugeBoson, CouplingConstant, StructureConstant, SymmetricTensor,
+ Representations, Colour, Gauge, Lorentz, Spin, IndexDelta, Ext, External, Internal, ParameterType, Value, Unitary,
+ Orthogonal, Hermitian, TensorClass, Description, TeX, BlockName, AllowSummation, InteractionOrder, QCD, QED, ComplexParameter, ScreenOutput, Name,
+- MinCanonicalDimension, MaxCanonicalDimension, TeXOutput, WriteMGOutput, WriteSHOutput, WriteCHOutput, WriteFeynArtsOutput, ConservedQuantumNumbers, MASS, DECAY,
++ MinCanonicalDimension, MaxCanonicalDimension, TeXOutput, WriteMGOutput, WriteSHOutput, WriteCHOutput, WriteFeynArtsOutput, WriteWOOutput, ConservedQuantumNumbers, MASS, DECAY,
+ ZERO, NoUnfold, FRBlock, NoValue, NoPDG, NoBlockName, PutIndices, PrePutIndices, GetFieldContent, PrintLagrangian, FR$VersionNumber]
Index: FeynRulesInterface/ChangeLog
===================================================================
--- FeynRulesInterface/ChangeLog (revision 0)
+++ FeynRulesInterface/ChangeLog (revision 3973)
@@ -0,0 +1,51 @@
+From 2010.10.17 to 2011.12.08
+===============================================================================
+- Bug fixes
+- Internal restructuring
+
+From 2010.10.17 to 2010.10.18
+===============================================================================
+
+- Add correct preprint number to messages.
+
+From 2010.07.08 to 2010.10.17
+===============================================================================
+
+- Support WHIZARD 1.96.
+
+- WOWhizardVersion -> 2.0.3 is the default now.
+
+- Minor optimization in O'Mega models: vanishing widths are now defined as
+ vanishing instead of a numeric zero.
+
+- Major hardening of the color flow code: all flows unsupported by O'Mega
+ should now be reliably rejected. Fix a bug that could lead to a wrong
+ phase assignment at 888 type vertices with different flavors.
+
+- Replace WOVertexList with input, no Lagrangian required anymore when using
+ this option.
+
+- Add INSTALL to output.
+
+- Code for decomposing complex internal variables into real and imaginary
+ parts significantly enhanced and optimized.
+
+- Fix handling of Pi in output for WO 1.9x
+
+- Fix formatting of really small numbers in generated model files, would cause
+ breakage before.
+
+From 2010.06.27 to 2010.07.08:
+===============================================================================
+
+- Support trilinear part of the operator
+ H tr G^{\mu\nu} G_{\mu\nu}
+ (aka effective hgg / haa / hza coupling)
+
+- Support for the upcoming WHIZARD 2.0.3 via WOWhizardVersion -> 2.0.3 (not
+ yet the default).
+
+- Fix automagic goldstone masses in WHIZARD (in O'Mega, they were OK though,
+ so this bug effectively only concerned processes with external goldstones).
+
+- Add this ChangeLog to the tarball :)
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmegaInterface.m
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmegaInterface.m (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmegaInterface.m (revision 3973)
@@ -1,164 +0,0 @@
-(*
-
- $Id$
-
- This is the sugar coating of WOMathematicaInterface.m which restores its
- functionality as a FR interface.
-
- Christian Speckner, 2011
-*)
-
-Catch[Module[{path, importedopts, importedmisc, symrules},
-
- (* We override those. *)
- WO`HC[p_] := HC[p] /. {Dot[x_,Ga[0]] :> x, Dot[Ga[0], x_] :> x};
-
- (* Try to load the module. *)
- WO`InterfacePath = Null;
- If[StringQ[Global`$WOInterfacePath] && Length[FileNames[
- {"WOMathematicaInterface.m"}, Global`$WOInterfacePath]] == 1,
- WO`InterfacePath = Global`$WOInterfacePath
- ];
- If[!StringQ[WO`InterfacePath] && StringQ[Global`$FeynRulesPath] && Length[FileNames[
- {"WOMathematicaInterface.m"},
- path = ToFileName[{Global`$FeynRulesPath, "Interfaces", "WhizardOmega"}]]] == 1,
- WO`InterfacePath = path
- ];
- If[!StringQ[WO`InterfacePath], Throw[Null, "Unable to locate WOMathematicaInterface.m"]];
- Get[ToFileName[WO`InterfacePath, "WOMathematicaInterface.m"]];
-
- (* Version check *)
- If[WO`APIversion != 2, Throw[Null, "Invalid API version."]];
-
- (* Import the options for WriteWOOutput. *)
- importedopts = {
- "WOModelName", "WOMaxNcf", "WOGauge", "WOGaugeParameter", "WOVerbose",
- "WOAutoGauge", "WOMaxCouplingsPerFile",
- "WORunParameters", "WOOplotter", "WOFast", "WOWhizardVersion", "WOProgress"
- };
- importedmisc = {"WOUnitarity", "WOFeynman", "WORxi"};
- symrules = (
- MessageName[Evaluate[Symbol["FeynRules`" <> #]], "usage"] = MessageName[Evaluate[Symbol["WO`" <> #]], "usage"];
- Protect[Evaluate[Symbol["FeynRules`" <> #]]];
- Evaluate[Symbol["FeynRules`" <> #]] -> Evaluate[Symbol["WO`" <> #]]
- )& /@ Join[importedopts, importedmisc];
- Options[FeynRules`WriteWOOutput] = Join[(Symbol["FeynRules`" <> #] -> (Symbol["FeynRules`" <> #]
- /. symrules /. Options[WO`WriteOutput]) /. (symrules /. Rule[a_, b_] :> Rule[b, a]))&
- /@ importedopts, {Input -> Null, Output -> Null}
- ];
-
- (* Dito, but for WriteWOExtParams. *)
- Options[FeynRules`WriteWOExtParams] =
- {FeynRules`WOWhizardVersion -> (FeynRules`WOWhizardVersion /. Options[FeynRules`WriteWOOutput])};
-
- (* Frontend to WO`WriteOutput *)
- FeynRules`WriteWOOutput[lags___, options___] :=
- FeynRules`WriteWOOutput[{lags}, options] /;
- (And @@ ((Head[#] =!= Rule &) /@ {lags})) &&
- (And @@ ((Head[#] === Rule &)/@ {options})) &&
- (And @@ ((Head[#] =!= List &) /@ {lags}));
- FeynRules`WriteWOOutput[lags_List, options___] := Module[{
- fropts, backendopts, knownopts, unknownopts, vlist, modelname, opts, Addpar, output
- },
-
-
- (* Disentangle the different options. I. *)
- opts = {options};
- fropts = Select[opts, !FreeQ[#[[1]]& /@ Options[FeynmanRules], #[[1]]]&];
- knownopts = #[[1]]& /@ Join[Options[WriteWOOutput], Options[FeynmanRules]];
- unknownopts = Select[#[[1]]& /@ opts, FreeQ[knownopts, #]&];
- If[Length[unknownopts] > 0,
- Print["ERROR: unknown option(s): " <> WO`Concat[ToString /@ unknownopts, " , "]];
- Return[Null];
- ];
-
- (* Prepare options to FeynmanRules. *)
- Addpar[Rule[par_, val_]] := If[FreeQ[fropts, par], AppendTo[fropts, par -> val]];
- Addpar[ScreenOutput -> False];
- If[Length[Names["FeynRules`FlavorExpansion"]] == 0,
- Addpar[FlavorExpand -> True]
- ,
- Addpar[FlavorExpand -> FR$AutoFlavorExpand]
- ];
-
- (* Advertisement. *)
- Print[" - - - FeynRules interface to WHIZARD/O'Mega - - -"];
- Print[" - - - Authors: C. Speckner, N. Christensen - - -"];
- Print[" - - - Please cite arXiv:1010.3251 - - -"];
- Print[""];
-
- (* The model name - we have our own default here.*)
- modelname = If[FreeQ[#[[1]]& /@ opts, FeynRules`WOModelName],
- "fr_" <> ToString[M$ModelName]
- ,
- WOModelName /. opts
- ];
- opts = Select[opts, (#[[1]] =!= FeynRules`WOModelName)&];
-
- (* Output directory *)
- output = If[FreeQ[#[[1]]& /@ opts, Output], {}, {WO`WOOutputDir -> Output} /. opts];
-
- (* Create vertex list. *)
- vlist = Input /. opts /. ParamRules;
- If[Head[vlist] =!= List,
- (* We put this on hold to allow the backend to check the settings for consistency
- before doing the expensive generation of the vertex list. *)
- fropts /. List[pars__] :> (vlist = Hold[Module[{list},
- Print["---"];
- Print["Calculating feynman rules..."];
- FeynRules`FR$AbbIndexSumExpanded = {};
- list = FeynRules`MergeVertices @@ (FeynRules`FeynmanRules[#, pars]& /@ lags);
- If[Length[Names["FeynRules`FlavorExpansion"]] > 0,
- Print["Expanding flavors..."];
- list = Symbol["FeynRules`FlavorExpansion"][list]
- ];
- WO`VertexRules = (#[[1]] -> #[[2]])& /@ FeynRules`FR$AbbIndexSumExpanded;
- Print["---"];
- list /. FeynRules`ParamRules
- ]]);
- ,
- If[Head[FR$AbbIndexSumExpanded] === List,
- WO`VertexRules = (#[[1]] -> #[[2]])& /@ FeynRules`FR$AbbIndexSumExpanded];
- ];
-
- (* Call backend. *)
- backendopts = Join[
- Select[opts /. symrules, !FreeQ[#[[1]]& /@ Options[WO`WriteOutput], #[[1]]]&]
- ,
- {WO`WOModelName -> modelname, WO`WOVertexList -> vlist,
- WO`WOMassList -> MassList[[2]] /. {NoValue[x_] :> x, NoPDG[x_] :> x} /. ParamRules,
- WO`WOWidthList -> WidthList[[2]] /. {NoValue[x_] :> x, NoPDG[x_] :> x} /. ParamRules,
- WO`WOPartList -> PartList /. {NoValue[x_] :> x, NoPDG[x_] :> x} /. ParamRules,
- WO`WOEParamList -> EParamList /. NoValue[x_] :> x /. ParamRules,
- WO`WOIParamList -> IParamList /. NoValue[x_] :> x /. ParamRules,
- WO`WOExtraComment -> ("FeynRules model: " <> ToString[M$ModelName] <> "\n"
- <> "FeynRules version: " <> ToString[FR$VersionNumber])}
- , output];
-
- backendopts /. {o___} :> WO`WriteOutput[o];
- ];
- FeynRules`WriteWOOutput::usage = "Write WHIZARD / O'Mega model files.";
- Protect[FeynRules`WriteWOOutput];
-
- (* The frontend to WO`WriteExtParams. *)
- FeynRules`WriteWOExtParams[file_String, opts___] := Module[{unknownopts},
- (* Check options. *)
- If[Length[unknownopts =
- Select[#[[1]]& /@ {opts}, FreeQ[#[[1]]& /@ Options[FeynRules`WriteWOExtParams], #]&]],
- Print["ERROR: unknown option(s): " <> WO`Concat[ToString /@ unknownopts, " , "]];
- Return[Null];
- ];
-
- (* Call WO`WriteExtParams *)
- Join[{opts} /. symrules, {
- WO`WOModelName -> ToString[M$ModelName],
- WO`WOEParamList -> EParamList /. NoValue[x_] :> x /. ParamRules,
- WO`WOMassList -> MassList[[2]] /. NoValue[x_] :> x /. ParamRules,
- WO`WOWidthList -> WidthList[[2]] /. NoValue[x_] :> x /. ParamRules
- }] /. {x___} :> WO`WriteExtParams[file, x];
- ];
- FeynRules`WriteWOExtParams[opts___] := FeynRules`WriteWOExtParams["", opts];
- FeynRules`WriteWOExtParams::usage = "Write parameter file for WHIZARD.";
- Protect[FeynRules`WriteWOExtParams];
-
-], _?StringQ, Print[#2 <> "\nERROR initializing Whizard / O'Mega interface."]&];
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.92/omega.feynrules.patch
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.92/omega.feynrules.patch (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.92/omega.feynrules.patch (revision 3973)
@@ -1,129 +0,0 @@
-diff --recursive -u a/src/.depend b/src/.depend
---- a/src/.depend 2009-06-14 21:58:40.000000000 +0200
-+++ b/src/.depend 2009-06-14 23:19:14.000000000 +0200
-@@ -333,3 +333,16 @@
- ogiga.cmx: thoList.cmx thoGWindow.cmx thoGMenu.cmx thoGDraw.cmx \
- thoGButton.cmx targets.cmx rCS.cmx omega.cmx momentum.cmx models.cmx \
- model.cmi fusion.cmx coupling.cmi color.cmx
-+
-+# FeynRules preliminary
-+$(FR_MODULES:.ml=.cmi) : model.cmi coupling.cmi
-+
-+$(FR_MODULES:.ml=.cmo) : thoList.cmi rCS.cmi product.cmi options.cmi model.cmi \
-+ coupling.cmi combinatorics.cmi color.cmi $(FR_MODULES:.ml=.cmi)
-+
-+$(FR_MODULES:.ml=.cmx) : thoList.cmx rCS.cmx product.cmx options.cmx model.cmi \
-+ coupling.cmi combinatorics.cmx color.cmx $(FR_MODULES:.ml=.cmi)
-+
-+$(FR_BINARIES:.ml=.cmo) : targets.cmo omega.cmo $(FR_MODULES:.ml=.cmo) fusion.cmo colorize.cmo
-+
-+$(FR_BINARIES:.ml=.cmx) : targets.cmx omega.cmx $(FR_MODULES:.ml=.cmx) fusion.cmx colorize.cmx
-diff --recursive -u a/src/Makefile.src b/src/Makefile.src
---- a/src/Makefile.src 2009-06-14 22:00:50.000000000 +0200
-+++ b/src/Makefile.src 2009-06-14 23:16:58.000000000 +0200
-@@ -38,6 +38,11 @@
- MODEL_MODULES =
- endif
-
-+# Feynrules preliminary
-+FR_MODULES = $(shell find . -name 'fr*.ml')
-+FR_BINARIES = $(shell find . -name 'f90_fr*.ml')
-+
-+
- MODULES = \
- pmap.ml thoList.ml thoArray.ml thoString.ml rCS.ml \
- cache.ml trie.ml lapack.ml linalg.ml \
-@@ -51,7 +56,8 @@
- oVM.ml whizard.ml \
- comphep_syntax.ml comphep_lexer.mll comphep_parser.mly comphep.ml \
- $(MODEL_MODULES) colorize.ml \
-- omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml
-+ omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml \
-+ $(FR_MODULES)
-
- GUI_MODULES = \
- thoGButton.ml thoGWindow.ml thoGMenu.ml thoGDraw.ml
-@@ -79,7 +85,8 @@
- f90_Simplest f90_Simplest_univ \
- f90_Xdim f90_GravTest \
- f90_SM_km f90_UED f90_Zprime \
-- f90_Template
-+ f90_Template \
-+ $(FR_BINARIES:.ml=)
-
- # Colorized for WHiZard
- PROGRAMS_released += \
-diff --recursive -u a/src/colorize.ml b/src/colorize.ml
---- a/src/colorize.ml 2009-08-04 17:25:28.000000000 +0200
-+++ b/src/colorize.ml 2009-08-04 17:26:34.000000000 +0200
-@@ -102,6 +102,8 @@
- | Prop_Majorana -> Prop_Col_Majorana (* Spin 1/2 octets. *)
- | Prop_Feynman -> Prop_Col_Feynman (* Spin 1 states, massless. *)
- | Prop_Unitarity -> Prop_Col_Unitarity (* Spin 1 states, massive. *)
-+ | Prop_Gauge x -> Prop_Col_Gauge x
-+ | Prop_Rxi x -> Prop_Col_Rxi x
- | _ -> failwith ("Colorize.It().colorize_propagator: not possible!")
-
- let propagator = function
-diff --recursive -u a/src/coupling.mli b/src/coupling.mli
---- a/src/coupling.mli 2009-08-04 17:25:28.000000000 +0200
-+++ b/src/coupling.mli 2009-08-04 17:26:34.000000000 +0200
-@@ -130,7 +130,7 @@
- | Prop_Unitarity | Prop_Feynman | Prop_Gauge of 'a | Prop_Rxi of 'a
- | Prop_Tensor_2 | Prop_Vectorspinor
- | Prop_Col_Scalar | Prop_Col_Feynman | Prop_Col_Majorana
-- | Prop_Col_Unitarity
-+ | Prop_Col_Unitarity | Prop_Col_Gauge of 'a | Prop_Col_Rxi of 'a
- | Aux_Scalar | Aux_Vector | Aux_Tensor_1
- | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
- | Only_Insertion
-diff --recursive -u a/src/targets.ml b/src/targets.ml
---- a/src/targets.ml 2009-08-04 17:25:28.000000000 +0200
-+++ b/src/targets.ml 2009-08-04 17:26:34.000000000 +0200
-@@ -1430,8 +1430,12 @@
- | Prop_Col_Feynman ->
- printf "(-1.0_omega_prec/3.0_omega_prec) * pr_feynman(%s," p
- | Prop_Gauge xi -> printf "pr_gauge(%s,%s," p (M.gauge_symbol xi)
-+ | Prop_Col_Gauge xi ->
-+ printf "(-1.0_omega_prec/3.0_omega_prec) * pr_gauge(%s,%s," p (M.gauge_symbol xi)
- | Prop_Rxi xi ->
- printf "pr_rxi(%s,%s,%s,%s," p m w (M.gauge_symbol xi)
-+ | Prop_Col_Rxi xi ->
-+ printf "(-1.0_omega_prec/3.0_omega_prex) * pr_rxi(%s,%s,%s,%s," p m w (M.gauge_symbol xi)
- | Prop_Tensor_2 -> printf "pr_tensor(%s,%s,%s," p m w
- | Prop_Vectorspinor -> printf "pr_grav(%s,%s,%s,"
- p m w
-@@ -1459,8 +1463,8 @@
- printf "(-1.0_omega_prec/3.0_omega_prec) * pj_unitarity(%s,%s,%s," p m gamma
- | Prop_Feynman | Prop_Col_Feynman ->
- invalid_arg "no on-shell Feynman propagator!"
-- | Prop_Gauge xi -> invalid_arg "no on-shell massless gauge propagator!"
-- | Prop_Rxi xi -> invalid_arg "no on-shell Rxi propagator!"
-+ | Prop_Gauge _ | Prop_Col_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!"
-+ | Prop_Rxi _ | Prop_Col_Rxi _ -> invalid_arg "no on-shell Rxi propagator!"
- | Prop_Vectorspinor -> printf "pj_grav(%s,%s,%s," p m gamma
- | Prop_Tensor_2 -> printf "pj_tensor(%s,%s,%s," p m gamma
- | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
-@@ -1483,8 +1487,8 @@
- | Prop_Unitarity -> printf "pg_unitarity(%s,%s,%s," p m gamma
- | Prop_Feynman | Prop_Col_Feynman ->
- invalid_arg "no on-shell Feynman propagator!"
-- | Prop_Gauge xi -> invalid_arg "no on-shell massless gauge propagator!"
-- | Prop_Rxi xi -> invalid_arg "no on-shell Rxi propagator!"
-+ | Prop_Gauge _ | Prop_Col_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!"
-+ | Prop_Rxi _ | Prop_Col_Rxi _ -> invalid_arg "no on-shell Rxi propagator!"
- | Prop_Tensor_2 -> printf "pg_tensor(%s,%s,%s," p m gamma
- | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
- | Aux_Vector | Aux_Tensor_1 -> printf "("
-@@ -4557,8 +4561,11 @@
- failwith "print_fusion: Prop_Col_Feynman not implemented yet!"
- | Prop_Gauge xi ->
- failwith "print_fusion: Prop_Gauge not implemented yet!"
-+ | Prop_Col_Gauge _ -> failwith "print_fusion: Prop_Col_Gauge not implemented yet!"
- | Prop_Rxi xi ->
- failwith "print_fusion: Prop_Rxi not implemented yet!"
-+ | Prop_Col_Rxi _ ->
-+ failwith "print_fusion: Prop_Col_Rxi not implemented yet!"
- | Prop_Vectorspinor ->
- failwith "print_fusion: Prop_Vectorspinor not implemented yet!"
- | Prop_Tensor_2 -> propagate ovm_PROPAGATE_TENSOR2
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.92/whizard.feynrules.patch
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.92/whizard.feynrules.patch (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.92/whizard.feynrules.patch (revision 3973)
@@ -1,123 +0,0 @@
-diff -u --recursive a/bin/make-include.pl.in b/bin/make-include.pl.in
---- a/bin/make-include.pl.in 2009-06-11 03:32:45.000000000 +0200
-+++ b/bin/make-include.pl.in 2009-06-11 03:32:27.000000000 +0200
-@@ -830,7 +830,8 @@
- $inc_slha_prt .=
- " call handle ($particle)\n";
- $inc_slha_def_mass .=
-- " real(kind=default) :: $mass{$particle}\n";
-+ " real(kind=default) :: $mass{$particle}\n"
-+ unless ($inc_slha_def_mass =~ m/:: $mass{$particle}\n/);
- $inc_slha_set_mass .=
- " case ($particle); mass%$mass{$particle} = value\n";
- $inc_slha_get_mass .=
-@@ -844,7 +845,8 @@
- $inc_prt_widths .=
- " case ($particle); width = par%$width{$particle}\n";
- $inc_slha_def_decay .=
-- " real(kind=default) :: $width{$particle}\n";
-+ " real(kind=default) :: $width{$particle}\n"
-+ unless ($inc_slha_def_decay =~ m/:: $width{$particle}\n/);
- $inc_slha_set_decay .=
- " case ($particle); decay%$width{$particle} = value\n";
- $inc_slha_get_decay .=
-diff -u --recursive a/omega-src/insert-color.pl.in b/omega-src/insert-color.pl.in
---- a/omega-src/insert-color.pl.in 2009-06-11 03:33:51.000000000 +0200
-+++ b/omega-src/insert-color.pl.in 2009-06-11 03:36:35.000000000 +0200
-@@ -1089,7 +1089,7 @@
-
- foreach $prt (@prt) {
- if ($prt =~ /^($col_pattern)$/) {
-- $prt =~ m/^\w+\/(\d)\/(\d)?$/;
-+ $prt =~ m/^[\w\+\-~]+\/(\d)\/(\d)?$/;
- # $prt =~ m/^\w+\/(\d)(\d)?$/;
- $col = $1;
- if ($col_index{$col}) {
-@@ -1101,9 +1101,9 @@
- }
- foreach $prt (@prt) {
- if ($prt =~ /^($col_pattern|$acl_pattern)$/) {
-- $prt =~ s/^(\w+\/)(\d)(\/)$/$1$col_index{$2}\//;
-- $prt =~ s/^(\w+\/\/)(\d)$/$1$col_index{$2}/;
-- $prt =~ s/^(\w+\/)(\d)(\/)(\d)$/$1$col_index{$2}\/$col_index{$4}/;
-+ $prt =~ s/^([\w\+\-~]+\/)(\d)(\/)$/$1$col_index{$2}\//;
-+ $prt =~ s/^([\w\+\-~]+\/\/)(\d)$/$1$col_index{$2}/;
-+ $prt =~ s/^([\w\+\-~]+\/)(\d)(\/)(\d)$/$1$col_index{$2}\/$col_index{$4}/;
- ### OLD VERSION FOR EXPLICIT SCRIPTING
- ### if ($prt =~ /^($col_pattern|$acl_pattern)$/) {
- ### $prt =~ s/^(\w+\/)(\d)$/$1$col_index{$2}/;
-@@ -1127,13 +1127,13 @@
-
- foreach $prt (@prt) {
- if ($prt =~ /^($col_pattern)$/ and $prt =~ /^($acl_pattern)$/) {
-- $prt =~ /^\w+\/(\d)\/(\d)$/;
-+ $prt =~ /^[\w\+\-~]+\/(\d)\/(\d)$/;
- push @col, $1; push @acl, $2;
- } elsif ($prt =~ /^($col_pattern)$/) {
-- $prt =~ /^\w+\/(\d)\/$/;
-+ $prt =~ /^[\w\+\-~]+\/(\d)\/$/;
- push @col, $1; push @acl, 0;
- } elsif ($prt =~ /^($acl_pattern)$/) {
-- $prt =~ /^\w+\/\/(\d)$/;
-+ $prt =~ /^[\w\+\-~]+\/\/(\d)$/;
- push @acl, $1; push @col, 0;
- } else {
- push @col, 0; push @acl, 0;
-diff -ur a/bin/make-proc.pl.in b/bin/make-proc.pl.in
---- a/bin/make-proc.pl.in 2009-09-05 23:41:02.000000000 +0200
-+++ b/bin/make-proc.pl.in 2009-09-05 23:41:12.000000000 +0200
-@@ -117,6 +117,7 @@
- ($omegabin_col = $omegabin) =~ s/\.opt/_Col.opt/;
- if (-x "$omegabin" or -x "$omegabin_col") {
- $omega_parameters = "$mdldir/parameters.$model.omega.f90";
-+ $omega_parameters_stem = "$mdldir/parameters.$model.omega";
- unless (-f $omega_parameters) {
- print "$0: Can\'t find $omega_parameters -- disabling omega.\n";
- $omega = "no";
-@@ -170,9 +171,22 @@
- # Copy the model- and method-dependent files
- unless ($keep_model) {
- if ($omega ne "no") {
-- $stat = system ("cp", $omega_parameters,
-- "results/omega_parameters_whizard.f90");
-- $stat==0 or die "Can\'t copy $omega_parameters into results directory";
-+ $omega_parameters_files = `ls $omega_parameters_stem*`;
-+ @omega_parameters_files = split /\n/, $omega_parameters_files;
-+ $omega_parameters_files = "";
-+ foreach (@omega_parameters_files) {
-+ my $target;
-+ if (m/.*global.f90/)
-+ {$target = "omega_parameters_whizard_global.f90"}
-+ elsif (m/.*cpl(\d+).f90/)
-+ {$target = "omega_parameters_whizard_cpl$1.f90"}
-+ elsif (m/.*local.f90/)
-+ {$target = "omega_parameters_whizard_local.f90"}
-+ else {$target = "omega_parameters_whizard.f90"};
-+ $omega_parameters_files .= "$target ";
-+ system ("cp", $_, "results/$target") == 0 or die
-+ "Can\'t copy $_ into the results directory";
-+ }
- }
- }
-
-@@ -1506,7 +1520,7 @@
-
- # List files
- $src = "parameters.f90 file_utils.f90 process_interface.f90 ";
-- if ($omega ne "no") { $src .= "omega_parameters_whizard.f90 "; }
-+ if ($omega ne "no") { $src .= "$omega_parameters_files"; }
- foreach $ext(sort keys %ext) {
- $src .= "$ext*.f90 ";
- }
-diff -ur a/bin/make-include.pl.in b/bin/make-include.pl.in
---- a/bin/make-include.pl.in 2010-01-12 12:30:34.000000000 +0100
-+++ b/bin/make-include.pl.in 2010-01-12 12:30:42.000000000 +0100
-@@ -50,7 +50,7 @@
- }
-
- # The allowed lengths for parameter/particle strings
--$len_parameter = 8;
-+$len_parameter = 20;
- $len_value = 20;
- $len_particle = 20;
- $len_chep_name = 6;
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/all_19x/inject
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/all_19x/inject (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/all_19x/inject (revision 3973)
@@ -1,248 +0,0 @@
-#!/bin/sh
-
-# $Id$
-
-# TODO
-# - Make sure this is free of bashisms and runs on other implemetations of sh
-# without problems.
-
-# Print usage information
-usage() {
- [ -n "$1" ] && echo $@
- cat <<EOI
-Usage: inject [options] path
-
-Injects the WHIZARD/O'Mega model files generated by FeynRules into the
-respective program trees and applies the necessary patches if necessary. After
-this step, these models will work like the built-in ones. By default, "path"
-points to a WHIZARD installation, and both the WHIZARD and the integrated O'Mega
-tree will be patched.
-
-Options:
-
---whizard-only WHIZARD only
---omega-only O'Mega only, assume that "path" points to a O'Mega tree
---no-patch just copy the model files, don't apply patches
---patch-only just apply the patches, don't copy model files
---force-patch try to apply patches even when the stamps suggest that this
- already been done
--f, --force force overwriting of existing model files (these get skipped
- by default)
---skip-check don't check whether "path" indeed points to a valid
- installation
---basedir dir look for the FeynRules output in "dir" (default: ".")
---cleanup remove conflicting potentially files from the WHIZARD
- directory
--h, --help this help text
-EOI
- [ -n "$1" ] && exit 1
- exit
-}
-
-die() {
- [ -n "$1" ] && echo $@
- exit 1
-}
-
-# global variables
-cwd=`pwd`
-
-# Print usage if no parameters are given
-[ -z "$1" ] && usage
-
-# Setup variables
-basedir="."
-
-# Parse the command line
-while [ -n "$1" ]; do
- case "$1" in
- '-h'|'--help') usage;;
- '--whizard-only') whizard_only=1;;
- '--omega-only') omega_only=1;;
- '--no-patch') no_patch=1;;
- '--patch-only') patch_only=1;;
- '-f'|'--force') force=1;;
- '--skip_check') nocheck=1;;
- '--force-patch') patch_force=1;;
- '--cleanup') cleanup=1;;
- '--basedir')
- [ -z "$2" ] && usage "ERROR: \"--base-dir\" expects a path"
- basedir="$2"
- shift
- ;;
- *)
- [ -z "$2" ] && destdir="$1" || die "ERROR: unknown option \"$1\""
- ;;
- esac
- shift
-done
-
-delimiter="################################################################################"
-
-# Absolutify basedir
-cd $basedir
-basedir=`pwd`
-cd $cwd
-
-# Dito, but destdir
-[ -d "$destdir" ] || die "ERROR: \"$destdir\" is no directory!"
-cd $destdir || die "ERROR: can't change to \"$destdir\"!"
-destdir=`pwd`
-cd $cwd
-
-# Sanity checks
-[ -n "$omega_only" ] && [ -n "$whizard_only" ] && \
- die "ERROR: --whizard-only and --omega-only don't go together..."
-
-# See what has do be done
-copy_whizard=""
-[ -z "$omega_only" ] && [ -z "$patch_only" ] && copy_whizard=1
-patch_whizard=""
-[ -z "$omega_only" ] && [ -z "$no_patch" ] && patch_whizard=1
-copy_omega=""
-[ -z "$whizard_only" ] && [ -z "$patch_only" ] && copy_omega=1
-patch_omega=""
-[ -z "$whizard_only" ] && [ -z "$no_patch" ] && patch_omega=1
-
-# Set paths
-if [ -n "$omega_only" ]; then
- omegapath="$destdir"
- whizpath=""
-elif [ -n "$whizard_only" ]; then
- whizpath="$destdir"
- omegapath=""
-else
- whizpath="$destdir"
- omegapath="$whizpath/omega-src/bundle"
-fi
-fr_whizdir="$basedir/whizard"
-fr_omegadir="$basedir/omega"
-fr_whizpatch="$basedir/whizard.feynrules.patch"
-fr_omegapatch="$basedir/omega.feynrules.patch"
-
-# Sanity check directories and files
-[ -n "$whizpath" ] && { [ -f "$whizpath/whizard.nw" ] \
- || die "ERROR: \"$whizpath\" doesn' seem to contain a valid WHIZARD installation..."; }
-[ -n "$omegapath" ] && { [ -f "$omegapath/src/omega.ml" ] \
- || die "ERROR: \"$omegapath\" doesn' seem to contain a valid O'Mega installation..."; }
-[ -n "$copy_whizard" ] && { [ -d "$fr_whizdir" ] \
- || die "ERROR \"$fr_whizdir\" not found!"; }
-[ -n "$patch_whizard" ] && { [ -f "$fr_whizpatch" ] \
- || die "ERROR \"$fr_whizpatch\" not found!"; }
-[ -n "$copy_omega" ] && { [ -d "$fr_omegadir" ] \
- || die "ERROR \"$fr_omegadir\" not found!"; }
-[ -n "$patch_omega" ] && { [ -f "$fr_omegapatch" ] \
- || die "ERROR \"$fr_omegapatch\" not found!"; }
-
-# Patch WHIZARD if desired
-if [ -n "$patch_whizard" ]; then
- echo $delimiter
- echo
- echo "Patching WHIZARD..."
- if [ -f "$whizpath/patched.feynrules.stamp" ] && [ -z "$patch_force" ]; then
- echo "...seems like WHIZARD is already patched."
- else
- cd $whizpath
- patch -p1 < $fr_whizpatch || { cd $cwd; die "ERROR applying the WHIZARD patch!"; }
- touch patched.feynrules.stamp
- echo "...done. Remember to (re)run configure for the changes to take effect."
- fi
- echo
-
-fi
-
-# Copy the WHIZARD model files if desired
-if [ -n "$copy_whizard" ]; then
- echo $delimiter
- echo
- echo "Copying WHIZARD files to \"$whizpath/conf/models\":"
- for file in `ls $fr_whizdir`; do
- if [ -f "$whizpath/conf/models/$file" ] && [ -z "$force" ]; then
- echo " \"$file\" already exists in destination directory, skipping..."
- skipped=1
- else
- echo " copying \"$file\"..."
- cp "$fr_whizdir/$file" "$whizpath/conf/models" || die "ERROR copying file!"
- fi
- done
- # Check for potential conflicts with existing files
- for file in `ls $fr_whizdir/*cpl1.f90`; do
- file="${file##*/}"
- filepat="-name ${file%cpl1.f90}cpl[0-9].f90"
- filepat="$filepat -or -name ${file%cpl1.f90}cpl[0-9][0-9].f90"
- filepat="$filepat -or -name ${file%cpl1.f90}cpl[0-9][0-9][0-9].f90"
- for file2 in `find $whizpath/conf/models $filepat`; do
- if [ ! -f "$fr_whizdir/${file2##*/}" ]; then
- if [ -z "$cleanup" ]; then
- conflicts="$conflicts $file2"
- else
- echo " deleting \"$file2\"..."
- rm -f $file2 || die "ERROR deleting file!"
- fi
- fi
- done
- done
- echo "Done. Please recompile WHIZARD for any changes to the model files to take effect."
- echo
- if [ -n "$conflicts" ]; then
- cat <<EOI
-WARNING: conflicting files have been found in the target directory which might
- screw up the WHIZARD compile. The conflicting files are:
-
-EOI
- for file in $conflicts; do
- echo $file
- done
- echo
- fi
-fi
-
-# Patch O'Mega if desired
-if [ -n "$patch_omega" ]; then
- echo $delimiter
- echo
- echo "Patching O'Mega..."
- if [ -f "$omegapath/patched.omega.stamp" ] && [ -z "$patch_force" ]; then
- echo "...seems like O'Mega is already patched."
- else
- cd $omegapath
- patch -p1 < $fr_omegapatch || { cd $cwd; die "ERROR applying the WHIZARD patch!"; }
- touch patched.omega.stamp
- fi
- echo
-fi
-
-# Copy the O'Mega model files if desired
-if [ -n "$copy_omega" ]; then
- echo $delimiter
- echo
- echo "Copying O'Mega files to \"$omegapath/src\":"
- for file in `ls $fr_omegadir`; do
- if [ -f "$omegapath/src/$file" ] && [ -z "$force" ]; then
- echo " \"$file\" already exists in destination directory, skipping..."
- skipped=1
- else
- echo " copying \"$file\"..."
- cp "$fr_omegadir/$file" "$omegapath/src" || die "ERROR copying file!"
- fi
- done
- echo "Done. Remember you have to recompile O'Mega for any changes to the model files to"
- echo "take effect (recompiling WHIZARD automatically recompiles the internal O'Mega tree)."
- echo
-fi
-
-# Say goodby
-echo "All Done!"
-if [ -n "$conflicts" ]; then
-cat <<EOI
-
-WARNING: conflicting files found (see above). Please remove these files either
-manually or by running this script with the "--cleanup" option in order to
-make sure that the model works as expected.
-EOI
-fi
-if [ -n "$skipped" ]; then
- echo
- echo "WARNING: some files were skipped (see above); consider using \"--force\""
- echo "to force overwriting."
-fi
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/all_19x/INSTALL
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/all_19x/INSTALL (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/all_19x/INSTALL (revision 3973)
@@ -1,16 +0,0 @@
-This directory contains model definitions for WHIZARD / O'Mega generated by the
-WHIZARD - FeynRules interface. In order to use them, please copy the necessary
-files to a WHIZARD 1.9x tree using the included "inject" script like
-
- ./inject path/to/whizard
-
-Remember to reconfigure and recompile WHIZARD after this step.
-
-The script provides several command line options to accommodate special cases
-where the above procedure may not be enough. Please do
-
- ./inject -h
-
-to see a list of all command line options. In particular, inject will not
-overwrite already existing files by default. This behavior can be overridden by
-using the "-f" option.
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.93/omega.feynrules.patch
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.93/omega.feynrules.patch (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.93/omega.feynrules.patch (revision 3973)
@@ -1,144 +0,0 @@
-diff -ur a/src/.depend b/src/.depend
---- a/src/.depend 2009-07-03 17:14:48.000000000 +0200
-+++ b/src/.depend 2009-07-03 17:15:32.000000000 +0200
-@@ -318,4 +318,17 @@
- f90_SM_clones.cmo: targets.cmi omega.cmi models.cmi fusion.cmi
- f90_SM_clones.cmx: targets.cmx omega.cmx models.cmx fusion.cmx
- count.cmo: topology.cmi thoList.cmi combinatorics.cmi
--count.cmx: topology.cmx thoList.cmx combinatorics.cmx
-+count.cmx: topology.cmx thoList.cmx combinatorics.cmx
-+
-+# FeynRules preliminary
-+$(FR_MODULES:.ml=.cmi) : model.cmi coupling.cmi
-+
-+$(FR_MODULES:.ml=.cmo) : thoList.cmi rCS.cmi product.cmi options.cmi model.cmi \
-+ coupling.cmi combinatorics.cmi color.cmi $(FR_MODULES:.ml=.cmi)
-+
-+$(FR_MODULES:.ml=.cmx) : thoList.cmx rCS.cmx product.cmx options.cmx model.cmi \
-+ coupling.cmi combinatorics.cmx color.cmx $(FR_MODULES:.ml=.cmi)
-+
-+$(FR_BINARIES:.ml=.cmo) : targets.cmo omega.cmo $(FR_MODULES:.ml=.cmo) fusion.cmo colorize.cmo
-+
-+$(FR_BINARIES:.ml=.cmx) : targets.cmx omega.cmx $(FR_MODULES:.ml=.cmx) fusion.cmx colorize.cmx
-diff -ur a/src/Makefile.src b/src/Makefile.src
---- a/src/Makefile.src 2009-07-03 17:14:48.000000000 +0200
-+++ b/src/Makefile.src 2009-07-03 17:17:28.000000000 +0200
-@@ -38,6 +38,10 @@
- MODEL_MODULES =
- endif
-
-+# Feynrules preliminary
-+FR_MODULES = $(shell find . -name 'fr*.ml')
-+FR_BINARIES = $(shell find . -name 'f90_fr*.ml')
-+
- MODULES = \
- pmap.ml thoList.ml thoArray.ml thoString.ml rCS.ml \
- cache.ml trie.ml lapack.ml linalg.ml \
-@@ -51,7 +55,8 @@
- oVM.ml whizard.ml \
- comphep_syntax.ml comphep_lexer.mll comphep_parser.mly comphep.ml \
- $(MODEL_MODULES) colorize.ml \
-- omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml
-+ omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml \
-+ $(FR_MODULES)
-
- GUI_MODULES = \
- thoGButton.ml thoGWindow.ml thoGMenu.ml thoGDraw.ml
-@@ -80,7 +85,8 @@
- f90_Simplest f90_Simplest_univ \
- f90_Xdim f90_GravTest \
- f90_SM_km f90_UED f90_Zprime \
-- f90_Template
-+ f90_Template \
-+ $(FR_BINARIES:.ml=)
-
- # Colorized for WHiZard
- PROGRAMS_released += \
-diff --recursive -u a/src/colorize.ml b/src/colorize.ml
---- a/src/colorize.ml 2009-08-04 17:28:10.000000000 +0200
-+++ b/src/colorize.ml 2009-08-04 17:28:22.000000000 +0200
-@@ -102,6 +102,8 @@
- | Prop_Majorana -> Prop_Col_Majorana (* Spin 1/2 octets. *)
- | Prop_Feynman -> Prop_Col_Feynman (* Spin 1 states, massless. *)
- | Prop_Unitarity -> Prop_Col_Unitarity (* Spin 1 states, massive. *)
-+ | Prop_Gauge x -> Prop_Col_Gauge x
-+ | Prop_Rxi x -> Prop_Col_Rxi x
- | _ -> failwith ("Colorize.It().colorize_propagator: not possible!")
-
- let propagator = function
-diff --recursive -u a/src/coupling.mli b/src/coupling.mli
---- a/src/coupling.mli 2009-08-04 17:28:10.000000000 +0200
-+++ b/src/coupling.mli 2009-08-04 17:28:22.000000000 +0200
-@@ -131,7 +131,7 @@
- | Prop_Unitarity | Prop_Feynman | Prop_Gauge of 'a | Prop_Rxi of 'a
- | Prop_Tensor_2 | Prop_Vectorspinor
- | Prop_Col_Scalar | Prop_Col_Feynman | Prop_Col_Majorana
-- | Prop_Col_Unitarity
-+ | Prop_Col_Unitarity | Prop_Col_Gauge of 'a | Prop_Col_Rxi of 'a
- | Aux_Scalar | Aux_Vector | Aux_Tensor_1
- | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
- | Only_Insertion
-diff --recursive -u a/src/omega.ml b/src/omega.ml
---- a/src/omega.ml 2009-08-04 17:28:10.000000000 +0200
-+++ b/src/omega.ml 2009-08-04 17:28:22.000000000 +0200
-@@ -511,8 +511,10 @@
- | Color.AdjSUN _ -> Some ("gluon", lbl)
- | _ -> Some ("photon", lbl)
- end;
-+ | Coupling.Prop_Col_Gauge _ -> Some ("dashes", lbl)
- | Coupling.Prop_Unitarity
- | Coupling.Prop_Rxi _ -> Some ("photon", lbl)
-+ | Coupling.Prop_Col_Rxi _ -> Some ("dashes", lbl)
- | Coupling.Prop_Majorana -> Some ("plain", lbl)
- | Coupling.Prop_Scalar
- | Coupling.Prop_Col_Scalar -> Some ("dashes", lbl)
-diff --recursive -u a/src/targets.ml b/src/targets.ml
---- a/src/targets.ml 2009-08-04 17:28:10.000000000 +0200
-+++ b/src/targets.ml 2009-08-04 17:28:22.000000000 +0200
-@@ -1435,8 +1435,12 @@
- | Prop_Col_Feynman ->
- printf "(-1.0_omega_prec/3.0_omega_prec) * pr_feynman(%s," p
- | Prop_Gauge xi -> printf "pr_gauge(%s,%s," p (M.gauge_symbol xi)
-+ | Prop_Col_Gauge xi ->
-+ printf "(-1.0_omega_prec/3.0_omega_prec) * pr_gauge(%s,%s," p (M.gauge_symbol xi)
- | Prop_Rxi xi ->
- printf "pr_rxi(%s,%s,%s,%s," p m w (M.gauge_symbol xi)
-+ | Prop_Col_Rxi xi ->
-+ printf "(-1.0_omega_prec/3.0_omega_prex) * pr_rxi(%s,%s,%s,%s," p m w (M.gauge_symbol xi)
- | Prop_Tensor_2 -> printf "pr_tensor(%s,%s,%s," p m w
- | Prop_Vectorspinor -> printf "pr_grav(%s,%s,%s,"
- p m w
-@@ -1464,8 +1468,8 @@
- printf "(-1.0_omega_prec/3.0_omega_prec) * pj_unitarity(%s,%s,%s," p m gamma
- | Prop_Feynman | Prop_Col_Feynman ->
- invalid_arg "no on-shell Feynman propagator!"
-- | Prop_Gauge xi -> invalid_arg "no on-shell massless gauge propagator!"
-- | Prop_Rxi xi -> invalid_arg "no on-shell Rxi propagator!"
-+ | Prop_Gauge _ | Prop_Col_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!"
-+ | Prop_Rxi _ | Prop_Col_Rxi _ -> invalid_arg "no on-shell Rxi propagator!"
- | Prop_Vectorspinor -> printf "pj_grav(%s,%s,%s," p m gamma
- | Prop_Tensor_2 -> printf "pj_tensor(%s,%s,%s," p m gamma
- | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
-@@ -1488,8 +1492,8 @@
- | Prop_Unitarity -> printf "pg_unitarity(%s,%s,%s," p m gamma
- | Prop_Feynman | Prop_Col_Feynman ->
- invalid_arg "no on-shell Feynman propagator!"
-- | Prop_Gauge xi -> invalid_arg "no on-shell massless gauge propagator!"
-- | Prop_Rxi xi -> invalid_arg "no on-shell Rxi propagator!"
-+ | Prop_Gauge _ | Prop_Col_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!"
-+ | Prop_Rxi _ | Prop_Col_Rxi _ -> invalid_arg "no on-shell Rxi propagator!"
- | Prop_Tensor_2 -> printf "pg_tensor(%s,%s,%s," p m gamma
- | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana
- | Aux_Vector | Aux_Tensor_1 -> printf "("
-@@ -4674,8 +4678,11 @@
- failwith "print_fusion: Prop_Col_Feynman not implemented yet!"
- | Prop_Gauge xi ->
- failwith "print_fusion: Prop_Gauge not implemented yet!"
-+ | Prop_Col_Gauge _ -> failwith "print_fusion: Prop_Col_Gauge not implemented yet!"
- | Prop_Rxi xi ->
- failwith "print_fusion: Prop_Rxi not implemented yet!"
-+ | Prop_Col_Rxi _ ->
-+ failwith "print_fusion: Prop_Col_Rxi not implemented yet!"
- | Prop_Vectorspinor ->
- failwith "print_fusion: Prop_Vectorspinor not implemented yet!"
- | Prop_Tensor_2 -> propagate ovm_PROPAGATE_TENSOR2
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.93/whizard.feynrules.patch
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.93/whizard.feynrules.patch (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.93/whizard.feynrules.patch (revision 3973)
@@ -1,123 +0,0 @@
-diff -u --recursive a/bin/make-include.pl.in b/bin/make-include.pl.in
---- a/bin/make-include.pl.in 2009-06-11 03:32:45.000000000 +0200
-+++ b/bin/make-include.pl.in 2009-06-11 03:32:27.000000000 +0200
-@@ -830,7 +830,8 @@
- $inc_slha_prt .=
- " call handle ($particle)\n";
- $inc_slha_def_mass .=
-- " real(kind=default) :: $mass{$particle}\n";
-+ " real(kind=default) :: $mass{$particle}\n"
-+ unless ($inc_slha_def_mass =~ m/:: $mass{$particle}\n/);
- $inc_slha_set_mass .=
- " case ($particle); mass%$mass{$particle} = value\n";
- $inc_slha_get_mass .=
-@@ -844,7 +845,8 @@
- $inc_prt_widths .=
- " case ($particle); width = par%$width{$particle}\n";
- $inc_slha_def_decay .=
-- " real(kind=default) :: $width{$particle}\n";
-+ " real(kind=default) :: $width{$particle}\n"
-+ unless ($inc_slha_def_decay =~ m/:: $width{$particle}\n/);
- $inc_slha_set_decay .=
- " case ($particle); decay%$width{$particle} = value\n";
- $inc_slha_get_decay .=
-diff -u --recursive a/omega-src/insert-color.pl.in b/omega-src/insert-color.pl.in
---- a/omega-src/insert-color.pl.in 2009-06-11 03:33:51.000000000 +0200
-+++ b/omega-src/insert-color.pl.in 2009-06-11 03:36:35.000000000 +0200
-@@ -1089,7 +1089,7 @@
-
- foreach $prt (@prt) {
- if ($prt =~ /^($col_pattern)$/) {
-- $prt =~ m/^\w+\/(\d)\/(\d)?$/;
-+ $prt =~ m/^[\w\+\-~]+\/(\d)\/(\d)?$/;
- # $prt =~ m/^\w+\/(\d)(\d)?$/;
- $col = $1;
- if ($col_index{$col}) {
-@@ -1101,9 +1101,9 @@
- }
- foreach $prt (@prt) {
- if ($prt =~ /^($col_pattern|$acl_pattern)$/) {
-- $prt =~ s/^(\w+\/)(\d)(\/)$/$1$col_index{$2}\//;
-- $prt =~ s/^(\w+\/\/)(\d)$/$1$col_index{$2}/;
-- $prt =~ s/^(\w+\/)(\d)(\/)(\d)$/$1$col_index{$2}\/$col_index{$4}/;
-+ $prt =~ s/^([\w\+\-~]+\/)(\d)(\/)$/$1$col_index{$2}\//;
-+ $prt =~ s/^([\w\+\-~]+\/\/)(\d)$/$1$col_index{$2}/;
-+ $prt =~ s/^([\w\+\-~]+\/)(\d)(\/)(\d)$/$1$col_index{$2}\/$col_index{$4}/;
- ### OLD VERSION FOR EXPLICIT SCRIPTING
- ### if ($prt =~ /^($col_pattern|$acl_pattern)$/) {
- ### $prt =~ s/^(\w+\/)(\d)$/$1$col_index{$2}/;
-@@ -1127,13 +1127,13 @@
-
- foreach $prt (@prt) {
- if ($prt =~ /^($col_pattern)$/ and $prt =~ /^($acl_pattern)$/) {
-- $prt =~ /^\w+\/(\d)\/(\d)$/;
-+ $prt =~ /^[\w\+\-~]+\/(\d)\/(\d)$/;
- push @col, $1; push @acl, $2;
- } elsif ($prt =~ /^($col_pattern)$/) {
-- $prt =~ /^\w+\/(\d)\/$/;
-+ $prt =~ /^[\w\+\-~]+\/(\d)\/$/;
- push @col, $1; push @acl, 0;
- } elsif ($prt =~ /^($acl_pattern)$/) {
-- $prt =~ /^\w+\/\/(\d)$/;
-+ $prt =~ /^[\w\+\-~]+\/\/(\d)$/;
- push @acl, $1; push @col, 0;
- } else {
- push @col, 0; push @acl, 0;
-diff -ur a/bin/make-proc.pl.in b/bin/make-proc.pl.in
---- a/bin/make-proc.pl.in 2009-09-05 23:41:02.000000000 +0200
-+++ b/bin/make-proc.pl.in 2009-09-05 23:41:12.000000000 +0200
-@@ -117,6 +117,7 @@
- ($omegabin_col = $omegabin) =~ s/\.opt/_Col.opt/;
- if (-x "$omegabin" or -x "$omegabin_col") {
- $omega_parameters = "$mdldir/parameters.$model.omega.f90";
-+ $omega_parameters_stem = "$mdldir/parameters.$model.omega";
- unless (-f $omega_parameters) {
- print "$0: Can\'t find $omega_parameters -- disabling omega.\n";
- $omega = "no";
-@@ -170,9 +171,22 @@
- # Copy the model- and method-dependent files
- unless ($keep_model) {
- if ($omega ne "no") {
-- $stat = system ("cp", $omega_parameters,
-- "results/omega_parameters_whizard.f90");
-- $stat==0 or die "Can\'t copy $omega_parameters into results directory";
-+ $omega_parameters_files = `ls $omega_parameters_stem*`;
-+ @omega_parameters_files = split /\n/, $omega_parameters_files;
-+ $omega_parameters_files = "";
-+ foreach (@omega_parameters_files) {
-+ my $target;
-+ if (m/.*global.f90/)
-+ {$target = "omega_parameters_whizard_global.f90"}
-+ elsif (m/.*cpl(\d+).f90/)
-+ {$target = "omega_parameters_whizard_cpl$1.f90"}
-+ elsif (m/.*local.f90/)
-+ {$target = "omega_parameters_whizard_local.f90"}
-+ else {$target = "omega_parameters_whizard.f90"};
-+ $omega_parameters_files .= "$target ";
-+ system ("cp", $_, "results/$target") == 0 or die
-+ "Can\'t copy $_ into the results directory";
-+ }
- }
- }
-
-@@ -1506,7 +1520,7 @@
-
- # List files
- $src = "parameters.f90 file_utils.f90 process_interface.f90 ";
-- if ($omega ne "no") { $src .= "omega_parameters_whizard.f90 "; }
-+ if ($omega ne "no") { $src .= "$omega_parameters_files"; }
- foreach $ext(sort keys %ext) {
- $src .= "$ext*.f90 ";
- }
-diff -ur a/bin/make-include.pl.in b/bin/make-include.pl.in
---- a/bin/make-include.pl.in 2010-01-12 12:30:34.000000000 +0100
-+++ b/bin/make-include.pl.in 2010-01-12 12:30:42.000000000 +0100
-@@ -50,7 +50,7 @@
- }
-
- # The allowed lengths for parameter/particle strings
--$len_parameter = 8;
-+$len_parameter = 20;
- $len_value = 20;
- $len_particle = 20;
- $len_chep_name = 6;
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.96/omega.feynrules.patch
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.96/omega.feynrules.patch (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.96/omega.feynrules.patch (revision 3973)
@@ -1,56 +0,0 @@
-diff -ur a/src/.depend b/src/.depend
---- a/src/.depend 2009-07-03 17:14:48.000000000 +0200
-+++ b/src/.depend 2009-07-03 17:15:32.000000000 +0200
-@@ -318,4 +318,17 @@
- f90_SM_clones.cmo: targets.cmi omega.cmi models.cmi fusion.cmi
- f90_SM_clones.cmx: targets.cmx omega.cmx models.cmx fusion.cmx
- count.cmo: topology.cmi thoList.cmi combinatorics.cmi
--count.cmx: topology.cmx thoList.cmx combinatorics.cmx
-+count.cmx: topology.cmx thoList.cmx combinatorics.cmx
-+
-+# FeynRules preliminary
-+$(FR_MODULES:.ml=.cmi) : model.cmi coupling.cmi
-+
-+$(FR_MODULES:.ml=.cmo) : thoList.cmi rCS.cmi product.cmi options.cmi model.cmi \
-+ coupling.cmi combinatorics.cmi color.cmi $(FR_MODULES:.ml=.cmi)
-+
-+$(FR_MODULES:.ml=.cmx) : thoList.cmx rCS.cmx product.cmx options.cmx model.cmi \
-+ coupling.cmi combinatorics.cmx color.cmx $(FR_MODULES:.ml=.cmi)
-+
-+$(FR_BINARIES:.ml=.cmo) : targets.cmo omega.cmo $(FR_MODULES:.ml=.cmo) fusion.cmo colorize.cmo
-+
-+$(FR_BINARIES:.ml=.cmx) : targets.cmx omega.cmx $(FR_MODULES:.ml=.cmx) fusion.cmx colorize.cmx
-diff -ur a/src/Makefile.src b/src/Makefile.src
---- a/src/Makefile.src 2009-07-03 17:14:48.000000000 +0200
-+++ b/src/Makefile.src 2009-07-03 17:17:28.000000000 +0200
-@@ -38,6 +38,10 @@
- MODEL_MODULES =
- endif
-
-+# Feynrules preliminary
-+FR_MODULES = $(shell find . -name 'fr*.ml')
-+FR_BINARIES = $(shell find . -name 'f90_fr*.ml')
-+
- MODULES = \
- pmap.ml thoList.ml thoArray.ml thoString.ml rCS.ml \
- cache.ml trie.ml lapack.ml linalg.ml \
-@@ -51,7 +55,8 @@
- oVM.ml whizard.ml \
- comphep_syntax.ml comphep_lexer.mll comphep_parser.mly comphep.ml \
- $(MODEL_MODULES) colorize.ml \
-- omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml
-+ omega_syntax.ml omega_lexer.mll omega_parser.mly omega.ml \
-+ $(FR_MODULES)
-
- GUI_MODULES = \
- thoGButton.ml thoGWindow.ml thoGMenu.ml thoGDraw.ml
-@@ -80,7 +85,8 @@
- f90_Simplest f90_Simplest_univ \
- f90_Xdim f90_GravTest \
- f90_SM_km f90_UED f90_Zprime \
-- f90_Template
-+ f90_Template \
-+ $(FR_BINARIES:.ml=)
-
- # Colorized for WHiZard
- PROGRAMS_released += \
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.96/whizard.feynrules.patch
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.96/whizard.feynrules.patch (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/1.96/whizard.feynrules.patch (revision 3973)
@@ -1,46 +0,0 @@
-diff -ur a/bin/make-proc.pl.in b/bin/make-proc.pl.in
---- a/bin/make-proc.pl.in 2009-09-05 23:41:02.000000000 +0200
-+++ b/bin/make-proc.pl.in 2009-09-05 23:41:12.000000000 +0200
-@@ -117,6 +117,7 @@
- ($omegabin_col = $omegabin) =~ s/\.opt/_Col.opt/;
- if (-x "$omegabin" or -x "$omegabin_col") {
- $omega_parameters = "$mdldir/parameters.$model.omega.f90";
-+ $omega_parameters_stem = "$mdldir/parameters.$model.omega";
- unless (-f $omega_parameters) {
- print "$0: Can\'t find $omega_parameters -- disabling omega.\n";
- $omega = "no";
-@@ -170,9 +171,22 @@
- # Copy the model- and method-dependent files
- unless ($keep_model) {
- if ($omega ne "no") {
-- $stat = system ("cp", $omega_parameters,
-- "results/omega_parameters_whizard.f90");
-- $stat==0 or die "Can\'t copy $omega_parameters into results directory";
-+ $omega_parameters_files = `ls $omega_parameters_stem*`;
-+ @omega_parameters_files = split /\n/, $omega_parameters_files;
-+ $omega_parameters_files = "";
-+ foreach (@omega_parameters_files) {
-+ my $target;
-+ if (m/.*global.f90/)
-+ {$target = "omega_parameters_whizard_global.f90"}
-+ elsif (m/.*cpl(\d+).f90/)
-+ {$target = "omega_parameters_whizard_cpl$1.f90"}
-+ elsif (m/.*local.f90/)
-+ {$target = "omega_parameters_whizard_local.f90"}
-+ else {$target = "omega_parameters_whizard.f90"};
-+ $omega_parameters_files .= "$target ";
-+ system ("cp", $_, "results/$target") == 0 or die
-+ "Can\'t copy $_ into the results directory";
-+ }
- }
- }
-
-@@ -1506,7 +1520,7 @@
-
- # List files
- $src = "parameters.f90 file_utils.f90 process_interface.f90 ";
-- if ($omega ne "no") { $src .= "omega_parameters_whizard.f90 "; }
-+ if ($omega ne "no") { $src .= "$omega_parameters_files"; }
- foreach $ext(sort keys %ext) {
- $src .= "$ext*.f90 ";
- }
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.in
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.in (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.in (revision 3973)
@@ -1,17 +0,0 @@
-# $Id$
-
-prefix = @prefix@
-subdirs = omega whizard
-
-all:
- for dir in $(subdirs); do make -C$${dir} all || exit 1; done
-
-install:
- for dir in $(subdirs); do make -C$${dir} install || exit 1; done
- @echo
- @echo 'The model has been installed in "$(prefix)" and is ready for use.'
-
-clean:
- for dir in $(subdirs); do make -C$${dir} clean || exit 1; done
-
-.PHONY: all install clean
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure.ac
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure.ac (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure.ac (revision 3973)
@@ -1,230 +0,0 @@
-# Configure the build system for the W2 model files written out by the
-# FeynRules WO interface. Most information is directly obtained from the
-# whizard-config / omega-config scripts. After the Makefiles have been
-# generated, the models contained in the output directory are scanned and
-# the model-specific Makefile.src are generated.
-
-# $Id$
-
-AC_INIT([this FeynRules model], [for WHIZARD 2.0])
-
-# The default is to install locally
-AC_PREFIX_DEFAULT([${HOME}/.whizard])
-
-# Track down the WHIZARD / O'Mega installation
-AC_ARG_VAR([WO_CONFIG], dnl
-[path to whizard-config and omega-config (searched _before_ the system-wide
-search path)])
-
-# Allow to append compiler flags
-AC_ARG_VAR([FCFLAGS], dnl
-[override FORTRAN compiler flags])
-
-delimiter="################################################################################"
-
-echo ${delimiter}
-AC_MSG_NOTICE([collecting information])
-echo ${delimiter}
-echo
-
-###############################################################################
-# Check for a working install
-AC_PROG_INSTALL
-
-###############################################################################
-# Look for whizard-config and omega-config
-[
-wo_confpath=""
-test -n "${WO_CONFIG}" && wo_confpath="${WO_CONFIG}:"
-wo_confpath="${wo_confpath}${PATH}"
-]
-
-# whizard-config ?
-AC_PATH_PROG([whizard_config], [whizard-config], [not found], dnl
- [path = ${wo_confpath}])
-if test "${whizard_config}" = "not found"; then
- AC_MSG_ERROR([couldn't locate whizard-config: consider setting WO_CONFIG...])
-fi
-
-# omega-config ?
-AC_PATH_PROG([omega_config], [omega-config], [not found], dnl
- [path = ${wo_confpath}])
-if test "${omega_config}" = "not found"; then
- AC_MSG_ERROR([couldn't locate omega-config: consider setting WO_CONFIG...])
-fi
-
-###############################################################################
-# Query whizard-config and omega-config for the relevant settings
-
-# WHIZARD library path
-AC_MSG_CHECKING([for the WHIZARD library path])
-WHIZARD_LIBPATH=$(${whizard_config} --libdir)
-AC_SUBST([WHIZARD_LIBPATH])
-AC_MSG_RESULT([${WHIZARD_LIBPATH}])
-
-# WHIZARD data path
-AC_MSG_CHECKING([for the WHIZARD data directory])
-WHIZARD_DATAPATH=$(${whizard_config} --datadir)
-AC_SUBST([WHIZARD_DATAPATH])
-AC_MSG_RESULT([${WHIZARD_DATAPATH}])
-
-# FORTRAN compiler
-AC_MSG_CHECKING([for the FORTRAN compiler WHIZARD was built with])
-FC=$(${whizard_config} --fc)
-AC_SUBST([FC])
-AC_MSG_RESULT([${FC}])
-
-# FORTRAN flags
-AC_MSG_CHECKING([for the FORTRAN compiler options])
-test -z "$FCFLAGS" && FCFLAGS=$(${whizard_config} --fcflags)
-AC_SUBST([FCFLAGS])
-AC_MSG_RESULT([${FCFLAGS}])
-
-# FORTRAN module extension
-AC_MSG_CHECKING([for the file extension used for FORTRAN modules])
-FC_MODEXT=$(${whizard_config} --fcmodext)
-AC_SUBST([FC_MODEXT])
-AC_MSG_RESULT([${FC_MODEXT}])
-
-# libtool
-AC_MSG_CHECKING([for the WHIZARD libtool])
-LIBTOOL="${WHIZARD_LIBPATH}/libtool"
-if test ! -x "${LIBTOOL}"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR(dnl
-[${LIBTOOL}
-not found or not executable! It seems WHIZARD was built without libtool
-support which, however, is mandatory for using FeynRules with W2.])
-fi
-AC_MSG_RESULT([${LIBTOOL}])
-AC_SUBST([LIBTOOL])
-
-# O'Mega library path
-AC_MSG_CHECKING([for the O'Mega library path])
-OMEGA_LIBPATH=$(${omega_config} --libdir)
-AC_SUBST([OMEGA_LIBPATH])
-AC_MSG_RESULT([${OMEGA_LIBPATH}])
-
-# ocamlopt
-AC_MSG_CHECKING([for ocamlopt (taken from the O'Mega configuration)])
-OCAMLOPT=$(${omega_config} --ocamlopt)
-if test -z "${OCAMLOPT}"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR(dnl
-[It seems O'Mega was built without O'Caml which is mandatory for using
-FeynRules!])
-fi
-AC_MSG_RESULT([${OCAMLOPT}])
-AC_SUBST([OCAMLOPT])
-
-# additional ocaml flags
-AC_MSG_CHECKING([for any additional O'Caml flags])
-OCAMLFLAGS=$(${omega_config} --ocamlflags)
-AC_SUBST([OCAMLFLAGS])
-screenflags=${OCAMLFLAGS}
-test -z "${screenflags}" && screenflags="none"
-AC_MSG_RESULT([${screenflags}])
-
-###############################################################################
-# Create output files
-
-echo
-echo ${delimiter}
-AC_MSG_NOTICE([writing Makefiles])
-echo $delimiter
-echo
-
-AC_CONFIG_FILES([omega/Makefile] [whizard/Makefile] [Makefile])
-
-AC_OUTPUT
-
-###############################################################################
-# Generate Makefile includes
-
-echo
-echo ${delimiter}
-AC_MSG_NOTICE([collecting models])
-echo $delimiter
-echo
-
-lfeed="
-"
-for mdl in whizard/*mdl; do
- model=${mdl%.mdl}
- model=${model##*/}
- echo "found: $model"
-
- # WHIZARD
- libraries="${libraries}\\${lfeed} libparameters_$model.la"
- models="${models}\\${lfeed} ${model}.mdl"
- cplsrc="${cplsrc}${lfeed}cplsrc_${model} = "
- for file in whizard/*${model}*cpl*f90; do
- cplsrc="${cplsrc}\\${lfeed} ${file##*/}"
- done
- cplobj="${cplobj}${lfeed}cplobj = \$(cplsrc_${model}:.f90=.lo)"
- globsrc="${globsrc}${lfeed}globsrc_${model} = parameters.${model}.global.f90"
- globobj="${globobj}${lfeed}globobj_${model} = \$(globsrc_${model}:.f90=.lo)"
- locsrc="${locsrc}${lfeed}locsrc_${model} = parameters.${model}.local.f90"
- locobj="${locobj}${lfeed}locobj_${model} = \$(locsrc_{$model}:.f90=.lo)"
- mainsrc="${mainsrc}${lfeed}mainsrc_${model} = parameters.${model}.f90"
- mainobj="${mainobj}${lfeed}mainobj_${model} = \$(mainsrc_${model}:.f90=.lo)"
- allsrc="${allsrc}${lfeed}src_${model} = \$(globsrc_${model}) \$(locsrc_${model})"
- allsrc="${allsrc} \$(cplsrc_${model}) \$(mainsrc_${model})"
- allobj="${allobj}${lfeed}obj_${model} = \$(src_${model}:.f90=.lo)"
- modules="${modules}\\${lfeed} \$(patsubst %_f90,%.mod,\$(subst .,_,\$(src_${model})))"
- whizrules="${whizrules}${lfeed}
-\$(locobj_${model}): \$(globobj_${model})
-\$(cplobj_${model}): \$(globobj_${model}) \$(locobj_${model})
-\$(mainobj_${model}): \$(globobj_${model}) \$(locobj_${model}) \$(cplobj_${model})
-parameters_${model}.\$(fc_modext): \$(mainobj_${model})
-libparameters_$model.la: \$(obj_${model})
- \$(libtool) --tag=FC --mode=link \$(fc) -all-static \\
- -rpath \$(prefix)/lib/whizard/models -o \$@ \$(obj_${model})"
-
- # O'Mega
- binaries="${binaries}\\${lfeed} omega_${model}.opt"
- oint="${oint}${lfeed}int_${model} = ${model}_mdl.cmi"
- omdl="${omdl}${lfeed}mdl_${model} = ${model}_mdl.cmx"
- obin="${obin}${lfeed}bin_${model} = omega_${model}.cmx"
- orules="${orules}${lfeed}
-\$(mdl_${model}): \$(int_${model})
-\$(bin_${model}): \$(int_${model}) \$(mdl_${model})
-omega_${model}.opt: \$(int_${model}) \$(mdl_${model}) \$(bin_${model})
- \$(ocamlopt) \$(ocamlflags) -I \$(libdir) -o \$@ omega_core.cmxa omega_targets.cmxa \\
- \$(mdl_${model}) \$(bin_${model})"
-done
-
-echo
-
-AC_MSG_NOTICE([writing whizard/Makefile.src])
-cat <<EOI > whizard/Makefile.src || exit 1
-models = ${models}
-libraries = ${libraries}
-modules = ${modules}
-${globsrc}${globobj}
-${locsrc}${locobj}
-${cplsrc}${cplobj}
-${mainsrc}${mainobj}
-${allsrc}${allobj}
-${whizrules}
-EOI
-
-AC_MSG_NOTICE([writing omega/Makefile.src])
-cat <<EOI > omega/Makefile.src || exit 1
-binaries = ${binaries}
-${oint}
-${omdl}
-${obin}
-${orules}
-EOI
-
-###############################################################################
-# Done
-
-cat <<EOI
-
-${delimiter}
-
-Your configure finished, and you're now ready to compile and install the
-model via make install.
-EOI
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/INSTALL
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/INSTALL (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/INSTALL (revision 3973)
@@ -1,22 +0,0 @@
-This directory contains model definitions for WHIZARD / O'Mega generated by the
-FeynRules - WHIZARD interface. In order to use them, you need a working
-installation of WHIZARD 2.x and must compile and install the files using the
-included build system.
-
-To this end, configure the sources using the configure script
-
- ./configure --prefix=/installation/prefix WO_CONFIG=/path/to/wo/binaries
-
-where "--prefix" and "WO_CONFIG" are optional. The latter must be set to the
-path containing the WHIZARD binaries if they can't be found in any of the paths
-in the PATH environment variable, while the first can be used to tune the
-installation directory of the model files (${HOME}/.whizard by default).
-
-After configuration, compile and install the source by doing
-
- make clean && make install
-
-If the model was either installed into the default prefix or into the WHIZARD
-prefix, it will be found WHIZARD without any further intervention. If a
-different prefix was chosen, please use the "--localprefix" to point the
-"whizard" executable to the correct path.
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.omega.in
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.omega.in (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.omega.in (revision 3973)
@@ -1,29 +0,0 @@
-# $Id$
-
-prefix = @prefix@
-install = @INSTALL@
-libpath = @OMEGA_LIBPATH@
-ocamlopt = @OCAMLOPT@
-ocamlflags = @OCAMLFLAGS@
-
-libdir = $(libpath)/caml
-
-default: all
-
-include Makefile.src
-
-all: $(binaries)
-
-install: all
- $(install) -d -m 755 $(prefix)/bin
- $(install) -m 755 $(binaries) $(prefix)/bin
-
-clean:
- -rm -f $(binaries) *.cmx *.cmi *.o
-
-%.cmi: %.mli
- $(ocamlopt) $(ocamlflags) -I $(libdir) -c $<
-%.cmx: %.ml
- $(ocamlopt) $(ocamlflags) -I $(libdir) -c $<
-
-.PHONY: all install clean
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.whizard.in
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.whizard.in (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/Makefile.whizard.in (revision 3973)
@@ -1,38 +0,0 @@
-# $Id$
-
-prefix = @prefix@
-install = @INSTALL@
-fc = @FC@
-fcflags = @FCFLAGS@
-fc_modext = @FC_MODEXT@
-libtool = @LIBTOOL@
-libpath = @WHIZARD_LIBPATH@
-datapath = @WHIZARD_DATAPATH@
-
-moddir = $(libpath)/mod/misc
-modeldir = $(datapath)/models
-
-default: all
-
-include Makefile.src
-
-all: $(libraries) $(models)
-
-install: all
- $(install) -d -m 755 $(prefix)/share/whizard/models
- $(install) -d -m 755 $(prefix)/lib/whizard/models
- $(install) -d -m 755 $(prefix)/lib/whizard/mod/models
- $(install) -m 644 $(models) $(prefix)/share/whizard/models
- $(install) -m 644 $(modules) $(prefix)/lib/whizard/mod/models
- $(libtool) --tag=FC --mode=install $(install) -m 644 $(libraries) \
- $(prefix)/lib/whizard/models
- $(libtool) --tag=FC --mode=finish $(prefix)/lib/whizard/models
-
-clean:
- -rm -fr *.mod *.lo .libs *.o *.la
-
-%.lo: %.f90
- $(libtool) --tag=FC --mode=compile $(fc) -prefer-pic -static -c \
- -I $(moddir) $(fcflags) $<
-
-.PHONY: all install clean default
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/install-sh
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/install-sh (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/install-sh (revision 3973)
@@ -1,520 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2009-04-28.21; # UTC
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" "" $nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
- --help display this help and exit.
- --version display version info and exit.
-
- -c (ignored)
- -C install only if different (preserve the last data modification time)
- -d create directories instead of installing files.
- -g GROUP $chgrpprog installed files to GROUP.
- -m MODE $chmodprog installed files to MODE.
- -o USER $chownprog installed files to USER.
- -s $stripprog installed files.
- -t DIRECTORY install into DIRECTORY.
- -T report an error if DSTFILE is a directory.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
- RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
- case $1 in
- -c) ;;
-
- -C) copy_on_change=true;;
-
- -d) dir_arg=true;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
-
- -o) chowncmd="$chownprog $2"
- shift;;
-
- -s) stripcmd=$stripprog;;
-
- -t) dst_arg=$2
- shift;;
-
- -T) no_target_directory=true;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- --) shift
- break;;
-
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
-
- *) break;;
- esac
- shift
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
- # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dst_arg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dst_arg"
- shift # fnord
- fi
- shift # arg
- dst_arg=$arg
- done
-fi
-
-if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
-
- # Set umask so as not to create temps with too-generous modes.
- # However, 'strip' requires both read and write access to temps.
- case $mode in
- # Optimize common cases.
- *644) cp_umask=133;;
- *755) cp_umask=22;;
-
- *[0-7])
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw='% 200'
- fi
- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
- *)
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw=,u+rw
- fi
- cp_umask=$mode$u_plus_rw;;
- esac
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- dstdir=$dst
- test -d "$dstdir"
- dstdir_status=$?
- else
-
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- obsolete_mkdir_used=false
-
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
- esac
-
- if
- $posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
- )
- then :
- else
-
- # The umask is ridiculous, or mkdir does not conform to POSIX,
- # or it failed possibly due to a race condition. Create the
- # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
- esac
-
- eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
- $posix_glob set -f
- set fnord $dstdir
- shift
- $posix_glob set +f
- IFS=$oIFS
-
- prefixes=
-
- for d
- do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
- done
-
- if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
- fi
- fi
- fi
-
- if test -n "$dir_arg"; then
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
- # If -C, don't bother to copy if it wouldn't change the file.
- if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
- set X $old && old=:$2:$4:$5:$6 &&
- set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
- test "$old" = "$new" &&
- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
- then
- rm -f "$dsttmp"
- else
- # Rename the file to the real destination.
- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
- {
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
- }
- fi || exit 1
-
- trap '' 0
- fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/2.0/configure (revision 3973)
@@ -1,3287 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for this FeynRules model for WHIZARD 2.0.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-"
- as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
- else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
- fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='this FeynRules model'
-PACKAGE_TARNAME='this-feynrules-model'
-PACKAGE_VERSION='for WHIZARD 2.0'
-PACKAGE_STRING='this FeynRules model for WHIZARD 2.0'
-PACKAGE_BUGREPORT=''
-PACKAGE_URL=''
-
-ac_default_prefix=${HOME}/.whizard
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-OCAMLFLAGS
-OCAMLOPT
-OMEGA_LIBPATH
-LIBTOOL
-FC_MODEXT
-FC
-WHIZARD_DATAPATH
-WHIZARD_LIBPATH
-omega_config
-whizard_config
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-FCFLAGS
-WO_CONFIG
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-WO_CONFIG
-FCFLAGS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *=) ac_optarg= ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
- esac
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this FeynRules model for WHIZARD 2.0 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root
- [DATAROOTDIR/doc/this-feynrules-model]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of this FeynRules model for WHIZARD 2.0:";;
- esac
- cat <<\_ACEOF
-
-Some influential environment variables:
- WO_CONFIG path to whizard-config and omega-config (searched _before_ the
- system-wide search path)
- FCFLAGS override FORTRAN compiler flags
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to the package provider.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-this FeynRules model configure for WHIZARD 2.0
-generated by GNU Autoconf 2.68
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by this FeynRules model $as_me for WHIZARD 2.0, which was
-generated by GNU Autoconf 2.68. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
- done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
- 2)
- as_fn_append ac_configure_args1 " '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- as_fn_append ac_configure_args " '$ac_arg'"
- ;;
- esac
- done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special files
- # actually), so we avoid doing that. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# The default is to install locally
-
-
-# Track down the WHIZARD / O'Mega installation
-
-
-# Allow to append compiler flags
-
-
-delimiter="################################################################################"
-
-echo ${delimiter}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: collecting information" >&5
-$as_echo "$as_me: collecting information" >&6;}
-echo ${delimiter}
-echo
-
-###############################################################################
-# Check for a working install
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
- done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-###############################################################################
-# Look for whizard-config and omega-config
-
-wo_confpath=""
-test -n "${WO_CONFIG}" && wo_confpath="${WO_CONFIG}:"
-wo_confpath="${wo_confpath}${PATH}"
-
-
-# whizard-config ?
-# Extract the first word of "whizard-config", so it can be a program name with args.
-set dummy whizard-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_whizard_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $whizard_config in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_whizard_config="$whizard_config" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in path = ${wo_confpath}
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_whizard_config="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_whizard_config" && ac_cv_path_whizard_config="not found"
- ;;
-esac
-fi
-whizard_config=$ac_cv_path_whizard_config
-if test -n "$whizard_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $whizard_config" >&5
-$as_echo "$whizard_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "${whizard_config}" = "not found"; then
- as_fn_error $? "couldn't locate whizard-config: consider setting WO_CONFIG..." "$LINENO" 5
-fi
-
-# omega-config ?
-# Extract the first word of "omega-config", so it can be a program name with args.
-set dummy omega-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_omega_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $omega_config in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_omega_config="$omega_config" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in path = ${wo_confpath}
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_omega_config="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_omega_config" && ac_cv_path_omega_config="not found"
- ;;
-esac
-fi
-omega_config=$ac_cv_path_omega_config
-if test -n "$omega_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $omega_config" >&5
-$as_echo "$omega_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "${omega_config}" = "not found"; then
- as_fn_error $? "couldn't locate omega-config: consider setting WO_CONFIG..." "$LINENO" 5
-fi
-
-###############################################################################
-# Query whizard-config and omega-config for the relevant settings
-
-# WHIZARD library path
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the WHIZARD library path" >&5
-$as_echo_n "checking for the WHIZARD library path... " >&6; }
-WHIZARD_LIBPATH=$(${whizard_config} --libdir)
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WHIZARD_LIBPATH}" >&5
-$as_echo "${WHIZARD_LIBPATH}" >&6; }
-
-# WHIZARD data path
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the WHIZARD data directory" >&5
-$as_echo_n "checking for the WHIZARD data directory... " >&6; }
-WHIZARD_DATAPATH=$(${whizard_config} --datadir)
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WHIZARD_DATAPATH}" >&5
-$as_echo "${WHIZARD_DATAPATH}" >&6; }
-
-# FORTRAN compiler
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the FORTRAN compiler WHIZARD was built with" >&5
-$as_echo_n "checking for the FORTRAN compiler WHIZARD was built with... " >&6; }
-FC=$(${whizard_config} --fc)
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FC}" >&5
-$as_echo "${FC}" >&6; }
-
-# FORTRAN flags
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the FORTRAN compiler options" >&5
-$as_echo_n "checking for the FORTRAN compiler options... " >&6; }
-test -z "$FCFLAGS" && FCFLAGS=$(${whizard_config} --fcflags)
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FCFLAGS}" >&5
-$as_echo "${FCFLAGS}" >&6; }
-
-# FORTRAN module extension
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the file extension used for FORTRAN modules" >&5
-$as_echo_n "checking for the file extension used for FORTRAN modules... " >&6; }
-FC_MODEXT=$(${whizard_config} --fcmodext)
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FC_MODEXT}" >&5
-$as_echo "${FC_MODEXT}" >&6; }
-
-# libtool
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the WHIZARD libtool" >&5
-$as_echo_n "checking for the WHIZARD libtool... " >&6; }
-LIBTOOL="${WHIZARD_LIBPATH}/libtool"
-if test ! -x "${LIBTOOL}"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "${LIBTOOL}
-not found or not executable! It seems WHIZARD was built without libtool
-support which, however, is mandatory for using FeynRules with W2." "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBTOOL}" >&5
-$as_echo "${LIBTOOL}" >&6; }
-
-
-# O'Mega library path
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the O'Mega library path" >&5
-$as_echo_n "checking for the O'Mega library path... " >&6; }
-OMEGA_LIBPATH=$(${omega_config} --libdir)
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OMEGA_LIBPATH}" >&5
-$as_echo "${OMEGA_LIBPATH}" >&6; }
-
-# ocamlopt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocamlopt (taken from the O'Mega configuration)" >&5
-$as_echo_n "checking for ocamlopt (taken from the O'Mega configuration)... " >&6; }
-OCAMLOPT=$(${omega_config} --ocamlopt)
-if test -z "${OCAMLOPT}"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "It seems O'Mega was built without O'Caml which is mandatory for using
-FeynRules!" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OCAMLOPT}" >&5
-$as_echo "${OCAMLOPT}" >&6; }
-
-
-# additional ocaml flags
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for any additional O'Caml flags" >&5
-$as_echo_n "checking for any additional O'Caml flags... " >&6; }
-OCAMLFLAGS=$(${omega_config} --ocamlflags)
-
-screenflags=${OCAMLFLAGS}
-test -z "${screenflags}" && screenflags="none"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${screenflags}" >&5
-$as_echo "${screenflags}" >&6; }
-
-###############################################################################
-# Create output files
-
-echo
-echo ${delimiter}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: writing Makefiles" >&5
-$as_echo "$as_me: writing Makefiles" >&6;}
-echo $delimiter
-echo
-
-ac_config_files="$ac_config_files omega/Makefile whizard/Makefile Makefile"
-
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- if test ! -f "$cache_file" || test -h "$cache_file"; then
- cat confcache >"$cache_file"
- else
- case $cache_file in #(
- */* | ?:*)
- mv -f confcache "$cache_file"$$ &&
- mv -f "$cache_file"$$ "$cache_file" ;; #(
- *)
- mv -f confcache "$cache_file" ;;
- esac
- fi
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by this FeynRules model $as_me for WHIZARD 2.0, which was
-generated by GNU Autoconf 2.68. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to the package provider."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-this FeynRules model config.status for WHIZARD 2.0
-configured by $0, generated by GNU Autoconf 2.68,
- with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "omega/Makefile") CONFIG_FILES="$CONFIG_FILES omega/Makefile" ;;
- "whizard/Makefile") CONFIG_FILES="$CONFIG_FILES whizard/Makefile" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp= ac_tmp=
- trap 'exit_status=$?
- : "${ac_tmp:=$tmp}"
- { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$ac_tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
- >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
- "$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$ac_tmp/stdin"
- case $ac_file in
- -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
- *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-
-
-
- esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-###############################################################################
-# Generate Makefile includes
-
-echo
-echo ${delimiter}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: collecting models" >&5
-$as_echo "$as_me: collecting models" >&6;}
-echo $delimiter
-echo
-
-lfeed="
-"
-for mdl in whizard/*mdl; do
- model=${mdl%.mdl}
- model=${model##*/}
- echo "found: $model"
-
- # WHIZARD
- libraries="${libraries}\\${lfeed} libparameters_$model.la"
- models="${models}\\${lfeed} ${model}.mdl"
- cplsrc="${cplsrc}${lfeed}cplsrc_${model} = "
- for file in whizard/*${model}*cpl*f90; do
- cplsrc="${cplsrc}\\${lfeed} ${file##*/}"
- done
- cplobj="${cplobj}${lfeed}cplobj = \$(cplsrc_${model}:.f90=.lo)"
- globsrc="${globsrc}${lfeed}globsrc_${model} = parameters.${model}.global.f90"
- globobj="${globobj}${lfeed}globobj_${model} = \$(globsrc_${model}:.f90=.lo)"
- locsrc="${locsrc}${lfeed}locsrc_${model} = parameters.${model}.local.f90"
- locobj="${locobj}${lfeed}locobj_${model} = \$(locsrc_{$model}:.f90=.lo)"
- mainsrc="${mainsrc}${lfeed}mainsrc_${model} = parameters.${model}.f90"
- mainobj="${mainobj}${lfeed}mainobj_${model} = \$(mainsrc_${model}:.f90=.lo)"
- allsrc="${allsrc}${lfeed}src_${model} = \$(globsrc_${model}) \$(locsrc_${model})"
- allsrc="${allsrc} \$(cplsrc_${model}) \$(mainsrc_${model})"
- allobj="${allobj}${lfeed}obj_${model} = \$(src_${model}:.f90=.lo)"
- modules="${modules}\\${lfeed} \$(patsubst %_f90,%.mod,\$(subst .,_,\$(src_${model})))"
- whizrules="${whizrules}${lfeed}
-\$(locobj_${model}): \$(globobj_${model})
-\$(cplobj_${model}): \$(globobj_${model}) \$(locobj_${model})
-\$(mainobj_${model}): \$(globobj_${model}) \$(locobj_${model}) \$(cplobj_${model})
-parameters_${model}.\$(fc_modext): \$(mainobj_${model})
-libparameters_$model.la: \$(obj_${model})
- \$(libtool) --tag=FC --mode=link \$(fc) -all-static \\
- -rpath \$(prefix)/lib/whizard/models -o \$@ \$(obj_${model})"
-
- # O'Mega
- binaries="${binaries}\\${lfeed} omega_${model}.opt"
- oint="${oint}${lfeed}int_${model} = ${model}_mdl.cmi"
- omdl="${omdl}${lfeed}mdl_${model} = ${model}_mdl.cmx"
- obin="${obin}${lfeed}bin_${model} = omega_${model}.cmx"
- orules="${orules}${lfeed}
-\$(mdl_${model}): \$(int_${model})
-\$(bin_${model}): \$(int_${model}) \$(mdl_${model})
-omega_${model}.opt: \$(int_${model}) \$(mdl_${model}) \$(bin_${model})
- \$(ocamlopt) \$(ocamlflags) -I \$(libdir) -o \$@ omega_core.cmxa omega_targets.cmxa \\
- \$(mdl_${model}) \$(bin_${model})"
-done
-
-echo
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: writing whizard/Makefile.src" >&5
-$as_echo "$as_me: writing whizard/Makefile.src" >&6;}
-cat <<EOI > whizard/Makefile.src || exit 1
-models = ${models}
-libraries = ${libraries}
-modules = ${modules}
-${globsrc}${globobj}
-${locsrc}${locobj}
-${cplsrc}${cplobj}
-${mainsrc}${mainobj}
-${allsrc}${allobj}
-${whizrules}
-EOI
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: writing omega/Makefile.src" >&5
-$as_echo "$as_me: writing omega/Makefile.src" >&6;}
-cat <<EOI > omega/Makefile.src || exit 1
-binaries = ${binaries}
-${oint}
-${omdl}
-${obin}
-${orules}
-EOI
-
-###############################################################################
-# Done
-
-cat <<EOI
-
-${delimiter}
-
-Your configure finished, and you're now ready to compile and install the
-model via make install.
-EOI
Index: branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/WOMathematicaInterface.m
===================================================================
--- branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/WOMathematicaInterface.m (revision 3972)
+++ branches/speckner/FeynRulesInterface/Interfaces/WhizardOmega/WOMathematicaInterface.m (revision 3973)
@@ -1,3017 +0,0 @@
-(*
-
- $Id$
-
- This is a mathematica model file generator for WHIZARD / O'Mega; its task
- is to translate an abstraction of the model data into a model file package.
- Other codes can tap into this library and use it to implement interfaces to WO.
- As the code is a near 1-to-1 copy of the FR interface atm, this "abstraction"
- currently are the FR data structures, but I plan to refine this as I find time.
-
- Christian Speckner, 2009 - 2011
-*)
-
-(*
-TODO
- - Sanitize the handling of kinds in FORTRAN real constants.
- - Remove "open coupling" and qualify all identifiers from this module instead
- - Add verbosity, more sensible messages (don't complain about every ghost vertex etc.) *partly done*
- - Make sure that all functions commonly appearing in parameters and couplings get treated correctly.
- - Allow vertices which are sums of known structures.
- - Win paths to different drives like "c:\foo" are broken atm.
-*)
-
-(*
- "API" version to ensure that the top level code gets what it deserves
-*)
-WO`APIversion = 2;
-
-(*
-The backend can query the revision
-*)
-WO`BackendRevision = "$Id$";
-
-(*
- Option handling: all options are defined within the WO namespace - some magic must
- be played to create copies in other namespaces if desired.
-*)
-
-Options[WO`WriteOutput] = {
- WO`WOVertexList -> {},
- WO`WOModelName -> "unknown",
- WO`WOMaxNcf -> 4,
- WO`WOGauge -> WO`WOUnitarity,
- WO`WOGaugeParameter -> "Rxi",
- WO`WOWhizardVersion -> "2.0.3",
- WO`WOVerbose -> False,
- WO`WOAutoGauge -> True,
- WO`WOMaxCouplingsPerFile -> 500,
- WO`WORunParameters -> {aS, G},
- WO`WOOutputDir -> Null,
- WO`WOOplotter -> False,
- WO`WOFast -> True,
- WO`WOMassList -> {},
- WO`WOWidthList -> {},
- WO`WOEParamList -> {},
- WO`WOIParamList -> {},
- WO`WOPartList -> {},
- WO`WOProgress -> 10,
- WO`WOExtraComment -> ""
-};
-
-Options[WO`WriteExtParams] = {
- WO`WOWhizardVersion -> "2.0.3",
- WO`WOEParamList -> {},
- WO`WOModelName -> "unknown",
- WO`WOMassList -> {},
- WO`WOWidthList -> {}
-};
-
-Protect @@ (Options[WP`WriteOutput] /. Rule[a_, b_] :> a);
-Protect[WO`WORxi, WO`WOFeynman, WO`WOUnitarity];
-
-WO`WriteOutput::usage = "Write O'Mega / WHIZARD model files.";
-WO`WriteWOExtParams::usage = "Write external parameters to a file suitable for inclusion by WHIZARD.";
-WO`WOVertexList::usage = "Directly pass a vertex list to WriteWOOutput; overrides any Lagrians";
-WO`WOModelName::usage = "override model name; will be lowercased.";
-WO`WOMaxNcf::usage = (""
- <> "The maximum number of color flows provided for in "
- <> "O'mega. Irrelevant for WHIZARD 2+. Default: 4");
-WO`WOGauge::usage = (""
- <> "Choose a gauge, choices: WOUnitarity (default), WOFeynman, WORxi");
-WO`WOUnitarity::usage = WO`WOFeynman::usage = "see WOGauge";
-WO`WORxi::usage = (""
- <> "see WOGauge; if you specify Rxi gauge, then you MUST implement a parameter that "
- <> "represents the gauge parameter \\xi; you can pass it to WriteWOOutput via "
- <> "WOGaugeParameter (default: \"Rxi\").");
-WO`WOGaugeParameter::usage = "see WORxi, WOGauge";
-WO`WOWhizardVersion::usage = (""
- <> "Version of WHIZARD / O'Mega to generate code for; possible values are:\n"
- <> " \"1.92\" : <= 1.92\n"
- <> " \"1.93\" : >= 1.93\n"
- <> " \"1.96\" : >= 1.96\n"
- <> " \"2.0\" : 2.0 - 2.0.2\n"
- <> " \"2.0.3\": 2.0.3 (default)");
-WO`WOVerbose::usage = (""
- <> "Verbose output. At the moment, this enables more detailed information "
- <> "on skipped vertices. Default: False");
-WO`WOAutoGauge::usage = (""
- <> "Automagically assign goldstone boson masses and add gauge parameter if necessary. Default: True");
-WO`WOMaxCouplingsPerFile::usage = (""
- <> "Maximum number of couplings that get calculated in one FORTRAN module. Default: 500");
-WO`WORunParameters::usage = (""
- <> "A list of all derived parameters which should be evolved together with the strong coupling. "
- <> "Default: {aS, G}");
-WO`WOOplotter::usage = (""
- <> "Generate model files for oplotter. Default: false");
-WO`WOFast::usage = (""
- <> "Avoid time-consuming checks when translating the vertices, at the danger of missing "
- <> "some structures. Retry with this option enabled if you encounter unidentified vertices. Default: True");
-WO`WOOutputDir::usage = "Set the output directory. Default: derifed from model name";
-WO`WOExtraComment::usage = "Additional comment prepended to the generated files. Default: empty";
-WO`WOProgress::usage = "Granularity for the progress meter. Default: 10"
-
-(* Create a directory if nonexistent *)
-WO`CautiousMd[dir_] := If[Length[FileNames[
- StringReplace[dir, RegularExpression[WO`fileSlashRE <> "\\s*$"] -> ""]]] == 0,
- If[CreateDirectory[dir] == $Failed, Throw["FATAL: unable to create directory " <> dir, WO`EAbort]]];
-
-(* Global setup.
- For clarities sake, all global variables should be defined here, even if they are
- overridden later. *)
-WO`GlobalSetup := Module[{},
- WO`cpldeflist = {};
- WO`maxarity = 3;
- WO`havemajoranas = False;
- WO`taglist = {};
- WO`masslist = {};
- WO`widthlist = {};
- WO`PartList = {};
- WO`IParamList = {};
- WO`EParamList = {};
- WO`ncfmax = 4;
- WO`maxiter = 1000;
- WO`runningcouplings = {};
- WO`appendAlphas = False;
- WO`gauge = WO`WOUnitarity;
- WO`gsym = "Rxi";
- WO`whizv = "2.0.3";
- WO`verbose = False;
- WO`autogauge = False;
- WO`MaxCouplingsPerFile = 500;
- WO`RunParameters = {};
- WO`fast = True;
- WO`vlist = {};
- WO`fileheader = "";
- WO`progress = 10;
- WO`WOForm = False;
- Clear[WO`hash];
- If[$OperatingSystem === "Windows",
- WO`fileSlash = "\\";
- WO`fileSlashRE = "\\\\";
- WO`absolutePathPattern = "^?:\\.*"
- ,
- WO`fileSlash = "/";
- WO`fileSlashRE ="/";
- WO`absolutePathPattern = "^/.*"
- ];
- WO`f2sin = Join[
- Rule[RegularExpression["(^|\\W)" <> #[[1]] <> "(\\s*)\\("], "$1" <> #[[2]] <> "$2("]& /@
- { {"Sqrt", "sqrt"}, {"Abs", "abs"}, {"WOxexp", "exp"}, {"Log", "log"}, {"Sin", "sin"},
- {"Cos", "cos"}, {"Tan", "tan"}, {"ACOS", "acos"}, {"ASIN", "asin"}, {"ATAN", "atan"},
- {"Sinh", "sinh"}, {"Cosh", "cosh"}, {"Tanh", "tanh"}, {"WOxsin", "sin"}, {"WOxcos", "cos"},
- {"WOxsinh", "sinh"}, {"WOxcosh", "cosh"}} /. Rule -> RuleDelayed
- ,
- Rule[RegularExpression["(^|\\W)" <> #[[1]] <> "(\\W|$)"], "$1" <> #[[2]] <> "$2"]& /@
- { {"Pi", "pi"} } /. Rule -> RuleDelayed
- ];
- WO`StringRules =
- Rule[RegularExpression[#[[1]]], #[[2]]]& /@ {
- (* + is replaced by "plus" *)
- {"^\\+$", "plus"}, {"^\\+", "plus_"}, {"\\+$", "_plus"}, {"\\+", "_plus_"},
- (* - is replaced by "minus" *)
- {"^\\-$", "minus"}, {"^\\-", "minus_"}, {"\\-$", "_minus"}, {"\\-", "_minus_"},
- (* ~ is replaced by "bar" *)
- {"^~$", "bar"}, {"^~", "bar_"}, {"~$", "_bar"}, {"~", "_bar_"},
- (* leading digits are moved to the end *)
- {"^(\\d+)(_*)(.*)$", "$3$2$1"},
- (* All other non-word characters, including whitespaces, are replaced by "_" *)
- {"[^\\w\\+\\-~]", "_"},
- (* Multiple underscores are concatenated. *)
- {"_{2}", "_"},
- (* Leading underscores are moved to the end. *)
- {"^(_+)(.*)$", "$2$1"}} /. Rule -> RuleDelayed;
- Print["WOMathematicaInterface.m running, revision: $Id$"];
-];
-
-(* Conditionally redefine FortranForm *)
-Unprotect[Re];
-Format[Re, FortranForm] /; WO`WOForm := REAL;
-Protect[Re];
-Unprotect[Im];
-Format[Im, FortranForm] /; WO`WOForm := AIMAG;
-Protect[Im];
-Unprotect[ArcTan];
-Format[ArcTan,FortranForm] /; WO`WOForm := ATAN;
-Protect[ArcTan];
-Unprotect[ArcSin];
-Format[ArcSin,FortranForm] /; WO`WOForm := ASIN;
-Protect[ArcSin];
-Unprotect[ArcCos];
-Format[ArcCos,FortranForm] /; WO`WOForm := ACOS;
-Protect[ArcCos];
-Unprotect[ArcCot];
-Format[ArcCot,FortranForm] /; WO`WOForm := ACOT;
-Protect[ArcCot];
-Format[FortranSec[x_], FortranForm] /; WO`WOForm := 1/FortranCos[x];
-Format[FortranCsc[x_], FortranForm] /; WO`WOForm := 1/FortranSin[x];
-Format[FortranSin[x_], FortranForm] /; WO`WOForm := Sin[x];
-Format[FortranCos[x_], FortranForm] /; WO`WOForm := Cos[x];
-Unprotect[Csc];
-Format[Csc[x_], FortranForm] /; WO`WOForm := FortranCsc[x];
-Protect[Csc];
-Unprotect[Sec];
-Format[Sec[x_], FortranForm] /; WO`WOForm := FortranSec[x];
-Protect[Sec];
-Unprotect[Conjugate];
-Format[Conjugate, FortranForm] /; WO`WOForm := conjg;
-Protect[Conjugate];
-Unprotect[Sqrt, Power];
-Format[Sqrt[x_Integer], FortranForm] /; WO`WOForm := Format["Sqrt (" <> ToString[N[x]] <> ")", OutputForm];
-Protect[Sqrt, Power];
-
-
-WO`WriteOutput[options___]:=Module[{dirName, modelname, onames, frpars, Addpar,
- reclimit, itlimit, gsymfixed, opts, omegadir, whizdir, opldir, oplotter},
- (* Global initializations. *)
- WO`GlobalSetup[];
-
- (* Insert default options *)
- opts = Join[{options}, Select[Options[WO`WriteOutput], FreeQ[#[[1]]& /@ {options}, #[[1]]]&]];
-
- (* Check for unknown options. *)
- onames = Select[#[[1]]& /@ opts, FreeQ[#[[1]]& /@ Options[WO`WriteOutput], #]&];
- If[Length[onames] > 0,
- Print["ERROR: WO`WriteOutput: unknown options: " <> WO`Concat[ToString /@ onames, " , "]];
- Return[Null];
- ];
-
- (* Handle options; model short name *)
- modelname = WO`SanitizeString[ToLowerCase[WO`WOModelName /. opts]];
- Print["Short model name is \"" <> modelname <> "\""];
-
- (* The diverse lists *)
- WO`masslist = WO`WOMassList /. opts;
- WO`widthlist = WO`WOWidthList /. opts;
- WO`EParamList = WO`WOEParamList /. opts;
- WO`IParamList = WO`WOIParamList /. opts;
- WO`PartList = WO`WOPartList /. opts;
-
- (* Maximum number of color flows *)
- WO`ncfmax = WO`WOMaxNcf /. opts;
- If[Not[IntegerQ[WO`ncfmax]] || WO`ncfmax < 2,
- Print["ERROR: WOMaxNcf must be a integer >= 2!"];
- Return[Null];
- ];
-
- (* Gauge *)
- WO`gauge = WO`WOGauge /. opts;
- If[Not[MatchQ[WO`gauge, WO`WOUnitarity|WO`WOFeynman|WO`WORxi]],
- Print["ERROR: unknown gauge requested, take a look at ?WOGauge."];
- Return[Null];
- ];
- Print["Gauge: " <> Switch[WO`gauge, WO`WOUnitarity, "Unitarity", WO`WOFeynman,
- "Feynman", WO`WORxi, "Rxi", _, "unknown - BUG!"]];
-
- (* Gauge Symbol *)
- WO`gsym = Symbol[ToString[WO`WOGaugeParameter /. opts]];
- If[WO`gauge === WO`WORxi, Print["Gauge symbol: \"" <> ToString[WO`gsym] <> "\""]];
-
- (* WHIZARD version *)
- WO`whizv = ToString[WO`WOWhizardVersion /. opts];
- Print["Generating code for WHIZARD / O'Mega version " <> WO`whizv];
-
- (* Verbosity *)
- WO`verbose = WO`WOVerbose /. opts;
- If[WO`verbose =!= True && WO`verbose =!= False,
- Print["ERROR: WOVerbose must be either True or False."];
- Return[Null];
- ];
- If[WO`verbose, Print["Verbose output enabled."]];
-
- (* Vertex processing progress meter *)
- WO`progress = WO`WOProgress /. opts;
-
- (* Automagic goldstone masses *)
- WO`autogauge = WO`WOAutoGauge /. opts;
- If[WO`autogauge =!= True && WO`autogauge =!= False,
- Print["ERROR: WOAutoGauge must be either True or False"];
- Return[Null];
- ];
- If[Not[FreeQ[{WO`WOFeynman, WO`WORxi}, WO`gauge]] && WO`autogauge,
- Print["Automagically assigning Goldstone boson masses..."];
- ];
- If[WO`gauge === WO`WORxi && WO`autogauge === True,
- Print["Adding gauge symbol to parameter list..."];
- gsymfixed = WO`RegisterEParam[WO`gsym, 1, "Rxi gauge parameter"];
- If [ToString[gsymfixed] =!= ToString[WO`gsym],
- Print[""
- <> "WARNING: parameter name \"" <> ToString[WO`gsym] <> "\" already taken; "
- <> "substituting \"" <> ToString[gsymfixed] <> "\"!"
- ];
- WO`gsym = gsymfixed;
- ];
- ];
-
- (* oplotter ? *)
- oplotter = WO`WOOplotter /. opts;
- If[oplotter =!= True && oplotter =!= False,
- Print["ERROR: WOOplotter must be either True or False"];
- Return[Null];
- ];
-
- (* Maximum number of couplings per file. *)
- WO`MaxCouplingsPerFile = WO`WOMaxCouplingsPerFile /. opts;
- If[Not[IntegerQ[WO`MaxCouplingsPerFile]] || WO`MaxCouplingsPerFile <= 0,
- Print["ERROR: WOMaxCouplingsPerFile must be an positive integer!"];
- Return[Null];
- ];
- Print["Maximum number of couplings per FORTRAN module: " <> ToString[WO`MaxCouplingsPerFile]];
-
- (* Which parameters should we run if \alpha_s is evolved? *)
- WO`RunParameters = WO`WORunParameters /. opts;
-
- (* Be pendantic? *)
- WO`fast = WO`WOFast /. opts;
- If[WO`fast =!= True && WO`fast =!= False,
- Print["ERROR: WOFast must be either True or False"];
- Return[Null];
- ];
- If[WO`fast, Print["Extensive lorentz structure checks disabled."]];
-
- (* Check if the version is OK *)
- Catch[WO`whizvn[], WO`EAbort, (Print["ERROR: invalid WHIZARD version"]; Return[])&];
-
- (* -> Now it is time for version-dependent checks and status messages *)
- If[WO`whizv19x[], Print["Maximum number of color flows: " <> ToString[WO`ncfmax]]];
- Switch[{oplotter, WO`whizv19x[]},
- {True, False},
- Print["WARNING: oplotter output is not supported with WOWhizardVersion->\"2.0\", disabling..."];
- oplotter = False,
- {False, True},
- Print["Oplotter output disabled."],
- {True, _},
- Print["Oplotter output enabled."]
- ];
-
- (* Check if the model name is OK. *)
- If[Not[StringMatchQ[ToLowerCase[modelname], RegularExpression["^fr.*"]]] && WO`whizv19x[],
- Print[""
- <> "WARNING: Short Model name doesn't start with \"fr\". O'Mega won't pick "
- <> "up this model automatically, you will have to add it to the build system "
- <> "yourself!"]
- ];
-
- (* This will be prepended as a comment to every file. *)
- WO`fileheader = ""
- <> "--------------------------------------------------------------------------------\n"
- <> "Autogenerated by the happy scrappy WHIZARD model file generator on " <> Module[{d, s},
- d = Date[];
- s = ToString[Round[d[[6]]]];
- d = ToString /@ d;
- d[[2]] <> "/" <> d[[3]] <> "/" <> d[[1]] <> " , " <> d[[4]] <> ":" <> d[[5]] <> ":" <> s] <> "\n"
- <> "WHIZARD interface svn revision info: $Id$\n"
- <> "Code generated for WHIZARD / O'Mega version " <> WO`whizv <> "\n"
- <> "Model name: " <> modelname <> "\n"
- <> "Gauge: " <> WO`GaugeName[] <> "\n"
- <> "Maximum number of couplings per FORTRAN module: " <> ToString[WO`MaxCouplingsPerFile] <> "\n"
- <> "--------------------------------------------------------------------------------" <> "\n"
- <> ToString[WO`WOExtraComment /. opts] <> "\n"
- <> "--------------------------------------------------------------------------------";
-
- (*Create directory if not present.*)
- dirName=WO`WOOutputDir /. opts /. Null :> (
- ToFileName[{Directory[], StringReplace[modelname, " " ->"-"] <> "-WO"}]);
- If[!StringMatchQ[dirName, RegularExpression[WO`absolutePathPattern]],
- dirName = ToFileName[{Directory[], dirName}]];
-
- (* Save and adjust iteration and recursion limits *)
- $IterationLimit = Max[itlimit = $IterationLimit, 100000];
- $RecursionLimit = Max[reclimit = $RecursionLimit, 100000];
-
- (* Activate our FortranForm rules *)
- WO`WOForm = True;
-
- Catch[
- WO`CautiousMd[dirName];
- WO`VersionCheck[dirName];
-
- (* Create vertex list. *)
- WO`vlist = Evaluate[ReleaseHold[WO`WOVertexList /. opts]];
- If[Head[WO`vlist] =!= List,
- Print[WO`vlist];
- Print["ERROR: vertex list invalid!"];
- Return[];
- ];
- If[Length[WO`vlist] == 0,
- Print["Vertex list empty; nothing to, aborting..."];
- Return[];
- ];
-
- WO`CautiousMd[omegadir = ToFileName[{dirName, "omega"}]];
- WO`CautiousMd[whizdir = ToFileName[{dirName, "whizard"}]];
- If[oplotter,
- WO`CautiousMd[opldir = ToFileName[{dirName, "oplotter"}]];
- ];
- WO`omeganame = WO`oplname = WO`whizname = ToLowerCase[modelname];
-
- Print["Writing files to ",dirName,"\n"];
-
- WO`WriteOmega[omegadir];
- If[oplotter, WO`WriteOpl[opldir]];
- WO`WriteWhiz[whizdir];
- WO`CopyAux[WO`InterfacePath, dirName];
-
- Print["Done!"];
- If[WO`whizv19x[], Print[""
- <> "Most likely your next step should to use the \"inject\" script which has been copied "
- <> "to the output directory to inject the model files into WHIZARD / O'Mega..."
- ]];
- If[WO`whizv2x[], Print [""
- <> "You should now use the configure script which has been copied to the output "
- <> "directory to configure the build system (use the variable WO_CONFIG and consult "
- <> "\"configure --help\" if WHIZARD is not installed in the system search path). Afterwards, "
- <> "the model files can be compiled and installed via \"make install\"."
- ]];
-
- , WO`EAbort, Function[{val, tag},
- If[Head[val] === String, Print[val]];
- Print["Aborting..."];
- ]];
-
- (* Restore Limits *)
- $IterationLimit = itlimit;
- $RecursionLimit = reclimit;
- WO`WOForm = False;
-];
-
-(* Get the name of a gauge. *)
-WO`GaugeName[g_] := Switch[g, WO`WOUnitarity, "Unitarity", WO`WOFeynman, "Feynman", WO`WORxi, "Rxi",
- _, Throw[WO`EAbort, "BUG: WO`GaugeName: illegal gauge " <> ToString[g]]];
-WO`GaugeName[] := WO`GaugeName[WO`gauge];
-
-(* Version query helpers *)
-WO`whizvn[v_] := Switch[v, "1.93", 193, "1.95", 195, "1.96", 196, "2.0", 200, "2.0.3", 203, _,
- Throw["BUG: invalid version in WO`whizvn, please report", WO`EAbort]];
-WO`whizvn[] := WO`whizvn[WO`whizv];
-WO`whizv2x[] := WO`whizvn[] >= WO`whizvn["2.0"];
-WO`whizv19x[] := !WO`whizv2x[];
-
-
-(* Those should be overwritten when called from FR. *)
-WO`tmp = Length[Names["WO`HC"]];
-If[WO`tmp < 1,
- WO`HC[p_] := Symbol[ToString[WO`hash["HC", ToString[p]]]];
-];
-
-(* Conditional Simplify and FullSimplify *)
-WO`Simplify[x_, o___] := If[WO`fast, x, Simplify[x, o]];
-WO`FullSimplify[x_, o___] := If[WO`fast, x, FullSimplify[x, o]];
-
-(* Return a list of all symbols that have already been defined. *)
-WO`SymbolsList[] := WO`WeedOutList[Join[
- #[[2, 1]]& /@ Flatten[#[[2]]& /@ WO`EParamList, 1],
- #[[1]]& /@ WO`IParamList,
- #[[2]]& /@ WO`masslist,
- #[[2]]& /@ WO`widthlist]];
-
-(* Append a new parameter to WO`EParamList *)
-WO`RegisterEParam[par_, val_, descr_] := Module[{EPLCopy, params, blocks, i, bname, bdata, index, pname},
- EPLCopy = WO`EParamList;
- (* All already defined parameters. *)
- params = ToUpperCase /@ (ToString /@ WO`SymbolsList[]);
- (* All already defined block names. *)
- blocks = ToString /@ (#[[1]]& /@ EPLCopy);
- If[Not[StringMatchQ[ToString[EPLCopy[[-1, 1]]], RegularExpression["^WOAUTOGEN(_\\d+)?"]]],
- (* If no WOAUTOGEN block exists, create one. As out block always will be the last one,
- we have to provide disambiguations in case another WOAUTOGENx block has been defined
- further up in the list (though admittedly unlikely), *)
- bname = "WOAUTOGEN";
- i = 0;
- While[Not[FreeQ[blocks, bname]],
- bname = "WOAUTOGEN" <> ToString[i];
- i++;
- ];
- bdata = {};
- index = 1;
- ,
- (* If the block exists, copy name and data and delete it. *)
- bname = ToString[EPLCopy[[-1, 1]]];
- bdata = EPLCopy[[-1, 2]];
- index = bdata[[-1, 1, 1]] + 1;
- EPLCopy = Take[EPLCopy, {1, -2}];
- ];
- pname = ToString[par];
- i = 0;
- (* Disambiguate the parameter name if necessary. *)
- While[Not[FreeQ[params, ToUpperCase[pname]]],
- pname = ToString[par] <> ToString[i];
- i++;
- ];
- (* Put together the block with the new parameter appended and reappend it. *)
- AppendTo[bdata, {{index}, {Symbol[pname], val, False, descr}}];
- AppendTo[EPLCopy, {Symbol[bname], bdata}];
- WO`EParamList = EPLCopy;
- (* Return the parameter name to allow the calling code to check whether it has been changed. *)
- Return[Symbol[pname]];
-];
-
-(* Append a parameter to WO`IParamList. *)
-WO`RegisterIParam[par_, expr_, descr_, da_] := Module[{params, i, pname},
- params = ToUpperCase /@ (ToString /@ WO`SymbolsList[]);
- pname = ToString[par];
- If[da,
- i = 0;
- While[Not[FreeQ[params, ToUpperCase[pname]]],
- pname = ToString[par] <> ToString[i];
- i++;
- ];
- ];
- AppendTo[WO`IParamList, {Symbol[pname], expr, False, descr}];
- Return[Symbol[pname]];
-];
-WO`RegisterIParam[par_, expr_, descr_] := WO`RegisterIParam[par, expr, descr, True];
-
-(* Append a mass to WO`masslist. *)
-WO`RegisterMass[mass_, val_, pdg_, da_] := Module[{masses, i, mname},
- masses = ToUpperCase /@ (ToString /@ WO`SymbolsList[]);
- mname = ToString[mass];
- If[da,
- i = 0;
- While[Not[FreeQ[masses, ToUpperCase[mname]]],
- mname = ToString[mass] <> ToString[i];
- i++;
- ];
- ];
- AppendTo[WO`masslist,{{pdg}, Symbol[mname], val}];
- Return[Symbol[mname]];
-];
-WO`RegisterMass[mass_, val_, pdg_] := WO`RegisterMass[mass, val, pdg, True];
-
-(* Sanitize a string, putting it into a form suitable for Caml and FORTRAN *)
-WO`SanitizeString[s_] := WO`StringReplaceAll[s, WO`StringRules];
-
-(* Convert a string into a comment. *)
-WO`CommentMaker[s_, beg_, line_, end_] :=
- StringReplace[s, {RegularExpression["^"] -> beg, RegularExpression["\n"] -> ("\n" <> line),
- RegularExpression["$"] -> end}];
-
-(* Replace patterns until the result doesn't change anymore. *)
-WO`StringReplaceAll[s_, l_List] := FixedPoint[StringReplace[#, l]&, s];
-WO`StringReplaceAll[s_, l_] := WO`StringReplaceAll[s, {l}];
-
-(* Split a FORTRAN statement into lines of approximately 80 characters, indenting by 3 blanks and adding "&" *)
-WO`FortranSplit[s_] := WO`FortranSplit[s, 80, 3];
-WO`FortranSplit[str_, min_, ni_] := Module[{spacer, helper},
- spacer = StringJoin @@ Table[" ", {i, 1, ni}];
-
- helper[s_, l_, {}] := s;
- helper[s_, l_, {head_, tail___}] := If[
- (l + StringLength[head] <= min) || s == "",
- helper[s <> head, l + StringLength[head], {tail}]
- ,
- helper[s <> " &\n" <> spacer <> head, 0, {tail}]
- ];
-
- helper["", 0, StringSplit[str, RegularExpression["([^\\w\\.]+)"] :> "$1"]]
-];
-
-
-(* Split a string into lines of approximately n characters, prepending p and appending a *)
-WO`StringSplit[s_, n_, p_, a_] := StringJoin @@
- StringSplit[s, {
- RegularExpression["(.{" <> ToString[n] <> "})\\s+(\\S)"] :> ("$1" <> a <> "\n" <> p <> "$2")
- ,
- "\n" -> "\n" <> p
- }];
-
-(* Remove double occurences of list elements, based on a predicate function. *)
-WO`WeedOutList[{hd_, tl__}, pred_] :=
- If[pred[hd, {tl}], Prepend[WO`WeedOutList[{tl}, pred], hd], WO`WeedOutList[{tl}, pred]];
-WO`WeedOutList[{hd_}, pred_] := {hd};
-WO`WeedOutList[{}, _] := {};
-WO`WeedOutList[l_] := WO`WeedOutList[l, FreeQ[#2, #1]&];
-
-(* Render a FORTRAN double precision complex number. *)
-WO`FortranComplex[n_] := "(" <> ToString[Re[n]] <> "_double, " <> ToString[Im[n]] <> "_double)";
-
-(* Extends a string using spaces. *)
-WO`ExtendString[s_, n_] := If[StringLength[s] < n,
- s <> StringJoin @@ Table[" ", {i, 1, n - StringLength[s]}], s];
-
-(* Concatenate two strings smartly, inserting a linebreak if the resulting *
- * l line would exceed 80 characters, and optionally indenting the new line. *
- * Lines don't get broken if this would intruduce a blank line. *)
-WO`SmartAppend[source_, target_, n_, cont_] := Module[{spacer, lastline, firstline},
- If[n > 1, spacer = StringJoin @@ Table[" ", {i, 1, n}], spacer = ""];
- lastline = StringCases[target, RegularExpression["[^\n]*$"]][[1]];
- firstline = StringCases[source, RegularExpression["^[^\n]*"]][[1]];
- If[StringLength[lastline <> firstline] <= 80 || StringMatchQ[lastline, RegularExpression["^\\s*$"]],
- target <> source, target <> cont <> "\n" <> spacer <> source]
-];
-WO`SmartAppend[source_, target_, n_] := WO`SmartAppend[source, target, n, ""];
-WO`SmartAppend[source_, target_] := WO`SmartAppend[source, target, 0];
-
-
-(* Indent the lines of a text by n blanks *)
-WO`Indent[s_, n_] := Module[{spacer},
- spacer = StringJoin @@ Table[" ", {i, 1, n}];
- StringReplace[s, {RegularExpression["(?m)^(.+)$"] :> spacer <> "$1",
- RegularExpression["\n(.+)"] :> ("\n" <> spacer <> "$1")}]
-] /; n > 1;
-
-(* Uppercase the first letter *)
-WO`FirstUpper[s_] := StringReplace[s, RegularExpression["^(.)"] :> ToUpperCase["$1"]];
-
-(* Lowercase the first letter *)
-WO`FirstLower[s_] := StringReplace[s, RegularExpression["^(.)"] :> ToLowerCase["$1"]];
-
-(* Smart concatenation of a string list to a target introducing spacers *)
-WO`SmartConcatRev[List[hd_, tl__], spacer_, i_, cont_] := WO`SmartAppend[spacer <> hd,
- WO`SmartConcatRev[List[tl], spacer, i, cont], i, cont];
-WO`SmartConcatRev[List[hd_], spacer_, i_, cont_] := hd;
-WO`SmartConcatRev[l_, s_, i_] := WO`SmartConcatRev[l, s, i, ""];
-WO`SmartConcatRev[l_, s_] := WO`SmartConcatRev[l, s, 0];
-WO`SmartConcat[l_,o___] := WO`SmartConcatRev[Reverse[l], o];
-WO`SmartConcat[{}, ___] := "";
-
-(* Not so smart concatenation, not taking care of breaking lines *)
-WO`Concat[List[hd_, tl__], spacer_] := hd <> spacer <> WO`Concat[{tl}, spacer];
-WO`Concat[{hd_}, _] := hd;
-WO`Concat[{}, _] := "";
-
-(* Transform a expression into sindarin via a piece of cheatery using FORTRAN form and
- regular expressions. *)
-WO`SindarinForm[e_] := Module[{},
- If[Not[FreeQ[e, Re] && FreeQ[e, Im] && FreeQ[e, Complex]],
- Print[""
- <> "WARNING: complex calculus is not yet implemented in sindarin. Continuing operation, "
- <> "but the output is most likely dysfunctional."
- ]];
- WO`StringReplaceAll[ToString[FortranForm[e /.
- { Power[E, x_] :> WO`exp[x], Sec[x_] :> 1/WO`cos[x], Csc[x_] :> 1/WO`sin[x],
- Sech[x_] :> 1/WO`cosh[x], Csch[x_] :> 1/WO`sinh[x] }
- ]], WO`f2sin]
-];
-
-(* Split a sindarin expression into multiple lines. *)
-WO`SindarinSplit[s_] := WO`FortranSplit[s, 80, 3];
-WO`SindarinSplit[str_, min_, ni_] := Module[{spacer, helper},
- spacer = StringJoin @@ Table[" ", {i, 1, ni}];
-
- helper[s_, l_, {}] := s;
- helper[s_, l_, {head_, tail___}] := If[
- (l + StringLength[head] <= min) || s == "",
- helper[s <> head, l + StringLength[head], {tail}]
- ,
- helper[s <> " \n" <> spacer <> head, 0, {tail}]
- ];
-
- helper["", 0, StringSplit[str, RegularExpression["([^\\w\\.]+)"] :> "$1"]]
-];
-
-(* Check if a version stamp exists; if it does, read it and check if matches. *)
-WO`VersionCheck[dir_] := Module[{handle, v},
- If[Length[FileNames[{"WhizardVersion"}, dir]] != 1,
- handle = OpenWrite[ToFileName[dir, "WhizardVersion"]];
- WriteString[handle, WO`whizv];
- Close[handle];
- ,
- handle = OpenRead[ToFileName[dir, "WhizardVersion"]];
- v = StringReplace[Read[handle, String], RegularExpression["\\s+"] -> ""];
- Close[handle];
- If[v != WO`whizv,
- Throw["ERROR: output directory already contains files generated for a differen WHIZARD / O'Mega version",
- WO`EAbort]
- ];
- ];
-];
-
-(* Copy the auxiliary files. *)
-WO`CopyAux[srcdir_, destdir_] := Module[{CopyHelper},
- If[WO`whizv19x[],
- CopyHelper[stem_] := Module[{srcfiles, filenames, destfiles},
- srcfiles = Select[FileNames[{"*"}, ToFileName[{srcdir, stem}]],
- Not[StringMatchQ[#, "*.svn*"]]&];
- filenames =
- StringReplace[#, RegularExpression[
- "^.*" <> WO`fileSlashRE <> "([^" <> WO`fileSlashRE <> "]+)$"] :> "$1"]& /@ srcfiles;
- destfiles = Select[FileNames[{"*"}, destdir], (!FreeQ[filenames,
- StringReplace[#, RegularExpression[
- "^.*" <> WO`fileSlashRE <> "([^" <> WO`fileSlashRE <> "]+)$"] :> "$1"]])&];
- Catch[
- If[(Print["Deleting " <> # <> " ..."]; DeleteFile[#]) === $Failed,
- Throw[Null, WO`EFileSystem]]& /@ destfiles;
- If[(Print["Copying " <> # <> " ..."];
- CopyFile[ToFileName[{srcdir, stem}, #], ToFileName[destdir, #]]) === $Failed,
- Throw[Null, WO`EFileSystem]]& /@ filenames;
- , WO`EFileSystem,
- Throw["ERROR copying auxiliary files...", WO`EAbort]&
- ];
- ];
- CopyHelper /@ {"all_19x", WO`whizv};
- ];
- If[WO`whizv2x[],
- CopyHelper[{filea_, fileb_}] := Module[{src, dest, sdir, sfile, ddir, dfile},
- src = ToFileName[{srcdir, "2.0"}, filea];
- dest = ToFileName[destdir, fileb];
- StringReplace[src, RegularExpression[
- "^(.*" <> WO`fileSlashRE <> ")([^" <> WO`fileSlashRE <> "]+)$"] :>
- (sdir = "$1"; sfile = "$2"; "")];
- StringReplace[dest, RegularExpression[
- "^(.*" <> WO`fileSlashRE <> ")([^" <> WO`fileSlashRE <> "]+)$"] :>
- (ddir = "$1"; dfile = "$2"; "")];
- Catch[
- If[Length[FileNames[{dfile}, ddir]] != 0,
- If[(Print["Deleting " <> dest <> " ..."]; DeleteFile[dest]) === $Failed,
- Throw[Null, WO`EFileSystem]]
- ];
- If[(Print["Copying " <> sfile <> " ..."]; CopyFile[src, dest]) === $Failed,
- Throw[Null, WO`EFileSystem]];
- ,
- WO`EFileSystem, Throw["ERROR copying auxiliary files...", WO`EAbort]&
- ];
- ];
- CopyHelper /@ {
- {"configure.ac", "configure.ac"},
- {"configure", "configure"},
- {"install-sh", "install-sh"},
- {"Makefile.in", "Makefile.in"},
- {"Makefile.omega.in", ToFileName["omega", "Makefile.in"]},
- {"Makefile.whizard.in", ToFileName["whizard", "Makefile.in"]},
- {"INSTALL", "INSTALL"}
- };
- ];
-];
-
-(* Write the O'Mega model files *)
-WO`WriteOmega[dir_] := Module[{prefix, drvname, cdrvname},
- prefix = ToFileName[dir, WO`omeganame];
- If [WO`whizv2x[],
- Print["Writing O'Mega module signature to " <> prefix <> "_mdl.mli ..."];
- WO`WriteOmegaSig[prefix <> "_mdl.mli"];
- Print["Writing O'Mega module to " <> prefix <> "_mdl.ml ..."];
- WO`WriteOmegaStruct[prefix <> "_mdl.ml"];
- drvname = ToFileName[dir, "omega_" <> WO`omeganame <> ".ml"];
- Print["Writing O'Mega binary driver to " <> drvname <> " ..."];
- WO`WriteOmegaBinary[drvname, "", WO`ncfmax];
- ,
- Print["Writing O'Mega module signature to " <> prefix <> ".mli ..."];
- WO`WriteOmegaSig[prefix <> ".mli"];
- Print["Writing O'Mega module to " <> prefix <> ".ml ..."];
- WO`WriteOmegaStruct[prefix <> ".ml"];
- drvname = ToFileName[dir, "f90_" <> WO`omeganame <> ".ml"];
- cdrvname = ToFileName[dir, "f90_" <> WO`omeganame <> "_Col.ml"];
- Print["Writing O'Mega binary drivers to " <> drvname <> " and " <> cdrvname <> " ..."];
- WO`WriteOmegaBinary[drvname, cdrvname, WO`ncfmax];
- ];
-];
-
-(* Write the oplotter part. *)
-WO`WriteOpl[dir_] := Module[{gluefile, prefix},
- gluefile = ToFileName[dir, "opl_" <> WO`oplname <> ".f90"];
- Print["Writing oplotter FORTRAN glue to " <> gluefile " ..."];
- WO`WriteOplGlue[WO`opldir <> gluefile];
- prefix = ToFileName[dir, WO`oplname <> ".f90"];
- Print["Writing oplotter model definitions to " <> prefix <> ".mdl and " <> prefix <> ".grb ..."];
- WO`WriteOplMdl[prefix <> ".mdl", prefix <> ".grb"];
-];
-
-(* Write the WHIZARD part. *)
-WO`WriteWhiz[dir_] := Module[{whizmdl, whizglue},
- whizmdl = ToFileName[dir, WO`whizname <> ".mdl"];
- Print["Writing WHIZARD model file to " <> whizmdl <> " ..."];
- WO`WriteWhizMdl[whizmdl];
- whizglue = ToFileName[dir, "parameters." <> WO`whizname <> If[WO`whizv19x[], ".omega", ""]];
- Print["Writing WHIZARD FORTRAN glue..."];
- WO`WriteWhizGlue[whizglue];
-];
-
-(* Write the O'Mega model signature *)
-WO`WriteOmegaSig[file_] := Module[{handle, contents},
- handle = OpenWrite[file];
- contents = ""
- <> WO`CommentMaker[WO`fileheader, "(* ", " ", " *)"] <> "\n"
- <> "\n"
- <> "type gauge = Unitarity | Feynman | Rxi\n"
- <> "\n"
- <> "module type Frules_options = \n"
- <> "sig\n"
- <> " val gauge: gauge\n"
- <> " val color: bool\n"
- <> "end\n"
- <> "\n"
- <> "module Implementation: functor (Opts: Frules_options) -> Model.T\n"
- <> If[WO`whizvn[] >= WO`whizvn["2.0.3"], " with module Ch = Charges.Null\n", ""];
- WriteString[handle, contents];
- Close[handle];
-];
-
-(* During the initial particle list parsing, a number of hashes is filled for later use. These are: *
- * "constr" O'Mega constructor / "lrep" lorentz representation / "oname" O'Mega name / *
- * "colrep" SU(3) representation / "pdg" pdg number / "mass" mass / "revpdg" pdg -> tag, *
- * "whizname" WHIZARD name, "conj" conjugation, "cpl" coupling <-> symbol *
- * "oids" omega identifier register, "goldstone" goldstone flag, "HC": WO`HC helper *)
-
-(* Write the O'Mega module structure *)
-WO`WriteOmegaStruct[file_] := Module[{handle, contents, preamble, flavor, color, pdg, lorentz,
- gauge, propagator, width, conjugate, fermion, colsymm, constant, maxdegree, vertices, fusions,
- flavors, extflavor, goldstone, parameters, flavortostring, flavorofstring, flavorsym, gaugesym,
- masssym, widthsym, texsym, constsym, options, rcs, ParsePList, sanscolorstubs, charges},
-
- (* Parse the Particle List *)
- ParsePList[] := Module[{classtypes, ltypes, ftype, trampolines, mlists, clists, ltdict,
- taglists, pdglists, cconjugators, lconjugators, creplists, lreplists, fsymlists,
- nonecolored, gslists, msymlists, wsymlists, tsymlists, ParsePart, ParseClass, OmegaConstructor,
- LTHelper, gsmasses},
-
- (* Remap PDGs which have been assigne multiple times. But remapping these induces other issues, so *
- * we just warn the user. *)
- FixPDG[pdg_, tag_] := Module[{mtag},
- If[FreeQ[mtag = WO`hash["revpdg", pdg], WO`hash],
- Print[""
- <> "WARNING: PDG " <> ToString[pdg] <> " has been assigned both to \""
- <> ToString[tag] <> "\" and \"" <> ToString[mtag] <> "\". This will NOT work with "
- <> "WHIZARD, you'll have to fix your model before plugging it into WHIZARD. "
- <> "O'Mega will and oplotter might work though..."];
- ];
- ];
-
- ltdict[x_] := Switch[x, 1, "scalar", 2, "fermion", 3, "vector", 4, "tensor",
- "S", 1, "F", 2, "V", 3, "T", 4];
- classtypes = "";
- ltypes = {"", "", "", ""};
- trampolines = "";
- mlists = "";
- clists = {"", "", "", ""};
- cconjugators = "";
- lconjugators = {"", "", "", ""};
- nonecolored = {True, True, True, True};
- (* These nested lists warrant some explanation: each sublist is a list of pattern *
- * matching associations, each of the type "A -> B", with B possible extending over *
- * multiple lines. They get glued together to form the query functions required by *
- * O'Mega. *)
- taglists = pdglists = creplists = lreplists = gslists = msymlists = wsymlists = fsymlists = tsymlists =
- {{}, {}, {}, {}};
- gsmasses = {};
-
- (* Generates a mass identifier for a goldstone boson and adds it to the gsmasses. *)
- RegisterGoldstone[name_, gboson_, pdg_] := Module[{msym},
- msym = "m" <> StringReplace[ToString[name], RegularExpression["[^a-zA-Z\\d]"] -> ""];
- msym = WO`RegisterMass[msym, Null, pdg];
- AppendTo[gsmasses, {name, msym, gboson}];
- Return[msym];
- ];
-
- (* Generate the actual expression for a goldstone boson mass. To be mapped on gsmasses. *)
- ProcessGoldstone[{name_, msym_, gboson_}] :=
- WO`RegisterIParam[msym,
- If[WO`gauge === WO`WORxi,Sqrt[WO`gsym] * WO`hash["mass", gboson], WO`hash["mass", gboson]],
- ToString[name] <> " mass (autogenerated by the interface)", False];
-
- (* Create a valid constructor. *)
- OmegaConstructor[s_] := Module[{i, c},
- c = WO`FirstUpper[WO`SanitizeString[s]];
- i = 1;
- If[WO`hash["oids", ToLowerCase[c]] === True,
- While[WO`hash["oids", ToLowerCase[c] <> "_" <> ToString[i]] === True, i++];
- c = c <> "_" <> ToString[i];
- ];
- WO`hash["oids", ToLowerCase[c]] = True;
- c
- ];
-
- (* Parse class description *)
- ParseClass[{cdesc_, plist_}] := Module[{cname, LTHelper, classtype, mlist, cconjugator, taglist, pdglist,
- creplist, lreplist, allcharged, majoranas, spinors, cspinors, vectors, hvectors, tensors, htensors, allcolored,
- fsu3s, afsu3s, asu3s, gslist, msymlist, wsymlist, tsymlist, allmassive, allnzw, allgoldstones, fsymlist},
- classtype = "";
- mlist = "";
- cconjugator = "";
- allcharged = allcolored = allgoldstones = allmassive = allnzw = True;
- majoranas = spinors = cspinors = vectors = hvectors = tensors = htensors = {};
- fsu3s = afsu3s = asu3s = {};
- (* See above; lists of mattern matching associations that get glued together with *
- * the class constructors to form new pattern matching associations *)
- taglist = pdglist = creplist = lreplist = gslist = msymlist = wsymlist = fsymlist = tsymlist = {};
-
- (* Parse particle description *)
- ParsePart[{name_, aname_, spin_, prop_, msym_, wsym_, crep_, plabel_, pdg_, descr_, tex_, atex_, gs_}] :=
- Module[{sname, saname, RegisterParticle},
-
- (* Register a particle *)
- RegisterParticle[pname_, ptag_, ppdg_, anti_, sconj_] := Module[{realmsym},
- (* This can be dynamically changed, so initialize it here *)
- realmsym = msym;
- (* Add particle to global list. *)
- AppendTo[WO`taglist, ptag];
- (* Append constructor for particle to class type *)
- classtype = WO`SmartAppend[" | " <> WO`FirstUpper[pname], classtype];
- (* Append constructor to class member list *)
- mlist = WO`SmartAppend[" " <> WO`FirstUpper[pname] <> ";", mlist];
- (* add a hash from the particle tag to the full ocaml type *)
- WO`hash["constr", ptag] = "FR" <> ToString[spin] <> " (" <> WO`FirstUpper[cname] <> " " <> WO`FirstUpper[pname] <> ")";
- (* Add translation from flavor to tag *)
- AppendTo[taglist, WO`FirstUpper[pname] <> " -> \"" <> ptag <> "\""];
- (* The TeX symbol *)
- AppendTo[tsymlist, WO`FirstUpper[pname] <> " -> \"" <> StringReplace[If[anti, atex, tex], "\\" -> "\\\\"] <> "\""];
- (* PDG number *)
- FixPDG[ppdg, ptag];
- AppendTo[pdglist, WO`FirstUpper[pname] <> " -> " <> ToString[ppdg]];
- WO`hash["pdg", ptag] = ppdg;
- WO`hash["revpdg", ppdg] = ptag;
- (* Color representation *)
- Switch[crep,
- S, (allcolored = False; WO`hash["colrep", ptag] = "S"),
- T, If[anti, AppendTo[afsu3s, WO`FirstUpper[pname]]; WO`hash["colrep", ptag] = "f",
- AppendTo[fsu3s , WO`FirstUpper[pname]]; WO`hash["colrep", ptag] = "F"],
- O, AppendTo[asu3s, WO`FirstUpper[pname]]; WO`hash["colrep", ptag] = "O";
- ];
- (* If a lorentz type contains no colored particles, the pattern matching may be *
- * shortened *)
- nonecolored[[ltdict[ToString[spin]]]] = nonecolored[[ltdict[ToString[spin]]]] && (crep == S);
- (* Lorentz representation *)
- Switch[spin,
- V, Switch[msym,
- ZERO, AppendTo[vectors, WO`FirstUpper[pname]],
- _, AppendTo[hvectors, WO`FirstUpper[pname]]],
- T, Switch[msym,
- ZERO, AppendTo[tensors, WO`FirstUpper[pname]],
- _, AppendTo[htensors, WO`FirstUpper[pname]]],
- F, Switch[{sconj, anti},
- {True, _}, (AppendTo[majoranas, WO`FirstUpper[pname]]; WO`havemajoranas=True),
- {False, False}, AppendTo[spinors, WO`FirstUpper[pname]],
- {False, True}, AppendTo[cspinors, WO`FirstUpper[pname]]]
- ];
- (* Goldstone boson? As we most likely don't know the gauge boson constructor at ths point, *
- * we have to treat this special, sigh, again. If we are using Feynman or Rxi gauge and are*
- * expected to assign the goldstone masses automatically, we must invoke the handler. *)
- If[spin == S && ToString[gs] != "NoGS",
- AppendTo[gslist, {WO`FirstUpper[pname] <> " -> Some ", ToString[PartName[If[anti, WO`HC[gs], gs]]]}];
- If[WO`autogauge && Not[FreeQ[{WO`WOFeynman, WO`WORxi}, WO`gauge]],
- realmsym = RegisterGoldstone[ptag, ToString[PartName[If[anti, WO`HC[gs], gs]]], ppdg]
- ];
- WO`hash["goldstone", ToString[ptag]] = True;
- ,
- allgoldstones = False;
- WO`hash["goldstone", ToString[ptag]] = False;
- ];
- (* Mass *)
- Switch[realmsym,
- ZERO, allmassive = False,
- _?NumericQ, AppendTo[msymlist, WO`FirstUpper[pname] <> " -> " <> "\""
- <> ToString[realmsym] <> "\""],
- _, AppendTo[msymlist, WO`FirstUpper[pname] <> " -> \"" <> ToLowerCase[ToString[realmsym]] <> "\""]
- ];
- WO`hash["mass", ptag] = realmsym;
- (* Width *)
- Switch[wsym,
- ZERO, allnzw = False,
- _?NumericQ, AppendTo[wsymlist, WO`FirstUpper[pname] <> " -> " <> "\""
- <> ToString[wsym] <> "\""],
- _, AppendTo[wsymlist, WO`FirstUpper[pname] <> " -> \"" <> ToLowerCase[ToString[wsym]] <> "\""]
- ];
- (* Add a Lorentz type code to the hash *)
- WO`hash["lrep", ptag] = Switch[spin,
- S, "S", V, "V", T, "T",
- F, Switch[{sconj, anti}, {True, _}, "M", {False, False}, "F", _, "f"]
- ];
- (* Add a hash from the particle tag to the O'Mega name *)
- WO`hash["oname", ptag] = pname;
- (* Almost forgot this one: flavor symbol *)
- AppendTo[fsymlist, WO`FirstUpper[pname] <> " -> \"" <> ToLowerCase[pname] <> "\""];
- ];
-
- (* Construct sane names *)
- sname = OmegaConstructor[name];
- saname = OmegaConstructor[aname];
- WO`hash["conj", name] = aname;
- WO`hash["conj", aname] = name;
- RegisterParticle[sname, name, pdg, False, name == aname];
- allcharged = allcharged && (name != aname);
- If[name != aname,
- RegisterParticle[saname, aname, -pdg, True, False];
- cconjugator = WO`SmartAppend[" | " <> WO`FirstUpper[sname] <> " -> "
- <> WO`FirstUpper[saname], cconjugator];
- cconjugator = WO`SmartAppend[" | " <> WO`FirstUpper[saname] <> " -> "
- <> WO`FirstUpper[sname], cconjugator];
- ];
- ];
-
- (* A helper digesting the lorentz type *)
- LTHelper[idx_] := Module[{trampoline, MakePMatcher},
-
- (* Step up one level in a pattern matcher. Take care to treat a several patterns *
- * matching to one value as multiple matching pairs (use match x with) *)
- MakePMatcher[Hold[lists_], list_] := Module[{text},
- Switch[Length[list] + If[And @@ (StringFreeQ[#, "|"]& /@ Append[list, "a"]), 0, 1] ,
- 0, Null,
- 1, (
- text = list[[1]];
- AppendTo[lists[[idx]], WO`FirstUpper[cname] <> " " <> text];),
- _Integer, (
- text = " | " <> WO`SmartConcat[list, " | "];
- AppendTo[lists[[idx]], WO`FirstUpper[cname] <> " x -> (match x with \n"
- <> WO`Indent[text, 2] <> ")"] ;)
- ];
- ];
-
- (* Add the class constructor to the lorentz type *)
- ltypes[[idx]] = WO`SmartAppend[" | " <> WO`FirstUpper[cname] <> " of " <> WO`FirstLower[cname], ltypes[[idx]]];
- (* Add the trampoline to class -> lorentz type *)
- trampoline = WO`FirstLower[ltdict[idx]] <> "_of_" <> WO`FirstLower[cname];
- trampolines = trampolines <> "let " <> trampoline <> " c = " <> WO`FirstUpper[cname] <> " c\n";
- (* Add the class members to the lorentz level particle list*)
- clists[[idx]] = WO`SmartAppend[" @ (List.map " <> trampoline <> " " <> WO`FirstLower[cname] <> "_members)", clists[[idx]]];
- (* Add the class conjugator to the lorentz conjugator *)
- lconjugators[[idx]] = lconjugators[[idx]] <> "| " <> WO`FirstUpper[cname] <> " x -> " <> WO`FirstUpper[cname]
- <> " (conjugate_" <> WO`FirstLower[cname] <> " x)\n";
- (* Construct class level of the flavor -> tag translation *)
- MakePMatcher[Hold[taglists], taglist];
- (* Dito, TeX symbol *)
- MakePMatcher[Hold[tsymlists], tsymlist];
- (* Dito, PDG *)
- MakePMatcher[Hold[pdglists], pdglist];
- (* Color Representation *)
- If[Not[allcolored], AppendTo[creplist, "_ -> Color.Singlet"]];
- MakePMatcher[Hold[creplists], creplist];
- (* Lorentz Representation *)
- MakePMatcher[Hold[lreplists], lreplist];
- (* Goldstone Bosons *)
- (* TODO: defunct atm *)
- (*
- gslist = (#[[1]] <> "(" <> WO`hash["constr", #[[2]]] <> ", Const 1)")& /@ gslist;
- If[idx == 1 && Not[allgoldstones], AppendTo[gslist, "_ -> None"]];
- MakePMatcher[Hold[gslists], gslist];
- *)
- (* Mass *)
- If[Not[allmassive], AppendTo[msymlist, "_ -> \"fr_zero\""]];
- MakePMatcher[Hold[msymlists], msymlist];
- (* Width *)
- If[Not[allnzw], AppendTo[wsymlist, "_ -> \"fr_zero\""]];
- MakePMatcher[Hold[wsymlists], wsymlist];
- (* Flavor *)
- MakePMatcher[Hold[fsymlists], fsymlist];
- ];
-
- (* Construct the class name... *)
- cname = StringReplace[ToString[cdesc[[1]]], {"[" -> "", "]" -> ""}] <> "_" <> OmegaConstructor[ToString[cdesc[[2]]]];
- (* Don't want no ghosts *)
- If[StringMatchQ[cname, RegularExpression["^[SFVT].*"]],
- (* ... loop over members ... *)
- ParsePart /@ plist;
- (* Put to gether the lorentz rep patterns *)
- (If[Length[#[[1]]] != 0, AppendTo[lreplist, WO`SmartConcat[#1[[1]], " | "] <> " -> " <> #[[2]]]])&
- /@ {{majoranas, "Majorana"}, {spinors, "Spinor"}, {cspinors, "ConjSpinor"},
- {vectors, "Vector"}, {hvectors, "Massive_Vector"}, {tensors, "Tensor_1"}, {htensors, "Tensor_2"}};
- (* Dito, color rep patterns *)
- (If[Length[#[[1]]] != 0, AppendTo[creplist, WO`SmartConcat[#1[[1]], " | "] <> " -> " <> #[[2]]]])&
- /@ {{fsu3s, "Color.SUN 3"}, {afsu3s, "Color.SUN (-3)"}, {asu3s, "Color.AdjSUN 3"}};
- (* ...Add a constructor for the class to the proper lorentz type... *)
- LTHelper[ltdict[StringTake[cname, {1}]]];
- (* Create the class member list ...*)
- mlists = mlists <> "let " <> WO`FirstLower[cname] <> "_members =\n" <>
- WO`Indent[StringReplace[mlist, RegularExpression["^ "] -> "["] <> "]", 3] <> "\n";
- (* Create new class type... *)
- classtypes = classtypes <> "type " <> WO`FirstLower[cname] <> " =\n" <> WO`Indent[classtype, 2] <> "\n";
- (* Add the class conjugator *)
- cconjugators = cconjugators <> "let conjugate_" <> WO`FirstLower[cname] <> " = function \n";
- If [cconjugator != "", cconjugators = cconjugators <> WO`Indent[cconjugator, 2] <> "\n"];
- If [Not[allcharged], cconjugators = cconjugators <> " | x -> x\n";];
- ,
- (* Ghosts still get hashed w.r.t. their lorentz rep. *)
- (WO`hash["lrep", #[[1]]] = WO`hash["lrep", #[[2]]] = "U")& /@ plist;
- ];
- ];
-
- (* A helper for digesting a lorentz type *)
- LTHelper[idx_] := Module[{constructor},
-
- (* Step up one level in a pattern matcher *)
- MakePMatcher[Hold[matcher_], list_] := Module[{text},
- Switch[Length[list],
- 0, Null,
- 1, (
- text = list[[1]];
- matcher = matcher <> WO`Indent["| " <> constructor <> " " <> text <> "\n", 3];),
- _Integer, (
- text = "| " <> WO`SmartConcat[list, "\n| "];
- matcher = matcher <> WO`Indent[""
- <> "| " <> constructor <> " x -> (match x with \n"
- <> WO`Indent[text, 3] <> ")\n" ,3];)
- ];
- ];
-
- If [ltypes[[idx]] != "",
- (* Construct the lorentz constructor *)
- constructor = "FR" <> ToUpperCase[StringTake[ltdict[idx], {1}]];
- (* Assemble the lorentz type definition *)
- ltypes[[idx]] = "type " <> WO`FirstLower[ltdict[idx]] <> " =\n" <> WO`Indent[ltypes[[idx]], 2] <> "\n";
- (* Append the constructor to the flavor type *)
- ftype = WO`SmartAppend[" | " <> constructor <> " of " <> WO`FirstLower[ltdict[idx]], ftype, 2];
- (* Add a trampoline lorentz -> flavor *)
- trampolines = trampolines <> "let flavor_of_" <> WO`FirstLower[ltdict[idx]]
- <> " lt = " <> constructor <> " lt\n";
- (* Assemble the particle list *)
- clists[[idx]] = "let all_" <> WO`FirstLower[ltdict[idx]] <> "s = []\n" <> WO`Indent[clists[[idx]], 2] <> "\n";
- (* Add the all particles of this lorentz rep to the flavor list *)
- flavors = WO`SmartAppend[" @ (List.map flavor_of_" <> WO`FirstLower[ltdict[idx]]
- <> " all_" <> WO`FirstLower[ltdict[idx]] <> "s)", flavors, 2];
- (* Assemble the conjugation operation for the lorentz type *)
- lconjugators[[idx]] = "let conjugate_" <> WO`FirstLower[ltdict[idx]] <> " = function \n"
- <> WO`Indent[lconjugators[[idx]], 3];
- (* Add to the conjugation function *)
- conjugate = conjugate <> " | " <> constructor
- <> " x -> " <> constructor <> " (conjugate_"
- <> WO`FirstLower[ltdict[idx]] <> " x)\n";
- (* Construct lorentz level of the flavor -> tag translation *)
- MakePMatcher[Hold[flavortostring], taglists[[idx]]];
- (* Dito, TeX symbol *)
- MakePMatcher[Hold[texsym], tsymlists[[idx]]];
- (* Dito, PDG *)
- MakePMatcher[Hold[pdg], pdglists[[idx]]];
- (* Color Rep *)
- If[nonecolored[[idx]], creplists[[idx]] = {"_ -> Color.Singlet"}];
- MakePMatcher[Hold[color], creplists[[idx]]];
- (* Lorentz Rep *)
- MakePMatcher[Hold[lorentz], lreplists[[idx]]];
- (* Goldstone mapper *)
- (* TODO: defunct atm *)
- (*
- MakePMatcher[Hold[goldstone], gslists[[idx]]];
- *)
- (* Mass *)
- MakePMatcher[Hold[masssym], msymlists[[idx]]];
- (* Width *)
- MakePMatcher[Hold[widthsym], wsymlists[[idx]]];
- (* Flavor *)
- MakePMatcher[Hold[flavorsym], fsymlists[[idx]]];
- ];
- ];
-
- (* We need this hack if the default WO`HC implementation is active. *)
- ((WO`hash["HC", ToString[#[[1]]]] = #[[2]]; WO`hash["HC", ToString[#[[2]]]] = #[[1]])&
- /@ #[[2]])& /@ WO`PartList;
- ParseClass /@ WO`PartList;
- ProcessGoldstone /@ gsmasses;
- ftype = "type flavor =\n ";
- flavors = "let flavors () = []\n ";
- flavortostring = "let flavor_to_string = function\n";
- pdg = "let pdg = function\n";
- conjugate = "let conjugate = function\n";
- color = "let color = function\n";
- lorentz = "let lorentz = function\n";
- goldstone = "let goldstone = function\n";
- masssym = "let mass_symbol = function\n";
- widthsym = "let width_symbol = function\n";
- flavorsym = "let flavor_symbol = function\n";
- texsym = "let flavor_to_TeX = function\n";
- LTHelper /@ {1, 2, 3, 4};
- goldstone = goldstone <> " | _ -> None\n";
- If[ltypes[[1]] != "", lorentz = lorentz <> " | FRS _ -> Scalar\n"];
- flavors = flavors <> "\n";
- ftype = ftype <> "\n";
- flavor = ""
- <> "(* Classes with their members *)\n\n"
- <> classtypes
- <> "\n(* Lorentz types with the corresponding classes *)\n\n"
- <> (StringJoin /@ ltypes)
- <> "\n(* The actual flavor type *)\n\n"
- <> ftype
- <> "\n(* Trampoline functions *)\n\n"
- <> trampolines
- <> "\n(* Particle lists *)\n\n"
- <> mlists <> (StringJoin /@ clists);
- conjugate = ""
- <> "(* The conjugation operation on a single class *)\n\n"
- <> cconjugators
- <> "\n(* The conjugation operation on a lorentz type *)\n\n"
- <> StringJoin @@ lconjugators
- <> "\n(* Conjugation for the masses *)\n\n"
- <> conjugate;
- propagator = ""
- <> "let propagator = \n"
- <> " let msg = \"" <> WO`omeganame <> ".Implementation: invalid lorentz rep in propagator\" in function\n"
- <> If[ltypes[[1]] != "", " | FRS _ -> Prop_Scalar\n", ""]
- <> If[ltypes[[2]] != "", ""
- <>" | FRF x -> (match lorentz (FRF x) with\n"
- <> " | Spinor -> Prop_Spinor\n"
- <> " | ConjSpinor -> Prop_ConjSpinor\n"
- <> " | Majorana -> Prop_Majorana\n"
- <> " | _ -> invalid_arg msg)\n",
- ""]
- <> If[ltypes[[3]] != "", ""
- <>" | FRV x -> (match Opts.gauge with\n"
- <> " | Unitarity -> (match lorentz (FRV x) with\n"
- <> " | Vector -> Prop_Feynman\n"
- <> " | Massive_Vector -> Prop_Unitarity\n"
- <> " | _ -> invalid_arg msg)\n"
- <> " | Feynman -> (match lorentz (FRV x) with\n"
- <> " | Vector -> Prop_Feynman\n"
- <> " | Massive_Vector -> Prop_Rxi Xi\n"
- <> " | _ -> invalid_arg msg)\n"
- <> " | Rxi -> (match lorentz (FRV x) with\n"
- <> " | Vector -> Prop_Gauge Xi\n"
- <> " | Massive_Vector -> Prop_Rxi Xi\n"
- <> " | _ -> invalid_arg msg))\n",
- ""]
- <> If[ltypes[[4]] != ""," | FRT _ -> Prop_Tensor_2\n", ""];
- ];
-
- (* Digest the vertices *)
- DigestVertices[] := Module[{vlist, sort, tagger, v3deflist={}, v4deflist={}, vndeflist={},
- v3deflist$c={}, v4deflist$c={}, cplhash, cplrevhash, DigestVertex, RegisterCoupling,
- vndeflist$c={}, ID, VlistMaker, VlistSmartMaker, StripColor, nproc=0, nskipped=0, nghost=0},
-
- (* Register a coupling constant and return the caml constructor *)
- RegisterCoupling[plist_, cpl_] := Module[{cname, suffix=1, mycpl},
- (* Sanity check *)
- If[Not[FreeQ[cpl, Index]],
- Throw["WARNING: a coupling still has a index structure, something is badly wrong...", WO`ESkip]];
- (* If applicable, apply any vertex rules *)
- mycpl = If[Head[WO`VertexRules] === List, cpl /. WO`VertexRules, cpl];
- (* Have we already encountered this coupling? *)
- If[MatchQ[WO`hash["cpl", mycpl], _String],
- (* -> Do nothing, return the constructor *)
- WO`hash["cpl", mycpl]
- ,
- (* otherwise, suggest a constructor... *)
- cname = "G_" <> ToLowerCase[WO`Concat[WO`hash["oname", PartName[#[[1]] ]]& /@ plist, "_"]];
- (* ...and refine it if necessary with an index *)
- If[cplrevhash[cname] === True,
- While[cplrevhash[cname <> "_" <> ToString[suffix]] === True, suffix++];
- cname = cname <> "_" <> ToString[suffix];
- ];
- (* Append to coupling list, register in hashes *)
- AppendTo[WO`cpldeflist, {cname, mycpl}];
- cplrevhash[cname] = True;
- (* If the coupling contains aS or G, it will be evolved *)
- If[WO`whizv2x[] && (Or @@ (Not[FreeQ[mycpl, #]]& /@ WO`RunParameters)),
- AppendTo[WO`runningcouplings, Length[WO`cpldeflist]]];
- WO`hash["cpl", mycpl] = cname
- ]
- ];
-
- (* This function strips the color structure from a colored vertex. It works by calculating *
- * all color flows and then throwing away all but one flow ("keyflow"). *
- * Tricky and propably still wrong in some cases :) *)
- StripColor[cpl_, plist_] := Module[{expc, MakeReallyLong, CalcCflow, Cflow,
- FlowArrow, GetFlowList, taglist, tag, k, ConnectedQ, flowlist, keyflow},
- SetAttributes[Cflow, Orderless];
-
- (* Replace structure constants and apply completeness relation *)
- MakeReallyLong[xpr_] := Module[{fundi=0, adji=0, expterm, tmp1, tmp2, tmp3, i=0, GetCRep},
- (* Get the color representation of a particle. *)
- GetCRep[i_] := Module[{part},
- part = Flatten[Select[plist, (#[[2]] == i)&]][[1]];
- WO`hash["colrep",PartName[part]]
- ];
-
- (* Start by expanding the expression *)
- expterm = Expand[xpr];
- (* Determine the highest internal fundamental and adjoint indices. *)
- expterm /. {Index[Gluon, _, i_] :> (adji = Max[adji, i]),
- Index[Colour, _, i_] :> (fundi = Max[fundi, i])};
- fundi++; adji++;
- (* Expand TensDots. *)
- expterm = expterm //. {
- TensDot[T[a_], o__][i_, j_] :>
- T[a, i, tmp1 = Index[Colour, z, fundi++]] * TensDot[o][tmp1, j],
- TensDot[T[a_]][i_, j_] :> T[a, i, j]
- };
- (* Expand the structure constants to traces over the generators. *
- * TODO: Find out whether the execution order in mathematica is well defined *
- * in this case. *)
- expterm = Expand[expterm /. {f[a_, b_, c_] :>
- -I * 2 * (T[a, Index[Colour, z, tmp1=fundi++], Index[Colour, z, tmp2=fundi++]] *
- T[b, Index[Colour, z, tmp2], Index[Colour, z, tmp3=fundi++]] *
- T[c, Index[Colour, z, tmp3], Index[Colour, z, tmp1]] -
- T[b, Index[Colour, z, tmp1=fundi++], Index[Colour, z, tmp2=fundi++]] *
- T[a, Index[Colour, z, tmp2], Index[Colour, z, tmp3=fundi++]] *
- T[c, Index[Colour, z, tmp3], Index[Colour, z, tmp1]])}];
- (* Replace IndexDeltas of gluons via normalization condition. *)
- expterm = expterm /. IndexDelta[Index[Gluon, a_], Index[Gluon, b_]] :>
- 2 * T[Index[Gluon, a], Index[Colour, z, tmp1 = fundi++], Index[Colour, z, tmp2 = fundi++]] *
- T[Index[Gluon, b], Index[Colour, z, tmp2], Index[Colour, z, tmp1]];
- (* Replace IndexDeltas with FlowArrows, restoring the correct direction. This is necessary *
- because IndexDelta is orderless. *)
- expterm = expterm /.
- IndexDelta[Index[Colour, Ext[i_]], Index[Colour, Ext[j_]]] :>
- If[GetCRep[i] === "f",
- FlowArrow[Index[Colour, Ext[i]], Index[Colour, Ext[j]]],
- FlowArrow[Index[Colour, Ext[j]], Index[Colour, Ext[i]]]
- ];
- (* Apply completeness relation to generators. TODO: this loop may be infinite in pathological cases. *)
- While[Not[FreeQ[expterm, Index[Gluon, _, _]]],
- expterm = Expand[expterm /.
- Times[p___, T[Index[Gluon, x1_, i_], a_, b_], T[Index[Gluon, x2_, j_], c_, d_]]/; (i===j && x1===x2)
- :> Times[p, 1/2, FlowArrow[a, d] * FlowArrow[c, b] -
- 1/3 * FlowArrow[a, b] * FlowArrow[c, d]]];
- If[i++ > WO`maxiter,
- Print[""
- <> "WARNING: I might be stuck in a loop in StripColor (BUG!), you might consider "
- <> "to abort the calculation...."];
- i = 0;
- ];
- ];
- expterm
- ];
-
- (* Extract the flow from a monomial *)
- CalcCflow[term_] := Module[{flow, Ic},
-
- flow = {};
- (* Converts an index into something simpler *)
- ConvertIndex[i_] := i/.{Index[_, Ext[j_]] :> j, Index[Colour, x_, j_] :> Ic[x, j]};
- (* Extract the colour flow pairs and append them to flow *)
- term /. {
- FlowArrow[a_, b_] :>
- (AppendTo[flow, {ConvertIndex[a], ConvertIndex[b]}]; Null),
- T[a_, b_, c_] :> (AppendTo[flow, {ConvertIndex[b], ConvertIndex[a]}];
- AppendTo[flow, {ConvertIndex[a], ConvertIndex[c]}];)};
- (* Contract indices until only the physical flow is left. Using an orderless symbol *
- * would be more elegant but puts mathematica (at least V5) into an endless loop... *
- * (at least for me). *)
- flow = flow
- //.
- {{p1___, {a_, Ic[t1_, x_]}, p2___, {Ic[t2_, y_], b_}, p3___}/;(x==y && t1===t2) :> {p1, {a, b}, p2, p3},
- {p1___, {Ic[t1_, x_], b_}, p2___, {a_, Ic[t2_, y_]}, p3___}/;(x==y && t1===t2) :> {p1, {a, b}, p2, p3}};
- If[Not[FreeQ[flow, Ic[___]] && FreeQ[flow, Index[Gluon, _, _]]],
- Throw["WARNING: Unable to calculate color flow for vertex, skipping this one...\n"
- <> " This is almost certainly a BUG...", WO`ESkip];
- ];
- Cflow @@ flow
- ];
-
- (* Extract the different flows and their coefficents. *)
- GetFlowList[expr_] := Module[{key},
- If[TrueQ[expr == 0],
- {}
- ,
- key = Null;
- expr /. Cflow[a___] :> (key = Cflow[a]);
- If[key === Null, Throw[Futile[
- "BUG: colored vertex contains terms without associated flow, skipping..."], WO`ESkip]];
- Append[GetFlowList[expr /. key -> 0], {key, (expr /. key -> 1) /. Cflow[___] -> 0 }]
- ]
- ];
-
- ConnectedQ[flow_] := Module[{s, ReplaceNCheck},
- ReplaceNCheck[x_, list_] := Module[{rules, nx, nlist},
- rules = Select[list, MatchQ[#, {x, _}]&];
- If[Length[rules] != 1, Return[False]];
- nx = rules[[1, 2]];
- nlist = Complement[list, rules];
- If[nx == s, Return[Length[nlist] == 0]];
- ReplaceNCheck[nx, nlist]
- ];
-
- s = flow[[1, 1]];
- ReplaceNCheck[s, List @@ flow]
- ];
-
- GetKeyflow[tag_, k1_, k2_, k3_, k4_] := Module[{flows, keyflow},
- flows = {
- {"fFS", {{k1, k2}}}, {"fFO", {{k1, k3}, {k3, k2}}}, {"OOS", {{k1, k2}, {k2, k1}}},
- {"OOO", {{k1, k3}, {k3, k2}, {k2, k1}}}, {"SSS", {}},
- {"fFSS", {{k1, k2}}}, {"fFOS", {{k1, k3}, {k3, k2}}}, {"fFOO", {{k1, k3}, {k3, k4}, {k4, k2}}},
- {"OOSS", {{k1, k2}, {k2, k1}}}, {"OOOS", {{k1, k3}, {k3, k2}, {k2, k1}}},
- {"OOOO", {{k1, k4}, {k4, k3}, {k3, k2}, {k2, k1}}}, {"SSSS", {}}};
- keyflow = Null;
- If[tag == #[[1]], keyflow = #[[2]]]& /@ flows;
- If[keyflow === Null, Throw[Futile[
- "BUG in GetKeyFlow --- please report. Skipping vertex..."], WO`ESkip]];
- Cflow @@ keyflow
- ];
-
- (* If the vertex is colorless, skip the lengthy algebra. *)
- If[FreeQ[cpl, Index[Gluon, ___]] && FreeQ[cpl, Index[Colour, ___]], Return[cpl]];
- (* Enforce color constraints, part I *)
- taglist = Sort[{WO`hash["colrep", PartName[#[[1]]]], PartName[#[[1]]], #[[2]]}& /@ plist,
- OrderedQ[{#1[[1]], #2[[1]]}]&];
- tag = StringJoin @@ (#[[1]]& /@ taglist);
- k = Append[#[[3]]& /@ taglist, Null];
- Switch[tag,
- "fff"|"FFF"|"fffS"|"FFFS"|"ffFF",
- Throw[Futile["WARNING: unsupported color structure, skipping this vertex..."], WO`ESkip],
- "fFOO", If[taglist[[3, 2]] != taglist[[4, 2]], Throw[Futile[
- "WARNING: Color: 3388 is only supported for identical octets, skipping this vertex..."],
- WO`ESkip]],
- "OOS"|"OOSS", If[WO`whizvn[] < WO`whizvn["1.96"], Throw[Futile[
- "WARNING: Color: 8811 and 881 are only supported for WHIZARD 1.96 and higher, skipping this vertex..."],
- WO`ESkip]],
- "OOO"|"OOOS", If[
- !(taglist[[1 ,2]] == taglist[[2, 2]] || taglist[[1, 2]] == taglist[[3, 2]]
- || taglist[[2, 2]] == taglist[[3, 2]]),
- Throw[Futile["Warning: Color: 888 and 8881 are only supported if at least two of the octets "
- <> "are identical; skipping this vertex..."], WO`ESkip]]
- ];
- (* Start by expanding and applying the completeness relation. *)
- expc = MakeReallyLong[cpl];
- (* Replace all coulour structures by the corresponding flows. *)
- expc = If[Head[expc] === Plus, ((CalcCflow[#] * #)& /@ expc), CalcCflow[expc] * expc] /.
- {T[Index[Gluon, ___], ___] -> 1, FlowArrow[Index[Gluon, ___], ___] -> 1,
- FlowArrow[Index[Colour, ___], ___] -> 1};
- (* Build the flow list *)
- flowlist = GetFlowList[expc];
- (* Enforce color constraints, part II --- revenge of the octets *)
- If[tag == "OOOO", If[!Catch[
- Module[{key, keys, perms, Permute, PermuteExt, fact1, facts, factsref},
- (* Apply the permutations that generate the different flows *)
- Permute[x_, {}] := x;
- Permute[x_, {{a_, b_}, more___}] := Permute[x /. {a -> b, b -> a}, {more}];
-
- PermuteExt[x_, {}] := x;
- PermuteExt[x_, {{a_, b_}, more___}] := PermuteExt[x /. {Ext[a] -> Ext[b], Ext[b] -> Ext[a]}, {more}];
-
- (* Check whether all flows are there and whether they are connected *)
- If[Length[flowlist] != 6, Throw[False]];
- If[! (And @@ (ConnectedQ[#[[1]]]& /@ flowlist)), Throw[False]];
- (* The permutations *)
- perms = {{}, {{3, 4}}, {{2, 3}}, {{2, 3}, {2, 4}}, {{2, 4}}, {{2, 4}, {2, 3}}};
- key = Cflow[{1, 2}, {2, 3}, {3, 4}, {4, 1}];
- (* The flows. *)
- keys = Permute[key, #]& /@ perms;
- (* The coefficients *)
- factsref = Flatten[Function[x, #[[2]]& /@ Select[flowlist, (#[[1]] === x)&]] /@ keys, 1];
- (* Reference coefficients *)
- fact1 = (#[[2]]& /@ Select[flowlist, (#[[1]] === key)&])[[1]];
- facts = PermuteExt[fact1, #]& /@ perms;
- (* Equality? *)
- Throw[And @@ MapThread[TrueQ[WO`Simplify[#1 - #2, Trig -> False] == 0]&, {factsref, facts}]];
- ]], Throw["WARNING: Color: OOOO only supported if all six flows are present "
- <> "and properly related by permutations, skipping...", WO`ESkip]];
- ];
- (* Weed out the flows. *)
- keyflow = GetKeyflow[tag, k[[1]], k[[2]], k[[3]], k[[4]]];
- expc = #[[2]]& /@ Select[flowlist, (#[[1]] === keyflow)&];
- If[Length[expc] != 1, Throw[Futile[
- "WARNING: None of the expected color flows matches, skipping this vertex...\n"
- <> " This is possibly a BUG..."], WO`ESkip];
- ];
- expc[[1]]
- ];
-
-
- (* Digest a single vertex *);
- DigestVertex[vspec_] := Module[{tag, partlist, coupling, arity, Digest3ary, Digets4ary,
- Digestnary, CheckLorentz, LInd, SInd, Met, CheckLorentzBackend, RegisterVertex, ID, Futile},
-
- (* This tries to decompose a lorentz sructure in a given set of structures ("bricks"). *
- * These are assumed to decompose into disjunct sums of atoms, as is the structure. If *
- * successfull, a list if the resulting coefficients is returned. *)
- CheckLorentzBackend[lego_List, struct_] := Module[{Div, Onestep, coeffs={}, Iterate},
- (* Divide by a lorentz structure, return the factor if no more indices remain, 0 otherwise. *)
- Div[num_, den_] := Module[{quot},
- quot = WO`Simplify[num / den, Trig -> False];
- If[FreeQ[quot, Index] && FreeQ[quot, SP[_, _]], quot, 0]
- ];
-
- (* Take one brick, try to decompose and return the remainder. *)
- Onestep[brick_, mstruct_] := Module[{ebrick, estruct, key, coeff},
- ebrick = Expand[brick];
- (* Take the first monomial as key. *)
- key = If[MatchQ[ebrick, _Plus], ebrick[[1]], ebrick];
- estruct = Expand[mstruct];
- (* Divide target monomials by key, build list of coefficients. *)
- estruct = If[MatchQ[estruct, _Plus], List @@ estruct, {estruct}];
- coeff = Plus @@ (Div[#, key]& /@ estruct);
- (* Push total coefficient to the coefficient list *)
- AppendTo[coeffs, coeff];
- (* Return remainder. *)
- Simplify[mstruct - coeff * brick, Trig -> False]
- ];
- (* Iterate this procedure over all bricks on the respective remainders. *)
- Iterate[{hd_, tl__}, mstruct_] := Iterate[{tl}, Onestep[hd, mstruct]];
- Iterate[{hd_}, mstruct_] := Onestep[hd, mstruct];
- (* If we were successfull, the remainder must be zero. *)
- If[TrueQ [Iterate[lego, struct] == 0], coeffs, Null]
- ];
- CheckLorentzBackend[brick_, struct_] := Module[{cpl},
- cpl = CheckLorentzBackend[{brick}, struct];
- Switch[cpl, Null, Null, _, cpl[[1]]]
- ];
-
- (* Multiplies the coupling with the overall -i and also accounts for the modified *
- * normalization of color octets in the color flow basis. *)
- CheckLorentz[brick_, struct_, fact_] := Module[{cpl},
- cpl = CheckLorentzBackend[brick, struct];
- If [cpl =!= Null, Throw[
- Simplify[(-I)
- * 1 / Sqrt[2^(Plus @@ (Switch[WO`hash["colrep", PartName[#[[1]]]], "O", 1, _, 0]& /@ partlist))]
- * fact * cpl, Trig -> False
- ]
- ]];
- ];
- CheckLorentz[brick_, fact_] := CheckLorentz[brick, coupling, fact];
- CheckLorentz[brick_] := CheckLorentz[brick, 1];
-
- (* Some helpers to ease writing the patterns *)
- LInd[x__] := Index[Lorentz, Ext[x]];
- SInd[x_] := Index[Spin, Ext[x]];
- Met[List[x__], List[y__]] := ME[Index[Lorentz, Ext[x]], Index[Lorentz, Ext[y]]];
- Met[x_, y_] := ME[Index[Lorentz, Ext[x]], Index[Lorentz, Ext[y]]];
-
- (* Register a vertex. If given a list of lorentz structures and couplings, we interpret *
- * these as a list of vertices. *)
- RegisterVertex[Hold[list_], perm_List, struct_List, cpl_List] :=
- MapThread[RegisterVertex[Hold[list], #1, #2, #3]&, {perm, struct, cpl}];
- RegisterVertex[Hold[list_], struct_List, cpl_List] :=
- MapThread[RegisterVertex[Hold[list], #1, #2]&, {struct, cpl}];
- (* 3 arguments -> trivial permutation *)
- RegisterVertex[Hold[list_], struct_, cpl_] :=
- RegisterVertex[Hold[list], {}, struct, cpl];
- (* 4 arguments -> permute the particles, {} means trivial permutation *)
- RegisterVertex[Hold[list_], perm_List, struct_, cpl_] :=
- Module[{plist},
- plist = If[perm === {}, partlist, (partlist[[#]]& /@ perm)];
- AppendTo[list, {WO`Concat[WO`hash["constr", PartName[#[[1]] ]]& /@ plist, ", "], struct,
- RegisterCoupling[partlist, cpl]}];
- ];
-
- Digest3ary := Module[{i1, i2, i3, cpl, struct, PermuteParticles, perm = {}, futile = False},
-
- (* This function MUST be called prior to checking the lorentz structures. It performs *
- * a final permutation of the particles to place them in the proper order for O'Mega *
- * to work. It then strips the color structure. Remaining IndexDeltas are replaced by *
- * ID as the Einstein convention awareness of IndexDelts causes nasty issues with the *
- * Lorentz matcher. *)
- PermuteParticles[j1_, j2_, j3_] := Module[{},
- (* Permute... *)
- partlist = {partlist[[j1]], partlist[[j2]], partlist[[j3]]};
- (* ... and save new indices. *)
- i1 = partlist[[1, 2]]; i2 = partlist[[2, 2]]; i3 = partlist[[3, 2]];
- coupling = StripColor[coupling, partlist];
- coupling = coupling /. {IndexDelta[x_, y_] -> ID[x, y]};
- If[Not[FreeQ[coupling, Gluon] && FreeQ[coupling, Colour]],
- Throw[Futile[
- "WARNING: I have failed to strip the color structure from a vertex, it will be skipped..."], WO`ESkip]];
- ];
-
- (* We proceed like this: first identify the spins that are meeting; then, for each spin, *
- * we go through all the known lorentz structures. If none matches, we print a warning and *
- * skip the vertex. This would be the point to insert a hook for generating new lorentz *
- * structures on the fly... *)
- cpl = Switch[tag,
- (* The case of trilinear couplings between two fermions and a boson can be *
- * streamlined. The clashing-arrows-code is not active at the moment as *
- * O'Mega only knows a subset of the required interactions. *)
- "fFV"|"fMV"|"FMV"|"fFS"|"fMS"|"FMS"|"MMS"|"MMV",
- Module[{descr, ferm1, ferm2, Genstruct},
- Genstruct = (""
- <> "Coupling." <> descr <> " (1, Coupling." <> ferm1 <> ", Coupling."
- <> # <> ", Coupling." <> ferm2 <> ")")&;
- (* Put the particles into the correct ordering required by O'Mega. *)
- If[MatchQ[StringTake[tag, 2], "fF"|"fG"|"fM"|"MM"],
- PermuteParticles[1, 3, 2]
- ,
- PermuteParticles[2, 3, 1]
- ];
- (* Adjust the coupling type and fermion descriptors. *)
- {descr, ferm1, ferm2} = Switch[StringTake[tag, 2],
- "fF", {"FBF", "Psibar", "Psi"},
- "fG", {"BBB", "Psibar", "Psibar"},
- "Fg", {"PBP", "Psi", "Psi"},
- "fM", {"FBF", "Psibar", "Chi"},
- "FM", {"FBF", "Chibar", "Psi"},
- "MM", {"FBF", "Chibar", "Chi"},
- _, Throw[WO`EAbort, "Internal..."]
- ];
- Catch[
- (* Distinguish the cases of scalar vs. vector couplings here. *)
- If[StringTake[tag, {3, 3}] == "V",
- struct = Genstruct["V"];
- CheckLorentz[Ga[LInd[i2], SInd[i1], SInd[i3]]];
- struct = Genstruct["VL"];
- (* The factor 1/2 is due to the different definitions of P_+- in O'Mega and FeynRules. *)
- CheckLorentz[TensDot[Ga[LInd[i2]], ProjM][SInd[i1], SInd[i3]], 1/2];
- struct = Genstruct["VR"];
- CheckLorentz[TensDot[Ga[LInd[i2]], ProjP][SInd[i1], SInd[i3]], 1/2];
- struct = Genstruct["VLR"];
- CheckLorentz[{TensDot[Ga[LInd[i2]], ProjM][SInd[i1], SInd[i3]],
- TensDot[Ga[LInd[i2]], ProjP][SInd[i1], SInd[i3]]}, 1/2];
- struct = Genstruct["A"];
- CheckLorentz[- TensDot[Ga[LInd[i2]], Ga[5]][SInd[i1], SInd[i3]]];
- struct = Genstruct["VA"];
- CheckLorentz[{Ga[LInd[i2], SInd[i1], SInd[i2]],
- - TensDot[Ga[Lind[i2]], Ga[5]][Sind[i2], SInd[i2]]}];
- ,
- struct = "Coupling.FBF (1, Coupling.Psibar, Coupling.S, Coupling.Psi)";
- CheckLorentz[ID[SInd[i1], SInd[i3]]];
- (* Wondering about 1/2? See above. *)
- struct = "Coupling.FBF (1, Coupling.Psibar, Coupling.SL, Coupling.Psi)";
- CheckLorentz[ProjM[SInd[i1], SInd[i3]], 1/2];
- struct = "Coupling.FBF (1, Coupling.Psibar, Coupling.SR, Coupling.Psi)";
- CheckLorentz[ProjP[SInd[i1], SInd[i3]], 1/2];
- struct = "Coupling.FBF (1, Coupling.Psibar, Coupling.SLR, Coupling.Psi)";
- CheckLorentz[{ProjM[SInd[i1], SInd[i3]], ProjP[SInd[i1], SInd[i3]]}, 1/2];
- struct = "Coupling.FBF (1, Coupling.Psibar, P, Coupling.Psi)";
- CheckLorentz[Ga[5, SInd[i1], SInd[i3]]];
- ];
- (* If nothing has matched we print a warning. *)
- Throw["WARNING: " <> tag <> " type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ]
- ],
- "fGS", Catch[
- PermuteParticles[1, 3, 2];
- struct = "Coupling.BBB (1, Coupling.Psibar, Coupling.SL, Coupling.Psibar)";
- CheckLorentz[ProjM[SInd[i1], SInd[i3]], 1/2];
- struct = "Coupling.BBB (1, Coupling.Psibar, Coupling.SR, Coupling.Psibar)";
- CheckLorentz[ProjP[SInd[i1], SInd[i3]], 1/2];
- struct = "Coupling.BBB (1, Coupling.Psibar, Coupling.SLR, Coupling.Psibar)";
- CheckLorentz[{ProjM[SInd[i1], SInd[i3]], ProjP[SInd[i1], SInd[i3]]}, 1/2];
- Module[{c},
- c = Catch[CheckLorentz[{ID[SInd[i1], SInd[i3]], -Ga[5, SInd[i1], SInd[i3]]}]];
- If[c =!= Null, Throw[{c[[1]] + c[[2]], c[[1]] - c[[2]]}]];
- ];
- Throw["WARNING: " <> tag <> " type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "FgS", Catch[
- PermuteParticles[2, 3, 1];
- struct = "Coupling.PBP (1, Coupling.Psi, Coupling.SL, Coupling.Psi)";
- CheckLorentz[ProjM[SInd[i1], SInd[i3]], 1/2];
- struct = "Coupling.PBP (1, Coupling.Psi, Coupling.SR, Coupling.Psi)";
- CheckLorentz[ProjP[SInd[i1], SInd[i3]], 1/2];
- struct = "Coupling.PBP (1, Coupling.Psi, Coupling.SLR, Coupling.Psi)";
- CheckLorentz[{ProjM[SInd[i1], SInd[i3]], ProjP[SInd[i1], SInd[i3]]}, 1/2];
- Module[{c},
- c = Catch[CheckLorentz[{ID[SInd[i1], SInd[i3]], -Ga[5, SInd[i1], SInd[i3]]}]];
- If[c =!= Null, Throw[{c[[1]] + c[[2]], c[[1]] - c[[2]]}]];
- ];
- Throw["WARNING: " <> tag <> " type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "VVV", Catch[
- PermuteParticles[1, 2, 3];
- struct = "Gauge_Gauge_Gauge 1";
- (* Another O'Mega special: the vertex is multiplied by I internally, so we must *
- * compensate for it. *)
- CheckLorentz[
- - Met[i1, i2] * (2 * FV[i2, LInd[i3]] + FV[i3, LInd[i3]])
- + Met[i1, i3] * (2 * FV[i3, LInd[i2]] + FV[i2, LInd[i2]])
- + Met[i2, i3] * (FV[i2, LInd[i1]] - FV[i3, LInd[i1]]),
- coupling /. {FV[i1, j_] :> - FV[i2, j] - FV[i3, j]}, -I];
- (* Anomalous dimension 4 TVCs are a bit more tricky: we have to decompose them *
- * in a unique basis and translate the result into the O'Mega basis of *
- * permuted longitudinal / transverse aTGC operators. *
- * *
- * Limitation: this does not work if identical fields meet at the *
- * vertex due to the asymmetric nature of the couplings in O'Mega - the only *
- * way to get the necessary permutations is permuting the particles at the *
- * vertex, but if those are identical... you get the idea :) *
- * *
- * Another tricky point are color flows. As we are permuting the particles *
- * after stripping color, we have to take care not to change the flow. *
- * While I can't see a reliable way of doing this in the n-point case, the *
- * only potentially problematic color structure in the three-point case is OOO.*
- * There, we have a cyclic and a anticyclic flow, and if we only perform *
- * cyclic permutations, the flow is unchanged -> take care to only do cyclic *
- * permutations. *)
- Module[{a}, If [(a = Catch[Module[{dec, all},
- If[partlist[[1, 1]] === partlist[[2, 1]] || partlist[[1, 1]] == partlist[[3, 1]] ||
- partlist[[2, 1]] === partlist[[3, 1]],
- futile = True;
- Print[""
- <> "LIMITATION: O'Mega only handles anomalous triple vector couplings "
- <> "if the fields are mutually different."];
- Throw[Null]];
- dec = Catch[CheckLorentz[{
- FV[i1, LInd[i1]] * Met[i2, i3], FV[i1, LInd[i2]] * Met[i1, i3],
- FV[i1, LInd[i3]] * Met[i1, i2], FV[i2, LInd[i1]] * Met[i2, i3],
- FV[i2, LInd[i2]] * Met[i1, i3], FV[i2, LInd[i3]] * Met[i1, i2]
- },
- coupling /. {FV[i3, j_] :> - FV[i1, j] - FV[i2, j]}
- , -I
- ]];
- If[dec === Null, Throw[Null]];
- all = Select[Simplify[Join[
- {#[[1]], "Dim4_Vector_Vector_Vector_L 1", #[[2]]}& /@ {
- {{1, 2, 3}, dec[[1]] - dec[[4]] / 2}, {{2, 3, 1}, dec[[5]] - dec[[2]] / 2},
- {{3, 1, 2}, - (dec[[3]] + dec[[6]]) / 2}},
- {#[[1]], "Dim4_Vector_Vector_Vector_T 1", #[[2]]}& /@ {
- {{2, 3, 1}, dec[[2]] / 2}, {{3, 1, 2}, (dec[[6]] - dec[[3]]) / 2},
- {{1, 2, 3}, - dec[[4]] / 2}}
- ], Trig -> False], !TrueQ[#[[3]] == 0]&];
- perm = #[[1]]& /@ all;
- struct = #[[2]]& /@ all;
- Throw[#[[3]]& /@ all];
- ]]) =!= Null,
- If[Length[a] > 1,
- Print[partlist];
- Print[""
- <> "WARNING: splitting vertex into " <> ToString[Length[a]] <> " pieces, "
- <> "the diagram count reported by O'Mega will not be accurate anymore."];
- ];
- Throw[a]]];
- Throw[If[futile, Futile[#], #]&("WARNING: VVV type vertex with unknown lorentz structure, skipping..."), WO`ESkip];
- ],
- "SVV", Catch[
- PermuteParticles[1, 2, 3];
- struct = "Scalar_Vector_Vector 1";
- CheckLorentz[Met[i2, i3]];
- struct = "Dim5_Scalar_Gauge2 1";
- CheckLorentz[FV[i2, LInd[i3]] * FV[i3, LInd[i2]] - SP[i2, i3] * Met[i2, i3],
- coupling /. {FV[i1, i_] :> - FV[i2, i] - FV[i3, i]}, 1];
- Throw["WARNING: SVV type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "SSS", Catch[
- PermuteParticles[1, 2, 3];
- struct = "Scalar_Scalar_Scalar 1";
- CheckLorentz[1];
- Throw["WARNING: SSS type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "SSV", Catch[
- PermuteParticles[3, 1, 2];
- struct = "Coupling.Vector_Scalar_Scalar 1";
- CheckLorentz[FV[i3, LInd[i1]] - FV[i2, LInd[i1]],
- coupling /. {FV[i1, j_] :> - FV[i2, j] - FV[i3, j]}, 1];
- Throw["WARNING: SSV type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "SST", Catch[
- PermuteParticles[3, 1, 2];
- struct = "Coupling.Graviton_Scalar_Scalar 1";
- Module[{c},
- c = Catch[CheckLorentz[
- {
- - Met[{i1, 1}, {i1, 2}]
- ,
- - Met[{i1, 1}, {i1, 2}] * SP[i2, i3] +
- FV[i2, LInd[i1, 1]] * FV[i3, LInd[i1, 2]] +
- FV[i2, LInd[i1, 2]] * FV[i3, LInd[i1, 1]]
- }, coupling /. {FV[i1, j_] :> - FV[i2, j] - FV[i3, j]}, 1]
- ];
- If[(c = Catch[
- If[c === Null, Throw[Null]];
- If[WO`hash["mass", PartName[partlist[[2, 1]]]] =!= WO`hash["mass", PartName[partlist[[3, 1]]]],
- Throw[Null]];
- If[c[[2]] == 0, Throw[Null]];
- If[Simplify[
- (c[[1]] / c[[2]] - WO`hash["mass", PartName[partlist[[2, 1]]]]^2)
- //. (Rule[#[[1]], #[[2]]]& /@ WO`IParamList) /. ZERO -> Null
- ] == 0, Throw[c[[2]]]
- ];
- ]) =!= Null, Throw[c]
- ];
- ];
- Throw["WARNING: SST type vertix with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "TVV", Catch[
- PermuteParticles[1, 2, 3];
- struct = "Coupling.Graviton_Vector_Vector 1";
- Module[{c, csym, dsym},
- csym[m_, n_, r_, s_] :=
- ME[m, r] * ME[n, s] + ME[m, s] * ME[n, r] - ME[m, n] * ME[r, s];
- dsym[m_, n_, r_, s_, p1_, p2_] := ME[m, n] * FV[p1, s] * FV[p2, r]
- - (Plus @@ ((ME[#[[1]], s] * FV[p1, #[[2]]] * FV[p2, r] + ME[#[[1]], r] * FV[p1, s] * FV[p2, #[[2]]]
- - ME[r, s] * FV[p1, #[[1]]] * FV[p2, #[[2]]])& /@ {{m, n}, {n, m}} ));
- c = Catch[CheckLorentz[
- {
- - csym[LInd[i1, 1], LInd[i1, 2], LInd[i2], LInd[i3]]
- ,
- - SP[i2, i3] * csym[LInd[i1, 1], LInd[i1, 2], LInd[i2], LInd[i3]]
- - dsym[LInd[i1, 1], LInd[i1, 2], LInd[i2], LInd[i3], i2, i3]
- }, coupling /. {FV[i1, j_] :> - FV[i2, j] - FV[i3, j]}, 1];
- ];
- If[(c = Catch[
- If[c === Null, Throw[Null]];
- If[WO`hash["mass", PartName[partlist[[2, 1]]]] =!= WO`hash["mass", PartName[partlist[[3, 1]]]],
- Throw[Null]];
- If[c[[2]] == 0, Throw[Null]];
- If[Simplify[
- (c[[1]] / c[[2]] - WO`hash["mass", PartName[partlist[[2, 1]]]]^2)
- //. (Rule[#[[1]], #[[2]]]& /@ WO`IParamList) /. ZERO -> 0
- ]== 0, Throw[c[[2]]]];
- ]) =!= Null, Throw[c]
- ];
- ];
- Throw["WARNING: VVT type vertix with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "fFT", Catch[
- PermuteParticles[1, 3, 2];
- struct = "Coupling.Graviton_Spinor_Spinor 1";
- Module[{c},
- c = Catch[CheckLorentz[
- {
- - Met[{i2, 1}, {i2, 2}] * ID[SInd[i1], SInd[i3]]/ 2
- ,
- Ga[LInd[i2, 1], SInd[i1], SInd[i3]] * (FV[i3, LInd[i2, 2]] - FV[i1, LInd[i2, 2]]) / 8 +
- Ga[LInd[i2, 2], SInd[i1], SInd[i3]] * (FV[i3, LInd[i2, 1]] - FV[i1, LInd[i2, 1]]) / 8 +
- Met[{i2, 1}, {i2, 2}] * (SlashedP[i1, SInd[i1], SInd[i3]] - SlashedP[i3, SInd[i1], SInd[i3]]) / 4
- }, coupling /. {FV[i2, j_] :> - FV[i1, j] - FV[i3, j]}, 1];
- ];
- If[(c = Catch[
- If[c === Null, Throw[Null]];
- If[WO`hash["mass", PartName[partlist[[1, 1]]]] =!= WO`hash["mass", PartName[partlist[[3, 1]]]],
- Throw[Null]];
- If[c[[2]] == 0, Throw[Null]];
- If[Simplify[
- (c[[1]] / c[[2]] + WO`hash["mass", PartName[partlist[[1, 1]]]])
- //. (Rule[#[[1]], #[[2]]]& /@ WO`IParamList) /. ZERO -> 0
- ]== 0, Throw[c[[2]]]];
- ]) =!= Null, Throw[c]
- ];
-
- ];
- Throw["WARNING: fFT type vertix with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- _, Throw[Futile["WARNING: unidentified vertex of arity 3 (spin structure: " <> tag <> "), skipping..."], WO`ESkip];
- ];
- (* If we have identified our friend, we append it to the definition list. *)
- If [perm === {} && MatchQ[struct, _List], perm = {}& /@ struct];
- If[cpl =!= Null, RegisterVertex[
- If[FreeQ[WO`hash["colrep", PartName[#[[1]]]]& /@ partlist, "O"], Hold[v3deflist], Hold[v3deflist$c]], perm, struct, cpl]];
- ];
-
-
- Digest4ary := Module[{i1, i2, i3, i4, cpl, struct, PermuteParticles},
-
- (* See above, MUST be called under all circumstances. *)
- PermuteParticles[j1_, j2_, j3_, j4_] := Module[{},
- partlist = {partlist[[j1]], partlist[[j2]], partlist[[j3]], partlist[[j4]]};
- i1 = partlist[[1, 2]]; i2 = partlist[[2, 2]]; i3 = partlist[[3, 2]]; i4 = partlist[[4, 2]];
- coupling = StripColor[coupling, partlist];
- coupling = coupling /. {IndexDelta[x_, y_] -> ID[x, y]};
- If[Not[FreeQ[coupling, Gluon] && FreeQ[coupling, Colour]],
- Throw["WARNING: I have failed to strip the color structure from a vertex, it will be skipped...", WO`ESkip]];
- ];
-
- cpl = Switch[tag,
- "SSSS", Catch[
- PermuteParticles[1, 2, 3, 4];
- struct = "Scalar4 1";
- CheckLorentz[1];
- Throw["WARNING: SSSS type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "SSVV", Catch[
- PermuteParticles[1, 2, 3, 4];
- struct = "Scalar2_Vector2 1";
- CheckLorentz[Met[i3, i4]];
- Throw["WARNING: SSVV type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- "VVVV", Catch[
- PermuteParticles[1, 2, 3, 4];
- Catch[Module[{i, cpl, nums, dens, fact},
- (* Try to decompose the vertex structure in terms of inequivalent contractions. *)
- cpl = Catch[CheckLorentz[{Met[i1, i2] * Met[i3, i4], Met[i1, i3] * Met[i2, i4],
- Met[i1, i4] * Met[i2, i3]}]];
- If[cpl === Null, Throw[Null]];
- (* If it worked, check if the decomposition can be split in a prefactor and *
- * a list of integers. *)
- If[!TrueQ[cpl[[1]] == 0],
- fact = Simplify[cpl / cpl[[1]], Trig -> False];
- nums = Numerator[fact];
- dens = Denominator[fact];
- ];
- If[And @@ (IntegerQ /@ Join [nums, dens]) && !TrueQ[cpl[[1]] == 0],
- (* We can? -> Assemble a single coupling. *)
- cpl = cpl[[1]] / (LCM @@ dens);
- fact = fact * (LCM @@ dens);
- struct = "Vector4 [" <> WO`Concat[{
- If[fact[[1]] != 0, ToString[fact[[1]]] <> ", Coupling.C_12_34", ""],
- If[fact[[2]] != 0, ToString[fact[[2]]] <> ", Coupling.C_13_42", ""],
- If[fact[[3]] != 0, ToString[fact[[3]]] <> ", Coupling.C_14_23", ""]}, "; "] <> "]";
- Throw[cpl];,
- (* We cannot? -> Generate several couplings then. *)
- struct = ("Vector4 [" <> # <> "]")& /@
- {"1, Coupling.C_12_34", "1, Coupling.C_13_42", "1, Coupling.C_14_23"};
- (* Drop all pieces that are zero. *)
- Module[{tmp},
- tmp = Select[MapThread[{#1, #2}&, {struct, cpl}], !TrueQ[#[[2]] == 0]&];
- struct = #[[1]]& /@ tmp;
- cpl = #[[2]]& /@ tmp;
- ];
- If[Length[cpl] > 1,
- Print[partlist];
- Print[""
- <> "WARNING: splitting vertex into " <> ToString[Length[cpl]] <> " pieces, "
- <> "the diagram count reported by O'Mega will not be accurate anymore."];
- ];
- Throw[cpl];
- ];
- ], Null];
- Throw["WARNING: VVVV type vertex with unknown lorentz structure, skipping...", WO`ESkip];
- ],
- _, Throw[Futile["WARNING: unidentified vertex of arity 4 (spin structure: " <> tag <> "), skipping..."], WO`ESkip];
- ];
- (* If we have identified our friend, we append it to the definition list and record its arity. *)
- If[cpl =!= Null,
- RegisterVertex[
- If[FreeQ[WO`hash["colrep", PartName[#[[1]]]]& /@ partlist, "O"], Hold[v4deflist], Hold[v4deflist$c]], struct, cpl];
- WO`maxarity = Max[arity, WO`maxarity];
- ];
- ];
-
- Digestnary := Module[{},
- Throw[Futile["Vertices of arity > 4 are not implemented yet, skipping vertex...."], WO`ESkip];
- ];
-
- SetAttributes[ID, Orderless];
- tag = vspec[[1]];
- (* We map charge conjugation to hermitian conjugation. *)
- partlist = vspec[[2]] /. CC -> WO`HC;
- coupling = vspec[[3]];
- arity = Length[partlist];
- Catch[
- If[Or @@ (((GhostFieldQ[#[[1]]] === True) ||
- (WO`gauge === WO`WOUnitarity && WO`hash["goldstone", PartName[#[[1]]]]))&/@ partlist),
- nghost++; nskipped++ ,
- Switch[arity, 3, Digest3ary[], 4, Digest4ary[], _, Digestnary[]]
- ],
- (* Retry with the simplified structure if WOFast is off*)
- WO`ESkip, Function[{val, tag},
- Catch[
- Switch[{WO`fast, val},
- {True, Futile[_]}, Throw[val, tag],
- {True, _},
- Print[""
- <> "Vertex could not be identified (see below), but setting WOFast -> False "
- <> "might help..."];
- Throw[val, tag],
- {False, Futile[_]}, Throw[val, tag],
- {False, _},
- partlist = vspec[[2]] /. CC -> WO`HC;
- coupling = FullSimplify[vspec[[3]], ExcludedForms->{x_/;(FreeQ[x, Index] && FreeQ[x, Dot])}];
- Switch[arity, 3, Digest3ary[], 4, Digest4ary[], _, Digestnary[]]
- ],
- WO`ESkip, Function[{val, tag},
- val /. {s_String :> Print[s], Futile[s_String]:> Print[s]};
- Print["Skipped vertex: " <> WO`Concat[ToString[PartName[#[[1]]]]& /@ partlist, " , "]];
- Print[partlist];
- If[WO`verbose,
- Print["Verbose vertex structure:"];
- Print[coupling];
- ];
- nskipped++;
- ]];
- ]];
- nproc++;
- If[WO`progress > 0 && Mod[nproc, WO`progress] == 0,
- Print[" " <> ToString[nproc] <> " of " <> ToString[Length[WO`vlist]] <> " vertices processed..."]
- ];
- ];
-
- (* Put the particle lists into a canonical order w.r.t. their lorentz representations. *
- * This works by assigning a tag to every representation: *
- * Scalar : S - Fermion : F - A-Fermion : f - Majorana : M - Vector : V - Tensor : T *
- * The particles are then ordered lexicographically w.r.t. these tags; the tags are *
- * joined for each vertex to give a sort of "fingerprint" of the lorentz structure. *
- * Charge-conjugated fermions are tagged with G and g to allow the identification of *
- * clashing-arrow type vertices. *)
- Module[{prepend, sort, tag, remove},
- prepend = If[FreeQ[#[[1]], CC],
- Prepend[#, WO`hash["lrep", PartName[ #[[1]] ]]]
- ,
- (* We _need_ the majorana modules for clashing arrow type stuff... *)
- WO`havemajoranas = True;
- Prepend[#, Switch[WO`hash["lrep", PartName[#[[1]] /. CC -> WO`HC]],
- (* As we have mapped CC to HC, we have an extra conjugation. *)
- "f", "G", "F", "g",
- _, Throw[WO`EAbort, "Charge conjugation appearing for a field other than a dirac fermion!"]
- ]]
- ]&;
- sort = Sort[#, Function[{x, y}, OrderedQ[{x[[1]], y[[1]]}]]]&;
- tagger = StringJoin[Function[{x}, x[[1]]] /@ #]&;
- remove = Take[#, {2, 3}]&;
- vlist = {sort[prepend /@ #[[1]]], #[[2]]}& /@ WO`vlist;
- vlist = {tagger[#[[1]]], remove /@ #[[1]], #[[2]]}& /@ vlist;
- ];
- (* Process the vertices. *)
- DigestVertex /@ vlist;
- Print["processed a total of " <> ToString[nproc] <> " vertices, kept "
- <> ToString[nproc - nskipped] <> " of them and threw away " <> ToString[nskipped]
- <> ", " <> ToString[nghost] <> " of which contained ghosts"
- <> If[WO`gauge === WO`WOUnitarity, " or goldstone bosons", ""] <> "."];
- (* Create constant type and translator. *)
- constant = ""
- <> "type constant =\n"
- <> WO`Indent[" | " <> WO`SmartConcat[#[[1]]& /@ WO`cpldeflist, " | "], 2]
- <> "\n";
- Module[{c},
- c = (#[[1]] <> " -> \"" <> WO`FirstUpper[ToLowerCase[#[[1]]]] <> "\"")& /@ WO`cpldeflist;
- constsym = ""
- <> "let constant_symbol = function\n"
- <> WO`Indent[" | " <> WO`SmartConcat[c, " | "], 2]
- <> "\n";
- ];
-
- (* Generate the actual vertex list. *)
- VlistMaker[Hold[list_]] := WO`Concat[
- ("(" <> #[[1]] <> "),\n " <> #[[2]] <> ",\n " <> #[[3]])& /@ list, "\n;\n"];
- VlistSmartMaker[Hold[list_], lname_] :=
- If[Length[list] > 0,
- "let " <> lname <> " = [\n" <> WO`Indent[VlistMaker[Hold[list]], 3] <> "\n]\n",
- "let " <> lname <> " = []\n"
- ];
-
- vertices = ""
- <> VlistSmartMaker[Hold[v3deflist], "vertices_3"]
- <> "\n"
- <> VlistSmartMaker[Hold[v3deflist$c], "vertices_3_qcd"]
- <> "\n"
- <> VlistSmartMaker[Hold[v4deflist], "vertices_4"]
- <> "\n"
- <> VlistSmartMaker[Hold[v4deflist$c], "vertices_4_qcd"]
- <> "\n"
- <> VlistSmartMaker[Hold[vndeflist], "vertices_n"]
- <> "\n"
- <> VlistSmartMaker[Hold[vndeflist$c], "vertices_n_qcd"]
- <> "\n"
- <> "let vertices () = (\n"
- <> " vertices_3 @ (match Opts.color with true -> vertices_3_qcd | false -> []),\n"
- <> " vertices_4 @ (match Opts.color with true -> vertices_4_qcd | false -> []),\n"
- <> " vertices_n @ (match Opts.color with true -> vertices_n_qcd | false -> [])\n"
- <> ")\n"
- ];
-
- handle = OpenWrite[file];
- (* Parse the particle list. *)
- ParsePList[];
- (* Generate the vertex definitions *)
- DigestVertices[];
- (* The preamble *)
- preamble = ""
- <> WO`CommentMaker[WO`fileheader, "(* ", " ", " *)"] <> "\n"
- <> "\n"
- <> "type gauge = Unitarity | Feynman | Rxi\n"
- <> "\n"
- <> "module type Frules_options =\n"
- <> "sig\n"
- <> " val gauge: gauge\n"
- <> " val color: bool\n"
- <> "end\n"
- <> "\n"
- <> "module Implementation (Opts: Frules_options) =\n"
- <> "struct\n"
- <> "\n"
- <> " open Coupling\n";
- (* Stuff independent of the actual model *)
- gauge = "type gauge = Xi\n";
- width = ""
- <> "let width x = match width_symbol x with \n"
- <> " | \"fr_zero\" -> Vanishing\n"
- <> " | _ -> Timelike\n";
- fermion = ""
- <> "let fermion x = (match lorentz x with\n"
- <> " | Spinor -> 1 | ConjSpinor -> -1 | Majorana -> 2 | _ -> 0)\n";
- colsymm = "let colsymm _ = (0, false), (0, false)\n";
- maxdegree = "let max_degree () = " <> ToString[WO`maxarity] <> "\n";
- fusions = ""
- <> "module F = " <> If[WO`whizv2x[], "Modeltools", "Models"] <> ".Fusions (struct\n"
- <> " type f = flavor\n"
- <> " type c = constant\n"
- <> " let compare = compare\n"
- <> " let conjugate = conjugate\n"
- <> "end)\n"
- <> "\n"
- <> "let table = F.of_vertices (vertices ())\n"
- <> "let fuse2 = F.fuse2 table\n"
- <> "let fuse3 = F.fuse3 table\n"
- <> "let fuse = F.fuse table\n";
- extflavors = "let external_flavors () = [\"Autogenerated flavors\", flavors ()]\n";
- parameters = "let parameters () = {input = []; derived = []; derived_arrays = []}\n";
- flavorofstring = ""
- <> "let flavor_of_string x =\n"
- <> " let dict = List.map (fun x -> (x, flavor_to_string x)) (flavors ())\n"
- <> " in try\n"
- <> " fst (List.find (fun (_, y) -> (x = y)) dict)\n"
- <> " with\n"
- <> " Not_found -> invalid_arg \"" <> WO`omeganame <> ".Implementation: flavor_of_string: invalid particle?\"\n";
- gaugesym = ""
- <> "let gauge_symbol = function\n"
- <> " Xi -> (match Opts.gauge with\n"
- <> " | Unitarity -> invalid_arg\n"
- <> " \"" <> WO`omeganame <> ".Implementation: requesting gauge symbol in unitarity gauge!\"\n"
- <> " | Feynman -> \"one\"\n"
- <> " | Rxi -> \"" <> ToString[WO`gsym] <> "\")\n";
- options = "let options = Options.empty\n";
- rcs = ""
- <> "let rcs = RCS.parse \"" <> WO`omeganame <> "\" [\"automatically generated model\"] {\n"
- <> " RCS.revision = \"Revision: Noop\";\n"
- <> " RCS.date = \"Date: Noop\";\n"
- <> " RCS.author = \"Author: Mathematica automaton\";\n"
- <> " RCS.source = \"Source: Noop\"\n"
- <> "}\n";
- goldstone = "let goldstone _ = None\n";
- sanscolorstubs = ""
- <> "type flavor_sans_color = flavor\n"
- <> "let flavor_sans_color x = x\n"
- <> "let conjugate_sans_color = conjugate\n"
- <> "let flavor_sans_color_of_string = flavor_of_string\n"
- <> "let flavor_sans_color_to_string = flavor_to_string\n"
- <> "let flavor_sans_color_to_TeX = flavor_to_TeX\n"
- <> "let flavor_sans_color_symbol = flavor_symbol\n";
- charges = ""
- <> "module Ch = Charges.Null\n"
- <> "let charges _ = ()\n";
- finalwords = "end\n";
- (* Assemble the module. *)
- WriteString[handle, ""
- <> preamble <> "\n" <> WO`Indent [ ""
- <> flavor <> "\n" <> conjugate <> "\n" <> color <> "\n" <> pdg <> "\n" <> lorentz <> "\n" <> gauge <> "\n"
- <> propagator <> "\n" <> widthsym <> "\n" <> width <> "\n" <> fermion <> "\n"
- <> colsymm <> "\n" <> flavors <> "\n" <> extflavors <> "\n" <> goldstone <> "\n"
- <> flavortostring <> "\n" <> If[FreeQ[{"1.92"}, WO`whizv], texsym <> "\n", ""]
- <> flavorofstring <> "\n" <> flavorsym <> "\n" <> gaugesym <> "\n"
- <> masssym <> "\n"
- <> "(* Coupling constants and parameters *)\n\n"
- <> constant <> "\n" <> parameters <> "\n" <> constsym <> "\n"
- <> "(* Vertices and fusions *)\n\n"
- <> maxdegree <> "\n" <> vertices <> "\n" <> fusions <> "\n"
- <> If[WO`whizvn[] >= WO`whizvn["2.0.3"], ""
- <> "(* Charge (stubbed) *)\n\n"
- <> charges
- <> "\n"
- , ""]
- <> "(* Misc. infrastructure *)\n\n"
- <> options <> "\n" <> rcs <> "\n"
- <> If[WO`whizv2x[], sanscolorstubs <> "\n", ""]
- , 3] <> finalwords
- ];
- Close[handle];
-];
-
-(* Write the O'Mega binary driver *)
-WO`WriteOmegaBinary[file_, cfile_, ncf_] := Module[{handle, contents, fusions, modname, gauge,
- header, target, colorinvanilla},
- (* The fusions module. *)
- fusions = Switch[WO`maxarity, _?(#<=3&), "Binary", _?(#<=4&), "Mixed23", _?(#>4&), "Nary"]
- <> If[WO`havemajoranas, "_Majorana", ""];
- (* The module name. *)
- modname = WO`FirstUpper[WO`omeganame] <> If[WO`whizv2x[], "_mdl", ""];
- (* The gauge constructor. *)
- gauge = modname <> "." <> WO`GaugeName[];
- colorinvanilla = If[WO`whizv2x[], "true", "false"];
- target = "Targets.Fortran" <> If[WO`havemajoranas, "_Majorana", ""];
- header = WO`CommentMaker[WO`fileheader, "(* ", " ", " *)"] <> "\n";
- contents = ""
- <> header
- <> "\n"
- <> "module O = Omega.Make (Fusion." <> fusions <> ") (" <> target <> ")\n"
- <> " (" <> modname <> ".Implementation (struct let gauge = " <> gauge <> " let color = " <> colorinvanilla <> " end))\n"
- <> "\n"
- <> "let _ = O.main ()\n";
- handle = OpenWrite[file];
- WriteString[handle, contents];
- Close[handle];
- contents = ""
- <> header
- <> "\n"
- <> "module O = Omega.Make (Fusion." <> fusions <> ") (" <> target <> ")\n"
- <> " (Colorize.It (struct let max_num = " <> ToString[ncf] <> " end)\n"
- <> " (" <> modname <> ".Implementation\n"
- <> " (struct let gauge = " <> gauge <> " let color = true end)))\n"
- <> "\n"
- <> "let _ = O.main ()\n";
- If[WO`whizv19x[],
- handle = OpenWrite[cfile];
- WriteString[handle, contents];
- Close[handle];
- ];
-];
-
-(* Write the oplotter glue library. *)
-WO`WriteOplGlue[file_] := Module[{header, footer, contents, pardefs, namelist, DoParams,
- DoTranslators, translators, contains, initparams},
-
- (* Generate the parameter definitions and the namelist. *)
- DoParams[] := Module[{realparams, cmplxparams, realvars, cmplxvars, realchecklist, isreal, rendercpl},
- (* Real parameters are all numerical masses, widths and externals which are flagged as real. *)
- realparams = Join [
- {#[[2]], #[[3]]}& /@ Select[Join[WO`masslist, WO`widthlist], (NumericQ[#[[3]]])&],
- ({#[[1]], #[[2]]} & /@ Select[
- {#[[2, 1]], #[[2, -3]], #[[2, -2]]} & /@ Flatten[#[[2]] & /@ WO`EParamList, 1],
- Not[#[[3]]] &])];
- (* There are some double occurances of widths and masses I don't understand (TODO: Neil?), *
- * so weed them out here. The same applies below. *)
- realparams = WO`WeedOutList[realparams, FreeQ[#2, #1[[1]]]&];
- If[realparams != {},
- pardefs = WO`FortranSplit["real(kind=double), public :: " <> WO`Concat[
- (ToString[#[[1]]] <> "=" <> ToString[#[[2]]] <> "_double")& /@ realparams, ", "]
- <> "\n"];
- ];
- (* Complex parameters are all externals flagged as complex (obviously). *)
- cmplxparams =
- ({#[[1]], #[[2]]} & /@ Select[
- {#[[2, 1]], #[[2, -3]], #[[2, -2]]} & /@ Flatten[#[[2]] & /@ WO`EParamList, 1],
- #[[3]]&]);
- cmplxparams = WO`WeedOutList[cmplxparams, FreeQ[#2, #1[[1]]]&];
- If[cmplxparams != {},
- pardefs = pardefs <> WO`FortranSplit["\ncomplex(kind=double), public :: " <> WO`Concat[
- (ToString[#[[1]]] <> "=" <> WO`FortranComplex[#[[2]]])& /@ cmplxparams, ", "]
- <> "\n"];
- ];
- (* Real variables are all nonumerical masses, widths and internals flagged as real. Actually, *
- * we have to separate internals and masses/widths to make the latter private and the others *
- * public *)
- realvars = WO`WeedOutList[
- #[[2]]& /@ Select[Join[WO`masslist, WO`widthlist], (Not[NumericQ[#[[3]]]])&]];
- If[realvars != {},
- pardefs = pardefs <>
- WO`FortranSplit["\nreal(kind=double), public :: " <> WO`Concat[ToString /@ realvars, ", "]
- <> "\n"];
- ];
- (* Take also care to include nothing that has already been declared. *)
- realvars = Select[WO`WeedOutList[
- #[[1]]& /@ Select[{#[[1]], #[[-2]]}& /@ WO`IParamList, Not[#[[2]]]&]], FreeQ[realvars, #]&];
- If[realvars != {},
- pardefs = pardefs <>
- WO`FortranSplit["\nreal(kind=double) :: " <> WO`Concat[ToString /@ realvars, ", "]
- <> "\n"];
- ];
-
- (* Internals flagged as complex. *)
- cmplxvars = WO`WeedOutList[
- #[[1]]& /@ Select[{#[[1]], #[[-2]]}& /@ WO`IParamList, #[[2]]&]];
- If[cmplxvars != {},
- pardefs = pardefs <>
- WO`FortranSplit["\ncomplex(kind=double) :: " <> WO`Concat[ToString /@ cmplxvars, ", "]
- <> "\n"];
- ];
- (* The namelist presented to oplotter. *)
- namelist = WO`FortranSplit[""
- <> "namelist /parameters/ "
- <> WO`Concat[ToString[#[[1]]]& /@ Join[realparams, cmplxparams], ", "]
- <> "\n"];
- (* A list of functions, each checking if an expression is free of respective complex quantities. *)
- realchecklist =
- Function[{par}, Function[{exp}, FreeQ[exp, par]]] /@ (Join[#[[1]]& /@ cmplxparams, cmplxvars]);
- AppendTo[realchecklist, FreeQ[#, Complex]&];
- (* A function is constructed from this list checking if an expression should be considered as real. *)
- isreal = Function[{exp}, And @@ (Function[{checker}, checker[exp]] /@ realchecklist)];
- (* As some of the couplings are lists, we have to be smart and render to arrays where necessary. *)
- rendercpl = If[Head[#[[2]]] === List, ToString[#[[1]]] <> "(" <> ToString[Length[#[[2]]]] <> ")",
- ToString[#[[1]]]]&;
- (* In the hope that this allows better compiler optimization, the couplings are divided into real and *
- * complex ones. But as FORTRAN isn't capable of automatically casting complex to double, this is too *
- * smart, so I remove it again... *)
- pardefs = pardefs <>
- WO`FortranSplit["\ncomplex(kind=double), public :: " <> WO`Concat[rendercpl /@ WO`cpldeflist, ", "]];
- ];
-
- DoTranslators[] := Module[{pdglist, tospin, tomass, toname, MakeSelect, lr},
-
- (* Render a select case ... end select structure *)
- MakeSelect[l_, d_] := Module[{},
- "select case (pdg)\n" <> WO`Indent[WO`Concat[
- ("case(" <> ToString[#[[1]]] <> "); res = " <> ToString[#[[2]]])& /@ l, "\n"], 3]
- <> "\n case default; " <> d <> "\nend select\n"];
-
- translators = ""
- <> "function pdg_to_mass (pdg) result (res)\n"
- <> "integer, intent(in) :: pdg\n"
- <> "real(kind=double) :: res\n"
- <> WO`Indent[MakeSelect[{WO`hash["pdg", #], WO`hash["mass", #]}&
- /@ Select[WO`taglist, WO`hash["mass", #] =!= ZERO&], "res = 0._double"], 3]
- <> "end function pdg_to_mass\n"
- <> "\n"
- <> "function pdg_to_ident (pdg) result (res)\n"
- <> "integer, intent(in) :: pdg\n"
- <> "character(len=256) :: res\n"
- <> WO`Indent[MakeSelect[{WO`hash["pdg", #], "\"" <> ToString[#] <> "\""}& /@ WO`taglist,
- "call panic (\"FATAL: out of range in pdg_to_mass\")"], 3]
- <> "end function pdg_to_ident\n"
- <> "\n"
- <> "function pdg_to_spin (pdg) result(res)\n"
- <> "integer, intent(in) :: pdg\n"
- <> "integer :: res\n"
- <> WO`Indent[MakeSelect[{WO`hash["pdg", #],
- Switch[lr = WO`hash["lrep", #], "S", "0", "f"|"F"|"M", "1", "V", "2", _,
- Print["WARNING: oplotter can't deal with lrep " <> lr <> " , will treat as scalar..."];
- "0"]}& /@ WO`taglist, "call panic (\"FATAL: out of range in pdg_to_spin\")"], 3]
- <> "end function pdg_to_spin\n";
- ];
-
- DoCouplings[] := Module[{i, RenderCoupling, ProcessCoupling, pardefs},
-
- (* Renders a name / expression pair to a string *)
- RenderCoupling[name_, cpl_] :=
- WO`FortranSplit[name <> " = " <> ToString[FortranForm[cpl]]];
-
- (* Renders a coupling, taking care of the possibility of an array *)
- ProcessCoupling[cpl_] :=
- If[Head[cpl[[2]]] === List,
- WO`Concat[
- RenderCoupling[ToString[cpl[[1]]] <> "(" <> ToString[#[[1]]] <> ")", #[[2]]]& /@
- MapThread[{#1, #2}&, {Range[1, Length[cpl[[2]]]], cpl[[2]]}]
- , "\n"],
- RenderCoupling[ToString[cpl[[1]]], cpl[[2]]]
- ];
-
- (* Internal parameter definitions. *)
- pardefs = {#[[1]], #[[2]]}& /@ WO`IParamList;
- initparams = "subroutine init_parameters\n";
- (* The imperative approach grantees the correct order of execution. *)
- For[i = 1, i <= Length[pardefs], i++,
- initparams = initparams <> WO`Indent[ProcessCoupling[pardefs[[i]]], 3] <> "\n"];
- (* The order of the couplings is irrelevant, so we use the functional approach... :) *)
- initparams = initparams <> WO`Indent[WO`Concat[ProcessCoupling /@ WO`cpldeflist, "\n"], 3] <>
- "\nend subroutine init_parameters\n";
- initparams = StringReplace[initparams, RegularExpression["(\\d+\\.\\d*)"] -> "$1_double"];
- ];
-
- header = ""
- <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
- <> "\n"
- <> "module opl_" <> WO`oplname <> "\n"
- <> "implicit none\n"
- <> "save\n"
- <> "private\n"
- <> "\n"
- <> "public :: parameters, init_parameters, pdg_to_mass, pdg_to_spin, pdg_to_ident\n"
- <> "\n"
- <> "integer, parameter :: double=selected_real_kind (precision(1.) + 1, range(1.) + 1)\n"
- <> "real(kind=double), parameter, public :: fr_zero=0._double, one=1._double\n";
- footer = ""
- <> "end module opl_" <> WO`oplname <> "\n";
- contains = ""
- <> "contains\n"
- <> "\n"
- <> "subroutine panic (msg)\n"
- <> "character(len=*), intent(in) :: msg\n"
- <> " print *, msg\n"
- <> " call exit (1)\n"
- <> "end subroutine panic\n";
- DoParams[];
- DoTranslators[];
- DoCouplings[];
- contents = header <> "\n" <> namelist <> "\n" <> pardefs <> "\n" <> contains <> "\n"
- <> initparams <> "\n" <> translators <> "\n" <> footer;
- handle = OpenWrite [file];
- WriteString[handle, contents];
- Close[handle];
-];
-
-WO`WriteOplMdl[mdlfile_, grbfile_] := Module[{handle, contents},
- contents = ""
- <> WO`CommentMaker[WO`fileheader, "# ", "# ", ""] <> "\n\n"
- <>"models=\"$models " <> WO`oplname <> "\"\n"
- <> "\n"
- <> WO`oplname <> "_tag=\"" <> WO`omeganame <> "\"\n"
- <> "\n"
- <> WO`oplname <> "_name=\""
- <> StringReplace[M$ModelName, {"\"" -> "_", "'" -> "_"}] <> " (Mathematica interface)\"\n"
- <> "\n"
- <> WO`oplname <> "_mod=\"opl_" <> WO`oplname <> "\"\n"
- <> "\n"
- <> WO`oplname <> "_settings=\"OMEGA_DIR : directory containing the omega95 library and includes; mandadatory\"\n"
- <> WO`oplname <> "_setup() {\n"
- <> "\tLDFLAGS=\"$LDFLAGS -L$OMEGA_DIR -lomega95\"\n"
- <> "\tsrcfiles=\"$models_dir/opl_" <> WO`oplname <> ".f90 $srcfiles\"\n"
- <> "\tobjfiles=\"opl_" <> WO`oplname <> ".o $objfiles\"\n"
- <> "\tF95FLAGS=\"$F95FLAGS -I$OMEGA_DIR\"\n"
- <> "\tif grep -e \"use omega_parameters\" $amp; then\n"
- <> "\t\techo\n"
- <> "\t\techo \"patching $amp to include the correct modules...\"\n"
- <> "\t\trun \"sed -i -e 's/use omega_parameters/use opl_" <> WO`oplname <> "/' $amp\"\n"
- <> "\tfi\n"
- <> "}\n";
- handle = OpenWrite[mdlfile];
- WriteString[handle, contents];
- Close[handle];
- handle = OpenWrite[grbfile];
- WriteString[handle, WO`CommentMaker[WO`fileheader, "# ", "# ", ""] <> "\n\n" <>
- "opl_" <> WO`oplname <> ".mod opl_" <> WO`oplname <> ".o\n"];
- Close[handle];
-];
-
-
-(* Write the WHIZARD model file. *)
-WO`WriteWhizMdl[file_] := Module[{handle, content, header, params, DoParams, reprules={}, delimit,
- RegisterCvar, parts, vertices, DoParticles, DoVertices},
-
- (* A delimiter for prettyprinting. *)
- delimit = StringJoin @@ Table["#", {i, 1, 70}] <> "\n";
-
- (* Register a complex veriable in the replacement rules list (for 1.9x), noop for 2.0. *)
- RegisterCvar[var_] := If[WO`whizv19x[], AppendTo[reprules, RuleDelayed[
- RegularExpression["(\\W|^)" <> ToString[var] <> "(\\W|$)"],
- "$1(" <> ToString[var] <> "_r + " <> ToString[var] <> "_i * (0., 1.))$2"]]];
-
- (* Digest the parameters. Complex quantities are split into real and imaginary part as WHIZARD only *
- * handles real parameters. *)
- DoParams[] = Module[{epars, eparsc, ipars, i, tmp, cpars, cdecrules, formatNumber},
- (* Format a number *)
- formatNumber = ToString[FortranForm[SetPrecision[N[#], 10]]]&;
- (* External parameters from the list. *)
- epars = {#[[2, 1]], N[#[[2, -3]]], #[[2, -2]], #[[2, -1]]}& /@ Flatten[#[[2]]& /@ WO`EParamList, 1];
- (* Check whether we have to append alphas *)
- If[WO`whizv2x[],
- If[FreeQ[ToUpperCase[ToString[#]]& /@ WOSymbolsList, "ALPHAS"],
- WO`appendAlphas = ! FreeQ[#[[1]]& /@ epars, aS]
- ,
- WO`appendAlphas = False;
- Print[""
- <> "WARNING: A symbol called \"alphas\" has already been defined. "
- <> "As WHIZARD expect this to contain the value of \\alpha_s at the Z "
- <> "pole, running the strong coupling will not work as expected."
- ];
- ]
- ];
-
- (* Append the numerical masses and widths. *)
- AppendTo[epars,
- {#[[2]], N[#[[3]]], False,
- If[FreeQ[tmp = WO`hash["revpdg", #[[1, 1]]], WO`hash], ToString[tmp] <> " mass", "unknown mass, unphysical?"]}]& /@
- Select[WO`masslist, NumericQ[#[[3]]]&];
- AppendTo[epars,
- {#[[2]], N[#[[3]]], False,
- If[FreeQ[tmp = WO`hash["revpdg", #[[1, 1]]], WO`hash], ToString[tmp] <> " width", "unknown width, unphysical?"]}]& /@
- Select[WO`widthlist, NumericQ[#[[3]]]&];
- (* Remove duplicates. *)
- epars = WO`WeedOutList[epars, FreeQ[#2, #1[[1]]]&];
- (* Generate code and glue together. *)
- params = ""
- <> If[WO`whizv2x[], "# NEVER CHANGE THE ORDER OF THE PARAMETERS!!!\n\n", ""]
- <> delimit
- <> "# External Parameters\n"
- <> delimit
- <> "\n";
- (* For >= 2.0, the order must be consistent between the model file and the glue code -> use a loop. *)
- For[i = 1, i <= Length[epars], i++,
- If [epars[[i, 3]],
- params = params
- <> WO`ExtendString[WO`ExtendString["parameter " <> ToString[epars[[i, 1]]] <> "_r", 20]
- <> If[WO`whizv2x[], " = ", " "] <> formatNumber[Re[epars[[i, 2]]]], 35]
- <> " # " <> WO`StringSplit[
- epars[[i, 4]] <> " (real part)", 40, (StringJoin @@ Table[" ", {n, 1, 36}]) <> "# ", ""]
- <> "\n"
- <> WO`ExtendString[WO`ExtendString["parameter " <> ToString[epars[[i, 1]]] <> "_i", 20]
- <> If[WO`whizv2x[], " = ", " "] <> formatNumber[Im[epars[[i, 2]]]], 35]
- <> " # " <> WO`StringSplit[
- epars[[i, 4]] <> " (imaginary part)", 40, (StringJoin @@ Table[" ", {n, 1, 36}]) <> "# ", ""]
- <> "\n\n"
- ,
- params = params
- <> WO`ExtendString[WO`ExtendString["parameter " <> ToString[epars[[i, 1]]], 20]
- <> If[WO`whizv2x[], " = ", " "] <> formatNumber[epars[[i, 2]]], 35]
- <> " # " <> WO`StringSplit[
- epars[[i, 4]] <> If[WO`whizv2x[] && Not[FreeQ[{aS}, epars[[i, 1]]]],
- "\n(will be reset if \\alpha_S is evolved)", ""]
- , 40, (StringJoin @@ Table[" ", {n, 1, 36}]) <> "# ", ""]
- <> "\n\n";
- ]
- ];
- (* Generate replacement rules for the complex parameters. *)
- eparsc = Select[epars, #[[3]]&];
- RegisterCvar[#[[1]]]& /@ eparsc;
- (* The following hacks are specific to WHIZARD v1.9x *)
- If[WO`whizv19x[],
- (* Hack: WHIZARDs perl scripts won't accept the assignment of a number to a derived parameter, so *
- * rewrite this case as 1. * x *)
- AppendTo[reprules, RegularExpression["^\\s*(-?\\d+.?\\d*)\\s*$"] :> "1. * ($1)"];
- (* Another Hack: aimag expects a complex argument, but most intrinsic functions are defined as *
- * real. This hack forces FORTRAN to typecast. *)
- AppendTo[reprules, RegularExpression["AIMAG\\s*\\(\\s*-"] :> "aimag((-1., 0.) * "];
- AppendTo[reprules, RegularExpression["AIMAG\\s*\\("] :> "aimag((1., 0.) * "];
- ];
- params = params
- <> delimit
- <> "# Internal Parameters\n"
- <> delimit
- <> "\n";
- (* Digest the internal parameter. We use a loop to gurantee the correct order of execution. *)
- ipars = {#[[1]], #[[2]], #[[-2]], #[[-1]]}& /@ WO`IParamList;
- (* All complex parameters *)
- cpars = Join[#[[1]]& /@ eparsc, #[[1]]& /@ Select[ipars, #[[3]]&]];
- cdecrules = Flatten[({Rule[#, WO`real[#] + WO`I * WO`imag[#]], Rule[Conjugate[#], WO`real[#] - WO`I* WO`imag[#]]}&
- /@ cpars), 1] /. Rule -> RuleDelayed;
- For[i = 1, i <= Length[ipars], i++,
- If[WO`whizv2x[],
- If[ipars[[i, 3]],
- (* Preliminary handling of complex derived parameters in W2. Only works with polynomials. *)
- Catch[Module[{eepr, clist, ipart, rpart},
- eepr = Expand[ipars[[i, 2]] /. Join[cdecrules, {Complex[r_, i_] :> r + i * WO`I}]];
- clist = CoefficientList[eepr, WO`I];
- clist = Table[{i - 1, clist[[i]]}, {i, 1, Length[clist]}];
- rpart = Plus @@ (If[EvenQ[#[[1]]], I^#[[1]] * #[[2]], 0]& /@ clist);
- ipart = Plus @@ (If[OddQ[#[[1]]], I^(#[[1]] - 1) * #[[2]], 0]& /@ clist);
- If[Not[FreeQ[{rpart, ipart}, WO`I]],
- Print[""
- <> "Unable to extract real and imaginary parts from derived complex parameter "
- <> "\"" <> ToString[ipars[[i, 1]]] <> "\". The interface currently support a "
- <> "polynomial dependence on complex quantities. If you are sure that your "
- <> "derived parameters meet this requirement, it is time to file a BUG report..."
- ];
- Throw[Null];
- ];
- params = params <> StringReplace[
- WO`StringSplit["# " <> ipars[[i, 4]] <>
- If[Not[FreeQ[WO`RunParameters, ipars[[i, 1]]]],
- "\n(will be reset if \\alpha_S is evolved)", ""]
- , 68, "# ", ""] <> "\n"
- <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]] <> "_r", 15] <> " = "
- <> WO`SindarinSplit[WO`SindarinForm[rpart], 55, 18] <> "\n"
- <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]] <> "_i", 15] <> " = "
- <> WO`SindarinSplit[WO`SindarinForm[ipart], 55, 18] <> "\n\n",
- {RegularExpression["WOxreal\\((.*?)\\)"] :> "$1_r",
- RegularExpression["WOximag\\((.*?)\\)"] :> "$1_i"}];
- ]];
- ,
- If[Not[And @@ (FreeQ[ipars[[i, 2]], #]& /@ cpars)],
- Print[""
- <> "WARNING: the real derived parameter \"" <> ToString[ipars[[i, 1]]] <> "\" depends "
- <> "on a complex quantity. This is currently not supported with WHIZARD 2 and will be "
- <> "skipped - prepare for broken output..."
- ]
- ,
- params = params
- <> WO`StringSplit["# " <> ipars[[i, 4]] <>
- If[Not[FreeQ[WO`RunParameters, ipars[[i, 1]]]],
- "\n(will be reset if \\alpha_S is evolved)", ""]
- , 68, "# ", ""] <> "\n"
- <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]], 15] <> " = "
- <> WO`SindarinSplit[WO`SindarinForm[ipars[[i, 2]]], 55, 18] <> "\n\n"
- ];
- ];
- ,
- If[ipars[[i, 3]],
- params = params <> WO`StringSplit["# " <> ipars[[i, 4]], 68, "# ", ""] <> "\n"
- <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]] <> "_r", 15] <> " " <> WO`FortranSplit[
- "\"" <> WO`StringReplaceAll[ToString[FortranForm[Re[ipars[[i, 2]]]]], reprules] <> "\"",
- 55, 17] <> "\n"
- <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]] <> "_i", 15] <> " " <> WO`FortranSplit[
- "\" " <> WO`StringReplaceAll[ToString[FortranForm[Im[ipars[[i, 2]]]]], reprules] <> "\"",
- 55, 17] <> "\n\n";
- RegisterCvar[ipars[[i, 1]]];
- ,
- params = params <> WO`StringSplit["# " <> ipars[[i, 4]], 68, "# ", ""] <> "\n"
- <> WO`ExtendString["derived " <> ToString[ipars[[i, 1]]], 15] <> " " <> WO`FortranSplit
- ["\"" <> WO`StringReplaceAll[ToString[FortranForm[ipars[[i, 2]]]], reprules] <> "\"",
- 55, 17] <> "\n\n";
- ];
- ];
- ];
- (* Append alphas if requested *)
- If[WO`appendAlphas,
- params = params
- <> "# Strong coupling at the Z pole (required by WHIZARD)\n"
- <> "derived alphas = aS\n\n"
- ];
- (* W2: We need this to ensure the correct ordering in the glue interface. *)
- WO`paramlist = {#[[1]], #[[3]]}& /@ Join[epars, ipars];
- ];
-
- (* Build the particle list. *)
- DoParticles[] = Module[{plist, AppendParticle, WhizPname, AppendClass},
-
- (* Construct a sane name. *)
- WhizPname[s_] := Module[{i, c},
- c = "wp_" <> ToLowerCase[WO`SanitizeString[s]];
- i = 1;
- If[WO`hash["wpns", c] === True,
- While[WO`hash["wpns", c <> "_" <> ToString[i]] === True, i++];
- c = c <> "_" <> ToString[i];
- ];
- WO`hash["wpns", c] = True;
- c
- ];
-
- (* Build the definition block for one particle. TODO: the "parton" property is derived from color, *
- * singlets are no partons, all other particles are partons. This is hackish, but I see no other *
- * way to do this. *)
- AppendParticle[{name_, aname_, spin_, prop_, msym_, wsym_, crep_, plabel_, pdg_, descr_, tex_, atex_, gs_}] := Module[
- {thename, thetex, theaname, theatex},
- (* Make sure that we record the particle with positive PDG. *)
- If[pdg > 0,
- thename = name; thetex = tex; theaname = aname; theatex = atex
- ,
- thename = aname; thetex = atex; theaname = name; theatex = tex
- ];
- If[MatchQ[spin, U], Return[Null]];
- If[WO`hash["goldstone", ToString[thename]] && WO`gauge === WO`WOUnitarity, Return[Null]];
- WO`hash["whizname", name] = WO`hash["whizname", aname] = WhizPname[ToString[thename]];
- parts = parts <> "# particle: " <> ToString[descr] <> "\n"
- <> "particle " <> WO`ExtendString[WO`hash["whizname", thename], 10] <> " "
- <> WO`ExtendString[ToString[Abs[pdg]], 8] <> If[MatchQ[crep, T|O], " parton", ""] <> "\n"
- <> WO`Indent[""
- <> "spin " <> WO`ExtendString[Switch[spin, S, "0", F, "1/2", V, "1", T, "2"], 3]
- <> Switch[crep, T, " color 3", O, " color 8", _, ""] <> "\n"
- <> If[WO`whizv2x[], ""
- <> "name \"" <> ToString[thename] <> "\""
- <> "\ntex_name \"" <> ToString[thetex] <> "\"\n"
- <> If[name =!= aname, ""
- <> "anti \"" <> ToString[theaname] <> "\""
- <> "\ntex_anti \"" <> ToString[theatex] <> "\"\n", ""]
- , ""
- <> "name " <> WO`ExtendString["\"" <> ToString[thename] <> "\"", 7]
- <> If[thetex != thename, " tex:\"" <> ToString[thetex] <> "\"", ""] <> "\n"
- <> If[name =!= aname, ""
- <> "anti omega:" <> WO`ExtendString["\"" <> ToString[theaname] <> "\"", 7]
- <> If[theatex != theaname, " tex:\"" <> ToString[atex] <> "\"", ""] <> "\n",
- ""]
- ]
- <> If[msym =!= ZERO, "mass " <> ToString[WO`hash["mass", thename]] <> "\n", ""]
- <> If[wsym =!= ZERO, "width " <> ToString[wsym] <> "\n", ""]
- , 3] <> "\n";
- ];
-
- (* Adds a comment with the class name and then appends all particles in this class. *)
- AppendClass[{{cdef_, cname_}, partlist_}] := Module[{},
- (* Filter out ghosts and unphysical particles. *)
- If[Select[partlist, (#[[3]] =!= U)&] == {}, Return[Null]];
- parts = parts <> "# class: " <> ToString[cname] <> "\n" <> delimit <> "\n";
- AppendParticle /@ partlist;
- ];
-
- parts = ""
- <> delimit
- <> "# Particle definitions\n"
- <> delimit
- <> "\n";
- AppendClass /@ WO`PartList;
- If[WO`whizv2x[],
- parts = parts <> ""
- <> "# Hadrons\n"
- <> delimit
- <> "\n"
- <> "particle PROTON 2212\n"
- <> " spin 1/2 charge 1\n"
- <> " name p \"p+\"\n"
- <> " anti pbar \"p-\"\n"
- <> "\n"
- <> "particle HADRON_REMNANT 90\n"
- <> "\n"
- <> "particle HADRON_REMNANT_SINGLET 91\n"
- <> "\n"
- <> "particle HADRON_REMNANT_TRIPLET 92\n"
- <> " color 3\n"
- <> "\n"
- <> "particle HADRON_REMNANT_OCTET 93\n"
- <> " color 8"
- <> "\n\n";
- ];
- ];
-
- (* Construct the vertex list. *)
- DoVertices[] := Module[{nmasses, reprules, massrules, verts, Weight, i},
-
- (* Get the numeric mass of particle(s) . *)
- Weight[plist_List] := Plus @@ (Weight /@ plist);
- Weight[part_] := Module[{m},
- If[NumericQ[m = (part /. massrules)], m,
- If[WO`hash["mass", part] =!= ZERO,
- Print["WARNING: mass of particle " <> ToString[part] <> " could not be detemined, assuming 0..."]];
- 0
- ]
- ];
-
- (* Convert Parameters and numeric masses / widths into a replacement list. *)
- reprules = WO`WeedOutList[Join[{},
- Rule[#[[1]], #[[-3]]]& /@
- (#[[2]]& /@ Flatten[#[[2]]& /@ WO`EParamList, 1]),
- RuleDelayed[#[[1]], Evaluate[#[[2]]]]& /@ WO`IParamList,
- Rule[#[[2]], #[[3]]]& /@ Select[Join[WO`masslist, WO`widthlist], NumericQ[#[[3]]]&]
- ]];
- (* Try to calculate all masses by applying the replacement list. *)
- massrules =
- Select[{WO`hash["revpdg", #[[1, 1]]], #[[2]]}& /@ Simplify[WO`masslist //. reprules],
- NumericQ[#[[2]]]&];
- (* Make sure that the conjugated particles are also part of the game. *)
- massrules = Flatten[{#, {WO`hash["conj", ToString[#[[1]]]], #[[2]]}}& /@ massrules, 1];
- (* Weed out duplicates and create replacement list. *)
- massrules = WO`WeedOutList[(Rule @@ #)& /@ massrules];
- (* Get the vertex list, take care to replace CC with HC *)
- verts = Select[(PartName[#[[1]] /. CC -> WO`HC]& /@ #[[1]])& /@ WO`vlist, (Length[#] == 3)&];
- (* Drop all particles not known to WHIZARD. *)
- verts = Select[verts, (And @@ ((Head[WO`hash["whizname", #]] === String)& /@ #))&];
- (* Sort the list w.r.t. the total mass at the vertex. *)
- verts = Sort[verts, (Weight[#1] < Weight[#2])&];
- (* Write out the list; the For[] loop ensures the correct ordering. *)
- vertices = ""
- <> delimit
- <> "# vertex list (arity 3 only)\n"
- <> delimit
- <> "\n";
- For[i=1, i <= Length[verts], i++,
- vertices = vertices <> "vertex " <>
- WO`Concat[
- If[WO`whizv2x[], ("\"" <> # <> "\"")& /@ verts[[i]], verts[[i]]],
- " "] <> "\n"
- ];
- ];
-
- header = WO`CommentMaker[WO`fileheader, "# ", "# ", ""] <> "\n\n";
- DoParams[];
- DoParticles[];
- DoVertices[];
- content = header <> "\n" <>
- If[WO`whizv2x[],
- "model \"" <> WO`whizname <> "\"\n\n"
- ,
- ""
- ]
- <> params <> parts <> vertices;
- handle = OpenWrite[file];
- WriteString[handle, content];
- Close[handle];
-];
-
-WO`WriteWhizGlue[filestem_] := Module[{handle, content, pubdefs, header, footer, DoPubdefs, DoImport,
- global, local, master, couplings={}, i, VOpen, kind, preamble, namepre, import, run, DoRun,
- RenderCoupling},
-
- (* Verbose open a file. *)
- VOpen[file_] := (Print["Writing \"" <> file <> "\"..."]; OpenWrite[file]);
-
- (* These depends on the WHIZARD version. *)
- kind = If[WO`whizv2x[], "default", "omega_prec"];
- preamble = If[WO`whizv2x[],
- "use kinds\nuse constants, only: pi\n",
- "use omega_kinds !NODEP!\nuse omega_constants !NODEP!\nuse parameters\n"];
- namepre = If[WO`whizv2x[], "parameters_" <> WO`whizname, "omega_parameters_whizard"];
-
- (* Create the public definitions. *)
- DoPubdefs[] := Module[{reals, cmplxs},
- (* Reals are widths and masses. *)
- reals = WO`WeedOutList[ToString[#[[2]]]& /@ Join[WO`masslist, WO`widthlist]];
- (* If we are in Rxi gauge, we need to add the Rxi symbol. *)
- If[WO`gauge === WO`WORxi, AppendTo[reals, ToString[WO`gsym]]];
- (* Couplings are complex. *)
- cmplxs = (ToString[#[[1]]] <> If[Head[#[[2]]] === List, "(" <> ToString[Length[#[[2]]]] <> ")", ""])&
- /@ WO`cpldeflist;
- pubdefs = "real(kind="<> kind <> "), parameter :: fr_zero=0." <> If[WO`whizv19x[], ", one=1.\n", "\n"] <>
- If[reals != {}, ""
- <> "! masses and widths:\n"
- <> WO`FortranSplit["real(kind=" <> kind <> ") :: " <> WO`Concat[reals, ", "]] <> "\n",
- ""
- ] <> If[cmplxs != {}, ""
- <> "! vertex factors:\n"
- <> WO`FortranSplit["complex(kind=" <> kind <> ") :: " <> WO`Concat[cmplxs, ", "]] <> "\n",
- ""
- ];
- ];
-
- (* Render a coupling. *)
- RenderCoupling[{cpl_, defs_List}] := StringJoin @@
- (RenderCoupling[{cpl <> "(" <> ToString[#] <> ")", defs[[#]]}]& /@ Range[Length[defs]]);
- RenderCoupling[{cpl_, def_}] :=
- WO`FortranSplit[cpl <> " = " <>
- StringReplace[ToString[FortranForm[def]], RegularExpression["(\\d+\\.\\d*)"] :> ("$1_" <> kind)]
- ] <> "\n";
-
- DoImport[] := Module[{mwlist, pars, realdefs, reals, cmplxs, cpltmp={}},
-
- (* All external and internal parameters. *)
- pars = Join[
- {#[[2, 1]], #[[2, -2]]}& /@ Flatten[#[[2]]& /@ WO`EParamList, 1],
- {#[[1]], #[[-2]]}& /@ WO`IParamList
- ];
- (* All masses and widths. *)
- mwlist = #[[2]]& /@ Join[WO`masslist, WO`widthlist];
- (* We have to salvage all real parameters from the WHIZARD par structure (1.9x) resp. the array (2x). *)
- reals = WO`WeedOutList[Join[
- ToString[#[[1]]]& /@ Select[pars, Not[#[[2]]]&], ToString /@ mwlist]];
- (* Only the parameters which haven't already been declared globally (which excludes masses and widths) *
- * have to be declared locally. *)
- realdefs = WO`WeedOutList[ToString[#[[1]]]& /@ Select[pars, (Not[#[[2]]] && FreeQ[mwlist, #[[1]]])&]];
- (* If we are using Rxi gauge, we must filter out the Rxi symbol, which is already declared globally. *)
- If[WO`gauge === WO`WORxi,
- realdefs = Select[realdefs, (# != ToString[WO`gsym])&];
- ];
- (* All complex parameters have to be salvaged from WHIZARD, recombining real and imaginary parts. *)
- cmplxs = WO`WeedOutList[ToString[#[[1]]]& /@ Select[pars, #[[2]]&]];
- (* Build the expressions for calculating the couplings, splitting this properly in several blocks.*)
- For[i = 1, i <= Length[WO`cpldeflist], i++,
- AppendTo[cpltmp, RenderCoupling[WO`cpldeflist[[i]]]];
- If[Length[cpltmp] == WO`MaxCouplingsPerFile,
- AppendTo[couplings, cpltmp];
- cpltmp = {};
- ];
- ];
- If[Length[cpltmp] != 0, AppendTo[couplings, cpltmp]];
- (* Build the local declaration module. *)
- local = ""
- <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
- <> "\n"
- <> "module " <> namepre <> "_local\n"
- <> "use " <> namepre <> "_global\n"
- <> "implicit none\n"
- <> "public\n"
- <> "save\n"
- <> "\n"
- <> If[reals != {},
- WO`FortranSplit["real(kind=" <> kind <> ") :: " <> WO`Concat[realdefs, ", "]] <> "\n",
- ""]
- <> If[cmplxs != {},
- WO`FortranSplit["complex(kind=" <> kind <> ") :: " <> WO`Concat[cmplxs, ", "]] <> "\n",
- ""]
- <> "\n"
- <> "end module " <> namepre <> "_local";
- (* Build the import function. *)
- import = ""
- <> "subroutine import_from_whizard (par)\n"
- <> "use " <> namepre <> "_local\n"
- <> WO`Concat[Table["use " <> namepre <> "_cpl" <> ToString[i], {i, 1, Length[couplings]}], "\n"] <> "\n"
- <> If[WO`whizv19x[], ""
- <> "type(parameter_set), intent(in) :: par\n"
- <> "\n"
- <> WO`Indent[""
- <> StringJoin @@ ((# <> " = par%" <> # <> "\n")& /@ reals)
- <> StringJoin @@
- ((# <> " = par%" <> # <> "_r + par%" <> # <> "_i * (0._omega_prec, 1._omega_prec)\n")& /@ cmplxs), 3]
- , ""
- <> "real(kind=default), dimension("
- <> ToString[Plus @@ (If[#[[2]], 2, 1]& /@ WO`paramlist) + If[WO`appendAlphas, 1, 0]]
- <> "), intent(in) :: par\n"
- <> WO`Indent[Module[{val, j, par},
- val = "";
- j = 1;
- For[i = 1, i <= Length[WO`paramlist], i++,
- par = ToString[WO`paramlist[[i, 1]]];
- val = val <>
- If[WO`paramlist[[i, 2]],
- j = j + 2;
- par <> " = par(" <> ToString[j - 2] <> ") + par(" <> ToString[j - 1] <> ") * (0._default, 1._default)\n"
- ,
- j++;
- par <> " = par(" <> ToString[j - 1] <> ")\n"
- ]
- ];
- val
- ], 3]
- ]
- <> WO`Indent[WO`Concat[
- Table["call calc_cpl" <> ToString[i], {i, 1 Length[couplings]}], "\n"] <> "\n", 3]
- <> "end subroutine import_from_whizard\n";
- ];
-
- DoRun[] := Module[{epars, ipars, redefext, redefint, calcpl},
- epars = #[[2, 1]]& /@ Flatten[#[[2]]& /@ WO`EParamList, 1];
- ipars = {#[[1]], #[[2]]}& /@ WO`IParamList;
- redefext = StringJoin @@ Append[Switch[#
- , aS, " aS = alpha_s\n"
- , _, ""]& /@ epars, ""];
- redefint = StringJoin @@ Append[If[Not[FreeQ[WO`RunParameters, #[[1]]]]
- , WO`FortranSplit[" " <> ToString[#[[1]]] <> " = " <> StringReplace[
- ToString[FortranForm[#[[2]]]] <> "\n", RegularExpression["(\\d+\\.\\d*)"] :> ("$1_" <> kind)], 67, 3]
- , ""]& /@ ipars, ""];
- calcpl = If[Length[WO`runningcouplings] > 0
- , WO`Indent[StringJoin @@ (RenderCoupling[WO`cpldeflist[[WO`runningcouplings[[#]]]]]& /@
- Range[Length[WO`runningcouplings]]), 3]
- , ""
- ];
- run = ""
- <> "subroutine model_update_alpha_s (alpha_s)\n"
- <> "use " <> namepre <> "_local\n"
- <> "real(kind=default), intent(in) :: alpha_s\n"
- <> ""
- <> redefext
- <> redefint
- <> calcpl
- <> "end subroutine model_update_alpha_s\n"
- ];
-
- DoPubdefs[];
- DoImport[];
- DoRun[];
- global = ""
- <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
- <> "\n"
- <> "module " <> namepre <> "_global\n"
- <> preamble
- <> "implicit none\n"
- <> "public\n"
- <> "private :: sec_re, sec_cmplx, csc_re, csc_cmplx\n"
- <> "save\n"
- <> "\n"
- <> pubdefs
- <> "\n"
- <> "interface sec\n"
- <> " module procedure sec_re\n"
- <> " module procedure sec_cmplx\n"
- <> "end interface sec\n"
- <> "\n"
- <> "interface csc\n"
- <> " module procedure csc_re\n"
- <> " module procedure csc_cmplx\n"
- <> "end interface csc\n"
- <> "\n"
- <> "contains\n"
- <> "\n"
- <> "function sec_re (x) result (y)\n"
- <> "real(kind=" <> kind <> "), intent(in) :: x\n"
- <> "real(kind=" <> kind <> ") :: y\n"
- <> " y = 1._" <> kind <> " / cos (x)\n"
- <> "end function sec_re\n"
- <> "\n"
- <> "function sec_cmplx (x) result (y)\n"
- <> "complex(kind=" <> kind <> "), intent(in) :: x\n"
- <> "complex(kind=" <> kind <> ") :: y\n"
- <> " y = 1._" <> kind <> " / cos (x)\n"
- <> "end function sec_cmplx\n"
- <> "\n"
- <> "function csc_re (x) result (y)\n"
- <> "real(kind=" <> kind <> "), intent(in) :: x\n"
- <> "real(kind=" <> kind <> ") :: y\n"
- <> " y = 1._" <> kind <> " / cos (x)\n"
- <> "end function csc_re\n"
- <> "\n"
- <> "function csc_cmplx (x) result (y)\n"
- <> "complex(kind=" <> kind <> "), intent(in) :: x\n"
- <> "complex(kind=" <> kind <> ") :: y\n"
- <> " y = 1._" <> kind <> " / cos (x)\n"
- <> "end function csc_cmplx\n"
- <> "\n"
- <> "end module " <> namepre <> "_global";
- master = ""
- <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
- <> "\n"
- <> "module " <> namepre <> "\n"
- <> "use " <> namepre <> "_global\n"
- <> "implicit none\n"
- <> "public\n"
- <> "private :: sec, csc\n"
- <> "save\n"
- <> "\n"
- <> "contains\n"
- <> "\n"
- <> import
- <> "\n"
- <> If[WO`whizv2x[], run <> "\n", ""]
- <> "end module " <> namepre;
- handle = VOpen[filestem <> ".global.f90"];
- WriteString[handle, global];
- Close[handle];
- (* Make sure no old coupling modules are lying around. *)
- (
- Print["Deleting " <> # <> " ..."];
- If [DeleteFile[#] === $Failed, Throw["ERROR: unable to delete " <> #, WO`EAbort]];
- )& /@ Select[FileNames[filestem <> "*f90"], StringMatchQ[#,
- RegularExpression[StringReplace[filestem, "." -> "\\."] <> "\\.cpl\\d+\\.f90"]]&];
-
- For[i=1, i <= Length[couplings], i++,
- handle = VOpen[filestem <> ".cpl" <> ToString[i] <> ".f90"];
- WriteString[handle, ""
- <> WO`CommentMaker[WO`fileheader, "! ", "! ", ""] <> "\n"
- <> "\n"
- <> "module " <> namepre <> "_cpl" <> ToString[i] <> "\n"
- <> "use " <> namepre <> "_global\n"
- <> "use " <> namepre <> "_local\n"
- <> "implicit none\n"
- <> "\n"
- <> "contains\n"
- <> "\n"
- <> "subroutine calc_cpl" <> ToString[i] <> "\n"
- <> WO`Indent[StringJoin @@ couplings[[i]], 3]
- <> "end subroutine calc_cpl" <> ToString[i] <> "\n"
- <> "\n"
- <> "end module " <> namepre <> "_cpl" <> ToString[i]
- ];
- Close[handle];
- ];
- handle = VOpen[filestem <> ".local.f90"];
- WriteString[handle, local];
- Close[handle];
- handle = VOpen[filestem <> ".f90"];
- WriteString[handle, master];
- Close[handle];
-];
-
-
-(* ********************************************************************
- The functions below are for im- and export of external parameters.
- ******************************************************************** *)
-
-WO`WriteExtParams[file_String, options___] := Module[{parlist, outfile, omode, content,
- epars, handle, unknownopts, modelname},
- (* Check for unknown options. *)
- If[Length[unknownopts =
- Select[#[[1]]& /@ {options}, FreeQ[#[[1]]& /@ Options[WO`WriteExtParams], #]&]] > 0,
- Print["ERROR: WO`WriteExtParams: unknown option(s) " <> WO`Concat[ToString /@ unknownopts, " , "]];
- Return[Null];
- ];
-
- (* Setup environment *)
- WO`GlobalSetup[];
- WO`EParamList = WO`WOEParamList /. {options} /. Options[WO`WriteExtParams];
- WO`masslist = WO`WOMassList /. {options} /. Options[WO`WriteExtParams];
- WO`widthlist = WO`WOWidthList /. {options} /. Options[WO`WriteExtParams];
- WO`whizv = WO`WOWhizardVersion /. {options} /. Options[WO`WriteExtParams];
- modelname = WO`WOModelName /. {options} /. Options[WO`WriteExtParams];
- Catch[WO`whizvn[], WO`EAbort, (Print["ERROR: invalid WHIZARD version"]; Return[])&];
-
- (* Determine the output file. *)
- outfile = If[file == "",
- WO`SanitizeString[modelname] <> If[WO`whizv2x[], ".sin", ".in"], file];
- outfile = If[StringMatchQ[file, RegularExpression["^\\s*" <> WO`fileSlashRE <> ".*"]], outfile,
- Directory[] <> WO`fileSlash <> outfile];
- Print[""
- <> "Writing external parameters to file\n"
- <> " \"" <> outfile <> "\"\n"
- <> "in " <> If[WO`whizv2x[], "WHIZARD 2.x sindarin", "WHIZARD 1.9x namelist"] <> " format..."
- ];
-
- (* Prepare the parameter list. *)
- epars = {#[[2, 1]], #[[2, -3]], #[[2, -2]]}& /@ Flatten[#[[2]] & /@ WO`EParamList, 1];
- parlist = WO`WeedOutList[Join[
- ({ToString[#[[1]]], #[[2]]}& /@ Select[epars, (! #[[3]])&]),
- Flatten[{
- {ToString[#[[1]]] <> "_r", N[Re[#[[2]]]]}, {ToString[#[[1]]] <> "_i", N[Im[#[[2]]]]}
- }& /@ Select[epars, #[[3]]&], 1],
- Select[{ToString[#[[2]]], #[[3]]} & /@ Join[WO`masslist, WO`widthlist], NumericQ[#[[2]]]&]
- ], FreeQ[#2, #1[[1]]]&];
-
- (* Create the contents of the parameter file *)
- content = If[WO`whizv2x[], "", "&parameter_input\n"];
- (
- content = content <> If[WO`whizv2x[], "", " "] <> #[[1]] <> " = " <> ToString[#[[2]]] <> "\n"
- )& /@ parlist;
- content = content <> If[WO`whizv2x[], "", "/\n"];
-
- (* Write out. *)
- handle = OpenWrite[outfile];
- WriteString[handle, content];
- Close[handle];
- (* Finito. *)
- Print["... done!"];
-];
-WO`WriteExtParams[options___] := WO`WriteExtParams["", options];
Index: branches/speckner/FeynRulesInterface/FeynRulesPackage.patch
===================================================================
--- branches/speckner/FeynRulesInterface/FeynRulesPackage.patch (revision 3972)
+++ branches/speckner/FeynRulesInterface/FeynRulesPackage.patch (revision 3973)
@@ -1,17 +0,0 @@
---- a/FeynRulesPackage.m 2010-01-07 12:59:46.000000000 +0100
-+++ b/FeynRulesPackage.m 2010-01-07 12:59:47.000000000 +0100
-@@ -1024,6 +1024,7 @@
- << "CalcHepInterface.m";
- << "TeXInterface.m";
- << "FeynArtsInterface.m";
-+ << "WhizardOmegaInterface.m";
-
- End[]
- ];
-@@ -1069,5 +1070,5 @@
- AntiParticleName, Goldstone, Ghost, QuantumNumbers, TeXParticleName, TeXAntiParticleName, Abelian, GaugeBoson, CouplingConstant, StructureConstant, SymmetricTensor,
- Representations, Colour, Gauge, Lorentz, Spin, IndexDelta, Ext, External, Internal, ParameterType, Value, Unitary,
- Orthogonal, Hermitian, TensorClass, Description, TeX, BlockName, AllowSummation, InteractionOrder, QCD, QED, ComplexParameter, ScreenOutput, Name,
-- MinCanonicalDimension, MaxCanonicalDimension, TeXOutput, WriteMGOutput, WriteSHOutput, WriteCHOutput, WriteFeynArtsOutput, ConservedQuantumNumbers, MASS, DECAY,
-+ MinCanonicalDimension, MaxCanonicalDimension, TeXOutput, WriteMGOutput, WriteSHOutput, WriteCHOutput, WriteFeynArtsOutput, WriteWOOutput, ConservedQuantumNumbers, MASS, DECAY,
- ZERO, NoUnfold, FRBlock, NoValue, NoPDG, NoBlockName, PutIndices, PrePutIndices, GetFieldContent, PrintLagrangian, FR$VersionNumber]
Index: branches/speckner/FeynRulesInterface/ChangeLog
===================================================================
--- branches/speckner/FeynRulesInterface/ChangeLog (revision 3972)
+++ branches/speckner/FeynRulesInterface/ChangeLog (revision 3973)
@@ -1,51 +0,0 @@
-From 2010.10.17 to 2011.12.08
-===============================================================================
-- Bug fixes
-- Internal restructuring
-
-From 2010.10.17 to 2010.10.18
-===============================================================================
-
-- Add correct preprint number to messages.
-
-From 2010.07.08 to 2010.10.17
-===============================================================================
-
-- Support WHIZARD 1.96.
-
-- WOWhizardVersion -> 2.0.3 is the default now.
-
-- Minor optimization in O'Mega models: vanishing widths are now defined as
- vanishing instead of a numeric zero.
-
-- Major hardening of the color flow code: all flows unsupported by O'Mega
- should now be reliably rejected. Fix a bug that could lead to a wrong
- phase assignment at 888 type vertices with different flavors.
-
-- Replace WOVertexList with input, no Lagrangian required anymore when using
- this option.
-
-- Add INSTALL to output.
-
-- Code for decomposing complex internal variables into real and imaginary
- parts significantly enhanced and optimized.
-
-- Fix handling of Pi in output for WO 1.9x
-
-- Fix formatting of really small numbers in generated model files, would cause
- breakage before.
-
-From 2010.06.27 to 2010.07.08:
-===============================================================================
-
-- Support trilinear part of the operator
- H tr G^{\mu\nu} G_{\mu\nu}
- (aka effective hgg / haa / hza coupling)
-
-- Support for the upcoming WHIZARD 2.0.3 via WOWhizardVersion -> 2.0.3 (not
- yet the default).
-
-- Fix automagic goldstone masses in WHIZARD (in O'Mega, they were OK though,
- so this bug effectively only concerned processes with external goldstones).
-
-- Add this ChangeLog to the tarball :)
Index: branches/speckner/FeynRulesInterface/README
===================================================================
--- branches/speckner/FeynRulesInterface/README (revision 3972)
+++ branches/speckner/FeynRulesInterface/README (revision 3973)
@@ -1,32 +0,0 @@
-This directory contains the preliminary interface between FeynRules and
-WHIZARD. Please use the provided install.sh script to install the interface
-into a FeynRules 1.4.0 - 1.4.8 tree (which is the most recent version at the time
-of writing).
-
-The interface can be accessed via WriteWOOutput in the same way as the other
-interfaces already provided with FeynRules. In addition to the common interface
-options, it also takes some special options like e.g. WOWhizardVersion. To get a
-list of all the options, use
-
- ?WO*
-
-in a FeynRules session, and a description of any particular option can be
-obtained via "?" in the usual way, e.g.
-
- ?WOWhizardVersion
-
-The interface can generate output for WHIZARD versions 1.92, 1.93 and 2.0 (the
-latter being the default). The output for both 1.9x and 2.0 is complete and has
-been verified for a number of model.
-
-If you are generating output for 1.9x, use the "inject" script (which is
-copied to the output) directory to merge the generated model files into
-the WHIZARD tree. After reconfiguring WHIZARD, the new models can be used just
-like the built-in ones.
-
-In order to use the interface with WHIZARD2, you need at least 2.0.rc4 (or
-a SVN checkout of >= r2034). In the FeynRules output directory, perform the usual
-"./configure; make clean; make install" magic to install the model files into
-~/.whizard (see "configure --help", especially the part on WO_CONFIG, if
-WHIZARD is not included in $PATH). After "make install", the generated models
-can be used like the built-in ones.
Index: branches/speckner/FeynRulesInterface/examples/wo_test_sm_1.92.m
===================================================================
--- branches/speckner/FeynRulesInterface/examples/wo_test_sm_1.92.m (revision 3972)
+++ branches/speckner/FeynRulesInterface/examples/wo_test_sm_1.92.m (revision 3973)
@@ -1,4 +0,0 @@
-$FeynRulesPath = SetDirectory["."];
-<< FeynRules`;
-LoadModel["Models/SM/SM.fr"];
-WriteWOOutput[LSM, WOWhizardVersion->"1.92"];
Index: branches/speckner/FeynRulesInterface/examples/wo_test_sm_1.93.m
===================================================================
--- branches/speckner/FeynRulesInterface/examples/wo_test_sm_1.93.m (revision 3972)
+++ branches/speckner/FeynRulesInterface/examples/wo_test_sm_1.93.m (revision 3973)
@@ -1,4 +0,0 @@
-$FeynRulesPath = SetDirectory["."];
-<< FeynRules`;
-LoadModel["Models/SM/SM.fr"];
-WriteWOOutput[LSM, WOWhizardVersion->"1.93"];
Index: branches/speckner/FeynRulesInterface/examples/wo_test_sm_2.00.m
===================================================================
--- branches/speckner/FeynRulesInterface/examples/wo_test_sm_2.00.m (revision 3972)
+++ branches/speckner/FeynRulesInterface/examples/wo_test_sm_2.00.m (revision 3973)
@@ -1,4 +0,0 @@
-$FeynRulesPath = SetDirectory["."];
-<< FeynRules`;
-LoadModel["Models/SM/SM.fr"];
-WriteWOOutput[LSM, WOWhizardVersion->"2.0"];
Index: branches/speckner/FeynRulesInterface/install.sh
===================================================================
--- branches/speckner/FeynRulesInterface/install.sh (revision 3972)
+++ branches/speckner/FeynRulesInterface/install.sh (revision 3973)
@@ -1,102 +0,0 @@
-#!/bin/sh
-
-die() {
- [ -n "$1" ] && echo $1
- exit 1
-}
-
-mrmkdir() {
- echo "creating directory \"$1\" ..."
- mkdir -p "$1" || die "ERROR creating directory \"$1\" !"
-}
-
-mrcp() {
- echo "copying file \"$1\" to \"$2\" ..."
- cp "$1" "$2" || die "ERROR copying file \"$1\" !"
-}
-
-usage() {
- test -n "$1" && echo "$1"
- cat << EOI
-usage: install.sh [options] path_to_feyrules
-
-valid options are:
-
- -h, --help : show this help screen
- -f, --force : override version check
-EOI
- test -n "$1" && exit 1
- exit
-}
-
-if test -z "$1"; then
- usage
-fi
-
-while test -z "$break"; do
- case $1 in
- "-h"|"--help") usage ;;
- "-f"|"--force") force=1 ;;
- *)
- test -z "$2" || usage "unknown option: \"$1\""
- break=1
- ;;
- esac
- test -z "$break" && shift
-done
-
-[ -f "./FeynRulesPackage.patch" ] || die \
- "ERROR: please call from the FeynRules installation directory!"
-
-[ -f "$1/FeynRulesPackage.m" ] || die \
- "ERROR: \"$1\" does not point to a FeynRules installation!"
-
-vstring=`grep 'FR$VersionNumber =' "$1/FeynRulesPackage.m" |
- sed 's/^ *FR\$VersionNumber *= *"\(.*\)";/\1/'`
-test -z "$force" && test `echo $vstring | sed "s/\.//g"` -ge 149 && die \
- 'ERROR: Unsupported FeynRules version - please use 1.4.0 - 1.4.8
-(or try "-f" to override the versio check)!'
-
-[ -f "$1/Interfaces/WhizardOmegaInterface.m" ] && die \
- "ERROR: Interface is already installed, please use a fresh FeynRules installation!"
-
-#
-cat <<EOI
-copying files...
-===
-EOI
-dirs=`find ./Interfaces -not -regex '.*\.svn.*' -type d`
-files=`find ./Interfaces -not -regex '.*\.svn.*' -type f`
-efiles=`find ./examples -not -regex '.*\.svn.*' -type f`
-for dir in $dirs; do
- [ -d "$1/$dir" ] || mrmkdir "$1/$dir"
-done
-for file in $files; do
- mrcp "$file" "${1%/}/${file%/*}"
-done
-for file in $efiles; do
- mrcp "$file" "$1"
-done
-
-#
-cat <<EOI
-===
-
-patching files...
-===
-EOI
-patch -d "$1" -p1 < "FeynRulesPackage.patch" || die \
- "ERROR applying patch"
-
-#
-cat << EOI
-===
-
-... all done! In order to verify the installation, you can run the examples
-which have been copied to "$1" like e.g.
-
- cd "$1"
- math < wo_test_sm_1.93.m
-
-(remember to wipe StandardModelWO prior to running any of the tests).
-EOI

File Metadata

Mime Type
text/x-diff
Expires
Tue, Sep 30, 5:52 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6566396
Default Alt Text
(660 KB)

Event Timeline