Repository navigation
Generate optical-photon primaries with a transverse polarization - #277
Open
cesarjesusvalls wants to merge 1 commit into
Open
cesarjesusvalls wants to merge 1 commit into
cesarjesusvalls wants to merge 1 commit into
Conversation
ScintillationGenerator, LambertianGenerator and SingleParticleGenerator set the polarization of optical-photon primaries to G4RandomDirection(), an isotropic 3D vector that is in general not perpendicular to the momentum. The new RandomUtils function RandomPolarization(direction) returns a linear polarization perpendicular to the given direction, uniform in azimuth around it. The three generators now use it, and a new test in RandomUtilsTest checks it.
gonzaponte
approved these changes
Nov 20, 2026
gonzaponte
left a comment
Collaborator
There was a problem hiding this comment.
This looks perfect to me. Thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ScintillationGenerator,LambertianGeneratorandSingleParticleGeneratorset the polarization of optical-photon primaries toG4RandomDirection(). That is an isotropic 3D unit vector, in general not perpendicular to the photon's momentum. Light is transverse, and Geant4 uses the vector as given:G4OpBoundaryProcess::DielectricDielectric(Geant4 11.3.0,G4OpBoundaryProcess.cc:1186-1192) splits it into its component along the s axis and the magnitude of the rest, so any component along the momentum is treated as p-polarized. At the first boundary each primary photon meets, the light is then on average one third s and two thirds p, instead of half and half for unpolarized light, which changes the Fresnel reflection and transmission there. Later interactions are not affected: Geant4 recomputes the polarization at each one.This PR adds a function
RandomPolarization(direction)toRandomUtils. It returns a linear polarization perpendicular to the given direction and uniform in azimuth, asG4Scintillation(Geant4 11.3.0) builds it. The three generators now use it, and a Catch2 test checks that the polarization has unit length, is perpendicular to the direction and is uniform in azimuth.In NEXT-100 S1 simulations (
Next100OpticalGeometryat 15 bar,ScintillationGeneratorat fixed vertices in ACTIVE), the light at the PMTs changes by up to +0.8 % for vertices near the gate and −0.5 % near the cathode. Leaving the polarization unset gives the same light as this change: Geant4'sG4PrimaryTransformerthen assigns a random transverse polarization itself, but warns (ZeroPolarization) at every run.Random-number sequences change, so outputs are not bit-identical to before. Built against Geant4 11.3.0; the new test passes, and the other tests give the same results as on master.