Obtaining polarizations

Hi! I’m modifying the Novice 2 exempel to study the Unified Model implemented in G4. I also want to study the way G4 studies the polarization so I want to implement it in this exemple. What modifications do I need to do in OpNovice2 to obtain polarization results? Histograms are a good way to obtain and study polarization results?

Primary polarization can be set with the macro command
/opnovice2/gun/optPhotonPolar 1.57
(I think the value is in radians)

Find the polarization of a particle with
track->GetPolarization()
which returns a G4ThreeVector. Get each component by
track->GetPolarization().x() etc.
in SteppingAction, or wherever the histogram is filled.

Modify the histograms according to your needs.

Note that I haven’t tried this yet. I’d like to add this to OpNovice2.