ATLAS Offline Software
EnumDef.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ENUMDEF_H
6 #define ENUMDEF_H
7 
8 #include <array>
9 
10 namespace MCP {
11 
12  // This is for SagittaCorrection, there are two different types of error terms
13  enum class TrackType{ CB, ID, ME };
14 
15  // This is for SagittaCorrection, there are two different types of error terms
17 
18  // This for the calibration constants of the Scale and Resolution Corrections, s0/s1/r0/r1/r2
20 
21  // Params
22  enum class ScaleSmearParam{ s0, s1, r0, r1, r2 };
23 
24  // Params
25  enum class ExpectedResParam{ r0, r1, r2, r2tan2 };
26 
27  // Data year
29 
30  // For HighPtSmearing
32 
33  // Data23 and Run4 are not supported yet
35 
36  // Need this defined as a simple enum to not change any interface class
37  namespace DetectorType { enum { MS = 1, ID = 2, CB = 3 };}
38 
39  inline std::string toString(TrackType trkType)
40  {
41  if(trkType == TrackType::CB) return "CB";
42  if(trkType == TrackType::ID) return "ID";
43  if(trkType == TrackType::ME) return "ME";
44 
45  return "";
46  }
47 
48  inline std::string toString(ScaleSmearParam param)
49  {
50  if(param == ScaleSmearParam::s0) return "s0";
51  if(param == ScaleSmearParam::s1) return "s1";
52  if(param == ScaleSmearParam::r0) return "r0";
53  if(param == ScaleSmearParam::r1) return "r1";
54  if(param == ScaleSmearParam::r2) return "r2";
55 
56  return "";
57  }
58 
59  inline std::string toString(DataYear year)
60  {
61  if(year == DataYear::Data16) return "Data16";
62  if(year == DataYear::Data17) return "Data17";
63  if(year == DataYear::Data18) return "Data18";
64  if(year == DataYear::Data22) return "Data22";
65  if(year == DataYear::Data23) return "Data23";
66  if(year == DataYear::Run4) return "Run4";
67  return "";
68  }
69 
70  // Need this defined as a simple enum to not change any interface class
71  namespace SystVariation {
72  enum { Default = 0, Down = -1, Up = 1 };
73  }
74 
75 };
76 
77 #endif
MCP::MST_Categories::Three
@ Three
MCP::SagittaCorrection::Residual__1up
@ Residual__1up
MCP::MST_Categories::Undefined
@ Undefined
MCP::ScaleResCorrection::Nominal
@ Nominal
MCP::DataYear::Data16
@ Data16
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
MCP::MST_Categories::Two
@ Two
MCP::DataYear::Data23
@ Data23
MCP::ScaleSmearParam::s0
@ s0
MCP::DetectorType::CB
@ CB
Definition: EnumDef.h:37
MCP::SagittaCorrection
SagittaCorrection
Definition: EnumDef.h:16
MCP::ScaleSmearParam::r2
@ r2
python.AtlRunQueryAMI.year
year
Definition: AtlRunQueryAMI.py:226
MCP::ExpectedResParam::r1
@ r1
MCP::SagittaCorrection::Datastat__1up
@ Datastat__1up
MCP::ExpectedResParam::r0
@ r0
MCP::ExpectedResParam::r2
@ r2
MCP::toString
std::string toString(TrackType trkType)
Definition: EnumDef.h:39
MCP::MST_Categories::Four
@ Four
MCP::MST_Categories
MST_Categories
Definition: EnumDef.h:31
MCP::ScaleSmearParam::s1
@ s1
MCP::DataYear::Data18
@ Data18
InDetDD::DetectorType
DetectorType
Definition: DetectorDesign.h:45
MCP::SystVariation::Down
@ Down
Definition: EnumDef.h:72
MCP::ScaleResCorrection::SystErr__1down
@ SystErr__1down
MCP::MST_Categories::One
@ One
MCP::ScaleResCorrection::SystErr__1up
@ SystErr__1up
MCP::DataYear::Data17
@ Data17
MCP::MST_Categories::Zero
@ Zero
MCP::DataYear::Run4
@ Run4
MCP::ExpectedResParam::r2tan2
@ r2tan2
MCP
Definition: CalibContainer.h:18
MCP::ExpectedResParam
ExpectedResParam
Definition: EnumDef.h:25
MCP::DetectorType::MS
@ MS
Definition: EnumDef.h:37
MCP::ScaleResCorrection
ScaleResCorrection
Definition: EnumDef.h:19
MCP::TrackType::CB
@ CB
MCP::SagittaCorrection::Nominal
@ Nominal
MCP::SystVariation::Up
@ Up
Definition: EnumDef.h:72
MCP::ScaleSmearParam::r0
@ r0
MCP::ScaleSmearParam
ScaleSmearParam
Definition: EnumDef.h:22
MCP::DataYear
DataYear
Definition: EnumDef.h:28
MCP::ScaleSmearParam::r1
@ r1
Default
MCP::DataYear::Data22
@ Data22
MCP::TrackType::ME
@ ME
TrackType
Definition: TrackTypes.h:10
MCP::TrackType::ID
@ ID