Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optical photon tracking causes geometry boundary hits to be missed #150

Closed
wdconinc opened this issue Aug 16, 2018 · 10 comments
Closed

Optical photon tracking causes geometry boundary hits to be missed #150

wdconinc opened this issue Aug 16, 2018 · 10 comments

Comments

@wdconinc
Copy link
Member

wdconinc commented Aug 16, 2018

Environment: (where does this bug occur, have you tried other environments)

  • branch (master for latest released): feature-geomBoundary (at least, probably all branches)
  • revision (HEAD for most recent): HEAD
  • OS or system: Ubuntu 16.04, parity.physics.wm.edu
  • Special ROOT or Geant4 versions? ROOT 6.14/00 and geant4.10.04.p01

Steps to reproduce: (give a step by step account of how to trigger the bug)

  1. git reset 04e1c807c9b0a4beacad988ae4ffae23ca445d47
  2. build/remoll -t 1 macros/issues/issue150_1.mac
  3. build/remoll -t 1 macros/issues/issue150_2.mac
  4. root -l remollout_Mainz_1.root -e 'T->Draw("hit.z","hit.det == 50002 && hit.pid == 11")'
  5. root -l remollout_Mainz_2.root -e 'T->Draw("hit.z","hit.det == 50002 && hit.pid == 11")'

Expected Result: (what do you expect when you execute the steps above)

Since the only difference is the simulation of optical photons, the number of entries in each of the outputs above should be identical to each other and to 100.

Actual Result: (what do you get when you execute the steps above)

The first output of macros/issue150_1.mac is only 10% of the hits. The only difference is /remoll/physlist/optical/enable.

wdconinc added a commit that referenced this issue Aug 16, 2018
@wdconinc
Copy link
Member Author

A fun read: https://arxiv.org/pdf/1612.05162.pdf, "Peculiarities in the Simulation of Optical Physics with Geant4"

@wdconinc
Copy link
Member Author

Actually "fun" -> "recommended"

@wdconinc
Copy link
Member Author

A slightly longer read: http://publications.rwth-aachen.de/record/667646/files/667646.pdf (dissertation)

@cameronc137
Copy link
Contributor

Related question coming from Qsim comparison of optical vs. no optical photon processes in physics list using the same macro-set seed and getting different results:

Is it the case that the "seed" that is set will define a long list of sub-seed numbers that are used in the creation of a gun-event electron? If so, then does geant work its way through this list for each gun-event only, or for each gun-event plus also secondary particle creation? Thus, if you chose to include optical processes would you expect the numbers in this sub-seed list that are used for each new gun-event electron to be different than in the case of not including optical processes, since the multitude of optical photons are getting tracked and consuming the next entries in the list of numbers used for new gun-events + secondaries? Am I close in my understanding of seeds and geant processes?

@wdconinc
Copy link
Member Author

It should start each event from the same seed but yeah I think some of the randomness can indeed cause differences between different physics lists.

@wdconinc
Copy link
Member Author

@wdconinc
Copy link
Member Author

Tries that went nowhere:

  • Use G4Step::IsFirstStepInVolume(): also set to true for subsequent steps after photon emission

@wdconinc
Copy link
Member Author

Some progress...

With optical photons:
image

Without optical photons:
image

@wdconinc
Copy link
Member Author

I think fixed in feature-geomBoundary 3054d19. @cameronc137 please test?

@wdconinc
Copy link
Member Author

Resolved and merged in develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants