Skip to content

Commit 1e1715d

Browse files
aphecetcheshahor02
authored andcommitted
[MUON] Introduce list of DCS aliases names for MCH and MID.
1 parent 6a1c8d9 commit 1e1715d

File tree

18 files changed

+1896
-0
lines changed

18 files changed

+1896
-0
lines changed

Detectors/MUON/MCH/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ add_subdirectory(Simulation)
1818
add_subdirectory(Tracking)
1919
add_subdirectory(Raw)
2020
add_subdirectory(Workflow)
21+
add_subdirectory(Conditions)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
2+
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
3+
# verbatim in the file "COPYING".
4+
#
5+
# See http://alice-o2.web.cern.ch/license for full licensing information.
6+
#
7+
# In applying this license CERN does not waive the privileges and immunities
8+
# granted to it by virtue of its status as an Intergovernmental Organization or
9+
# submit itself to any jurisdiction.
10+
11+
o2_add_library(
12+
MCHConditions
13+
SOURCES src/DCSNamer.cxx
14+
PUBLIC_LINK_LIBRARIES fmt::fmt)
15+
16+
if(BUILD_TESTING)
17+
o2_add_test(
18+
dcs-namer
19+
SOURCES test/testDCSNamer.cxx test/HVAliases.cxx test/LVAliases.cxx
20+
COMPONENT_NAME mch
21+
LABELS "muon;mch;dcs"
22+
PUBLIC_LINK_LIBRARIES O2::MCHConditions)
23+
endif()
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- doxy
2+
\page refDetectorsMUONMCHConditions Conditions
3+
/doxy -->
4+
5+
# MCH Conditions
6+
7+
## From DCS
8+
9+
### HV
10+
11+
The MCH high voltage (HV) system is composed of 188 channels :
12+
13+
- 48 channels for stations 1 and 2 (3 HV channel per quadrant x 16 quadrants)
14+
- 140 channels for stations 3, 4, 5 (1 HV channel per slat x 140 slats)
15+
16+
### LV
17+
18+
The MCH low voltage (LV) system is composed of 328 channels :
19+
20+
- 216 channels (108 x 2 different voltage values) to power up the front-end
21+
electronics (dualsampas)
22+
- 112 channels to power up the readout crates hosting the solar (readout) cards
23+
24+
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
#ifndef O2_MCH_CONDITIONS_DCS_NAMER_H
12+
#define O2_MCH_CONDITIONS_DCS_NAMER_H
13+
14+
#include <vector>
15+
#include <string>
16+
#include <optional>
17+
#include <cstdint>
18+
19+
namespace o2::mch::dcs
20+
{
21+
// The list of MCH DCS measurements that are of interest for reconstruction
22+
enum class MeasurementType {
23+
HV_V, // HV voltage
24+
HV_I, // HV current
25+
LV_V_FEE_ANALOG, // FEE (dualsampa) analog voltage
26+
LV_V_FEE_DIGITAL, // FEE (dualsampa) digital voltage
27+
LV_V_SOLAR // Solar crate voltage
28+
};
29+
30+
// Side describes on which side (inside or outside) a detection element
31+
// (slat or quadrant) is.
32+
// Note that MCH DCS uses the very old left-right convention instead of the
33+
// agreed-upon inside-outside.
34+
enum class Side {
35+
Left,
36+
Right
37+
};
38+
39+
// ID is used to reference a particular device in MCH DCS,
40+
// like a detection element or solar crate for instance.
41+
struct ID {
42+
int number;
43+
Side side;
44+
int chamberId; // 0..9
45+
};
46+
47+
// detElemId2DCS converts a detection element id into a dcs-id.
48+
// @returns an ID if deId is a valid the MCH detID, std::nullopt otherwise.
49+
std::optional<ID> detElemId2DCS(int deId);
50+
51+
// aliases gets a list of MCH DCS aliases for the given measurement type(s).
52+
// @param types a vector of the measurement types for which the aliases should
53+
// be returned.
54+
// @returns a list of MCH DCS alias names.
55+
std::vector<std::string> aliases(std::vector<MeasurementType> types = {
56+
MeasurementType::HV_V,
57+
MeasurementType::HV_I,
58+
MeasurementType::LV_V_FEE_ANALOG,
59+
MeasurementType::LV_V_FEE_DIGITAL,
60+
MeasurementType::LV_V_SOLAR});
61+
62+
} // namespace o2::mch::dcs
63+
64+
#endif

0 commit comments

Comments
 (0)