9#include "CLHEP/Random/RandomEngine.h"
10#include "CLHEP/Random/RandFlat.h"
25 return StatusCode::SUCCESS;
34 return StatusCode::FAILURE;
37 rngWrapper->
setSeed(name(), ctx);
38 CLHEP::HepRandomEngine* rndmEngine = rngWrapper->
getEngine(ctx);
41 const Amg::Vector3D dir{CLHEP::RandFlat::shoot(rndmEngine,-1., 1.) * Amg::Vector3D::UnitX()+
42 CLHEP::RandFlat::shoot(rndmEngine,-1., 1.) *Amg::Vector3D::UnitZ()};
43 const double jitter = readHandle->drawJitter(dir, rndmEngine);
47 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ALWAYS(x)
A wrapper class for event-slot-local random engines.
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
TgcDigtJitterTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< unsigned int > m_testJitters
ServiceHandle< IAthRNGSvc > m_rndmSvc
SG::ReadCondHandleKey< TgcDigitJitterData > m_readKey
virtual StatusCode initialize() override
virtual ~TgcDigtJitterTestAlg()
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D