Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into commit-hook
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolkl committed Oct 17, 2018
2 parents b15e58e + 310b18c commit 2552609
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sim/SimG4Components/src/SimG4SingleParticleGeneratorTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ G4Event* SimG4SingleParticleGeneratorTool::g4Event() {
double randomZ = std::cos(theta);

G4ThreeVector particleDir = G4ThreeVector(randomX, randomY, randomZ);
G4ThreeVector particlePosition = G4ThreeVector(m_vertexX, m_vertexY, m_vertexZ);
G4ThreeVector particlePosition = G4ThreeVector(CLHEP::RandFlat::shoot(-m_vertexX, m_vertexX),
CLHEP::RandFlat::shoot(-m_vertexY, m_vertexY),
CLHEP::RandFlat::shoot(-m_vertexZ, m_vertexZ));

G4PrimaryVertex* vertex = new G4PrimaryVertex(particlePosition, 0.);
G4PrimaryParticle* part = new G4PrimaryParticle(particleDef);
Expand Down

0 comments on commit 2552609

Please sign in to comment.