psi46 / pxar

Life is too short for perfection
16 stars 46 forks source link

xray spectra for a module #242

Closed rslu closed 10 years ago

rslu commented 10 years ago

Here I show the xray spectra of 16 rocs of a modules. The weird thing is that the ROC0 is showing what we expected Ag spectrum shape, but not the rest of 15 ROCs. Of course the full module has been trimmed and PHOpt and PH calibrated. I wonder if it has anything to do with data analysis. Is there a way to debug or do detail analysis on the problem?

ag_hitmap ag_spectra

ursl commented 10 years ago

Do you have a decent gain/ped calibration for all ROCs?

On Wed, Oct 22, 2014 at 5:24 PM, rslu notifications@github.com wrote:

Here I show the xray spectra of 16 rocs of a modules. The weird thing is that the ROC0 is showing what we expected Ag spectrum shape, but not the rest of 15 ROCs. I wonder if it has anything to do with data analysis. Is there a way to debug or do detail analysis on the problem?

[image: ag_hitmap] https://cloud.githubusercontent.com/assets/5728495/4738775/7135507e-59ff-11e4-9f7b-279eac9eb271.png [image: ag_spectra] https://cloud.githubusercontent.com/assets/5728495/4738776/726c2f58-59ff-11e4-88ea-2e671ae15cd2.png

— Reply to this email directly or view it on GitHub https://github.com/psi46/pxar/issues/242.

rslu commented 10 years ago

I believe so, I ran PhOpt and GainPedestal. The p1 looks reasonable and I browsed a few curves and they are fine.

rslu commented 10 years ago

Here is the example of col25,row25 of 16 chips. I now see some systematics on setting, I can manually tune some DACs to improve the shape. gainped_25_25

rslu commented 10 years ago

So there is a bug in the PHCalibration class where all the ROC1-15 are still using PH constant from ROC0.

Example 
--------------------------------- 
iroc 1, icol 48, irow 43, ph 51.0
   vcal -43.690712 , PH 51.000000 
 parameters 0.001915 0.823369 110.056400 130.208000 
--------------------------------- 
iroc 0, icol 4, irow 6, ph 56.0
   vcal 95.451440 , PH 56.000000 
 parameters 0.001779 0.809891 118.177500 122.765200 
--------------

I tried to convert it to vcal then back to PH, the iroc 1 parameters of (48,43) is exactly the ROC0 parameters, not roc1 values.

rslu commented 10 years ago

if I print the parameters in the xray constructor

    printf("get ph parameters (roc %d,col 20,row 20)\n", ii);
    fPhCal.getParameters(ii, 20, 20) 
output is 
get ph parameters (roc 0,col 20,row 20)
 0/20/20: 1.747963e-03 7.519825e-01 1.164918e+02 1.241341e+02
get ph parameters (roc 1,col 20,row 20)
 1/20/20: 1.747963e-03 7.519825e-01 1.164918e+02 1.241341e+02
get ph parameters (roc 2,col 20,row 20)
 2/20/20: 1.747963e-03 7.519825e-01 1.164918e+02 1.241341e+02
get ph parameters (roc 3,col 20,row 20)
 3/20/20: 1.747963e-03 7.519825e-01 1.164918e+02 1.241341e+02
get ph parameters (roc 4,col 20,row 20)
 4/20/20: 1.747963e-03 7.519825e-01 1.164918e+02 1.241341e+02
get ph parameters (roc 5,col 20,row 20)
 5/20/20: 1.747963e-03 7.519825e-01 1.164918e+02 1.241341e+02

all rocs have same parameters.

rslu commented 10 years ago

okay, found the bug in ConfigParameters.cc before 907, we need to clear the vector lines as

-->     lines.clear();
907    vector rocPar; 

otherwise the lines gets push_back as reading the next GainPedestal files, with all the early ROCs parameters still in the front.

rslu commented 10 years ago

Here is the spectra of 16 ROCs of a module under Ag. ag_spectra_oct23