Integrating optical photons into restG4 #124
Draft
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.
This PR is related to the Issue #123.
I added G4OpticalPhysics list to PhysicsList and included the optical surfaces headers to the DetectorConstruction class as first stage to include optical photon simulations in
restG4.Also, I needed to update
TRestPhysicsList::PhysicsListExists, which I have done in PR rest-for-physics/geant4lib#119.So, to include optical physics in a
restG4simulation, just add<physicsList name="G4OpticalPhysics"></physicsList>I have checked the simulation of Optical Boundary processes in
restG4(ie, reflection, refraction, absorption) with two basic geometries:An example of an absorbed photon:


And a reflected photon:
This geometry is based on the one that can be found in https://github.com/iaxo/iaxo-geometry/blob/master/gdml/IAXO-D1/Veto.gdml
Just an example of an event.
In this case, the red volume doesn't have refractive index so the optical photons are killed when they reach it.
The optical photon generator is configured via rml just using

<source particle="opticalphoton">. Also,G4OpticalPhotonhave polarization. This has not been implemented so, while running therestG4simulation with debug verbose level, you will see this message:As Optical Boundary processes are classified as 'Transportation' in
GEANT4, all of the hits have processName 'Transportation'. Maybe it will be interesting to save more specific information of the hit (if it is refraction, reflection or absorption in dielectric_metal surfaces). As I undestood and did inGEANT4, for Optical Boundary processes this needs to be done differently, checkingG4Step::GetPostStepPoint()::GetStepStatus(). Maybe @lobis,@jgalan have some ideas about this?I haven't include the gdml and rml of these examples into this PR, just tell me in case you believe it's necessary.