12#include "CaloDetDescr/CaloDetDescrElement.h"
20using Athena::Units::GeV;
36 return StatusCode::SUCCESS;
59 return StatusCode::SUCCESS;
72 const auto nCells = cellContainer->
size();
75 DataVect energy; energy.reserve(nCells);
76 DataVect idVec; idVec.reserve(nCells);
77 DataVect channel; channel.reserve(nCells);
78 DataVect feedThrough; feedThrough.reserve(nCells);
88 if ( detStore()->
retrieve(onlineId,
"LArOnlineID").isFailure()) {
89 ATH_MSG_ERROR(
"in getBadLArData(),Could not get LArOnlineID!" );
96 if( !(*it1)->badcell() )
continue;
98 HWIdentifier LArhwid = cabling->createSignalChannelIDFromHash((*it1)->caloDDE()->calo_hash());
99 energyGeV = (*it1)->energy()*(1./
GeV);
100 if (energyGeV == 0) energyGeV = 0.001;
103 idVec.emplace_back((Identifier::value_type)(*it1)->ID().get_compact() );
104 phi.emplace_back((*it1)->phi());
105 eta.emplace_back((*it1)->eta());
106 channel.emplace_back(onlineId->
channel(LArhwid));
107 feedThrough.emplace_back(onlineId->
feedthrough(LArhwid));
108 slot.emplace_back(onlineId->
slot(LArhwid));
112 const auto nEntries =
phi.size();
115 DataMap[
"energy"] = std::move(energy);
116 DataMap[
"id"] = std::move(idVec);
117 DataMap[
"channel"] = std::move(channel);
118 DataMap[
"feedThrough"] = std::move(feedThrough);
119 DataMap[
"slot"] = std::move(slot);
122 <<
" 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.
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 override
Return the name of the data type.
virtual StatusCode initialize() override
Default AthAlgTool methods.
SG::ReadHandleKey< CaloCellContainer > m_sgKey
for properties
const CaloCell_ID * m_calocell_id
Gaudi::Property< bool > m_cellConditionCut
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool) override
Retrieve all the data.
Gaudi::Property< bool > m_doBadLAr
Gaudi::Property< bool > m_lar
const DataMap getBadLArData(const CaloCellContainer *cellContainer)
Retrieve LAr bad cell location and details.
Gaudi::Property< int > m_cellEnergyPrec
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.