Skip to content
Snippets Groups Projects
Commit f82e7944 authored by MANZANILLAS Luis's avatar MANZANILLAS Luis
Browse files

fix bug in position for rectangular source

parent 126e31e0
No related branches found
No related tags found
No related merge requests found
...@@ -72,8 +72,8 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) ...@@ -72,8 +72,8 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
G4ThreeVector position = G4ThreeVector(x_sourceframe, y_sourceframe, fPositionZ); G4ThreeVector position = G4ThreeVector(x_sourceframe, y_sourceframe, fPositionZ);
if (fSourceGeometry == 1){ if (fSourceGeometry == 1){
x_sourceframe = fsource_size_X * (G4UniformRand() - 0.5); x_sourceframe = fPositionX + fsource_size_X * (G4UniformRand() - 0.5);
y_sourceframe = fsource_size_Y * (G4UniformRand() - 0.5); y_sourceframe = fPositionY + fsource_size_Y * (G4UniformRand() - 0.5);
position = G4ThreeVector(x_sourceframe, y_sourceframe, fPositionZ); position = G4ThreeVector(x_sourceframe, y_sourceframe, fPositionZ);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment