18 const std::string& name, ISvcLocator* loc )
34 return StatusCode::SUCCESS;
44 return StatusCode::FAILURE;
49 if ( !hits.isValid() ) {
51 return StatusCode::FAILURE;
63 for (
const auto *hit: *hits) {
64 float localX = hit->globalX() - ei.
beamPosX();
65 float localY = hit->globalY() - ei.
beamPosY();
66 float localZ = hit->globalZ() - ei.
beamPosZ();
68 correctedHitX(*hit) = localX;
69 correctedHitY(*hit) = localY;
70 correctedHitZ(*hit) = localZ;
74 return StatusCode::SUCCESS;
79 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
HitDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< xAOD::TrackMeasurementValidationContainer > m_HitContainerKey
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_OutputHitXKey
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_OutputHitZKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_OutputHitYKey
virtual StatusCode execute(const EventContext &) const override
virtual StatusCode finalize() override
virtual StatusCode initialize() override
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Handle class for adding a decoration to an object.
float beamPosX() const
X coordinate of the beam spot position.
float beamPosZ() const
Z coordinate of the beam spot position.
float beamPosY() const
Y coordinate of the beam spot position.
EventInfo_v1 EventInfo
Definition of the latest event info version.