ATLAS Offline Software
EMBHVElectrode.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "LArHV/EMBHVElectrode.h"
6 #include "LArHV/EMBHVManager.h"
7 #include "LArHV/EMBHVModule.h"
8 #include <cmath>
9 
10 #include "EMBHVPayload.h"
11 
13 public:
14  Clockwork(const EMBHVModule* modulePtr, unsigned int electrode)
15  : module(modulePtr)
16  , iElectrode(electrode)
17  {}
19  unsigned int iElectrode;
20 };
21 
22 EMBHVElectrode::EMBHVElectrode(const EMBHVModule* module, unsigned int iElectrode)
23  : m_c(new Clockwork(module,iElectrode))
24 {
25 }
26 
28 {
29  delete m_c;
30 }
31 
33 {
34  return *(m_c->module);
35 }
36 
37 double EMBHVElectrode::getPhi() const
38 {
39  return m_c->module->getPhiMin()+m_c->iElectrode*2.0*M_PI/1024.0;
40 }
41 
42 #if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE))
43 int EMBHVElectrode::hvLineNo(int iGap, const LArHVIdMapping* hvIdMapping) const {
44  return m_c->module->getManager().hvLineNo(*this, iGap, hvIdMapping);
45 }
46 #endif
47 
48 unsigned int EMBHVElectrode::getElectrodeIndex() const{
49  return m_c->iElectrode;
50 }
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
M_PI
#define M_PI
Definition: ActiveFraction.h:11
EMBHVElectrode::Clockwork::module
const EMBHVModule * module
Definition: EMBHVElectrode.cxx:18
EMBHVElectrode.h
python.PyAthena.module
module
Definition: PyAthena.py:134
EMBHVModule::getManager
const EMBHVManager & getManager() const
Definition: EMBHVModule.cxx:114
EMBHVElectrode::hvLineNo
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
Definition: EMBHVElectrode.cxx:43
EMBHVElectrode::getElectrodeIndex
unsigned int getElectrodeIndex() const
Definition: EMBHVElectrode.cxx:48
EMBHVElectrode::Clockwork
Definition: EMBHVElectrode.cxx:12
EMBHVElectrode::Clockwork::iElectrode
unsigned int iElectrode
Definition: EMBHVElectrode.cxx:19
EMBHVModule::getPhiMin
double getPhiMin() const
Definition: EMBHVModule.cxx:99
EMBHVElectrode::getModule
const EMBHVModule & getModule() const
Definition: EMBHVElectrode.cxx:32
EMBHVElectrode::EMBHVElectrode
EMBHVElectrode(const EMBHVModule *module, unsigned int iElectrode)
Definition: EMBHVElectrode.cxx:22
EMBHVElectrode::m_c
Clockwork * m_c
Definition: EMBHVElectrode.h:37
EMBHVManager::hvLineNo
int hvLineNo(const EMBHVElectrode &electrode, int gap, const LArHVIdMapping *hvIdMapping) const
Definition: EMBHVManager.cxx:351
LArHVIdMapping
Definition: LArHVIdMapping.h:21
EMBHVElectrode::getPhi
double getPhi() const
Definition: EMBHVElectrode.cxx:37
EMBHVElectrode::~EMBHVElectrode
~EMBHVElectrode()
Definition: EMBHVElectrode.cxx:27
EMBHVPayload.h
EMBHVModule
Describes one HV Module within the EMB.
Definition: EMBHVModule.h:20
EMBHVModule.h
EMBHVManager.h
EMBHVElectrode::Clockwork::Clockwork
Clockwork(const EMBHVModule *modulePtr, unsigned int electrode)
Definition: EMBHVElectrode.cxx:14