ATLAS Offline Software
Loading...
Searching...
No Matches
HECCell.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
7#include "LArHV/HECHVModule.h"
9
11= default;
12
13
14unsigned int HECCell::getNumSubgaps() const {
15 return getSubgaps().size();
16}
17
18const HECHVSubgap& HECCell::getSubgap (unsigned int i) const {
19 return *getSubgaps()[i];
20}
21
22
23const std::vector<const HECHVSubgap*>&
25{
26 if (!m_subgaps.isValid()) {
27 std::vector<const HECHVSubgap*> subgaps;
28 initHV (subgaps);
29 m_subgaps.set (std::move (subgaps));
30 }
31 return *m_subgaps.ptr();
32}
33
34
35void HECCell::initHV (std::vector<const HECHVSubgap*>& subgaps) const
36{
37 const HECHVManager& hvManager=getDescriptor()->getManager()->getHVManager();
38
39
40 unsigned int iSide=getEndcapIndex();
41
42 double phiUpper = getPhiMaxNominal();
43 double phiLower = getPhiMinNominal();
44 double phi=fabs(phiUpper+phiLower)/2.0;
45 const CellBinning & phiBinning=hvManager.getDescriptor().getPhiBinning();
46 unsigned int iPhi = int((phi - phiBinning.getStart())/phiBinning.getDelta()) + phiBinning.getFirstDivisionNumber();
47
48 unsigned int iSampling=getSamplingIndex();
49
50 const HECHVModule& hvMod = hvManager.getHVModule(iSide,iPhi,iSampling);
51 for (unsigned int iSubgap=0;iSubgap<4;iSubgap++) {
52 const HECHVSubgap& hvElec = hvMod.getSubgap(iSubgap);
53 subgaps.push_back(&hvElec);
54 }
55}
56
57
Scalar phi() const
phi method
double getPhiMaxNominal() const
returns a nominal phi max in global coords; assume canonical placement
Definition HECCell.h:392
double getPhiMinNominal() const
returns a nominal phi min in global coords; assume canonical placement
Definition HECCell.h:387
unsigned int getSamplingIndex() const
The sampling index of this cell.
Definition HECCell.h:248
const std::vector< const HECHVSubgap * > & getSubgaps() const
Definition HECCell.cxx:24
unsigned int getEndcapIndex() const
The EndcapIndex of this Cell (0=negative, 1=positive)
Definition HECCell.h:233
virtual ~HECCell()
const HECDetDescr * getDescriptor() const
Returns a pointer to the descriptor.
Definition HECCell.h:372
CxxUtils::CachedValue< std::vector< const HECHVSubgap * > > m_subgaps
Cache of subgaps.
Definition HECCell.h:197
const HECHVSubgap & getSubgap(unsigned int i) const
@Get subgap
Definition HECCell.cxx:18
void initHV(std::vector< const HECHVSubgap * > &subgaps) const
Definition HECCell.cxx:35
unsigned int getNumSubgaps() const
@Get num subgaps
Definition HECCell.cxx:14
const HECDetectorManager * getManager() const
The manager.
const HECHVManager & getHVManager() const
Get the HV Manager.
const CellBinning & getPhiBinning() const
This class provides direct access to information on the HV electrodes within the barrels.
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
const HECHVDescriptor & getDescriptor() const
Describes one HV Module within the HEC.
Definition HECHVModule.h:21
const HECHVSubgap & getSubgap(unsigned int iElectrode) const