Skip to content

Commit abb8f01

Browse files
authored
Bootstrap update (#14)
* new html * new ts * cleanup stuff * Revert "new ts" This reverts commit 0aaac593218b0d562e01879c37172a77f91e766b. * more cleaning :) * working UI * first adaptations * adjusted to new website * working but buggy version * handle dat_gui style * refactor css styling to .css files and working bootstrap dialogs * initCameraPosition so that the camera instances are only created once * improve spaces and sizes * fixed last buttons (autorotate, screenshot) * assets in assets folder * adapted to bootstrap studio folder scheme * working version after refactoring * Language change: alpha build for german and english * visual improvements * html formatter * refactoring and renaming * fix the animate button * fix XZ display * linting * adjusting the help page for the upcoming changes * added Tutorials and preparing for publishing * merge both guis into one * Finished Basics Trutorial * fix language issue, when localStorage.language includes the region in the string * gui Traslation available * fixed linter * working modular version * cleanup * Replace dat.GUI with lil.gui since it is still supported * color modified style :) * better selection checkbox style * Infocircle for the selection fields * hide scrollbar, bug fix for windows * Info circle to the selection fields of the gui * better info * better about us website * indentation for better readability * Updated guides and tutorials * Bug: fixed in charge selection * Use svg imgaes for the axis buttons * linting fixes * cleanup * cleanup css * linting * more linting * more linting :( * linting and styling * Fix csv saving masses * update REAMME * eslint * linting
1 parent 145d831 commit abb8f01

88 files changed

Lines changed: 9134 additions & 4618 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.vscode/*
22
node_modules/*
3-
dist/*
3+
dist/**/*.html
4+
dist/assets/js/*
45
js/*
56
.DS_Store
67
*.bsdesign

Default.htm

Lines changed: 0 additions & 627 deletions
This file was deleted.

README.md

Lines changed: 31 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,50 @@
1-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
1+
# Masterclasses @ Hamburg
22

3-
# iSpy WebGL (Masterclasses @ UHH)
4-
5-
Dieses Repository enthält eine modifizierte Version des iSpy WebGL Event Displays, welches für die Masterclasses an der Universität Hamburg angepasst wurde. Die ursprüngliche Version des iSpy WebGL Event Displays wurde von der CMS Kollaboration (Mitwirkende: [F. Ali](https://github.com/9inpachi), [L. Barnard](https://github.com/lukebarnard), [M. Hategan](https://github.com/hategan), [S. Lee](https://github.com/SeungJunLee0), [C. Logrén](https://github.com/carpppa), [T. McCauley](https://github.com/tpmccauley), [P. Nguyen](https://github.com/phongn), [M. Saunby](https://github.com/msaunby)) entwickelt und ist unter folgende Links verfügbar:
3+
This repository contains a modified version of the iSpy WebGL Event Display, which has been adapted for the masterclasses at the University of Hamburg. The original version of the iSpy WebGL Event Display was developed by the CMS Collaboration (contributors: [F. Ali](https://github.com/9inpachi), [L. Barnard](https://github.com/lukebarnard), [M. Hategan](https://github.com/hategan), [S. Lee](https://github.com/SeungJunLee0), [C. Logrén](https://github.com/carpppa), [T. McCauley](https://github.com/tpmccauley), [P. Nguyen](https://github.com/phongn), [M. Saunby](https://github.com/msaunby)) and is available at the following links:
64

75
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8043417.svg)](https://doi.org/10.5281/zenodo.8043417)
86
[![GitHub](https://img.shields.io/badge/GitHub-Repository-blue?logo=github)](https://github.com/cms-outreach/ispy-webgl)
97

10-
Production Version: [https://cern.ch/ispy-webgl](https://cern.ch/ispy-webgl)
11-
12-
Publication: [T McCauley 2017 J. Phys.: Conf. Ser. 898 072030](https://doi.org/10.1088/1742-6596/898/7/072030)
13-
14-
## Was ist iSpy WebGL?
15-
16-
iSpy WebGL ist ein browserbasiertes Event Display für das CMS Experiment am LHC. Es ermöglicht die Visualisierung von Ereignisdaten, die von den [iSpy Analyzers](https://github.com/cms-outreach/ispy-analyzers)
17-
18-
<img src="./assets/ispy-webgl-screenshot-1.0.0.png"></img>
19-
20-
## Erste Schritte
21-
22-
### Öffnen von Files
23-
24-
Über das Menü "Open File" <i class="fa fa-folder-open" style="border: 1px solid black; padding: 6px; display: inline-block;"></i> können Events geöffnet werden. Es gibt zwei Möglichkeiten, Events zu öffnen:
25-
26-
1. **Open local file(s)**: Hier kann eine Datei aus dem lokalen Dateisystem aus ausgewählt werden. Die Datei muss im [.ig](https://github.com/cms-outreach/ispy-analyzers) Format vorliegen.
27-
28-
2. **Open file(s) from the Web**: Hier kann aus bereitgestellten Beispielen für verschiedene Prozesse ausgewählt werden.
29-
30-
### Navigation zwischen Events
31-
32-
Nachdem ein file geöffnet wurde, können durch die Events dieses files navigieren, indem die Pfeiltasten Ihres Tastatures <i class="fa fa-arrow-left" style="border: 1px solid black; padding: 6px; display: inline-block;"></i> <i class="fa fa-arrow-right" style="border: 1px solid black; padding: 6px; display: inline-block;"></i> oder die Knöpfe <i class="fa fa-step-backward" style="border: 1px solid black; padding: 6px; display: inline-block;"></i> <i class="fa fa-step-forward" style="border: 1px solid black; padding: 6px; display: inline-block;"></i> aus der oberen Leiste verwenden werden.
33-
34-
### Ansichten wechseln
35-
36-
Ein Event kann in verschiedenen Ansichten dargestellt werden. Die Ansichten können über die Knöpfe <span style="border: 1px solid black; padding: 3px; display: inline-block;">3D</span>, <span style="border: 1px solid black; padding: 3px; display: inline-block;">r&phi;</span> oder <span style="border: 1px solid black; padding: 3px; display: inline-block;">&rho;z</span> aus der oberen Leiste gewechselt werden. Um auf die Anfangsansicht zurückzukehren, kann auf den Knopf <i class="fa fa-home" style="border: 1px solid black; padding: 6px; display: inline-block;"></i> geklickt werden.
37-
38-
### Detektor Elemente ein- und ausblenden
39-
40-
Unter dem Reiter "Detector" in der Kontrollleiste auf der rechten Seite, können die verschiedenen Detektorelemente (in abstrahierter Form) ein- und ausblenden werden. Die Detektorelemente sind in verschiedene Gruppen unterteilt, die über die Dropdown-Liste auswählen werden können. Dafür muss die Checkbox "show" unter der jeweiligen Gruppe aktiviert werden.
41-
42-
Eine "reelle" Ansicht der CMS Detektorteile kann aber auch angezeigt werden. Dafür muss das Modell des jeweiligen Teils über den Knopf "Import 3D Model" <i class="fa fa-download" style="border: 1px solid black; padding: 6px; display: inline-block;"></i> und danach "import file(s) from the Web" importiert werden. Zu Bachten ist jedoch, dass die 3D Modelle in einigen Fällen sehr groß sein können und die Darstellung des Events verlangsamen können.
43-
Durch neuladen der Seite, können alle importierten Modelle wieder entfernt werden.
44-
45-
### Eventobjecte ein- und ausblenden
46-
47-
Die Teilchenspuren in einem geladenen Event können über die Checkboxen unter dem Reiter "Show/Hide" in der Kontrollleiste auf der rechten Seite ein- und ausgeblendet werden. Um diese Einstellung beim Wechseln zwischen Events beizubehalten, kann die Checkbox "Keep settings" aktiviert werden.
48-
49-
Bestimmte Informationen yum Events bzw. zu den Teilchen können über die Checkboxen unter dem Reiter "Event Info" ein- und ausgeblendet werden. Z.B. kann das pT und die Ladung von Elektronen und Muonen durch das Aktivieren der Checkboxen "Track Info" beim rüberfahren über die Spur angezeigt werden.
50-
51-
### Anwenden von Schnitten
52-
53-
Aktuell können Schnitte auf das pT und ET angewendet werden und dabei nur die Spuren anzeigen, die diese Schnitte erfüllen. Dazu können die Schieberegler unter dem Reiter "Momentum Cuts" verwenden werden. Die Schieberegler können auch durch das Eingeben von Werten in das Textfeld geändert werden.
54-
55-
!!! note
56-
Die Schnitte dienen nur der Visualisierung und haben keinen Einfluss auf auf die spätere Selection der Events.
57-
58-
### Invariantenmasse berechnen
59-
60-
Spuren von Muonen und Elektronen können durch das Draufklicken selektiert werden und die Invariantenmasse dieser Teilchen kann durch das Drücken von <span style="border: 1px solid black; padding: 3px; display: inline-block;">m</span> auf der Tastatur berechnet werden. Die Invariantenmasse wird in einem Popup-Fenster angezeigt. Die anzahl der Selektierten Spuren, kann unter dem Reiter "Event Info" eingesehen werden.
8+
## Developer's Guide
619

62-
## Die Selektion und Analyse von Events
10+
This guide provides instructions for developers who want to edit, expand functionalities, or contribute to the event display project. It covers the setup of the development environment, cloning the repository, installing dependencies, and running the application in development mode.
6311

64-
### Selektionschnitte auf einem bestimmten Event Testen
12+
### Prerequisites
6513

66-
<img src="./assets/selection_gui.png"></img>
14+
- **Node.js**: [Download](https://nodejs.org/en/download/)
6715

68-
Unter dem Reiter "Event Selection" können die Schnitte auf die verschiedenen Teilchenvariablen anwenden. Wie im Bild zu sehen, sind 3 unterschiedliche Arten von Schnitten möglich:
16+
### Getting the Code
6917

70-
1. **Teilchenanzahl**: Die kann auf Muonen, Elektronen und Photonen und Jets angewendet werden. Die Anzahl ist dabei eine positive ganze Zahl, womit nur Events mit exakter Übereinstimmung der Anzahl an Teilchen selektiert werden. Wird im Feld "-1" eingegeben, wird dieser Schnitt ignoriert und diese Teilchen fließen weder in die Selektion noch in der Berechnung der Invariantenmasse ein.
18+
You can either download the repository as a ZIP file or clone the repository using Git (recommended). If you want to contribute to the project, it is highly recommended to fork the repository to your personal GitHub account and clone the fork.
7119

72-
2. **Charge Sign**: Hier kann ausgewählt werden, ob bei jeweils einer Teilchengruppe es sich um Teilchen-Antiteilchen Paare handelt (Ladungssumme ergibt dabei 0) oder es sich um Teilchen bzw. Antiteilchen handelt. Die Auswahlmöglichkeiten sind "{leer}", "Same" und "Opposite". Bei "" wird dieser Schnitt ignoriert und die Selektion wird nicht auf die Ladung der Teilchen angewendet.
20+
Then, follow these commands:
7321

74-
3. **Impuls**: Hier kann den Mindestimpuls sowohl für die Leptonen (Muonen und Elektronen) als auch für das MET ausgewählt werden. Die Einheit ist GeV und durch die Eingabe von "-1" wird dieser Schnitt ignoriert.
22+
```bash
23+
# Clone the repository using git clone.
24+
# (Adjust the URL if you're using a fork)
25+
$ git clone git@github.com:haddadanas/Masterclass_UHH.git masterclass
26+
$ cd masterclass/
7527

76-
Mit dem Knopf "Check Selection" wird die Selektion auf das aktuelle Event angewendet. Außerdem werden in den 2 drunterliegenden Feldern die Anzahl der Events im File, die diese Selektion erfüllen, sowie die Indizes der ersten 5 Events angezeigt.
28+
# Installing Dependencies
29+
$ npm update
30+
# After npm installs all dependencies, you should be ready to code
7731

78-
### Plotten der Invarianten Masse
7932

80-
Nachdem eine Selektion eingestellt ist, kann über den Analyse-Knopf <i class="fa fa-chart-bar" style="border: 1px solid black; padding: 6px; display: inline-block;"></i> die Invariantenmasse der selektierten Events geplottet werden. Der Plot wird in einem Popup-Fenster unter dem Tab "Invariant Mass" angezeigt. Die eingeflossenen Daten in den Plot könne als CSV-Datei durch den Knopf unter dem Plot heruntergeladen werden.
33+
# Compile the TypeScript code to JavaScript and bundle everything using webpack
34+
$ npm run build
35+
# For debugging purposes, process using the development mode for TypeScript and webpack
36+
$ npm run build:dev
37+
# For testing, start a server and run the website locally
38+
$ npm test
39+
```
8140

82-
## Papers und talks
41+
### Structure of the Code
8342

84-
["WebGL and three.js in CMS"](https://tpmccauley.github.io/cms-webgl-cwp/#/) at the HEP Software Foundation Visualization Workshop, March 2017.
43+
- The main code files are located in the `ts/` directory.
44+
- The webpage can be found in the `index.html` file.
45+
- The processed and bundled files will be output to the `dist/` directory.
46+
- The `dist/` directory also contains all assets used by the website, including stylesheets, images, and locale files for translations.
8547

86-
["iSpy WebGL: a browser-based event display for CMS using WebGL"](https://indico.cern.ch/event/570249/contributions/2450053/subcontributions/218722/attachments/1401904/2139981/mccauley-ispywebgl-hsf.pdf) at HEP Software Foundation Visualization Workshop, Jan 2017.
48+
## Guides for Teachers or Students
8749

88-
"A browser-based event display for the CMS Experiment at the LHC using WebGL", at CHEP 2016.
89-
[paper](https://doi.org/10.1088/1742-6596/898/7/072030), [slides](https://indico.cern.ch/event/505613/contributions/2228350/attachments/1346680/2045130/Oral-v4-449.pdf), [highlight summary slide](https://indico.cern.ch/event/505613/contributions/2228350/attachments/1346680/2030787/Highlights-v0-449.pdf)
50+
Look for the _Help_ section in the application for guides on how to use the event display or set it up for the masterclasses.
-1.92 MB
Binary file not shown.

assets/selection_gui.png

-28 KB
Binary file not shown.

dist/assets/bootstrap/css/bootstrap.min.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assets/bootstrap/js/bootstrap.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assets/css/Montserrat.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@font-face {
2+
font-family: 'Montserrat';
3+
src: url(../../assets/fonts/Montserrat-b4f18a66e874838590d251e71bd5ac90.woff2) format('woff2');
4+
font-weight: 400;
5+
font-style: normal;
6+
font-display: swap;
7+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
8+
}
9+
10+
@font-face {
11+
font-family: 'Montserrat';
12+
src: url(../../assets/fonts/Montserrat-d6ba8be60e82141d345efa118628489b.woff2) format('woff2');
13+
font-weight: 400;
14+
font-style: normal;
15+
font-display: swap;
16+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
17+
}
18+
19+
@font-face {
20+
font-family: 'Montserrat';
21+
src: url(../../assets/fonts/Montserrat-ff85988728aae55e4b6ca0810fbc3487.woff2) format('woff2');
22+
font-weight: 400;
23+
font-style: normal;
24+
font-display: swap;
25+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
26+
}
27+
28+
@font-face {
29+
font-family: 'Montserrat';
30+
src: url(../../assets/fonts/Montserrat-f38e6bd78bb10d51d86be4794d197d90.woff2) format('woff2');
31+
font-weight: 400;
32+
font-style: normal;
33+
font-display: swap;
34+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
35+
}
36+
37+
@font-face {
38+
font-family: 'Montserrat';
39+
src: url(../../assets/fonts/Montserrat-676df862370913298b4a665a640bc821.woff2) format('woff2');
40+
font-weight: 400;
41+
font-style: normal;
42+
font-display: swap;
43+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
44+
}

dist/assets/css/about.css

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.page {
2+
overflow-y: scroll;
3+
font-family: 'Montserrat';
4+
top: 25px;
5+
}
6+
7+
.clean-block {
8+
padding: 0;
9+
}
10+
11+
.clean-block.clean-services.dark {
12+
padding: 0;
13+
margin: 0;
14+
}
15+
16+
.page .container {
17+
padding: 5px;
18+
margin-left: 10px;
19+
margin-right: 10px;
20+
max-width: 100%;
21+
}
22+
23+
.clean-block .block-heading {
24+
padding-top: 1em;
25+
margin-top: 0px;
26+
}
27+
28+
.block-heading img {
29+
margin: 0.5em;
30+
}
31+
32+
.clean-block .block-heading :is(p, h1, h2, h3, h4, h5) {
33+
margin: 0 auto 1em auto;
34+
width: fit-content;
35+
max-width: 90%;
36+
text-align: center;
37+
}
38+
39+
.card {
40+
margin-bottom: 5px;
41+
}
42+
43+
.card div {
44+
text-align: center;
45+
}
46+
47+
.card p {
48+
margin-bottom: inherit;
49+
}
50+
51+
.page .btn {
52+
background-color: var(--bs-primary);
53+
height: 40px;
54+
margin: 2px;
55+
border-radius: 10px;
56+
font-size: 90%;
57+
}
58+
59+
.page .btn i {
60+
margin: 0;
61+
}
62+
63+
.img-remark {
64+
display: block;
65+
text-align: right;
66+
font-size: xx-small;
67+
margin: 0 0 0 auto;
68+
padding-right: 5px;
69+
text-wrap: nowrap;
70+
white-space: nowrap;
71+
}
72+
73+
html[data-bs-theme="light"] #uhh-dark {
74+
display: none;
75+
}
76+
77+
html[data-bs-theme="dark"] #uhh-light {
78+
display: none;
79+
}
80+
81+
.guide-container {
82+
display: none;
83+
padding: 1rem 2rem 2rem 2rem;
84+
max-width: 900px;
85+
margin: 0 auto 2rem auto;
86+
background: var(--bs-body-bg);
87+
border-radius: 8px;
88+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
89+
}
90+
91+
.guide-container i {
92+
border: 2px solid;
93+
padding: 2px;
94+
margin: 0 1px 0 1px;
95+
border-radius: 4px;
96+
}
97+
98+
.guide-container img {
99+
background-color: var(--bs-light);
100+
border: 1px solid;
101+
margin: 0 1px 0 1px;
102+
border-radius: 4px;
103+
}
104+
105+
.terminal {
106+
background: #0b1220;
107+
color: #cfe8ff;
108+
border-radius: 8px;
109+
padding: 0.5rem;
110+
max-width: 800px;
111+
font-family: Menlo, Monaco, "Courier New", monospace;
112+
position: relative;
113+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
114+
margin-bottom: 1rem;
115+
}
116+
117+
.terminal-header {
118+
height: 12px;
119+
display: flex;
120+
gap: 6px;
121+
padding: 6px 8px;
122+
}
123+
124+
.dot {
125+
width: 12px;
126+
height: 12px;
127+
border-radius: 50%;
128+
display: inline-block;
129+
}
130+
131+
.dot.red {
132+
background: #ff5f56
133+
}
134+
135+
.dot.yellow {
136+
background: #ffbd2e
137+
}
138+
139+
.dot.green {
140+
background: #27c93f
141+
}
142+
143+
.terminal pre {
144+
margin: 0;
145+
padding: 0.5rem 0;
146+
overflow: auto;
147+
background: transparent;
148+
color: inherit;
149+
}

0 commit comments

Comments
 (0)