ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArGeoModel
LArReadoutGeometry
src
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"
7
#include "
StoreGate/StoreGateSvc.h
"
8
#include "
LArReadoutGeometry/FCALDetectorManager.h
"
9
#include "LArReadoutGeometry/FCAL_ChannelMap.h"
10
#include "
LArHV/LArHVManager.h
"
11
12
FCALDetectorManager::FCALDetectorManager
(
const
FCALHVManager
* hvManager)
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
33
m_fcal_channel_map
=cMap;
34
35
}
36
37
38
FCALDetectorManager::~FCALDetectorManager
()
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
49
FCALDetectorManager::ConstIterator
FCALDetectorManager::beginFCAL
()
const
50
{
51
return
m_DetList
.begin();
52
}
53
54
FCALDetectorManager::ConstIterator
FCALDetectorManager::endFCAL
()
const
55
{
56
return
m_DetList
.end();
57
}
58
59
const
FCALModule
*
FCALDetectorManager::getFCAL
(
FCALModule::Module
module,
FCALModule::Endcap
endcap)
const
60
{
61
return
m_Module
[endcap][module-1];
62
}
63
64
unsigned
int
FCALDetectorManager::getNumTreeTops
()
const
65
{
66
return
m_treeTop
.size();
67
}
68
69
PVConstLink
FCALDetectorManager::getTreeTop
(
unsigned
int
i)
const
70
{
71
return
m_treeTop
[i];
72
}
73
74
void
FCALDetectorManager::addModule
(
FCALModule
* fcalModule)
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
83
void
FCALDetectorManager::addTreeTop
(
const
PVLink& treeTop)
84
{
85
m_treeTop
.push_back(treeTop);
86
}
87
88
const
FCALHVManager
&
FCALDetectorManager::getHVManager
()
const
89
{
90
return
*
m_HVManager
;
91
}
92
93
FCALDetectorManager.h
LArHVManager.h
StoreGateSvc.h
FCALDetectorManager::addModule
void addModule(FCALModule *fcalModule)
Adds an FCAL Module.
Definition
FCALDetectorManager.cxx:74
FCALDetectorManager::m_Module
ModulePtr m_Module[2][3]
This is the array in which three modules in two sides are kept.
Definition
FCALDetectorManager.h:109
FCALDetectorManager::FCALDetectorManager
FCALDetectorManager(const FCALHVManager *hvManager=nullptr)
Constructor.
Definition
FCALDetectorManager.cxx:12
FCALDetectorManager::ConstIterator
std::vector< constFCALModule * >::const_iterator ConstIterator
Definition
FCALDetectorManager.h:34
FCALDetectorManager::m_treeTop
std::vector< PVLink > m_treeTop
This is the set of tree tops managed by this detector node.
Definition
FCALDetectorManager.h:103
FCALDetectorManager::~FCALDetectorManager
virtual ~FCALDetectorManager() override
Desctructor.
Definition
FCALDetectorManager.cxx:38
FCALDetectorManager::m_fcal_channel_map
const FCAL_ChannelMap * m_fcal_channel_map
Definition
FCALDetectorManager.h:117
FCALDetectorManager::beginFCAL
FCALDetectorManager::ConstIterator beginFCAL() const
Iterate over FCAL Modules.
Definition
FCALDetectorManager.cxx:49
FCALDetectorManager::m_DetList
std::vector< const FCALModule * > m_DetList
Vector of FCAL Modules.
Definition
FCALDetectorManager.h:115
FCALDetectorManager::endFCAL
FCALDetectorManager::ConstIterator endFCAL() const
Iterate over FCAL Modules.
Definition
FCALDetectorManager.cxx:54
FCALDetectorManager::addTreeTop
void addTreeTop(const PVLink &treeTop)
Add a Tree Top.
Definition
FCALDetectorManager.cxx:83
FCALDetectorManager::getFCAL
const FCALModule * getFCAL(FCALModule::Module module, FCALModule::Endcap endcap) const
Retreive a specific FCAL Module.
Definition
FCALDetectorManager.cxx:59
FCALDetectorManager::getHVManager
const FCALHVManager & getHVManager() const
Get the HV Manager:
Definition
FCALDetectorManager.cxx:88
FCALDetectorManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Gets the number of tree tops.
Definition
FCALDetectorManager.cxx:64
FCALDetectorManager::m_HVManager
const FCALHVManager * m_HVManager
Definition
FCALDetectorManager.h:119
FCALDetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Gets the ith tree top.
Definition
FCALDetectorManager.cxx:69
FCALHVManager
This class provides direct access to information on the HV electrodes within the barrels.
Definition
FCALHVManager.h:35
FCALModule
Definition
FCALModule.h:33
FCALModule::getEndcapIndex
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive).
Definition
FCALModule.cxx:69
FCALModule::Module
Module
Definition
FCALModule.h:37
FCALModule::setManager
void setManager(FCALDetectorManager *fcalManager)
Sets the manager.
Definition
FCALModule.cxx:110
FCALModule::getModuleIndex
FCALModule::Module getModuleIndex() const
Returns the Module (1,2, or 3).
Definition
FCALModule.cxx:74
FCALModule::Endcap
Endcap
Definition
FCALModule.h:38
FCAL_ChannelMap
This class contains the tube and tile maps for the FCAL A tile is of a set of FCAL tubes.
Definition
LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h:34
Generated on
for ATLAS Offline Software by
1.17.0