Index

src/helpers/histogram-config.ts

ATLAS_JPSI_HISTOGRAM
Type : HistogramConfig
Default value : { title: 'Invariant Mass', xlabel: 'Mass (GeV)', ylabel: 'Entries', nbins: 50, xmin: 1, xmax: 5, lineColor: 857, fillColor: 857, fillStyle: 1001, hints: [{ mass: 3.1, label: 'J/\u03C8', color: '#f0c040' }], emptyText: 'Tag particles in the masterclass panel to fill this histogram', }

ATLAS J/psi-path masterclass histogram config.

ATLAS_MASS_HISTOGRAM
Type : HistogramConfig
Default value : { title: 'Invariant Mass', xlabel: 'Mass (GeV)', ylabel: 'Entries', nbins: 50, xmin: 20, xmax: 120, lineColor: 857, fillColor: 857, fillStyle: 1001, hints: [{ mass: 91.2, label: 'Z', color: '#40c0f0' }], emptyText: 'Tag particles in the masterclass panel to fill this histogram', }

Default ATLAS Z-path masterclass histogram config.

ATLAS_WIDE_HISTOGRAM
Type : HistogramConfig
Default value : { title: 'Invariant Mass', xlabel: 'Mass (GeV)', ylabel: 'Entries', nbins: 60, xmin: 0, xmax: 200, lineColor: 857, fillColor: 857, fillStyle: 1001, hints: [ { mass: 3.1, label: 'J/\u03C8', color: '#f0c040' }, { mass: 91.2, label: 'Z', color: '#40c0f0' }, { mass: 125.1, label: 'H', color: '#f07040' }, ], emptyText: 'Tag particles in the masterclass panel to fill this histogram', }

ATLAS wide-range histogram config (Z + Higgs).

src/helpers/kinematics-config.ts

ATLAS_KINEMATICS
Type : KinematicsConfig
Default value : { title: 'Track Momenta', collectionType: 'Tracks', defaultSort: 'pT', defaultSortDirection: 'desc', filterColumn: 'pT', columns: [ { id: 'pT', label: 'pT', unit: 'GeV', tooltip: 'Transverse momentum', getter: (t) => (t.pT ?? 0) / 1000, precision: 1, }, { id: 'eta', label: '\u03B7', tooltip: 'Pseudorapidity', getter: (t) => t.eta ?? 0, precision: 2, }, { id: 'phi', label: '\u03C6', tooltip: 'Azimuthal angle', getter: (t) => t.phi ?? 0, precision: 2, }, { id: 'charge', label: 'q', tooltip: 'Electric charge', getter: (t) => { if (t.charge != null) return t.charge; const qOverP = t.dparams?.[4]; return qOverP ? Math.sign(qOverP) : 0; }, precision: 0, }, { id: 'p', label: '|p|', unit: 'GeV', tooltip: 'Total momentum', getter: (t) => { const qOverP = t.dparams?.[4]; if (!qOverP || !isFinite(1 / qOverP)) return 0; return Math.abs(1 / qOverP) / 1000; }, precision: 1, }, ], }

Default ATLAS track kinematics config for JiveXML/PHYSLITE data.

src/helpers/invariant-mass.ts

ATLAS_MASTERCLASS_CONFIG
Type : MasterclassConfig
Default value : { title: 'Masterclass: Invariant Mass', particleTags: [ { id: 'electron', label: 'Electron', symbol: 'e\u00B1', color: '#f0c040', mass: 0.511, }, { id: 'muon', label: 'Muon', symbol: '\u03BC\u00B1', color: '#40c060', mass: 105.658, }, { id: 'photon', label: 'Photon', symbol: '\u03B3', color: '#e04040', mass: 0, }, ], hints: [ 'Z boson \u2248 91 GeV', 'Higgs \u2248 125 GeV', 'J/\u03C8 \u2248 3.1 GeV', ], classifyEvent: atlasClassifyEvent, }

Default masterclass configuration for ATLAS Z-path exercises.

src/loaders/atlasesd-loader.ts

AUX_BRANCH_RE
Type : unknown
Default value : /^(xAOD::[A-Za-z0-9]+?)(?:_v\d+)?_([A-Za-z0-9_]+)Aux\.$/

Matches a static auxiliary store branch and splits it into class family and container name. ESD branch names carry the persistent class, e.g. xAOD::TrackParticleAuxContainer_v5_InDetTrackParticlesAux. → ('xAOD::TrackParticleAuxContainer', 'InDetTrackParticles').

Requiring the trailing Aux. excludes the per-decoration ...AuxDyn.<var> branches, and requiring the xAOD:: prefix excludes the POOL type/persistent-separated collections, which are matched by TRK_BRANCH_RE instead.

DEFAULT_ESD_CONTAINERS
Type : string[]
Default value : [ 'InDetTrackParticles', 'GSFTrackParticles', 'CombinedMuonTrackParticles', 'ExtrapolatedMuonTrackParticles', 'MuonSpectrometerTrackParticles', 'PrimaryVertices', 'CaloCalTopoClusters', 'egammaClusters', 'MET_Reference_AntiKt4EMPFlow', 'Electrons', 'Photons', 'Muons', 'AntiKt4EMPFlowJets', 'AntiKt4EMTopoJets', 'AntiKt4LCTopoJets', 'AntiKt10LCTopoJets', 'TauJets', ...DEFAULT_TRK_COLLECTIONS, ]

Containers read by default. An ESD holds dozens of track, jet and cluster containers; reading them all would be needlessly slow and would bury the interesting ones in the collections menu, so the loader works from an allow-list. Pass containers or extraContainers to change it.

DEFAULT_MET_TERMS
Type : []
Default value : ['Final', 'FinalTrk', 'FinalClus']

MET terms to prefer, most complete first.

DEFAULT_TRK_COLLECTIONS
Type : string[]
Default value : [ 'CombinedInDetTracks', 'CombinedMuonTracks', 'CombinedMuonsLRTTracks', 'CombinedStauTracks', 'DisappearingTracks', 'ExtraPolatedMuonsLRTTracks', 'ExtrapolatedMuonTracks', 'ExtrapolatedStauTracks', 'GSFTracks', 'MSOnlyExtraPolatedMuonsLRTTrackParticlesTracks', 'MSOnlyExtrapolatedTracks', 'MuonSpectrometerTracks', 'ResolvedForwardTracks', ]

Trk::TrackCollection containers read by default.

Most of these duplicate an xAOD TrackParticle container — CombinedInDetTracks and InDetTrackParticles are the same tracks — but they are the only source of the ones that have no xAOD counterpart, and of measured trajectories where those are recoverable (see ATLASESDLoader.globalPosition).

ESD_AUX_CLASSES
Type : literal type
Default value : { 'xAOD::TrackParticleAuxContainer': { phoenixType: 'Tracks', converter: 'tracks', required: ['phi', 'theta', 'qOverP'], }, 'xAOD::VertexAuxContainer': { phoenixType: 'Vertices', converter: 'vertices', required: ['x', 'y', 'z'], }, 'xAOD::CaloClusterAuxContainer': { phoenixType: 'CaloClusters', converter: 'clusters', required: ['calE', 'calEta', 'calPhi'], }, 'xAOD::MissingETAuxContainer': { phoenixType: 'MissingEnergy', converter: 'met', required: ['mpx', 'mpy'], }, 'xAOD::ElectronAuxContainer': { phoenixType: 'Electrons', converter: 'particles', required: ['pt', 'eta', 'phi'], pdgId: 11, }, 'xAOD::PhotonAuxContainer': { phoenixType: 'Photons', converter: 'particles', required: ['pt', 'eta', 'phi'], }, 'xAOD::MuonAuxContainer': { phoenixType: 'Muons', converter: 'particles', required: ['pt', 'eta', 'phi'], pdgId: 13, }, 'xAOD::JetAuxContainer': { phoenixType: 'Jets', converter: 'jets', required: ['pt', 'eta', 'phi'], }, 'xAOD::TauJetAuxContainer': { phoenixType: 'Jets', converter: 'jets', required: ['pt', 'eta', 'phi'], }, }

ESD aux containers keyed by class family, i.e. the class name with its _vN version suffix removed. Keying on the class rather than on the branch name is what lets the loader survive a container being written with a newer aux version in a future ESD production.

MAX_PHYSICAL_MOMENTUM
Type : number
Default value : 1e7

Momentum above which a track is treated as having none measured, in MeV.

A fit that did not determine the momentum writes qOverP as roughly 1e-8, which works out as |p| ~ 100 TeV — ATLAS's way of saying "straight line, no measurement". No real LHC track comes near the ~7 TeV beam energy, so anything above this bound is a sentinel rather than a measurement.

TRIGGER_CONTAINER_RE
Type : unknown
Default value : /^(HLT_|L1_|LVL1)/

Trigger containers, which are counted rather than named when reporting.

TRK_BRANCH_RE
Type : miscellaneous
Default value : /^Trk::TrackCollection_tlp\d+_([A-Za-z0-9_]+)$/

Matches a POOL type/persistent-separated track collection, e.g. Trk::TrackCollection_tlp7_CombinedInDetTracks → 'CombinedInDetTracks'. The tlp version is accepted rather than pinned, but note that the member layout is version-specific — see ATLASESDLoader.convertTrkTracks.

TRK_TRACK_DEF
Type : ESDAuxClassDef
Default value : { phoenixType: 'Tracks', converter: 'trkTracks', required: ['m_tracks'], }

Phoenix type for a Trk::TrackCollection. These are not auxiliary stores, so they have no class family to key on; m_tracks stands in as the required member so a malformed container is reported through the usual path.

src/managers/session-manager/session-format.ts

CAMERA_SAMPLE_INTERVAL_MS
Type : number
Default value : 100

Default camera sample interval. 10 samples/sec is smooth enough for 60fps replay.

MAX_DECOMPRESSED_BYTES
Type : unknown
Default value : 50 * 1024 * 1024

Safety cap on a single decoded session size to defend against deflate bombs.

MAX_EVENTS_PER_SESSION
Type : number
Default value : 50000

Hard cap on captured event count per recording. Auto-stop on overflow.

MAX_RECORDING_DURATION_MS
Type : unknown
Default value : 60 * 60 * 1000

Hard cap on recording duration. Auto-stop on overflow.

MAX_REMOTE_SESSION_BYTES
Type : unknown
Default value : 10 * 1024 * 1024

Hard cap on a remote ?session=URL response size.

REPLAY_PAYLOAD_MARKER
Type : miscellaneous
Default value : '__phoenixReplay'

Marker the player puts on payloads it emits so the recorder skips them.

SESSION_VERSION
Type : number
Default value : 1

On-disk + URL-embeddable schema for Phoenix Sessions (issue #883). v1: deterministic semantic replay of event-bus emissions + camera samples.

The replay is "semantic" (re-emits structured event-bus events on the receiving side) and not a pixel video, so the player keeps full 3D interactivity while events are scheduled at original timing.

src/loaders/physlite-loader.ts

DEFAULT_COLLECTIONS
Type : PHYSLITECollectionDef[]
Default value : [ { prefix: 'AnalysisElectronsAuxDyn', fields: ['pt', 'eta', 'phi', 'm'], phoenixType: 'Electrons', collectionName: 'AnalysisElectrons', }, { prefix: 'AnalysisMuonsAuxDyn', fields: ['pt', 'eta', 'phi'], phoenixType: 'Muons', collectionName: 'AnalysisMuons', }, { prefix: 'AnalysisPhotonsAuxDyn', fields: ['pt', 'eta', 'phi', 'm'], phoenixType: 'Photons', collectionName: 'AnalysisPhotons', }, { prefix: 'AnalysisJetsAuxDyn', fields: ['pt', 'eta', 'phi', 'm'], phoenixType: 'Jets', collectionName: 'AnalysisJets', }, { prefix: 'AnalysisLargeRJetsAuxDyn', fields: ['pt', 'eta', 'phi', 'm'], phoenixType: 'Jets', collectionName: 'AnalysisLargeRJets', }, { prefix: 'InDetTrackParticlesAuxDyn', fields: ['d0', 'z0', 'theta', 'phi', 'qOverP'], phoenixType: 'Tracks', collectionName: 'InDetTrackParticles', }, { prefix: 'MuonSpectrometerTrackParticlesAuxDyn', fields: ['d0', 'z0', 'theta', 'phi', 'qOverP'], phoenixType: 'Tracks', collectionName: 'MuonSpectrometerTrackParticles', }, { prefix: 'CombinedMuonTrackParticlesAuxDyn', fields: ['d0', 'z0', 'theta', 'phi', 'qOverP'], phoenixType: 'Tracks', collectionName: 'CombinedMuonTrackParticles', }, { prefix: 'ExtrapolatedMuonTrackParticlesAuxDyn', fields: ['d0', 'z0', 'theta', 'phi', 'qOverP'], phoenixType: 'Tracks', collectionName: 'ExtrapolatedMuonTrackParticles', }, { prefix: 'GSFTrackParticlesAuxDyn', fields: ['d0', 'z0', 'theta', 'phi', 'qOverP'], phoenixType: 'Tracks', collectionName: 'GSFTrackParticles', }, { prefix: 'MET_Core_AnalysisMETAuxDyn', fields: ['mpx', 'mpy'], phoenixType: 'MissingEnergy', collectionName: 'MET', }, { prefix: 'PrimaryVerticesAuxDyn', fields: ['x', 'y', 'z'], phoenixType: 'Vertices', collectionName: 'PrimaryVertices', }, { prefix: 'egammaClustersAuxDyn', fields: ['calE', 'calEta', 'calPhi'], phoenixType: 'CaloClusters', collectionName: 'egammaClusters', }, ]

Default PHYSLITE branch mapping for ATLAS Open Data. Branch names verified against the official get_json_phoenix.py script.

src/helpers/eta-phi-config.ts

DEFAULT_ETA_PHI_CONFIG
Type : Required<EtaPhiConfig>
Default value : { etaRange: [-5, 5], phiRange: [-Math.PI, Math.PI], etaBins: 100, phiBins: 63, energyThreshold: 0, logScale: true, }

Default ATLAS-style eta-phi configuration.

src/managers/ui-manager/index.ts

defaultAnimationPresets
Type : AnimationPreset[]
Default value : [ { name: 'Cavern to ID', positions: [ { position: [66388.95051168812, 5264.228603228927, -46910.7848593543], duration: 1000, }, { position: [12834.18729094943, 677.7571205763458, 135.68755273443463], duration: 2000, }, { position: [312.02688693297375, 25.884223757326, 270.10019006776236], duration: 3500, }, { position: [263.3640855132258, 19.874838262525053, -318.16541790248885], duration: 3000, }, { position: [5534.140362338047, 234.03507981484574, -2933.619479808285], duration: 2000, }, { position: [2681.277288705242, 646.5795158318147, 5628.5248735111745], duration: 1000, }, { position: [-6062.586283740076, 790.5876682946184, 1381.1675900848818], duration: 1000, }, { position: [-1766.7693725879053, 1007.1048030984678, -5928.901341784575], duration: 1000, }, { position: [12814.982506255355, 2516.987185037266, -22891.902734328327], duration: 1000, }, ], animateEventAfterInterval: 5000, collisionDuration: 6000, }, ]

If animation presets not passed in configuration, we will use this.

src/helpers/event-summary.ts

DETECTOR_LEVEL_TYPES
Type : unknown
Default value : new Set([ 'CaloCells', 'Hits', 'PlanarCaloCells', 'IrregularCaloCells', ])

Detector-level types that are fixed per detector, not per event.

OBJECT_COLLECTION_TYPES
Type : unknown
Default value : [ 'Tracks', 'Jets', 'Hits', 'CaloClusters', 'CaloCells', 'Muons', 'Photons', 'Electrons', 'Vertices', 'MissingEnergy', 'PlanarCaloCells', 'IrregularCaloCells', ] as const

Known collection types that hold arrays of physics objects.

src/helpers/constants.ts

EVENT_DATA_TYPE_COLORS
Type : object
Default value : { Hits: new Color(0xff0000), Tracks: new Color(0xff0000), Jets: new Color(0x2194ce), CaloClusters: new Color(0xffd166), MuonChambers: new Color(0xff0000), Vertices: new Color(0xffd166), MissingEnergy: new Color(0xffffff), PlanarCaloCells: new Color(0xfff69a), }

Colors of different event data types.

src/helpers/browser-storage.ts

getFromLocalStorage
Type : unknown
Default value : (item: string) => { try { return localStorage.getItem(item); } catch (exception) { console.warn('Exception in localStorage', exception); } }

Get an item from local storage.

setToLocalStorage
Type : unknown
Default value : (item: string, value: string) => { try { localStorage.setItem(item, value); } catch (exception) { console.warn('Exception in localStorage', exception); } }

Set item to local storage.

src/helpers/labels.ts

getLabelTitle
Type : unknown
Default value : ( eventDataType: string, collection: string, index: string | number, ) => `${eventDataType} > ${collection} > ${index}`

Get title of the label.

src/helpers/color-utils.ts

HEX_COLOR
Type : unknown
Default value : /^(?:0x|#)?((?:[0-9a-f]{3}){1,2})$/i

Hexadecimal colours as they appear in event data, with an optional # or 0x prefix and either three or six digits.

src/managers/three-manager/shaders/hover-fragment.ts

hoverFragmentShader
Type : unknown
Default value : ` uniform float opacity; uniform float colorR; uniform float colorG; uniform float colorB; void main() { gl_FragColor = vec4(colorR, colorG, colorB, opacity); } `

Fragment shader for hover outline color. Color controlled via uniforms.

src/managers/three-manager/shaders/hover-vertex.ts

hoverVertexShader
Type : unknown
Default value : ` void main() { gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); } `

Vertex shader for hover outline rendering.

src/helpers/file.ts

loadFile
Type : unknown
Default value : ( onFileRead: (data: string) => void, contentType: string = 'application/json', ) => { // Create a mock input file element and use that to read the file const inputFile = document.createElement('input'); document.body.appendChild(inputFile); inputFile.type = 'file'; inputFile.accept = contentType; inputFile.onclick = (e: any) => { e.target.value = ''; }; inputFile.addEventListener('invalid', (e) => { console.log(JSON.stringify(e)); }); const fileSelected = (e: any) => { const configFile = e.target?.files[0]; const reader = new FileReader(); reader.onload = (e) => { if (e.target && e.target.result) { onFileRead?.(e.target.result.toString()); } inputFile.remove(); }; reader.readAsText(configFile); }; inputFile.oninput = fileSelected; // inputFile.onchange = fileSelected; inputFile.click(); }

Load a file from user by mocking an input element.

saveFile
Type : unknown
Default value : ( data: string, fileName: string, contentType: string = 'application/json', ) => { const blob = new Blob([data], { type: contentType }); const tempAnchor = document.createElement('a'); tempAnchor.style.display = 'none'; const objectUrl = URL.createObjectURL(blob); tempAnchor.href = objectUrl; tempAnchor.download = fileName; tempAnchor.click(); tempAnchor.remove(); // The download is started asynchronously by the click above, so revoking // synchronously here can cancel it. Release the URL on the next tick, once // the browser has taken its own reference to the blob. setTimeout(() => URL.revokeObjectURL(objectUrl)); }

Save and download file with the given data.

src/managers/url-options-manager.ts

phoenixURLOptions
Type : object
Default value : { file: '', type: '', config: '', state: '', hideWidgets: false, embed: false, /** Inline base64-deflate session replay payload (#883). */ replay: '', /** Remote URL pointing at a `.phnxreplay` JSON file (#883). */ session: '', }

Model for Phoenix URL options.

src/helpers/zip.ts

readZipFile
Type : unknown
Default value : async (file: File | ArrayBuffer) => { const archive = new JSZip(); const filesWithData: { [fileName: string]: string } = {}; await archive.loadAsync(file); for (const filePath in archive.files) { const fileData = (await archive.file(filePath)?.async('string')) ?? 'Unable to read file'; filesWithData[filePath] = fileData; } return filesWithData; }

Read a zip file and return its contents as an object.

src/loaders/objects/tracks.ts

tracks_frag
Type : unknown
Default value : [ 'uniform float progress;', 'varying vec3 v_color;', 'varying float v_counter;', 'flat varying int v_track_id;', 'void main() {', ' if (v_counter > progress) discard;', ' gl_FragColor = vec4(v_color, 1.0);', '}', ].join('\n')

Custom fragment shadre for track.

tracks_vert
Type : unknown
Default value : [ 'attribute vec3 previous;', 'attribute vec3 next;', 'attribute int track_id;', 'attribute float side;', 'attribute vec3 color;', 'attribute float linewidth;', 'attribute float counter;', 'varying vec3 v_color;', 'varying float v_counter;', 'flat varying int v_track_id;', 'uniform vec2 resolution;', // 'uniform float lineWidth;', 'void main() {', ' vec2 aspect = vec2(resolution.x / resolution.y, 1.0);', '', ' v_color = color;', ' v_counter = counter;', ' v_track_id = track_id;', '', ' mat4 m = projectionMatrix * modelViewMatrix;', ' vec4 finalPosition = m * vec4(position, 1.0);', ' vec4 prevPos = m * vec4(previous, 1.0);', ' vec4 nextPos = m * vec4(next, 1.0);', '', ' vec2 curP = finalPosition.xy / finalPosition.w * aspect;', ' vec2 prevP = prevPos.xy / prevPos.w * aspect;', ' vec2 nextP = nextPos.xy / nextPos.w * aspect;', '', ' vec2 dir;', ' if (curP == prevP) dir = normalize(nextP - curP);', ' else if (curP == nextP) dir = normalize(curP - prevP);', ' else dir = normalize(curP - prevP);', '', ' vec2 normal = vec2(-dir.y, dir.x);', ' normal.xy *= .5 * linewidth;', ' normal.x /= aspect.x;', ' normal.xy *= finalPosition.w * 0.001;', ' finalPosition.xy += normal.xy * side;', ' gl_Position = finalPosition;', '}', ].join('\n')

Custom vertex shader for tracks.

results matching ""

    No results matching ""