From 28e3e24d407297ce8c5b6aa5705753c8139233c7 Mon Sep 17 00:00:00 2001 From: Dmitry Romanov Date: Sun, 26 May 2024 23:15:26 -0400 Subject: [PATCH] [ng] User config storage, service and UI are done --- firebird-ng/src/app/app.component.html | 3 +- .../input-config/input-config.component.html | 133 ++++++++++++------ .../input-config/input-config.component.ts | 8 +- firebird-ng/src/app/user-config.service.ts | 4 +- .../assets/diagrams/geometry-pipeline.drawio | 40 ++++++ .../src/assets/diagrams/geometry-pipeline.svg | 4 + 6 files changed, 146 insertions(+), 46 deletions(-) create mode 100644 firebird-ng/src/assets/diagrams/geometry-pipeline.drawio create mode 100644 firebird-ng/src/assets/diagrams/geometry-pipeline.svg diff --git a/firebird-ng/src/app/app.component.html b/firebird-ng/src/app/app.component.html index c8a0b58..aa624de 100644 --- a/firebird-ng/src/app/app.component.html +++ b/firebird-ng/src/app/app.component.html @@ -9,7 +9,8 @@ - + + diff --git a/firebird-ng/src/app/input-config/input-config.component.html b/firebird-ng/src/app/input-config/input-config.component.html index 9c8bbf8..87905d0 100644 --- a/firebird-ng/src/app/input-config/input-config.component.html +++ b/firebird-ng/src/app/input-config/input-config.component.html @@ -1,55 +1,104 @@
-

Event display source control

+

Configure geometry pipeline

+ + geometry-pipeline
-
-
Geometry source
- +
+
+
Geometry Source
+
+ Geometry file sources are taken from https://eic.github.io/epic/ + +
+
+
+ +
+
+
ROOT Geometry optimization
+
+
Leave only central detector (Remove Beamline, Far Froward and Backward)
+
+ + +
+
+
+
Optimize detectors (remove parts such as glue, pixels, some layers, etc)
+
+ + +
+
+
-
-
Selected events
- +
+
+
WebGL Geometry optimization
+
+
Merge geometries if possible
+ Merging geometries allows to significantly improve the performance by reducing the number of + drawcalls. +
+ + +
+
+
+ + + + + + + + + + + + + +
+
diff --git a/firebird-ng/src/app/input-config/input-config.component.ts b/firebird-ng/src/app/input-config/input-config.component.ts index 693152d..9bafcdc 100644 --- a/firebird-ng/src/app/input-config/input-config.component.ts +++ b/firebird-ng/src/app/input-config/input-config.component.ts @@ -15,10 +15,13 @@ import {ConfigProperty} from "../utils/config-property"; }) export class InputConfigComponent implements OnInit { - selectedGeometry: FormControl; + selectedGeometry = new FormControl(''); + onlyCentralDetector: FormControl = new FormControl(true); constructor(private configService: UserConfigService) { - this.selectedGeometry = new FormControl(); + + + // this.selectedGeometry.valueChanges.subscribe( // value => this.configService.selectedGeometry.value=value??"" // ); @@ -74,6 +77,7 @@ export class InputConfigComponent implements OnInit { ngOnInit(): void { //this.selectedGeometry.setValue(this.configService.selectedGeometry.value, { emitEvent: false }) this.bindConfigToControl(this.selectedGeometry, this.configService.selectedGeometry); + this.bindConfigToControl(this.onlyCentralDetector, this.configService.onlyCentralDetector); // const savedSettings = this.geometryService.getState(); // if (savedSettings) { // this.geoForm.setValue(savedSettings); diff --git a/firebird-ng/src/app/user-config.service.ts b/firebird-ng/src/app/user-config.service.ts index 3866597..563f305 100644 --- a/firebird-ng/src/app/user-config.service.ts +++ b/firebird-ng/src/app/user-config.service.ts @@ -7,8 +7,10 @@ import {ConfigProperty} from "./utils/config-property"; export class UserConfigService { public selectedGeometry: ConfigProperty; + public onlyCentralDetector: ConfigProperty; constructor() { - this.selectedGeometry = new ConfigProperty("selectedGeometry", "epic-central-optimized"); + this.selectedGeometry = new ConfigProperty("geometry.selectedGeometry", "epic-central-optimized"); + this.onlyCentralDetector = new ConfigProperty("geometry.onlyCentralDetector", true); } } diff --git a/firebird-ng/src/assets/diagrams/geometry-pipeline.drawio b/firebird-ng/src/assets/diagrams/geometry-pipeline.drawio new file mode 100644 index 0000000..9fad8ef --- /dev/null +++ b/firebird-ng/src/assets/diagrams/geometry-pipeline.drawio @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/firebird-ng/src/assets/diagrams/geometry-pipeline.svg b/firebird-ng/src/assets/diagrams/geometry-pipeline.svg new file mode 100644 index 0000000..6f53cd4 --- /dev/null +++ b/firebird-ng/src/assets/diagrams/geometry-pipeline.svg @@ -0,0 +1,4 @@ + + + +
Geometry Source
Geometry Source
ROOT
geometry
optimization
ROOT...
WebGL/Three.js
Optimization
Prettification
WebGL/Three.js...
Render!
Render!
Text is not SVG - cannot display
\ No newline at end of file