Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
626 lines (565 loc) · 23.2 KB
/
Copy pathindex.html
File metadata and controls
626 lines (565 loc) · 23.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Drell-Yan dilepton spectrum: SM vs. new physics</title>
<style>
* { box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
background: #fff;
color: #1a1a1a;
margin: 0;
padding: 24px;
}
.wrap { max-width: 900px; margin: 0 auto; }
h1 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.subtitle { font-size: 13px; color: #777; margin: 0 0 16px; line-height: 1.4; }
.panel {
background: #f7f7f6;
border: 1px solid #e2e1de;
border-radius: 10px;
padding: 14px 16px;
margin-bottom: 14px;
}
.row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.row label { font-size: 13px; color: #555; width: 140px; flex-shrink: 0; }
.row input[type="range"] { flex: 1; }
.row .val { font-size: 13px; font-weight: 600; width: 90px; text-align: right; flex-shrink: 0; }
.note { font-size: 11px; color: #888; margin-top: 4px; }
.status {
font-size: 12px;
border-radius: 6px;
padding: 8px 10px;
margin-top: 8px;
border: 1px solid;
}
.status.allowed { background: #f0faf3; border-color: #bfe6cc; color: #1e6b3a; }
.status.excluded { background: #fdf1f1; border-color: #f3c6c5; color: #a32d2d; }
.status.info { background: #f0f0ee; border-color: #ddd; color: #555; }
.status.warn { background: #fff8ec; border-color: #f0dfb8; color: #93690e; }
canvas { width: 100%; height: 420px; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: #555; margin-top: 8px; }
.legend span.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.footnote { font-size: 11px; color: #999; margin-top: 14px; line-height: 1.5; }
#hoverInfo { font-size: 12px; color: #444; min-height: 18px; margin-top: 4px; }
</style>
</head>
<body>
<div class="wrap">
<h1>Drell-Yan dilepton spectrum: SM vs. new physics</h1>
<p class="subtitle">
pp → ℓ⁺ℓ⁻ at √s = 13 TeV. Toy parton luminosities
(illustrative shape, not an NNLO calculation) — y-axis is in arbitrary units.
New physics couples only to u-quarks and electrons/muons with universal coupling g.
</p>
<div class="panel">
<div class="row">
<label for="mSlider">Resonance mass M′</label>
<input type="range" id="mSlider" min="150" max="30000" step="50" value="5000" />
<span class="val" id="mVal">5000 GeV</span>
</div>
<div class="row">
<label for="gSlider">Coupling g</label>
<input type="range" id="gSlider" min="0.1" max="3" step="0.05" value="1" />
<span class="val" id="gVal">1.00</span>
</div>
<div class="row">
<label for="refSlider">Reference mass M<sub>ref</sub></label>
<input type="range" id="refSlider" min="150" max="8000" step="50" value="1000" />
<span class="val" id="refVal">1000 GeV</span>
</div>
<div class="row">
<label for="uncSlider">High-mass unc. (>1 TeV)</label>
<input type="range" id="uncSlider" min="1" max="100" step="1" value="20" />
<span class="val" id="uncVal">±20%</span>
</div>
<div class="note">
Below 1 TeV the SM prediction is treated as already well measured (fixed ±5% band).
Above 1 TeV — the search region, historically dominated by PDF uncertainty —
the band width is exactly what this slider controls, e.g. to explore what an improved PDF
determination would buy you in reach.
</div>
<div class="note">
"Non-observation at M<sub>ref</sub>" means: assume data at that mass is consistent with the
SM within the band set above (fixed ±5% below 1 TeV, slider-controlled above it).
Moving M<sub>ref</sub> changes where that assumption is
being made — it is not a fixed law, just a choice of where you're anchoring the claim
"nothing anomalous seen here."
</div>
<div class="note" id="derived">Λ = 5000 GeV · Γ′ = 66.3 GeV (2.7%)</div>
<div class="status warn" id="kinematicNote" style="display:none;"></div>
<div class="status" id="statusBox"></div>
<div class="status info" id="reachBox"></div>
</div>
<canvas id="chart"></canvas>
<div id="hoverInfo"></div>
<div class="legend">
<span><span class="swatch" style="background:#8a8f96;"></span>SM (solid, wide base line -- Z peak + continuum; shaded band = uncertainty)</span>
<span><span class="swatch" style="background:#f2994a;"></span>BSM total: EFT truncation (dashed, on top of SM)</span>
<span><span class="swatch" style="background:#d1495b;"></span>BSM total: exact resonance (dashed, on top of SM)</span>
<span><span class="swatch" style="background:#333333;"></span>M′ (true resonance mass; beyond this line, don't trust the EFT curve)</span>
<span><span class="swatch" style="background:#8a5fd6;"></span>Λ = M′/g (naive EFT scale)</span>
<span><span class="swatch" style="background:#c99a1a;"></span>M<sub>ref</sub> (where non-observation is assumed)</span>
</div>
<p class="footnote">
Note: partonic cross section uses the standard tree-level γ/Z Drell-Yan formula with
PDG-like electroweak parameters. Parton luminosities are a smooth toy parametrization chosen
to reproduce the qualitative 13 TeV shape (Z peak plus steeply falling continuum) and are not
derived from an actual PDF set — treat the vertical scale as illustrative only. New
physics is modeled as a single u-quark/lepton vector resonance with coupling g and width
Γ′ = g²M′/12π. Red dashed line and shading mark M′ itself:
beyond that point the green (EFT-truncated) curve should not be trusted, even though nothing
stops it from being drawn there.
</p>
</div>
<script>
"use strict";
// ---------- Physics ----------
const ALPHA = 1 / 127.9;
const SIN2W = 0.2312;
const MZ = 91.1876;
const GAMMA_Z = 2.4952;
const SQRT_S = 13000;
const T3u = 0.5, Qu = 2 / 3;
const T3d = -0.5, Qd = -1 / 3;
const T3e = -0.5, Qe = -1;
const gVu = T3u - 2 * Qu * SIN2W, gAu = T3u;
const gVd = T3d - 2 * Qd * SIN2W, gAd = T3d;
const gVe = T3e - 2 * Qe * SIN2W, gAe = T3e;
const KAPPA = 1 / (4 * SIN2W * (1 - SIN2W));
function bwParts(shat, M, Gamma) {
const dRe = shat - M * M;
const dIm = M * Gamma;
const denom = dRe * dRe + dIm * dIm;
return { re: (shat * dRe) / denom, abs2: (shat * shat) / denom };
}
function sigmaHatSM_q(shat, Qq, gVq, gAq) {
const bw = bwParts(shat, MZ, GAMMA_Z);
return (
((4 * Math.PI * ALPHA * ALPHA) / (9 * shat)) *
(Qq * Qq * Qe * Qe -
2 * Qq * Qe * gVq * gVe * KAPPA * bw.re +
(gVq * gVq + gAq * gAq) * (gVe * gVe + gAe * gAe) * KAPPA * KAPPA * bw.abs2)
);
}
function deltaSigmaNP_exact(shat, g, Mp, Gammap) {
const bw = bwParts(shat, Mp, Gammap);
return (((4 * Math.PI * ALPHA * ALPHA) / (9 * shat)) * g * g * (-2 * Qu * Qe * bw.re + g * g * bw.abs2));
}
function deltaSigmaNP_trunc(shat, g, Mp) {
const t = -(shat / (Mp * Mp)) - (shat / (Mp * Mp)) * (shat / (Mp * Mp));
return (((4 * Math.PI * ALPHA * ALPHA) / (9 * shat)) * g * g * (-2 * Qu * Qe * t + g * g * t * t));
}
function Lu(M) { const x = M / SQRT_S; return Math.pow(1 - x, 7.0) / Math.pow(x, 1.2); }
function Ld(M) { const x = M / SQRT_S; return 0.5 * Math.pow(1 - x, 7.5) / Math.pow(x, 1.1); }
const S = SQRT_S * SQRT_S;
const M_MIN = 50;
const M_MAX = 12500;
const N_POINTS = 260;
const UNC_SPLIT = 1000; // GeV -- boundary between "already precise" and "search region"
const UNC_LOW = 0.05; // fixed 5% below 1 TeV -- this region is already well measured
function bandAt(M, uncHigh) {
return M < UNC_SPLIT ? UNC_LOW : uncHigh;
}
function smAt(M) {
const shat = M * M;
const lu = Lu(M), ld = Ld(M);
const sigSM = lu * sigmaHatSM_q(shat, Qu, gVu, gAu) + ld * sigmaHatSM_q(shat, Qd, gVd, gAd);
return (2 * M * sigSM) / S;
}
function exactAt(M, Mp, g) {
const shat = M * M;
const lu = Lu(M), ld = Ld(M);
const Gammap = (g * g * Mp) / (12 * Math.PI);
const sigSM = lu * sigmaHatSM_q(shat, Qu, gVu, gAu) + ld * sigmaHatSM_q(shat, Qd, gVd, gAd);
const dNP = lu * deltaSigmaNP_exact(shat, g, Mp, Gammap);
return (2 * M * (sigSM + dNP)) / S;
}
function fracDeviation(M, Mp, g) {
const sm = smAt(M);
return (exactAt(M, Mp, g) - sm) / sm;
}
function findGmax(Mp, Mref, uncHigh) {
const target = bandAt(Mref, uncHigh);
const hiBracket = 4 * Math.PI * 3;
if (Math.abs(fracDeviation(Mref, Mp, hiBracket)) < target) return Infinity;
let lo = 0, hi = hiBracket;
for (let i = 0; i < 60; i++) {
const mid = (lo + hi) / 2;
const val = Math.abs(fracDeviation(Mref, Mp, mid));
if (val > target) hi = mid; else lo = mid;
}
return (lo + hi) / 2;
}
function findMassReach(g, Mref, uncHigh) {
const target = bandAt(Mref, uncHigh);
const loBracket = 100, hiBracket = 200000;
if (Math.abs(fracDeviation(Mref, loBracket, g)) < target) return -Infinity;
if (Math.abs(fracDeviation(Mref, hiBracket, g)) > target) return Infinity;
let lo = loBracket, hi = hiBracket;
for (let i = 0; i < 80; i++) {
const mid = (lo + hi) / 2;
const val = Math.abs(fracDeviation(Mref, mid, g));
if (val > target) lo = mid; else hi = mid;
}
return (lo + hi) / 2;
}
function buildData(Mp, g, uncHigh) {
const Gammap = (g * g * Mp) / (12 * Math.PI);
const points = [];
for (let i = 0; i < N_POINTS; i++) {
const t = i / (N_POINTS - 1);
const M = M_MIN * Math.pow(M_MAX / M_MIN, t);
const shat = M * M;
const lu = Lu(M);
const ld = Ld(M);
const sigSM = lu * sigmaHatSM_q(shat, Qu, gVu, gAu) + ld * sigmaHatSM_q(shat, Qd, gVd, gAd);
const dNPtrunc = lu * deltaSigmaNP_trunc(shat, g, Mp);
const dNPexact = lu * deltaSigmaNP_exact(shat, g, Mp, Gammap);
const sm = Math.max((2 * M * sigSM) / S, 1e-30);
const trunc = Math.max((2 * M * (sigSM + dNPtrunc)) / S, 1e-30);
const exact = Math.max((2 * M * (sigSM + dNPexact)) / S, 1e-30);
const band = bandAt(M, uncHigh);
points.push({ M, sm, low: sm * (1 - band), high: sm * (1 + band), trunc, exact });
}
return { points, Gammap };
}
function fmt(v) {
if (v === 0 || !isFinite(v)) return "0";
const exp = Math.floor(Math.log10(Math.abs(v)));
const mant = v / Math.pow(10, exp);
return mant.toFixed(1) + "e" + exp;
}
// ---------- Canvas drawing ----------
const canvas = document.getElementById("chart");
const ctx = canvas.getContext("2d");
const margin = { top: 30, right: 20, bottom: 40, left: 64 };
let currentPoints = [];
let plotBounds = null; // {x0,y0,x1,y1, xMinLog,xMaxLog,yMinLog,yMaxLog}
function resizeCanvas() {
const rect = canvas.getBoundingClientRect();
const dpr = window.devicePixelRatio || 1;
canvas.width = Math.round(rect.width * dpr);
canvas.height = Math.round(420 * dpr);
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
redraw();
}
function xToPixel(M, w) {
const lx = Math.log10(M), l0 = Math.log10(M_MIN), l1 = Math.log10(M_MAX);
return margin.left + ((lx - l0) / (l1 - l0)) * w;
}
function pixelToX(px, w) {
const l0 = Math.log10(M_MIN), l1 = Math.log10(M_MAX);
const lx = l0 + (px / w) * (l1 - l0);
return Math.pow(10, lx);
}
function yToPixel(v, h, yMinLog, yMaxLog) {
const lv = Math.log10(Math.max(v, 1e-30));
return margin.top + h - ((lv - yMinLog) / (yMaxLog - yMinLog)) * h;
}
function niceLogTicks(minLog, maxLog) {
const ticks = [];
const start = Math.ceil(minLog), end = Math.floor(maxLog);
for (let e = start; e <= end; e++) ticks.push(Math.pow(10, e));
return ticks;
}
let hoverM = null;
function redraw() {
const cssW = canvas.getBoundingClientRect().width;
const cssH = 420;
const w = cssW - margin.left - margin.right;
const h = cssH - margin.top - margin.bottom;
ctx.clearRect(0, 0, cssW, cssH);
const Mp = parseFloat(document.getElementById("mSlider").value);
const g = parseFloat(document.getElementById("gSlider").value);
const uncHigh = parseFloat(document.getElementById("uncSlider").value) / 100;
const Lambda = Mp / g;
const built = buildData(Mp, g, uncHigh);
currentPoints = built.points;
let yMin = Infinity, yMax = -Infinity;
currentPoints.forEach((p) => {
[p.low, p.high, p.sm, p.trunc, p.exact].forEach((v) => {
if (v > 0) { yMin = Math.min(yMin, v); yMax = Math.max(yMax, v); }
});
});
const yMinLog = Math.floor(Math.log10(yMin)) - 0.3;
const yMaxLog = Math.ceil(Math.log10(yMax)) + 0.3;
plotBounds = { w, h, yMinLog, yMaxLog };
// grid + axes
ctx.save();
ctx.translate(0, 0);
ctx.strokeStyle = "#eee";
ctx.lineWidth = 1;
ctx.font = "11px -apple-system, sans-serif";
ctx.fillStyle = "#666";
const xTicks = [100, 300, 1000, 3000, 10000].filter((v) => v >= M_MIN && v <= M_MAX);
xTicks.forEach((v) => {
const px = xToPixel(v, w);
ctx.beginPath();
ctx.moveTo(px, margin.top);
ctx.lineTo(px, margin.top + h);
ctx.stroke();
ctx.textAlign = "center";
const label = v >= 1000 ? (v / 1000) + "T" : String(v);
ctx.fillText(label, px, margin.top + h + 16);
});
const yTicks = niceLogTicks(yMinLog, yMaxLog);
yTicks.forEach((v) => {
const py = yToPixel(v, h, yMinLog, yMaxLog);
ctx.beginPath();
ctx.moveTo(margin.left, py);
ctx.lineTo(margin.left + w, py);
ctx.stroke();
ctx.textAlign = "right";
ctx.fillText(fmt(v), margin.left - 8, py + 3);
});
// axis labels
ctx.fillStyle = "#444";
ctx.textAlign = "center";
ctx.fillText("M (GeV)", margin.left + w / 2, cssH - 6);
ctx.save();
ctx.translate(14, margin.top + h / 2);
ctx.rotate(-Math.PI / 2);
ctx.textAlign = "center";
ctx.fillText("d\u03c3/dM (arb. units)", 0, 0);
ctx.restore();
ctx.restore();
// solid top edge of the SM background -- the "SM curve" itself, muted
function strokeCurve(key, color, dash, width) {
ctx.save();
ctx.strokeStyle = color;
ctx.lineWidth = width || 2;
ctx.setLineDash(dash || []);
ctx.beginPath();
currentPoints.forEach((p, i) => {
const px = xToPixel(p.M, w), py = yToPixel(p[key], h, yMinLog, yMaxLog);
if (i === 0) ctx.moveTo(px, py); else ctx.lineTo(px, py);
});
ctx.stroke();
ctx.restore();
}
function strokeEdge(key, color) {
ctx.save();
ctx.strokeStyle = color;
ctx.lineWidth = 1;
ctx.setLineDash([1, 2]);
ctx.beginPath();
currentPoints.forEach((p, i) => {
const px = xToPixel(p.M, w), py = yToPixel(p[key], h, yMinLog, yMaxLog);
if (i === 0) ctx.moveTo(px, py); else ctx.lineTo(px, py);
});
ctx.stroke();
ctx.restore();
}
// uncertainty band fill -- dotted edges alone were too faint to see
ctx.save();
ctx.beginPath();
currentPoints.forEach((p, i) => {
const px = xToPixel(p.M, w), py = yToPixel(p.high, h, yMinLog, yMaxLog);
if (i === 0) ctx.moveTo(px, py); else ctx.lineTo(px, py);
});
for (let i = currentPoints.length - 1; i >= 0; i--) {
const p = currentPoints[i];
const px = xToPixel(p.M, w), py = yToPixel(p.low, h, yMinLog, yMaxLog);
ctx.lineTo(px, py);
}
ctx.closePath();
ctx.fillStyle = "rgba(138,143,150,0.25)";
ctx.fill();
ctx.restore();
strokeEdge("low", "#c4c9ce");
strokeEdge("high", "#c4c9ce");
// Z pole reference line
ctx.save();
ctx.strokeStyle = "#ccc";
ctx.setLineDash([2, 2]);
const zx = xToPixel(MZ, w);
ctx.beginPath();
ctx.moveTo(zx, margin.top);
ctx.lineTo(zx, margin.top + h);
ctx.stroke();
ctx.restore();
// M' marker line (only if within visible range) -- no fill, just the line
if (Mp <= M_MAX) {
const mpx = xToPixel(Mp, w);
ctx.save();
ctx.strokeStyle = "#333333";
ctx.setLineDash([3, 3]);
ctx.beginPath();
ctx.moveTo(mpx, margin.top);
ctx.lineTo(mpx, margin.top + h);
ctx.stroke();
ctx.setLineDash([]);
ctx.fillStyle = "#222222";
ctx.font = "11px -apple-system, sans-serif";
ctx.textAlign = "center";
ctx.fillText("M\u2032", mpx, margin.top - 10);
ctx.restore();
}
// Lambda marker (M'/g) -- the "naive EFT scale", distinct from the true resonance mass M'
if (Lambda <= M_MAX && Lambda >= M_MIN) {
const lpx = xToPixel(Lambda, w);
ctx.save();
ctx.strokeStyle = "#8a5fd6";
ctx.setLineDash([1, 3]);
ctx.lineWidth = 1.5;
ctx.beginPath();
ctx.moveTo(lpx, margin.top);
ctx.lineTo(lpx, margin.top + h);
ctx.stroke();
ctx.setLineDash([]);
ctx.fillStyle = "#6a3fc0";
ctx.font = "11px -apple-system, sans-serif";
ctx.textAlign = "center";
ctx.fillText("\u039b", lpx, margin.top + h + 30);
ctx.restore();
}
// M_ref marker -- where "non-observation" is being asserted
const Mref = parseFloat(document.getElementById("refSlider").value);
if (Mref <= M_MAX && Mref >= M_MIN) {
const rpx = xToPixel(Mref, w);
ctx.save();
ctx.strokeStyle = "#c99a1a";
ctx.setLineDash([5, 2, 1, 2]);
ctx.lineWidth = 1.5;
ctx.beginPath();
ctx.moveTo(rpx, margin.top);
ctx.lineTo(rpx, margin.top + h);
ctx.stroke();
ctx.setLineDash([]);
ctx.fillStyle = "#8a6b0e";
ctx.font = "11px -apple-system, sans-serif";
ctx.textAlign = "center";
ctx.fillText("M_ref", rpx, margin.top - 10);
ctx.restore();
}
// --- SM curve: solid, wide, drawn as the base layer. Its width means it will
// still show a visible rim even where the (narrower, dashed) BSM curves sit
// exactly on top of it. ---
strokeCurve("sm", "#8a8f96", [], 3.5);
// --- BSM total: dashed, drawn on top of the wider SM line ---
strokeCurve("trunc", "#f2994a", [7, 4], 2);
strokeCurve("exact", "#d1495b", [3, 2], 2);
// hover crosshair
if (hoverM !== null) {
const px = xToPixel(hoverM, w);
ctx.save();
ctx.strokeStyle = "#999";
ctx.setLineDash([3, 3]);
ctx.beginPath();
ctx.moveTo(px, margin.top);
ctx.lineTo(px, margin.top + h);
ctx.stroke();
ctx.restore();
}
// clip labels back within bounds (simple border to hide overflow)
ctx.save();
ctx.strokeStyle = "#ddd";
ctx.strokeRect(margin.left, margin.top, w, h);
ctx.restore();
}
function updateHoverInfo(M) {
const box = document.getElementById("hoverInfo");
if (M === null) { box.textContent = ""; return; }
let nearest = currentPoints[0], best = Infinity;
currentPoints.forEach((p) => {
const d = Math.abs(Math.log10(p.M) - Math.log10(M));
if (d < best) { best = d; nearest = p; }
});
box.textContent =
"M = " + Math.round(nearest.M) + " GeV \u2013 SM: " + fmt(nearest.sm) +
" \u00b7 EFT trunc.: " + fmt(nearest.trunc) +
" \u00b7 exact: " + fmt(nearest.exact);
}
canvas.addEventListener("mousemove", (e) => {
const rect = canvas.getBoundingClientRect();
const px = e.clientX - rect.left - margin.left;
const w = rect.width - margin.left - margin.right;
if (px < 0 || px > w) { hoverM = null; updateHoverInfo(null); redraw(); return; }
hoverM = pixelToX(px, w);
updateHoverInfo(hoverM);
redraw();
});
canvas.addEventListener("mouseleave", () => { hoverM = null; updateHoverInfo(null); redraw(); });
// ---------- UI wiring ----------
function updatePanels() {
const Mp = parseFloat(document.getElementById("mSlider").value);
const g = parseFloat(document.getElementById("gSlider").value);
const Mref = parseFloat(document.getElementById("refSlider").value);
document.getElementById("mVal").textContent = Mp + " GeV";
document.getElementById("gVal").textContent = g.toFixed(2);
document.getElementById("refVal").textContent = Mref + " GeV";
const Lambda = Mp / g;
const Gammap = (g * g * Mp) / (12 * Math.PI);
const widthFrac = (100 * Gammap) / Mp;
document.getElementById("derived").innerHTML =
"Λ = " + Math.round(Lambda) + " GeV · Γ′ = " +
Gammap.toFixed(1) + " GeV (Γ′/M′ = " + widthFrac.toFixed(1) + "%)";
const kNote = document.getElementById("kinematicNote");
if (Mp > M_MAX) {
kNote.style.display = "block";
kNote.innerHTML =
"M′ is now beyond the LHC’s kinematic reach (√s = 13 TeV) — the resonance " +
"itself can never be produced on-shell here. The red marker has moved off the chart. Every point " +
"you can see is safely in the EFT regime, and the green (truncated) and blue (exact) curves " +
"should track each other closely across the whole visible range.";
} else {
kNote.style.display = "none";
}
const uncHigh = parseFloat(document.getElementById("uncSlider").value) / 100;
document.getElementById("uncVal").textContent = "\u00b1" + Math.round(uncHigh * 100) + "%";
const effectiveBand = bandAt(Mref, uncHigh);
const gMax = findGmax(Mp, Mref, uncHigh);
const isExcluded = isFinite(gMax) && g > gMax;
const statusBox = document.getElementById("statusBox");
statusBox.className = "status " + (isExcluded ? "excluded" : "allowed");
const gMaxText = isFinite(gMax)
? "g \u2272 " + gMax.toFixed(2)
: "no meaningful bound (even g \u2273 4\u03c0, non-perturbative, wouldn't reach the "
+ Math.round(effectiveBand * 100) + "% band at this M_ref)";
statusBox.innerHTML =
"Non-observation at " + (Mref / 1000).toFixed(2) + " TeV (±" + Math.round(effectiveBand * 100) +
"% band" + (Mref >= UNC_SPLIT ? ", slider-controlled" : ", fixed low-mass precision") +
") implies " + gMaxText + " for M′ = " + Mp + " GeV. " +
(isFinite(gMax)
? (isExcluded
? "Your slider (g = " + g.toFixed(2) + ") is already EXCLUDED by that constraint."
: "Your slider (g = " + g.toFixed(2) + ") is still ALLOWED.")
: "This M_ref is too far below M′ to constrain it at all — any perturbative g is allowed.") +
(Mp < Mref
? " <em>Note: M′ is below M<sub>ref</sub>, so this evaluates the exact resonance " +
"past its own peak — interpret with care.</em>"
: "");
const G_LOW = 0.5, G_HIGH = 4 * Math.PI;
const massReachLow = findMassReach(G_LOW, Mref, uncHigh);
const massReachHigh = findMassReach(G_HIGH, Mref, uncHigh);
const reachBox = document.getElementById("reachBox");
const reachText = (v, dir) => {
if (v === Infinity) return dir === "low" ? "> 200 TeV" : "> 200 TeV";
if (v === -Infinity) return "< " + M_MIN + " GeV (unconstrained down to threshold)";
return (v / 1000).toFixed(2) + " TeV";
};
reachBox.innerHTML =
"Taking the same " + Math.round(effectiveBand * 100) + "% Wilson-coefficient constraint at " +
(Mref / 1000).toFixed(2) + " TeV and varying only the assumed UV coupling from g = " + G_LOW +
" (weak-scale) up to g = 4π ≈ " + G_HIGH.toFixed(1) +
" (perturbative unitarity ceiling) gives a minimum-mass reach ranging from <strong>" +
reachText(massReachLow, "low") + "</strong> to <strong>" +
reachText(massReachHigh, "high") + "</strong>" +
(isFinite(massReachLow) && isFinite(massReachHigh) && massReachLow > 0
? " — a factor of " + (massReachHigh / massReachLow).toFixed(0) +
"× spread from the coupling assumption alone, with the Wilson-coefficient bound held fixed."
: ".");
redraw();
}
document.getElementById("mSlider").addEventListener("input", updatePanels);
document.getElementById("gSlider").addEventListener("input", updatePanels);
document.getElementById("refSlider").addEventListener("input", updatePanels);
document.getElementById("uncSlider").addEventListener("input", updatePanels);
window.addEventListener("resize", resizeCanvas);
resizeCanvas();
updatePanels();
</script>
</body>
</html>