dim6top: dim6top.m

File dim6top.m, 27.9 KB (added by gdurieux, 3 months ago)
Line 
1(* ::Package:: *)
2
3(*
4run
5math -initfile dim6top.m
6having set
7$Path = Join[{ToFileName[$HomeDirectory, ".../feynrules-current"]}, $Path]
8$FeynRulesPath = ToFileName[$HomeDirectory, ".../feynrules-current"]
9in ~/.Mathematica/Kernel/init.m
10*)
11
12
13Print["--- Set Feynman gauge"]
14FeynmanGauge = True;
15
16Print["--- Load FeynRules"];
17FR$Parallel = True;
18<<FeynRules`
19
20Print["--- Load models"];
21(*LoadModel[ ToFileName[$FeynRulesPath,"Models/SM/SM.fr"],"dim6top_each_coupling_order.fr"];*)
22LoadModel[ ToFileName[$FeynRulesPath,"Models/SM/SM.fr"],"dim6top.fr"];
23
24Print["--- Load restriction"];
25LoadRestriction[ToFileName[$FeynRulesPath,"Models/SM/DiagonalCKM.rst"]]
26Print["--- Load restriction"];
27LoadRestriction[ToFileName[$FeynRulesPath,"Models/SM/Massless.rst"]]
28(*Print["--- Load restriction"];
29LoadRestriction["dim6top.rst"];*)
30
31(*
32Print["--- Get vertices"]
33verttot =<<saved_verttot ;
34
35Print["--- Write UFO model with those"]
36WriteUFO[
37        {},Input->verttot,
38        AddDecays->False,
39        (*Output->"dim6top_LO_UFO"*)
40        Output->"dim6top_LO_UFO_each_coupling_order"
41];
42Exit[];
43*)
44
45
46Print["--- Define operators"];
47(* Sigma[mu_,nu_, sp1_,sp2_] = I/2 (Ga[mu,sp1,sp5] Ga[nu,sp5,sp2] - Ga[nu,sp1,sp5] Ga[mu,sp5,sp2]); *)
48   Sigma[mu_,nu_, sp1_,sp2_] = I   (Ga[mu,sp1,sp5] Ga[nu,sp5,sp2] - ME[mu,nu] IndexDelta[sp1,sp2] );
49
50(** 2q Hermitian **)
51Ophiq1  = Cphiq1[f1,f2]  I (Phibar[k1]DC[Phi[k1],mu]-DC[Phibar[k1],mu]Phi[k1])               (QLbar[sp1,k3,f1,c1].QL[sp2,k3,f2,c1] Ga[mu,sp1,sp2]) ;
52Ophiq3  = Cphiq3[f1,f2]  I (Phibar[k1]DC[Phi[k2],mu]-DC[Phibar[k1],mu]Phi[k2]) PS[j1,k1,k2]  (QLbar[sp1,k3,f1,c1].QL[sp2,k4,f2,c1] Ga[mu,sp1,sp2]) PS[j1,k3,k4] ;
53Ophiu   = Cphiu [f1,f2]  I (Phibar[k1]DC[Phi[k1],mu]-DC[Phibar[k1],mu]Phi[k1])               (uRbar[sp1,   f1,c1].uR[sp2,   f2,c1] Ga[mu,sp1,sp2]) ;
54Ophid   = Cphid [f1,f2]  I (Phibar[k1]DC[Phi[k1],mu]-DC[Phibar[k1],mu]Phi[k1])               (dRbar[sp1,   f1,c1].dR[sp2,   f2,c1] Ga[mu,sp1,sp2]) ;
55(** 2q non-Hermitian **)
56Ophiud = Cphiud[f1,f2] I Phi[k1] DC[Phi[k2],mu]        Eps[k1,k2]             (uRbar[sp1,   f1,c1].dR[sp2,f2,c1]) Ga[mu,sp1,sp2] ;
57Ouphi  = Cuphi [f1,f2] (Phibar[k3] Phi[k3]-vev^2/2)  Phibar[k2] Eps[k1,k2]  (QLbar[sp1,k1,f1,c1].uR[sp1,f2,c1]) ;
58OdW    = CdW   [f1,f2] FS[Wi,mu,nu,j1]    Phi[k2]              PS[j1,k1,k2] (QLbar[sp1,k1,f1,c1].dR[sp2,f2,c1]) Sigma[mu,nu,sp1,sp2] ;
59OuW    = CuW   [f1,f2] FS[Wi,mu,nu,j1]    Phibar[k2] Eps[k3,k2]PS[j1,k1,k3] (QLbar[sp1,k1,f1,c1].uR[sp2,f2,c1]) Sigma[mu,nu,sp1,sp2] ;
60OuB    = CuB   [f1,f2] FS[B ,mu,nu   ]    Phibar[k2] Eps[k1,k2]             (QLbar[sp1,k1,f1,c1].uR[sp2,f2,c1]) Sigma[mu,nu,sp1,sp2] ;
61OuG    = CuG   [f1,f2] FS[G ,mu,nu,a1]    Phibar[k2] Eps[k1,k2]             (QLbar[sp1,k1,f1,c1].uR[sp2,f2,c2]) Sigma[mu,nu,sp1,sp2] T[a1,c1,c2];
62(* 2l2t *)
63Olq1 = Clq1[f3,f4,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k1,f2,c1] Ga[mu,sp1,sp2]) (LLbar[sp3,k3,f3].LL[sp4,k3,f4] Ga[mu,sp3,sp4]) ;
64Olq3 = Clq3[f3,f4,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k2,f2,c1] Ga[mu,sp1,sp2]) (LLbar[sp3,k3,f3].LL[sp4,k4,f4] Ga[mu,sp3,sp4])  PS[j1,k1,k2] PS[j1,k3,k4] ;
65Olu  = Clu [f3,f4,f1,f2] (uRbar[sp1,   f1,c1].uR[sp2,   f2,c1] Ga[mu,sp1,sp2]) (LLbar[sp3,k3,f3].LL[sp4,k3,f4] Ga[mu,sp3,sp4]) ;
66Oeq  = Ceq [f3,f4,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k1,f2,c1] Ga[mu,sp1,sp2]) (lRbar[sp3,   f3].lR[sp4,   f4] Ga[mu,sp3,sp4]) ;
67Oeu  = Ceu [f3,f4,f1,f2] (uRbar[sp1,   f1,c1].uR[sp2,   f2,c1] Ga[mu,sp1,sp2]) (lRbar[sp3,   f3].lR[sp4,   f4] Ga[mu,sp3,sp4]) ;
68(* 2l2q scalar and tensor *)
69Olequ1 = Clequ1[f3,f4,f1,f2]  (LLbar[sp3,k3,f3].lR[sp3,f4]) (QLbar[sp1,k1,f1,c1].uR[sp1,f2,c1]) Eps[k3,k1] ;
70Olequ3 = Clequ3[f3,f4,f1,f2]  (LLbar[sp3,k3,f3].lR[sp4,f4]) (QLbar[sp1,k1,f1,c1].uR[sp2,f2,c1]) Eps[k3,k1] Sigma[mu,nu,sp1,sp2] Sigma[mu,nu,sp3,sp4] ;
71Oledq  = Cledq[f3,f4,f1,f2]   (LLbar[sp3,k2,f3].lR[sp3,f4]) (dRbar[sp1,f1,c1].QL[sp1,k2,f2,c1]) ;
72
73(* 4q *)
74Oqq83 = Cqq83[f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k2,f2,c2] Ga[mu,sp1,sp2] T[a,c1,c2] PS[j1,k1,k2]) (QLbar[sp3,k3,f5,c3].QL[sp4,k4,f6,c4] Ga[mu,sp3,sp4] T[a,c3,c4] PS[j1,k3,k4]);
75Oqq81 = Cqq81[f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k1,f2,c2] Ga[mu,sp1,sp2] T[a,c1,c2]) (QLbar[sp3,k3,f5,c3].QL[sp4,k3,f6,c4] Ga[mu,sp3,sp4] T[a,c3,c4]);
76Oqu8  = Cqu8 [f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k1,f2,c2] Ga[mu,sp1,sp2] T[a,c1,c2]) (uRbar[sp3,   f5,c3].uR[sp4,   f6,c4] Ga[mu,sp3,sp4] T[a,c3,c4]);
77Oqd8  = Cqd8 [f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k1,f2,c2] Ga[mu,sp1,sp2] T[a,c1,c2]) (dRbar[sp3,   f5,c3].dR[sp4,   f6,c4] Ga[mu,sp3,sp4] T[a,c3,c4]);
78Ouu8  = Cuu8 [f5,f6,f1,f2] (uRbar[sp1,   f1,c1].uR[sp2,   f2,c2] Ga[mu,sp1,sp2] T[a,c1,c2]) (uRbar[sp3,   f5,c3].uR[sp4,   f6,c4] Ga[mu,sp3,sp4] T[a,c3,c4]);
79Oud8  = Cud8 [f5,f6,f1,f2] (uRbar[sp1,   f1,c1].uR[sp2,   f2,c2] Ga[mu,sp1,sp2] T[a,c1,c2]) (dRbar[sp3,   f5,c3].dR[sp4,   f6,c4] Ga[mu,sp3,sp4] T[a,c3,c4]);
80(* Ouq8  = Cuq8 [f5,f6,f1,f2] (uRbar[sp1,   f1,c1].uR[sp2,   f2,c2] Ga[mu,sp1,sp2] T[a,c1,c2]) (QLbar[sp3,k3,f5,c3].QL[sp4,k3,f6,c4] Ga[mu,sp3,sp4] T[a,c3,c4]); *)
81
82Oqq13 = Cqq13[f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k2,f2,c1] Ga[mu,sp1,sp2] PS[j1,k1,k2]) (QLbar[sp3,k3,f5,c3].QL[sp4,k4,f6,c3] Ga[mu,sp3,sp4] PS[j1,k3,k4]);
83Oqq11 = Cqq11[f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k1,f2,c1] Ga[mu,sp1,sp2]) (QLbar[sp3,k3,f5,c3].QL[sp4,k3,f6,c3] Ga[mu,sp3,sp4]);
84Oqu1  = Cqu1 [f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k1,f2,c1] Ga[mu,sp1,sp2]) (uRbar[sp3,   f5,c3].uR[sp4,   f6,c3] Ga[mu,sp3,sp4]);
85Oqd1  = Cqd1 [f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].QL[sp2,k1,f2,c1] Ga[mu,sp1,sp2]) (dRbar[sp3,   f5,c3].dR[sp4,   f6,c3] Ga[mu,sp3,sp4]);
86Ouu1  = Cuu1 [f5,f6,f1,f2] (uRbar[sp1,   f1,c1].uR[sp2,   f2,c1] Ga[mu,sp1,sp2]) (uRbar[sp3,   f5,c3].uR[sp4,   f6,c3] Ga[mu,sp3,sp4]);
87Oud1  = Cud1 [f5,f6,f1,f2] (uRbar[sp1,   f1,c1].uR[sp2,   f2,c1] Ga[mu,sp1,sp2]) (dRbar[sp3,   f5,c3].dR[sp4,   f6,c3] Ga[mu,sp3,sp4]);
88(* Ouq1  = Cuq1 [f5,f6,f1,f2] (uRbar[sp1,   f1,c1].uR[sp2,   f2,c1] Ga[mu,sp1,sp2]) (QLbar[sp3,k3,f5,c3].QL[sp4,k3,f6,c3] Ga[mu,sp3,sp4]); *)
89
90Oquqd1 = Cquqd1[f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].uR[sp1,   f2,c1]) (QLbar[sp3,k3,f5,c3].dR[sp3,   f6,c3]) Eps[k1,k3];
91Oquqd8 = Cquqd8[f5,f6,f1,f2] (QLbar[sp1,k1,f1,c1].uR[sp1,   f2,c2]) (QLbar[sp3,k3,f5,c3].dR[sp3,   f6,c4]) Eps[k1,k3] T[a,c1,c2] T[a,c3,c4];
92
93Ouqqu1 = Cuqqu1[f5,f6,f1,f2] (uRbar[sp1,   f1,c1].QL[sp1,k2,f2,c1]) (QLbar[sp3,k2,f5,c3].uR[sp3,   f6,c3]);
94Ouqqu8 = Cuqqu8[f5,f6,f1,f2] (uRbar[sp1,   f1,c1].QL[sp1,k2,f2,c2]) (QLbar[sp3,k2,f5,c3].uR[sp3,   f6,c4]) T[a,c1,c2] T[a,c3,c4];
95Odqqd1 = Cdqqd1[f5,f6,f1,f2] (dRbar[sp1,   f1,c1].QL[sp1,k2,f2,c1]) (QLbar[sp3,k2,f5,c3].dR[sp3,   f6,c3]);
96Odqqd8 = Cdqqd8[f5,f6,f1,f2] (dRbar[sp1,   f1,c1].QL[sp1,k2,f2,c2]) (QLbar[sp3,k2,f5,c3].dR[sp3,   f6,c4]) T[a,c1,c2] T[a,c3,c4];
97Oduud1 = Cduud1[f5,f6,f1,f2] (dRbar[sp1,   f1,c1].uR[sp1,   f2,c1]) (uRbar[sp3,   f5,c3].dR[sp3,   f6,c3]);
98Oduud8 = Cduud8[f5,f6,f1,f2] (dRbar[sp1,   f1,c1].uR[sp1,   f2,c2]) (uRbar[sp3,   f5,c3].dR[sp3,   f6,c4]) T[a,c1,c2] T[a,c3,c4];
99
100FierzPauli = { PS[j1_,k1_,k2_]*PS[j1_,k3_,k4_] -> 2*(IndexDelta[k1,k4]*IndexDelta[k2,k3] - 1/2*IndexDelta[k1,k2]*IndexDelta[k3,k4]) };
101DefinePS   = { PauliSigma[j1_,k1_,k2_] -> PS[j1,k1,k2] };
102Gen33      = { f1|f2 -> 3 };
103Gen31      = { f1 -> 3, f2 -> 1 };
104Gen32      = { f1 -> 3, f2 -> 2 };
105Gen13      = { f1 -> 1, f2 -> 3 };
106Gen23      = { f1 -> 2, f2 -> 3 };
107Gen3311    = { f1|f2 -> 3, f5|f6 -> 1 };
108Gen3322    = { f1|f2 -> 3, f5|f6 -> 2 };
109Gen1133    = { f1|f2 -> 1, f5|f6 -> 3 };
110Gen2233    = { f1|f2 -> 2, f5|f6 -> 3 };
111
112Gen3111    = { f1 -> 3, f2 -> 1, f5|f6 -> 1 };
113Gen3122    = { f1 -> 3, f2 -> 1, f5|f6 -> 2 };
114Gen3211    = { f1 -> 3, f2 -> 2, f5|f6 -> 1 };
115Gen3222    = { f1 -> 3, f2 -> 2, f5|f6 -> 2 };
116Gen1131    = { f1|f2 -> 1, f5 -> 3, f6 -> 1 };
117Gen2231    = { f1|f2 -> 2, f5 -> 3, f6 -> 1 };
118Gen1132    = { f1|f2 -> 1, f5 -> 3, f6 -> 2 };
119Gen2232    = { f1|f2 -> 2, f5 -> 3, f6 -> 2 };
120
121Gen3331    = { f1|f2|f5 -> 3, f6 -> 1};
122Gen3332    = { f1|f2|f5 -> 3, f6 -> 2};
123Gen3313    = { f1|f2|f6 -> 3, f5 -> 1};
124Gen3323    = { f1|f2|f6 -> 3, f5 -> 2};
125Gen3133    = { f1|f5|f6 -> 3, f2 -> 1};
126Gen3233    = { f1|f5|f6 -> 3, f2 -> 2};
127Gen1333    = { f2|f5|f6 -> 3, f1 -> 1};
128Gen2333    = { f2|f5|f6 -> 3, f1 -> 2};
129
130Gen3333    = { f1|f2|f5|f6 -> 3};
131
132Electron     = { f3|f4 -> 1 };
133Muon         = { f3|f4 -> 2 };
134Tau          = { f3|f4 -> 3 };
135RemovePart = { GP|GPbar|G0 -> 0};
136ckm        = { Conjugate[CKM[i_,j_]] -> IndexDelta[i,j], CKM[i_,j_] -> IndexDelta[i,j] };
137Print["--- !!!! Goldstones will be removed"]
138Print["--- !!!! CKM will be set to I"]
139
140
141Print["--- Expand indices"]
142(*FR$Parallel=True;*)
143
144O2fHerm    = {Ophiq1, Ophiq3, Ophiu, Ophid};
145O2fNonHerm = {Ophiud, Ouphi, OdW, OuW, OuB, OuG};
146O4fHerm    = {Olq1, Olq3, Olu, Oeq, Oeu};
147O4fNonHerm = {Olequ1, Olequ3, Oledq};
148
149(* Expand two-fermion *)
150Print["--- Expand two fermion operators"]
151L2fHerm=ParallelMap[
152        ExpandIndices[
153        ExpandIndices[
154                ((#)            /. FierzPauli ) /Lambda^2
155        ,FlavorExpand->SU2W]    /. DefinePS
156        ,FlavorExpand->SU2D]    /. RemovePart
157&, O2fHerm ] ;
158L2fNonHerm=ParallelMap[
159        ExpandIndices[
160        ExpandIndices[
161                ((#)            /. FierzPauli ) /Lambda^2
162        ,FlavorExpand->SU2W]    /. DefinePS
163        ,FlavorExpand->SU2D]    /. RemovePart
164&, O2fNonHerm ] ;
165
166
167Print["--- Expand 2f FCNC"]
168L2fFCNC = Join[
169        ParallelMap[ExpandIndices[ (# /. Gen31) + (# /. Gen32)                              , FlavorExpand->Generation] /. ckm &, L2fHerm ],
170        ParallelMap[ExpandIndices[ (# /. Gen31) + (# /. Gen32) + (# /. Gen13) + (# /. Gen23), FlavorExpand->Generation] /. ckm &, L2fNonHerm ]
171        ];
172
173
174L2fFCNC = ParallelMap[ (# + HC[#]) &, L2fFCNC ] ;
175Print["--- Expand 2f (flavour conserving)"]
176L2fHerm    = ParallelMap[ExpandIndices[  # /. Gen33, FlavorExpand->Generation] /. ckm &, L2fHerm ] ;
177L2fNonHerm = ParallelMap[ExpandIndices[  # /. Gen33, FlavorExpand->Generation] /. ckm &, L2fNonHerm ] ;
178L2f = Join[L2fHerm, ParallelMap[ (# + HC[#]) &, L2fNonHerm ]];
179
180
181(* Expand four-fermion *)
182Print["--- Expand four-fermion operators"]
183L4fHerm=ParallelMap[
184        ExpandIndices[
185        ExpandIndices[
186                (# /Lambda^2 )  /. FierzPauli
187        ,FlavorExpand->SU2W]    /. DefinePS
188        ,FlavorExpand->SU2D]    /. RemovePart
189&, O4fHerm ] ;
190L4fNonHerm=ParallelMap[
191        ExpandIndices[
192        ExpandIndices[
193                (# /Lambda^2 )  /. FierzPauli
194        ,FlavorExpand->SU2W]    /. DefinePS
195        ,FlavorExpand->SU2D]    /. RemovePart
196&, O4fNonHerm ] ;
197
198
199Print["--- Expand 4f FCNC"]
200L4fFCNC = Join[
201        ParallelMap[ExpandIndices[
202                   (( (# /. Electron ) + (# /. Muon ) + (# /. Tau ) ) /. Gen31)
203                 + (( (# /. Electron ) + (# /. Muon ) + (# /. Tau ) ) /. Gen32)
204                 , FlavorExpand->Generation] /. ckm &, L4fHerm ],
205        ParallelMap[ExpandIndices[
206                   (( (# /. Electron ) + (# /. Muon ) + (# /. Tau ) ) /. Gen31)
207                 + (( (# /. Electron ) + (# /. Muon ) + (# /. Tau ) ) /. Gen32)
208                 + (( (# /. Electron ) + (# /. Muon ) + (# /. Tau ) ) /. Gen13)
209                 + (( (# /. Electron ) + (# /. Muon ) + (# /. Tau ) ) /. Gen23)
210                 , FlavorExpand->Generation] /. ckm &, L4fNonHerm ]
211        ];
212L4fFCNC = ParallelMap[ (# + HC[#]) &, L4fFCNC ] ;
213
214
215Print["--- Expand 4f (flavour conserving)"]
216L4fHerm    = ParallelMap[ExpandIndices[ ((# /. Electron ) + (# /. Muon ) + (# /. Tau )  /. Gen33), FlavorExpand->Generation] /. ckm &, L4fHerm ] ;
217L4fNonHerm = ParallelMap[ExpandIndices[ ((# /. Electron ) + (# /. Muon ) + (# /. Tau )  /. Gen33), FlavorExpand->Generation] /. ckm &, L4fNonHerm ] ;
218L4f = Join[ L4fHerm, ParallelMap[ (# + HC[#]) &, L4fNonHerm ]] ;
219
220
221(* Expand 4q *)
222Print["--- Expand 4q operators"]
223O4q = {Oqq83, Oqq81, Oqu8, Oqd8, Ouu8, Oud8,
224       Oqq13, Oqq11, Oqu1, Oqd1, Ouu1, Oud1,
225       Oquqd1, Oquqd8,
226       Ouqqu1, Ouqqu8, Odqqd1, Odqqd8,
227       Oduud1, Oduud8 };
228L4q = ParallelMap[
229        ExpandIndices[
230        ExpandIndices[
231                ((#) /Lambda^2 )/. FierzPauli
232        ,FlavorExpand->SU2W]    /. DefinePS
233        ,FlavorExpand->SU2D]    /. RemovePart
234&, O4q ] ;
235Oqq83 = L4q[[ 1]];
236Oqq81 = L4q[[ 2]];
237Oqu8  = L4q[[ 3]];
238Oqd8  = L4q[[ 4]];
239Ouu8  = L4q[[ 5]];
240Oud8  = L4q[[ 6]];
241Oqq13 = L4q[[ 7]];
242Oqq11 = L4q[[ 8]];
243Oqu1  = L4q[[ 9]];
244Oqd1  = L4q[[10]];
245Ouu1  = L4q[[11]];
246Oud1  = L4q[[12]];
247Oquqd1= L4q[[13]];
248Oquqd8= L4q[[14]];
249Ouqqu1= L4q[[15]];
250Ouqqu8= L4q[[16]];
251Odqqd1= L4q[[17]];
252Odqqd8= L4q[[18]];
253Oduud1= L4q[[19]];
254Oduud8= L4q[[20]];
255
256
257
258Print["--- Expand qqtt"]
259Lqqtt = Join[ ParallelMap[ ExpandIndices[ (# /. Gen3311) + (# /. Gen3322) , FlavorExpand->Generation]   /. ckm &,
260                {Oqq83, Oqq81, Oqu8, Oqd8, Ouu8, Oud8,
261                 Oqq13, Oqq11, Oqu1, Oqd1, Ouu1, Oud1} ],
262              ParallelMap[ ExpandIndices[ (# /. Gen1133) + (# /. Gen2233) , FlavorExpand->Generation]   /. ckm &,
263                {Oqu8, Oqu1} ]
264        ] ;
265
266
267Print["--- Expand tttt"]
268Ltttt = ParallelMap[ ExpandIndices[ (# /. Gen3333)]     /. ckm &,
269        {Oqq13,  Oqq11,  Oqu1, Oqd1, Ouu1,  Oud1,
270                          Oqu8, Oqd8,        Oud8,
271         Oquqd1, Oquqd8}] ;
272Ltttt = Join[ Ltttt, Table[ HC[Ltttt[[i]]],{i,Length[Ltttt]-1,Length[Ltttt]}] ];
273
274
275Print["--- Expand qqttS"]
276LqqttS= Join[ ParallelMap[ ExpandIndices[ (# /. Gen3311) + (# /. Gen3322) ]     /. ckm &,
277                {Ouqqu1, Ouqqu8,
278                 Odqqd1, Odqqd8,
279                 Oquqd1, Oquqd8,
280                 Oduud1, Oduud8} ],
281              ParallelMap[ ExpandIndices[ (# /. Gen1133) + (# /. Gen2233) ]     /. ckm &,
282                {Oquqd1, Oquqd8,} ]             (* Should there be a sign flip here from epsilon? *)
283        ] ;
284LqqttS = ParallelMap[ (# + HC[#]) &, LqqttS];
285
286
287Print["--- Expand 3h1l FCNC"]
288L3h1lFCNC = Join[ ParallelMap[ ExpandIndices[ (# /. Gen3331) + (# /. Gen3332) ] /. ckm &,
289                        {Oqq13, Oqq11, Ouu1,
290                         Oqu1, Oqu8, Oqd1, Oqd8, Oud1, Oud8,
291                         Oquqd1, Oquqd8} ],
292                  ParallelMap[ ExpandIndices[ (# /. Gen3133) + (# /. Gen3233) ] /. ckm &,
293                        {Oqu1, Oqu8, Oqd1, Oqd8, Oud1, Oud8,
294                         Oquqd1, Oquqd8} ],
295                  ParallelMap[ ExpandIndices[ (# /. Gen3313) + (# /. Gen3323) ] /. ckm &,
296                        {Oquqd1, Oquqd8} ],
297                  ParallelMap[ ExpandIndices[ (# /. Gen1333) + (# /. Gen2333) ] /. ckm &,
298                        {Oquqd1, Oquqd8} ]
299        ] ;
300L3h1lFCNC = ParallelMap[ (# + HC[#]) &, L3h1lFCNC];
301
302
303Print["--- Expand 1l3h FCNC"]
304L1h3lFCNC = Join[ ParallelMap[ ExpandIndices[
305                         (# /. Gen3111) + (# /. Gen3122)
306                        +(# /. Gen3211) + (# /. Gen3222) ]      /. ckm &,
307                        {Oqq11, Oqq13, Oqq81, Oqq83, Ouu1, Ouu8, Oud1, Oud8,  Oqd1, Oqd8,
308                         Oqu1, Oqu8} ],
309                  ParallelMap[ ExpandIndices[
310                         (# /. Gen1131) + (# /. Gen2231)
311                        +(# /. Gen1132) + (# /. Gen2232) ]      /. ckm &,
312                        {Oqu1, Oqu8} ]
313        ] ;
314L1h3lFCNC = ParallelMap[ (# + HC[#]) &, L1h3lFCNC];
315
316
317Print["--- Total Lagrangian"]
318(* Add hermitian conjugate to form Ldim6tot *)
319Ldim6tot = Join[ L2f, L4f, Lqqtt, Ltttt, LqqttS, L2fFCNC, L4fFCNC, L3h1lFCNC, L1h3lFCNC ];
320Ldim6totSum = Total[ Ldim6tot ];
321
322
323Print["--- Save Lagrangian"]
324Ldim6tot >> saved_Ldim6tot ;
325
326
327Lsm = ExpandIndices[
328ExpandIndices[
329        ExpandIndices[
330                (LSM            /. FierzPauli )
331        ,FlavorExpand->SU2W]    /. DefinePS
332        ,FlavorExpand->SU2D]    /. RemovePart /. ckm ];
333
334
335Print["--- Define total Lagrangian and rename operator coefficients"]
336Ltot = Lsm + Total[Ldim6tot] /. {
337        Cuphi[3,3]   -> ctp + I ctpI,
338        Cphiq1[3,3]  -> cpQM + cpQ3,
339        Cphiq3[3,3]  -> cpQ3,
340        Cphiu[3,3]   -> cpt,
341        Cphid[3,3]   -> cpb,
342        Cphiud[3,3]  -> cptb + I cptbI,
343        CuB[3,3]     -> (cw*ctW - ctZ)/sw + I (cw*ctWI - ctZI)/sw,
344        CuW[3,3]     -> ctW + I ctWI,
345        CdW[3,3]     -> cbW + I cbWI,
346        CuG[3,3]     -> ctG + I ctGI,
347       
348        Clq1[1,1,3,3]   -> cQlM1 + cQl31,
349        Clq1[2,2,3,3]   -> cQlM2 + cQl32,
350        Clq1[3,3,3,3]   -> cQlM3 + cQl33,
351        Clq3[1,1,3,3]   -> cQl31,
352        Clq3[2,2,3,3]   -> cQl32,
353        Clq3[3,3,3,3]   -> cQl33,
354        Ceq[1,1,3,3]    -> cQe1,
355        Ceq[2,2,3,3]    -> cQe2,
356        Ceq[3,3,3,3]    -> cQe3,
357        Clu[1,1,3,3]    -> ctl1,
358        Clu[2,2,3,3]    -> ctl2,
359        Clu[3,3,3,3]    -> ctl3,
360        Ceu[1,1,3,3]    -> cte1,
361        Ceu[2,2,3,3]    -> cte2,
362        Ceu[3,3,3,3]    -> cte3,
363        Clequ1[1,1,3,3] -> ctlS1 + I ctlSI1,
364        Clequ1[2,2,3,3] -> ctlS2 + I ctlSI2,
365        Clequ1[3,3,3,3] -> ctlS3 + I ctlSI3,
366        Clequ3[1,1,3,3] -> ctlT1 + I ctlTI1,
367        Clequ3[2,2,3,3] -> ctlT2 + I ctlTI2,
368        Clequ3[3,3,3,3] -> ctlT3 + I ctlTI3,
369        Cledq[1,1,3,3]  -> cblS1 + I cblSI1,
370        Cledq[2,2,3,3]  -> cblS2 + I cblSI2,
371        Cledq[3,3,3,3]  -> cblS3 + I cblSI3,
372
373        Cqq83[1,1,3,3] -> cQq83,
374        Cqq81[1,1,3,3] -> cQq81,
375        Cqu8 [1,1,3,3] -> cQu8,
376        Cqu8 [3,3,1,1] -> ctq8,
377        Cqd8 [1,1,3,3] -> cQd8,
378        Cuu8 [1,1,3,3] -> ctu8,
379        Cud8 [1,1,3,3] -> ctd8,
380        Cqq13[1,1,3,3] -> cQq13,
381        Cqq11[1,1,3,3] -> cQq11,
382        Cqu1 [1,1,3,3] -> cQu1,
383        Cqu1 [3,3,1,1] -> ctq1,
384        Cqd1 [1,1,3,3] -> cQd1,
385        Cuu1 [1,1,3,3] -> ctu1,
386        Cud1 [1,1,3,3] -> ctd1,
387
388        Cqq83[2,2,3,3] -> cQq83,
389        Cqq81[2,2,3,3] -> cQq81,
390        Cqu8 [2,2,3,3] -> cQu8,
391        Cqu8 [3,3,2,2] -> ctq8,
392        Cqd8 [2,2,3,3] -> cQd8,
393        Cuu8 [2,2,3,3] -> ctu8,
394        Cud8 [2,2,3,3] -> ctd8,
395        Cqq13[2,2,3,3] -> cQq13,
396        Cqq11[2,2,3,3] -> cQq11,
397        Cqu1 [2,2,3,3] -> cQu1,
398        Cqu1 [3,3,2,2] -> ctq1,
399        Cqd1 [2,2,3,3] -> cQd1,
400        Cuu1 [2,2,3,3] -> ctu1,
401        Cud1 [2,2,3,3] -> ctd1,
402
403        Cqq13[3,3,3,3] -> cQQ8/8,
404        Cqq11[3,3,3,3] -> cQQ1/2 + cQQ8/24,
405        Cqu1 [3,3,3,3] -> cQt1,
406        Cqd1 [3,3,3,3] -> cQb1,
407        Cuu1 [3,3,3,3] -> ctt1,
408        Cud1 [3,3,3,3] -> ctb1,
409        Cqu8 [3,3,3,3] -> cQt8,
410        Cqd8 [3,3,3,3] -> cQb8,
411        Cud8 [3,3,3,3] -> ctb8,
412       
413        Cquqd1[3,3,3,3] -> cQtQb1 + I cQtQb1I,
414        Cquqd8[3,3,3,3] -> cQtQb8 + I cQtQb8I,
415
416        Cuqqu1[1,1,3,3] -> ctQqu1 + I*ctQqu1I,
417        Cuqqu8[1,1,3,3] -> ctQqu8 + I*ctQqu8I,
418        Cdqqd1[1,1,3,3] -> cbQqd1 + I*cbQqd1I,
419        Cdqqd8[1,1,3,3] -> cbQqd8 + I*cbQqd8I,
420        Cquqd1[1,1,3,3] -> cQtqd1 + I*cQtqd1I,
421        Cquqd8[1,1,3,3] -> cQtqd8 + I*cQtqd8I,
422        Cquqd1[3,3,1,1] -> cQbqu1 + I*cQbqu1I,
423        Cquqd8[3,3,1,1] -> cQbqu8 + I*cQbqu8I,
424        Cduud1[1,1,3,3] -> cbtud1 + I*cbtud1I,
425        Cduud8[1,1,3,3] -> cbtud8 + I*cbtud8I,
426
427        Cuqqu1[2,2,3,3] -> ctQqu1 + I*ctQqu1I,
428        Cuqqu8[2,2,3,3] -> ctQqu8 + I*ctQqu8I,
429        Cqdqd1[2,2,3,3] -> cbQqd1 + I*cbQqd1I,
430        Cdqqd1[2,2,3,3] -> cbQqd1 + I*cbQqd1I,
431        Cdqqd8[2,2,3,3] -> cbQqd8 + I*cbQqd8I,
432        Cquqd1[2,2,3,3] -> cQtqd1 + I*cQtqd1I,
433        Cquqd8[2,2,3,3] -> cQtqd8 + I*cQtqd8I,
434        Cquqd1[3,3,2,2] -> cQbqu1 + I*cQbqu1I,
435        Cquqd8[3,3,2,2] -> cQbqu8 + I*cQbqu8I,
436        Cduud1[2,2,3,3] -> cbtud1 + I*cbtud1I,
437        Cduud8[2,2,3,3] -> cbtud8 + I*cbtud8I,
438       
439        (* FCNC up *)
440        Cuphi [3,1]  -> ctpx31 + I ctpIx31,
441        Cphiud[3,1]  -> cptbx31 + I cptbIx31,
442        CuB   [3,1]  -> (cw*ctWx31 - ctZx31)/sw + I*(cw*ctWIx31 - ctZIx31)/sw,
443        CuW   [3,1]  -> ctWx31 + I ctWIx31,
444        CdW   [3,1]  -> cbWx31 + I cbWIx31,
445        CuG   [3,1]  -> ctGx31 + I ctGIx31,
446       
447        Cuphi [1,3]  -> ctpx13 + I ctpIx13,
448        Cphiud[1,3]  -> cptbx13 + I cptbIx13,
449        CuB   [1,3]  -> (cw*ctWx13 - ctZx13)/sw + I*(cw*ctWIx13 - ctZIx13)/sw,
450        CuW   [1,3]  -> ctWx13 + I ctWIx13,
451        CdW   [1,3]  -> cbWx13 + I cbWIx13,
452        CuG   [1,3]  -> ctGx13 + I ctGIx13,
453       
454        Cphiq1[3,1]  -> (cpQMx31 + cpQ3x31) + I*(cpQMIx31 + cpQ3Ix31),
455        Cphiq3[3,1]  -> cpQ3x31 + I*cpQ3Ix31,
456        Cphiu [3,1]  -> cptx31 + I*cptIx31,
457        Cphid [3,1]  -> cpbx31 + I*cpbIx31,
458       
459        Clq1[1,1,3,1]   -> (cQlMx1x31 + cQl3x1x31) + I*(cQlMIx1x31 + cQl3Ix1x31),
460        Clq1[2,2,3,1]   -> (cQlMx2x31 + cQl3x2x31) + I*(cQlMIx2x31 + cQl3Ix2x31),
461        Clq1[3,3,3,1]   -> (cQlMx3x31 + cQl3x3x31) + I*(cQlMIx3x31 + cQl3Ix3x31),
462        Clq3[1,1,3,1]   -> cQl3x1x31 + I*cQl3Ix1x31,
463        Clq3[2,2,3,1]   -> cQl3x2x31 + I*cQl3Ix2x31,
464        Clq3[3,3,3,1]   -> cQl3x3x31 + I*cQl3Ix3x31,
465        Ceq [1,1,3,1]   -> cQex1x31 + I*cQeIx1x31,
466        Ceq [2,2,3,1]   -> cQex2x31 + I*cQeIx2x31,
467        Ceq [3,3,3,1]   -> cQex3x31 + I*cQeIx3x31,
468        Clu [1,1,3,1]   -> ctlx1x31 + I*ctlIx1x31,
469        Clu [2,2,3,1]   -> ctlx2x31 + I*ctlIx2x31,
470        Clu [3,3,3,1]   -> ctlx3x31 + I*ctlIx3x31,
471        Ceu [1,1,3,1]   -> ctex1x31 + I*cteIx1x31,
472        Ceu [2,2,3,1]   -> ctex2x31 + I*cteIx2x31,
473        Ceu [3,3,3,1]   -> ctex3x31 + I*cteIx3x31,
474       
475        Clequ1[1,1,3,1] -> ctlSx1x31 + I ctlSIx1x31,
476        Clequ1[2,2,3,1] -> ctlSx2x31 + I ctlSIx2x31,
477        Clequ1[3,3,3,1] -> ctlSx3x31 + I ctlSIx3x31,
478        Clequ3[1,1,3,1] -> ctlTx1x31 + I ctlTIx1x31,
479        Clequ3[2,2,3,1] -> ctlTx2x31 + I ctlTIx2x31,
480        Clequ3[3,3,3,1] -> ctlTx3x31 + I ctlTIx3x31,
481       
482        Clequ1[1,1,1,3] -> ctlSx1x13 + I ctlSIx1x13,
483        Clequ1[2,2,1,3] -> ctlSx2x13 + I ctlSIx2x13,
484        Clequ1[3,3,1,3] -> ctlSx3x13 + I ctlSIx3x13,
485        Clequ3[1,1,1,3] -> ctlTx1x13 + I ctlTIx1x13,
486        Clequ3[2,2,1,3] -> ctlTx2x13 + I ctlTIx2x13,
487        Clequ3[3,3,1,3] -> ctlTx3x13 + I ctlTIx3x13,
488
489        Cledq[1,1,3,1] -> cblSx1x31 + I cblSIx1x31,
490        Cledq[2,2,3,1] -> cblSx2x31 + I cblSIx2x31,
491        Cledq[3,3,3,1] -> cblSx3x31 + I cblSIx3x31,
492        Cledq[1,1,1,3] -> cblSx1x13 + I cblSIx1x13,
493        Cledq[2,2,1,3] -> cblSx2x13 + I cblSIx2x13,
494        Cledq[3,3,1,3] -> cblSx3x13 + I cblSIx3x13,
495       
496        (* FCNC charm *)
497        Cuphi [3,2]  -> ctpx32 + I ctpIx32,
498        Cphiud[3,2]  -> cptbx32 + I cptbIx32,
499        CuB   [3,2]  -> (cw*ctWx32 - ctZx32)/sw + I (cw*ctWIx32 - ctZIx32)/sw,
500        CuW   [3,2]  -> ctWx32 + I ctWIx32,
501        CdW   [3,2]  -> cbWx32 + I cbWIx32,
502        CuG   [3,2]  -> ctGx32 + I ctGIx32,
503       
504        Cuphi [2,3]  -> ctpx23 + I ctpIx23,
505        Cphiud[2,3]  -> cptbx23 + I cptbIx23,
506        CuB   [2,3]  -> (cw*ctWx23 - ctZx23)/sw + I (cw*ctWIx23 - ctZIx23)/sw,
507        CuW   [2,3]  -> ctWx23 + I ctWIx23,
508        CdW   [2,3]  -> cbWx23 + I cbWIx23,
509        CuG   [2,3]  -> ctGx23 + I ctGIx23,
510       
511        Cphiq1[3,2]  -> (cpQMx32 + cpQ3x32) + I*(cpQMIx32 + cpQ3Ix32),
512        Cphiq3[3,2]  -> cpQ3x32 + I*cpQ3Ix32,
513        Cphiu [3,2]  -> cptx32 + I*cptIx32,
514        Cphid [3,2]  -> cpbx32 + I*cpbIx32,
515       
516        Clq1[1,1,3,2]   -> (cQlMx1x32 + cQl3x1x32) + I*(cQlMIx1x32 + cQl3Ix1x32),
517        Clq1[2,2,3,2]   -> (cQlMx2x32 + cQl3x2x32) + I*(cQlMIx2x32 + cQl3Ix2x32),
518        Clq1[3,3,3,2]   -> (cQlMx3x32 + cQl3x3x32) + I*(cQlMIx3x32 + cQl3Ix3x32),
519        Clq3[1,1,3,2]   -> cQl3x1x32 + I*cQl3Ix1x32,
520        Clq3[2,2,3,2]   -> cQl3x2x32 + I*cQl3Ix2x32,
521        Clq3[3,3,3,2]   -> cQl3x3x32 + I*cQl3Ix3x32,
522        Ceq [1,1,3,2]   -> cQex1x32 + I*cQeIx1x32,
523        Ceq [2,2,3,2]   -> cQex2x32 + I*cQeIx2x32,
524        Ceq [3,3,3,2]   -> cQex3x32 + I*cQeIx3x32,
525        Clu [1,1,3,2]   -> ctlx1x32 + I*ctlIx1x32,
526        Clu [2,2,3,2]   -> ctlx2x32 + I*ctlIx2x32,
527        Clu [3,3,3,2]   -> ctlx3x32 + I*ctlIx3x32,
528        Ceu [1,1,3,2]   -> ctex1x32 + I*cteIx1x32,
529        Ceu [2,2,3,2]   -> ctex2x32 + I*cteIx2x32,
530        Ceu [3,3,3,2]   -> ctex3x32 + I*cteIx3x32,
531       
532        Clequ1[1,1,3,2] -> ctlSx1x32 + I ctlSIx1x32,
533        Clequ1[2,2,3,2] -> ctlSx2x32 + I ctlSIx2x32,
534        Clequ1[3,3,3,2] -> ctlSx3x32 + I ctlSIx3x32,
535        Clequ3[1,1,3,2] -> ctlTx1x32 + I ctlTIx1x32,
536        Clequ3[2,2,3,2] -> ctlTx2x32 + I ctlTIx2x32,
537        Clequ3[3,3,3,2] -> ctlTx3x32 + I ctlTIx3x32,
538       
539        Clequ1[1,1,2,3] -> ctlSx1x23 + I ctlSIx1x23,
540        Clequ1[2,2,2,3] -> ctlSx2x23 + I ctlSIx2x23,
541        Clequ1[3,3,2,3] -> ctlSx3x23 + I ctlSIx3x23,
542        Clequ3[1,1,2,3] -> ctlTx1x23 + I ctlTIx1x23,
543        Clequ3[2,2,2,3] -> ctlTx2x23 + I ctlTIx2x23,
544        Clequ3[3,3,2,3] -> ctlTx3x23 + I ctlTIx3x23,
545
546        Cledq[1,1,3,2] -> cblSx1x32 + I cblSIx1x32,
547        Cledq[2,2,3,2] -> cblSx2x32 + I cblSIx2x32,
548        Cledq[3,3,3,2] -> cblSx3x32 + I cblSIx3x32,
549        Cledq[1,1,2,3] -> cblSx1x23 + I cblSIx1x23,
550        Cledq[2,2,2,3] -> cblSx2x23 + I cblSIx2x23,
551        Cledq[3,3,2,3] -> cblSx3x23 + I cblSIx3x23,
552       
553        (* FCNC 1l3h up *)
554(*
555for i in 1 2; do
556for lab in qq13 qq11 uu1 qu1 qu8 qu8 qd1 qd8 ud1 ud8 quqd1 quqd8; do
557        echo -e "\tC${lab}[3,${i},3,3] -> c${lab}x333${i} + I c${lab}Ix333${i},"
558done
559echo ""
560for lab in qu1 qu8 qu8 qd1 qd8 ud1 ud8 quqd1 quqd8; do
561        echo -e "\tC${lab}[3,3,3,${i}] -> c${lab}x3${i}33 + I c${lab}Ix3${i}33,"
562done
563echo ""
564for lab in quqd1 quqd8; do
565        echo -e "\tC${lab}[${i},3,3,3] -> c${lab}x33${i}3 + I c${lab}Ix33${i}3,"
566done
567echo ""
568for lab in quqd1 quqd8; do
569        echo -e "\tC${lab}[3,3,${i},3] -> c${lab}x${i}333 + I c${lab}Ix${i}333,"
570done
571echo ""
572done
573*)
574        Cqq13[3,1,3,3] -> cqq13x3331 + I cqq13Ix3331,
575        Cqq11[3,1,3,3] -> cqq11x3331 + I cqq11Ix3331,
576        Cuu1[3,1,3,3] -> cuu1x3331 + I cuu1Ix3331,
577        Cqu1[3,1,3,3] -> cqu1x3331 + I cqu1Ix3331,
578        Cqu8[3,1,3,3] -> cqu8x3331 + I cqu8Ix3331,
579        Cqu8[3,1,3,3] -> cqu8x3331 + I cqu8Ix3331,
580        Cqd1[3,1,3,3] -> cqd1x3331 + I cqd1Ix3331,
581        Cqd8[3,1,3,3] -> cqd8x3331 + I cqd8Ix3331,
582        Cud1[3,1,3,3] -> cud1x3331 + I cud1Ix3331,
583        Cud8[3,1,3,3] -> cud8x3331 + I cud8Ix3331,
584        Cquqd1[3,1,3,3] -> cquqd1x3331 + I cquqd1Ix3331,
585        Cquqd8[3,1,3,3] -> cquqd8x3331 + I cquqd8Ix3331,
586
587        Cqu1[3,3,3,1] -> cqu1x3133 + I cqu1Ix3133,
588        Cqu8[3,3,3,1] -> cqu8x3133 + I cqu8Ix3133,
589        Cqu8[3,3,3,1] -> cqu8x3133 + I cqu8Ix3133,
590        Cqd1[3,3,3,1] -> cqd1x3133 + I cqd1Ix3133,
591        Cqd8[3,3,3,1] -> cqd8x3133 + I cqd8Ix3133,
592        Cud1[3,3,3,1] -> cud1x3133 + I cud1Ix3133,
593        Cud8[3,3,3,1] -> cud8x3133 + I cud8Ix3133,
594        Cquqd1[3,3,3,1] -> cquqd1x3133 + I cquqd1Ix3133,
595        Cquqd8[3,3,3,1] -> cquqd8x3133 + I cquqd8Ix3133,
596
597        Cquqd1[1,3,3,3] -> cquqd1x3313 + I cquqd1Ix3313,
598        Cquqd8[1,3,3,3] -> cquqd8x3313 + I cquqd8Ix3313,
599
600        Cquqd1[3,3,1,3] -> cquqd1x1333 + I cquqd1Ix1333,
601        Cquqd8[3,3,1,3] -> cquqd8x1333 + I cquqd8Ix1333,
602
603        Cqq13[3,2,3,3] -> cqq13x3332 + I cqq13Ix3332,
604        Cqq11[3,2,3,3] -> cqq11x3332 + I cqq11Ix3332,
605        Cuu1[3,2,3,3] -> cuu1x3332 + I cuu1Ix3332,
606        Cqu1[3,2,3,3] -> cqu1x3332 + I cqu1Ix3332,
607        Cqu8[3,2,3,3] -> cqu8x3332 + I cqu8Ix3332,
608        Cqu8[3,2,3,3] -> cqu8x3332 + I cqu8Ix3332,
609        Cqd1[3,2,3,3] -> cqd1x3332 + I cqd1Ix3332,
610        Cqd8[3,2,3,3] -> cqd8x3332 + I cqd8Ix3332,
611        Cud1[3,2,3,3] -> cud1x3332 + I cud1Ix3332,
612        Cud8[3,2,3,3] -> cud8x3332 + I cud8Ix3332,
613        Cquqd1[3,2,3,3] -> cquqd1x3332 + I cquqd1Ix3332,
614        Cquqd8[3,2,3,3] -> cquqd8x3332 + I cquqd8Ix3332,
615
616        Cqu1[3,3,3,2] -> cqu1x3233 + I cqu1Ix3233,
617        Cqu8[3,3,3,2] -> cqu8x3233 + I cqu8Ix3233,
618        Cqu8[3,3,3,2] -> cqu8x3233 + I cqu8Ix3233,
619        Cqd1[3,3,3,2] -> cqd1x3233 + I cqd1Ix3233,
620        Cqd8[3,3,3,2] -> cqd8x3233 + I cqd8Ix3233,
621        Cud1[3,3,3,2] -> cud1x3233 + I cud1Ix3233,
622        Cud8[3,3,3,2] -> cud8x3233 + I cud8Ix3233,
623        Cquqd1[3,3,3,2] -> cquqd1x3233 + I cquqd1Ix3233,
624        Cquqd8[3,3,3,2] -> cquqd8x3233 + I cquqd8Ix3233,
625
626        Cquqd1[2,3,3,3] -> cquqd1x3323 + I cquqd1Ix3323,
627        Cquqd8[2,3,3,3] -> cquqd8x3323 + I cquqd8Ix3323,
628
629        Cquqd1[3,3,2,3] -> cquqd1x2333 + I cquqd1Ix2333,
630        Cquqd8[3,3,2,3] -> cquqd8x2333 + I cquqd8Ix2333,
631       
632(*
633for a in 1 2; do
634for i in 1 2; do
635for lab in qq11 qq13 qq81 qq83 uu1 uu8 ud1 ud8 qd1 qd8 qu1 qu8; do
636        echo -e "\tC${lab}[${i},${i},3,${a}] -> c${lab}x3${a}ii + I c${lab}Ix3${a}ii,"
637done
638echo ""
639for lab in qu1 qu8; do
640        echo -e "\tC${lab}[3,${a},${i},${i}] -> c${lab}xii3${a} + I c${lab}Ixii3${a},"
641done
642echo ""
643done
644done
645*)
646        Cqq11[1,1,3,1] -> cqq11x31ii + I cqq11Ix31ii,
647        Cqq13[1,1,3,1] -> cqq13x31ii + I cqq13Ix31ii,
648        Cqq81[1,1,3,1] -> cqq81x31ii + I cqq81Ix31ii,
649        Cqq83[1,1,3,1] -> cqq83x31ii + I cqq83Ix31ii,
650        Cuu1[1,1,3,1] -> cuu1x31ii + I cuu1Ix31ii,
651        Cuu8[1,1,3,1] -> cuu8x31ii + I cuu8Ix31ii,
652        Cud1[1,1,3,1] -> cud1x31ii + I cud1Ix31ii,
653        Cud8[1,1,3,1] -> cud8x31ii + I cud8Ix31ii,
654        Cqd1[1,1,3,1] -> cqd1x31ii + I cqd1Ix31ii,
655        Cqd8[1,1,3,1] -> cqd8x31ii + I cqd8Ix31ii,
656        Cqu1[1,1,3,1] -> cqu1x31ii + I cqu1Ix31ii,
657        Cqu8[1,1,3,1] -> cqu8x31ii + I cqu8Ix31ii,
658
659        Cqu1[3,1,1,1] -> cqu1xii31 + I cqu1Ixii31,
660        Cqu8[3,1,1,1] -> cqu8xii31 + I cqu8Ixii31,
661
662        Cqq11[2,2,3,1] -> cqq11x31ii + I cqq11Ix31ii,
663        Cqq13[2,2,3,1] -> cqq13x31ii + I cqq13Ix31ii,
664        Cqq81[2,2,3,1] -> cqq81x31ii + I cqq81Ix31ii,
665        Cqq83[2,2,3,1] -> cqq83x31ii + I cqq83Ix31ii,
666        Cuu1[2,2,3,1] -> cuu1x31ii + I cuu1Ix31ii,
667        Cuu8[2,2,3,1] -> cuu8x31ii + I cuu8Ix31ii,
668        Cud1[2,2,3,1] -> cud1x31ii + I cud1Ix31ii,
669        Cud8[2,2,3,1] -> cud8x31ii + I cud8Ix31ii,
670        Cqd1[2,2,3,1] -> cqd1x31ii + I cqd1Ix31ii,
671        Cqd8[2,2,3,1] -> cqd8x31ii + I cqd8Ix31ii,
672        Cqu1[2,2,3,1] -> cqu1x31ii + I cqu1Ix31ii,
673        Cqu8[2,2,3,1] -> cqu8x31ii + I cqu8Ix31ii,
674
675        Cqu1[3,1,2,2] -> cqu1xii31 + I cqu1Ixii31,
676        Cqu8[3,1,2,2] -> cqu8xii31 + I cqu8Ixii31,
677
678        Cqq11[1,1,3,2] -> cqq11x32ii + I cqq11Ix32ii,
679        Cqq13[1,1,3,2] -> cqq13x32ii + I cqq13Ix32ii,
680        Cqq81[1,1,3,2] -> cqq81x32ii + I cqq81Ix32ii,
681        Cqq83[1,1,3,2] -> cqq83x32ii + I cqq83Ix32ii,
682        Cuu1[1,1,3,2] -> cuu1x32ii + I cuu1Ix32ii,
683        Cuu8[1,1,3,2] -> cuu8x32ii + I cuu8Ix32ii,
684        Cud1[1,1,3,2] -> cud1x32ii + I cud1Ix32ii,
685        Cud8[1,1,3,2] -> cud8x32ii + I cud8Ix32ii,
686        Cqd1[1,1,3,2] -> cqd1x32ii + I cqd1Ix32ii,
687        Cqd8[1,1,3,2] -> cqd8x32ii + I cqd8Ix32ii,
688        Cqu1[1,1,3,2] -> cqu1x32ii + I cqu1Ix32ii,
689        Cqu8[1,1,3,2] -> cqu8x32ii + I cqu8Ix32ii,
690
691        Cqu1[3,2,1,1] -> cqu1xii32 + I cqu1Ixii32,
692        Cqu8[3,2,1,1] -> cqu8xii32 + I cqu8Ixii32,
693
694        Cqq11[2,2,3,2] -> cqq11x32ii + I cqq11Ix32ii,
695        Cqq13[2,2,3,2] -> cqq13x32ii + I cqq13Ix32ii,
696        Cqq81[2,2,3,2] -> cqq81x32ii + I cqq81Ix32ii,
697        Cqq83[2,2,3,2] -> cqq83x32ii + I cqq83Ix32ii,
698        Cuu1[2,2,3,2] -> cuu1x32ii + I cuu1Ix32ii,
699        Cuu8[2,2,3,2] -> cuu8x32ii + I cuu8Ix32ii,
700        Cud1[2,2,3,2] -> cud1x32ii + I cud1Ix32ii,
701        Cud8[2,2,3,2] -> cud8x32ii + I cud8Ix32ii,
702        Cqd1[2,2,3,2] -> cqd1x32ii + I cqd1Ix32ii,
703        Cqd8[2,2,3,2] -> cqd8x32ii + I cqd8Ix32ii,
704        Cqu1[2,2,3,2] -> cqu1x32ii + I cqu1Ix32ii,
705        Cqu8[2,2,3,2] -> cqu8x32ii + I cqu8Ix32ii,
706
707        Cqu1[3,2,2,2] -> cqu1xii32 + I cqu1Ixii32,
708        Cqu8[3,2,2,2] -> cqu8xii32 + I cqu8Ixii32
709        };
710
711
712Print["--- Save full Lagrangian"]
713Ltot >> dim6top_Ltot ;
714
715
716(*Ltot = << dim6top_Ltot_clean ;*)
717
718
719Print["--- Compute vertices"]
720verttot = FeynmanRules[
721        Ltot,
722        MaxParticles->4];
723
724
725Print["--- Simplify vertices"]
726verttot = verttot /.{cw^2->1-sw^2} // Simplify  ;
727
728
729Print["--- Save vertices"]
730verttot >> saved_verttot ;
731
732
733(*verttot = << verttot_tmp ;*)
734
735
736Print["--- Write UFO model with those"]
737WriteUFO[
738        {},Input->verttot,
739        AddDecays->False,
740        Output->"dim6top_LO_UFO"
741        (*Output->"dim6top_LO_UFO_each_coupling_order"*)
742];