Skip to content

Commit

Permalink
Energy mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehevi committed Jul 26, 2023
1 parent fdc25a6 commit 25e708f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/config/rct-data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const { filterTypes, filterInputTypes } = require('./filterTypes.js');
const detectors = require('./detectors.js').sort();
const roles = require('./roles.js');
const physicalParticlesData = require('./physicalParticlesData.js');
const beamTypesMappings = require('./beamTypesMappings.js');
const beamTypeMapping = require('./mapping/beamTypeMapping.js');
const healthcheckQueries = require('./healthcheckQueries.js');
const quality = require('./quality');

Expand All @@ -34,6 +34,6 @@ module.exports = {
roles,
quality,
physicalParticlesData,
beamTypesMappings,
beamTypeMapping,
...healthcheckQueries,
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* or submit itself to any jurisdiction.
*/

const beamTypesMappings = {
const beamTypeMapping = {
pp: 'p-p',
nn: 'n-n',
XeXe: 'Xe-Xe',
Expand All @@ -22,4 +22,4 @@ const beamTypesMappings = {
pA: 'p-A',
};

module.exports = beamTypesMappings;
module.exports = beamTypeMapping;
22 changes: 22 additions & 0 deletions app/config/rct-data/mapping/energyMapping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

const energyMapping = {
['6800']: 6800,
['7000']: 7000,
['5360/2']: 5360/2,
['450']: 450,
};

module.exports = energyMapping;
2 changes: 1 addition & 1 deletion app/lib/alimonitor-services/ServicesDataCommons.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const { rctData } = require('../config/configProvider.js');
function mapBeamTypeToCommonFormat(dataObject) {
dataObject.beam_type = Utils.switchCase(
dataObject.beam_type,
rctData.beamTypesMappings,
rctData.beamTypeMapping,
{ default: dataObject.beam_type },
);
return dataObject;
Expand Down

0 comments on commit 25e708f

Please sign in to comment.