-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ng] More optimized central detector geometry
- Loading branch information
Showing
9 changed files
with
229 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { AppConfigService } from './app-config.service'; | ||
|
||
describe('AppConfigService', () => { | ||
let service: AppConfigService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(AppConfigService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Injectable } from '@angular/core'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class AppConfigService { | ||
|
||
constructor() { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
import { Routes } from '@angular/router'; | ||
import {MainDisplayComponent} from "./main-display/main-display.component"; | ||
import {FileBrowserComponent} from "./file-browser/file-browser.component"; | ||
import {InputConfigComponent} from "./input-config/input-config.component"; | ||
|
||
export const routes: Routes = [ | ||
{ path: '', redirectTo: '/config', pathMatch: 'full' }, | ||
{ path: 'config', component: InputConfigComponent }, | ||
{ | ||
path: 'display', | ||
loadComponent: () => import('./main-display/main-display.component').then(m => m.MainDisplayComponent) | ||
}, | ||
{ path: '', component: FileBrowserComponent } | ||
|
||
{ | ||
path: 'files', | ||
loadComponent: () => import('./file-browser/file-browser.component').then(m => m.FileBrowserComponent) | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
firebird-ng/src/app/input-config/input-config.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!-- event-display-source.component.html --> | ||
<div class="container mt-3"> | ||
<h3>Event display source control</h3> | ||
|
||
<form [formGroup]="geoForm"> | ||
<div class="mt-4"> | ||
<h5>Geometry source</h5> | ||
<select class="form-control" formControlName="selectedGeometry"> | ||
<option value="epic-central-optimized">EIC ePIC Central Detector optimized</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_bhcal.root">epic_bhcal.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_calorimeters.root">epic_calorimeters.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake.root">epic_craterlake.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake_10x100.root">epic_craterlake_10x100.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake_10x275.root">epic_craterlake_10x275.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake_18x110_Au.root">epic_craterlake_18x110_Au.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake_18x275.root">epic_craterlake_18x275.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake_5x41.root">epic_craterlake_5x41.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake_material_map.root">epic_craterlake_material_map.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake_no_bhcal.root">epic_craterlake_no_bhcal.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_craterlake_tracking_only.root">epic_craterlake_tracking_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_dirc_only.root">epic_dirc_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_drich_only.root">epic_drich_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_forward_detectors.root">epic_forward_detectors.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_forward_detectors_with_inserts.root">epic_forward_detectors_with_inserts.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_full.root">epic_full.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_imaging_only.root">epic_imaging_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_inner_detector.root">epic_inner_detector.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_ip6.root">epic_ip6.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_ip6_extended.root">epic_ip6_extended.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_lfhcal_only.root">epic_lfhcal_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_lfhcal_with_insert.root">epic_lfhcal_with_insert.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_mrich_only.root">epic_mrich_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_pfrich_only.root">epic_pfrich_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_pid_only.root">epic_pid_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_tof_endcap_only.root">epic_tof_endcap_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_tof_only.root">epic_tof_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_vertex_only.root">epic_vertex_only.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_zdc_lyso_sipm.root">epic_zdc_lyso_sipm.root</option> | ||
<option value="https://eic.github.io/epic/artifacts/tgeo/epic_zdc_sipm_on_tile_only.root">epic_zdc_sipm_on_tile_only.root</option> | ||
</select> | ||
</div> | ||
|
||
<div class="mt-4"> | ||
<h5>Geometry optimization</h5> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="checkbox" id="geoOptEnabled" formControlName="geoOptEnabled"> | ||
<label class="form-check-label" for="geoOptEnabled">Enabled</label> | ||
</div> | ||
<select class="form-control mt-2" formControlName="selectedGeoCutoff" [disabled]="!geoForm.get('geoOptEnabled')?.value ?? true"> | ||
<option value="Central detector">Central detector</option> | ||
<option value="Far forward">Far forward</option> | ||
<-- | ||
|
||
!--> | ||
</select> | ||
</div> | ||
|
||
<div class="mt-4"> | ||
<h5>Geometry postprocessing</h5> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="checkbox" id="geoPostEnabled" formControlName="geoPostEnabled"> | ||
<label class="form-check-label" for="geoPostEnabled">Enabled</label> | ||
</div> | ||
</div> | ||
|
||
<div class="mt-4 text-center"> | ||
<button type="button" class="btn btn-lg btn-primary" [routerLink]="['/display']">DISPLAY</button> | ||
</div> | ||
<div class="mt-4 text-center"> | ||
<button type="button" class="btn btn-lg btn-primary" [routerLink]="['/display']">DISPLAY</button> | ||
</div> | ||
|
||
</form> | ||
</div> |
Empty file.
26 changes: 26 additions & 0 deletions
26
firebird-ng/src/app/input-config/input-config.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { ReactiveFormsModule } from '@angular/forms'; | ||
import { InputConfigComponent } from './input-config.component'; | ||
|
||
|
||
|
||
describe('InputConfigComponent', () => { | ||
let component: InputConfigComponent; | ||
let fixture: ComponentFixture<InputConfigComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [InputConfigComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(InputConfigComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
40 changes: 40 additions & 0 deletions
40
firebird-ng/src/app/input-config/input-config.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// event-display-source.component.ts | ||
import { Component, OnInit } from '@angular/core'; | ||
import { FormBuilder, FormGroup } from '@angular/forms'; | ||
import { GeometryService } from '../geometry.service'; | ||
import { ReactiveFormsModule } from '@angular/forms'; | ||
import {RouterLink} from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'app-input-config', | ||
standalone: true, | ||
imports: [ReactiveFormsModule, RouterLink], | ||
templateUrl: './input-config.component.html', | ||
styleUrl: './input-config.component.scss' | ||
}) | ||
export class InputConfigComponent implements OnInit { | ||
|
||
geoForm: FormGroup; | ||
|
||
constructor(private fb: FormBuilder, private geometryService: GeometryService) { | ||
this.geoForm = this.fb.group({ | ||
selectedGeometry: ['eic geometry'], | ||
geoOptEnabled: [false], | ||
selectedGeoCutoff: ['Central detector'], | ||
geoPostEnabled: [false] | ||
}); | ||
|
||
this.geoForm.valueChanges.subscribe(value => { | ||
//this.geometryService.save(value); | ||
console.log(value); | ||
}); | ||
} | ||
|
||
ngOnInit(): void { | ||
// const savedSettings = this.geometryService.load(); | ||
// if (savedSettings) { | ||
// this.geoForm.setValue(savedSettings); | ||
// } | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters