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

Single p.e. response file of lstchain is outdated #40

Open
Mitsunari-Takahashi opened this issue Apr 5, 2022 · 16 comments
Open

Single p.e. response file of lstchain is outdated #40

Mitsunari-Takahashi opened this issue Apr 5, 2022 · 16 comments

Comments

@Mitsunari-Takahashi
Copy link
Collaborator

I found lstchain has SinglePhE_ResponseInPhE_expo2Gaus.dat in the data directory. That file was produced by me but is outdated. The spectrum has a bump caused by an analytical problem at ~3 p.e., and I had updated the analysis and had shared the latest version SinglePhe_spectrum_totalfit_19pixel-average_20200601.csv via https://forge.in2p3.fr/issues/21202. You can see the difference in the attached plot (Blue: old; Red: new):
singlepe-spectra-difference
Could you replace the lstchain file?

@moralejo
Copy link
Collaborator

moralejo commented Apr 5, 2022

Hi @Mitsunari-Takahashi, thanks! You can also commit the file to the sim-telarray branch of this repo. But I think the file name should contain "LST1" for clarity. Perhaps @Voutsi or @mexanick can comment.

@moralejo
Copy link
Collaborator

moralejo commented Apr 6, 2022

@YusukeSuda, this new file contains only the single-p.e. response. Do you know who made the file which contains also the afterpulse spectrum? We need to create a new one with these new data from @Mitsunari-Takahashi

@YusukeSuda
Copy link
Collaborator

Hi @moralejo, I think the afterpulse spectrum was folded by Konrad.

@maxnoe
Copy link
Member

maxnoe commented Apr 6, 2022

Why is this file even included with lstchain? For what is it needed there?

@jsitarek
Copy link
Collaborator

jsitarek commented Apr 6, 2022

Hi Max, it seems to be used in the waveform_nsb_tuning

@moralejo
Copy link
Collaborator

moralejo commented Apr 6, 2022

Hi @moralejo, I think the afterpulse spectrum was folded by Konrad.

unless we need to update also that (?) I think one just has to take the AP spectrum from the current file and put it in the same format together with the new single phe response. @Mitsunari-Takahashi can you please take care ot that?

@YusukeSuda: I saw probably some tweaking of the data (rebinning) will be needed. Perhaps it is better that you discuss this with Konrad and Orel? - will also be used in Prod6...

@orelgueta
Copy link

I used the norm_spe tool to fold the afterpulse (orange curve in spe_comp_new_AP2.pdf) with the single p.e. spectrum from @Mitsunari-Takahashi. The exact command used is

./norm_spe -r 0.02,42 -a LST_afterpulses.dat SinglePhe_spectrum_totalfit_19pixel-average_20200601.dat >| spe_with_prompt_from_Mitsunari.dat

The resulting spectrum is compared to the one used in Prod5 in pmResponse-LST.pdf and pmResponseZoomed-LST.pdf. The difference is quite small, but it's always better to use the most accurate info we have, so we plan to use it in Prod6. The new curve in tabulated form is in spe_with_prompt_from_Mitsunari.txt

@Mitsunari-Takahashi
Copy link
Collaborator Author

Sorry, I had forgotten this issue. For MC production, you are going to the spectrum that @orelgueta folded the afterpulse, am I correct? Should we commit it to the sim-telarray branch?

Also for the lstchain NSB tuning, the spectrum should be updated, right? @moralejo I will make a pull request if so.

@orelgueta
Copy link

Just to confirm, we will use the new spectrum in Prod6. If you want to add the exact same file as we use, I attach it here (spe_LST_2022-04-27_AP2.0e-4.dat.txt).

It is the same as before, but with a short additional comment at the top. Please note the file extension should be .dat. I added the .txt just because GitHub doesn't allow the .dat extension.

Mitsunari-Takahashi added a commit that referenced this issue Feb 7, 2024
Replace the single-photoelectron spectrum by a new file. See the discussion in #40
@Mitsunari-Takahashi
Copy link
Collaborator Author

Thank you @orelgueta , I committed the file to the sim-telarray branch. (I modified the file name to spe_LST1_2022-04-27_AP2.0e-4.dat following Abelardo's suggestion.) The old file was removed to avoid confusion.

For the NSB tuning, shouldn't the spe spectrum also the AP-folded one? Currently a AP-free spectrum is referred in lstchain. What do you think? @moralejo

Mitsunari-Takahashi added a commit to Mitsunari-Takahashi/cta-lstchain that referenced this issue Feb 27, 2024
@moralejo
Copy link
Collaborator

moralejo commented Nov 7, 2024

Thank you @orelgueta , I committed the file to the sim-telarray branch. (I modified the file name to spe_LST1_2022-04-27_AP2.0e-4.dat following Abelardo's suggestion.) The old file was removed to avoid confusion.

For the NSB tuning, shouldn't the spe spectrum also the AP-folded one? Currently a AP-free spectrum is referred in lstchain. What do you think? @moralejo

Sorry, this was long abandoned...

The current lstchain NSB tuning (addition of noise in the waveforms) is indeed neglecting afterpulses.

I do not think that adding the AP spectrum to the "prompt signal" spectrum is the way to do do the NSB addition, right? Each NSB p.e. would produce a signal with probability according to the prompt spectrum, plus a fraction of them would trigger (later in time, not in the same event) an afterpulse according to the AP spectrum.

@Mitsunari-Takahashi
Copy link
Collaborator Author

Thank you for the answer @moralejo

So you mean that if the AP spectrum is folded with the NSB one, APs are wrongly correlated with the NSB photons in the same event, correct? Then let's keep the NSB spectrum free from AP and implement the NSB-origin AP in the future if needed.

@moralejo
Copy link
Collaborator

moralejo commented Nov 8, 2024

Thank you for the answer @moralejo

So you mean that if the AP spectrum is folded with the NSB one, APs are wrongly correlated with the NSB photons in the same event, correct? Then let's keep the NSB spectrum free from AP and implement the NSB-origin AP in the future if needed.

Introducing a correlation with the prompt NSB signal would indeed be artificial, but I do not think that is what would happen if we put the prompt and AP spectra together. Instead, it would make that an NSB photon produces either an after pulse or a prompt signal, but not both, and I think that is not correct. But perhaps someone among you can clarify it.

@Mitsunari-Takahashi
Copy link
Collaborator Author

I'm a bit confused... If the simulation of an NSB photon produces a prompt signal or an AP, I think it's practically consistent with the real process. Some prompt NSB signals may incorrectly disappear because of the AP production, but such a case is sufficiently rare.

Do you know who implemented the NSB waveform tuning? I'd like to ask her/him to comment.

@moralejo
Copy link
Collaborator

I'm a bit confused... If the simulation of an NSB photon produces a prompt signal or an AP, I think it's practically consistent with the real process.

Sorry, I am no expert in PMTs... and I confused you. If it really is the case that a given photoelectron produces either:

  • nothing (since the single pe response curve reaches 0)
  • a non-zero prompt signal
  • an afterpulse (usecs later)

then I agree with you. Only that it is not the "folding", but just the (weighted) sum of the prompt single-pe-response curve (or "spectrum") and the after-pulsing spectrum that would do the job. With weights (1 - afterpulsing_ratio, afterpulsing_ratio)

Some prompt NSB signals may incorrectly disappear because of the AP production, but such a case is sufficiently rare.

I think you are right, yes... even if a p.e. can produce both a prompt and an AP, since the after pulsing rate is <<1 , the approach would be roughly correct - probably the curves are not known with enough precision to make a difference.

Do you know who implemented the NSB waveform tuning? I'd like to ask her/him to comment.

Gabriel Emery implemented it. I think with our standard LST analysis (with cleaning etc) this is unlikely to make a significant difference, so I would not declare the already produced high-NSB MC deprecated. But it is good to fix this for the future.

@Mitsunari-Takahashi
Copy link
Collaborator Author

Only that it is not the "folding", but just the (weighted) sum of the prompt single-pe-response curve (or "spectrum") and the after-pulsing spectrum that would do the job. With weights (1 - afterpulsing_ratio, afterpulsing_ratio)

Okay, now it seems clearer to me. I think realizing the weighted sum in MC is a matter of implementation.

I think with our standard LST analysis (with cleaning etc) this is unlikely to make a significant difference, so I would not declare the already produced high-NSB MC deprecated. But it is good to fix this for the future.

I agree. No problem up to now, but in a situation we need to analyze extremely high-NSB data in the future, probably we are too busy to do this.

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

6 participants