JeffersonLab / halld_sim

Simulation for the GlueX Experiment in Hall D
6 stars 10 forks source link

Run-to-run efficiency variation in 2018 run periods #190

Closed jrstevenjlab closed 3 years ago

jrstevenjlab commented 3 years ago

At the XWG on 3/8/21 @markdalton reported on the run-to-run variation of the flux normalized yields and MC efficiency for the charged and neutral omega channels https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=4984. For Spring 2018 there is a period of runs where the reduction of the MC efficient is larger than the decrease in flux normalized yields (see slide 5), which indicates an overcorrection in the CDC inefficiency for those range of runs in the MC.

This roughly matches with the Spring 2018 batch dependence reported by @s6pepaul and his run-dependent efficiency for the Lambda(1520) although the effect is larger for this channel with Kaons https://halldweb.jlab.org/wiki-private/images/9/9f/2020_03_08_run_dependend_acceptance_PP.png

To address this issue there were a few suggestions for these and other channels to look at

Samples of protons may be available in several single-meson channels, K- in the Lambda(1520) and pi+ in Delta++ recoil events. Please report the studies in this issue so we can collect the results in one place

sdobbs commented 3 years ago

Potentially problematic list of tagger runs from Beni: https://logbooks.jlab.org/entry/3868243

jrstevenjlab commented 3 years ago

For the gp -> pi0 p channel a plot of the number of hits used in reconstructing proton tracks is linked below vs run number for the 2018 datasets in data (black) and MC (blue). The tracks are selected to be between 70-80 degrees in theta where the majority of these t-channel recoil protons are located for light meson production.

The data/MC are in reasonable agreement at the start of the Spring 2018 run period, but the discrepancy grows with the CDC gas degradation. For Fall 2018 the small discrepancy is constant over the run period. So it appears the gain degradation applied in mcsmear for Spring 2018 reduces the amplitude for hits below threshold more often in simulation than what is observed in data.

Spring 2018: # CDC hits on proton tracks data (black) and MC (blue), right side is MC/data ratio cdc1D_2018_01.pdf

Fall 2018: # CDC hits on proton tracks data (black) and MC (blue), right side is MC/data ratio cdc1D_2018_08.pdf

@nsjarvis, does this loss of hits used in track reconstruction (not dE/dx) seem consistent with a reduction of large DOCA hits in the MC which have amplitudes below threshold due to the gain suppression applied in the CDCSmearer?

https://github.com/JeffersonLab/halld_sim/blob/master/src/programs/Simulation/mcsmear/CDCSmearer.cc#L215

The linear decrease in amplitude leads to a lower hit efficiency in MC at large DOCA than is seen in data (although I realize this is convoluted by the straw sag issue). Should we consider not further suppressing the amplitude for DOCA > dmax, where your slide 2 of https://halldweb.jlab.org/DocDB/0040/004063/001/NSJ_CDC_eff_simulation_16May2019.pdf shows the ratio of amplitudes starts to be non-linear?

Note about number of hits for dE/dx: the number of hits used in the dE/dx calculation is not available in the DSelector, but for protons the tracks are included in the Analysis TTree even if there aren't enough hits for dE/dx calculation but they are assigned a value of dE/dx = 0. In this theta range (70-80 degrees) this contribution of events with dE/dx == 0 is negligible, however it may be significant for more forward going tracks with fewer CDC hits.

nsjarvis commented 3 years ago

Referring to slide 2 of https://halldweb.jlab.org/DocDB/0040/004063/001/NSJ_CDC_eff_simulation_16May2019.pdf

The ratio of amplitudes starts to be non-linear for early (good) runs when the DOCA is near to the edge of the straw and for later runs when the peak in the Landau disappears below the threshold. dmax (the max DOCA to be used for dE/dx) was determined using the turning point in a plot of Landau MPV/Sigma (in early runs MPV/Sigma tilts down and in problem runs it turns up) with a little iteration to optimise the dE/dx matching between runs, which does work very well (although the resolution is still awful for the lower-gain later runs).

Removing the suppression after dmax will simulate perfectly behaving straws after dmax; this is not realistic. dmax is only 4mm for the later runs, and at that DOCA the chamber gain is about half of what it would normally be.

I tried to reduce the suppression after dmax by fitting a second line segment to the amplitude ratio data, from dmax to dmax+1mm, and projecting that out to find where the amplitude ratio reaches 0. The results show a lot of variation, but the mean is broadly consistent at 3.3mm throughout the run period. I'll repeat this using dmax to dmax to 0.5mm, 1mm might have been too generous.

I have a branch of halld_sim which uses this second line segment in https://github.com/JeffersonLab/halld_sim/tree/nsj_extend_3_3mm I used it to calculate hit efficiency for a few runs and it looks like it is now overestimating the efficiency for the later runs. With the non-saggy simulation it will be hard to get this right. Peter is trying it out to see what it does to his data. It'll be interesting to see what he finds.

Naomi.

On Sun, Mar 21, 2021 at 5:51 PM Justin Stevens @.***> wrote:

For the gp -> pi0 p channel a plot of the number of hits used in reconstructing proton tracks is linked below vs run number for the 2018 datasets in data (black) and MC (blue). The tracks are selected to be between 70-80 degrees in theta where the majority of these t-channel recoil protons are located for light meson production.

The data/MC are in reasonable agreement at the start of the Spring 2018 run period, but the discrepancy grows with the CDC gas degradation. For Fall 2018 the small discrepancy is constant over the run period. So it appears the gain degradation applied in mcsmear for Spring 2018 reduces the amplitude for hits below threshold more often in simulation than what is observed in data.

Spring 2018: # CDC hits on proton tracks data (black) and MC (blue), right side is MC/data ratio cdc1D_2018_01.pdf https://github.com/JeffersonLab/halld_sim/files/6178426/cdc1D_2018_01.pdf

Fall 2018: # CDC hits on proton tracks data (black) and MC (blue), right side is MC/data ratio cdc1D_2018_08.pdf https://github.com/JeffersonLab/halld_sim/files/6178427/cdc1D_2018_08.pdf

@nsjarvis https://github.com/nsjarvis, does this loss of hits used in track reconstruction (not dE/dx) seem consistent with a reduction of large DOCA hits in the MC which have amplitudes below threshold due to the gain suppression applied in the CDCSmearer?

https://github.com/JeffersonLab/halld_sim/blob/master/src/programs/Simulation/mcsmear/CDCSmearer.cc#L215

The linear decrease in amplitude leads to a lower hit efficiency in MC at large DOCA than is seen in data (although I realize this is convoluted by the straw sag issue). Should we consider not further suppressing the amplitude for DOCA > dmax, where your slide 2 of https://halldweb.jlab.org/DocDB/0040/004063/001/NSJ_CDC_eff_simulation_16May2019.pdf shows the ratio of amplitudes starts to be non-linear?

Note about number of hits for dE/dx: the number of hits used in the dE/dx calculation is not available in the DSelector, but for protons the tracks are included in the Analysis TTree even if there aren't enough hits for dE/dx calculation but they are assigned a value of dE/dx = 0. In this theta range (70-80 degrees) this contribution of events with dE/dx == 0 is negligible, however it may be significant for more forward going tracks with fewer CDC hits.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/halld_sim/issues/190#issuecomment-803665833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXOCVXCJ2ZHPPP3UCDG3HTTEZS5JANCNFSM4Y6RCP3A .

jrstevenjlab commented 3 years ago

Thanks for the details and the new branch to try for this. My initial idea was just to use the suppression at dmax for all d > dmax, but I like the option for a second slope to characterize the high DOCA region. Do you have any plots showing the hit efficiency vs DOCA for these runs that you tried with this branch so we can see how they compare to the current gain suppression in mcsmear?

-Justin

On Mar 22, 2021, at 10:05 AM, nsjarvis @.***> wrote:

Referring to slide 2 of https://halldweb.jlab.org/DocDB/0040/004063/001/NSJ_CDC_eff_simulation_16May2019.pdf

The ratio of amplitudes starts to be non-linear for early (good) runs when the DOCA is near to the edge of the straw and for later runs when the peak in the Landau disappears below the threshold. dmax (the max DOCA to be used for dE/dx) was determined using the turning point in a plot of Landau MPV/Sigma (in early runs MPV/Sigma tilts down and in problem runs it turns up) with a little iteration to optimise the dE/dx matching between runs, which does work very well (although the resolution is still awful for the lower-gain later runs).

Removing the suppression after dmax will simulate perfectly behaving straws after dmax; this is not realistic. dmax is only 4mm for the later runs, and at that DOCA the chamber gain is about half of what it would normally be.

I tried to reduce the suppression after dmax by fitting a second line segment to the amplitude ratio data, from dmax to dmax+1mm, and projecting that out to find where the amplitude ratio reaches 0. The results show a lot of variation, but the mean is broadly consistent at 3.3mm throughout the run period. I'll repeat this using dmax to dmax to 0.5mm, 1mm might have been too generous.

I have a branch of halld_sim which uses this second line segment in https://github.com/JeffersonLab/halld_sim/tree/nsj_extend_3_3mm I used it to calculate hit efficiency for a few runs and it looks like it is now overestimating the efficiency for the later runs. With the non-saggy simulation it will be hard to get this right. Peter is trying it out to see what it does to his data. It'll be interesting to see what he finds.

Naomi.

On Sun, Mar 21, 2021 at 5:51 PM Justin Stevens @.***> wrote:

For the gp -> pi0 p channel a plot of the number of hits used in reconstructing proton tracks is linked below vs run number for the 2018 datasets in data (black) and MC (blue). The tracks are selected to be between 70-80 degrees in theta where the majority of these t-channel recoil protons are located for light meson production.

The data/MC are in reasonable agreement at the start of the Spring 2018 run period, but the discrepancy grows with the CDC gas degradation. For Fall 2018 the small discrepancy is constant over the run period. So it appears the gain degradation applied in mcsmear for Spring 2018 reduces the amplitude for hits below threshold more often in simulation than what is observed in data.

Spring 2018: # CDC hits on proton tracks data (black) and MC (blue), right side is MC/data ratio cdc1D_2018_01.pdf https://github.com/JeffersonLab/halld_sim/files/6178426/cdc1D_2018_01.pdf

Fall 2018: # CDC hits on proton tracks data (black) and MC (blue), right side is MC/data ratio cdc1D_2018_08.pdf https://github.com/JeffersonLab/halld_sim/files/6178427/cdc1D_2018_08.pdf

@nsjarvis https://github.com/nsjarvis, does this loss of hits used in track reconstruction (not dE/dx) seem consistent with a reduction of large DOCA hits in the MC which have amplitudes below threshold due to the gain suppression applied in the CDCSmearer?

https://github.com/JeffersonLab/halld_sim/blob/master/src/programs/Simulation/mcsmear/CDCSmearer.cc#L215

The linear decrease in amplitude leads to a lower hit efficiency in MC at large DOCA than is seen in data (although I realize this is convoluted by the straw sag issue). Should we consider not further suppressing the amplitude for DOCA > dmax, where your slide 2 of https://halldweb.jlab.org/DocDB/0040/004063/001/NSJ_CDC_eff_simulation_16May2019.pdf shows the ratio of amplitudes starts to be non-linear?

Note about number of hits for dE/dx: the number of hits used in the dE/dx calculation is not available in the DSelector, but for protons the tracks are included in the Analysis TTree even if there aren't enough hits for dE/dx calculation but they are assigned a value of dE/dx = 0. In this theta range (70-80 degrees) this contribution of events with dE/dx == 0 is negligible, however it may be significant for more forward going tracks with fewer CDC hits.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/halld_sim/issues/190#issuecomment-803665833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXOCVXCJ2ZHPPP3UCDG3HTTEZS5JANCNFSM4Y6RCP3A .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_halld-5Fsim_issues_190-23issuecomment-2D804088315&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=nTWoLox3qePKkU3jkN4zKWpZiD5wwsYi6X23ArE2v3s&m=3buXXumc9zOhC0ayEzPa__xn7qgDf_FZUDkEKCQ1cHU&s=RSFOIEZLFdQiRbcjMjeOteljrlpZK4pQ54lg_AaN3Hw&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ADFBEBRFYPB5FCXXCPLH2Z3TE5FA7ANCNFSM4Y6RCP3A&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=nTWoLox3qePKkU3jkN4zKWpZiD5wwsYi6X23ArE2v3s&m=3buXXumc9zOhC0ayEzPa__xn7qgDf_FZUDkEKCQ1cHU&s=1Y33Si9tve7NSXxiUblaWkfVXIkRmI1RUH3RHPbI0v4&e=.

nsjarvis commented 3 years ago

See pages 7 and 8 of https://halldweb.jlab.org/DocDB/0050/005006/001/NSJ_CDC_MC_spring18_revisited.pdf

The new efficiency plots look slightly odd (doubled axis labels) because they are superimposed not quite perfectly onto some plots from May 2019. I couldn't remake the old plots as I no longer have the data, I'd have to uncache the evio files & regenerate them (I refitted the relative-amplitude data using a folder of amplitude-vs-doca fits in root files which were on one of the JLab disks, a byproduct from when Sean generated the ccdb constants in 2019).

Naomi.

On Mon, Mar 22, 2021 at 12:50 PM Justin Stevens @.***> wrote:

Thanks for the details and the new branch to try for this. My initial idea was just to use the suppression at dmax for all d > dmax, but I like the option for a second slope to characterize the high DOCA region. Do you have any plots showing the hit efficiency vs DOCA for these runs that you tried with this branch so we can see how they compare to the current gain suppression in mcsmear?

-Justin

On Mar 22, 2021, at 10:05 AM, nsjarvis @.***> wrote:

Referring to slide 2 of

https://halldweb.jlab.org/DocDB/0040/004063/001/NSJ_CDC_eff_simulation_16May2019.pdf

The ratio of amplitudes starts to be non-linear for early (good) runs when the DOCA is near to the edge of the straw and for later runs when the peak in the Landau disappears below the threshold. dmax (the max DOCA to be used for dE/dx) was determined using the turning point in a plot of Landau MPV/Sigma (in early runs MPV/Sigma tilts down and in problem runs it turns up) with a little iteration to optimise the dE/dx matching between runs, which does work very well (although the resolution is still awful for the lower-gain later runs).

Removing the suppression after dmax will simulate perfectly behaving straws after dmax; this is not realistic. dmax is only 4mm for the later runs, and at that DOCA the chamber gain is about half of what it would normally be.

I tried to reduce the suppression after dmax by fitting a second line segment to the amplitude ratio data, from dmax to dmax+1mm, and projecting that out to find where the amplitude ratio reaches 0. The results show a lot of variation, but the mean is broadly consistent at 3.3mm throughout the run period. I'll repeat this using dmax to dmax to 0.5mm, 1mm might have been too generous.

I have a branch of halld_sim which uses this second line segment in https://github.com/JeffersonLab/halld_sim/tree/nsj_extend_3_3mm I used it to calculate hit efficiency for a few runs and it looks like it is now overestimating the efficiency for the later runs. With the non-saggy simulation it will be hard to get this right. Peter is trying it out to see what it does to his data. It'll be interesting to see what he finds.

Naomi.

On Sun, Mar 21, 2021 at 5:51 PM Justin Stevens @.***> wrote:

For the gp -> pi0 p channel a plot of the number of hits used in reconstructing proton tracks is linked below vs run number for the 2018 datasets in data (black) and MC (blue). The tracks are selected to be between 70-80 degrees in theta where the majority of these t-channel recoil protons are located for light meson production.

The data/MC are in reasonable agreement at the start of the Spring 2018 run period, but the discrepancy grows with the CDC gas degradation. For Fall 2018 the small discrepancy is constant over the run period. So it appears the gain degradation applied in mcsmear for Spring 2018 reduces the amplitude for hits below threshold more often in simulation than what is observed in data.

Spring 2018: # CDC hits on proton tracks data (black) and MC (blue), right side is MC/data ratio cdc1D_2018_01.pdf < https://github.com/JeffersonLab/halld_sim/files/6178426/cdc1D_2018_01.pdf>

Fall 2018: # CDC hits on proton tracks data (black) and MC (blue), right side is MC/data ratio cdc1D_2018_08.pdf < https://github.com/JeffersonLab/halld_sim/files/6178427/cdc1D_2018_08.pdf>

@nsjarvis https://github.com/nsjarvis, does this loss of hits used in track reconstruction (not dE/dx) seem consistent with a reduction of large DOCA hits in the MC which have amplitudes below threshold due to the gain suppression applied in the CDCSmearer?

https://github.com/JeffersonLab/halld_sim/blob/master/src/programs/Simulation/mcsmear/CDCSmearer.cc#L215

The linear decrease in amplitude leads to a lower hit efficiency in MC at large DOCA than is seen in data (although I realize this is convoluted by the straw sag issue). Should we consider not further suppressing the amplitude for DOCA > dmax, where your slide 2 of

https://halldweb.jlab.org/DocDB/0040/004063/001/NSJ_CDC_eff_simulation_16May2019.pdf shows the ratio of amplitudes starts to be non-linear?

Note about number of hits for dE/dx: the number of hits used in the dE/dx calculation is not available in the DSelector, but for protons the tracks are included in the Analysis TTree even if there aren't enough hits for dE/dx calculation but they are assigned a value of dE/dx = 0. In this theta range (70-80 degrees) this contribution of events with dE/dx == 0 is negligible, however it may be significant for more forward going tracks with fewer CDC hits.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/JeffersonLab/halld_sim/issues/190#issuecomment-803665833 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ADXOCVXCJ2ZHPPP3UCDG3HTTEZS5JANCNFSM4Y6RCP3A

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_halld-5Fsim_issues_190-23issuecomment-2D804088315&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=nTWoLox3qePKkU3jkN4zKWpZiD5wwsYi6X23ArE2v3s&m=3buXXumc9zOhC0ayEzPa__xn7qgDf_FZUDkEKCQ1cHU&s=RSFOIEZLFdQiRbcjMjeOteljrlpZK4pQ54lg_AaN3Hw&e=>, or unsubscribe < https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ADFBEBRFYPB5FCXXCPLH2Z3TE5FA7ANCNFSM4Y6RCP3A&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=nTWoLox3qePKkU3jkN4zKWpZiD5wwsYi6X23ArE2v3s&m=3buXXumc9zOhC0ayEzPa__xn7qgDf_FZUDkEKCQ1cHU&s=1Y33Si9tve7NSXxiUblaWkfVXIkRmI1RUH3RHPbI0v4&e= .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/halld_sim/issues/190#issuecomment-804223749, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXOCVSK6PMWOXOQ4PHPYV3TE5YOHANCNFSM4Y6RCP3A .

nsjarvis commented 3 years ago

There is a set of CDC pulse height histograms for the spring 18 runs in /work/halld/home/gxproj3/cdc_gain_corr/rootfiles The histograms are for hits on tracks from the target at theta=30 degrees and for small intervals of DOCA; the files also contain trees of fit parameters from a Landau fitted to each histogram. The files were generated in August 2019 from plugin output files that have now gone but could be recreated using CDC_amp.

s6pepaul commented 3 years ago

I generated a MC sample with Naomi's mcsmear branch. Here are some of the results: First of all the efficiency vs run number: Screenshot 2021-03-24 at 09 38 23 One can see the huge effect that this change had. Of course the efficiency alone doesn't help that much. So I also extracted the diff cs for the seven batches which I have show before again. Here is before:

Screenshot 2021-03-24 at 14 56 34

And here is after: Screenshot 2021-03-24 at 15 26 40 The general agreement improves a lot, even batches 1-4 seem to agree better, but now batches 5-7 are slightly low. Naomi found a bug in her code which probably (afaik) caused this over estimation of the acceptance (and hence low cs) and fixed it. So, I will redo the study with the updated branch of hers. I hope to have the results available in the next days.

nsjarvis commented 3 years ago

The bug in the mcsmear branch was that I joined the two line segments for the reference run at dmax for the current run, instead of using the reference run's own dmax. This would make the reference run's efficiency decrease too much at DOCA > dmax, and the difference is greatest for the later runs where dmax was 4mm, for the reference run it was 6.5mm. The updated code was pushed into the same github branch this morning. This plot shows the difference between the 2 fixes, using the CDC hit efficiency plugin CDC_Efficiency:

mcdifferences

This plot shows the new fix with the very first attempt (in mcsmear since 2019) and the measured data. The agreement between sim and measured data is now much better.

newmc
s6pepaul commented 3 years ago

I re-ran the MC using the updated mcsmear branch with Naomi's changes and bugfix. Here are the results: First of all the acceptance vs run number Screenshot 2021-03-26 at 07 58 59 As expected the new acceptance is between the two I have shown previously. Extracting the cs per batch here is what I now get for the coherent peak: Screenshot 2021-03-26 at 08 08 00 I think the agreement has improved dramatically! Of course it is still not perfect, but the uncertainties are maybe a bit too large to make definitive statements on the remaining discrepancies.

Just for completeness here are the comparisons between the beam times for all bins in Egamma. What I have shown before in a meeting: Screenshot 2021-03-26 at 08 17 03 and using Naomi's new method in mcsmear: Screenshot 2021-03-26 at 08 02 30

sdobbs commented 3 years ago

These are huge improvements and really great work. It will be interesting to see what Justin sees when he reruns his studies.

Before we leave this topic, as a next step, I'm curious about the 5% difference in the hits-on-track that Justin sees in the Fall 2018 data. Do we have any ideas on what could be causing this? Is this another doca-dependent effect, or some other overall scale effect?

nsjarvis commented 3 years ago

Maybe it's a consequence of not modelling the straw sag. Is the 5% difference present in 2017 and 2019-20?

On Mon, Mar 29, 2021 at 2:04 PM Sean Dobbs @.***> wrote:

These are huge improvements and really great work. It will be interesting to see what Justin sees when he reruns his studies.

Before we leave this topic, as a next step, I'm curious about the 5% difference in the hits-on-track that Justin sees in the Fall 2018 data. Do we have any ideas on what could be causing this? Is this another doca-dependent effect, or some other overall scale effect?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/halld_sim/issues/190#issuecomment-809590017, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXOCVWVT3DITIZEHX3NGQTTGC6EHANCNFSM4Y6RCP3A .

jrstevenjlab commented 3 years ago

I generated exclusive pi0 MC for the 4 runs used in Naomi's hit efficiency plots 40946, 41510, 41860 and 42485. Below are the results for the mean # of hits on proton tracks vs run number with Naomi's new branch in green for these selected runs and the black points for the data are the same as my previous post. As you can see the ratio (right plot) is now much closer to 1 and not decreasing with run number

cdc1D_2018_01

Below are the individual plots of the # of hits on proton tracks for each of these 4 runs. For each plot black is data, red is the "nominal" MC currently in mcsmear, and green is the updated mcsmear in Naomi's new branch.

cdchits_40946 cdchits_41510 cdchits_41860 cdchits_42485

The data is well described by the new branch, especially for the later 2 runs.

Even the two early runs 40946 and 41510 show better agreement with the data than the "nominal" MC which was ~5% to low for the # of hits on tracks in my previous post for both Spring and Fall 2018. Following up on @sdobbs comment, do we want to make a correction to improve those other datasets as well?

jrstevenjlab commented 3 years ago

Following up on my last comment: the ~5% difference I saw in my post on March 21 between the Fall 2018 "nominal MC" and data could be due that sample being rather old (produced last summer) and likely there were other changes since then that could account for this change.

I'll generate a few runs of Fall 2018 with the latest software and post an updated plot of NHit vs run number to verify.

sdobbs commented 3 years ago

Thanks Justin - could you please do the same for 2017 as well? That should cover the data currently under analysis. From the results people have shown, I don't expect there to be a difference, but it would be good to see.

nsjarvis commented 3 years ago

The agreement looks astonishingly good.

40946 and 40510 were from 18 Jan and 26 Feb 2018. The gas problems became noticeable after the new year break. The "reference run" that I matched the others to is 40701, from December 2017. At some point it was designated non-production.

Is the 5% discrepancy only for Fall 2018? or is it there in the run periods before and after 2018?

On Mon, Mar 29, 2021 at 5:57 PM Justin Stevens @.***> wrote:

I generated exclusive pi0 MC for the 4 runs used in Naomi's hit efficiency plots 40946, 41510, 41860 and 42485. Below are the results for the mean # of hits on proton tracks vs run number with Naomi's new branch in green for these selected runs and the black points for the data are the same as my previous post. As you can see the ratio (right plot) is now much closer to 1 and not decreasing with run number

[image: cdc1D_2018_01] https://user-images.githubusercontent.com/13242886/112903765-f5aa6f80-90b5-11eb-8596-7c8040bbab9a.png

Below are the individual plots of the # of hits on proton tracks for each of these 4 runs. For each plot black is data, red is the "nominal" MC currently in mcsmear, and green is the updated mcsmear in Naomi's new branch.

[image: cdchits_40946] https://user-images.githubusercontent.com/13242886/112903827-0ce95d00-90b6-11eb-81d6-86af6ba15202.png [image: cdchits_41510] https://user-images.githubusercontent.com/13242886/112903828-0ce95d00-90b6-11eb-82bb-6e5fede6b619.png [image: cdchits_41860] https://user-images.githubusercontent.com/13242886/112903829-0ce95d00-90b6-11eb-80d1-6fc03eb24228.png [image: cdchits_42485] https://user-images.githubusercontent.com/13242886/112903832-0ce95d00-90b6-11eb-864a-fb8643cf0a0b.png

The data is well described by the new branch, especially for the later 2 runs.

Even the two early runs 40946 and 41510 show better agreement with the data than the "nominal" MC which was ~5% to low for the # of hits on tracks in my previous post for both Spring and Fall 2018. Following up on @sdobbs https://github.com/sdobbs comment, do we want to make a correction to improve those other datasets as well?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/halld_sim/issues/190#issuecomment-809740413, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXOCVXRVIXKENJO55Q3TZ3TGDZUJANCNFSM4Y6RCP3A .

jrstevenjlab commented 3 years ago

To check on the previous discrepancy I generated exclusive pi0 MC for 4 more runs for Fall 2018 50802, 51225, 51365, 51510 and Spring 2017 30496, 30654, 30834 30965 all with Naomi's branch of mcsmear. Plotted below are the # of hits vs run number for data (black) and these 4 runs (green) for tracks with polar angles 70 < theta < 80 degrees. The same plot for Spring 2018 was shown in an earlier post. The agreement is good for all 3 run periods with a slight overestimation of the number of hits on proton tracks in MC.

cdc1D_2017_01 cdc1D_2018_01 cdc1D_2018_08

The range of kinematics for recoil protons in this topology is limited, but below I include more plots for all three run periods for smaller polar angles 50 < theta < 60 degrees. The agreement for these angles is also quite good and likely more relevant for other high mass meson systems with recoiling protons.

cdc1D_2017_01 cdc1D_2018_01 cdc1D_2018_08

Note about angular dependence: in the Spring 2018 (2nd plot above with run numbers in the 40000 range), the mean # of hits on tracks at the end of the run period has dropped much more significantly for 50-60 degrees than it did for the 70-80 degree range. This angular dependence will affect channels differently with a significant -t (and possibly beam energy) dependence, as they populate smaller polar angles with hits in the CDC. This is probably why Peter's Lambda(1520) analysis sees a more dramatic effect than the light meson channels like omega and pi0.

I'd suggest we get this into the master, so more reactions can use it over a wider range of kinematics. @nsjarvis should the constants for the extra line segment be put into a CCDB table so they could be tweaked if needed?

Thanks for getting to the bottom of this @nsjarvis and @s6pepaul!

nsjarvis commented 3 years ago

I cannot imagine why the track angle would have that effect. Maybe it is caused by the difference in proton momentum.

I was also thinking about CCDB. The extra segment uses just 2 constants, one is dmax for the reference run (0.65cm) and the other is the length of the extra segment, 0.33cm. @sdobbs can these be added to CDC/gain_doca_correction ? I would add them for each run just in case they need to be altered later on. Peter's run-specific results should be ready soon.

markito3 commented 3 years ago

I'm not sure the following comment is relevant, but remember one cannot change the format or interpretation of a CCDB table once it is being used in public code. Doing that would break all of our old code.

jrstevenjlab commented 3 years ago

@nsjarvis, you're right the effect I saw for proton tracks could be a momentum-dependence since the momentum and theta are highly correlated for these recoil tracks. Either way, the good news is that the data/MC agreement is maintained even when NHit dependence on run number changes.

About the CCDB table: since these new constants are the same for the full Spring 2018 dataset, I'd suggest making a new table for these two constants, which has one entry that covers the full range of runs, rather than trying to modify or re-interpret the table that's already in use on a run-by-run basis.

nsjarvis commented 3 years ago

I was thinking of adding 2 columns to the existing table but apparently that's impossible so I'll just make a new table to hold the new columns. No problem. At present it's just two numbers.

nsjarvis commented 3 years ago

PR https://github.com/JeffersonLab/halld_sim/pull/193

jrstevenjlab commented 3 years ago

Thanks Naomi, closing this issue with the merged PR #193

nsjarvis commented 3 years ago

GlueX-doc-5023