ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArGeoModel
LArHV
src
EMECHVModule.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArHV/EMECHVModule.h
"
6
#include "
LArHV/EMECHVManager.h
"
7
#include "
LArHV/EMECHVDescriptor.h
"
8
#include "
LArHV/EMECHVElectrode.h
"
9
#include <iostream>
10
11
class
EMECHVModule::Clockwork
{
12
public
:
13
Clockwork
(
const
EMECHVManager
* managerPtr
14
,
const
EMECHVModule
* modulePtr
15
,
IOType
iWheel
16
,
unsigned
int
side
17
,
unsigned
int
eta
18
,
unsigned
int
phi
19
,
unsigned
int
sector)
20
:
manager
(managerPtr)
21
,
iSide
(side)
22
,
iEta
(
eta
)
23
,
iPhi
(
phi
)
24
,
iSector
(sector)
25
{
26
unsigned
nElectrodes = iWheel==
OUTER
? 24 : 4;
27
electrodes
.reserve(nElectrodes);
28
for
(
unsigned
iElectrode=0; iElectrode<nElectrodes; ++iElectrode) {
29
electrodes
.push_back(
new
EMECHVElectrode
(modulePtr, iElectrode));
30
}
31
}
32
~Clockwork
()
33
{
34
auto
it=
electrodes
.begin();
35
auto
itend=
electrodes
.end();
36
for
(;it!=itend;++it) {
37
delete
*it;
38
}
39
}
40
41
const
EMECHVManager
*
manager
;
42
unsigned
int
iSide
;
43
unsigned
int
iEta
;
44
unsigned
int
iPhi
;
45
unsigned
int
iSector
;
46
std::vector<const EMECHVElectrode*>
electrodes
;
47
};
48
49
50
EMECHVModule::EMECHVModule
(
const
EMECHVManager
*manager
51
,
IOType
iWheel
52
,
unsigned
int
iSide
53
,
unsigned
int
iEta
54
,
unsigned
int
iPhi
55
,
unsigned
int
iSector)
56
:
m_c
(
std
::make_unique<
Clockwork
> (manager,this,iWheel,iSide,iEta,iPhi,iSector))
57
{
58
}
59
60
unsigned
int
EMECHVModule::getEtaIndex
()
const
61
{
62
return
m_c
->iEta;
63
}
64
65
unsigned
int
EMECHVModule::getPhiIndex
()
const
66
{
67
return
m_c
->iPhi;
68
}
69
70
unsigned
int
EMECHVModule::getNumElectrodes
()
const
71
{
72
IOType
IO=
m_c
->manager->getWheelIndex();
73
if
(IO==
OUTER
) {
74
return
24;
75
}
76
else
{
77
return
4;
78
}
79
}
80
81
const
EMECHVElectrode
&
EMECHVModule::getElectrode
(
unsigned
int
iElectrode)
const
82
{
83
return
*(
m_c
->electrodes[iElectrode]);
84
}
85
86
EMECHVModule::~EMECHVModule
() =
default
;
87
88
unsigned
int
EMECHVModule::getSideIndex
()
const
89
{
90
return
m_c
->iSide;
91
}
92
93
EMECHVModule::IOType
EMECHVModule::getWheelIndex
()
const
94
{
95
return
m_c
->manager->getWheelIndex();
96
}
97
98
unsigned
int
EMECHVModule::getSectorIndex
()
const
99
{
100
return
m_c
->iSector;
101
}
102
103
double
EMECHVModule::getEtaMin
()
const
104
{
105
if
(
m_c
->iSide==0) {
106
return
-
m_c
->manager->getDescriptor().getEtaBinning().binUpper(
m_c
->iEta);
107
}
108
else
{
109
return
m_c
->manager->getDescriptor().getEtaBinning().binLower(
m_c
->iEta);
110
}
111
}
112
113
double
EMECHVModule::getEtaMax
()
const
114
{
115
if
(
m_c
->iSide==0) {
116
return
-
m_c
->manager->getDescriptor().getEtaBinning().binLower(
m_c
->iEta);
117
}
118
else
{
119
return
m_c
->manager->getDescriptor().getEtaBinning().binUpper(
m_c
->iEta);
120
}
121
}
122
123
double
EMECHVModule::getPhiMin
()
const
124
{
125
return
126
m_c
->manager->getDescriptor().getPhiBinning().binLower(
m_c
->iPhi)+
127
m_c
->manager->getDescriptor().getSectorBinning().binLower(
m_c
->iSector);
128
}
129
130
double
EMECHVModule::getPhiMax
()
const
131
{
132
return
133
m_c
->manager->getDescriptor().getPhiBinning().binLower(
m_c
->iPhi)+
134
m_c
->manager->getDescriptor().getSectorBinning().binUpper(
m_c
->iSector);
135
}
136
137
const
EMECHVManager
&
EMECHVModule::getManager
()
const
138
{
139
return
*(
m_c
->manager);
140
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
EMECHVDescriptor.h
EMECHVElectrode.h
EMECHVManager.h
EMECHVModule.h
EMECHVElectrode
Definition
EMECHVElectrode.h:15
EMECHVManager
This class provides direct access to information on the HV electrodes within the EMEC.
Definition
EMECHVManager.h:36
EMECHVModule::Clockwork
Definition
EMECHVModule.cxx:11
EMECHVModule::Clockwork::electrodes
std::vector< const EMECHVElectrode * > electrodes
Definition
EMECHVModule.cxx:46
EMECHVModule::Clockwork::~Clockwork
~Clockwork()
Definition
EMECHVModule.cxx:32
EMECHVModule::Clockwork::iEta
unsigned int iEta
Definition
EMECHVModule.cxx:43
EMECHVModule::Clockwork::manager
const EMECHVManager * manager
Definition
EMECHVModule.cxx:41
EMECHVModule::Clockwork::iPhi
unsigned int iPhi
Definition
EMECHVModule.cxx:44
EMECHVModule::Clockwork::iSide
unsigned int iSide
Definition
EMECHVModule.cxx:42
EMECHVModule::Clockwork::Clockwork
Clockwork(const EMECHVManager *managerPtr, const EMECHVModule *modulePtr, IOType iWheel, unsigned int side, unsigned int eta, unsigned int phi, unsigned int sector)
Definition
EMECHVModule.cxx:13
EMECHVModule::Clockwork::iSector
unsigned int iSector
Definition
EMECHVModule.cxx:45
EMECHVModule::getEtaMax
double getEtaMax() const
Definition
EMECHVModule.cxx:113
EMECHVModule::getElectrode
const EMECHVElectrode & getElectrode(unsigned int iElectrode) const
Definition
EMECHVModule.cxx:81
EMECHVModule::m_c
std::unique_ptr< Clockwork > m_c
Definition
EMECHVModule.h:63
EMECHVModule::getNumElectrodes
unsigned int getNumElectrodes() const
Definition
EMECHVModule.cxx:70
EMECHVModule::getSideIndex
unsigned int getSideIndex() const
Definition
EMECHVModule.cxx:88
EMECHVModule::EMECHVModule
EMECHVModule(const EMECHVManager *manager, IOType iWheel, unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector)
Definition
EMECHVModule.cxx:50
EMECHVModule::getPhiMin
double getPhiMin() const
Definition
EMECHVModule.cxx:123
EMECHVModule::~EMECHVModule
~EMECHVModule()
EMECHVModule::getSectorIndex
unsigned int getSectorIndex() const
Definition
EMECHVModule.cxx:98
EMECHVModule::IOType
IOType
Definition
EMECHVModule.h:24
EMECHVModule::OUTER
@ OUTER
Definition
EMECHVModule.h:24
EMECHVModule::getEtaMin
double getEtaMin() const
Definition
EMECHVModule.cxx:103
EMECHVModule::getPhiMax
double getPhiMax() const
Definition
EMECHVModule.cxx:130
EMECHVModule::getPhiIndex
unsigned int getPhiIndex() const
Definition
EMECHVModule.cxx:65
EMECHVModule::getEtaIndex
unsigned int getEtaIndex() const
Definition
EMECHVModule.cxx:60
EMECHVModule::getWheelIndex
EMECHVModule::IOType getWheelIndex() const
Definition
EMECHVModule.cxx:93
EMECHVModule::getManager
const EMECHVManager & getManager() const
Definition
EMECHVModule.cxx:137
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0