Vindaar / TimepixAnalysis

Contains code related to calibration and analysis of Timepix based detector + CAST related code
MIT License
19 stars 6 forks source link

Investigate different methods for energy calibration #32

Closed Vindaar closed 9 months ago

Vindaar commented 5 years ago

We have 3 different methods to calibrate the energy of events in a given run.

  1. Assume every hit pixel is a primary electron, and thus corresponds to an energy of ~26 eV via theory. If a calibration run is available, we can fit the spectrum and calculate the correct energy from the hits spectrum with the known photopeak of the source. This should result in an upper bound on the energy, due to double hits of neighboring pixels. Relevant code: https://github.com/Vindaar/TimepixAnalysis/blob/master/Analysis/ingrid/calibration.nim#L860-L887
  2. Use the ToT calibration available for the chip to calculate the number of electrons based on the number of clock cycles. Then calculate the total charge for a given event. Finally calculate the gas gain from a fit to the polya distribution. Use the total charge and the gas gain to calculate the number of pixels that must have been hit, assuming each hit was at the mean gas gain. This should result in a lower bound on the energy, due to losses of charge for cases where the gas amplification was too low to cross the threshold of an individual pixel. Relevant code: not implemented
  3. The proper way: Take a calibration run and fit to the spectrum of that based on the charge. From here we get a direct measure between the energy (known from the photo- and escapepeak) and the charge. But, this only holds for the same gas gain! So in the best case one has access to many calibration runs for a given chip. These will all be at slightly different gas gains. From that perform a fit to the location of the photopeaks in charge and the gas gain. Results in a linear fit between the two like: gas gain charge calib Relevant code: https://github.com/Vindaar/TimepixAnalysis/blob/master/Analysis/ingrid/calibration.nim#L889-L958

The fact that we have many hours of calibration data for the CAST detector allows us to do the following: perform energy calibrations based on all 3 methods presented above and compare them. Potentially this way we can find a relationship between the calculation based purely on the total charge and the calculation based on the number of hit pixels. Then we could get a decent calibration on energy for background runs purely based on the ToT calibration.

Vindaar commented 9 months ago

This has all been implemented. Even though we have never done a formal comparison, using the fit of all gas gains vs. the calibration factor for many different calibration runs works reasonably well.