From 3cfbb4c9162354ca9274a7397a7b04f821b02ca8 Mon Sep 17 00:00:00 2001 From: Braulio Rivas Abad Date: Wed, 29 May 2024 18:12:34 -0500 Subject: [PATCH] create initial types of collections defined in gsoc --- js/types/Cluster.js | 17 +++++++++++++++++ js/types/ParticleID.js | 10 ++++++++++ js/types/RecoParticle.js | 17 +++++++++++++++++ js/types/Track.js | 15 +++++++++++++++ js/types/Vertex.js | 13 +++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 js/types/Cluster.js create mode 100644 js/types/ParticleID.js create mode 100644 js/types/RecoParticle.js create mode 100644 js/types/Track.js create mode 100644 js/types/Vertex.js diff --git a/js/types/Cluster.js b/js/types/Cluster.js new file mode 100644 index 00000000..a1d842aa --- /dev/null +++ b/js/types/Cluster.js @@ -0,0 +1,17 @@ +export class Cluster { + constructor() { + // Physics properties + this.type = 0; + this.energy = 0; // GeV + this.energyError = 0; // GeV + this.position = []; // mm + this.positionError = []; + this.iTheta = 0; + this.phi = 0; + this.directionError; // mm^2 + this.shapeParameters = []; + this.subdetectorEnergies = []; + this.clusters = []; + this.hits = []; + } +} diff --git a/js/types/ParticleID.js b/js/types/ParticleID.js new file mode 100644 index 00000000..69f5e890 --- /dev/null +++ b/js/types/ParticleID.js @@ -0,0 +1,10 @@ +export class ParticleID { + constructor() { + // Physics properties + this.type = 0; + this.pdg = 0; + this.algorithmType = 0; + this.likelihood = 0; + this.parameters = []; + } +} diff --git a/js/types/RecoParticle.js b/js/types/RecoParticle.js new file mode 100644 index 00000000..4f68b320 --- /dev/null +++ b/js/types/RecoParticle.js @@ -0,0 +1,17 @@ +export class ReconstructedParticle { + constructor() { + // Physics properties + this.pdg = 0; + this.energy = 0; // GeV + this.momentum = 0; // GeV + this.referencePoint = 0; // mm + this.charge = 0; + this.mass = 0; // GeV + this.goodnessOfPID = 0; + this.covMatrix = []; + this.startVertex = []; + this.clusters = []; + this.tracks = []; + this.particles = []; + } +} diff --git a/js/types/Track.js b/js/types/Track.js new file mode 100644 index 00000000..5a910826 --- /dev/null +++ b/js/types/Track.js @@ -0,0 +1,15 @@ +export class Track { + constructor() { + // Physics properties + this.type = 0; + this.chi2 = 0; + this.ndf = 0; + this.dEdx = 0; + this.dEdxError = 0; + this.radiusOfInnermostHit = 0; + this.subdetectorHitNumbers = []; + this.dxQuantities = []; + this.trackerHits = []; + this.tracks = []; + } +} diff --git a/js/types/Vertex.js b/js/types/Vertex.js new file mode 100644 index 00000000..d954723c --- /dev/null +++ b/js/types/Vertex.js @@ -0,0 +1,13 @@ +export class Vertex { + constructor() { + // Physics properties + this.primary = 0; + this.chi2 = 0; + this.probability = 0; + this.position = 0; // mm + this.covMatrix = []; + this.algorithmType = 0; + this.parameters = 0; + this.associatedParticles = []; + } +}