ATLAS Offline Software
Calorimeter
CaloDetDescr
src
CaloSubdetNames.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/***************************************************************************
6
Calorimeter Detector Description package
7
8
***************************************************************************/
9
10
//<<<<<< INCLUDES >>>>>>
11
#include "
CaloDetDescr/CaloSubdetNames.h
"
12
13
14
CaloSubdetNames::~CaloSubdetNames
()
15
=
default
;
16
17
CaloSubdetNames::CaloSubdetNames
()
18
{
19
match_names
();
20
}
21
22
void
23
CaloSubdetNames::match_names
()
24
{
25
int
alignsize = (
int
)
CaloSubdetNames::UNKNOWN
;
26
m_reconame
.resize( alignsize,
"unknown"
);
27
m_alvol
.resize( alignsize,
CaloSubdetNames::UNKNOWN
);
28
29
m_alvol
[ (
int
)
CaloSubdetNames::LARCRYO_B
] =
CaloSubdetNames::LARCRYO_B
;
30
m_reconame
[ (
int
)
CaloSubdetNames::LARCRYO_B
] =
"LARCRYO_B"
;
31
m_alvol
[ (
int
)
CaloSubdetNames::LARCRYO_EC_POS
] =
CaloSubdetNames::LARCRYO_EC_POS
;
32
m_reconame
[ (
int
)
CaloSubdetNames::LARCRYO_EC_POS
] =
"LARCRYO_EC_POS"
;
33
m_alvol
[ (
int
)
CaloSubdetNames::LARCRYO_EC_NEG
] =
CaloSubdetNames::LARCRYO_EC_NEG
;
34
m_reconame
[ (
int
)
CaloSubdetNames::LARCRYO_EC_NEG
] =
"LARCRYO_EC_NEG"
;
35
36
m_alvol
[ (
int
)
CaloSubdetNames::PRESAMPLER_B_POS
] =
CaloSubdetNames::PRESAMPLER_B_POS
;
37
m_reconame
[ (
int
)
CaloSubdetNames::PRESAMPLER_B_POS
] =
"PRESAMPLER_B_POS"
;
38
m_alvol
[ (
int
)
CaloSubdetNames::PRESAMPLER_B_NEG
] =
CaloSubdetNames::PRESAMPLER_B_NEG
;
39
m_reconame
[ (
int
)
CaloSubdetNames::PRESAMPLER_B_NEG
] =
"PRESAMPLER_B_NEG"
;
40
m_alvol
[ (
int
)
CaloSubdetNames::EMB_POS
] =
CaloSubdetNames::EMB_POS
;
41
m_reconame
[ (
int
)
CaloSubdetNames::EMB_POS
] =
"EMB_POS"
;
42
m_alvol
[ (
int
)
CaloSubdetNames::EMB_NEG
] =
CaloSubdetNames::EMB_NEG
;
43
m_reconame
[ (
int
)
CaloSubdetNames::EMB_NEG
] =
"EMB_NEG"
;
44
45
m_alvol
[ (
int
)
CaloSubdetNames::PRESAMPLER_EC_POS
] =
CaloSubdetNames::PRESAMPLER_EC_POS
;
46
m_reconame
[ (
int
)
CaloSubdetNames::PRESAMPLER_EC_POS
] =
"PRESAMPLER_EC_POS"
;
47
m_alvol
[ (
int
)
CaloSubdetNames::PRESAMPLER_EC_NEG
] =
CaloSubdetNames::PRESAMPLER_EC_NEG
;
48
m_reconame
[ (
int
)
CaloSubdetNames::PRESAMPLER_EC_NEG
] =
"PRESAMPLER_EC_NEG"
;
49
m_alvol
[ (
int
)
CaloSubdetNames::EMEC_POS
] =
CaloSubdetNames::EMEC_POS
;
50
m_reconame
[ (
int
)
CaloSubdetNames::EMEC_POS
] =
"EMEC_POS"
;
51
m_alvol
[ (
int
)
CaloSubdetNames::EMEC_NEG
] =
CaloSubdetNames::EMEC_NEG
;
52
m_reconame
[ (
int
)
CaloSubdetNames::EMEC_NEG
] =
"EMEC_NEG"
;
53
54
m_alvol
[ (
int
)
CaloSubdetNames::HEC1_POS
] =
CaloSubdetNames::HEC1_POS
;
55
m_reconame
[ (
int
)
CaloSubdetNames::HEC1_POS
] =
"HEC1_POS"
;
56
m_alvol
[ (
int
)
CaloSubdetNames::HEC1_NEG
] =
CaloSubdetNames::HEC1_NEG
;
57
m_reconame
[ (
int
)
CaloSubdetNames::HEC1_NEG
] =
"HEC1_NEG"
;
58
m_alvol
[ (
int
)
CaloSubdetNames::HEC2_POS
] =
CaloSubdetNames::HEC2_POS
;
59
m_reconame
[ (
int
)
CaloSubdetNames::HEC2_POS
] =
"HEC2_POS"
;
60
m_alvol
[ (
int
)
CaloSubdetNames::HEC2_NEG
] =
CaloSubdetNames::HEC2_NEG
;
61
m_reconame
[ (
int
)
CaloSubdetNames::HEC2_NEG
] =
"HEC2_NEG"
;
62
63
m_alvol
[ (
int
)
CaloSubdetNames::FCAL1_POS
] =
CaloSubdetNames::FCAL1_POS
;
64
m_reconame
[ (
int
)
CaloSubdetNames::FCAL1_POS
] =
"FCAL1_POS"
;
65
m_alvol
[ (
int
)
CaloSubdetNames::FCAL1_NEG
] =
CaloSubdetNames::FCAL1_NEG
;
66
m_reconame
[ (
int
)
CaloSubdetNames::FCAL1_NEG
] =
"FCAL1_NEG"
;
67
m_alvol
[ (
int
)
CaloSubdetNames::FCAL2_POS
] =
CaloSubdetNames::FCAL2_POS
;
68
m_reconame
[ (
int
)
CaloSubdetNames::FCAL2_POS
] =
"FCAL2_POS"
;
69
m_alvol
[ (
int
)
CaloSubdetNames::FCAL2_NEG
] =
CaloSubdetNames::FCAL2_NEG
;
70
m_reconame
[ (
int
)
CaloSubdetNames::FCAL2_NEG
] =
"FCAL2_NEG"
;
71
m_alvol
[ (
int
)
CaloSubdetNames::FCAL3_POS
] =
CaloSubdetNames::FCAL3_POS
;
72
m_reconame
[ (
int
)
CaloSubdetNames::FCAL3_POS
] =
"FCAL3_POS"
;
73
m_alvol
[ (
int
)
CaloSubdetNames::FCAL3_NEG
] =
CaloSubdetNames::FCAL3_NEG
;
74
m_reconame
[ (
int
)
CaloSubdetNames::FCAL3_NEG
] =
"FCAL3_NEG"
;
75
76
m_alvol
[ (
int
)
CaloSubdetNames::SOLENOID
] =
CaloSubdetNames::SOLENOID
;
77
m_reconame
[ (
int
)
CaloSubdetNames::SOLENOID
] =
"SOLENOID"
;
78
79
}
80
81
std::string
82
CaloSubdetNames::alignVolName
(
CaloSubdetNames::ALIGNVOL
alvol)
83
{
84
85
return
m_reconame
[ (
unsigned
int
) alvol];
86
}
87
88
CaloSubdetNames::ALIGNVOL
89
CaloSubdetNames::alignVolEnum
(
const
std::string& reconame)
90
{
91
for
(
unsigned
int
i
= 0;
i
< (
unsigned
int
)
CaloSubdetNames::UNKNOWN
;
i
++)
92
{
93
if
( reconame ==
m_reconame
[
i
] )
return
m_alvol
[
i
];
94
}
95
return
CaloSubdetNames::UNKNOWN
;
96
}
97
CaloSubdetNames::HEC2_POS
@ HEC2_POS
Definition:
CaloSubdetNames.h:42
CaloCellPos2Ntuple.int
int
Definition:
CaloCellPos2Ntuple.py:24
CaloSubdetNames::EMB_POS
@ EMB_POS
Definition:
CaloSubdetNames.h:38
CaloSubdetNames::PRESAMPLER_B_NEG
@ PRESAMPLER_B_NEG
Definition:
CaloSubdetNames.h:37
CaloSubdetNames::FCAL2_POS
@ FCAL2_POS
Definition:
CaloSubdetNames.h:44
CaloSubdetNames::alignVolName
std::string alignVolName(CaloSubdetNames::ALIGNVOL alvol)
Matching between names and enum.
Definition:
CaloSubdetNames.cxx:82
CaloSubdetNames::HEC1_NEG
@ HEC1_NEG
Definition:
CaloSubdetNames.h:41
CaloSubdetNames::FCAL1_POS
@ FCAL1_POS
Definition:
CaloSubdetNames.h:43
CaloSubdetNames::EMEC_POS
@ EMEC_POS
Definition:
CaloSubdetNames.h:40
CaloSubdetNames::HEC2_NEG
@ HEC2_NEG
Definition:
CaloSubdetNames.h:42
CaloSubdetNames::FCAL3_POS
@ FCAL3_POS
Definition:
CaloSubdetNames.h:45
CaloSubdetNames::PRESAMPLER_EC_POS
@ PRESAMPLER_EC_POS
Definition:
CaloSubdetNames.h:39
CaloSubdetNames::UNKNOWN
@ UNKNOWN
Definition:
CaloSubdetNames.h:46
CaloSubdetNames::PRESAMPLER_B_POS
@ PRESAMPLER_B_POS
Definition:
CaloSubdetNames.h:37
CaloSubdetNames::EMEC_NEG
@ EMEC_NEG
Definition:
CaloSubdetNames.h:40
CaloSubdetNames::LARCRYO_B
@ LARCRYO_B
Definition:
CaloSubdetNames.h:36
lumiFormat.i
int i
Definition:
lumiFormat.py:85
CaloSubdetNames::LARCRYO_EC_POS
@ LARCRYO_EC_POS
Definition:
CaloSubdetNames.h:36
CaloSubdetNames::FCAL3_NEG
@ FCAL3_NEG
Definition:
CaloSubdetNames.h:45
CaloSubdetNames::m_alvol
std::vector< CaloSubdetNames::ALIGNVOL > m_alvol
vector of ALIGNVOL enum values
Definition:
CaloSubdetNames.h:73
CaloSubdetNames::HEC1_POS
@ HEC1_POS
Definition:
CaloSubdetNames.h:41
CaloSubdetNames::match_names
void match_names()
match names and enum
Definition:
CaloSubdetNames.cxx:23
CaloSubdetNames::PRESAMPLER_EC_NEG
@ PRESAMPLER_EC_NEG
Definition:
CaloSubdetNames.h:39
CaloSubdetNames::EMB_NEG
@ EMB_NEG
Definition:
CaloSubdetNames.h:38
CaloSubdetNames::m_reconame
std::vector< std::string > m_reconame
vector of names
Definition:
CaloSubdetNames.h:70
CaloSubdetNames::FCAL2_NEG
@ FCAL2_NEG
Definition:
CaloSubdetNames.h:44
CaloSubdetNames::SOLENOID
@ SOLENOID
Definition:
CaloSubdetNames.h:46
CaloSubdetNames::CaloSubdetNames
CaloSubdetNames()
standard constructor
Definition:
CaloSubdetNames.cxx:17
CaloSubdetNames::FCAL1_NEG
@ FCAL1_NEG
Definition:
CaloSubdetNames.h:43
CaloSubdetNames::alignVolEnum
CaloSubdetNames::ALIGNVOL alignVolEnum(const std::string &reconame)
Matching between names and enum.
Definition:
CaloSubdetNames.cxx:89
CaloSubdetNames.h
CaloSubdetNames declaration.
CaloSubdetNames::LARCRYO_EC_NEG
@ LARCRYO_EC_NEG
Definition:
CaloSubdetNames.h:36
CaloSubdetNames::ALIGNVOL
ALIGNVOL
LAr Alignable volumes.
Definition:
CaloSubdetNames.h:36
CaloSubdetNames::~CaloSubdetNames
virtual ~CaloSubdetNames()
destructor
Generated on Thu Nov 7 2024 21:11:37 for ATLAS Offline Software by
1.8.18