]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
function to reset stat error on corrections
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Dec 2009 13:11:50 +0000 (13:11 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Dec 2009 13:11:50 +0000 (13:11 +0000)
PWG0/AliCorrection.cxx
PWG0/AliCorrection.h
PWG0/AliCorrectionMatrix.cxx
PWG0/AliCorrectionMatrix.h

index 38754b7e7648403dccdadc090edf7a2582d991a7..ba411f00a128a479f0bee2dd8157709b892ddd58 100644 (file)
@@ -477,3 +477,12 @@ void AliCorrection::PrintInfo(Float_t ptCut)
   PrintStats(10, 0.8, ptCut);
   PrintStats(10, 1.5, ptCut);
 }
+
+//____________________________________________________________________
+void AliCorrection::ResetErrorsOnCorrections()
+{
+  // resets the errors in the correction matrix
+  
+  fEventCorr->ResetErrorsOnCorrections();
+  fTrackCorr->ResetErrorsOnCorrections();  
+}
index 9cf9ed621c7acaef9e2f7aeff82422d247ad4439..cbbabca96358b16979efead12e116a4e53178a44 100644 (file)
@@ -41,6 +41,7 @@ public:
   void Divide();
   void Multiply();
   void SetCorrectionToUnity();
+  void ResetErrorsOnCorrections();
   void Scale(Double_t factor);
 
   void Add(AliCorrection* aCorrectionToAdd, Float_t c=1);
index 6f283d7c0ee871c4c931247ff6cc8323e8a5d4e7..7cf9901d7cb201ccc8e769196928805ced3072f2 100644 (file)
@@ -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);
+}
index a7c2c54133d18a4111f5b274c08565adb8e6f22f..cea25b44f446738e770837d441d3a507d6190e53 100644 (file)
@@ -42,6 +42,7 @@ public:
   void Divide();
   void Multiply();
   void SetCorrectionToUnity();
+  void ResetErrorsOnCorrections();
   void Scale(Double_t factor);
 
   void Add(AliCorrectionMatrix* aMatrixToAdd, Float_t c=1);