SiWECAL-TestBeam / SiWECAL-TB-monitoring

Event-based almost-online monitoring for the SiW ECAL
GNU General Public License v3.0
0 stars 3 forks source link

Indices of pedestal file #19

Open yuichiok opened 2 years ago

yuichiok commented 2 years ago

In the pedestal file we used for monitoring, I see that the number of entry in indices and the actual pedestal values don't match.

The indices in this pedestal file for a single sca is labelled as:

ped0 ped_rms0 noise_incoherent_ped0 noise_coherent1_ped0 noise_coherent2_ped0

whereas the actual entries are

250.593 0.0191315 1.29642 1 1 1

My guess is that the entry index ped_err0 might be missing. Perhaps it's an error in pedestal file production? I will see later and add a commit to here. In any case, it was another major source of bug for eventbuilding since reading pedestal relies on this index number. Second peak we observed for hit_energy we saw during the last meeting has now disappeared.

airqui commented 2 years ago

My guess is that the entry index ped_err0 might be missing

it seems so.

kunathj commented 2 years ago

I did some git history searching:

  1. The bug appears here: https://github.com/SiWECAL-TestBeam/SiWECAL-TB-analysis/commit/fb8789eaa101317d6a05aa60c80114d83350d49c#. As you wrote, you forgot ped_err0, ped_err1 etc in the header when you made this change. June 13.
  2. But you spotted the bug in https://github.com/SiWECAL-TestBeam/SiWECAL-TB-analysis/commit/54f913d022d4a00d8df929b41539d4bf90202469. June 15.

I assume that the pedestal file was produced with the (1.) software version? If my interpretation is correct, this issue can be closed. But yes, all event building with this pedestal file has to be redone with the fixed file (FIX: add missing keywords to the header line). Has the same pedestal file be used for eventbuilding of a MIP run? I am surprised that this was not spotted before, the MIP spectrum must have been horrible.

kunathj commented 2 years ago

Btw, I would classify this as a TB-analysis issue. As can be seen from this (fixed?) bug, the issue is in the input to the event building. And this input is provided by the (changing) TB-analysis scripts.

yuichiok commented 2 years ago

@kunathj Thanks for digging into the git history. Indeed the problem seems to come from the software version since the pedestal file was produced in 13/06. I do remember that bug in (2) and I supposed that the pedestal file was produced according to this but I gurss it didn't get through in time. The eventbuilding should be redone and I will take care of this after confirming with other bug checks.

Btw, I would classify this as a TB-analysis issue. As can be seen from this (fixed?) bug, the issue is in the input to the event building. And this input is provided by the (changing) TB-analysis scripts.

I agree, I realized this as I was typing the issue :P Will post there from now on.

airqui commented 2 years ago

Hi, sorry that I reopen it, I only do it for commenting.

The file of pedestal is wrong because is a dummy file, made with the software that was in place. It is dummy in the sense that the good pedestal files are to be produced with the dedicated pedestal runs (with an analysis of coherent and incoherent noise) and these do not expect the ped_error value but only

The file that was used during the eventbuilding was created from the muon runs, just looking at "hit bit 0" entries.

Bottom line, 1) just correct the Pedestal file header for the moment 2) eventually someone would need to produce new pedestal files and mip calibration files

airqui commented 2 years ago

header line). Has the same pedestal file be used for eventbuilding of a MIP run? I am surprised that this was not spotted before, the MIP spectrum must have been horrible.

I did not use it for the production of the MIP values (I did pedestal and mip at the same time). But yes, it is "surprising" that no one noticed anything wrong in the MIP spectrum of the event built files...

airqui commented 2 years ago

Btw, I would classify this as a TB-analysis issue.

me too

kunathj commented 2 years ago

I did not use it for the production of the MIP values (I did pedestal and mip at the same time).

That explains it.

My dream would be to have one defined schema for the pedestal/MIP/masking, that is followed in all scripts in the TB-analysis repo. Meaning, a place where it is written down: