9using Athena::Units::GeV;
20 return StatusCode::SUCCESS;
51 std::vector<std::string> allkeys;
53 for (
const auto& key : allkeys) {
58 ATH_MSG_DEBUG(
"Unable to retrieve CaloCluster collection " << key );
60 std::string::size_type position = key.find(
"HLTAutoKey",0);
80 ATH_MSG_DEBUG(
"Unable to retrieve CaloCluster collection " << key );
93 return StatusCode::SUCCESS;
116 int noClu = ccc->
size();
120 for (
const auto cluster : *ccc) {
121 phi.emplace_back(cluster->phi());
122 eta.emplace_back(cluster->eta());
123 et.emplace_back(cluster->et()*(1./
GeV));
124 idVec.emplace_back( ++
id );
126 int numCells = cluster->size();
127 numCellsVec.emplace_back( numCells );
130 for (
const auto cell : *cluster) {
131 cells.push_back(cell->ID().get_compact());
135 std::string tagCells;
137 tagCells =
"cells multiple=\"" +
DataType(noCells/(noClu*1.0)).toString()+
"\"";
139 tagCells =
"cells multiple=\"1.0\"";
143 const auto nEntries =
phi.size();
147 DataMap[tagCells] = std::move(cells);
148 DataMap[
"numCells"] = std::move(numCellsVec);
149 DataMap[
"id"] = std::move(idVec);
153 <<
" 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)
uint32_t CLID
The Class ID type.
char data[hepevt_bytes_allocation_ATLAS]
Wrapper to avoid constant divisions when using units.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Property< std::vector< std::string > > m_otherKeys
virtual StatusCode initialize() override
Default AthAlgTool methods.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_sgKeyFavourite
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool) override
Retrieve all the data.
Gaudi::Property< bool > m_doWriteHLT
virtual std::string dataTypeName() const override
Return the name of the data type.
const DataMap getData(const xAOD::CaloClusterContainer *)
Retrieve basic parameters, mainly four-vectors.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
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.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
static constexpr CLID ID()
Extra patterns decribing particle interation process.