add new parametrization for non linearity in MC - Evi
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Jul 2012 13:11:45 +0000 (13:11 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Jul 2012 13:11:45 +0000 (13:11 +0000)
EMCAL/AliEMCALRecoUtils.cxx
EMCAL/AliEMCALRecoUtils.h

index 573a0ac..df97840 100644 (file)
@@ -654,23 +654,34 @@ Float_t AliEMCALRecoUtils::CorrectClusterEnergyLinearity(AliVCluster* cluster)
     case kPi0MC:
     {
       //Non-Linearity correction (from MC with function ([0]*exp(-[1]/E))+(([2]/([3]*2.*TMath::Pi())*exp(-(E-[4])^2/(2.*[3]^2)))))
-      //Double_t fNonLinearityParams[0] = 1.014;
-      //Double_t fNonLinearityParams[1] = -0.03329;
-      //Double_t fNonLinearityParams[2] = -0.3853;
-      //Double_t fNonLinearityParams[3] = 0.5423;
-      //Double_t fNonLinearityParams[4] = -0.4335;
+      //fNonLinearityParams[0] = 1.014;
+      //fNonLinearityParams[1] =-0.03329;
+      //fNonLinearityParams[2] =-0.3853;
+      //fNonLinearityParams[3] = 0.5423;
+      //fNonLinearityParams[4] =-0.4335;
        energy *= (fNonLinearityParams[0]*exp(-fNonLinearityParams[1]/energy))+
                   ((fNonLinearityParams[2]/(fNonLinearityParams[3]*2.*TMath::Pi())*
                     exp(-(energy-fNonLinearityParams[4])*(energy-fNonLinearityParams[4])/(2.*fNonLinearityParams[3]*fNonLinearityParams[3]))));
       break;
     }
      
+    case kPi0MCv2:
+    {
+      //Non-Linearity correction (from MC with function [0]/((x+[1])^[2]))+1;
+      //fNonLinearityParams[0] = 3.11111e-02;
+      //fNonLinearityParams[1] =-5.71666e-02; 
+      //fNonLinearityParams[2] = 5.67995e-01;      
+      
+      energy *= fNonLinearityParams[0]/TMath::Power(energy+fNonLinearityParams[1],fNonLinearityParams[2])+1;
+      break;
+    }
+      
     case kPi0GammaGamma:
     {
       //Non-Linearity correction (from Olga Data with function p0+p1*exp(-p2*E))
-      //Double_t fNonLinearityParams[0] = 1.04;
-      //Double_t fNonLinearityParams[1] = -0.1445;
-      //Double_t fNonLinearityParams[2] = 1.046;
+      //fNonLinearityParams[0] = 1.04;
+      //fNonLinearityParams[1] = -0.1445;
+      //fNonLinearityParams[2] = 1.046;
       energy /= (fNonLinearityParams[0]+fNonLinearityParams[1]*exp(-fNonLinearityParams[2]*energy)); //Olga function
       break;
     }
index a72d053..885a1b9 100644 (file)
@@ -49,7 +49,7 @@ public:
   void     Print(const Option_t*) const;
 
   //enums
-  enum     NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3,kBeamTest=4,kBeamTestCorrected=5};
+  enum     NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3,kBeamTest=4,kBeamTestCorrected=5,kPi0MCv2=6};
   enum     PositionAlgorithms{kUnchanged=-1,kPosTowerIndex=0, kPosTowerGlobal=1};
   enum     ParticleType{kPhoton=0, kElectron=1,kHadron =2, kUnknown=-1};
   enum     { kNCuts = 11 }; //track matching