ATLAS Offline Software
Loading...
Searching...
No Matches
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
14public:
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)
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
51
56
57const 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
67PVConstLink 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
84 OrderBySampling order;
86
87}
88
89void EMBDetectorManager::addTreeTop (const PVLink& treeTop)
90{
91 m_treeTop.push_back(treeTop);
92}
93
98
99
static Double_t a
This is a collection of numbers used to create the cell shapes.
unsigned int getNumDetectorRegions() const
Gets the number of detectors in the set of detector regions.
const EMBPresamplerHVManager & getPresamplerHVManager() const
Get the HV Manager (Presampler)
EMBDetectorManager::DetectorRegionConstIterator beginDetectorRegion() const
Iterate over detector regions.
const EMBPresamplerHVManager & m_presamplerHVManager
const EMBHVManager & getHVManager() const
Get the HV Manager.
EMBDetRegionArray m_DetRegionsRandom
A vector of Region pointers which exists in order to provide iterative access to any EMBDetectorRegio...
std::vector< const EMBDetectorRegion * > m_DetRegionsIterative
A vector of Region pointers which exists in order to provide iterative access to any EMBDetectorRegio...
virtual ~EMBDetectorManager() override
Destructor.
void addTreeTop(const PVLink &treeTop)
Add a Tree Top.
virtual unsigned int getNumTreeTops() const override
Gets the total number of tree tops.
const EMBHVManager & m_hvManager
std::vector< constEMBDetectorRegion * >::const_iterator DetectorRegionConstIterator
EMBDetectorManager::DetectorRegionConstIterator endDetectorRegion() const
Iterate over detector regions.
void addDetectorRegion(const EMBDetectorRegion *region)
Add a new Detector Region.
const EMBDetectorRegion * getDetectorRegion(unsigned int endcap, unsigned int sampling, unsigned int region) const
Random Access to detector regions.
std::unique_ptr< const EMBBasicReadoutNumbers > m_basicReadoutNumbers
virtual PVConstLink getTreeTop(unsigned int i) const override
Gets the ith tree top.
std::vector< PVLink > m_treeTop
This is the set of tree tops managed by this detector node.
EMBDetectorManager(const EMBHVManager &hvManager, const EMBPresamplerHVManager &presamplerHVManager)
Constructor.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
EMBDetectorRegion::DetectorSide getEndcapIndex() const
The endcap index.
unsigned int getRegionIndex() const
Returns the Region Index.
This class provides direct access to information on the HV electrodes within the barrels.
This class provides direct access to information on the HV electrodes within the barrels.
bool operator()(const EMBDetectorRegion *a, const EMBDetectorRegion *b) const
int r
Definition globals.cxx:22
STL namespace.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.