]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Move the non linearity correction after the cluster position recalculation.
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 28 Nov 2010 15:31:38 +0000 (15:31 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 28 Nov 2010 15:31:38 +0000 (15:31 +0000)
PWG4/CaloCalib/AliAnalysisTaskCaloFilter.cxx
PWG4/CaloCalib/AliAnalysisTaskEMCALPi0CalibSelection.cxx
PWG4/PartCorrBase/AliCaloTrackReader.cxx

index 8e3c7ca1e3d8bff84d4bcb2c5f327c9c78b15772..ea90e383a3876339f0cad0c516475cb4f80647e3 100644 (file)
@@ -278,9 +278,7 @@ void AliAnalysisTaskCaloFilter::UserExec(Option_t */*option*/)
         fEMCALRecoUtils->RecalculateClusterShowerShapeParameters(fEMCALGeo, event->GetEMCALCells(),cluster);
         fEMCALRecoUtils->RecalculateClusterPID(cluster);
       }
-      
-      cluster->SetE(fEMCALRecoUtils->CorrectClusterEnergyLinearity(cluster));
-      
+            
       fEMCALRecoUtils->RecalculateClusterPosition(fEMCALGeo, event->GetEMCALCells(),cluster);
       
       if(DebugLevel() > 2)
@@ -291,6 +289,8 @@ void AliAnalysisTaskCaloFilter::UserExec(Option_t */*option*/)
         printf("Filter, after   : i %d, x %f, y %f, z %f\n",cluster->GetID(), position[0], position[1], position[2]);
       }    
       
+      cluster->SetE(fEMCALRecoUtils->CorrectClusterEnergyLinearity(cluster));
+      
     }
     //Recalculate track-matching
     fEMCALRecoUtils->FindMatches(event);
index 1cc7a009eb69d9713565cc11828eb0d980eaec76..2ead2494e3c0d6c91af746b31dbd14ed88761450 100644 (file)
@@ -456,13 +456,14 @@ void AliAnalysisTaskEMCALPi0CalibSelection::UserExec(Option_t* /* option */)
       if(DebugLevel() > 2) 
         printf("Energy: after recalibration %f; ",c1->E());
       
+      // Recalculate cluster position
+      fRecoUtils->RecalculateClusterPosition(fEMCALGeo, emCells,c1);
+      
       // Correct Non-Linearity
       c1->SetE(fRecoUtils->CorrectClusterEnergyLinearity(c1));
-
       if(DebugLevel() > 2) 
         printf("after linearity correction %f\n",c1->E());
-      // Recalculate cluster position
-      fRecoUtils->RecalculateClusterPosition(fEMCALGeo, emCells,c1);
+      
       if(DebugLevel() > 2)
       { 
         printf("Cor  : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",c1->GetID(),c1->E(),c1->GetDispersion(),c1->GetM02(),c1->GetM20());
index a1c0f863ef27131e11db60d09c30a21500b243bd..aa9002a47adbd573f09bf1edf530746df8b3d8c6 100755 (executable)
@@ -713,13 +713,7 @@ void AliCaloTrackReader::FillInputEMCAL() {
 
           //Recalculate distance to bad channels, if new list of bad channels provided
           GetCaloUtils()->RecalculateClusterDistanceToBadChannel(GetEMCALCells(),clus);
-          
-          //Correct non linearity
-          if(GetCaloUtils()->IsCorrectionOfClusterEnergyOn()){
-            GetCaloUtils()->CorrectClusterEnergy(clus) ;
-            //printf("Linearity Corrected Energy %f\n",clus->E());  
-          }
-          
+                    
           //Recalculate cluster position
           if(GetCaloUtils()->IsRecalculationOfClusterPositionOn()){
             GetCaloUtils()->RecalculateClusterPosition(GetEMCALCells(),clus); 
@@ -727,6 +721,12 @@ void AliCaloTrackReader::FillInputEMCAL() {
             //printf("After  Corrections: e %f, x %f, y %f, z %f\n",clus->E(),pos[0],pos[1],pos[2]);
           }
           
+          //Correct non linearity
+          if(GetCaloUtils()->IsCorrectionOfClusterEnergyOn()){
+            GetCaloUtils()->CorrectClusterEnergy(clus) ;
+            //printf("Linearity Corrected Energy %f\n",clus->E());  
+          }          
+          
           if (fMixedEvent) {
             clus->SetID(iclus) ; 
           }