X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALCalibData.cxx;h=36bb21479456769cee7a5123962d23a72cce26e5;hb=9f9402f092c373a967b02c711a79941c259a184f;hp=7c2fcecbd0307289e5924b81c7c68584133d308d;hpb=beb28b9510a4bad050817309534d8c04a6699703;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALCalibData.cxx b/EMCAL/AliEMCALCalibData.cxx index 7c2fcecbd03..36bb2147945 100644 --- a/EMCAL/AliEMCALCalibData.cxx +++ b/EMCAL/AliEMCALCalibData.cxx @@ -15,12 +15,18 @@ /* $Id$ */ +//_________________________________________________________________________ +///*-- Author: Yves Schutz (SUBATECH) +// : Aleksei Pavlinov (WSU); Jun 30, 2006 - ALICE numbering scheme +// : Add decalibration and time calibration arrays: Jul 21, 2011 (GCB) /////////////////////////////////////////////////////////////////////////////// // // // class for EMCAL calibration // // // /////////////////////////////////////////////////////////////////////////////// +#include + #include "AliEMCALCalibData.h" ClassImp(AliEMCALCalibData) @@ -52,20 +58,36 @@ AliEMCALCalibData::AliEMCALCalibData(const AliEMCALCalibData& calibda) : SetTitle(calibda.GetName()); Reset(); - Int_t nSMod = 12; - Int_t nCol = 48; - Int_t nRow = 24; - Int_t nRow2 = 12; //Modules 11 and 12 are half modules + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; //12 + Int_t nCol = AliEMCALGeoParams::fgkEMCALCols; //48 + Int_t nRow = AliEMCALGeoParams::fgkEMCALRows; //24 + Int_t nRow2 = AliEMCALGeoParams::fgkEMCALRows; //12 - Modules 11 and 12 are half modules - for(Int_t supermodule=0; supermodule 10) + for(Int_t supermodule = 0; supermodule < nSMod; supermodule++) { + + if(supermodule >= 10) nRow = nRow2; - for(Int_t column=0; column 10) + for(Int_t supermodule = 0; supermodule < nSMod; supermodule++) { + + if(supermodule >= 10) nRow = nRow2; - for(Int_t column=0; column= 10) + nRow = nRow2; + 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]=1.; + + fTimeChannel [supermodule][column][row]=0.; + fTimeChannelDecal[supermodule][column][row]=0.; + + } + } + } } //________________________________________________________________ void AliEMCALCalibData::Print(Option_t *option) const { // Print tables of pedestals and ADC channels widths - - Int_t nSMod = 12; - Int_t nCol = 48; - Int_t nRow = 24; - Int_t nRow2 = 12; //Modules 11 and 12 are half modules - if (strstr(option,"ped")) { + // options are: "gain", "ped", "decal", "time", "all" + + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; //12 + Int_t nCol = AliEMCALGeoParams::fgkEMCALCols; //48 + Int_t nRow = AliEMCALGeoParams::fgkEMCALRows; //24 + Int_t nRow2 = AliEMCALGeoParams::fgkEMCALRows/2; //12 - Modules 11 and 12 are half modules + if (strstr(option,"ped") || strstr(option,"all")) { printf("\n ---- Pedestal values ----\n\n"); for (Int_t supermodule=0; supermodule 10) - nRow = nRow2; + if(supermodule >= 10) + nRow = nRow2; printf("============== Supermodule %d\n",supermodule+1); for (Int_t column=0; column 10) - nRow = nRow2; + if(supermodule >= 10) + nRow = nRow2; + printf("============== Supermodule %d\n",supermodule+1); + for (Int_t column=0; column= 10) + nRow = nRow2; printf("============== Supermodule %d\n",supermodule+1); for (Int_t column=0; column= 10) + nRow = nRow2; + printf("============== Supermodule %d\n",supermodule+1); + for (Int_t column=0; column= 10) + nRow = nRow2; + printf("============== Supermodule %d\n",supermodule+1); + for (Int_t column=0; column= 10) + nRow = nRow2; + for (Int_t column=0; columnGetADCchannel(supermodule, column, row); + Double_t ped1 = cd1->GetADCpedestal(supermodule, column, row); + Double_t adc2 = cd2->GetADCchannel(supermodule, column, row); + Double_t ped2 = cd2->GetADCpedestal(supermodule, column, row); + Double_t adc = adc2/adc1; + Double_t ped = ped2-adc*ped1; + if (print) + printf("%d %d %d: %f %f %f %f -> %f %f\n",supermodule,column,row,adc1,ped1,adc2,ped2,adc,ped); + fADCchannel [supermodule][column][row]=adc; + fADCpedestal[supermodule][column][row]=ped; + } + } + } } +