ATLAS Offline Software
EMBHVModule.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "LArHV/EMBHVModule.h"
6 #include "LArHV/EMBHVManager.h"
8 #include "LArHV/EMBHVElectrode.h"
9 
11 public:
12  Clockwork(const EMBHVManager* managerPtr
13  , const EMBHVModule* modulePtr
14  , unsigned int side
15  , unsigned int eta
16  , unsigned int phi
17  , unsigned int sector)
18  : manager(managerPtr)
19  , iSide(side)
20  , iEta(eta)
21  , iPhi(phi)
22  , iSector(sector) {
23  for(int i=0; i<64; ++i) {
24  electrodes[i] = new EMBHVElectrode(modulePtr,i);
25  }
26  }
28  for(int i=0; i<64; ++i) {
29  delete electrodes[i];
30  }
31  }
33  unsigned int iSide;
34  unsigned int iEta;
35  unsigned int iPhi;
36  unsigned int iSector;
37  const EMBHVElectrode* electrodes[64]{};
38 };
39 
41  , unsigned int iSide
42  , unsigned int iEta
43  , unsigned int iPhi
44  , unsigned int iSector)
45  : m_c(new Clockwork(manager,this,iSide,iEta,iPhi,iSector))
46 {
47 }
48 
49 unsigned int EMBHVModule::getEtaIndex() const
50 {
51  return m_c->iEta;
52 }
53 
54 unsigned int EMBHVModule::getPhiIndex() const
55 {
56  return m_c->iPhi;
57 }
58 
59 unsigned int EMBHVModule::getSectorIndex() const
60 {
61  return m_c->iSector;
62 }
63 
65 {
66  delete m_c;
67 }
68 
69 const EMBHVElectrode& EMBHVModule::getElectrode(unsigned int iElectrode) const
70 {
71  return *(m_c->electrodes[iElectrode]);
72 }
73 
74 unsigned int EMBHVModule::getSideIndex() const
75 {
76  return m_c->iSide;
77 }
78 
79 double EMBHVModule::getEtaMin() const
80 {
81  if (m_c->iSide==0) {
82  return -m_c->manager->getDescriptor().getEtaBinning().binUpper(m_c->iEta);
83  }
84  else {
85  return m_c->manager->getDescriptor().getEtaBinning().binLower(m_c->iEta);
86  }
87 }
88 
89 double EMBHVModule::getEtaMax() const
90 {
91  if (m_c->iSide==0) {
92  return -m_c->manager->getDescriptor().getEtaBinning().binLower(m_c->iEta);
93  }
94  else {
95  return m_c->manager->getDescriptor().getEtaBinning().binUpper(m_c->iEta);
96  }
97 }
98 
99 double EMBHVModule::getPhiMin() const
100 {
101  return
102  m_c->manager->getDescriptor().getPhiBinning().binLower(m_c->iPhi)+
103  m_c->iSector*m_c->manager->getDescriptor().getPhiBinning().getDelta()/2.0;
104 }
105 
107 {
108  return
109  m_c->manager->getDescriptor().getPhiBinning().binLower(m_c->iPhi)+
110  (m_c->iSector+1)*m_c->manager->getDescriptor().getPhiBinning().getDelta()/2.0;
111 
112 }
113 
115  return *(m_c->manager);
116 }
117 
EMBHVElectrode
Definition: EMBHVElectrode.h:15
EMBHVModule::Clockwork::Clockwork
Clockwork(const EMBHVManager *managerPtr, const EMBHVModule *modulePtr, unsigned int side, unsigned int eta, unsigned int phi, unsigned int sector)
Definition: EMBHVModule.cxx:12
EMBHVModule::getEtaIndex
unsigned int getEtaIndex() const
Definition: EMBHVModule.cxx:49
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
EMBHVModule::getEtaMax
double getEtaMax() const
Definition: EMBHVModule.cxx:89
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
EMBHVModule::Clockwork
Definition: EMBHVModule.cxx:10
EMBHVModule::getPhiMax
double getPhiMax() const
Definition: EMBHVModule.cxx:106
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
EMBHVModule::getSectorIndex
unsigned int getSectorIndex() const
Definition: EMBHVModule.cxx:59
EMBHVModule::Clockwork::iPhi
unsigned int iPhi
Definition: EMBHVModule.cxx:35
EMBHVModule::EMBHVModule
EMBHVModule(const EMBHVManager *manager, unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector)
Definition: EMBHVModule.cxx:40
EMBHVElectrode.h
TRT::Hit::side
@ side
Definition: HitInfo.h:83
EMBHVManager::getDescriptor
const EMBHVDescriptor & getDescriptor() const
Definition: EMBHVManager.cxx:169
EMBHVModule::~EMBHVModule
~EMBHVModule()
Definition: EMBHVModule.cxx:64
EMBHVModule::getManager
const EMBHVManager & getManager() const
Definition: EMBHVModule.cxx:114
lumiFormat.i
int i
Definition: lumiFormat.py:92
EMBHVModule::Clockwork::iEta
unsigned int iEta
Definition: EMBHVModule.cxx:34
EMBHVModule::getEtaMin
double getEtaMin() const
Definition: EMBHVModule.cxx:79
EMBHVModule::Clockwork::iSector
unsigned int iSector
Definition: EMBHVModule.cxx:36
EMBHVModule::getPhiMin
double getPhiMin() const
Definition: EMBHVModule.cxx:99
EMBHVModule::m_c
Clockwork * m_c
Definition: EMBHVModule.h:54
EMBHVModule::Clockwork::~Clockwork
~Clockwork()
Definition: EMBHVModule.cxx:27
EMBHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: EMBHVManager.h:36
EMBHVModule::Clockwork::electrodes
const EMBHVElectrode * electrodes[64]
Definition: EMBHVModule.cxx:37
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:53
EMBHVModule::getSideIndex
unsigned int getSideIndex() const
Definition: EMBHVModule.cxx:74
EMBHVDescriptor::getEtaBinning
const CellBinning & getEtaBinning() const
Definition: EMBHVDescriptor.h:16
EMBHVDescriptor.h
EMBHVModule::getPhiIndex
unsigned int getPhiIndex() const
Definition: EMBHVModule.cxx:54
EMBHVModule::getElectrode
const EMBHVElectrode & getElectrode(unsigned int iElectrode) const
Definition: EMBHVModule.cxx:69
python.Logging.manager
manager
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/Logging.py:92
EMBHVModule
Describes one HV Module within the EMB.
Definition: EMBHVModule.h:20
EMBHVDescriptor::getPhiBinning
const CellBinning & getPhiBinning() const
Definition: EMBHVDescriptor.h:21
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:74
EMBHVModule::Clockwork::iSide
unsigned int iSide
Definition: EMBHVModule.cxx:33
EMBHVModule::Clockwork::manager
const EMBHVManager * manager
Definition: EMBHVModule.cxx:32
EMBHVModule.h
EMBHVManager.h