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

Feature/adc droop calib #161

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Feature/adc droop calib #161

wants to merge 2 commits into from

Conversation

seg188
Copy link
Member

@seg188 seg188 commented Feb 21, 2025

Two main updates in this branch: an implementation of "ADC droop" calibration, and an update to the threshold filter to use channel-by-channel extracted thresholds.

ADC "droop" Calibration

Firstly, a calibration for the ADC instability ("ADC droop") effect is implemented.

A brief summary of what is included is below, and some more details on the effect and the mechanism can be found here: https://indico.fnal.gov/event/67027/contributions/307766/attachments/184558/253844/workshop%2001_24_25-1.pdf

For each chip in an event, the values of the chip V_ref and V_cm for the ADC are simulated (as a function of time and the number of hits in the event). The model for these voltages is a "step" impulse with an exponential decay back to baseline. This includes 4 parameters (2 for each V_cm and V_ref): the impulse size and the RC constant of the exponential decay. The initial values for these parameters are taken from bench top tests with the LArPix tiles. However, these tests were performed at room temperature, and the behavior of the ASIC, as well as the R and C values for the relevant board components will vary by ~10-20% from room temperature to LAr. Thus, in order to ensure the parameters used accurately reflect data, a systematic scan of events is performed. The procedure is described below:

  1. Fix values for the parameters and perform the calibration.
  2. For each chip and for each event, select "at threshold" hits (hits with dataword <5ke-, which is approx. the channel threshold )
  3. Fit a line to hit charge vs. time. For a proper calibration, these "at threshold" hits should be ~flat in time.
  4. Histogram the slope for each chip.
  5. Iterate on parameters with a maximum 10% deviation from benchtop values until the distribution of slopes is unbiased from 0.

A sample line fit and the histograms of line slopes for raw and calibrated data are included below.

Screen Shot 2025-02-20 at 6 44 24 PM Screen Shot 2025-02-20 at 6 45 40 PM

The calibrated value is stored in the field "Q" for both calib_final_hits and calib_prompt_hits. The uncalibrated value is also stored in the field "Q_raw" for both of these.

Threshold Filter

Rather than assuming a uniform threshold (essentially giving a hard cut off of data word below the fixed value), a channel by channel threshold value is used. These thresholds are specified in a json file of the same format implemented in larnd-sim. It should be confirmed that changes in the encoding of these thresholds stay consistent between larnd-sim and ndlar_flow.

Some distributions for. a sample data file are included below showing Q_raw for unfiltered hits ("raw"), Q for unfiltered hits ("calibrated") , and Q for filtered hits ("final").

Figure 5

Note that, although all of these changes are being pushed together, its very simple to disentangle the effects of each in further analysis. Because Q_raw is stored, its simple to study just the impact of the new filter. Similarly, the impact of the calibration alone can be understood by using calib_prompt_hits.

@seg188 seg188 requested a review from krwood February 21, 2025 03:07
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

Successfully merging this pull request may close these issues.

1 participant