12#include "CaloDetDescr/CaloDetDescrElement.h"
20using Athena::Units::GeV;
35 declareInterface<IDataRetriever>(
this);
37 declareInterface<IDataRetriever>(
this);
58 return StatusCode::SUCCESS;
81 return StatusCode::SUCCESS;
94 const auto nCells = cellContainer->
size();
97 DataVect energy; energy.reserve(nCells);
98 DataVect idVec; idVec.reserve(nCells);
99 DataVect channel; channel.reserve(nCells);
100 DataVect feedThrough; feedThrough.reserve(nCells);
101 DataVect slot; slot.reserve(nCells);
111 ATH_MSG_ERROR(
"in getBadLArData(),Could not get LArOnlineID!" );
117 for(;it1!=it2;++it1){
118 if( !(*it1)->badcell() )
continue;
120 HWIdentifier LArhwid = cabling->createSignalChannelIDFromHash((*it1)->caloDDE()->calo_hash());
121 energyGeV = (*it1)->energy()*(1./
GeV);
122 if (energyGeV == 0) energyGeV = 0.001;
125 idVec.emplace_back((Identifier::value_type)(*it1)->ID().get_compact() );
126 phi.emplace_back((*it1)->phi());
127 eta.emplace_back((*it1)->eta());
128 channel.emplace_back(onlineId->
channel(LArhwid));
129 feedThrough.emplace_back(onlineId->
feedthrough(LArhwid));
130 slot.emplace_back(onlineId->
slot(LArhwid));
134 const auto nEntries =
phi.size();
137 DataMap[
"energy"] = std::move(energy);
138 DataMap[
"id"] = std::move(idVec);
139 DataMap[
"channel"] = std::move(channel);
140 DataMap[
"feedThrough"] = std::move(feedThrough);
141 DataMap[
"slot"] = std::move(slot);
144 <<
" retrieved with " << nEntries <<
" entries" );
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
Wrapper to avoid constant divisions when using units.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
Container class for CaloCell.
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
DataModel_detail::const_iterator< DataVector > const_iterator
size_type size() const noexcept
Returns the number of elements in the collection.
virtual std::string dataTypeName() const
Return the name of the data type.
BadLArRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
SG::ReadHandleKey< CaloCellContainer > m_sgKey
for properties
const CaloCell_ID * m_calocell_id
StatusCode initialize()
Default AthAlgTool methods.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
const DataMap getBadLArData(const CaloCellContainer *cellContainer)
Retrieve LAr bad cell location and details.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
std::map< std::string, DataVect > DataMap
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.