Project
Loading...
Searching...
No Matches
GeometryParameters.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
17
18#include <stdexcept>
19#include <sstream>
20#include <string>
21
22namespace o2
23{
24namespace mid
25{
26namespace geoparams
27{
28std::string getRPCVolumeName(RPCtype type, int chamber)
29{
31 std::string name = "";
32 switch (type) {
33 case RPCtype::Long:
34 name += "long";
35 break;
37 name += "bottomCut";
38 break;
39 case RPCtype::TopCut:
40 name += "topCut";
41 break;
42 case RPCtype::Short:
43 name += "short";
44 break;
45 }
46 name += "RPC_" + std::to_string(11 + chamber);
47 return name;
48}
49
51{
53 int irpc = deId % 9;
54 if (irpc == 4) {
55 return RPCtype::Short;
56 }
57 if (irpc == 3) {
58 return RPCtype::TopCut;
59 }
60 if (irpc == 5) {
61 return RPCtype::BottomCut;
62 }
63 return RPCtype::Long;
64}
65
66std::string getChamberVolumeName(int chamber)
67{
69 return "SC" + std::to_string(11 + chamber);
70}
71
72} // namespace geoparams
73} // namespace mid
74} // namespace o2
Useful geometrical parameters for MID.
GLuint const GLchar * name
Definition glcorearb.h:781
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
std::string getChamberVolumeName(int chamber)
std::string getRPCVolumeName(RPCtype type, int iChamber)
RPCtype getRPCType(int deId)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string to_string(gsl::span< T, Size > span)
Definition common.h:52