|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #include "GaudiKernel/MsgStream.h"
6 #include "GaudiKernel/Bootstrap.h"
7 #include "GaudiKernel/SystemOfUnits.h"
8 #include "GaudiKernel/ServiceHandle.h"
28 , m_presamplerHVManager(presamplerHVManager)
32 for (
unsigned int r=0;
r<6;
r++) {
33 for (
unsigned int s=0;
s<4;
s++) {
34 for (
unsigned int io=0;io<2;io++) {
35 for (
unsigned int e=0;
e<2;
e++) {
46 ISvcLocator *svcLocator = Gaudi::svcLocator();
48 SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
49 if(!geoModel.isValid())
50 throw std::runtime_error(
"Error in EMECDetectorManager, cannot access GeoModelSvc");
52 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service(
"GeoDbTagSvc")};
53 if(!geoDbTagSvc.isValid())
54 throw std::runtime_error(
"Error in EMECDetectorManager, cannot access GeoDbTagSvc");
56 SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service(geoDbTagSvc->getParamSvcName())};
57 if(!rdbAccess.isValid())
58 throw std::runtime_error(
"Error in EMECDetectorManager, cannot access RDBAccessSvc");
60 std::string larKey, larNode;
61 if(geoDbTagSvc->getSqliteReader()==
nullptr) {
63 larKey = larVersionKey.
tag();
64 larNode = larVersionKey.
node();
67 IRDBRecordset_ptr emecSamplingSep = rdbAccess->getRecordsetPtr(
"EmecSamplingSep", larKey, larNode);
68 if (emecSamplingSep->size()==0)
throw std::runtime_error(
"Error getting EmecSamplingSep table");
75 IRDBRecordset_ptr emecMagicNumbers = rdbAccess->getRecordsetPtr(
"EmecMagicNumbers", larKey, larNode);
76 if (emecMagicNumbers->size()==0) {
77 emecMagicNumbers = rdbAccess->getRecordsetPtr(
"EmecMagicNumbers",
"EmecMagicNumbers-00");
78 if (emecMagicNumbers->size()==0) {
79 throw std::runtime_error(
"Error getting EmecMagicNumbers table");
152 throw std::runtime_error (
"EMECDetectorManager::getHVManager: Can't find LArHVManager in DetectorStore");
164 out = &(
manager->getEMECPresamplerHVManager());
169 throw std::runtime_error (
"EMECDetectorManager::getPresamplerHVManager: Can't find LArHVManager in DetectorStore");
This class provides direct access to information on the HV electrodes within the EMEC....
unsigned int getNumDetectorRegions() const
Gets the number of detectors in the set of detector regions.
void addDetectorRegion(const EMECDetectorRegion *region)
Add a new HEC Detector Region.
EMECDetectorRegion::DetectorSide getEndcapIndex() const
The endcap index.
double focalToRef
Distance from focal length to reference plane
std::vector< double > m_zsep23
A vector of doubles used to hold an array of sampling separations for the EMEC outer wheel between sa...
CxxUtils::CachedPointer< const EMECPresamplerHVManager > m_presamplerHVManager
std::vector< double > m_zsep12
A vector of doubles used to hold an array of sampling separations for the EMEC outer wheel between sa...
std::vector< const EMECDetectorRegion * > m_DetRegionsIterative
A vector of Region pointers which exists in order to provide iterative access to any EMECDetectorRegi...
const std::string & node() const
Return the version node.
virtual PVConstLink getTreeTop(unsigned int i) const override
Gets the ith tree top.
EMECDetRegionArray m_DetRegionsRandom
A vector of Region pointers which exists in order to provide iterative access to any EMECDetectorRegi...
unsigned int getRadialIndex() const
Returns the Radial (Outer Wheel=0,InnerWheel=1) Index.
void set(pointer_t elt) const
Set the element, assuming it is currently null.
Definition of the abstract IRDBAccessSvc interface.
EMECDetectorManager::DetectorRegionConstIterator beginDetectorRegion() const
Iterate over detector regions.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
const EMECHVManager & getHVManager(EMECHVManager::IOType io) const
Get the HV Managers.
double activeLength
Total active length.
double refToActive
Distance from reference plane to active volume.
const std::string & tag() const
Return version tag.
This is a collection of numbers used to specify the construction of the electromagnetic endcap calori...
void addTreeTop(const PVLink &treeTop)
Add a Tree Top.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
CxxUtils::CachedPointer< const EMECHVManager > m_HVManager[2]
The HV Managers for the emec;.
double refToPresampler
Distance from reference plane to presampler.
const EMECDetectorRegion * getDetectorRegion(unsigned int endcap, unsigned int sampling, unsigned int region, bool inner) const
Random Access to detector regions.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
virtual unsigned int getNumTreeTops() const override
Gets the total number of tree tops.
std::vector< PVLink > m_treeTop
This is the set of tree tops managed by this detector node.
const EMECPresamplerHVManager & getPresamplerHVManager() const
Get the HV Manager (presampler)
This class provides access to the High Voltage throughout the LAr. High voltage conditions can also b...
Definition of the abstract IRDBRecord interface.
void store(pointer_t elt)
Store a new value to the element.
EMECMagicNumbers * m_MagicNumbers
Clockwork for the EMECDetectorManager.
IRDBRecord is one record in the IRDBRecordset object.
pointer_t get() const
Return the current value of the element.
virtual double getDouble(const std::string &fieldName) const =0
Get double field value.
unsigned int getRegionIndex() const
Returns the Region Index.
std::vector< double > m_ziw
A vector of doubles used to hold an array of sampling separations for the EMEC inner wheel.
Definition of the abstract IRDBRecordset interface.
double presamplerLength
Overall length of the presampler.
This class provides direct access to information on the HV electrodes within the EMEC....
virtual ~EMECDetectorManager() override
Destructor.
std::vector< const EMECDetectorRegion * >::const_iterator DetectorRegionConstIterator
EMECDetectorManager(const EMECHVManager *hvManagerInner=nullptr, const EMECHVManager *hvManagerOuter=nullptr, const EMECPresamplerHVManager *presamplerHVManager=nullptr)
Constructor.
EMECDetectorManager::DetectorRegionConstIterator endDetectorRegion() const
Iterate over detector regions.