- if(c.GetNDim()!=fNDim){
- AliInfo("Different number of dimension, cannot apply correction");
- return;
- }
-
- //Get the data
- Int_t ncorr=0;
- Int_t nnocorr=0;
- Float_t eff,deff,unc,dunc,corr,dcorr;
- //Apply the correction
- for(Int_t i=0;i<fNDim;i++){
- eff =c.GetElement(i);
- deff =TMath::Sqrt(c.GetElementError(i));
- unc =GetElement(i);
- dunc =TMath::Sqrt(GetElementError(i));
- if(eff>0 && unc>0){
- ncorr++;
- corr=unc/eff;
- dcorr=TMath::Sqrt(dunc*dunc/unc/unc+deff*deff/eff/eff)*corr;
- SetElement(i,corr);
- SetElementError(i,dcorr*dcorr);
-
- } else{
- if(unc>0)nnocorr++;
- SetElement(i,0);
- SetElementError(i,0);
- }
- }
- AliInfo(Form("correction applied for %i cells in correction matrix of Container %s, having entries in Data Container %s.",ncorr,c.GetName(),GetName()));
- AliInfo(Form("No correction applied for %i empty bins in correction matrix of Container %s, having entries in Data Container %s. Their content in the corrected data container was set to zero",nnocorr,c.GetName(),GetName()));