JeffersonLab / HDGeant4

Geant4 simulation for the GlueX experiment
4 stars 4 forks source link

Proton timing in the BCAL #179

Closed sdobbs closed 3 years ago

sdobbs commented 3 years ago

I'm starting this issue as a follow-up from discussions about issue #111 and some of the proton timing issues that Lubomir has reported in J/psi production. He recently showed a comparison of the thrown and reconstructed-based-on-BCAL-showers times for protons in J/psi MC using hdgeant4 (g4) and hdgeant with HADR 1 (g3)

Nov20_g3_vs_g4_dtlog.pdf

Hao agreed to do a comparison of proton timing in a sample of his gp -> ppbar p events which have similar kinematics, but as a precursor to this, I wanted to look at the secondary particles generated by proton interactions in the BCAL, since secondary hadrons are the likely cause of the tails in the timing distributions.

I used a particle gun to throw 10k protons with momentum = 0.8 - 2.0 GeV/c and theta = 10 - 30 degrees. using v2.18.0 of hdgeant4 and the master of halld_sim as of Nov 2, 2020 with TRAJECTORIES 2 enabled in the control.in. I looked at MCTrajectoryPoints that were generated within the BCAL volume ( r = 65 - 90 cm ). A couple interesting things pop up right away.

First we can look at the yields of secondary particles that are being created.

GEANT4

ptype_g4

GEANT3 (HADR 1)

ptype_g3_h1

GEANT3 (HADR4)

ptype_g3_h4

A few things show up already. First, geant4 seems to generate a bunch of C12 nuclei (ID=67) which geant3 does not. Between the different simulations, there are different rates of proton (ID=14) and neutron (ID=13) production, with geant3 with HADR=1 apparently generating the most neutrons.

We can get more insight by looking at the energy spectra of these generated particles. In the following, the blue histogram is Geant4, green is Geant3 w/ HADR 1, red is Geant3 w/ HADR 4.

Neutrons

n_en

Even though Geant3 w/ HADR 1 generates the most neutrons, it seems like a lot of them are generated with only a tiny amount of energy, and there is a strong tail to high energies. Maybe this is part of the cause of the timing tails?

Protons

p_en

This is neat - at high energies all the models agree, but diverge at lower energies. It seems like geant4 has some process that the others don't.

C12

c12_en_g4

Just for comparison - the carbon nuclei are unsurprisingly slow.

rjones30 commented 3 years ago

Sean,

Yes, this comparison looks typical to me. The low-energy carbons are from elastic Rutherford scattering on the carbons in the scintillator. These are not generated in geant3 because they are below the 1MeV energy cut for hadrons, so the energy loss from these interactions gets lumped in with ionization energy loss. If you look closely at the g4 type spectrum, you can also see the aluminum recoils from the support structure (type=74) and lead recoils (type=111) although most of the lead recoils are below that cut-in-range cutoff for g4.

You are right about the high-energy tail for neutrons in HADR=1 being potentially spurious. It looks too hard for what is commonly seen in hadron calorimetry.

-Richard Jones

On Thu, Dec 3, 2020 at 7:05 PM Sean Dobbs notifications@github.com wrote:

I'm starting this issue as a follow-up from discussions about issue #111 https://github.com/JeffersonLab/HDGeant4/issues/111 and some of the proton timing issues that Lubomir has reported in J/psi production. He recently showed a comparison of the thrown and reconstructed-based-on-BCAL-showers times for protons in J/psi MC using hdgeant4 (g4) and hdgeant with HADR 1 (g3)

Nov20_g3_vs_g4_dtlog.pdf https://github.com/JeffersonLab/HDGeant4/files/5639678/Nov20_g3_vs_g4_dtlog.pdf

Hao agreed to do a comparison of proton timing in a sample of his gp -> ppbar p events which have similar kinematics, but as a precursor to this, I wanted to look at the secondary particles generated by proton interactions in the BCAL, since secondary hadrons are the likely cause of the tails in the timing distributions.

I used a particle gun to throw 10k protons with momentum = 0.8 - 2.0 GeV/c and theta = 10 - 30 degrees. using v2.18.0 of hdgeant4 and the master of halld_sim as of Nov 2, 2020 with TRAJECTORIES 2 enabled in the control.in. I looked at MCTrajectoryPoints that were generated within the BCAL volume ( r = 65 - 90 cm ). A couple interesting things pop up right away.

First we can look at the yields of secondary particles that are being created.

GEANT4

[image: ptype_g4] https://user-images.githubusercontent.com/1182058/101104415-0c720700-3599-11eb-99d8-46040baf2f74.png

GEANT3 (HADR 1)

[image: ptype_g3_h1] https://user-images.githubusercontent.com/1182058/101104412-0bd97080-3599-11eb-948a-c2485349cc14.png

GEANT3 (HADR4)

[image: ptype_g3_h4] https://user-images.githubusercontent.com/1182058/101104414-0c720700-3599-11eb-9531-09997a5a97b5.png

A few things show up already. First, geant4 seems to generate a bunch of C12 nuclei (ID=67) which geant3 does not. Between the different simulations, there are different rates of proton (ID=14) and neutron (ID=13) production, with geant3 with HADR=1 apparently generating the most neutrons.

We can get more insight by looking at the energy spectra of these generated particles. In the following, the blue histogram is Geant4, green is Geant3 w/ HADR 1, red is Geant3 w/ HADR 4.

Neutrons

[image: n_en] https://user-images.githubusercontent.com/1182058/101104813-ffa1e300-3599-11eb-9472-accd040cdd51.png

Even though Geant3 w/ HADR 1 generates the most neutrons, it seems like a lot of them are generated with only a tiny amount of energy, and there is a strong tail to high energies. Maybe this is part of the cause of the timing tails?

Protons

[image: p_en] https://user-images.githubusercontent.com/1182058/101104816-003a7980-359a-11eb-8d8e-8eb3142600d5.png

This is neat - at high energies all the models agree, but diverge at lower energies. It seems like geant4 has some process that the others don't.

C12

[image: c12_en_g4] https://user-images.githubusercontent.com/1182058/101104409-0b40da00-3599-11eb-824b-decbbe6914df.png

Just for comparison - the carbon nuclei are unsurprisingly slow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/HDGeant4/issues/179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3YKWD37LS6TTR57E6NLBDSTARUPANCNFSM4UMWVEUA .

sdobbs commented 3 years ago

Richard,

For fun I've added a timing comparison - the t_measured is based on the BCAL shower times projected back to the track vertex.

Do you have a prescription for modifying the light output of different particles in hdgeant/hdgeant4? I don't remember which branches you suggested that Colin use...

gleasonc commented 3 years ago

The branch was bcal_nolight_heavy_rtj. I don't know the prescription, but that was the branch I used.

rjones30 commented 3 years ago

Sean and all,

Collin gave the right name for the development branch, it is bcal_nolight_heavy_rtj. I would prefer to manage any changes to the master branch myself, but feel free to clone this branch into your own custom working branch and have a go at trying different ideas, whatever occurs to you as plausible.

-Richard

On Wed, Dec 9, 2020 at 6:17 PM gleasonc notifications@github.com wrote:

The branch was bcal_nolight_heavy_rtj. I don't know the prescription, but that was the branch I used.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/HDGeant4/issues/179#issuecomment-742124506, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3YKWCWI2RNWKRJTUWMR7TSUAAP3ANCNFSM4UMWVEUA .

beattite commented 3 years ago

So these plots are attached to this issue, here's the link to the portal page where I'm putting stuff related to this issue: https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=4878

sdobbs commented 3 years ago

Thanks! These are really interesting to see. It would be nice to compare the distributions on page 3 with those for delta t < 2 ns, but I think that the later plots that you show indicate that there is some process in G3 HADR1 that is generating some delayed electrons and photons which doesn't seem to be in any of the other options.

Tegan: Maybe it's interesting to make a 2D plot of the secondary's initial energy vs. deposition time? It would be good to know what process is making these particles that are depositing energy so late. If you are looking at DMCTrajectoryPoint objects, I think the "mech" data member filled when the particle is generated corresponds to a numerical code that describes the process, but Richard should remind us of the details.

rjones30 commented 3 years ago

Sean and all,

Yes, the mech argument is a 4-byte int that can be turned into a 4-character string representing the simulation mechanism that produced the interaction, eg. 'inel' in inelastic nuclear scattering, 'phot' is photoelectric effect, etc..

-Richard Jones

On Tue, Feb 16, 2021 at 9:46 AM Sean Dobbs notifications@github.com wrote:

Thanks! These are really interesting to see. It would be nice to compare the distributions on page 3 with those for delta t < 2 ns, but I think that the later plots that you show indicate that there is some process in G3 HADR1 that is generating some delayed electrons and photons which doesn't seem to be in any of the other options.

Tegan: Maybe it's interesting to make a 2D plot of the secondary's initial energy vs. deposition time? It would be good to know what process is making these particles that are depositing energy so late. If you are looking at DMCTrajectoryPoint objects, I think the "mech" data member filled when the particle is generated corresponds to a numerical code that describes the process, but Richard should remind us of the details.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/HDGeant4/issues/179#issuecomment-779883134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3YKWBZRLTJJIJ52ZSCT7LS7KANXANCNFSM4UMWVEUA .

sdobbs commented 3 years ago

Thanks, Richard - I guess the mechanism and the parent of these secondaries are what we need to figure out what is producing them.

On Tue, Feb 16, 2021 at 9:58 AM Richard Jones notifications@github.com wrote:

Sean and all,

Yes, the mech argument is a 4-byte int that can be turned into a 4-character string representing the simulation mechanism that produced the interaction, eg. 'inel' in inelastic nuclear scattering, 'phot' is photoelectric effect, etc..

-Richard Jones

On Tue, Feb 16, 2021 at 9:46 AM Sean Dobbs notifications@github.com wrote:

Thanks! These are really interesting to see. It would be nice to compare the distributions on page 3 with those for delta t < 2 ns, but I think that the later plots that you show indicate that there is some process in G3 HADR1 that is generating some delayed electrons and photons which doesn't seem to be in any of the other options.

Tegan: Maybe it's interesting to make a 2D plot of the secondary's initial energy vs. deposition time? It would be good to know what process is making these particles that are depositing energy so late. If you are looking at DMCTrajectoryPoint objects, I think the "mech" data member filled when the particle is generated corresponds to a numerical code that describes the process, but Richard should remind us of the details.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/JeffersonLab/HDGeant4/issues/179#issuecomment-779883134 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB3YKWBZRLTJJIJ52ZSCT7LS7KANXANCNFSM4UMWVEUA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/HDGeant4/issues/179#issuecomment-779891467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJAS2W5MZJ6XBX7WBACP6LS7KBZHANCNFSM4UMWVEUA .

rjones30 commented 3 years ago

Lubomir provided this remake of the original plot linked by Sean in the initial posting to this issue. Apparently the labels on the original plot were reversed. Thanks, that helps clear this up. image

sdobbs commented 3 years ago

from Tegan's studies, we've seen that this difference is due to the HADR1 model in G3, which is now suggested to not be used. data/MC comparisons are ongoing, but we can close this issue