From e8943b476057a6b9bf02ed4d662ee69b076dfed4 Mon Sep 17 00:00:00 2001 From: Braulio Rivas Abad <61257604+brauliorivas@users.noreply.github.com> Date: Mon, 24 Jun 2024 02:26:42 -0500 Subject: [PATCH 1/5] Map particle with PDG -5122 (#41) * feat: map particle with PDG -5122 * fix $ sign --- data/particles.js | 1001 +++++++++++++++++++++++---------------------- 1 file changed, 501 insertions(+), 500 deletions(-) diff --git a/data/particles.js b/data/particles.js index 5a594dab..7cb5e2d7 100644 --- a/data/particles.js +++ b/data/particles.js @@ -1,521 +1,522 @@ export const mappings = { - // Quarks - "1": "d", - "-1": "{\\bar d}", - "2": "u", - "-2": "{\\bar u}", - "3": "s", - "-3": "{\\bar s}", - "4": "c", - "-4": "{\\bar c}", - "5": "b", - "-5": "{\\bar b}", - "6": "t", - "-6": "{\\bar t}", - "7": "b^{\\prime}", - "8": "t^{\\prime}", + // Quarks + "1": "d", + "-1": "{\\bar d}", + "2": "u", + "-2": "{\\bar u}", + "3": "s", + "-3": "{\\bar s}", + "4": "c", + "-4": "{\\bar c}", + "5": "b", + "-5": "{\\bar b}", + "6": "t", + "-6": "{\\bar t}", + "7": "b^{\\prime}", + "8": "t^{\\prime}", - // Leptons - "11": "e^{-}", - "-11": "e^{+}", - "12": "\\nu_{e}", - "-12": "{\\bar \\nu}_{e}", - "13": "\\mu^{-}", - "-13": "\\mu^{+}", - "14": "\\nu_{\\mu}", - "-14": "{\\bar \\nu}_{\\mu}", - "15": "\\tau^{-}", - "-15": "\\tau^{+}", - "16": "\\nu_{\\tau}", - "-16": "{\\bar \\nu}_{\\tau}", - "17": "\\tau^{\\prime-}", - "18": "\\nu_{{\\tau}^{\\prime}}", + // Leptons + "11": "e^{-}", + "-11": "e^{+}", + "12": "\\nu_{e}", + "-12": "{\\bar \\nu}_{e}", + "13": "\\mu^{-}", + "-13": "\\mu^{+}", + "14": "\\nu_{\\mu}", + "-14": "{\\bar \\nu}_{\\mu}", + "15": "\\tau^{-}", + "-15": "\\tau^{+}", + "16": "\\nu_{\\tau}", + "-16": "{\\bar \\nu}_{\\tau}", + "17": "\\tau^{\\prime-}", + "18": "\\nu_{{\\tau}^{\\prime}}", - // Excited Particles - "4000001": "d^{*}", - "4000002": "u^{*}", - "4000011": "e^{*}", - "4000012": "\\nu_{e}^{*}", + // Excited Particles + "4000001": "d^{*}", + "4000002": "u^{*}", + "4000011": "e^{*}", + "4000012": "\\nu_{e}^{*}", - // Gauge and Higgs Bosons - "21": "g", - "22": "\\gamma", - "23": "Z^{0}", - "24": "W^{+}", - "-24": "W^{-}", - "25": "h^{0}", - "32": "Z^{\\prime}", - "33": "Z^{\\prime\\prime}", - "34": "W^{\\prime}", - "35": "H^{0}", - "36": "A^{0}", - "37": "H^{+}", + // Gauge and Higgs Bosons + "21": "g", + "22": "\\gamma", + "23": "Z^{0}", + "24": "W^{+}", + "-24": "W^{-}", + "25": "h^{0}", + "32": "Z^{\\prime}", + "33": "Z^{\\prime\\prime}", + "34": "W^{\\prime}", + "35": "H^{0}", + "36": "A^{0}", + "37": "H^{+}", - // Diquarks - "1103": "(dd)_{1}", - "2101": "(ud)_{0}", - "2103": "(ud)_{1}", - "2203": "(uu)_{1}", - "3101": "(sd)_{0}", - "3103": "(sd)_{1}", - "3201": "(su)_{0}", - "3203": "(su)_{1}", - "3303": "(ss)_{1}", - "4101": "(cd)_{0}", - "4103": "(cd)_{1}", - "4201": "(cu)_{0}", - "4203": "(cu)_{1}", - "4301": "(cs)_{0}", - "4303": "(cs)_{1}", - "4403": "(cc)_{1}", - "5101": "(bd)_{0}", - "5103": "(bd)_{1}", - "5201": "(bu)_{0}", - "5203": "(bu)_{1}", - "5301": "(bs)_{0}", - "5303": "(bs)_{1}", - "5401": "(bc)_{0}", - "5403": "(bc)_{1}", - "5503": "(bb)_{1}", + // Diquarks + "1103": "(dd)_{1}", + "2101": "(ud)_{0}", + "2103": "(ud)_{1}", + "2203": "(uu)_{1}", + "3101": "(sd)_{0}", + "3103": "(sd)_{1}", + "3201": "(su)_{0}", + "3203": "(su)_{1}", + "3303": "(ss)_{1}", + "4101": "(cd)_{0}", + "4103": "(cd)_{1}", + "4201": "(cu)_{0}", + "4203": "(cu)_{1}", + "4301": "(cs)_{0}", + "4303": "(cs)_{1}", + "4403": "(cc)_{1}", + "5101": "(bd)_{0}", + "5103": "(bd)_{1}", + "5201": "(bu)_{0}", + "5203": "(bu)_{1}", + "5301": "(bs)_{0}", + "5303": "(bs)_{1}", + "5401": "(bc)_{0}", + "5403": "(bc)_{1}", + "5503": "(bb)_{1}", - // Technicolor Particles - "3000111": "\\pi^{0}_{tech}", - "3000211": "\\pi^{+}_{tech}", - "3000221": "\\pi^{\\prime0}_{tech}", - "3100221": "\\eta^{0}_{tech}", - "3000113": "\\rho^{0}_{tech}", - "3000213": "\\rho^{+}_{tech}", - "3000223": "\\omega^{0}_{tech}", - "3100021": "V_{8}", - "3060111": "\\pi^{1}_{tech,22}", - "3160111": "\\pi^{8}_{tech,22}", - "3130113": "\\rho_{tech,11}", - "3140113": "\\rho_{tech,12}", - "3150113": "\\rho_{tech,21}", - "3160113": "\\rho_{tech,22}", + // Technicolor Particles + "3000111": "\\pi^{0}_{tech}", + "3000211": "\\pi^{+}_{tech}", + "3000221": "\\pi^{\\prime0}_{tech}", + "3100221": "\\eta^{0}_{tech}", + "3000113": "\\rho^{0}_{tech}", + "3000213": "\\rho^{+}_{tech}", + "3000223": "\\omega^{0}_{tech}", + "3100021": "V_{8}", + "3060111": "\\pi^{1}_{tech,22}", + "3160111": "\\pi^{8}_{tech,22}", + "3130113": "\\rho_{tech,11}", + "3140113": "\\rho_{tech,12}", + "3150113": "\\rho_{tech,21}", + "3160113": "\\rho_{tech,22}", - // R-Hadrons - "1000993": "R^{0}_{{\\widetilde{g}}g}", - "1009113": "R^{0}_{{\\widetilde{g}}d{\\bar{d}}}", - "1009213": "R^{+}_{{\\widetilde{g}}u{\\bar{u}}}", - "1009223": "R^{0}_{{\\widetilde{g}}u{\\bar{u}}}", - "1009313": "R^{0}_{{\\widetilde{g}}d{\\bar{s}}}", - "1009323": "R^{+}_{{\\widetilde{g}}u{\\bar{s}}}", - "1009333": "R^{0}_{{\\widetilde{g}}s{\\bar{s}}}", - "1091114": "R^{-}_{{\\widetilde{g}}ddd}", - "1092114": "R^{0}_{{\\widetilde{g}}udd}", - "1092214": "R^{+}_{{\\widetilde{g}}uud}", - "1092224": "R^{++}_{{\\widetilde{g}}uuu}", - "1093114": "R^{-}_{{\\widetilde{g}}sdd}", - "1093214": "R^{0}_{{\\widetilde{g}}sud}", - "1093224": "R^{+}_{{\\widetilde{g}}suu}", - "1093314": "R^{-}_{{\\widetilde{g}}ssd}", - "1093324": "R^{0}_{{\\widetilde{g}}ssu}", - "1093324": "R^{-}_{{\\widetilde{g}}sss}", - "1000612": "R^{+}_{{\\widetilde{t_{1}}}{\\bar{d}}}", - "1000622": "R^{0}_{{\\widetilde{t_{1}}}{\\bar{u}}}", - "1000632": "R^{+}_{{\\widetilde{t_{1}}}{\\bar{s}}}", - "1000642": "R^{0}_{{\\widetilde{t_{1}}}{\\bar{c}}}", - "1000652": "R^{+}_{{\\widetilde{t_{1}}}{\\bar{b}}}", - "1006113": "R^{0}_{{\\widetilde{t_{1}}}dd_{1}}", - "1006211": "R^{+}_{{\\widetilde{t_{1}}}ud_{0}}", - "1006213": "R^{+}_{{\\widetilde{t_{1}}}ud_{1}}", - "1006223": "R^{++}_{{\\widetilde{t_{1}}}uu_{1}}", - "1006311": "R^{0}_{{\\widetilde{t_{1}}}sd_{0}}", - "1006313": "R^{0}_{{\\widetilde{t_{1}}}sd_{1}}", - "1006321": "R^{+}_{{\\widetilde{t_{1}}}su_{0}}", - "1006323": "R^{+}_{{\\widetilde{t_{1}}}su_{1}}", - "1006333": "R^{0}_{{\\widetilde{t_{1}}}ss_{1}}", + // R-Hadrons + "1000993": "R^{0}_{{\\widetilde{g}}g}", + "1009113": "R^{0}_{{\\widetilde{g}}d{\\bar{d}}}", + "1009213": "R^{+}_{{\\widetilde{g}}u{\\bar{u}}}", + "1009223": "R^{0}_{{\\widetilde{g}}u{\\bar{u}}}", + "1009313": "R^{0}_{{\\widetilde{g}}d{\\bar{s}}}", + "1009323": "R^{+}_{{\\widetilde{g}}u{\\bar{s}}}", + "1009333": "R^{0}_{{\\widetilde{g}}s{\\bar{s}}}", + "1091114": "R^{-}_{{\\widetilde{g}}ddd}", + "1092114": "R^{0}_{{\\widetilde{g}}udd}", + "1092214": "R^{+}_{{\\widetilde{g}}uud}", + "1092224": "R^{++}_{{\\widetilde{g}}uuu}", + "1093114": "R^{-}_{{\\widetilde{g}}sdd}", + "1093214": "R^{0}_{{\\widetilde{g}}sud}", + "1093224": "R^{+}_{{\\widetilde{g}}suu}", + "1093314": "R^{-}_{{\\widetilde{g}}ssd}", + "1093324": "R^{0}_{{\\widetilde{g}}ssu}", + "1093324": "R^{-}_{{\\widetilde{g}}sss}", + "1000612": "R^{+}_{{\\widetilde{t_{1}}}{\\bar{d}}}", + "1000622": "R^{0}_{{\\widetilde{t_{1}}}{\\bar{u}}}", + "1000632": "R^{+}_{{\\widetilde{t_{1}}}{\\bar{s}}}", + "1000642": "R^{0}_{{\\widetilde{t_{1}}}{\\bar{c}}}", + "1000652": "R^{+}_{{\\widetilde{t_{1}}}{\\bar{b}}}", + "1006113": "R^{0}_{{\\widetilde{t_{1}}}dd_{1}}", + "1006211": "R^{+}_{{\\widetilde{t_{1}}}ud_{0}}", + "1006213": "R^{+}_{{\\widetilde{t_{1}}}ud_{1}}", + "1006223": "R^{++}_{{\\widetilde{t_{1}}}uu_{1}}", + "1006311": "R^{0}_{{\\widetilde{t_{1}}}sd_{0}}", + "1006313": "R^{0}_{{\\widetilde{t_{1}}}sd_{1}}", + "1006321": "R^{+}_{{\\widetilde{t_{1}}}su_{0}}", + "1006323": "R^{+}_{{\\widetilde{t_{1}}}su_{1}}", + "1006333": "R^{0}_{{\\widetilde{t_{1}}}ss_{1}}", - // Susy Particles - "1000001": "{\\widetilde{d}}_{L}", - "1000002": "{\\widetilde{u}}_{L}", - "1000003": "{\\widetilde{s}}_{L}", - "1000004": "{\\widetilde{c}}_{L}", - "1000005": "{\\widetilde{b}}_{1}", - "1000006": "{\\widetilde{t}}_{1}", - "1000011": "{\\widetilde{e}}^{-}_{L}", - "1000012": "{\\widetilde{\\nu}}_{eL}", - "1000013": "{\\widetilde{\\mu}}^{-}_{L}", - "1000014": "{\\widetilde{\\nu}}_{\\muL}", - "1000015": "{\\widetilde{\\tau}}^{-}_{1}", - "1000016": "{\\widetilde{\\nu}}_{\\tauL}", - "2000001": "{\\widetilde{d}}_{R}", - "2000002": "{\\widetilde{u}}_{R}", - "2000003": "{\\widetilde{s}}_{R}", - "2000004": "{\\widetilde{c}}_{R}", - "2000005": "{\\widetilde{b}}_{2}", - "2000006": "{\\widetilde{t}}_{2}", - "2000011": "{\\widetilde{e}}^{-}_{R}", - "2000013": "{\\widetilde{\\mu}}^{-}_{R}", - "2000015": "{\\widetilde{\\tau}}^{-}_{2}", - "1000021": "{\\widetilde{g}}", - "1000022": "{\\widetilde{\\chi}}^{0}_{1}", - "1000023": "{\\widetilde{\\chi}}^{0}_{2}", - "1000024": "{\\widetilde{\\chi}}^{+}_{1}", - "1000025": "{\\widetilde{\\chi}}^{0}_{3}", - "1000035": "{\\widetilde{\\chi}}^{0}_{4}", - "1000037": "{\\widetilde{\\chi}}^{+}_{2}", - "1000039": "{\\widetilde{G}}", + // Susy Particles + "1000001": "{\\widetilde{d}}_{L}", + "1000002": "{\\widetilde{u}}_{L}", + "1000003": "{\\widetilde{s}}_{L}", + "1000004": "{\\widetilde{c}}_{L}", + "1000005": "{\\widetilde{b}}_{1}", + "1000006": "{\\widetilde{t}}_{1}", + "1000011": "{\\widetilde{e}}^{-}_{L}", + "1000012": "{\\widetilde{\\nu}}_{eL}", + "1000013": "{\\widetilde{\\mu}}^{-}_{L}", + "1000014": "{\\widetilde{\\nu}}_{\\muL}", + "1000015": "{\\widetilde{\\tau}}^{-}_{1}", + "1000016": "{\\widetilde{\\nu}}_{\\tauL}", + "2000001": "{\\widetilde{d}}_{R}", + "2000002": "{\\widetilde{u}}_{R}", + "2000003": "{\\widetilde{s}}_{R}", + "2000004": "{\\widetilde{c}}_{R}", + "2000005": "{\\widetilde{b}}_{2}", + "2000006": "{\\widetilde{t}}_{2}", + "2000011": "{\\widetilde{e}}^{-}_{R}", + "2000013": "{\\widetilde{\\mu}}^{-}_{R}", + "2000015": "{\\widetilde{\\tau}}^{-}_{2}", + "1000021": "{\\widetilde{g}}", + "1000022": "{\\widetilde{\\chi}}^{0}_{1}", + "1000023": "{\\widetilde{\\chi}}^{0}_{2}", + "1000024": "{\\widetilde{\\chi}}^{+}_{1}", + "1000025": "{\\widetilde{\\chi}}^{0}_{3}", + "1000035": "{\\widetilde{\\chi}}^{0}_{4}", + "1000037": "{\\widetilde{\\chi}}^{+}_{2}", + "1000039": "{\\widetilde{G}}", - // Special Particles - "39": "G", - "41": "R^{0}", - "42": "LQ^{c}", - "110": "reggeon", - "990": "pomeron", - "9990": "odderon", + // Special Particles + "39": "G", + "41": "R^{0}", + "42": "LQ^{c}", + "110": "reggeon", + "990": "pomeron", + "9990": "odderon", - // Light I = 1 Mesons - "111": "\\pi^{0}", - "211": "\\pi^{+}", - "-211": "\\pi^{-}", - "9000111": "a_{0}(980)^{0}", - "9000211": "a_{0}(980)^{+}", - "100111": "\\pi(1300)^{0}", - "100211": "\\pi(1300)^{+}", - "10111": "a_{0}(1450)^{0}", - "10211": "a_{0}(1450)^{+}", - "9010111": "\\pi(1800)^{0}", - "9010211": "\\pi(1800)^{+}", - "113": "\\rho^{0}(770)", - "213": "\\rho(770)^{+}", - "-213": "\\rho(770)^{-}", - "10113": "b_{1}(1235)^{0}", - "10213": "b_{1}(1235)^{+}", - "20113": "a_{1}(1260)^{0}", - "20213": "a_{1}(1260)^{+}", - "-20213": "{\\bar a}_{1}(1260)^{+}", - "9000113": "\\pi_{1}(1400)^{0}", - "9000213": "\\pi_{1}(1400)^{+}", - "100113": "\\rho(1450)^{0}", - "100213": "\\rho(1450)^{+}", - "9010113": "\\pi_{1}(1600)^{0}", - "9010213": "\\pi_{1}(1600)^{+}", - "9020113": "a_{1}(1640)^{0}", - "9020213": "a_{1}(1640)^{+}", - "30113": "\\rho(1700)^{0}", - "30213": "\\rho(1700)^{+}", - "9030113": "\\rho(1900)^{0}", - "9030213": "\\rho(1900)^{+}", - "9040113": "\\rho(2150)^{0}", - "9040213": "\\rho(2150)^{+}", - "115": "a_{2}(1320)^{0}", - "215": "a_{2}(1320)^{+}", - "10115": "\\pi_{2}(1670)^{0}", - "10215": "\\pi_{2}(1670)^{+}", - "9000115": "a_{2}(1700)^{0}", - "9000215": "a_{2}(1700)^{+}", - "9010115": "\\pi_{2}(2100)^{0}", - "9010215": "\\pi_{2}(2100)^{+}", - "117": "\\rho_{3}(1690)^{0}", - "217": "\\rho_{3}(1690)^{+}", - "9000117": "\\rho_{3}(1990)^{0}", - "9000217": "\\rho_{3}(1990)^{+}", - "9010117": "\\rho_{3}(2250)^{0}", - "9010217": "\\rho_{3}(2250)^{+}", - "119": "a_{4}(2040)^{0}", - "219": "a_{4}(2040)^{+}", + // Light I = 1 Mesons + "111": "\\pi^{0}", + "211": "\\pi^{+}", + "-211": "\\pi^{-}", + "9000111": "a_{0}(980)^{0}", + "9000211": "a_{0}(980)^{+}", + "100111": "\\pi(1300)^{0}", + "100211": "\\pi(1300)^{+}", + "10111": "a_{0}(1450)^{0}", + "10211": "a_{0}(1450)^{+}", + "9010111": "\\pi(1800)^{0}", + "9010211": "\\pi(1800)^{+}", + "113": "\\rho^{0}(770)", + "213": "\\rho(770)^{+}", + "-213": "\\rho(770)^{-}", + "10113": "b_{1}(1235)^{0}", + "10213": "b_{1}(1235)^{+}", + "20113": "a_{1}(1260)^{0}", + "20213": "a_{1}(1260)^{+}", + "-20213": "{\\bar a}_{1}(1260)^{+}", + "9000113": "\\pi_{1}(1400)^{0}", + "9000213": "\\pi_{1}(1400)^{+}", + "100113": "\\rho(1450)^{0}", + "100213": "\\rho(1450)^{+}", + "9010113": "\\pi_{1}(1600)^{0}", + "9010213": "\\pi_{1}(1600)^{+}", + "9020113": "a_{1}(1640)^{0}", + "9020213": "a_{1}(1640)^{+}", + "30113": "\\rho(1700)^{0}", + "30213": "\\rho(1700)^{+}", + "9030113": "\\rho(1900)^{0}", + "9030213": "\\rho(1900)^{+}", + "9040113": "\\rho(2150)^{0}", + "9040213": "\\rho(2150)^{+}", + "115": "a_{2}(1320)^{0}", + "215": "a_{2}(1320)^{+}", + "10115": "\\pi_{2}(1670)^{0}", + "10215": "\\pi_{2}(1670)^{+}", + "9000115": "a_{2}(1700)^{0}", + "9000215": "a_{2}(1700)^{+}", + "9010115": "\\pi_{2}(2100)^{0}", + "9010215": "\\pi_{2}(2100)^{+}", + "117": "\\rho_{3}(1690)^{0}", + "217": "\\rho_{3}(1690)^{+}", + "9000117": "\\rho_{3}(1990)^{0}", + "9000217": "\\rho_{3}(1990)^{+}", + "9010117": "\\rho_{3}(2250)^{0}", + "9010217": "\\rho_{3}(2250)^{+}", + "119": "a_{4}(2040)^{0}", + "219": "a_{4}(2040)^{+}", - // Light I = 0 Mesons - "221": "\\eta", - "331": "\\eta^{\\prime}(958)", - "-331": "{\\bar \\eta}^{\\prime}(958)", - "9000221": "f_{0}(600)", - "9010221": "f_{0}(980)", - "100221": "\\eta(1295)", - "10221": "f_{0}(1370)", - "9020221": "\\eta(1405)", - "100331": "\\eta(1475)", - "9030221": "f_{0}(1500)", - "10331": "f_{0}(1710)", - "9040221": "\\eta(1760)", - "9050221": "f_{0}(2020)", - "9060221": "f_{0}(2100)", - "9070221": "f_{0}(2200)", - "9080221": "\\eta(2225)", - "223": "\\omega(782)", - "333": "\\phi(1020)", - "10223": "h_{1}(1170)", - "20223": "f_{1}(1285)", - "10333": "h_{1}(1380)", - "20333": "f_{1}(1420)", - "100223": "\\omega(1420)", - "9000223": "f_{1}(1510)", - "9010223": "h_{1}(1595)", - "30223": "\\omega(1650)", - "100333": "\\phi(1680)", - "225": "f_{2}(1270)", - "9000225": "f_{2}(1430)", - "335": "f_{2}^{\\prime}(1525)", - "9010225": "f_{2}(1565)", - "9020225": "f_{2}(1640)", - "10225": "\\eta_{2}(1645)", - "9030225": "f_{2}(1810)", - "10335": "\\eta_{2}(1870)", - "9040225": "f_{2}(1910)", - "9050225": "f_{2}(1950)", - "9060225": "f_{2}(2010)", - "9070225": "f_{2}(2150)", - "9080225": "f_{2}(2300)", - "9090225": "f_{2}(2340)", - "227": "\\omega_{3}(1670)", - "337": "\\phi_{3}(1850)", - "229": "f_{4}(2050)", - "9000229": "f_{J}(2220)", - "9010229": "f_{4}(2300)", + // Light I = 0 Mesons + "221": "\\eta", + "331": "\\eta^{\\prime}(958)", + "-331": "{\\bar \\eta}^{\\prime}(958)", + "9000221": "f_{0}(600)", + "9010221": "f_{0}(980)", + "100221": "\\eta(1295)", + "10221": "f_{0}(1370)", + "9020221": "\\eta(1405)", + "100331": "\\eta(1475)", + "9030221": "f_{0}(1500)", + "10331": "f_{0}(1710)", + "9040221": "\\eta(1760)", + "9050221": "f_{0}(2020)", + "9060221": "f_{0}(2100)", + "9070221": "f_{0}(2200)", + "9080221": "\\eta(2225)", + "223": "\\omega(782)", + "333": "\\phi(1020)", + "10223": "h_{1}(1170)", + "20223": "f_{1}(1285)", + "10333": "h_{1}(1380)", + "20333": "f_{1}(1420)", + "100223": "\\omega(1420)", + "9000223": "f_{1}(1510)", + "9010223": "h_{1}(1595)", + "30223": "\\omega(1650)", + "100333": "\\phi(1680)", + "225": "f_{2}(1270)", + "9000225": "f_{2}(1430)", + "335": "f_{2}^{\\prime}(1525)", + "9010225": "f_{2}(1565)", + "9020225": "f_{2}(1640)", + "10225": "\\eta_{2}(1645)", + "9030225": "f_{2}(1810)", + "10335": "\\eta_{2}(1870)", + "9040225": "f_{2}(1910)", + "9050225": "f_{2}(1950)", + "9060225": "f_{2}(2010)", + "9070225": "f_{2}(2150)", + "9080225": "f_{2}(2300)", + "9090225": "f_{2}(2340)", + "227": "\\omega_{3}(1670)", + "337": "\\phi_{3}(1850)", + "229": "f_{4}(2050)", + "9000229": "f_{J}(2220)", + "9010229": "f_{4}(2300)", - // Strange Mesons - "130": "K^{0}_{L}", - "310": "K^{0}_{S}", - "311": "K^{0}", - "-311": "{\\bar K}^{0}", - "321": "K^{+}", - "-321": "K^{-}", - "9000311": "K^{*}_{0}(800)^{0}", - "9000321": "K^{*}_{0}(800)^{+}", - "10311": "K^{*}_{0}(1430)^{0}", - "10321": "K^{*}_{0}(1430)^{+}", - "100311": "K(1460)^{0}", - "100321": "K(1460)^{+}", - "9010311": "K(1830)^{0}", - "9010321": "K(1830)^{+}", - "9020311": "K^{*}_{0}(1950)^{0}", - "9020321": "K^{*}_{0}(1950)^{+}", - "313": "K^{*}(892)^{0}", - "-313": "{\\bar K}^{*}(892)^{0}", - "323": "K^{*}(892)^{+}", - "-323": "K^{*}(892)^{-}", - "10313": "K_{1}(1270)^{0}", - "10323": "K_{1}(1270)^{+}", - "20313": "K_{1}(1400)^{0}", - "20323": "K_{1}(1400)^{+}", - "100313": "K^{*}(1410)^{0}", - "100323": "K^{*}(1410)^{+}", - "9000313": "K_{1}(1650)^{0}", - "9000323": "K_{1}(1650)^{+}", - "30313": "K^{*}(1680)^{0}", - "30323": "K^{*}(1680)^{+}", - "315": "K_{2}^{*}(1430)^{0}", - "325": "K_{2}^{*}(1430)^{+}", - "9000315": "K_{2}(1580)^{0}", - "9000325": "K_{2}(1580)^{+}", - "10315": "K_{2}(1770)^{0}", - "10325": "K_{2}(1770)^{+}", - "20315": "K_{2}(1820)^{0}", - "20325": "K_{2}(1820)^{+}", - "9010315": "K^{*}_{2}(1980)^{0}", - "9010325": "K^{*}_{2}(1980)^{+}", - "9020315": "K_{2}(2250)^{0}", - "9020325": "K_{2}(2250)^{+}", - "317": "K_{3}^{*}(1780)^{0}", - "327": "K_{3}^{*}(1780)^{+}", - "9010317": "K_{3}(2320)^{0}", - "9010327": "K_{3}(2320)^{+}", - "319": "K_{4}^{*}(2045)^{0}", - "329": "K_{4}^{*}(2045)^{+}", - "9000319": "K_{4}(2500)^{0}", - "9000329": "K_{4}(2500)^{+}", + // Strange Mesons + "130": "K^{0}_{L}", + "310": "K^{0}_{S}", + "311": "K^{0}", + "-311": "{\\bar K}^{0}", + "321": "K^{+}", + "-321": "K^{-}", + "9000311": "K^{*}_{0}(800)^{0}", + "9000321": "K^{*}_{0}(800)^{+}", + "10311": "K^{*}_{0}(1430)^{0}", + "10321": "K^{*}_{0}(1430)^{+}", + "100311": "K(1460)^{0}", + "100321": "K(1460)^{+}", + "9010311": "K(1830)^{0}", + "9010321": "K(1830)^{+}", + "9020311": "K^{*}_{0}(1950)^{0}", + "9020321": "K^{*}_{0}(1950)^{+}", + "313": "K^{*}(892)^{0}", + "-313": "{\\bar K}^{*}(892)^{0}", + "323": "K^{*}(892)^{+}", + "-323": "K^{*}(892)^{-}", + "10313": "K_{1}(1270)^{0}", + "10323": "K_{1}(1270)^{+}", + "20313": "K_{1}(1400)^{0}", + "20323": "K_{1}(1400)^{+}", + "100313": "K^{*}(1410)^{0}", + "100323": "K^{*}(1410)^{+}", + "9000313": "K_{1}(1650)^{0}", + "9000323": "K_{1}(1650)^{+}", + "30313": "K^{*}(1680)^{0}", + "30323": "K^{*}(1680)^{+}", + "315": "K_{2}^{*}(1430)^{0}", + "325": "K_{2}^{*}(1430)^{+}", + "9000315": "K_{2}(1580)^{0}", + "9000325": "K_{2}(1580)^{+}", + "10315": "K_{2}(1770)^{0}", + "10325": "K_{2}(1770)^{+}", + "20315": "K_{2}(1820)^{0}", + "20325": "K_{2}(1820)^{+}", + "9010315": "K^{*}_{2}(1980)^{0}", + "9010325": "K^{*}_{2}(1980)^{+}", + "9020315": "K_{2}(2250)^{0}", + "9020325": "K_{2}(2250)^{+}", + "317": "K_{3}^{*}(1780)^{0}", + "327": "K_{3}^{*}(1780)^{+}", + "9010317": "K_{3}(2320)^{0}", + "9010327": "K_{3}(2320)^{+}", + "319": "K_{4}^{*}(2045)^{0}", + "329": "K_{4}^{*}(2045)^{+}", + "9000319": "K_{4}(2500)^{0}", + "9000329": "K_{4}(2500)^{+}", - // Charmed Mesons - "411": "D^{+}", - "-411": "d^{-}", - "421": "D^{0}", - "-421": "{\\bar D}^{0}", - "10411": "D^{*}_{0}(2400)^{+}", - "10421": "D^{*}_{0}(2400)^{0}", - "413": "D^{*}(2010)^{+}", - "-413": "{\\bar D}^{*}(2010)^{+}", - "423": "D^{*}(2007)^{0}", - "-423": "{\\bar D}^{*}(2007)^{0}", - "10413": "D_{1}(2420)^{+}", - "10423": "D_{1}(2420)^{0}", - "20413": "D_{1}(H)^{+}", - "20423": "D_{1}(2430)^{0}", - "415": "D^{*}_{2}(2460)^{+}", - "425": "D^{*}_{2}(2460)^{0}", - "431": "D^{+}_{s}", - "-431": "{\\bar D}^{+}_{s}", - "10431": "D^{*}_{s0}(2317)^{+}", - "433": "D^{*+}_{s}", - "10433": "D_{s1}(2536)^{+}", - "20433": "D_{s1}(2460)^{+}", - "435": "D^{*}_{s2}(2573)^{+}", + // Charmed Mesons + "411": "D^{+}", + "-411": "d^{-}", + "421": "D^{0}", + "-421": "{\\bar D}^{0}", + "10411": "D^{*}_{0}(2400)^{+}", + "10421": "D^{*}_{0}(2400)^{0}", + "413": "D^{*}(2010)^{+}", + "-413": "{\\bar D}^{*}(2010)^{+}", + "423": "D^{*}(2007)^{0}", + "-423": "{\\bar D}^{*}(2007)^{0}", + "10413": "D_{1}(2420)^{+}", + "10423": "D_{1}(2420)^{0}", + "20413": "D_{1}(H)^{+}", + "20423": "D_{1}(2430)^{0}", + "415": "D^{*}_{2}(2460)^{+}", + "425": "D^{*}_{2}(2460)^{0}", + "431": "D^{+}_{s}", + "-431": "{\\bar D}^{+}_{s}", + "10431": "D^{*}_{s0}(2317)^{+}", + "433": "D^{*+}_{s}", + "10433": "D_{s1}(2536)^{+}", + "20433": "D_{s1}(2460)^{+}", + "435": "D^{*}_{s2}(2573)^{+}", - // Bottom Mesons - "511": "B^{0}", - "-511": "{\\bar B}^{0}", - "521": "B^{+}", - "-521": "B^{-}", - "10511": "B^{*0}_{0}", - "10521": "B^{*+}_{0}", - "513": "B^{*0}", - "-513": "{\\bar B}^{*0}", - "523": "B^{*+}", - "-523": "B^{*-}", - "10513": "B_{1}(L)^{0}", - "10523": "B_{1}(L)^{+}", - "20513": "B_{1}(H)^{0}", - "20523": "B_{1}(H)^{+}", - "515": "B^{*0}_{2}", - "525": "B^{*+}_{2}", - "531": "B^{0}_{s}", - "-531": "{\\bar B}^{0}_{s}", - "10531": "B^{*0}_{s0}", - "533": "B^{*0}_{s}", - "10533": "B_{s1}(L)^{0}", - "20533": "B_{s1}(H)^{0}", - "535": "B^{*0}_{s2}", - "541": "B^{+}_{c}", - "10541": "B^{*+}_{c0}", - "543": "B^{*+}_{c}", - "10543": "B_{c1}(L)^{+}", - "20543": "B_{c1}(H)^{+}", - "545": "B^{*+}_{c2}", + // Bottom Mesons + "511": "B^{0}", + "-511": "{\\bar B}^{0}", + "521": "B^{+}", + "-521": "B^{-}", + "10511": "B^{*0}_{0}", + "10521": "B^{*+}_{0}", + "513": "B^{*0}", + "-513": "{\\bar B}^{*0}", + "523": "B^{*+}", + "-523": "B^{*-}", + "10513": "B_{1}(L)^{0}", + "10523": "B_{1}(L)^{+}", + "20513": "B_{1}(H)^{0}", + "20523": "B_{1}(H)^{+}", + "515": "B^{*0}_{2}", + "525": "B^{*+}_{2}", + "531": "B^{0}_{s}", + "-531": "{\\bar B}^{0}_{s}", + "10531": "B^{*0}_{s0}", + "533": "B^{*0}_{s}", + "10533": "B_{s1}(L)^{0}", + "20533": "B_{s1}(H)^{0}", + "535": "B^{*0}_{s2}", + "541": "B^{+}_{c}", + "10541": "B^{*+}_{c0}", + "543": "B^{*+}_{c}", + "10543": "B_{c1}(L)^{+}", + "20543": "B_{c1}(H)^{+}", + "545": "B^{*+}_{c2}", - // cc Mesons - "441": "\\eta_{c}(1S)", - "10441": "\\chi_{c0}(1P)", - "100441": "\\eta_{c}(2S)", - "443": "J/\\psi(1S)", - "10443": "h_{c}(1P)", - "20443": "\\chi_{c1}(1P)", - "100443": "\\psi(2S)", - "30443": "\\psi(3770)", - "9000443": "\\psi(4040)", - "9010443": "\\psi(4160)", - "9020443": "\\psi(4415)", - "445": "\\chi_{c2}(1P)", - "100445": "\\chi_{c2}(2P)", + // cc Mesons + "441": "\\eta_{c}(1S)", + "10441": "\\chi_{c0}(1P)", + "100441": "\\eta_{c}(2S)", + "443": "J/\\psi(1S)", + "10443": "h_{c}(1P)", + "20443": "\\chi_{c1}(1P)", + "100443": "\\psi(2S)", + "30443": "\\psi(3770)", + "9000443": "\\psi(4040)", + "9010443": "\\psi(4160)", + "9020443": "\\psi(4415)", + "445": "\\chi_{c2}(1P)", + "100445": "\\chi_{c2}(2P)", - // bb Mesons - "551": "\\eta_{b}(1S)", - "10551": "\\chi_{b0}(1P)", - "100551": "\\eta_{b}(2S)", - "110551": "\\chi_{b0}(2P)", - "200551": "\\eta_{b}(3S)", - "210551": "\\chi_{b0}(3P)", - "553": "\\Upsilon(1S)", - "10553": "h_{b}(1P)", - "20553": "\\chi_{b1}(1P)", - "30553": "\\Upsilon_{1}(1D)", - "100553": "\\Upsilon(2S)", - "110553": "h_{b}(2P)", - "120553": "\\chi_{b1}(2P)", - "130553": "\\Upsilon_{1}(2D)", - "200553": "\\Upsilon(3S)", - "210553": "h_{b}(3P)", - "220553": "\\chi_{b1}(3P)", - "300553": "\\Upsilon(4S)", - "9000553": "\\Upsilon(10860)", - "9010553": "\\Upsilon(11020)", - "555": "\\chi_{b2}(1P)", - "10555": "\\eta_{b2}(1D)", - "20555": "\\Upsilon_{2}(1D)", - "100555": "\\chi_{b2}(2P)", - "110555": "\\eta_{b2}(2D)", - "120555": "\\Upsilon_{2}(2D)", - "200555": "\\chi_{b2}(3P)", - "557": "\\Upsilon_{3}(1D)", - "100557": "\\Upsilon_{3}(2D)", + // bb Mesons + "551": "\\eta_{b}(1S)", + "10551": "\\chi_{b0}(1P)", + "100551": "\\eta_{b}(2S)", + "110551": "\\chi_{b0}(2P)", + "200551": "\\eta_{b}(3S)", + "210551": "\\chi_{b0}(3P)", + "553": "\\Upsilon(1S)", + "10553": "h_{b}(1P)", + "20553": "\\chi_{b1}(1P)", + "30553": "\\Upsilon_{1}(1D)", + "100553": "\\Upsilon(2S)", + "110553": "h_{b}(2P)", + "120553": "\\chi_{b1}(2P)", + "130553": "\\Upsilon_{1}(2D)", + "200553": "\\Upsilon(3S)", + "210553": "h_{b}(3P)", + "220553": "\\chi_{b1}(3P)", + "300553": "\\Upsilon(4S)", + "9000553": "\\Upsilon(10860)", + "9010553": "\\Upsilon(11020)", + "555": "\\chi_{b2}(1P)", + "10555": "\\eta_{b2}(1D)", + "20555": "\\Upsilon_{2}(1D)", + "100555": "\\chi_{b2}(2P)", + "110555": "\\eta_{b2}(2D)", + "120555": "\\Upsilon_{2}(2D)", + "200555": "\\chi_{b2}(3P)", + "557": "\\Upsilon_{3}(1D)", + "100557": "\\Upsilon_{3}(2D)", - // Light Baryons - "2212": "p", - "-2212": "{\\bar p}", - "2112": "n", - "-2112": "{\\bar n}", - "2224": "\\Delta^{++}", - "-2224": "{\\bar \\Delta}^{++}", - "2214": "\\Delta^{+}", - "-2214": "{\\bar \\Delta}^{+}", - "2114": "\\Delta^{0}", - "1114": "\\Delta^{-}", - "-1114": "{\\bar \\Delta}^{-}", + // Light Baryons + "2212": "p", + "-2212": "{\\bar p}", + "2112": "n", + "-2112": "{\\bar n}", + "2224": "\\Delta^{++}", + "-2224": "{\\bar \\Delta}^{++}", + "2214": "\\Delta^{+}", + "-2214": "{\\bar \\Delta}^{+}", + "2114": "\\Delta^{0}", + "1114": "\\Delta^{-}", + "-1114": "{\\bar \\Delta}^{-}", - // Strange Baryons - "3122": "\\Lambda", - "-3122": "{\\bar \\Lambda}", - "3222": "\\Sigma^{+}", - "-3222": "\\Sigma^{-}", - "3212": "\\Sigma^{0}", - "-3212": "{\\bar \\Sigma}^{0}", - "3112": "\\Sigma^{-}", - "3224": "\\Sigma^{*+}", - "-3224": "{\\bar \\Sigma}^{*+}", - "3214": "\\Sigma^{*0}", - "3114": "\\Sigma^{*-}", - "3322": "\\Xi^{0}", - "3312": "\\Xi^{-}", - "-3312": "{\\bar \\Xi}^{-}", - "3324": "\\Xi^{*0}", - "3314": "\\Xi^{*-}", - "3334": "\\Omega^{-}", + // Strange Baryons + "3122": "\\Lambda", + "-3122": "{\\bar \\Lambda}", + "3222": "\\Sigma^{+}", + "-3222": "\\Sigma^{-}", + "3212": "\\Sigma^{0}", + "-3212": "{\\bar \\Sigma}^{0}", + "3112": "\\Sigma^{-}", + "3224": "\\Sigma^{*+}", + "-3224": "{\\bar \\Sigma}^{*+}", + "3214": "\\Sigma^{*0}", + "3114": "\\Sigma^{*-}", + "3322": "\\Xi^{0}", + "3312": "\\Xi^{-}", + "-3312": "{\\bar \\Xi}^{-}", + "3324": "\\Xi^{*0}", + "3314": "\\Xi^{*-}", + "3334": "\\Omega^{-}", - // Charmed Baryons - "4122": "\\Lambda^{+}_{c}", - "-4122": "\\Lambda^{-}_{c}", - "4222": "\\Sigma^{++}_{c}", - "-4222": "\\Sigma^{--}_{c}", - "4212": "\\Sigma^{+}_{c}", - "-4212": "\\Sigma^{-}_{c}", - "4112": "\\Sigma^{0}_{c}", - "4224": "\\Sigma^{*++}_{c}", - "4214": "\\Sigma^{*+}_{c}", - "4114": "\\Sigma^{*0}_{c}", - "4232": "\\Xi^{+}_{c}", - "4132": "\\Xi^{0}_{c}", - "4322": "\\Xi^{\\prime+}_{c}", - "4312": "\\Xi^{\\prime0}_{c}", - "4324": "\\Xi^{*+}_{c}", - "4314": "\\Xi^{*0}_{c}", - "4332": "\\Omega^{0}_{c}", - "4334": "\\Omega^{*0}_{c}", - "4412": "\\Xi^{+}_{cc}", - "4422": "\\Xi^{++}_{cc}", - "4414": "\\Xi^{*+}_{cc}", - "4424": "\\Xi^{*++}_{cc}", - "4432": "\\Omega^{+}_{cc}", - "4434": "\\Omega^{*+}_{cc}", - "4444": "\\Omega^{++}_{ccc}", + // Charmed Baryons + "4122": "\\Lambda^{+}_{c}", + "-4122": "\\Lambda^{-}_{c}", + "4222": "\\Sigma^{++}_{c}", + "-4222": "\\Sigma^{--}_{c}", + "4212": "\\Sigma^{+}_{c}", + "-4212": "\\Sigma^{-}_{c}", + "4112": "\\Sigma^{0}_{c}", + "4224": "\\Sigma^{*++}_{c}", + "4214": "\\Sigma^{*+}_{c}", + "4114": "\\Sigma^{*0}_{c}", + "4232": "\\Xi^{+}_{c}", + "4132": "\\Xi^{0}_{c}", + "4322": "\\Xi^{\\prime+}_{c}", + "4312": "\\Xi^{\\prime0}_{c}", + "4324": "\\Xi^{*+}_{c}", + "4314": "\\Xi^{*0}_{c}", + "4332": "\\Omega^{0}_{c}", + "4334": "\\Omega^{*0}_{c}", + "4412": "\\Xi^{+}_{cc}", + "4422": "\\Xi^{++}_{cc}", + "4414": "\\Xi^{*+}_{cc}", + "4424": "\\Xi^{*++}_{cc}", + "4432": "\\Omega^{+}_{cc}", + "4434": "\\Omega^{*+}_{cc}", + "4444": "\\Omega^{++}_{ccc}", - // Pentaquarks - "9221132": "\\Theta^{+}", - "9331122": "\\Phi^{--}", + // Pentaquarks + "9221132": "\\Theta^{+}", + "9331122": "\\Phi^{--}", - // Bottom Baryons - "5122": "\\Lambda^{0}_{b}", - "5112": "\\Sigma^{-}_{b}", - "5212": "\\Sigma^{0}_{b}", - "5222": "\\Sigma^{+}_{b}", - "5114": "\\Sigma^{*-}_{b}", - "5214": "\\Sigma^{*0}_{b}", - "5224": "\\Sigma^{*+}_{b}", - "5132": "\\Xi^{-}_{b}", - "5232": "\\Xi^{0}_{b}", - "5312": "\\Xi^{\\prime-}_{b}", - "5322": "\\Xi^{\\prime0}_{b}", - "5314": "\\Xi^{*-}_{b}", - "5324": "\\Xi^{*0}_{b}", - "5332": "\\Omega^{-}_{b}", - "5334": "\\Omega^{*-}_{b}", - "5142": "\\Xi^{0}_{bc}", - "5242": "\\Xi^{+}_{bc}", - "5412": "\\Xi^{\\prime0}_{bc}", - "5422": "\\Xi^{\\prime+}_{bc}", - "5414": "\\Xi^{*0}_{bc}", - "5424": "\\Xi^{*+}_{bc}", - "5342": "\\Omega^{0}_{bc}", - "5432": "\\Omega^{\\prime0}_{bc}", - "5434": "\\Omega^{*0}_{bc}", - "5442": "\\Omega^{+}_{bcc}", - "5444": "\\Omega^{*+}_{bcc}", - "5512": "\\Xi^{-}_{bb}", - "5522": "\\Xi^{0}_{bb}", - "5514": "\\Xi^{*-}_{bb}", - "5524": "\\Xi^{*0}_{bb}", - "5532": "\\Omega^{-}_{bb}", - "5534": "\\Omega^{*-}_{bb}", - "5542": "\\Omega^{0}_{bbc}", - "5544": "\\Omega^{*0}_{bbc}", - "5554": "\\Omega^{-}_{bbb}", -} \ No newline at end of file + // Bottom Baryons + "5122": "\\Lambda^{0}_{b}", + "-5122": "\\bar\\Lambda_{b}^{0}", + "5112": "\\Sigma^{-}_{b}", + "5212": "\\Sigma^{0}_{b}", + "5222": "\\Sigma^{+}_{b}", + "5114": "\\Sigma^{*-}_{b}", + "5214": "\\Sigma^{*0}_{b}", + "5224": "\\Sigma^{*+}_{b}", + "5132": "\\Xi^{-}_{b}", + "5232": "\\Xi^{0}_{b}", + "5312": "\\Xi^{\\prime-}_{b}", + "5322": "\\Xi^{\\prime0}_{b}", + "5314": "\\Xi^{*-}_{b}", + "5324": "\\Xi^{*0}_{b}", + "5332": "\\Omega^{-}_{b}", + "5334": "\\Omega^{*-}_{b}", + "5142": "\\Xi^{0}_{bc}", + "5242": "\\Xi^{+}_{bc}", + "5412": "\\Xi^{\\prime0}_{bc}", + "5422": "\\Xi^{\\prime+}_{bc}", + "5414": "\\Xi^{*0}_{bc}", + "5424": "\\Xi^{*+}_{bc}", + "5342": "\\Omega^{0}_{bc}", + "5432": "\\Omega^{\\prime0}_{bc}", + "5434": "\\Omega^{*0}_{bc}", + "5442": "\\Omega^{+}_{bcc}", + "5444": "\\Omega^{*+}_{bcc}", + "5512": "\\Xi^{-}_{bb}", + "5522": "\\Xi^{0}_{bb}", + "5514": "\\Xi^{*-}_{bb}", + "5524": "\\Xi^{*0}_{bb}", + "5532": "\\Omega^{-}_{bb}", + "5534": "\\Omega^{*-}_{bb}", + "5542": "\\Omega^{0}_{bbc}", + "5544": "\\Omega^{*0}_{bbc}", + "5554": "\\Omega^{-}_{bbb}", +}; From fa9db2464c61828d3cc73f76c3b30afcc22d2fbc Mon Sep 17 00:00:00 2001 From: Braulio Rivas Abad Date: Wed, 19 Jun 2024 18:48:04 -0500 Subject: [PATCH 2/5] Switch events without reload #37 + auto event select #34 --- css/event.css | 27 +++++++++ img/left_arrow.svg | 1 + img/right_arrow.svg | 1 + index.html | 11 +++- js/main.js | 106 +++++++++------------------------- js/menu/event-number.js | 113 +++++++++++++++++++++++++++++++++++++ js/menu/filter/builders.js | 4 ++ js/menu/filter/filter.js | 12 ++-- js/menu/show-pdg.js | 9 ++- 9 files changed, 196 insertions(+), 88 deletions(-) create mode 100644 css/event.css create mode 100644 img/left_arrow.svg create mode 100644 img/right_arrow.svg create mode 100644 js/menu/event-number.js diff --git a/css/event.css b/css/event.css new file mode 100644 index 00000000..afdc1dbd --- /dev/null +++ b/css/event.css @@ -0,0 +1,27 @@ +#event-switcher { + position: fixed; + display: none; + flex-direction: row; + justify-content: center; + align-items: center; + z-index: 1; + top: 10px; + left: 50%; + transform: translateX(-50%); + background-color: #e1e1e1; + padding: 5px 10px; + border-radius: 5px; +} + +.event-switch-arrow { + cursor: pointer; +} + +.event-switch-tool { + margin: 0 5px; +} + +#selected-event { + font-weight: 500; + font-size: 1.2em; +} diff --git a/img/left_arrow.svg b/img/left_arrow.svg new file mode 100644 index 00000000..bbcd50c6 --- /dev/null +++ b/img/left_arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/right_arrow.svg b/img/right_arrow.svg new file mode 100644 index 00000000..eb45cced --- /dev/null +++ b/img/right_arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html index 740a66c9..b4ccb88e 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ + @@ -72,6 +73,14 @@ +
+ Previous event + + Next event +
+ @@ -79,4 +88,4 @@ - + \ No newline at end of file diff --git a/js/main.js b/js/main.js index 4f43c2cb..1f881e24 100644 --- a/js/main.js +++ b/js/main.js @@ -1,37 +1,17 @@ import { errorMsg } from "./tools.js"; import { PdgToggle } from "./menu/show-pdg.js"; import { drawAll } from "./draw.js"; -import { - bits, - genStatus, - renderRangeParameters, - parametersRange, - getWidthFilterContent, - renderGenSim, -} from "./menu/filter/filter.js"; -import { - mouseDown, - mouseUp, - mouseOut, - mouseMove, - getVisible, - onScroll, -} from "./events.js"; -import { loadObjects } from "./types/load.js"; -import { objectTypes } from "./types/objects.js"; -import { copyObject } from "./lib/copy.js"; +import { getWidthFilterContent } from "./menu/filter/filter.js"; +import { mouseDown, mouseUp, mouseOut, mouseMove, onScroll } from "./events.js"; +import { showEventSwitcher, loadSelectedEvent } from "./menu/event-number.js"; const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); -const manipulationTools = document.getElementsByClassName("manipulation-tool"); -const filter = document.getElementById("filter"); -const filters = document.getElementById("filters"); - canvas.width = window.innerWidth; canvas.height = window.innerHeight; -let jsonData = {}; +const jsonData = {}; const dragTools = { draggedObject: null, @@ -46,17 +26,9 @@ const currentObjects = {}; const visibleObjects = {}; -function start(currentObjects, visibleObjects) { - for (const [key, value] of Object.entries(currentObjects)) { - const classType = objectTypes[key]; - const collection = value.collection; - classType.setup(collection, canvas); - } - - drawAll(ctx, currentObjects); - - getVisible(currentObjects, visibleObjects); -} +const selectedObjectTypes = { + types: ["edm4hep::MCParticle"], +}; canvas.onmousedown = (event) => { mouseDown(event, visibleObjects, dragTools); @@ -74,14 +46,6 @@ window.onscroll = () => { onScroll(currentObjects, visibleObjects); }; -/* -function showInputModal() { - const modal = document.getElementById("input-modal"); - - modal.style.display = "block"; -} -*/ - function hideInputModal() { const modal = document.getElementById("input-modal"); @@ -101,10 +65,18 @@ document.getElementById("input-file").addEventListener("change", (event) => { const reader = new FileReader(); reader.addEventListener("load", (event) => { const fileText = event.target.result; - jsonData = JSON.parse(fileText); + jsonData.data = JSON.parse(fileText); const eventNumberInput = document.getElementById("event-number"); - eventNumberInput.max = Object.keys(jsonData).length - 1; + const options = Object.keys(jsonData.data).map((event) => + parseInt(event.replace("Event ", "")) + ); + eventNumberInput.max = Object.keys(options).length - 1; + if (options.length === 0) { + errorMsg("No events found in the file!"); + return; + } + eventNumberInput.value = options[0]; document.getElementById("event-selector").style.display = "block"; }); reader.readAsText(file); @@ -118,42 +90,12 @@ document event.preventDefault(); const eventNum = document.getElementById("event-number").value; - const selectedObjectTypes = ["edm4hep::MCParticle"]; - const objects = loadObjects(jsonData, eventNum, selectedObjectTypes); - - copyObject(objects, loadedObjects); - copyObject(objects, currentObjects); - - const length = Object.values(loadedObjects) - .map((obj) => obj.collection.length) - .reduce((a, b) => a + b, 0); - - if (length === 0) { - errorMsg("Provided file does not contain any MC particle tree!"); - return; - } - for (const eventNum in jsonData) { - delete jsonData[eventNum]; - } - start(currentObjects, visibleObjects); hideInputModal(); - window.scroll((canvas.width - window.innerWidth) / 2, 0); - - for (const tool of manipulationTools) { - tool.style.display = "flex"; - } + showEventSwitcher(eventNum); + loadSelectedEvent(); - const mcObjects = loadedObjects["edm4hep::MCParticle"].collection; - mcObjects.forEach((mcObject) => { - genStatus.add(mcObject.generatorStatus); - }); - genStatus.setCheckBoxes(); - renderRangeParameters(filters, parametersRange); const width = getWidthFilterContent(); filter.style.width = width; - - renderGenSim(bits, genStatus, filters); - const pdgToggle = new PdgToggle("show-pdg"); pdgToggle.init(() => { pdgToggle.toggle(currentObjects, () => { @@ -162,4 +104,12 @@ document }); }); -export { canvas, ctx, loadedObjects, currentObjects, visibleObjects }; +export { + canvas, + ctx, + loadedObjects, + currentObjects, + visibleObjects, + jsonData, + selectedObjectTypes, +}; diff --git a/js/menu/event-number.js b/js/menu/event-number.js new file mode 100644 index 00000000..7dded5e6 --- /dev/null +++ b/js/menu/event-number.js @@ -0,0 +1,113 @@ +import { loadObjects } from "../types/load.js"; +import { copyObject } from "../lib/copy.js"; +import { + loadedObjects, + currentObjects, + visibleObjects, + canvas, + ctx, +} from "../main.js"; +import { getVisible } from "../events.js"; +import { + bits, + genStatus, + renderRangeParameters, + parametersRange, + renderGenSim, +} from "./filter/filter.js"; +import { drawAll } from "../draw.js"; +import { objectTypes } from "../types/objects.js"; +import { jsonData, selectedObjectTypes } from "../main.js"; + +const filters = document.getElementById("filters"); +const eventSwitcher = document.getElementById("event-switcher"); +const eventNumber = document.getElementById("selected-event"); +const previousEvent = document.getElementById("previous-event"); +const nextEvent = document.getElementById("next-event"); +const manipulationTools = document.getElementsByClassName("manipulation-tool"); + +let currentEvent; + +function updateEventNumber(newEventNumber) { + if (eventNumber.firstChild) { + eventNumber.removeChild(eventNumber.firstChild); + } + eventNumber.appendChild(document.createTextNode(`Event: ${newEventNumber}`)); +} + +function start(currentObjects, visibleObjects) { + for (const [key, value] of Object.entries(currentObjects)) { + const classType = objectTypes[key]; + const collection = value.collection; + classType.setup(collection, canvas); + } + + drawAll(ctx, currentObjects); + + getVisible(currentObjects, visibleObjects); +} + +function renderEvent(eventNumber) { + const data = jsonData.data[`Event ${eventNumber}`]; + + if (data === undefined) { + return; + } else { + currentEvent = eventNumber; + updateEventNumber(eventNumber); + loadSelectedEvent(jsonData, selectedObjectTypes.types, eventNumber); + } +} + +export function showEventSwitcher(initialValue) { + eventSwitcher.style.display = "flex"; + updateEventNumber(initialValue); + currentEvent = initialValue; +} + +export function loadSelectedEvent() { + const objects = loadObjects( + jsonData.data, + currentEvent, + selectedObjectTypes.types + ); + + copyObject(objects, loadedObjects); + copyObject(objects, currentObjects); + + const length = Object.values(loadedObjects) + .map((obj) => obj.collection.length) + .reduce((a, b) => a + b, 0); + + if (length === 0) { + errorMsg("Event does not contain any objects!"); + return; + } + + start(currentObjects, visibleObjects); + window.scroll((canvas.width - window.innerWidth) / 2, 0); + + for (const tool of manipulationTools) { + tool.style.display = "flex"; + } + + const mcObjects = loadedObjects["edm4hep::MCParticle"].collection; + genStatus.reset(); + mcObjects.forEach((mcObject) => { + genStatus.add(mcObject.generatorStatus); + }); + genStatus.setCheckBoxes(); + filters.replaceChildren(); + + renderRangeParameters(parametersRange); + renderGenSim(bits, genStatus); +} + +previousEvent.addEventListener("click", () => { + const newEventNum = `${parseInt(currentEvent) - 1}`; + renderEvent(newEventNum); +}); +nextEvent.addEventListener("click", () => { + const newEventNum = `${parseInt(currentEvent) + 1}`; + renderEvent(newEventNum); +}); diff --git a/js/menu/filter/builders.js b/js/menu/filter/builders.js index 118da614..6f9cf82b 100644 --- a/js/menu/filter/builders.js +++ b/js/menu/filter/builders.js @@ -35,6 +35,10 @@ export class CheckboxBuilder { container.appendChild(section); this.checkBoxes.forEach((checkbox) => checkbox.render(options)); } + + reset() { + this.uniqueValues = new Set(); + } } export class BitFieldBuilder extends CheckboxBuilder { diff --git a/js/menu/filter/filter.js b/js/menu/filter/filter.js index febe3cd1..a26e577c 100644 --- a/js/menu/filter/filter.js +++ b/js/menu/filter/filter.js @@ -36,7 +36,7 @@ filterButton.addEventListener("click", () => { } }); -export function renderRangeParameters(container, rangeParameters) { +export function renderRangeParameters(rangeParameters) { const rangeFilters = document.createElement("div"); rangeFilters.id = "range-filters"; rangeFilters.style.display = "grid"; @@ -51,7 +51,7 @@ export function renderRangeParameters(container, rangeParameters) { parameter.max = undefined; parameter.render(rangeFilters); }); - container.appendChild(rangeFilters); + filters.appendChild(rangeFilters); } export function getWidthFilterContent() { @@ -63,7 +63,7 @@ export function getWidthFilterContent() { return `${width}px`; } -export function renderGenSim(sim, gen, container) { +export function renderGenSim(sim, gen) { const div = document.createElement("div"); div.style.display = "flex"; div.style.flexDirection = "column"; @@ -71,7 +71,7 @@ export function renderGenSim(sim, gen, container) { div.style.alignItems = "start"; sim.render(div); gen.render(div); - container.appendChild(div); + filters.appendChild(div); } let parametersRange = units.sort((a, b) => @@ -129,8 +129,8 @@ function removeFilter(loadedObjects, currentObjects, visibleObjects) { filters.innerHTML = ""; - renderRangeParameters(filters, parametersRange); - renderGenSim(bits, genStatus, filters); + renderRangeParameters(parametersRange); + renderGenSim(bits, genStatus); } apply.addEventListener("click", () => diff --git a/js/menu/show-pdg.js b/js/menu/show-pdg.js index eb577d5a..53095764 100644 --- a/js/menu/show-pdg.js +++ b/js/menu/show-pdg.js @@ -1,4 +1,5 @@ import { Toggle } from "./toggle.js"; +import { selectedObjectTypes } from "../main.js"; export class PdgToggle extends Toggle { constructor(id) { @@ -6,18 +7,20 @@ export class PdgToggle extends Toggle { } toggle(currentObjects, redraw) { - const validParticles = ["edm4hep::MCParticle"]; + const validObjects = selectedObjectTypes.types; if (this.isSliderActive) { - for (const objectType of validParticles) { + for (const objectType of validObjects) { const collection = currentObjects[objectType].collection; + if (object[0].PDG === undefined) return; for (const object of collection) { object.updateTexImg(`${object.PDG}`); } } } else { - for (const objectType of validParticles) { + for (const objectType of validObjects) { const collection = currentObjects[objectType].collection; + if (object[0].PDG === undefined) return; for (const object of collection) { object.updateTexImg(`${object.name}`); } From 4cf479444200c0aecdf6ee28a184b546c2ec104c Mon Sep 17 00:00:00 2001 From: Braulio Rivas Abad Date: Wed, 19 Jun 2024 19:02:52 -0500 Subject: [PATCH 3/5] show events options in dropdown menu --- index.html | 2 +- js/main.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index b4ccb88e..ec7fe8d4 100644 --- a/index.html +++ b/index.html @@ -35,7 +35,7 @@
- +

diff --git a/js/main.js b/js/main.js index 1f881e24..66924021 100644 --- a/js/main.js +++ b/js/main.js @@ -78,6 +78,13 @@ document.getElementById("input-file").addEventListener("change", (event) => { } eventNumberInput.value = options[0]; document.getElementById("event-selector").style.display = "block"; + const eventOptions = document.getElementById("event-number"); + eventOptions.replaceChildren(); + options.forEach((option) => { + const optionElement = document.createElement("option"); + optionElement.appendChild(document.createTextNode(option)); + eventOptions.appendChild(optionElement); + }); }); reader.readAsText(file); break; From 055ca96d0d5781617834676532945825e422cab1 Mon Sep 17 00:00:00 2001 From: Braulio Rivas Abad Date: Wed, 19 Jun 2024 20:52:48 -0500 Subject: [PATCH 4/5] show another dropdown menu for facility (not only arrow switcher) --- css/event.css | 22 ++++++++++++++++++++++ index.html | 5 ++++- js/main.js | 12 ++++++++++++ js/menu/event-number.js | 10 +++++++++- js/menu/show-pdg.js | 4 ++-- 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/css/event.css b/css/event.css index afdc1dbd..03de3398 100644 --- a/css/event.css +++ b/css/event.css @@ -24,4 +24,26 @@ #selected-event { font-weight: 500; font-size: 1.2em; + cursor: pointer; +} + +#event-selector-menu { + display: none; + position: fixed; + top: 32px; + flex-direction: column; + justify-content: center; + align-items: center; + background-color: #e1e1e1; + width: 75px; + left: 50%; + transform: translateX(-50%); +} + +.event-option { + cursor: pointer; + border: 1px solid #000; + width: 100%; + text-align: center; + margin: 1px 0; } diff --git a/index.html b/index.html index ec7fe8d4..6cf47301 100644 --- a/index.html +++ b/index.html @@ -76,7 +76,10 @@
Previous event - +
+ +
+
Next event
diff --git a/js/main.js b/js/main.js index 66924021..8d79439e 100644 --- a/js/main.js +++ b/js/main.js @@ -4,6 +4,7 @@ import { drawAll } from "./draw.js"; import { getWidthFilterContent } from "./menu/filter/filter.js"; import { mouseDown, mouseUp, mouseOut, mouseMove, onScroll } from "./events.js"; import { showEventSwitcher, loadSelectedEvent } from "./menu/event-number.js"; +import { renderEvent } from "./menu/event-number.js"; const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); @@ -79,11 +80,22 @@ document.getElementById("input-file").addEventListener("change", (event) => { eventNumberInput.value = options[0]; document.getElementById("event-selector").style.display = "block"; const eventOptions = document.getElementById("event-number"); + const eventSelectorMenu = document.getElementById("event-selector-menu"); eventOptions.replaceChildren(); + eventSelectorMenu.replaceChildren(); options.forEach((option) => { const optionElement = document.createElement("option"); optionElement.appendChild(document.createTextNode(option)); eventOptions.appendChild(optionElement); + + const optionElementMenu = document.createElement("div"); + optionElementMenu.className = "event-option"; + optionElementMenu.appendChild(document.createTextNode(option)); + eventSelectorMenu.appendChild(optionElementMenu); + optionElementMenu.addEventListener("click", () => { + eventSelectorMenu.style.display = "none"; + renderEvent(option); + }); }); }); reader.readAsText(file); diff --git a/js/menu/event-number.js b/js/menu/event-number.js index 7dded5e6..a8c0a35b 100644 --- a/js/menu/event-number.js +++ b/js/menu/event-number.js @@ -47,7 +47,7 @@ function start(currentObjects, visibleObjects) { getVisible(currentObjects, visibleObjects); } -function renderEvent(eventNumber) { +export function renderEvent(eventNumber) { const data = jsonData.data[`Event ${eventNumber}`]; if (data === undefined) { @@ -111,3 +111,11 @@ nextEvent.addEventListener("click", () => { const newEventNum = `${parseInt(currentEvent) + 1}`; renderEvent(newEventNum); }); +eventNumber.addEventListener("click", () => { + const eventSelectorMenu = document.getElementById("event-selector-menu"); + if (eventSelectorMenu.style.display === "flex") { + eventSelectorMenu.style.display = "none"; + } else { + eventSelectorMenu.style.display = "flex"; + } +}); diff --git a/js/menu/show-pdg.js b/js/menu/show-pdg.js index 53095764..a5333e59 100644 --- a/js/menu/show-pdg.js +++ b/js/menu/show-pdg.js @@ -12,7 +12,7 @@ export class PdgToggle extends Toggle { if (this.isSliderActive) { for (const objectType of validObjects) { const collection = currentObjects[objectType].collection; - if (object[0].PDG === undefined) return; + if (collection[0].PDG === undefined) return; for (const object of collection) { object.updateTexImg(`${object.PDG}`); } @@ -20,7 +20,7 @@ export class PdgToggle extends Toggle { } else { for (const objectType of validObjects) { const collection = currentObjects[objectType].collection; - if (object[0].PDG === undefined) return; + if (collection[0].PDG === undefined) return; for (const object of collection) { object.updateTexImg(`${object.name}`); } From e4bbac7cac8d40cdc02bfe7a5df564048f8786fe Mon Sep 17 00:00:00 2001 From: Braulio Rivas Abad Date: Fri, 21 Jun 2024 18:48:55 -0500 Subject: [PATCH 5/5] feat: same size fonts, remember scroll, scrollbar for events, 'obvious' clickable event --- css/event.css | 13 ++++++++++--- css/main.css | 1 + js/main.js | 2 +- js/menu/event-number.js | 18 ++++++++++++++++-- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/css/event.css b/css/event.css index 03de3398..19f506bc 100644 --- a/css/event.css +++ b/css/event.css @@ -23,21 +23,28 @@ #selected-event { font-weight: 500; - font-size: 1.2em; cursor: pointer; } +#selected-event:hover { + text-decoration: underline; + background-color: #d1d1d1; +} + #event-selector-menu { display: none; position: fixed; top: 32px; flex-direction: column; - justify-content: center; align-items: center; background-color: #e1e1e1; - width: 75px; + width: 100px; left: 50%; transform: translateX(-50%); + max-height: 175px; + overflow-y: auto; + overflow-x: hidden; + padding: 0 5px; } .event-option { diff --git a/css/main.css b/css/main.css index 6b7406b1..56011873 100644 --- a/css/main.css +++ b/css/main.css @@ -3,6 +3,7 @@ body { padding: 0; /* overflow: hidden; */ font-family: sans-serif; + font-size: 16px; } .manipulation-tool { diff --git a/js/main.js b/js/main.js index 8d79439e..f76ce42e 100644 --- a/js/main.js +++ b/js/main.js @@ -93,8 +93,8 @@ document.getElementById("input-file").addEventListener("change", (event) => { optionElementMenu.appendChild(document.createTextNode(option)); eventSelectorMenu.appendChild(optionElementMenu); optionElementMenu.addEventListener("click", () => { - eventSelectorMenu.style.display = "none"; renderEvent(option); + eventSelectorMenu.style.display = "none"; }); }); }); diff --git a/js/menu/event-number.js b/js/menu/event-number.js index a8c0a35b..273a817e 100644 --- a/js/menu/event-number.js +++ b/js/menu/event-number.js @@ -28,6 +28,8 @@ const manipulationTools = document.getElementsByClassName("manipulation-tool"); let currentEvent; +const scrollLocation = {}; + function updateEventNumber(newEventNumber) { if (eventNumber.firstChild) { eventNumber.removeChild(eventNumber.firstChild); @@ -50,12 +52,17 @@ function start(currentObjects, visibleObjects) { export function renderEvent(eventNumber) { const data = jsonData.data[`Event ${eventNumber}`]; + scrollLocation[currentEvent] = { + x: window.scrollX, + y: window.scrollY, + }; + if (data === undefined) { return; } else { currentEvent = eventNumber; - updateEventNumber(eventNumber); loadSelectedEvent(jsonData, selectedObjectTypes.types, eventNumber); + updateEventNumber(eventNumber); } } @@ -85,7 +92,14 @@ export function loadSelectedEvent() { } start(currentObjects, visibleObjects); - window.scroll((canvas.width - window.innerWidth) / 2, 0); + if (scrollLocation[currentEvent] === undefined) { + scrollLocation[currentEvent] = { + x: (canvas.width - window.innerWidth) / 2, + y: 0, + }; + } + + window.scroll(scrollLocation[currentEvent].x, scrollLocation[currentEvent].y); for (const tool of manipulationTools) { tool.style.display = "flex";