9#include "CLHEP/Units/SystemOfUnits.h"
25 declareInterface<IDataRetriever>(
this);
26 declareProperty(
"readCPM",
m_readCPM=
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_readCPM ?
" from CPMRoIs (ACR) " :
" EmTauROI (LVL1_ROI) ") <<
endmsg;
54 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"No LVL1_ROI found in SG for Level-1 JetROI" <<
endmsg;
55 return StatusCode::SUCCESS;
62 LVL1_ROI::emtaus_type::const_iterator itEM = (roi->
getEmTauROIs()).begin();
63 LVL1_ROI::emtaus_type::const_iterator itEMe = (roi->
getEmTauROIs()).end();
65 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"JetROIs from LVL1_ROI retrieved from StoreGate with size: "<< (roi->
getJetROIs()).size() <<
endmsg;
67 for (; itEM != itEMe; ++itEM)
76 energy.push_back(
DataType( itEM->getTauClus() /CLHEP::GeV ));
78 energyEM.push_back(
DataType( itEM->getEMClus() / CLHEP::GeV ));
79 energyTAU.push_back(
DataType( itEM->getTauClus() /CLHEP::GeV ));
80 roiWord.push_back(
DataType( itEM->getROIWord()));
81 thrPattern.push_back(
DataType( itEM->getThrPattern()));
91 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"No DataVector<LVL1::CPMRoI> found with key CPMRoIs" <<
endmsg;
92 return StatusCode::SUCCESS;
94 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"DataVector<LVL1::CPMRoI> retrieved from StoreGate with size: "<< cpmRoICollection->
size() <<
endmsg;
99 for(;roi_it!=roi_end;++roi_it) {
103 auto fixphi = [] (
double phi)
110 const double roiEta =
coord.eta();
111 const double roiPhi = fixphi (
coord.phi());
121 energyTAU.push_back(
DataType( 1 ) );
129 const auto nPhi =
phi.size();
130 myDataMap[
"energy"] = energy;
131 myDataMap[
"phi"] = std::move(
phi);
132 myDataMap[
"eta"] = std::move(
eta);
133 myDataMap[
"energy"] = std::move(energy);
134 myDataMap[
"energyEM"] = std::move(energyEM);
135 myDataMap[
"energyTAU"] = std::move(energyTAU);
136 myDataMap[
"roiWord"] = std::move(roiWord);
137 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.
bool m_maskLowerThresholds
EmTauROIRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
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.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
uint32_t roiWord() const
Return packed RoI word.
int hits() const
Return hit thresholds map.
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
CoordinateRange class declaration.
Top level AOD object storing LVL1 RoIs.
const emtaus_type & getEmTauROIs() const
Get all the em/tau RoIs in the event.
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.