bradylowe / slac-test-beam-quartz-analysis

This repo provides code and explanation for analyzing Root files containing quartz cerenkov detector data.
0 stars 1 forks source link

Gain conversion from ADC units to PEs is inverted #1

Open cameronc137 opened 5 years ago

cameronc137 commented 5 years ago

I'm fairly certain that the conversion should be considered as NPEs factor (units of electrons) = (ADC charge/channel electrons/Coulomb)/(PMT multiplicative gain), which for our setup is ~ 200e-15(1/1.602e-19)/(gain like 1e7) ~ 0.1 or so, and then multiplying this by the number of channels above pedestal gives reasonable numbers like 40 PEs for my run 136 (instead of 4500 PEs which is definitely wrong).

The culprit is the variable onePEsig getting divided in a few places instead of multiplied

https://github.com/bradylowe/slac-test-beam-quartz-analysis/blob/0da8f191c8527afb4bd61ba9da8b34e9f12010a2/pmt_analyzer.c#L212

bradylowe commented 5 years ago

I think the issue is that the variable "onePEsig" is read in from the file signal_by_hv_and_pmt.csv, but there are no values present for your PMTs. Only PMTs 1-6 are currently in this file.

In this file are the values (pmt,hv,onePEsig) where onePEsig is the number of channels 1-PE makes on the given ADC sensitivity for the given PMT and voltage.

The number of channels for the 1-PE signal is equal to e * gain / (200e-15), just like you have above. The number of PEs is going to be the signal size in channels divided by the number of channels from 1-PE.

When I analyze run 136 with pmt_analyzer.c, it tells me that there are 188 PEs per electron.

cameronc137 commented 5 years ago

I added my gain to the csv, where my number is 0.08917 = 200e-15/(1.4e7 (gain) * 1.602e-19)

I meant run 436 sorry, but I think you may find 188 is too large for 136 too? Or of course my PMT may just have a different gain enough that the inverse of mine looks like the kinds of numbers you are putting in. We can figure it out in general on Friday if needed