ATLAS Offline Software
Loading...
Searching...
No Matches
EMECHVModule.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 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(new 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{
88 delete m_c;
89}
90
91unsigned int EMECHVModule::getSideIndex() const
92{
93 return m_c->iSide;
94}
95
97{
98 return m_c->manager->getWheelIndex();
99}
100
102{
103 return m_c->iSector;
104}
105
107{
108 if (m_c->iSide==0) {
109 return -m_c->manager->getDescriptor().getEtaBinning().binUpper(m_c->iEta);
110 }
111 else {
112 return m_c->manager->getDescriptor().getEtaBinning().binLower(m_c->iEta);
113 }
114}
115
117{
118 if (m_c->iSide==0) {
119 return -m_c->manager->getDescriptor().getEtaBinning().binLower(m_c->iEta);
120 }
121 else {
122 return m_c->manager->getDescriptor().getEtaBinning().binUpper(m_c->iEta);
123 }
124}
125
127{
128 return
129 m_c->manager->getDescriptor().getPhiBinning().binLower(m_c->iPhi)+
130 m_c->manager->getDescriptor().getSectorBinning().binLower(m_c->iSector);
131}
132
134{
135 return
136 m_c->manager->getDescriptor().getPhiBinning().binLower(m_c->iPhi)+
137 m_c->manager->getDescriptor().getSectorBinning().binUpper(m_c->iSector);
138}
139
141{
142 return *(m_c->manager);
143}
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
unsigned int getNumElectrodes() const
Clockwork * m_c
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