|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "CLHEP/Random/RandomEngine.h"
10 #include "CLHEP/Random/RandFlat.h"
25 return StatusCode::SUCCESS;
30 const EventContext& ctx{Gaudi::Hive::currentContext()};
33 if (!readHandle.isValid()) {
35 return StatusCode::FAILURE;
39 CLHEP::HepRandomEngine* rndmEngine = rngWrapper->
getEngine(ctx);
42 const Amg::Vector3D dir{CLHEP::RandFlat::shoot(rndmEngine,-1., 1.) * Amg::Vector3D::UnitX()+
43 CLHEP::RandFlat::shoot(rndmEngine,-1., 1.) *Amg::Vector3D::UnitZ()};
44 const double jitter = readHandle->drawJitter(
dir, rndmEngine);
48 return StatusCode::SUCCESS;
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
SG::ReadCondHandleKey< TgcDigitJitterData > m_readKey
virtual StatusCode execute() override
Gaudi::Property< unsigned int > m_testJitters
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
::StatusCode StatusCode
StatusCode definition for legacy code.
#define ATH_MSG_ALWAYS(x)
A wrapper class for event-slot-local random engines.
TgcDigtJitterTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
ServiceHandle< IAthRNGSvc > m_rndmSvc
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
virtual StatusCode initialize() override
virtual ~TgcDigtJitterTestAlg()