9#include "CLHEP/Units/SystemOfUnits.h"
22 declareInterface<IDataRetriever>(
this);
25 "Storegate key for ROIs incl MuonROIs");
35 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"No MuonROI found in SG at "
37 return StatusCode::SUCCESS;
41 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
" Retrieving MuonROIs with size " << noRois <<
endmsg;
45 DataVect roiWord; roiWord.reserve(noRois);
46 DataVect thrNumber; thrNumber.reserve(noRois);
47 DataVect thrName; thrName.reserve(noRois);
48 DataVect thrValue; thrValue.reserve(noRois);
49 DataVect energy; energy.reserve(noRois);
51 LVL1_ROI::muons_type::const_iterator itMU = (roi->
getMuonROIs()).begin();
52 LVL1_ROI::muons_type::const_iterator itMUe = (roi->
getMuonROIs()).end();
54 for (; itMU != itMUe; ++itMU){
57 roiWord.push_back(
DataType( itMU->getROIWord()));
58 thrNumber.push_back(
DataType( itMU->getThrNumber()));
61 std::string thisThrName = itMU->getThrName();
62 if (thisThrName.empty()){ thisThrName =
"empty"; };
63 thrName.push_back(
DataType( std::move(thisThrName) ));
65 thrValue.push_back(
DataType( itMU->getThrValue()));
66 energy.push_back(
DataType( itMU->getThrValue()/CLHEP::GeV));
70 const auto nPhi =
phi.size();
71 myDataMap[
"phi"] = std::move(
phi);
72 myDataMap[
"eta"] = std::move(
eta);
73 myDataMap[
"roiWord"] = std::move(roiWord);
74 myDataMap[
"thrNumber"] = std::move(thrNumber);
75 myDataMap[
"thrName"] = std::move(thrName);
76 myDataMap[
"thrValue"] = std::move(thrValue);
77 myDataMap[
"energy"] = std::move(energy);
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
bool msgLvl(const MSG::Level lvl) const
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
virtual std::string dataTypeName() const
Return the name of the data type.
const std::string m_typeName
The data type that is generated by this retriever.
MuonROIRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
std::string m_sgKey
The storegate key for the MuonROIs.
Top level AOD object storing LVL1 RoIs.
const muons_type & getMuonROIs() const
Get all the muon RoIs in the event.
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.