TIGRESS Gain Matching

From tigwiki

Jump to: navigation, search

Go to this page: TIGRESS Gainmatching Page

Contents

[edit] General considerations

The raw TIG10 waveforms are in units of ADC samples. There 214(16384) samples over a 1V or 4V range. For a TIGRESS HPGe clover with the standard 100 mV/MeV (into 50 Ω) and the TIG10 on the 1V scale, each ADC step is 0.6keV. These gains should be stable provided the same TIG10 channels are used for each detector channel.

[edit] The gainmatch command-line script

~/tigcol2/gainmatch-cp/gainmatch datasource [ dispn [ source [ maxerror [ which ] ] ] ]
  • The code must be run from the folder ~/tigcol2/gainmatch-cp
  • datasource: From where to get the spectra, e.g. from a file (/tig/midtig02_data1/tigress/apr08/) or an online analyzer (midtig02:9090).
    • You can find the data file by looking in the ODB under /Logger/Data dir.
    • If you want to access a midtig02 file like /data1/tigress/apr08/his03947.root from a different computer, you have to put on the prefix for the cluster, e.g. /tig/midtig02_data1/tigress/apr08/his03947.root.
  • dispn: Expected dispersion in ADC units per keV (Channel where your peak appears divided by the peak energy in keV). Defaults to 1.5/keV
  • The sources available are: "y88", "co60", "cs137", "eu152", "na22", "csco", "triple", "bi207"
  • Example: To fit co60 peaks in spectra 0-10 run ./gainmatch his01971.root 1.5 co60 25 0-10

Output: Det# 569.7 1063.7 FWHMs ... Areas ... Peak:Total Gains ...

00   894.0 1669.3   2.35   2.58      2936   1450   P/T: 15.5%   0.63727 0.63717
01   874.9 1631.7   3.95   3.22       272     68   P/T:  6.1%   0.65119 0.65187
02   894.9 1670.9   3.79   3.27       268     70   P/T:  6.0%   0.63661 0.63656
03   913.8 1704.8   3.67   2.23       254     46   P/T:  5.6%   0.62343 0.62391
04   896.6 1675.1   4.05   2.98       295     97   P/T:  6.7%   0.63540 0.63499
05   887.7 1656.6   3.73   2.57        62     32   P/T:  3.7%   0.64179 0.64209
06   913.9 1706.4   3.77   2.94        83     37   P/T:  4.5%   0.62339 0.62333
07   890.0 1661.3   3.14   3.11       152     89   P/T:  6.7%   0.64013 0.64027
08   876.5 1635.7   2.94   3.97        61     39   P/T:  3.9%   0.64994 0.65028
09   891.7 1664.3   2.38   2.59      2923   1453   P/T: 15.5%   0.63889 0.63910

  • Example: To fit 207Bi source data in the first 4 Clovers run ./gainmatch his01972.root 1.5 bi207 100 0-9,30-49,60-69
  • Example: To fit the 27 Ge crystals: ./gainmatch /data1/tigress/tests/his04822.root 4.0 co60 50 0-10,20-39,50-69,80-99,110-119,180-189,200-219,230-249,260-279,290-309,320-339,350-369,380-399,410-439,440-459,470-479
  • If you are happy with the calculated gains now load them into the odb. See #Gainsload script: Loading the gain coefficients into the Tig-10s

[edit] Hardware gainmatching

Within the electronics there is already a division to renormalise the energy after the integration (to preserve the original gains, the attenuation factor should be chosen the same as the integration time). This parameter allows the gain to be adjusted. This parameter is an integer, so to enable a more precise adjustment, the attenuation factor is first multiplied by 64, then divided by (gain-coefficient*dispersion), then 64 times the integrated charge is divided by this. (**Note This division does not need a fast divider). Note The range of the attenuation factor is 16bits unsigned, so care needs to be taken to not overflow this range.

The analyser has been changed so that Ge-Energy spectra have dispersion = 4 chan/keV. This value set by odb parameter Analyzer/Parameters/Cathode/Charge_Dispersion - currently only used at analyser startup, when histograms are created. The gainmatching script does not work correctly with dispersion other than 1 (probably due to some parts using channels, others using calibrated units).

To gainmatch - set hardware gainmatching off, analyser dispersion=1, take source data, fit with script, and load resulting gains into odb, set hardware gainmatching on, analyser dispersion = 4 (or whatever is chosen in trigger settings). Check gains are correct: The automatic script usually makes some mistakes - the original source data can ually just be re-fit in this case.

[edit] Gainsload script: Loading the gain coefficients into the Tig-10s

  • Run #The gainmatch command-line script above to calculate the gains
  • Save the entire output (include the line with the headings 'Det# ' etc.) in a text file called for example gainsfile.dat
  • Check that you are happy with the gains calculated
  • run ~/tigcol2/gainmatch/gainsload gainsfile.dat
  • The gains are now loaded into the TIGRESS odb
  • Start a run with 'Hardware gainmatching' enabled

[edit] Software gainmatching

The hardware gain matching means that there is not a direct relationship between reported charge and pulse size. If hardware gainmatching is used, any subsequent processing (e.g. waveform analysis) must take this fact into account. Software gainmatching is an option.

Using a peak finding code getpeaks, the gains and offsets can be determined and used in the online analyser. The peaks are fitted with gaussian distributions using getpeaks in ~/tigcol2/gainmatch_gh. χ2 values and the desired gains and offsets for each ADC channel needed for the online analyser are outputted, along with information about the peaks.

[edit] Generating the gains: TIGRESS HPGe Clover Detector

For the Ge gains, the process is straight forward (this explanation should be)

[edit] Input:

  • in ~/tigcol2/gainmatch_gh run ./getpeaks for the gainmatching command-line script of the appropriate file.
  • specify these input variables:
 dispn     : peak dispersion expected (in /keV)
 source    : radiation source used in run
 maxerror  : allowed deviation in the channels
 which     : The ADC channels to be fit - written in the form a-z or a-m,o-z etc. 
  • The current configuration of the detectors is given in Current TIGRESS Configuration. The clover ADC channels are in groups of sixty for each position with 15 signals for each crysta:e two core signals, eight segments, five suppresors which include the two front, two side and a back surpressor. The numbering scheme for the channels is:
ADC Range Crystal / Surpressor
"ADC range start point" + 0-9 Blue HPGe
+ 10-14 Blue HPGe Surpressor
+ 15-19 Green HPGe Surpressor
+ 20-29 Green HPGe
+ 30-39 Red HPGe
+ 40-44 Red HPGe Surpressor
+ 45-49 White HPGe Surpressor
+ 50-59 White HPGe


  • An example of selecting ADC spectra by running the command-line is

./getpeaks /tig/midtig02_data1/tigress/apr08/his03487.root 1.6 csco 250 0-9

This will fit the peaks in run 03487 to gaussians. The expected dispersion for the Ge ADC channels is 1.6 bin/keV. For this specific run, the source is a Cesium-Colbalt and the allowed peak range is 250 bins. The ten ADC sample spectra for the blue HPGe crystal from position five (Iceman - 1) are analysed.

[edit] Output:

The information outputted from getpeaks includes:

  • FWHM (in keV)
  • Area of peaks (in keV)
  • counts in peaks (number)
  • χ2 values
  • The gains and offsets are outputted in the form: E = const*(gain) + const*(offset)

If the user intends to just examine the fits, the command-line given is fine. Each ADC spectra fit will be displayed. It is advisable to check each plot, rather than just examine the values printed out, as the plot will give an idea of possible errors that do not show up in output data and are not readily explained by the χ2 values.

If the fits look good, the values can be outputted directly to a file. Using batch mode, write to file by appending batch > filename at the end of the command-line. Not all ADC channels will work correctly for each set of crystal and surpressor segments - make notes of any issues. Problems may include the recommended dispersion value for the Ge ADCs being too high or low, not working for the fit or no data showing up for a channel. Issues with Silicon detector ADCs are discussed in the next section.

The gains and offsets can be inserted into the analyser on midtig02.

[edit] Generating the Gains: Si Detector

In order to gain match the Si spectra, several other parameters in the subroutine fit.c may need to be adjusted. The ADC channel spectra for the Si detectors do not behave as simply as the spectra from Ge ADCs. Parameters in the fit.c need to be tweaked depending on the upstream and downstream signals. These variables may include:

 FIT_WIDTH             : line 025 
 INT_LOW               : line 026 
 INT_HIGH              : line 027 
 PEAK_CLEAR_WIDTH      : line 411  
 PEAK_FIT_WIDTH        : line 412 
 MAX_SPECTRUM_CHANNELS : line 414 

Some tweaking and optimization of the parameters has been done in fit_triple.c . Details of the Si CD S2 and S3 (up and downstream) gain matching for experiment S1069 using BAMBINO are given in the logbook for that experiment, pg 112.

The dispersion and maximum error also need to be adjusted. Once you have an idea of how the various inputs change the fit (to understand this, you should play around with the variables/parameters a bit]), these values can be found by checking the fits one-by-one. This is tedious but necessary in order to get the best gains for each of the ADC signals. Again, details of changes in dispn and maxerror for S1079 are outlined in the logbook. There is a one-magnitude change in the dispersion between the up and downstream gains due to the fact that the energy of the proton beam will be lower by a magnitude then the downstream energies. (Be for S1069)

Once the proper variables have been altered in fit.c and dispn as well as maxerror are set properly, the process continues in the same manner as for the Ge spectra. The gains generated will be included in the analyser software!

[edit] Finalising the Gains

The online data should be gainmatched appropriately at this point. When the above tasks have been completed, a new set of spectra should be taken and checked to ensure proper calibration.

Personal tools
Experiment Pages