# Fitting to Pedestal Peaks

I have been working on fitting the pedestal peaks for each ADC channel in each pedestal run from the 1996 beam time. By doing this, it is possible to determine an individual threshold for all 74 ADC channels, below which we can do a common mode noise subtraction using the appropriately correlated subgroups.

After fitting several different functions to the pedestal peaks, I concluded that the best function to use for this purpose is an American trapezoid, superposed onto a broad gaussian for the background. This function results in the lowest chi-squared value, and is fairly robust. The chi-squared values are on the order of 1.0 to 1.5 . A typical fit is shown below, where the 'threshold' value is the intersection of the extrapolation of the right side of the trapezoid with the x-axis.

I have tested the results of these fits on the illuminated crystals of three different 70 MeV/c e+ runs from the summer '96 data. First, I did a common mode noise subtraction with uniform thresholds of 45, 60, and 100. Next, I fit the pedestal peaks from the data runs themselves, and used the resulting thresholds for the common mode noise subtraction. Finally, I fit the nearest pedestal run prior to the actual data runs, and used those thresholds for the noise subtraction. Below is an example of the fits to the 74 ADC channels of pedestal run 170.

To test the results, I plotted the pedestal peaks of the illuminated crystals in data runs 028, 042, and 065, and recorded their rms values. The rms values were calculated in PAW, by projecting the pedestal peak into a one dimensional histogram with limits [-45:45]. The pedestal peaks were projected from the first 50k events in the data run. The results are shown below:

```Run 065:

crystal		rms	rms of ped.	rms of ped.	rms of ped.	rms of ped.
(ADC	 	thr=45 	thresh = 60     thresh = 100    fit to ped run  fit to data run
channel)						064		065

1		6.58	7.12		8.84		7.22		8.06
2		9.45	9.71		10.90		9.74		10.25
3		10.47	10.59		11.19		10.62		10.72
4		8.61	9.02		10.38		9.08		9.69
11		8.21	8.46		9.41		8.52		9.08
12		11.59	11.68		12.16		11.73		11.89
13		10.59	10.70		11.42		10.73		11.11
14		6.23	6.51		7.65		6.56		7.31
15		4.38	4.83		6.26		4.92		5.53
20		4.41	4.65		5.46		4.72		4.97
21		6.95	7.01		7.24		6.98		7.01
22		8.12	8.14		8.47		8.19		8.24
23		5.39	5.33		5.33		5.30		5.26

Run 028:

crystal         rms     rms of ped.     rms of ped.     rms of ped.     rms of ped.
(ADC            thr=45  thresh = 60     thresh = 100    fit to ped run  fit to data\$
channel)                                                027             028

13		6.95	7.08		7.87		7.29		7.45
14		9.30	9.40		9.74		9.46		9.50
22		5.51	5.52		5.54		5.52		5.52
23		11.02	11.34		12.57		11.78		12.16
24		11.00	11.21		12.07		11.53		11.73
31		7.21	7.23		7.54		7.32		7.43

Run 042:

crystal         rms     rms of ped.     rms of ped.     rms of ped.     rms of ped.
(ADC            thr=45  thresh = 60     thresh = 100    fit to ped run  fit to data\$
channel)                                                041             042

29		3.05	3.35		4.55		3.11		3.97
30		5.84	5.95		6.65		5.86		6.32
31		8.96	9.00		9.13		8.98		9.03
32		8.97	8.96		9.27		8.97		9.05
33		8.49	8.70		9.66		8.60		8.87
36		4.73	5.15		6.55		5.24		5.45
37		9.77	9.91		10.76		9.88		10.02
38		11.32	11.36		12.18		11.34		11.90

```

### Conclusions

From the above data, we can see that the fits to the pedestal runs are more effective than the fits to the data runs in determining noise thresholds. However, there is some discrepancy between the results obtained by fits to the pedestal runs and an arbitrary lower threshold. In runs 028 and 065, it appears that the arbitrary threshold of 60 or 45 is more effective than the results of the fitting to pedestal runs 027 and 064 respectively, while run 042 shows the opposite effect. This can be explained by looking at the threshold values for run 041. In run 041, all of the 74 ADC thresholds are below 60. This means that a uniform threshold of 60 is too high, because it includes some of the real signal in the common mode noise subtraction. Consequently, the pedestal peak is wider for a threshold of 60 in run 042. However, if we choose a lower uniform threshold of 45, which is lower than the average threshold from the fits to run 041, we can see that the pedestal peak rms value is a minimum because we have completely cut the signal out of the noise subtraction. The disadvantage to this idea is that by cutting all of the signal out of the noise subtraction, we have to include higher energy noise in the signal.

I would recommend that we use the fitted thresholds from the pedestal runs in the noise subtraction for the data runs. This way, we can maximize the decoupling of the noise and the signal in our noise subtraction.