Applying polarisation vector

hi everyone
i have cylindrical volume gamma source comprised of two photons of 511 keV energy and directed at 180° with respect to each other and i want to apply The electric field (polarisation vector) of each photon in the plane perpendicular to the photon propagation direction, with the added requirement that the polarisation vectors of the annihilation pair are perpendicular to each other. how should i define this ?

If you write your own G4PrimaryGenerator subclass, or a G4VUserPrimaryGeneratorAction with a G4ParticleGun data member, then you can implement arbitrarily complex code, as you describe here. What you would do is throw a single random direction (using G4RandomDirection(), and assign one track to that direction and the other to -direction. For the polarization, you’d do the same, throwing a single random to set one polarization, and assigning the other one perpendicular.

Thanks for your guidance;
i did this:
G4double phipos = CLHEP::twopiG4UniformRand();
G4double zmax=20
cm, zmin=-20cm;
G4double z = zmin + G4UniformRand()
(zmax - zmin);
G4double x0 = std::cos(phipos),
y0 = std::sin(phipos),
z0 =z;

G4double phi = CLHEP::twopi*G4UniformRand();
G4double ux = std::cos(phi),
uy = std::sin(phi),
uz =0;

fParticleGun->SetParticlePosition(G4ThreeVector(x0, y0, z0));
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(ux,uy,uz)) fParticleGun->SetParticlePolarization(G4ThreeVector(uy,-ux,0));
fParticleGun->GeneratePrimaryVertex(anEvent);

tParticleGun->SetParticlePosition(G4ThreeVector(x0, y0, z0));
tParticleGun->SetParticleMomentumDirection(G4ThreeVector(-ux,-uy,uz));
tParticleGun->SetParticlePolarization(G4ThreeVector(0,0,1));
tParticleGun->GeneratePrimaryVertex(anEvent);

is it true?

Not exactly. I’ll ignore the typos (you have commas instead of semicolons, and missing semicolons), since your compiler will find those for you.

  1. It looks like you want to populate a cylinder uniformly in position. That’s not what you’ve done. The Z position is fine, but the X,Y position should not be populated uniformly in phi. It should be populated by equal areas: you can throw sqrt® vs. uniform phi, or you can throw (x,y) uniformly and use an accept-reject loop on r=sqrt(xx+yy).

  2. For the pairs of gammas, it seems like you’re throwing the direction vector purely in the XY plane. Is that really correct? e+/e- annihilation events are isotropic in three dimensions. You can simply throw G4ThreeVector u = G4RandomDirection();, which will give you a uniformly random direction vector. Then you assign one track with u, and one with -u.

  3. Both gammas have transverse polarization, which is always expressed in internal coordinates of the gamma, using the Stokes vector.

This is non-trivial; the Wikipedia article describes a four-component vector, where Geant4 uses the last three components (Q,U,V). You’ll need to throw a random number to specify the mix of vertical vs. 45-degree linear polarization (Q and U, with V = 0), and then set one particle with polarization (Q,U,0) and the other (-Q,-U,0) to have them polarized perpendicularly.

Obviously, Geant4 doesn’t simulate entangled polarizations. These are treated as preset values for each particle, and their interactions are classically independent of one another.

1 Like

thanks for your answer.