Questions of gaussian distribution source

Dear Geant4 experts,

I tried to set a photon source with Gaussian distribution in position, the FWHM of source is 100um. Then I set the following command.

/gps/pos/type Beam
/gps/pos/sigma_r 42.462 um

May I ask if my settings are correct?

Besides, I have another question, is the meaning of sigma_r (or sigma_x, sigma_y) in ‘gps’ command consistent with the standard deviation igma in Gaussian distribution formulas?

If so, should the following formula be satisfied?

Thank you so much for your attention!


Not an answer but maybe you could store the positions of the track passing a plane into a 2D histogram to check what you need, e.g., in your

G4String preStepVol = step->GetPreStepPoint()->GetPhysicalVolume()->GetName();
G4String postStepVol =  step->GetPostStepPoint()->GetPhysicalVolume()->GetName();
G4String particleName = step->GetTrack()->GetParticleDefinition()->GetParticleName();
G4double trackWeight = step->GetTrack()->GetWeight();
if ((preStepVol == "World" && postStepVol == "Plane") && particleName == "gamma")
    G4ThreeVector vertex  =  step->GetTrack()->GetPosition();
    const G4AffineTransform transformation  =  step->GetTrack()->GetNextTouchable()->GetHistory()->GetTransform(1);
    G4ThreeVector localVetex  =  transformation.TransformPoint(vertex);
    G4double x  =  localVetex.x();
    G4double y  =  localVetex.y();         
    analysisManager->FillH2(1, x, y, trackWeight);