Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/database/adapters/RunAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/database/seeders/20220503120937-lhc-fills.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion test/public/lhcFills/detail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

Expand Down
4 changes: 2 additions & 2 deletions test/public/runs/detail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ 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(2) div:nth-child(2)', '0.031');
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.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');
Expand Down
Loading