JeffersonLab / sim-recon

Simulation and Reconstruction for GlueX
9 stars 14 forks source link

- fix the attenuation correction for light collection in electromagnetic #1178

Closed rjones30 closed 6 years ago

rjones30 commented 6 years ago

showers, improve the response to muons and hadrons in FCal blocks [rtj]

gluex commented 6 years ago

Test status for this pull request: FAILURE

Failures: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/tests/failures.txt Summary: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/tests/summary.txt Logs: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/tests/log

Build log: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/make_fixes_to_fcal_response_rtj.log Build report: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/report_fixes_to_fcal_response_rtj.txt Location of build: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj

markito3 commented 6 years ago

Redelivered the test...

gluex commented 6 years ago

Test status for this pull request: FAILURE

Failures: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/tests/failures.txt Summary: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/tests/summary.txt Logs: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/tests/log

Build log: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/make_fixes_to_fcal_response_rtj.log Build report: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj/report_fixes_to_fcal_response_rtj.txt Location of build: /work/halld/pull_request_test/sim-recon^fixes_to_fcal_response_rtj

mashephe commented 6 years ago

A note:

Changing the attenuation correction, in principle, requires now retuning the non-linear energy correction in MC. If it is noted that the FCAL response in MC is off after this pull request then this probably needs to be done.

Matt

On Jul 24, 2018, at 8:43 PM, Mark M. Ito notifications@github.com wrote:

Merged #1178.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

rjones30 commented 6 years ago

Hello Matt,

I was careful to NOT introduce any fcal gain change with this update to hdgeant. It amounts to a global shift in the z distance to the back of the block for all shower tracks, bringing it into line with the physical dimensions of the block. That is, the number was wrong before and subject to changes in the geometry elsewhere that should not affect light attenuation in the block, whereas now it is correct and immune to such things. However, it did introduce a global shift to an exponential factor in the attenuation correction. All blocks having the same attenuation length, this amounts to introducing a global gain multiplier. To take it out, I then introduced a new global gain multiplier for electromagnetic showers that is the reciprocal of that attenuation factor, and then checked that pre- and post- this update, the mean response to 1GeV photons remains the same to within a few 1e-4. I also took this moment to introduce a better treatment of MIP particles (muons, hadrons) that gives a better estimate for the lead glass response to these. So if you look in the code, you will now see new gain multipliers applied to all fcal block hits in hdgeant that depend on the particle type. The factor for gammas, electrons, and positrons is now slightly less than 1, whereas before it was 1, to make this fix history-neutral for them. Prior to this there was a "temporary fix [comment]" for muons and pions applying a separate gain adjustment. I also made my fix history-neutral for those. For fast protons, kaons, and other hadrons, the response is new.

I thought no one would ask, and no one would notice a difference, so this email would never need to be written. Not so, it needed to be written. If you want to know more, there are more details that I have left out. The upshot is that unless you hear from me about changes, you should not need to hear about it. Of course, I might have overlooked something, but I TRY not to create more work for other people without telling them.

-Richard Jones

On Wed, Jul 25, 2018 at 10:30 AM Matthew Shepherd notifications@github.com wrote:

A note:

Changing the attenuation correction, in principle, requires now retuning the non-linear energy correction in MC. If it is noted that the FCAL response in MC is off after this pull request then this probably needs to be done.

Matt

On Jul 24, 2018, at 8:43 PM, Mark M. Ito notifications@github.com wrote:

Merged #1178.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/sim-recon/pull/1178#issuecomment-407775014, or mute the thread https://github.com/notifications/unsubscribe-auth/AHeFWGaxIjUC3EH62FJ_NZX7A_TuZVcqks5uKIEZgaJpZM4VcZyg .

mashephe commented 6 years ago

Richard,

Thanks - and I appreciate the care you take to make the change minimally invasive.

I'm all in favor of making things as right as possible. I just wanted to make note that based on what I saw the code "diff" that I looked at associated with this pull request, there seemed to be the possibility of some energy dependent effect. I wanted to make a note such that if we notice things in the future, we may examine this change. I'm not grumbling about extra work.

Matt

On Jul 25, 2018, at 10:47 AM, Richard Jones notifications@github.com wrote:

Hello Matt,

I was careful to NOT introduce any fcal gain change with this update to hdgeant. It amounts to a global shift in the z distance to the back of the block for all shower tracks, bringing it into line with the physical dimensions of the block. That is, the number was wrong before and subject to changes in the geometry elsewhere that should not affect light attenuation in the block, whereas now it is correct and immune to such things. However, it did introduce a global shift to an exponential factor in the attenuation correction. All blocks having the same attenuation length, this amounts to introducing a global gain multiplier. To take it out, I then introduced a new gobal gain multiplier for electromagnetic showers that is the reciprocal of that attenuation factor, and then checked that pre- and post- this update, the mean response to 1GeV photons remains the same to within a few 1e-4. I also took this moment to introduce a better treatment of MIP particles (muons, hadrons) that gives a better estimate for the lead glass response to these. So if you look in the code, you will now see new gain multipliers applied to all fcal block hits in hdgeant that depend on the particle type. The factor for gammas, electrons, and positrons is now slightly less than 1, whereas before it was 1, to make this fix history-neutral for them. Prior to this there was a "temporary fix [comment]" for muons and pions applying a separate gain adjustment. I also made my fix history-neutral for those. For fast protons, kaons, and other hadrons, the response is new.

I thought no one would ask, and no one would notice a difference, so this email would never need to be written. Not so, it needed to be written. If you want to know more, there are more details that I have left out. The upshot is that unless you hear from me about changes, you should not need to hear about it. Of course, I might have overlooked something, but I TRY not to create more work for other people without telling them.

-Richard Jones

On Wed, Jul 25, 2018 at 10:30 AM Matthew Shepherd notifications@github.com wrote:

A note:

Changing the attenuation correction, in principle, requires now retuning the non-linear energy correction in MC. If it is noted that the FCAL response in MC is off after this pull request then this probably needs to be done.

Matt

On Jul 24, 2018, at 8:43 PM, Mark M. Ito notifications@github.com wrote:

Merged #1178.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/sim-recon/pull/1178#issuecomment-407775014, or mute the thread https://github.com/notifications/unsubscribe-auth/AHeFWGaxIjUC3EH62FJ_NZX7A_TuZVcqks5uKIEZgaJpZM4VcZyg .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.