]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALCalibTimeDepCorrection.cxx
adding a comment on the event-by-event eta-phi histogram for general use
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALCalibTimeDepCorrection.cxx
index ab5ac0514247b333c82fff572a48f9d5aee4a977..e87ea54610af329e1270afcbbfd09837aa909b62 100644 (file)
@@ -45,7 +45,7 @@ AliEMCALCalibTimeDepCorrection::AliEMCALCalibTimeDepCorrection(const int nSM) :
 }
 
 //____________________________________________________________________________
-void AliEMCALCalibTimeDepCorrection::InitCorrection(Int_t nSM, Int_t nBins, Float_t val=1.0)
+void AliEMCALCalibTimeDepCorrection::InitCorrection(Int_t nSM, Int_t nBins, Float_t val)
 {
   // This methods assumes that you are using SuperModules 0..nSM-1
   fNSuperModule = nSM;
@@ -54,21 +54,24 @@ void AliEMCALCalibTimeDepCorrection::InitCorrection(Int_t nSM, Int_t nBins, Floa
   Int_t iCol = 0;
   Int_t iRow = 0;
   Int_t nCorr = nBins;
-  Float_t Correction = val;
+  Float_t correction = val;
 
   Int_t nAPDPerSM = AliEMCALGeoParams::fgkEMCALCols * AliEMCALGeoParams::fgkEMCALRows;
 
   for (Int_t i = 0; i < fNSuperModule; i++) {
     AliEMCALSuperModuleCalibTimeDepCorrection * t = (AliEMCALSuperModuleCalibTimeDepCorrection*) fSuperModuleData[i];
+    iSM = i;
     t->SetSuperModuleNum(iSM); // assume SMs are coming in order
 
     for (Int_t j=0; j<nAPDPerSM; j++) {
+      iCol = j / AliEMCALGeoParams::fgkEMCALRows;
+      iRow = j % AliEMCALGeoParams::fgkEMCALRows;
 
       // set size of TArray
       t->GetCorrection(iCol,iRow)->Set(nCorr);
       for (Int_t k=0; k<nCorr; k++) {
        // add to TArray
-       t->GetCorrection(iCol,iRow)->AddAt(Correction, k); // AddAt = SetAt..
+       t->GetCorrection(iCol,iRow)->AddAt(correction, k); // AddAt = SetAt..
       }
     }
 
@@ -108,7 +111,7 @@ void AliEMCALCalibTimeDepCorrection::ReadTextInfo(Int_t nSM, const TString &txtF
   Int_t iCol = 0;
   Int_t iRow = 0;
   Int_t nCorr = 0;
-  Float_t Correction = 0;
+  Float_t correction = 0;
 
   Int_t nAPDPerSM = AliEMCALGeoParams::fgkEMCALCols * AliEMCALGeoParams::fgkEMCALRows;
 
@@ -138,9 +141,9 @@ void AliEMCALCalibTimeDepCorrection::ReadTextInfo(Int_t nSM, const TString &txtF
       // set size of TArray
       t->GetCorrection(iCol,iRow)->Set(nCorr);
       for (Int_t k=0; k<nCorr; k++) {
-       inputFile >> Correction;
+       inputFile >> correction;
        // add to TArray
-       t->GetCorrection(iCol,iRow)->AddAt(Correction, k);
+       t->GetCorrection(iCol,iRow)->AddAt(correction, k);
       }
     }