ATLAS Offline Software
EMBDetectorManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
10 #include "LArHV/LArHVManager.h"
11 
13 
14 public:
15 
16  inline bool operator () (const EMBDetectorRegion * a, const EMBDetectorRegion * b) const {
17  return a->getSamplingIndex() < b->getSamplingIndex();
18  }
19 
20 };
21 
23  , const EMBPresamplerHVManager& presamplerHVManager)
24  : m_basicReadoutNumbers (std::make_unique<EMBBasicReadoutNumbers>())
25  , m_hvManager(hvManager)
26  , m_presamplerHVManager(presamplerHVManager)
27 {
28  setName("LArEMB");
29 
30 
31  for (unsigned int r=0;r<2;r++) {
32  for (unsigned int s=0;s<4;s++) {
33  for (unsigned int e=0;e<2;e++) {
34  m_DetRegionsRandom[r][s][e]=nullptr;
35  }
36  }
37  }
38 }
39 
40 
42  for (unsigned int i=0;i<getNumDetectorRegions();i++) delete m_DetRegionsIterative[i];
43 }
44 
45 
46 
48 {
49  return m_DetRegionsIterative.begin();
50 }
51 
53 {
54  return m_DetRegionsIterative.end();
55 }
56 
57 const EMBDetectorRegion * EMBDetectorManager::getDetectorRegion (unsigned int endcap, unsigned int sampling, unsigned int region) const
58 {
59  return m_DetRegionsRandom[region][sampling][endcap];
60 }
61 
63 {
64  return m_DetRegionsIterative.size();
65 }
66 
67 PVConstLink EMBDetectorManager::getTreeTop (unsigned int i) const
68 {
69  return m_treeTop[i];
70 }
71 
73 {
74  return m_treeTop.size();
75 }
76 
78 {
79  m_DetRegionsIterative.push_back(region);
80  m_DetRegionsRandom[region->getRegionIndex()][region->getSamplingIndex()][region->getEndcapIndex()] = region;
81 
82 
83 
85  std::sort(m_DetRegionsIterative.begin(),m_DetRegionsIterative.end(), order);
86 
87 }
88 
89 void EMBDetectorManager::addTreeTop (const PVLink& treeTop)
90 {
91  m_treeTop.push_back(treeTop);
92 }
93 
95 {
96  return m_hvManager;
97 }
98 
99 
101 {
102  return m_presamplerHVManager;
103 }
EMBDetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Gets the ith tree top.
Definition: EMBDetectorManager.cxx:67
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:676
LArHVManager.h
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
OrderBySampling
Definition: EMBDetectorManager.cxx:12
EMBDetectorRegion.h
EMBBasicReadoutNumbers.h
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
EMBDetectorManager::m_hvManager
const EMBHVManager & m_hvManager
Definition: EMBDetectorManager.h:135
EMBDetectorManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Gets the total number of tree tops.
Definition: EMBDetectorManager.cxx:72
EMBDetectorRegion::getSamplingIndex
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
Definition: EMBDetectorRegion.h:119
EMBDetDescr.h
EMBDetectorManager::m_treeTop
std::vector< PVLink > m_treeTop
This is the set of tree tops managed by this detector node.
Definition: EMBDetectorManager.h:120
EMBDetectorManager::getHVManager
const EMBHVManager & getHVManager() const
Get the HV Manager.
Definition: EMBDetectorManager.cxx:94
EMBPresamplerHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: EMBPresamplerHVManager.h:37
OrderBySampling::operator()
bool operator()(const EMBDetectorRegion *a, const EMBDetectorRegion *b) const
Definition: EMBDetectorManager.cxx:16
lumiFormat.i
int i
Definition: lumiFormat.py:85
mc.order
order
Configure Herwig7.
Definition: mc.Herwig7_Dijet.py:12
EMBDetectorManager::addDetectorRegion
void addDetectorRegion(const EMBDetectorRegion *region)
Add a new Detector Region.
Definition: EMBDetectorManager.cxx:77
EMBDetectorManager::EMBDetectorManager
EMBDetectorManager(const EMBHVManager &hvManager, const EMBPresamplerHVManager &presamplerHVManager)
Constructor.
Definition: EMBDetectorManager.cxx:22
EMBDetectorManager::beginDetectorRegion
EMBDetectorManager::DetectorRegionConstIterator beginDetectorRegion() const
Iterate over detector regions.
Definition: EMBDetectorManager.cxx:47
EMBDetectorManager::m_DetRegionsRandom
EMBDetRegionArray m_DetRegionsRandom
A vector of Region pointers which exists in order to provide iterative access to any EMBDetectorRegio...
Definition: EMBDetectorManager.h:132
EMBDetectorManager::~EMBDetectorManager
virtual ~EMBDetectorManager() override
Destructor.
Definition: EMBDetectorManager.cxx:41
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
EMBDetectorRegion::getEndcapIndex
EMBDetectorRegion::DetectorSide getEndcapIndex() const
The endcap index.
Definition: EMBDetectorRegion.h:163
EMBHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: EMBHVManager.h:36
EMBDetectorManager::getPresamplerHVManager
const EMBPresamplerHVManager & getPresamplerHVManager() const
Get the HV Manager (Presampler)
Definition: EMBDetectorManager.cxx:100
EMBDetectorRegion::getRegionIndex
unsigned int getRegionIndex() const
Returns the Region Index.
Definition: EMBDetectorRegion.h:126
a
TList * a
Definition: liststreamerinfos.cxx:10
EMBDetectorManager::m_DetRegionsIterative
std::vector< const EMBDetectorRegion * > m_DetRegionsIterative
A vector of Region pointers which exists in order to provide iterative access to any EMBDetectorRegio...
Definition: EMBDetectorManager.h:126
EMBDetectorManager::m_presamplerHVManager
const EMBPresamplerHVManager & m_presamplerHVManager
Definition: EMBDetectorManager.h:136
EMBDetectorManager::addTreeTop
void addTreeTop(const PVLink &treeTop)
Add a Tree Top.
Definition: EMBDetectorManager.cxx:89
EMBDetectorManager::DetectorRegionConstIterator
std::vector< const EMBDetectorRegion * >::const_iterator DetectorRegionConstIterator
Definition: EMBDetectorManager.h:35
EMBBasicReadoutNumbers
This is a collection of numbers used to create the cell shapes.
Definition: EMBBasicReadoutNumbers.h:13
EMBDetectorManager::getDetectorRegion
const EMBDetectorRegion * getDetectorRegion(unsigned int endcap, unsigned int sampling, unsigned int region) const
Random Access to detector regions.
Definition: EMBDetectorManager.cxx:57
EMBDetectorManager::getNumDetectorRegions
unsigned int getNumDetectorRegions() const
Gets the number of detectors in the set of detector regions.
Definition: EMBDetectorManager.cxx:62
EMBDetectorRegion
Definition: EMBDetectorRegion.h:28
EMBDetectorManager::endDetectorRegion
EMBDetectorManager::DetectorRegionConstIterator endDetectorRegion() const
Iterate over detector regions.
Definition: EMBDetectorManager.cxx:52
EMBDetectorManager.h