26 declareInterface<IDataRetriever>(
this);
46 if (not pixelDetEleHandle.
isValid() or elements==
nullptr) {
48 return StatusCode::FAILURE;
55 return StatusCode::RECOVERABLE;
59 DataVect idVec,xVec,yVec,zVec,phiModuleVec,etaModuleVec;
62 for (
const auto rdoCollection : *rdoContainer) {
65 for (
const auto rdoData : *rdoCollection) {
76 if (element ==
nullptr){
77 ATH_MSG_WARNING(
"Unable to obtain detector element for PixelRDO hit with id " <<
id );
87 idVec.push_back(
DataType(
id.get_compact() ));
88 xVec.push_back(
DataType(globalPos.x()*CLHEP::mm/CLHEP::cm));
89 yVec.push_back(
DataType(globalPos.y()*CLHEP::mm/CLHEP::cm));
90 zVec.push_back(
DataType(globalPos.z()*CLHEP::mm/CLHEP::cm));
97 ATH_MSG_DEBUG(
"Retrieved " << idVec.size() <<
" PixelRDO objects" );
106 dataMap[
"phiModule"]=phiModuleVec;
107 dataMap[
"etaModule"]=etaModuleVec;
113 if ( FormatTool->AddToEvent(
dataTypeName(),
"PixelRDOs", &dataMap).isFailure())
114 return StatusCode::RECOVERABLE;
119 return StatusCode::SUCCESS;
129 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.