CbmRoot
Loading...
Searching...
No Matches
CbmMcbmUtils.cxx
Go to the documentation of this file.
1/* Copyright (C) 2022 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5#include "CbmMcbmUtils.h"
6
7#include "TString.h"
8
9#include <stdexcept>
10
11namespace cbm
12{
13 namespace mcbm
14 {
15 std::string GetSetupFromRunId(uint64_t ulRunId)
16 {
19
21 std::string sSetupName = "mcbm_beam_2021_07_surveyed";
22 if (ulRunId < 1575) {
25 throw(std::invalid_argument("RunId smaller than the earliest run mapped (1575 in 2021 campaign)"));
26 }
27 else if (1575 <= ulRunId && ulRunId <= 1588) {
30 }
32 else if (2060 <= ulRunId && ulRunId <= 2065) {
34 sSetupName = "mcbm_beam_2022_03_09_carbon";
35 }
36 else if (2150 <= ulRunId && ulRunId <= 2160) {
38 sSetupName = "mcbm_beam_2022_03_22_iron";
39 }
40 else if (2176 <= ulRunId && ulRunId <= 2310) {
42 sSetupName = "mcbm_beam_2022_03_28_uranium";
43 }
44 else if (2350 <= ulRunId && ulRunId <= 2397) {
46 sSetupName = "mcbm_beam_2022_05_23_nickel";
47 }
48 else if (2454 <= ulRunId && ulRunId <= 2497) {
50 sSetupName = "mcbm_beam_2022_06_16_gold";
51 }
52 else if (2498 <= ulRunId && ulRunId <= 2610) {
54 sSetupName = "mcbm_beam_2022_06_18_gold";
55 }
56 else if (2724 <= ulRunId && ulRunId <= 2917) {
58 sSetupName = "mcbm_beam_2024_03_22_gold";
59 }
60 else if (2918 <= ulRunId) {
62 sSetupName = "mcbm_beam_2024_05_08_nickel";
63 }
64 else {
66 throw(std::invalid_argument(Form("RunId %d is not mapped! Please complete the map!", ulRunId)));
67 }
68
69 return sSetupName;
70 }
71 } // namespace mcbm
72} // namespace cbm
std::string GetSetupFromRunId(uint64_t ulRunId)