X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGLF%2FtotEt%2FAliAnalysisEtReconstructedPhos.cxx;h=dbec5cad61b1161cdb416fdef785aeb1b70f2196;hb=c4f8222a6577b47177222d6471855cdce2483f82;hp=c067d2ad56bd63d1b30b0f622b7714743dcb46e5;hpb=d3ce32b8131d5f38120201da13798f42c41dfe1e;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGLF/totEt/AliAnalysisEtReconstructedPhos.cxx b/PWGLF/totEt/AliAnalysisEtReconstructedPhos.cxx index c067d2ad56b..dbec5cad61b 100644 --- a/PWGLF/totEt/AliAnalysisEtReconstructedPhos.cxx +++ b/PWGLF/totEt/AliAnalysisEtReconstructedPhos.cxx @@ -103,23 +103,39 @@ void AliAnalysisEtReconstructedPhos::CreateHistograms() AliAnalysisEtReconstructed::CreateHistograms(); } -Double_t AliAnalysisEtReconstructedPhos::GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr){//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr 0 = nominal 1 = high -1 = low +Double_t AliAnalysisEtReconstructedPhos::GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent){//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr 0 = nominal 1 = high -1 = low Double_t factor = 1.0; - //Double_t E = fReCorrections->CorrectedEnergy(cluster.E()); if(nonLinCorr!=0){ if(nonLinCorr==1){//high bound on nonlinearity - factor *=1.05; + Double_t a1=0.045-0.010; + Double_t a2=0.045+0.010; + Double_t b1=1.055-0.450 ; + Double_t b2=1.055+0.450 ; + Double_t y = (1+a2/(1+cluster.E()*cluster.E()/b2/b2))/(1+a1/(1+cluster.E()*cluster.E()/b1/b1)) ; + factor *=y*GetCorrectionModification(cluster,0,0,cent); } else{//nonLinCorr==-1 - factor *=0.95; + Double_t a1=0.045-0.010; + Double_t a2=0.045+0.010; + Double_t b1=1.055-0.450 ; + Double_t b2=1.055+0.450 ; + Double_t y = (1+a1/(1+cluster.E()*cluster.E()/b1/b1))/(1+a2/(1+cluster.E()*cluster.E()/b2/b2)) ; + factor *=y*GetCorrectionModification(cluster,0,0,cent); } } + else{//nonlinearity correction + factor = 0.9728*(1+0.02/(1+cluster.E()*cluster.E()/1.5)); + } if(effCorr!=0){ if(effCorr==1){//high bound - factor *=1.05; + factor *=1.005*GetCorrectionModification(cluster,0,0,cent); } else{//low bound - factor *=0.95; + factor *=0.995*GetCorrectionModification(cluster,0,0,cent); + } + if(cent<0){//this condition will never be met but it will stop a compiler warning that results in Coverity sending me an email about once every two weeks. + Double_t E = cluster.E(); + factor = 1.0*E; } } return factor;