From 56d1045223eaa9122e405f4b9ecdde7fcf94c45f Mon Sep 17 00:00:00 2001 From: gconesab Date: Wed, 7 May 2014 17:37:37 +0200 Subject: [PATCH] add calibration parameters arrays specific to DCal, avoid backward incompatibility reading newly created files with old aliroot version --- EMCAL/AliEMCALCalibData.cxx | 365 ++++++++++++++---------------------- EMCAL/AliEMCALCalibData.h | 27 ++- 2 files changed, 159 insertions(+), 233 deletions(-) diff --git a/EMCAL/AliEMCALCalibData.cxx b/EMCAL/AliEMCALCalibData.cxx index 1b4e97a8ae1..a74dc85cd48 100644 --- a/EMCAL/AliEMCALCalibData.cxx +++ b/EMCAL/AliEMCALCalibData.cxx @@ -57,46 +57,31 @@ TNamed(calibda), fADCchannelRef(calibda.fADCchannelRef) SetTitle(calibda.GetName()); Reset(); - Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; Int_t nCol = AliEMCALGeoParams::fgkEMCALCols; //48 Int_t nRow = AliEMCALGeoParams::fgkEMCALRows; //24 - - for(Int_t supermodule = 0; supermodule < nSMod; supermodule++) { + + for(Int_t supermodule = 0; supermodule < nSMod; supermodule++) + { nCol = AliEMCALGeoParams::fgkEMCALCols; //48 nRow = AliEMCALGeoParams::fgkEMCALRows; //24 - // in reality they are 1/3 but leave them as 1/2 - - if(supermodule /2 == 5) - nRow = nRow/2; - if(supermodule > 11 && supermodule < 18) - nCol = nCol*2/3; - for(Int_t column = 0; column 11 && supermodule < 18) - nCol = nCol*2/3; + //Init all SM equally, even the channels known to not exist. - for(Int_t column = 0; column 11 && supermodule < 18) - nCol = nCol*2/3; - - for (Int_t column=0; column < nCol; column++){ - - for (Int_t row = 0; row < nRow; row++){ - - fADCpedestal [supermodule][column][row]=0.; - - fADCchannelDecal [supermodule][column][row]=1.; - fADCchannel [supermodule][column][row]=fADCchannelRef; - fADCchannelOnline[supermodule][column][row]=fADCchannelRef; - - fTimeChannelDecal[supermodule][column][row]=0.; - + //Init all SM equally, even the channels known to not exist. + + for (Int_t column=0; column < nCol; column++) + { + for (Int_t row = 0; row < nRow; row++) + { + + SetADCchannel (supermodule,column,row, fADCchannelRef); + SetADCchannelOnline(supermodule,column,row, fADCchannelRef); + SetADCchannelDecal (supermodule,column,row, 1); + SetADCpedestal (supermodule,column,row, 0); + SetTimeChannelDecal(supermodule,column,row, 0); for(Int_t bc = 0; bc < 4; bc++) - fTimeChannel[supermodule][column][row][bc]=0; - + SetTimeChannel(supermodule,column,row, bc, 0); + } } } @@ -198,133 +163,48 @@ void AliEMCALCalibData::Reset() void AliEMCALCalibData::Print(Option_t *option) const { // Print tables of pedestals and ADC channels widths - // options are: "gain", "ped", "decal", "time", "all" + // options are: "gain", "ped", "online", "decal", "time", "timdecal", "all" - Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; Int_t nCol = AliEMCALGeoParams::fgkEMCALCols; //48 Int_t nRow = AliEMCALGeoParams::fgkEMCALRows; //24 - - if (strstr(option,"ped") || strstr(option,"all")) { - printf("\n ---- Pedestal values ----\n\n"); - for (Int_t supermodule=0; supermodule 11 && supermodule < 18) - nCol = nCol*2/3; - printf("============== Supermodule %d\n",supermodule+1); - for (Int_t column=0; column 11 && supermodule < 18) - nCol = nCol*2/3; - printf("============== Supermodule %d\n",supermodule+1); - for (Int_t column=0; column 11 && supermodule < 18) - nCol = nCol*2/3; - printf("============== Supermodule %d\n",supermodule+1); - for (Int_t column=0; column 11 && supermodule < 18) - nCol = nCol*2/3; - printf("============== Supermodule %d\n",supermodule+1); - for (Int_t column=0; column 11 && supermodule < 18) - nCol = nCol*2/3; - printf("============== Supermodule %d\n",supermodule+1); - for (Int_t column=0; column 11 && supermodule < 18) - nCol = nCol*2/3; - printf("============== Supermodule %d\n",supermodule+1); - for (Int_t column=0; column