
(* description = "pp -> V+jets|pp -> Z/A(->ll)+jets|pp -> ll(j)|Loop-squared off-shell Z/A boson production with leptonic decay (l+l- and nn) plus zero or one jet (nf=5 and nf=6 available)." *)

SelectInterference = {eQED -> 4};
CreateTopologiesOptions = {ExcludeTopologies -> {Snails, WFCorrectionCTs, TadpoleCTs, Loops[5]}};

loop2approx = {
  SelectLoopDiagrams -> (ContainsFermionLoop[##] && ParticlesOnLoop[V[1|2],1][##] &),
  SelectTreeDiagrams -> (False &),
  SelectCTDiagrams -> NFieldPropagators[V[5],1]
};

loop2approxnf5 = {
  SetParameters -> JoinOptions[{ME -> 0, MB -> 0, nf -> 5}],
  InsertFieldsOptions -> {Restrictions -> {ExcludeParticles -> {F[3,{3}]}, NoQuarkMixing}},
  SelectLoopDiagrams -> (ContainsFermionLoop[##] && ParticlesOnLoop[V[1|2],1][##] &),
  SelectTreeDiagrams -> (False &),
  SelectCTDiagrams -> NFieldPropagators[V[5],1]
};

nf5 = {
        SetParameters -> JoinOptions[{ME -> 0, YE -> 0, MB -> 0, nf -> 5}]
};

(* Z nf=6 *)

(* eexgg   *) AddProcess[FeynArtsProcess -> {V[5], V[5]} -> {F[2,{1}], -F[2,{1}]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}]];
(* nenexgg *) AddProcess[FeynArtsProcess -> {V[5], V[5]} -> {F[1,{1}], -F[1,{1}]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}]];

(* eexddx   *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[2,{1}], -F[2,{1}]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}]];
(* eexuux   *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[2,{1}], -F[2,{1}]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}]];
(* nenexddx *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[1,{1}], -F[1,{1}]}];
(* nenexuux *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[1,{1}], -F[1,{1}]}];
(* eexbbx   *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[2,{1}], -F[2,{1}]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}]];
(* nenexbbx *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[1,{1}], -F[1,{1}]}];


(* Z nf=5 *)

(* eexgg   *) AddProcess[FeynArtsProcess -> {V[5], V[5]} -> {F[2,{1}], -F[2,{1}]}, Sequence @@ nf5];
(* nenexgg *) AddProcess[FeynArtsProcess -> {V[5], V[5]} -> {F[1,{1}], -F[1,{1}]}, Sequence @@ nf5];
(* eexddx   *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[2,{1}], -F[2,{1}]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}], Sequence @@ nf5];
(* eexuux   *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[2,{1}], -F[2,{1}]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}], Sequence @@ nf5];
(* nenexddx *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[1,{1}], -F[1,{1}]}, Sequence @@ nf5];
(* nenexuux *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[1,{1}], -F[1,{1}]}, Sequence @@ nf5];
(* eexbbx   *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[2,{1}], -F[2,{1}]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}], Sequence @@ nf5];
(* nenexbbx *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[1,{1}], -F[1,{1}]}, Sequence @@ nf5];


(* W nf=6 *)

(* neexuxd *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[3,{1}]} -> {F[2,{1}], -F[1,{1}]}, SetParameters -> JoinOptions[{ME -> 0}]];
(* nexeudx *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[4,{1}]} -> {F[1,{1}], -F[2,{1}]}, SetParameters -> JoinOptions[{ME -> 0}]];


(* Zj nf=6 *)

(* eexggg    *) AddProcess[FeynArtsProcess -> {V[5], V[5]} -> {F[2,{1}], -F[2,{1}], V[5]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}]];
(* nenexggg  *) AddProcess[FeynArtsProcess -> {V[5], V[5]} -> {F[1,{1}], -F[1,{1}], V[5]}, SetParameters -> JoinOptions[{ME -> 0, YE -> 0}]];

(* eexuuxg   *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ loop2approx];
(* nenexuuxg *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ loop2approx];

(* eexddxg   *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ loop2approx];
(* nenexddxg *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ loop2approx];

(* eexbbxg   *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ loop2approx];
(* nenexbbxg *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ loop2approx];

(* eexddxg   *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[2,{1}], -F[2,{1}], V[5]}, SetParameters -> JoinOptions[{ME -> 0}], Approximation -> "fulll2"];
(* eexuuxg   *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[2,{1}], -F[2,{1}], V[5]}, SetParameters -> JoinOptions[{ME -> 0}], Approximation -> "fulll2"];
(* nenexddxg *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Approximation -> "fulll2"];
(* nenexuuxg *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Approximation -> "fulll2"];

(* eexbbxg   *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[2,{1}], -F[2,{1}], V[5]}, SetParameters -> JoinOptions[{ME -> 0}], Approximation -> "fulll2"];
(* nenexbbxg *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Approximation -> "fulll2"];


(* Zj nf=5 *)

(* eexggg    *) AddProcess[FeynArtsProcess -> {V[5], V[5]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ nf5];
(* nenexggg  *) AddProcess[FeynArtsProcess -> {V[5], V[5]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ nf5];

(* eexuuxg   *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ loop2approxnf5];
(* nenexuuxg *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ loop2approxnf5];

(* eexddxg   *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ loop2approxnf5];
(* nenexddxg *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ loop2approxnf5];

(* eexbbxg   *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ loop2approxnf5];
(* nenexbbxg *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ loop2approxnf5];

(* eexuuxg   *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ nf5,  Approximation -> "fulll2"];
(* nenexuuxg *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[3,{1}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ nf5,  Approximation -> "fulll2"];

(* eexddxg   *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ nf5,  Approximation -> "fulll2"];
(* nenexddxg *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[4,{1}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ nf5,  Approximation -> "fulll2"];

(* eexbbxg   *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[2,{1}], -F[2,{1}], V[5]}, Sequence @@ nf5,  Approximation -> "fulll2"];
(* nenexbbxg *) AddProcess[FeynArtsProcess -> {F[4,{3}], -F[4,{3}]} -> {F[1,{1}], -F[1,{1}], V[5]}, Sequence @@ nf5,  Approximation -> "fulll2"];


(* Wj nf=6 *)

(* neexuxdg *) AddProcess[FeynArtsProcess -> {F[4,{1}], -F[3,{1}]} -> {F[2,{1}], -F[1,{1}], V[5]}, SetParameters -> JoinOptions[{ME -> 0}], Approximation -> "fulll2"];
(* nexeudxg *) AddProcess[FeynArtsProcess -> {F[3,{1}], -F[4,{1}]} -> {F[1,{1}], -F[2,{1}], V[5]}, SetParameters -> JoinOptions[{ME -> 0}], Approximation -> "fulll2"];







