25 declareInterface<IDataRetriever>(
this);
45 if (not pixelDetEleHandle.
isValid() or elements==
nullptr) {
47 return StatusCode::FAILURE;
54 return StatusCode::RECOVERABLE;
58 DataVect idVec,xVec,yVec,zVec,phiModuleVec,etaModuleVec;
61 for (
const auto rdoCollection : *rdoContainer) {
64 for (
const auto rdoData : *rdoCollection) {
75 if (element ==
nullptr){
76 ATH_MSG_WARNING(
"Unable to obtain detector element for PixelRDO hit with id " <<
id );
86 idVec.push_back(
DataType(
id.get_compact() ));
87 xVec.push_back(
DataType(globalPos.x()*CLHEP::mm/CLHEP::cm));
88 yVec.push_back(
DataType(globalPos.y()*CLHEP::mm/CLHEP::cm));
89 zVec.push_back(
DataType(globalPos.z()*CLHEP::mm/CLHEP::cm));
96 ATH_MSG_DEBUG(
"Retrieved " << idVec.size() <<
" PixelRDO objects" );
101 dataMap[
"id"]=std::move(idVec);
102 dataMap[
"x"]=std::move(xVec);
103 dataMap[
"y"]=std::move(yVec);
104 dataMap[
"z"]=std::move(zVec);
105 dataMap[
"phiModule"]=std::move(phiModuleVec);
106 dataMap[
"etaModule"]=std::move(etaModuleVec);
112 if ( FormatTool->AddToEvent(
dataTypeName(),
"PixelRDOs", &dataMap).isFailure())
113 return StatusCode::RECOVERABLE;
118 return StatusCode::SUCCESS;
128 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
This is an Identifier helper class for the Pixel subdetector.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
This is a "hash" representation of an Identifier.
Class to hold the SiDetectorElement objects to be put in the detector store.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Class to hold geometrical description of a silicon detector element.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
virtual std::string dataTypeName() const
Return the name of the data type.
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
A tool handle to the SiLorentzAngleTool.
const PixelID * m_pixelID
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
PixelRDORetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
virtual StatusCode initialize()
Only retrieve geo tool in initialize.
SG::ReadHandleKey< PixelRDO_Container > m_PixelRDOContainerName
The StoreGate key for the PixelRDO container.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
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.