Last active
April 12, 2018 10:14
-
-
Save spiiph/77a2518bc8d2bfa4d0699d14cea7f309 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% © 2016 Henrik Öhman | |
% Distributed under the CC BY-SA 4.0 license | |
\documentclass{article} | |
\usepackage{unicode-math} | |
\usepackage{xcolor} | |
\usepackage{graphicx} | |
\usepackage{tikz} | |
\usepackage{luacode} | |
\usepackage[pdfborder={0 0 0}]{hyperref} | |
\usepackage[active,tightpage]{preview} | |
\PreviewEnvironment{minipage} | |
\usetikzlibrary{positioning} | |
\definecolor{mypurple}{cmyk}{0.07,0.27,0,0} | |
\definecolor{mygreen}{cmyk}{0.33,0,0.53,0} | |
\definecolor{myred}{cmyk}{0,0.40,0.53,0} | |
\definecolor{myyellow}{cmyk}{0,0,0.50,0.07} | |
\tikzset{% | |
cell/.style={% | |
font=\bfseries\sffamily\scriptsize, | |
draw, | |
minimum size=1cm,% | |
inner sep=0pt,% | |
outer sep=1mm,% | |
align=center% | |
},% | |
quark/.style={% | |
fill=mypurple | |
},% | |
lepton/.style={% | |
fill=mygreen% | |
},% | |
boson/.style={% | |
fill=myred% | |
},% | |
higgs/.style={% | |
fill=myyellow% | |
},% | |
count/.style={% | |
minimum size=1cm,% | |
inner sep=0pt,% | |
outer sep=0pt,% | |
align=center% | |
},% | |
bottomlabel/.style={% | |
anchor=north,% | |
},% | |
leptonlabel/.style={% | |
anchor=south,% | |
rotate=90,% | |
color=mygreen% | |
}, | |
quarklabel/.style={% | |
anchor=south,% | |
rotate=90,% | |
color=mypurple% | |
}, | |
bosonlabel/.style={% | |
anchor=north,% | |
rotate=90,% | |
color=myred% | |
}, | |
textlabel/.style={% | |
anchor=east,% | |
color=gray% | |
}, | |
footnotelabel/.style={% | |
anchor=north,% | |
color=gray% | |
}, | |
license/.style={% | |
anchor=north,% | |
color=gray% | |
} | |
} | |
\begin{luacode*} | |
data = { | |
{ | |
{type="q", nu=false, spin="1/2", charge="+2/3", mass="2.3 MeV", long="up", short="u"}, | |
{type="q", nu=false, spin="1/2", charge="+2/3", mass="1.28 GeV", long="charm", short="c"}, | |
{type="q", nu=false, spin="1/2", charge="+2/3", mass="173 GeV", long="top", short="t"}, | |
{type="b", nu=false, spin="1", charge="0", mass="0", long="gluon", short="g"}, | |
}, | |
{ | |
{type="q", nu=false, spin="1/2", charge="-1/3", mass="4.8 MeV", long="down", short="d"}, | |
{type="q", nu=false, spin="1/2", charge="-1/3", mass="95 MeV", long="strange", short="s"}, | |
{type="q", nu=false, spin="1/2", charge="-1/3", mass="4.18 GeV", long="bottom", short="b"}, | |
{type="b", nu=false, spin="1", charge="0", mass="0", long="photon", short="γ"} | |
}, | |
{ | |
{type="l", nu=false, spin="1/2", charge="-1", mass="0.511 MeV", long="electron", short="e"}, | |
{type="l", nu=false, spin="1/2", charge="-1", mass="106 MeV", long="muon", short="μ"}, | |
{type="l", nu=false, spin="1/2", charge="-1", mass="1.78 GeV", long="tau", short="τ"}, | |
{type="b", nu=false, spin="1", charge="0", mass="80.4 GeV", long="Z boson", short="Z"} | |
}, | |
{ | |
{type="l", nu=true, spin="1/2", charge="0", mass="< 2 eV${}^{*}$", long=[[electron\\neutrino]], short="ν_e"}, | |
{type="l", nu=true, spin="1/2", charge="0", mass="< 0.19 MeV${}^{*}$", long=[[muon\\neutrino]], short="ν_μ"}, | |
{type="l", nu=true, spin="1/2", charge="0", mass="< 18.2 MeV${}^{*}$", long=[[tau\\neutrino]], short="ν_τ"}, | |
{type="b", nu=false, spin="1", charge="±1", mass="91.2 GeV", long="W boson", short="W"}} | |
} | |
higgs = {type="h", nu=true, spin="0", charge="0", mass="125 GeV", long=[[Higgs\\boson]], short="H"} | |
function print_cell(data, x, y) | |
if data.type == "q" then | |
tex.sprint([[\node[cell, quark] at (]]) | |
elseif data.type == "l" then | |
tex.sprint([[\node[cell, lepton] at (]]) | |
elseif data.type == "b" then | |
tex.sprint([[\node[cell, boson] at (]]) | |
else | |
tex.sprint([[\node[cell, higgs] at (]]) | |
end | |
tex.sprint(x) | |
tex.sprint([[cm,]]) | |
tex.sprint(y) | |
tex.sprint([[cm){};]]) | |
tex.sprint([[\node at (]]) | |
tex.sprint(x+0.13) | |
tex.sprint([[cm,]]) | |
tex.sprint(y+0.0) | |
tex.sprint([[cm){\Large$\mathbf{\vphantom{γZ} ]]) | |
tex.sprint(data.short) | |
tex.sprint([[}$};]]) | |
tex.sprint([[\node[scale=0.55, anchor=west] at (]]) | |
tex.sprint(x-0.47) | |
tex.sprint([[cm,]]) | |
if data.nu then | |
tex.sprint(y-0.33) | |
tex.sprint([[cm){\small\vphantom{gZ}\parbox{1.2cm}{\baselineskip=5pt ]]) | |
tex.sprint(data.long) | |
tex.sprint([[}]]) | |
else | |
tex.sprint(y-0.37) | |
tex.sprint([[cm){\small\vphantom{gZ}]]) | |
tex.sprint(data.long) | |
end | |
tex.sprint([[};]]) | |
tex.sprint([[\node[scale=0.45, anchor=west] at (]]) | |
tex.sprint(x-0.47) | |
tex.sprint([[cm,]]) | |
tex.sprint(y+0.37) | |
tex.sprint([[cm){\small\vphantom{gZ}]]) | |
tex.sprint(data.mass) | |
tex.sprint([[};]]) | |
tex.sprint([[\node[scale=0.45, anchor=west] at (]]) | |
tex.sprint(x-0.47) | |
tex.sprint([[cm,]]) | |
tex.sprint(y+0.19) | |
tex.sprint([[cm){\small\vphantom{gZ}]]) | |
tex.sprint(data.charge) | |
tex.sprint([[};]]) | |
tex.sprint([[\node[scale=0.45, anchor=west] at (]]) | |
tex.sprint(x-0.47) | |
tex.sprint([[cm,]]) | |
tex.sprint(y+0.01) | |
tex.sprint([[cm){\small\vphantom{gZ}]]) | |
tex.sprint(data.spin) | |
tex.sprint([[};]]) | |
end | |
function print_data(data) | |
local cols = #data[1] | |
local rows = #data | |
local size = 1.1 | |
tex.sprint([[\begin{tikzpicture}[font=\sffamily] ]]) | |
tex.sprint([[\begin{scope}[local bounding box=graph] ]]) | |
for j = 1, cols do | |
for i = 1, rows do | |
local x = (j - 1)*size | |
local y = (-i + 1)*size | |
print_cell(data[i][j], x, y) | |
end | |
end | |
tex.sprint([[\end{scope}]]) | |
print_cell(higgs, 4.4, 0.0) | |
tex.sprint([[\node[scale=0.40, inner sep=1mm, left=0.3mm of graph, yshift=51.4mm, textlabel] {\small Mass${}^{†*}$ →};]]) | |
tex.sprint([[\node[scale=0.40, inner sep=1mm, left=0.3mm of graph, yshift=46.4mm, textlabel] {\small Charge${}^{†}$ →};]]) | |
tex.sprint([[\node[scale=0.40, inner sep=1mm, left=0.3mm of graph, yshift=42.0mm, textlabel] {\small Spin${}^{†}$ →};]]) | |
tex.sprint([[\node[inner sep=1mm, left=1mm of graph, yshift=6.5mm, quarklabel] {Quarks};]]) | |
tex.sprint([[\node[inner sep=1mm, left=1mm of graph, yshift=-15mm, leptonlabel] {Leptons};]]) | |
tex.sprint([[\node[inner sep=1mm, right=1mm of graph, yshift=-10.2mm, bosonlabel] {Gauge Bosons};]]) | |
tex.sprint([[\node[scale=0.40, inner sep=0mm, yshift=-47mm, right=10mm of graph, license] {\rotatebox{90}{\small \href{https://creativecommons.org/licenses/by-sa/4.0/}{CC BY-SA 4.0}}};]]) | |
tex.sprint([[\node[scale=0.40, inner sep=0mm, below=0.3mm of graph, xshift=-3mm, footnotelabel] {\small ${}^{†}$Masses, charges, and spins are given in \emph{natural} units, i.e. $e = h = c = 1$.};]]) | |
tex.sprint([[\node[scale=0.40, inner sep=0mm, below=1.9mm of graph, xshift=7mm, footnotelabel] {\small ${}^{*}$Masses are determined from experiment. Neutrinos are massless in the Standard Model.};]]) | |
tex.sprint([[\node[scale=0.40, inner sep=0mm, below=4.0mm of graph, xshift=10mm, footnotelabel] {\small K.A. Olive et al. (Particle Data Group), Chin. Phys. C, 38, 090001 (2014) and 2015 update.};]]) | |
tex.sprint([[\end{tikzpicture}]]) | |
end | |
\end{luacode*} | |
\begin{document} | |
\begin{minipage}[c][50mm][c]{62mm} | |
\luadirect{print_data(data)} | |
\end{minipage} | |
\end{document} |
Author
spiiph
commented
Oct 5, 2016
•
"Particle content of the Standard Model with experimentally determined masses [K.A. Olive et al. (Particle Data Group), Chin. Phys. C, 38, 090001 (2014) and 2015 update.]. The neutrinos are massless in the Standard Model, but are known to have mass from neutrino oscillation experiments. The values of the masses, charges, and spin are given in natural units, i.e. e = h = c = 1."
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment