ATLAS Offline Software
Loading...
Searching...
No Matches
FCALDetectorManager.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "GaudiKernel/Bootstrap.h"
6#include "GaudiKernel/ISvcLocator.h"
9#include "LArReadoutGeometry/FCAL_ChannelMap.h"
10#include "LArHV/LArHVManager.h"
11
13 : GeoVDetectorManager()
14 , m_HVManager(hvManager)
15{
16 setName("LArFCAL");
17 for (int s=0;s<2;s++) {
18 for (int m=0;m<3;m++) {
19 m_Module[s][m]=nullptr;
20 }
21 }
22
23 SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service("DetectorStore")};
24 if (!detStore.isValid()) {
25 throw std::runtime_error("Error in FCALDetectorManager: cannot access DetectorStore");
26 }
27
28 const FCAL_ChannelMap *cMap;
29 if (detStore->retrieve(cMap)==StatusCode::FAILURE) {
30 throw std::runtime_error("You must construct the GeoModel FCAL before instantiating FCALDetectorManager");
31 }
32
34
35}
36
37
39{
40 for (int s=0;s<2;s++) {
41 for (int m=0;m<3;m++) {
42 delete m_Module[s][m];
43 }
44 }
45}
46
47
48
53
58
60{
61 return m_Module[endcap][module-1];
62}
63
65{
66 return m_treeTop.size();
67}
68
69PVConstLink FCALDetectorManager::getTreeTop (unsigned int i) const
70{
71 return m_treeTop[i];
72}
73
75{
76 int mod = fcalModule->getModuleIndex()-1;
77 int side = fcalModule->getEndcapIndex();
78 m_Module[side][mod]=fcalModule;
79 m_DetList.push_back(fcalModule);
80 fcalModule->setManager(this);
81}
82
83void FCALDetectorManager::addTreeTop (const PVLink& treeTop)
84{
85 m_treeTop.push_back(treeTop);
86}
87
92
93
void addModule(FCALModule *fcalModule)
Adds an FCAL Module.
ModulePtr m_Module[2][3]
This is the array in which three modules in two sides are kept.
FCALDetectorManager(const FCALHVManager *hvManager=nullptr)
Constructor.
std::vector< constFCALModule * >::const_iterator ConstIterator
std::vector< PVLink > m_treeTop
This is the set of tree tops managed by this detector node.
virtual ~FCALDetectorManager() override
Desctructor.
const FCAL_ChannelMap * m_fcal_channel_map
FCALDetectorManager::ConstIterator beginFCAL() const
Iterate over FCAL Modules.
std::vector< const FCALModule * > m_DetList
Vector of FCAL Modules.
FCALDetectorManager::ConstIterator endFCAL() const
Iterate over FCAL Modules.
void addTreeTop(const PVLink &treeTop)
Add a Tree Top.
const FCALModule * getFCAL(FCALModule::Module module, FCALModule::Endcap endcap) const
Retreive a specific FCAL Module.
const FCALHVManager & getHVManager() const
Get the HV Manager:
virtual unsigned int getNumTreeTops() const override
Gets the number of tree tops.
const FCALHVManager * m_HVManager
virtual PVConstLink getTreeTop(unsigned int i) const override
Gets the ith tree top.
This class provides direct access to information on the HV electrodes within the barrels.
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive)
void setManager(FCALDetectorManager *fcalManager)
Sets the manager.
FCALModule::Module getModuleIndex() const
Returns the Module (1,2, or 3)
This class contains the tube and tile maps for the FCAL A tile is of a set of FCAL tubes.