X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALCalibData.cxx;h=ae482b330727235faa92f055f6ded7cdd51aa91e;hb=3002fb0e7f349c159434a4a9a26cd45c31d95d91;hp=36bb21479456769cee7a5123962d23a72cce26e5;hpb=df5cea6bc576ef197fcac0a4554bd3658048d490;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALCalibData.cxx b/EMCAL/AliEMCALCalibData.cxx index 36bb2147945..ae482b33072 100644 --- a/EMCAL/AliEMCALCalibData.cxx +++ b/EMCAL/AliEMCALCalibData.cxx @@ -19,6 +19,7 @@ ///*-- Author: Yves Schutz (SUBATECH) // : Aleksei Pavlinov (WSU); Jun 30, 2006 - ALICE numbering scheme // : Add decalibration and time calibration arrays: Jul 21, 2011 (GCB) +// : adapted for DCAL by M.L. Wang CCNU & Subatech Oct-18-2012 /////////////////////////////////////////////////////////////////////////////// // // // class for EMCAL calibration // @@ -31,42 +32,44 @@ ClassImp(AliEMCALCalibData) -//________________________________________________________________ -AliEMCALCalibData::AliEMCALCalibData() +//__________________________________________________________ +AliEMCALCalibData::AliEMCALCalibData() : +TNamed(), fADCchannelRef(0) { // Default constructor Reset(); } -//________________________________________________________________ -AliEMCALCalibData::AliEMCALCalibData(const char* name) +//________________________________________________________________________ +AliEMCALCalibData::AliEMCALCalibData(const char* name) : +TNamed(name,name),fADCchannelRef(0) { // Constructor - TString namst = "Calib_"; - namst += name; - SetName(namst.Data()); - SetTitle(namst.Data()); Reset(); } -//________________________________________________________________ +//______________________________________________________________________ AliEMCALCalibData::AliEMCALCalibData(const AliEMCALCalibData& calibda) : - TNamed(calibda) +TNamed(calibda), fADCchannelRef(calibda.fADCchannelRef) { // copy constructor - SetName(calibda.GetName()); + SetName (calibda.GetName()); SetTitle(calibda.GetName()); Reset(); - - Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; //12 + + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; 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 < nSMod; supermodule++) { - - if(supermodule >= 10) - nRow = nRow2; + 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= 10) - nRow = nRow2; + 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= 10) - nRow = nRow2; + + for (Int_t supermodule=0; supermodule 11 && supermodule < 18) + nCol = nCol*2/3; + for (Int_t column=0; column < nCol; column++){ for (Int_t row = 0; row < nRow; row++){ @@ -166,29 +177,36 @@ void AliEMCALCalibData::Reset() fADCchannelDecal [supermodule][column][row]=1.; fADCchannel [supermodule][column][row]=1.; - fTimeChannel [supermodule][column][row]=0.; fTimeChannelDecal[supermodule][column][row]=0.; - + + for(Int_t bc = 0; bc < 4; bc++) + fTimeChannel[supermodule][column][row][bc]=0; + } } - } + } } -//________________________________________________________________ +//____________________________________________________ void AliEMCALCalibData::Print(Option_t *option) const { // Print tables of pedestals and ADC channels widths // options are: "gain", "ped", "decal", "time", "all" - Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; //12 + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; 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; + 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; printf("============== Supermodule %d\n",supermodule+1); for (Int_t column=0; column= 10) - nRow = nRow2; + 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; printf("============== Supermodule %d\n",supermodule+1); for (Int_t column=0; column= 10) - nRow = nRow2; + 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; printf("============== Supermodule %d\n",supermodule+1); for (Int_t column=0; column= 10) - nRow = nRow2; + 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; printf("============== Supermodule %d\n",supermodule+1); for (Int_t column=0; column= 10) - nRow = nRow2; + 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; 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; - } - } - } -}