ATLAS Offline Software
EMECHVElectrode.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "LArHV/EMECHVModule.h"
7 #include "LArHV/EMECHVManager.h"
8 #include <cmath>
9 
10 #include "EMECHVPayload.h"
11 
13 public:
14  Clockwork(const EMECHVModule* modulePtr, unsigned int electrode)
15  : module(modulePtr)
16  , iElectrode(electrode)
17  {}
19  unsigned int iElectrode;
20 };
21 
22 EMECHVElectrode::EMECHVElectrode(const EMECHVModule* module, unsigned int iElectrode)
23  : m_c(new Clockwork(module,iElectrode))
24 {
25 }
26 
28 {
29  return m_c->iElectrode;
30 }
31 
33 {
34  delete m_c;
35 }
36 
38 {
39  return *(m_c->module);
40 }
41 
43 {
44  double N= m_c->module->getWheelIndex()==EMECHVModule::OUTER ? 768:256;
45  return m_c->module->getPhiMin()+m_c->iElectrode*2.0*M_PI/N;
46 }
47 
48 #if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE))
49 int EMECHVElectrode::hvLineNo(int iGap, const LArHVIdMapping* hvIdMapping) const {
50  return m_c->module->getManager().hvLineNo(*this, iGap, hvIdMapping);
51 }
52 #endif
EMECHVElectrode.h
EMECHVModule::getWheelIndex
EMECHVModule::IOType getWheelIndex() const
Definition: EMECHVModule.cxx:96
EMECHVModule::getManager
const EMECHVManager & getManager() const
Definition: EMECHVModule.cxx:140
EMECHVElectrode::m_c
Clockwork * m_c
Definition: EMECHVElectrode.h:37
EMECHVPayload.h
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
EMECHVElectrode::getPhi
double getPhi() const
Definition: EMECHVElectrode.cxx:42
EMECHVManager.h
M_PI
#define M_PI
Definition: ActiveFraction.h:11
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
EMECHVElectrode::Clockwork::Clockwork
Clockwork(const EMECHVModule *modulePtr, unsigned int electrode)
Definition: EMECHVElectrode.cxx:14
EMECHVModule::getPhiMin
double getPhiMin() const
Definition: EMECHVModule.cxx:126
EMECHVModule
Definition: EMECHVModule.h:20
python.PyAthena.module
module
Definition: PyAthena.py:134
EMECHVElectrode::Clockwork::iElectrode
unsigned int iElectrode
Definition: EMECHVElectrode.cxx:19
EMECHVElectrode::~EMECHVElectrode
~EMECHVElectrode()
Definition: EMECHVElectrode.cxx:32
EMECHVElectrode::Clockwork::module
const EMECHVModule * module
Definition: EMECHVElectrode.cxx:18
EMECHVElectrode::getModule
const EMECHVModule & getModule() const
Definition: EMECHVElectrode.cxx:37
EMECHVModule::OUTER
@ OUTER
Definition: EMECHVModule.h:22
LArHVIdMapping
Definition: LArHVIdMapping.h:21
EMECHVElectrode::getElectrodeIndex
unsigned int getElectrodeIndex() const
Definition: EMECHVElectrode.cxx:27
EMECHVManager::hvLineNo
int hvLineNo(const EMECHVElectrode &electrode, int gap, const LArHVIdMapping *hvIdMapping) const
Definition: EMECHVManager.cxx:396
EMECHVModule.h
EMECHVElectrode::EMECHVElectrode
EMECHVElectrode(const EMECHVModule *module, unsigned int iElectrode)
Definition: EMECHVElectrode.cxx:22
EMECHVElectrode::Clockwork
Definition: EMECHVElectrode.cxx:12
EMECHVElectrode::hvLineNo
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
Definition: EMECHVElectrode.cxx:49