]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG0/AliCorrectionMatrix.cxx
Bug fix in the order of the Ds cuts (Sadhana, Francesco)
[u/mrichter/AliRoot.git] / PWG0 / AliCorrectionMatrix.cxx
index 82fac7236e0832df5fa3e49fb96093e55722df4c..7cf9901d7cb201ccc8e769196928805ced3072f2 100644 (file)
@@ -353,9 +353,9 @@ void AliCorrectionMatrix::SetCorrectionToUnity()
   if (!fhCorr)
     return;
 
-  for (Int_t x=1; x<=fhCorr->GetNbinsX(); ++x)
-    for (Int_t y=1; y<=fhCorr->GetNbinsY(); ++y)
-      for (Int_t z=1; z<=fhCorr->GetNbinsZ(); ++z)
+  for (Int_t x=0; x<=fhCorr->GetNbinsX()+1; ++x)
+    for (Int_t y=0; y<=fhCorr->GetNbinsY()+1; ++y)
+      for (Int_t z=0; z<=fhCorr->GetNbinsZ()+1; ++z)
       {
         fhCorr->SetBinContent(x, y, z, 1);
         fhCorr->SetBinError(x, y, z, 0);
@@ -372,3 +372,17 @@ void AliCorrectionMatrix::Scale(Double_t factor)
   fhMeas->Scale(factor);
   fhGene->Scale(factor);
 }
+
+//____________________________________________________________________
+void AliCorrectionMatrix::ResetErrorsOnCorrections()
+{
+  // set the errors on the correction matrix to 0
+
+  if (!fhCorr)
+    return;
+
+  for (Int_t x=0; x<=fhCorr->GetNbinsX()+1; ++x)
+    for (Int_t y=0; y<=fhCorr->GetNbinsY()+1; ++y)
+      for (Int_t z=0; z<=fhCorr->GetNbinsZ()+1; ++z)
+        fhCorr->SetBinError(x, y, z, 0);
+}