Skip to content

Commit 53fb936

Browse files
authored
Integrate Wolframscript Execution into WallGo and Update Flag Usage (#303)
* give option for different systems * flag for WallGoMatrix element re generation * add qcd model file * DRalgo -> WallGoMatrix * add comments about active WolframKernel * banner and output supression for --recalculateMatrixElements * remove some verbose statement * update references to licensed wolfram engine * add xsm file * stream output again to std since latest WallGoMatrix version manages streaming internally * tidy
1 parent 1809ff9 commit 53fb936

File tree

5 files changed

+388
-35
lines changed

5 files changed

+388
-35
lines changed

Models/SingletStandardModel_Z2/MatrixElements/matrixElements.qcd.m Models/SingletStandardModel_Z2/MatrixElements/qcd.m

+40-27
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
(*Quit[];*)
44

55

6-
SetDirectory[DirectoryName[$InputFileName]];
6+
(*SetDirectory[NotebookDirectory[]];*)
77
(*Put this if you want to create multiple model-files with the same kernel*)
88
$GroupMathMultipleModels=True;
99
$LoadGroupMath=True;
10-
<<DRalgo`;
11-
<<matrixElements`;
10+
<<WallGoMatrix`
1211

1312

1413
(* ::Chapter:: *)
1514
(*QCD*)
1615

1716

18-
(* ::Section::Closed:: *)
17+
(* ::Section:: *)
1918
(*Model*)
2019

2120

@@ -40,57 +39,71 @@
4039
{gvvv,gvff,gvss,\[Lambda]1,\[Lambda]3,\[Lambda]4,\[Mu]ij,\[Mu]IJ,\[Mu]IJC,Ysff,YsffC}=AllocateTensors[Group,RepAdjoint,CouplingName,RepFermion3Gen,RepScalar];
4140

4241

43-
(* ::Title:: *)
42+
ImportModel[Group,gvvv,gvff,gvss,\[Lambda]1,\[Lambda]3,\[Lambda]4,\[Mu]ij,\[Mu]IJ,\[Mu]IJC,Ysff,YsffC,Verbose->False];
43+
44+
45+
(* ::Section:: *)
4446
(*A model with 6 quarks and 1 gluon*)
4547

4648

47-
(* ::Subtitle:: *)
49+
(* ::Subsection:: *)
4850
(*UserInput*)
4951

5052

5153
(*
5254
In DRalgo fermions are Weyl.
5355
So to create one Dirac we need
5456
one left-handed and
55-
one right-handed fermoon
57+
one right-handed fermion
5658
*)
5759

5860

5961
(*Below
6062
rep 1-6 are quarks,
6163
rep 7 is a gluon
6264
*)
63-
Rep1=CreateOutOfEq[{1,2},"F"];
64-
Rep2=CreateOutOfEq[{3,4},"F"];
65-
Rep3=CreateOutOfEq[{5,6},"F"];
66-
Rep4=CreateOutOfEq[{7,8},"F"];
67-
Rep5=CreateOutOfEq[{9,10},"F"];
68-
Rep6=CreateOutOfEq[{11,12},"F"];
69-
RepGluon=CreateOutOfEq[{1},"V"];
70-
(*check*)
71-
(*Rep2=CreateOutOfEq[{3,4,...,12},"F"];*)
72-
73-
74-
ParticleList={Rep1,RepGluon,Rep2,Rep3,Rep4,Rep5,Rep6};
75-
(*
76-
These particles do not have out-of-eq contributions
77-
*)
78-
LightParticles={3,4,5,6,7};
65+
Rep1=CreateParticle[{1,2},"F"];
66+
RepGluon=CreateParticle[{1},"V"];
7967

8068

8169
(*Defining various masses and couplings*)
8270

8371

8472
VectorMass=Table[mg2,{i,1,Length[gvff]}];
8573
FermionMass=Table[mq2,{i,1,Length[gvff[[1]]]}];
74+
ScalarMass={};
75+
ParticleMasses={VectorMass,FermionMass,ScalarMass};
8676
(*
8777
up to the user to make sure that the same order is given in the python code
8878
*)
8979
UserMasses={mq2,mg2};
9080
UserCouplings={gs};
9181

9282

93-
SetDirectory[DirectoryName[$InputFileName]];
94-
OutputFile="../MatrixElements";
95-
ParticleName={"Top","Gluon"};
96-
MatrixElements=ExportMatrixElements[OutputFile,ParticleList,LightParticles,UserMasses,UserCouplings,ParticleName];
83+
(*
84+
These particles do not necessarily have to be out of equilibrium
85+
the remainin particle content is set as light
86+
*)
87+
ParticleList={Rep1,RepGluon};
88+
ParticleName={"Top", "Gluon"};
89+
90+
91+
Print[$ScriptCommandLine]
92+
93+
94+
(*
95+
output of matrix elements
96+
*)
97+
(*SetDirectory[NotebookDirectory[]];*)
98+
OutputFile="output/matrixElements.qcd";
99+
MatrixElements=ExportMatrixElements[
100+
OutputFile,
101+
ParticleList,
102+
UserMasses,
103+
UserCouplings,
104+
ParticleName,
105+
ParticleMasses,
106+
{TruncateAtLeadingLog->True,Format->{"json","txt"}}];
107+
108+
109+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
(* ::Package:: *)
2+
3+
(*Quit[];*)
4+
5+
6+
If[$InputFileName=="",
7+
SetDirectory[NotebookDirectory[]],
8+
SetDirectory[DirectoryName[$InputFileName]]
9+
];
10+
(*Put this if you want to create multiple model-files with the same kernel*)
11+
$GroupMathMultipleModels=True;
12+
$LoadGroupMath=True;
13+
<<WallGoMatrix`
14+
15+
16+
(* ::Chapter:: *)
17+
(*SM+scalar Singlet*)
18+
19+
20+
(*see 2102.11145 [hep-ph]*)
21+
22+
23+
(* ::Section::Closed:: *)
24+
(*Model*)
25+
26+
27+
HypY={Yl,Ye,Yq,Yu,Yd,Y\[Phi],Y\[Eta]};
28+
repY=Thread[HypY->{-1,-2,1/3,4/3,-(2/3),1,2}];
29+
30+
31+
Group={"SU3","SU2","U1"};
32+
RepAdjoint={{1,1},{2},0};
33+
scalar1={{{0,0},{1},Y\[Phi]/2},"C"};
34+
scalar2={{{0,0},{0},0},"R"};
35+
RepScalar={scalar1,scalar2}/.repY;
36+
CouplingName={g3,gw,g1};
37+
38+
39+
Rep1={{{1,0},{1},Yq/2},"L"};
40+
Rep2={{{1,0},{0},Yu/2},"R"};
41+
Rep3={{{1,0},{0},Yd/2},"R"};
42+
Rep4={{{0,0},{1},Yl/2},"L"};
43+
Rep5={{{0,0},{0},Ye/2},"R"};
44+
RepFermion1Gen={Rep1,Rep2,Rep3,Rep4,Rep5}/.repY;
45+
46+
47+
(* ::Text:: *)
48+
(*The input for the gauge interactions to DRalgo are then given by*)
49+
50+
51+
RepFermion1Gen={Rep1,Rep2,Rep3,Rep1,Rep2,Rep3,Rep1,Rep2,Rep3,Rep4,Rep5}/.repY;
52+
RepFermion3Gen={RepFermion1Gen}//Flatten[#,1]&;
53+
(*RepFermion3Gen={RepFermion1Gen,RepFermion1Gen,RepFermion1Gen}//Flatten[#,1]&;*)
54+
55+
56+
(* ::Text:: *)
57+
(*The first element is the vector self-interaction matrix:*)
58+
59+
60+
{gvvv,gvff,gvss,\[Lambda]1,\[Lambda]3,\[Lambda]4,\[Mu]ij,\[Mu]IJ,\[Mu]IJC,Ysff,YsffC}=AllocateTensors[Group,RepAdjoint,CouplingName,RepFermion3Gen,RepScalar]/.repY;
61+
62+
63+
InputInv={{1,1},{True,False}};
64+
MassTerm1=CreateInvariant[Group,RepScalar,InputInv]//Simplify//FullSimplify;
65+
InputInv={{2,2},{True,True}};
66+
MassTerm2=CreateInvariant[Group,RepScalar,InputInv]//Simplify//FullSimplify;
67+
68+
69+
VMass=(
70+
+m1*MassTerm1
71+
+ms/2*MassTerm2
72+
);
73+
74+
75+
\[Mu]ij=GradMass[VMass[[1]]]//Simplify//SparseArray;
76+
77+
78+
QuarticTerm1=MassTerm1[[1]]^2;
79+
QuarticTerm2=MassTerm2[[1]]^2;
80+
QuarticTerm3=MassTerm1[[1]]*MassTerm2[[1]];
81+
82+
83+
VQuartic=(
84+
+lam1H*QuarticTerm1
85+
+lams/4*QuarticTerm2
86+
+lamm/2*QuarticTerm3
87+
);
88+
89+
90+
\[Lambda]4=GradQuartic[VQuartic];
91+
92+
93+
InputInv={{1,1,2},{True,False,True}};
94+
CubicTerm1=CreateInvariant[Group,RepScalar,InputInv][[1]]//Simplify;
95+
InputInv={{2,2,2},{True,True,True}};
96+
CubicTerm2=CreateInvariant[Group,RepScalar,InputInv][[1]]//Simplify;
97+
98+
99+
VCubic=(
100+
+mum/2*CubicTerm1
101+
+mu3/3*CubicTerm2
102+
);
103+
104+
105+
\[Lambda]3=GradCubic[VCubic];
106+
107+
108+
InputInv={{2},{True}};
109+
TadpoleTerm1=CreateInvariant[Group,RepScalar,InputInv][[1]]//Simplify;
110+
111+
112+
VTadpole=\[Mu]1*TadpoleTerm1;
113+
114+
115+
\[Lambda]1=GradTadpole[VTadpole];
116+
117+
118+
InputInv={{1,1,2},{False,False,True}};
119+
YukawaDoublet1=CreateInvariantYukawa[Group,RepScalar,RepFermion3Gen,InputInv]//Simplify;
120+
121+
122+
Ysff=-yt1*GradYukawa[YukawaDoublet1[[1]]];
123+
124+
125+
YsffC=SparseArray[Simplify[Conjugate[Ysff]//Normal,Assumptions->{yt1>0}]];
126+
127+
128+
ImportModel[Group,gvvv,gvff,gvss,\[Lambda]1,\[Lambda]3,\[Lambda]4,\[Mu]ij,\[Mu]IJ,\[Mu]IJC,Ysff,YsffC,Verbose->False];
129+
130+
131+
(* ::Section:: *)
132+
(*MatrixElements*)
133+
134+
135+
(*
136+
In DRalgo fermions are Weyl.
137+
So to create one Dirac we need
138+
one left-handed and
139+
one right-handed fermion
140+
*)
141+
142+
143+
(* ::Subsection:: *)
144+
(*TopL, TopR*)
145+
146+
147+
vev={0,v,0,0,0};
148+
SymmetryBreaking[vev]
149+
150+
151+
(*left-handed top-quark*)
152+
ReptL=CreateParticle[{{1,1}},"F"];
153+
154+
(*right-handed top-quark*)
155+
ReptR=CreateParticle[{2},"F"];
156+
157+
(*left-handed bottom-quark*)
158+
RepbL=CreateParticle[{{1,2}},"F"];
159+
160+
(*light quarks*)
161+
RepLight=CreateParticle[Range[3,2*4+3],"F"];
162+
163+
(*Vector bosons*)
164+
RepGluon=CreateParticle[{1},"V"];
165+
RepW=CreateParticle[{{2,1}},"V"];
166+
RepZ=CreateParticle[{{3,1}},"V"];
167+
168+
(*Higgs*)
169+
RepH = CreateParticle[{1},"S"];
170+
RepS = CreateParticle[{2},"S"];
171+
172+
173+
VectorMass=Join[
174+
Table[mg2,{i,1,RepGluon[[1]]//Length}],
175+
Table[mw2,{i,1,RepW[[1]]//Length}],
176+
Table[mz2,{i,1,RepZ[[1]]//Length}]];
177+
FermionMass=Table[mq2,{i,1,Length[gvff[[1]]]}];
178+
ScalarMass=Table[ms2,{i,1,Length[gvss[[1]]]}];
179+
ParticleMasses={VectorMass,FermionMass,ScalarMass};
180+
(*
181+
up to the user to make sure that the same order is given in the python code
182+
*)
183+
UserMasses={mq2,mg2,mw2,mz2,ms2};
184+
UserCouplings=Variables@Normal@{Ysff,gvss,gvff,gvvv,\[Lambda]4,\[Lambda]3}//DeleteDuplicates;
185+
186+
187+
(*
188+
These particles do not have out-of-eq contributions
189+
*)
190+
ParticleList={ReptL,ReptR,RepGluon,RepW,RepZ,RepH,RepS};
191+
ParticleName={"TopL","TopR","Gluon","W","Z","H","S"};
192+
193+
194+
(*
195+
output of matrix elements
196+
*)
197+
OutputFile="output/matrixElements.xsm";
198+
MatrixElements=ExportMatrixElements[
199+
OutputFile,
200+
ParticleList,
201+
UserMasses,
202+
UserCouplings,
203+
ParticleName,
204+
ParticleMasses,
205+
{Replacements->{gw->0,g1->0},Format->{"json","txt"}}];
206+
207+
208+
(* ::Subsection:: *)
209+
(*QCD -like*)
210+
211+
212+
vev={0,v,0,0,0};
213+
SymmetryBreaking[vev]
214+
215+
216+
(*left-handed top-quark*)
217+
ReptL=CreateParticle[{{1,1}},"F"];
218+
219+
(*right-handed top-quark*)
220+
ReptR=CreateParticle[{2},"F"];
221+
222+
(*join topL and topR into one rep*)
223+
Rept={Join[ReptL[[1]],ReptR[[1]]],"F"};
224+
225+
(*left-handed bottom-quark*)
226+
RepbL=CreateParticle[{{1,2}},"F"];
227+
228+
(*light quarks*)
229+
RepLight=CreateParticle[Range[3,2*4+3],"F"];
230+
231+
(*Vector bosons*)
232+
RepGluon=CreateParticle[{1},"V"];
233+
RepW=CreateParticle[{2},"V"];
234+
RepZ=CreateParticle[{3},"V"];
235+
236+
(*Higgs*)
237+
RepH = CreateParticle[{1},"S"];
238+
RepS = CreateParticle[{2},"S"];
239+
240+
241+
VectorMass=Join[
242+
Table[mg2,{i,1,RepGluon[[1]]//Length}],
243+
Table[mw2,{i,1,RepW[[1]]//Length}],
244+
Table[mz2,{i,1,RepZ[[1]]//Length}]];
245+
FermionMass=Table[mq2,{i,1,Length[gvff[[1]]]}];
246+
ScalarMass=Table[ms2,{i,1,Length[gvss[[1]]]}];
247+
ParticleMasses={VectorMass,FermionMass,ScalarMass};
248+
(*
249+
up to the user to make sure that the same order is given in the python code
250+
*)
251+
UserMasses={mq2,mg2,mw2,mz2,ms2};
252+
UserCouplings=Variables@Normal@{Ysff,gvss,gvff,gvvv,\[Lambda]4,\[Lambda]3}//DeleteDuplicates;
253+
254+
255+
(*
256+
These particles do not have out-of-eq contributions
257+
*)
258+
ParticleList={Rept,RepGluon,RepW,RepZ,RepH,RepS};
259+
ParticleName={"Top","Gluon","W","Z","H","S"};
260+
261+
262+
(*
263+
output of matrix elements
264+
*)
265+
OutputFile="output/matrixElements.xsm.qcd";
266+
MatrixElements=ExportMatrixElements[
267+
OutputFile,
268+
ParticleList,
269+
UserMasses,
270+
UserCouplings,
271+
ParticleName,
272+
ParticleMasses,
273+
{Replacements->{gw->0,g1->0},Format->{"json","txt"}}];
274+
275+
276+
MatrixElements//Expand

0 commit comments

Comments
 (0)