+
+//____________________________________________________________________
+void AliCorrectionMatrix::Reset(Option_t* option)
+{
+ // resets the histograms
+
+ if (fhGene)
+ fhGene->Reset(option);
+
+ if (fhMeas)
+ fhMeas->Reset(option);
+
+ if (fhCorr)
+ fhCorr->Reset(option);
+}
+
+//____________________________________________________________________
+void AliCorrectionMatrix::SetCorrectionToUnity()
+{
+ // sets the correction matrix to unity
+
+ 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->SetBinContent(x, y, z, 1);
+ fhCorr->SetBinError(x, y, z, 0);
+ }
+}
+
+//____________________________________________________________________
+void AliCorrectionMatrix::Scale(Double_t factor)
+{
+ // scales the generated and measured histogram with the given factor
+
+ Printf("Scaling histograms with %f", 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);
+}