9#include "CLHEP/Units/SystemOfUnits.h"
25 declareInterface<IDataRetriever>(
this);
26 declareProperty(
"readJEM",
m_readJEM=
false,
"If 'true' reads low-level ROI data from L1Calo hardware. False by default");
36 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
" retrieving" <<
37 (
m_readJEM ?
" from JEMRoIs (ACR) " :
" JetROI (LVL1_ROI) ") <<
endmsg;
52 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"No LVL1_ROI found in SG for Level-1 JetROI" <<
endmsg;
53 return StatusCode::SUCCESS;
59 LVL1_ROI::jets_type::const_iterator itJET = (roi->
getJetROIs()).begin();
60 LVL1_ROI::jets_type::const_iterator itJETe = (roi->
getJetROIs()).end();
62 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"JetROIs from LVL1_ROI retrieved from StoreGate with size: "<< (roi->
getJetROIs()).size() <<
endmsg;
64 for (; itJET != itJETe; ++itJET)
72 energy.push_back(
DataType( itJET->getET4x4()/1000. ));
74 roiWord.push_back(
DataType( itJET->getROIWord()));
75 thrPattern.push_back(
DataType( itJET->getThrPattern()));
85 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"No DataVector<LVL1::JEMRoI> found with key JEMRoIs" <<
endmsg;
86 return StatusCode::SUCCESS;
88 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"DataVector<LVL1::JEMRoI> retrieved from StoreGate with size: "<< jemRoICollection->
size() <<
endmsg;
93 for(;roi_it!=roi_end;++roi_it) {
97 auto fixphi = [] (
double phi)
104 const double roiEta =
coord.eta();
105 const double roiPhi = fixphi (
coord.phi());
121 const auto nPhi =
phi.size() ;
122 myDataMap[
"energy"] = energy;
123 myDataMap[
"phi"] = std::move(
phi);
124 myDataMap[
"eta"] = std::move(
eta);
125 myDataMap[
"energy"] = std::move(energy);
126 myDataMap[
"roiWord"] = std::move(roiWord);
127 myDataMap[
"thrPattern"] = std::move(thrPattern);
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
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
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.
JetROIRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
bool m_maskLowerThresholds
const std::string m_typeName
The data type that is generated by this retriever.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
CoordinateRange class declaration.
uint32_t roiWord() const
Return packed RoI word.
int hits() const
Return Jet hit map (8 bits Main or 4 bits Forward)
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Top level AOD object storing LVL1 RoIs.
const jets_type & getJetROIs() const
Get all the jet 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.