ATLAS Offline Software
Loading...
Searching...
No Matches
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
9#include <iostream>
10
12public:
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 }
33 {
34 auto it=electrodes.begin();
35 auto itend=electrodes.end();
36 for(;it!=itend;++it) {
37 delete *it;
38 }
39 }
40
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
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
60unsigned int EMECHVModule::getEtaIndex() const
61{
62 return m_c->iEta;
63}
64
65unsigned int EMECHVModule::getPhiIndex() const
66{
67 return m_c->iPhi;
68}
69
71{
72 IOType IO=m_c->manager->getWheelIndex();
73 if (IO==OUTER) {
74 return 24;
75 }
76 else {
77 return 4;
78 }
79}
80
81const EMECHVElectrode& EMECHVModule::getElectrode(unsigned int iElectrode) const
82{
83 return *(m_c->electrodes[iElectrode]);
84}
85
87
88unsigned int EMECHVModule::getSideIndex() const
89{
90 return m_c->iSide;
91}
92
94{
95 return m_c->manager->getWheelIndex();
96}
97
98unsigned int EMECHVModule::getSectorIndex() const
99{
100 return m_c->iSector;
101}
102
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
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
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
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
138{
139 return *(m_c->manager);
140}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
This class provides direct access to information on the HV electrodes within the EMEC.
std::vector< const EMECHVElectrode * > electrodes
const EMECHVManager * manager
Clockwork(const EMECHVManager *managerPtr, const EMECHVModule *modulePtr, IOType iWheel, unsigned int side, unsigned int eta, unsigned int phi, unsigned int sector)
double getEtaMax() const
const EMECHVElectrode & getElectrode(unsigned int iElectrode) const
std::unique_ptr< Clockwork > m_c
unsigned int getNumElectrodes() const
unsigned int getSideIndex() const
EMECHVModule(const EMECHVManager *manager, IOType iWheel, unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector)
double getPhiMin() const
unsigned int getSectorIndex() const
double getEtaMin() const
double getPhiMax() const
unsigned int getPhiIndex() const
unsigned int getEtaIndex() const
EMECHVModule::IOType getWheelIndex() const
const EMECHVManager & getManager() const
STL namespace.