9using Athena::Units::GeV;
24 declareInterface<IDataRetriever>(
this);
27 "Collection to be first in output, shown in Atlantis without switching");
29 "Other collections to be retrieved. If list left empty, all available retrieved");
40 return StatusCode::SUCCESS;
71 std::vector<std::string> allkeys;
73 for (
const auto& key : allkeys) {
78 ATH_MSG_DEBUG(
"Unable to retrieve CaloCluster collection " << key );
80 std::string::size_type position = key.find(
"HLTAutoKey",0);
100 ATH_MSG_DEBUG(
"Unable to retrieve CaloCluster collection " << key );
113 return StatusCode::SUCCESS;
136 int noClu = ccc->
size();
140 for (
const auto cluster : *ccc) {
141 phi.emplace_back(cluster->phi());
142 eta.emplace_back(cluster->eta());
143 et.emplace_back(cluster->et()*(1./
GeV));
144 idVec.emplace_back( ++
id );
146 int numCells = cluster->size();
147 numCellsVec.emplace_back( numCells );
150 for (
const auto cell : *cluster) {
151 cells.push_back(cell->ID().get_compact());
155 std::string tagCells;
157 tagCells =
"cells multiple=\"" +
DataType(noCells/(noClu*1.0)).toString()+
"\"";
159 tagCells =
"cells multiple=\"1.0\"";
163 const auto nEntries =
phi.size();
167 DataMap[tagCells] = std::move(cells);
168 DataMap[
"numCells"] = std::move(numCellsVec);
169 DataMap[
"id"] = std::move(idVec);
173 <<
" 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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
size_type size() const noexcept
Returns the number of elements in the collection.
CaloClusterRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
StatusCode initialize()
Default AthAlgTool methods.
virtual std::string dataTypeName() const
Return the name of the data type.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_sgKeyFavourite
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
std::vector< std::string > m_otherKeys
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.
Extra patterns decribing particle interation process.