From f65f7e0cd78a73c1b568814b9ec9b989cb5b6c3f Mon Sep 17 00:00:00 2001 From: xsalonx Date: Wed, 23 Jul 2025 14:34:22 +0200 Subject: [PATCH 1/5] use value from DB --- lib/database/adapters/RunAdapter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/database/adapters/RunAdapter.js b/lib/database/adapters/RunAdapter.js index 3a0fdfce84..1e3cef7074 100644 --- a/lib/database/adapters/RunAdapter.js +++ b/lib/database/adapters/RunAdapter.js @@ -273,9 +273,9 @@ class RunAdapter { entityObject.inelasticInteractionRateAtMid = inelasticInteractionRateAtMid; entityObject.inelasticInteractionRateAtEnd = inelasticInteractionRateAtEnd; if (lhcFill && inelasticInteractionRateAvg !== null) { - const numberOfCollidingLhcBunchCrossings = extractNumberOfCollidingLhcBunchCrossings(lhcFill.fillingSchemeName); - entityObject.muInelasticInteractionRate = numberOfCollidingLhcBunchCrossings - ? inelasticInteractionRateAvg / (numberOfCollidingLhcBunchCrossings * PhysicalConstant.LHC_REVOLUTION_FREQUENCY_HZ) + const collidingBunchesCount = lhcFill.collidingBunchesCount ?? extractNumberOfCollidingLhcBunchCrossings(lhcFill.fillingSchemeName); + entityObject.muInelasticInteractionRate = collidingBunchesCount + ? inelasticInteractionRateAvg / (collidingBunchesCount * PhysicalConstant.LHC_REVOLUTION_FREQUENCY_HZ) : null; } else { entityObject.muInelasticInteractionRate = null; From 64f20e51e09b061529b6cb2564d10519fe527302 Mon Sep 17 00:00:00 2001 From: xsalonx Date: Wed, 23 Jul 2025 14:45:08 +0200 Subject: [PATCH 2/5] fix seededs --- lib/database/seeders/20220503120937-lhc-fills.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/database/seeders/20220503120937-lhc-fills.js b/lib/database/seeders/20220503120937-lhc-fills.js index 78aa21a460..071abae47b 100644 --- a/lib/database/seeders/20220503120937-lhc-fills.js +++ b/lib/database/seeders/20220503120937-lhc-fills.js @@ -68,7 +68,7 @@ module.exports = { stable_beams_end: '2019-08-08 23:00:00', stable_beams_duration: 60 * 60 * 12, filling_scheme_name: 'Single_12b_8_1024_8_2018', - colliding_bunches_count: 2345, + colliding_bunches_count: 1024, delivered_luminosity: 420, created_at: new Date('2019-08-09 21:00:00'), updated_at: new Date('2019-08-09 21:00:00'), From 6fe32da81b49f1ed9937c63933962f7eb713d765 Mon Sep 17 00:00:00 2001 From: xsalonx Date: Wed, 23 Jul 2025 14:48:09 +0200 Subject: [PATCH 3/5] fix test --- test/public/lhcFills/detail.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/public/lhcFills/detail.test.js b/test/public/lhcFills/detail.test.js index 4c7d8f1a59..f5eafacdda 100644 --- a/test/public/lhcFills/detail.test.js +++ b/test/public/lhcFills/detail.test.js @@ -45,7 +45,7 @@ module.exports = () => { await expectInnerText(page, '#lhc-fill-beamType', 'Beam type:\nPROTON-PROTON'); await expectInnerText(page, '#lhc-fill-fillingSchemeName', 'Scheme name:\nSingle_12b_8_1024_8_2018'); - await expectInnerText(page, '#lhc-fill-collidingBunchesCount', 'Colliding bunches:\n2,345'); + await expectInnerText(page, '#lhc-fill-collidingBunchesCount', 'Colliding bunches:\n1,024'); await expectInnerText(page, '#lhc-fill-deliveredLuminosity', 'Delivered lumi:\n420 nb-1'); }); From 45030093f4e9857e79eaa4e4374df0b978184f73 Mon Sep 17 00:00:00 2001 From: xsalonx Date: Wed, 23 Jul 2025 15:01:10 +0200 Subject: [PATCH 4/5] fix test --- test/public/runs/detail.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/public/runs/detail.test.js b/test/public/runs/detail.test.js index bf20ec6d4a..c6fb1884fd 100644 --- a/test/public/runs/detail.test.js +++ b/test/public/runs/detail.test.js @@ -282,7 +282,7 @@ module.exports = () => { it('should successfully show luminosity information of PbPb run', async () => { await goToRunDetails(page, 54); - await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(1) div:nth-child(2)', '98,110.716\nµb\n-1'); + await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(1) div:nth-child(2)', '100,130.863\nµb\n-1'); await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(2) div:nth-child(2)', '0.031'); await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(3) div:nth-child(2)', '78,600 µb'); await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(4) div:nth-child(2)', '1'); From 21807f2cf34dfeb2fed3514cf847100d651e180b Mon Sep 17 00:00:00 2001 From: xsalonx Date: Wed, 23 Jul 2025 15:22:22 +0200 Subject: [PATCH 5/5] fix --- test/public/runs/detail.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/public/runs/detail.test.js b/test/public/runs/detail.test.js index c6fb1884fd..28e7560ad7 100644 --- a/test/public/runs/detail.test.js +++ b/test/public/runs/detail.test.js @@ -283,7 +283,7 @@ module.exports = () => { it('should successfully show luminosity information of PbPb run', async () => { await goToRunDetails(page, 54); await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(1) div:nth-child(2)', '100,130.863\nµb\n-1'); - await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(2) div:nth-child(2)', '0.031'); + await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(2) div:nth-child(2)', '0.072'); await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(3) div:nth-child(2)', '78,600 µb'); await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(4) div:nth-child(2)', '1'); await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(5) div:nth-child(2)', '0.757');