27 m_numberOfSurfaces(100),
31 declareInterface<ISurfaceBuilder>(
this);
52 m_rndmSvc = service(
"RndmGenSvc");
56 m_gaussDist =
new Rndm::Numbers(m_rndmSvc, Rndm::Gauss(0.,1.));
57 m_flatDist =
new Rndm::Numbers(m_rndmSvc, Rndm::Flat(0.,1.));
59 return StatusCode::SUCCESS;
66 return StatusCode::SUCCESS;
72 std::vector<const Trk::Surface*>* cSurfaces =
new std::vector<const Trk::Surface*>();
73 cSurfaces->reserve(m_numberOfSurfaces);
74 for (
size_t isf = 0; isf < m_numberOfSurfaces; ++isf ){
76 if (csf) cSurfaces->push_back(csf);
79 if ( cSurfaces->size() != m_numberOfSurfaces )
81 <<
") does not correspond to chosen number (" << m_numberOfSurfaces <<
")." );
89 if (m_worldDimensions.size() < 3 )
return nullptr;
92 int sType = std::floor(m_flatDist->shoot()*6);
95 if (!m_enableCones && !sType){
97 sType = std::floor(m_flatDist->shoot()*6);
100 sType = sType == 6 ? 5 : sType;
102 double tx = m_worldDimensions[0]*(2*m_flatDist->shoot()-1);
103 double ty = m_worldDimensions[1]*(2*m_flatDist->shoot()-1);
104 double tz = m_worldDimensions[2]*(2*m_flatDist->shoot()-1);
105 double dx = m_flatDist->shoot();
106 double dy = m_flatDist->shoot();
107 double dz = m_flatDist->shoot();
123 (*transform) = translation;