new improved non linearity correction flag kBeamTestCorrectedv2 - Evi
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Jul 2013 15:52:49 +0000 (15:52 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Jul 2013 15:52:49 +0000 (15:52 +0000)
EMCAL/AliEMCALRecoUtils.cxx
EMCAL/AliEMCALRecoUtils.h
EMCAL/macros/RecParamDB/AliEMCALSetRecParamCDB.C
EMCAL/macros/RecParamDB/PrintEMCALRecParam.C

index d00ac19..8a67514 100644 (file)
@@ -141,7 +141,7 @@ AliEMCALRecoUtils::AliEMCALRecoUtils(const AliEMCALRecoUtils & reco)
   //Copy ctor
   
   for(Int_t i = 0; i < 15 ; i++) { fMisalRotShift[i]      = reco.fMisalRotShift[i]      ; 
-                                   fMisalTransShift[i]    = reco.fMisalTransShift[i]    ; } 
+                                   fMisalTransShift[i]    = reco.fMisalTransShift[i]    ; }
   for(Int_t i = 0; i < 7  ; i++) { fNonLinearityParams[i] = reco.fNonLinearityParams[i] ; }
   for(Int_t i = 0; i < 3  ; i++) { fSmearClusterParam[i]  = reco.fSmearClusterParam[i]  ; }
 
@@ -756,6 +756,21 @@ Float_t AliEMCALRecoUtils::CorrectClusterEnergyLinearity(AliVCluster* cluster)
 
       break;
     }
+     
+    case kBeamTestCorrectedv2:
+    {
+      //From beam test, corrected for material between beam and EMCAL
+      //fNonLinearityParams[0] =  0.983504;
+      //fNonLinearityParams[1] =  0.210106;
+      //fNonLinearityParams[2] =  0.897274;
+      //fNonLinearityParams[3] =  0.0829064;
+      //fNonLinearityParams[4] =  152.299;
+      //fNonLinearityParams[5] =  31.5028;
+      //fNonLinearityParams[6] =  0.968;
+      energy *= fNonLinearityParams[6]/(fNonLinearityParams[0]*(1./(1.+fNonLinearityParams[1]*exp(-energy/fNonLinearityParams[2]))*1./(1.+fNonLinearityParams[3]*exp((energy-fNonLinearityParams[4])/fNonLinearityParams[5]))));
+      
+      break;
+    }
       
     case kNoCorrection:
       AliDebug(2,"No correction on the energy\n");
@@ -844,6 +859,17 @@ void AliEMCALRecoUtils::InitNonLinearityParam()
     fNonLinearityParams[5] =  23.6904;
     fNonLinearityParams[6] =  0.978;
   }
+  
+  if(fNonLinearityFunction == kBeamTestCorrectedv2)
+  {
+    fNonLinearityParams[0] =  0.983504;
+    fNonLinearityParams[1] =  0.210106;
+    fNonLinearityParams[2] =  0.897274;
+    fNonLinearityParams[3] =  0.0829064;
+    fNonLinearityParams[4] =  152.299;
+    fNonLinearityParams[5] =  31.5028;
+    fNonLinearityParams[6] =  0.968;
+  }
 }
 
 //_________________________________________________________
@@ -1046,19 +1072,14 @@ void AliEMCALRecoUtils::InitParameters()
   //Non linearity
   for(Int_t i = 0; i < 7  ; i++) fNonLinearityParams[i] = 0.; 
   
-  //For kBeamTestCorrected case, but default is no correction
-  fNonLinearityParams[0] =  0.99078;
-  fNonLinearityParams[1] =  0.161499;
-  fNonLinearityParams[2] =  0.655166; 
-  fNonLinearityParams[3] =  0.134101;
-  fNonLinearityParams[4] =  163.282;
-  fNonLinearityParams[5] =  23.6904;
-  fNonLinearityParams[6] =  0.978;
-  
-  //For kPi0GammaGamma case
-  //fNonLinearityParams[0] = 0.1457/0.1349766/1.038;
-  //fNonLinearityParams[1] = -0.02024/0.1349766/1.038;
-  //fNonLinearityParams[2] = 1.046;
+  //For kBeamTestCorrectedv2 case, but default is no correction
+  fNonLinearityParams[0] =  0.983504;
+  fNonLinearityParams[1] =  0.210106;
+  fNonLinearityParams[2] =  0.897274;
+  fNonLinearityParams[3] =  0.0829064;
+  fNonLinearityParams[4] =  152.299;
+  fNonLinearityParams[5] =  31.5028;
+  fNonLinearityParams[6] =  0.968;
   
   //Cluster energy smearing
   fSmearClusterEnergy   = kFALSE;
index c75f105..e70a93e 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,kPi0MCv2=6,kPi0MCv3=7};
+  enum     NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3,kBeamTest=4,kBeamTestCorrected=5,kPi0MCv2=6,kPi0MCv3=7,kBeamTestCorrectedv2=8};
   enum     PositionAlgorithms{kUnchanged=-1,kPosTowerIndex=0, kPosTowerGlobal=1};
   enum     ParticleType{kPhoton=0, kElectron=1,kHadron =2, kUnknown=-1};
   enum     { kNCuts = 12 }; //track matching Marcel
@@ -108,12 +108,12 @@ public:
 
   Float_t  CorrectClusterEnergyLinearity(AliVCluster* clu) ;
   
-  Float_t  GetNonLinearityParam(const Int_t i)     const { if(i < 7 ){ return fNonLinearityParams[i] ; }
-                                                          else      { AliInfo(Form("Index %d larger than 7, do nothing\n",i)) ; 
+  Float_t  GetNonLinearityParam(const Int_t i)     const { if(i < 9  && i >=0 ){ return fNonLinearityParams[i] ; }
+                                                           else      { AliInfo(Form("Index %d larger than 9 or negative, do nothing\n",i)) ;
                                                                        return 0.                     ; } }
   void     SetNonLinearityParam(const Int_t i, const Float_t param) {
-                                                          if(i < 7 ){fNonLinearityParams[i] = param ; }
-                                                          else { AliInfo(Form("Index %d larger than 7, do nothing\n",i)) ; } }
+                                                          if(i < 9 && i >=0 ){fNonLinearityParams[i] = param ; }
+                                                          else { AliInfo(Form("Index %d larger than 9 or negative, do nothing\n",i)) ; } }
   void     InitNonLinearityParam();
 
   Int_t    GetNonLinearityFunction() const               { return fNonLinearityFunction    ; }
index 91801ae..df9b572 100644 (file)
@@ -309,7 +309,7 @@ AliEMCALRecParam* GetLowMultiplicityParameters()
   
   AliEMCALRecParam* params =  AliEMCALRecParam::GetDefaultParameters();
   //params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerNxN);
-  params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv1);
+  params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv2);
   params->SetClusteringThreshold(0.1); // 100 MeV                                             
   params->SetMinECut(0.05);  //50 MeV          
 
index a540e9a..d2ae6f5 100644 (file)
@@ -4,7 +4,7 @@
 // Author: Gustavo Conesa (INFN-LNF)
 
 
-void PrintEMCALRecParam(char * file = "$ALICE_ROOT/OCDB/EMCAL/Calib/RecoParam/Run0_999999999_v0_s0.root")
+void PrintEMCALRecParam(char * file = "$ALICE_ROOT/OCDB/EMCAL/Calib/RecoParam/Run0_999999999_v0_s1.root")
 {
 
 TFile * f = new TFile(file,"READ");
@@ -24,10 +24,10 @@ cout<<"============== "<<rparam->GetName()<<" ==============="<<endl;
 
 cout<<"================================================"<<endl;
 
-//rparam->Print("reco");//Print only clusterizer parameters
+rparam->Print("reco");//Print only clusterizer parameters
 //rparam->Print("pid");//Print only pid parameters
 //rparam->Print("raw");//Print only raw digitization parameters
-  rparam->Print("");// Print all
+//rparam->Print("");// Print all
 
 
 }