This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
latex:tikz [2021/05/20 12:23] – [Jets cones] iwn | latex:tikz [2022/07/20 11:54] – [How to draw diagrams in LaTeX with TikZ] iwn | ||
---|---|---|---|
Line 4: | Line 4: | ||
'' | '' | ||
- | * [[https:// | + | * [[https:// |
- | * [[https:// | + | * [[https:// |
- | * [[http:// | + | * [[http:// |
- | * [[http:// | + | * The examples below and many more are also available on [[https:// |
- | + | * [[http:// | |
+ | * [[http:// | ||
+ | * For Feynman diagrams, please see [[latex: | ||
===== Control regions ===== | ===== Control regions ===== | ||
Line 799: | Line 800: | ||
===== 3D axis with spherical coordinates & CMS coordinate system ===== | ===== 3D axis with spherical coordinates & CMS coordinate system ===== | ||
- | This piece of code is based on [[https:// | + | This piece of code is based on [[https:// |
<WRAP group>< | <WRAP group>< | ||
Line 837: | Line 838: | ||
- | An example of rotating the 3D axes with the CMS conventional coordinate system by using the option '' | + | An example of rotating the 3D axes with the CMS conventional coordinate system by using the option '' |
<WRAP group>< | <WRAP group>< | ||
Line 907: | Line 908: | ||
\end{tikzpicture} | \end{tikzpicture} | ||
</ | </ | ||
- | |||
- | |||
- | |||
- | |||
Line 918: | Line 915: | ||
===== Tau lepton decay signatures ===== | ===== Tau lepton decay signatures ===== | ||
- | Inspiration from [[http:// | + | Inspiration from [[http:// |
\\ | \\ | ||
Line 974: | Line 971: | ||
\\ | \\ | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
===== Higgs decay planes ===== | ===== Higgs decay planes ===== | ||
- | Decay planes of Higgs decay to measure the Higgs boson' | + | Decay planes of Higgs decay to measure the Higgs boson' |
<WRAP group>< | <WRAP group>< | ||
Line 991: | Line 991: | ||
+ | |||
+ | ===== Impact parameters ===== | ||
+ | |||
+ | Examples of defining impact parameters in proton collisions ([[https:// | ||
+ | |||
+ | <WRAP group>< | ||
+ | {{latex: | ||
+ | </ | ||
+ | {{latex: | ||
+ | </ | ||
+ | {{latex: | ||
+ | </ | ||
===== Timelines and scales ===== | ===== Timelines and scales ===== | ||
- | Examples of a simple time or energy scale with labels and arrows ([[latex:tikz:timescales|full code]]). | + | Examples of a simple time or energy scale with labels and arrows ([[https://tikz.net/ |
<WRAP group>< | <WRAP group>< | ||
Line 1011: | Line 1023: | ||
\\ | \\ | ||
</ | </ | ||
- | |||
Line 1017: | Line 1028: | ||
===== Jets cones ===== | ===== Jets cones ===== | ||
- | Two examples of cones. Full code can be found [[latex:tikz:jet_cones|here]]. | + | Two examples of cones. Full code can be found [[https://tikz.net/ |
Line 1125: | Line 1136: | ||
- | One can do some projections of jet and MET vectors to construct variables like MT2 in SUSY searches. The full code can be found [[latex: | ||
- | <WRAP group>< | + | ===== Top jets === |
+ | |||
+ | The full code can be found [[https:// | ||
+ | |||
+ | <WRAP group>< | ||
+ | {{ latex: | ||
+ | </ | ||
+ | {{latex: | ||
+ | </ | ||
+ | \\ \\ \\ \\ \\ | ||
+ | {{latex: | ||
+ | </ | ||
+ | |||
+ | <code latex> | ||
+ | \newcommand\jetcone[5][blue]{{ | ||
+ | \pgfmathanglebetweenpoints{\pgfpointanchor{# | ||
+ | \edef\ang{# | ||
+ | \edef\e{# | ||
+ | \edef\vang{\pgfmathresult} % angle of vector OV | ||
+ | \tikzmath{ | ||
+ | coordinate \C; | ||
+ | \C = (# | ||
+ | \x = veclen(\Cx, | ||
+ | \y = tan(\ang)*(veclen(\Cx, | ||
+ | \a = veclen(\Cx, | ||
+ | \b = veclen(\Cx, | ||
+ | \angb = acos(sqrt(\e)*sin(\ang)); | ||
+ | } | ||
+ | \coordinate (tmpL) at ($(# | ||
+ | \draw[thin,# | ||
+ | (#3) ellipse({\a pt} and {\b pt}); | ||
+ | \draw[thin,# | ||
+ | (tmpL) arc(180-\angb: | ||
+ | -- ($(# | ||
+ | }} | ||
+ | |||
+ | \begin{tikzpicture} | ||
+ | \def\R{2.5} | ||
+ | \coordinate (O) at (0,0); | ||
+ | \coordinate (BJ) at ( 65:1.1*\R); % b jet 1 | ||
+ | \coordinate (J1) at ( 15:1.0*\R); % q jet 1 | ||
+ | \coordinate (J2) at (-20: | ||
+ | \jetcone[green!80!black]{O}{BJ}{14}{0.10} | ||
+ | \jetcone{O}{J1}{16}{0.08} | ||
+ | \jetcone{O}{J2}{16}{0.10} | ||
+ | \node[green!50!black] at (65: | ||
+ | \node[blue!80!black, | ||
+ | \end{tikzpicture} | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Jet vectors ===== | ||
+ | |||
+ | One can do some projections of jet and MET vectors to construct variables like MT2 in SUSY searches. The full code can be found [[https:// | ||
+ | |||
+ | <WRAP group>< | ||
+ | {{ latex: | ||
+ | </ | ||
+ | {{latex: | ||
+ | </ | ||
<code latex> | <code latex> | ||
\newcommand\jetcone[4]{ | \newcommand\jetcone[4]{ | ||
Line 1179: | Line 1249: | ||
\end{tikzpicture} | \end{tikzpicture} | ||
</ | </ | ||
- | </ | + | |
- | \\ \\ \\ \\ \\ \\ | + | |
- | {{ latex:tikz:jet_vectors.png ? 1000 }} | + | ===== Tangent to a circle or ellipse ===== |
- | \\ \\ | + | |
- | {{ latex:tikz:jet_vectors_3D.png ? 1000 }} | + | Some different methods of finding the tangent to a circle or ellipse in TikZ. |
- | \\ \\ \\ \\ \\ \\ | + | Using these methods a nice cone can be made. |
+ | The full code can be found [[https:// | ||
+ | |||
+ | |||
+ | <WRAP group>< | ||
+ | {{ latex:tikz:circle_tangent.png ? 0x250 }} | ||
+ | </ | ||
+ | {{latex: | ||
</ | </ | ||
+ | |||
+ | <WRAP group>< | ||
+ | {{ latex: | ||
+ | </ | ||
+ | {{latex: | ||
+ | </ | ||
+ | |||
+ | <code latex> | ||
+ | % TANGENT to CIRCLE - known: r, q | ||
+ | \begin{tikzpicture} | ||
+ | \def\r{1.5} % radius | ||
+ | \def\q{4} % distance center-external point q = |OQ| | ||
+ | \def\x{{\r^2/ | ||
+ | \def\y{{\r*sqrt(1-(\r/ | ||
+ | \coordinate (O) at (0,0); % circle center O | ||
+ | \coordinate (Q) at (\q,0); % external point Q | ||
+ | \coordinate (P) at (\x,\y); % point of tangency, P | ||
+ | \draw[-> | ||
+ | \draw[-> | ||
+ | \draw[dashed] (\x,0) |- (0,\y); | ||
+ | \draw[myblue, | ||
+ | \draw[mygreen, | ||
+ | \draw[mygreen, | ||
+ | \rightAngle{Q}{P}{O}{0.40} | ||
+ | \fill[myred] (O) circle(0.05) node[below right] {O}; | ||
+ | \fill[myred] (Q) circle(0.05) node[below left] {Q}; | ||
+ | \fill[myred] (P) circle(0.05) node[above=3, | ||
+ | \end{tikzpicture} | ||
+ | |||
+ | % TANGENT to ELLIPSE - known: a, b, q | ||
+ | \begin{tikzpicture} | ||
+ | \def\a{1.5} % horizontal radius | ||
+ | \def\b{1.0} % vertical radius | ||
+ | \def\q{4} % distance center-external point q = |OQ| | ||
+ | \def\x{{\a^2/ | ||
+ | \def\y{{\b*sqrt(1-(\a/ | ||
+ | \coordinate (O) at (0,0); % circle center O | ||
+ | \coordinate (Q) at (\q,0); % external point Q | ||
+ | \coordinate (P) at (\x,\y); % point of tangency, P | ||
+ | \draw[-> | ||
+ | \draw[-> | ||
+ | \draw[dashed] (\x,0) |- (0,\y); | ||
+ | \draw[myblue, | ||
+ | \draw[mygreen, | ||
+ | \draw[mygreen, | ||
+ | \fill[myred] (O) circle(0.05) node[below right] {O}; | ||
+ | \fill[myred] (Q) circle(0.05) node[below left] {Q}; | ||
+ | \fill[myred] (P) circle(0.05) node[above=3, | ||
+ | \end{tikzpicture} | ||
+ | |||
+ | </ |