ATLAS Offline Software
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 >>>>>>
12 
13 
15 = default;
16 
18 {
19  match_names();
20 }
21 
22 void
24 {
25  int alignsize = (int) CaloSubdetNames::UNKNOWN;
26  m_reconame.resize( alignsize, "unknown" );
27  m_alvol.resize( alignsize, CaloSubdetNames::UNKNOWN);
28 
30  m_reconame [ (int)CaloSubdetNames::LARCRYO_B ] = "LARCRYO_B";
32  m_reconame [ (int)CaloSubdetNames::LARCRYO_EC_POS ] = "LARCRYO_EC_POS";
34  m_reconame [ (int)CaloSubdetNames::LARCRYO_EC_NEG ] = "LARCRYO_EC_NEG";
35 
37  m_reconame [ (int)CaloSubdetNames::PRESAMPLER_B_POS ] = "PRESAMPLER_B_POS";
39  m_reconame [ (int)CaloSubdetNames::PRESAMPLER_B_NEG ] = "PRESAMPLER_B_NEG";
41  m_reconame [ (int)CaloSubdetNames::EMB_POS ] = "EMB_POS";
43  m_reconame [ (int)CaloSubdetNames::EMB_NEG ] = "EMB_NEG";
44 
46  m_reconame [ (int)CaloSubdetNames::PRESAMPLER_EC_POS ] = "PRESAMPLER_EC_POS";
48  m_reconame [ (int)CaloSubdetNames::PRESAMPLER_EC_NEG ] = "PRESAMPLER_EC_NEG";
50  m_reconame [ (int)CaloSubdetNames::EMEC_POS ] = "EMEC_POS";
52  m_reconame [ (int)CaloSubdetNames::EMEC_NEG ] = "EMEC_NEG";
53 
55  m_reconame [ (int)CaloSubdetNames::HEC1_POS ] = "HEC1_POS";
57  m_reconame [ (int)CaloSubdetNames::HEC1_NEG ] = "HEC1_NEG";
59  m_reconame [ (int)CaloSubdetNames::HEC2_POS ] = "HEC2_POS";
61  m_reconame [ (int)CaloSubdetNames::HEC2_NEG ] = "HEC2_NEG";
62 
64  m_reconame [ (int)CaloSubdetNames::FCAL1_POS ] = "FCAL1_POS";
66  m_reconame [ (int)CaloSubdetNames::FCAL1_NEG ] = "FCAL1_NEG";
68  m_reconame [ (int)CaloSubdetNames::FCAL2_POS ] = "FCAL2_POS";
70  m_reconame [ (int)CaloSubdetNames::FCAL2_NEG ] = "FCAL2_NEG";
72  m_reconame [ (int)CaloSubdetNames::FCAL3_POS ] = "FCAL3_POS";
74  m_reconame [ (int)CaloSubdetNames::FCAL3_NEG ] = "FCAL3_NEG";
75 
77  m_reconame [ (int)CaloSubdetNames::SOLENOID ] = "SOLENOID";
78 
79 }
80 
81 std::string
83 {
84 
85  return m_reconame[ (unsigned int) alvol];
86 }
87 
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  }
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