The Charge Correction Method (CCM) corrects the waveform obtained in tct measurements of irradiated samples by considering the integrated charge of the waveform. This function takes tct measurements from a single, irradiated sample and returns the trapping time required to correct for losses in the original signal due to trapping.
TODO
The function consists of 3 main loops:
CCM takes 3 arguments:
The first portion of the function simply imports the trapping times and fit limits from the data files.
Next, using one of the candidate trapping times - each waveform from the data set is multiplied by a correcting factor: exp(t/Tau), where Tau is the candidate trapping time.
NB To compare the uncorrected waveform with the corrected waveforms in this analysis, set one of the candidate trapping times to 0. In reality a trapping time of zero would mean that all charges in the sample were trapped and no signal produced - this is very unfeasible for the fluences in this irradiation study! A trapping time of infinity is equivalent to none of the charges being trapped in the sample - or how the signal would look if tct measurements were performed on an unirradiated sample. Since infinity is a difficult concept to feed into the program, Tau=0, an unphysical concept is used instead.
This waveform is then integrated to obtain the charge collected by the sensor, so the next part of the code calls one of two functions to establish limits for this integration. As the waveform is being corrected by a time-dependent exponentiated function, it is not reasonable to deduce the integration limits from it. Instead one of three methods are used:
Given that the systematic errors of the tct setup used are practically negligible (William, this could be something you and Christian figure out together! I did it for my Edinburgh setup and the error was too small to be worth considering), the noise floor is set as the error on each data point in the waveform. The error is propagated accordingly for integration and returned along with the integrated charge.
In the next part of the analysis we plot the modified charge vs. bias for one device. Above full depletion the entire charge injected into the bulk should be collected and so the charge vs. bias plot should remain constant after a given bias voltage (see example plot). Unmodified, the charge will be underestimated for sensors that have undergone high fluence irradiation.
To establish the trapping time that results in the flattest straight line, the corrected charge vs. bias graph is fitted, above depletion with a straight line function. The trapping time that returns the fit with the gradient closest to zero is selected as the best fit trapping time. Examples of this process in both Gnuplot and ROOT, using the Chi-squared least squares minimisation, are shown below for corrected, integrated charge data from a 1E14 neq fluence, 70 MeV proton irradiated MCz sensor, using 20 ns correction, over a series of bias voltages.
| |
Aside Please note that the Chi-square and Q-factor (or probablilty) differ in the fit results using Gnuplot and ROOT by 0.01. This is probably due to the different ways each software treats the propagated errors from the data points but for all intents and purposes both fits return equal parameters and errors on parameters.
To propagate the result of the fit an in-program fitter is needed. Practically, this is done by saving the charge, error from integration, and bias information to a ROOT TGraphErrors object, so ROOT inline fitting can be utilised ( http://root.cern.ch/root/html/tutorials/graphs/gerrors.C.html ). The linear function used to fit the plot contains the following snippet:
if(x[0] == -470 || x[0] == -425){ TF1::RejectPoint(); }
In this case the charge data obtained at -470V and -425V was erroneous in some way and we want to exclude those points from the fit. It is up to the user to decide what should be excluded from the fit. Simply comment out the code if not used.
It is worth noting that the fit limits are set eternally because not all sensors are tested over the same voltage range.
For each lower limit on the straight line fit, the trapping time which produces a corrected charge vs. bias graph closest to 0 will be selected. All of the best trapping times for each fit lower limit are then averaged, the result is taken to be the optimal trapping time from the list provided.
| | | |
The plots above are examples of the importance of picking a good limit for the straight line fit.
NB: This function will
The plots show information about the straight line fit. ROOT uses a minimum chi-squared, least squares fitting and this information can be plotted to deduce the quality of the fit, along with the deduced parameters. Ideally:
Be sure to look at the equivalent plots for your data set when running the function to check that the fit data seems reasonable.
When setting limits on the fit: it is best to use as large a fit range as possible but, by eye, make sure that the lower limit on this fit range is sufficiently within the full depletion region. The function will then average the trapping times for each fit range.
The function can selectively output data and plots relating to the correction method by setting the compile time variable `SAVE' to 1 or 0.
If SAVE is set to 1, all outputs are saved to a directory, made in the same directory the program is run from. The folder is called `outputs'.
Outputs are saved in 3 types of subdirectory:
#Timestamp 0 #DUT MCz_1E14 #Bias -570 #Xscale 1e-9 #Yscale 1e-3 #Npoints 2000 Time [ns] Device response [mV] 0 -0.423608 0.05 -0.424668 0.1 -0.425731 0.15 -0.426797 0.2 -0.427865 0.25 -0.428936 0.3 -0.43001
#bias integratedCharge errorOnCharge -100 10376 37.6663 -105 10451.2 37.1652 -10 2574.19 32.2102 -110 10492.6 37.2492 -115 10497.2 36.7423 -120 10427.1 36.4863
#tau fitUpperLimit gradient error_on_gradient reducedChiSquare Q-value 0 -200 -0.56066 0.0166714 1.60176 3.38122e-05 4 -200 5.53956 0.0166714 141.064 0 6 -200 2.20182 0.0166714 22.5478 0
Major updates:
-- RebeccaCarney - 16-July-2014
%RESPONSIBLE% RebeccaCarney
%REVIEW% Never reviewed
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
png | CCM_-100_fitted.png | r1 | manage | 115.6 K | 2014-07-23 - 10:41 | RebeccaCarney | Fit limit examples |
png | CCM_-200_fitted.png | r1 | manage | 104.3 K | 2014-07-23 - 10:41 | RebeccaCarney | Fit limit examples |
png | CCM_-400_fitted.png | r1 | manage | 106.7 K | 2014-07-23 - 10:41 | RebeccaCarney | Fit limit examples |
png | CCM_-700_fitted.png | r1 | manage | 111.2 K | 2014-07-23 - 10:41 | RebeccaCarney | Fit limit examples |
png | CCM_20_fitted.png | r1 | manage | 129.0 K | 2014-07-22 - 11:34 | RebeccaCarney | CCM_20_fitted_gnuplot.png |
png | fitParsPlot_-200.png | r1 | manage | 89.8 K | 2014-07-25 - 11:15 | RebeccaCarney | fitParsPlot_-200.png |
png | fit_-300_20.png | r1 | manage | 150.5 K | 2014-07-22 - 11:40 | RebeccaCarney | fit_-300_20.png |
png | twikiPlot_fittedCCM.png | r1 | manage | 199.7 K | 2014-07-21 - 12:55 | RebeccaCarney | twikiPlot_fittedCCM.png |
twikiPlot_modifiedWaveform.pdf | r1 | manage | 45.5 K | 2014-07-17 - 15:33 | RebeccaCarney | twikiPlot_modifiedWaveform.png | |
png | twikiPlot_modifiedWaveform.png | r1 | manage | 133.9 K | 2014-07-17 - 15:35 | RebeccaCarney | twikiPlot_modifiedWaveform |
eps | twikiPlot_waveform_w_limits.eps | r1 | manage | 42.5 K | 2014-07-21 - 11:22 | RebeccaCarney | twikiPlot_waveform_w_limits.eps |
png | twikiPlot_waveform_w_limits.png | r1 | manage | 175.6 K | 2014-07-21 - 11:22 | RebeccaCarney | twikiPlot_waveform_w_limits.png |
png | waveformComparison_-800.png | r1 | manage | 121.3 K | 2014-07-25 - 11:18 | RebeccaCarney | waveformComparison_-800.png |