]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
move cluster param recalculation before bad/exotic cluster rejection
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 Jun 2013 08:29:57 +0000 (08:29 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 Jun 2013 08:29:57 +0000 (08:29 +0000)
PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx

index 267b5edebe716ae7fea19fd6521d089100ea44e1..7dbfa6c811dcca7c3ee93e4b572a5d4056bf608c 100755 (executable)
@@ -1390,40 +1390,15 @@ void AliCaloTrackReader::FillInputEMCALAlgorithm(AliVCluster * clus,
   if (fMixedEvent) 
     vindex = fMixedEvent->EventIndexForCaloCluster(iclus);
   
-  //Reject clusters with bad channels, close to borders and exotic;
-  if(!GetCaloUtils()->GetEMCALRecoUtils()->IsGoodCluster(clus,GetCaloUtils()->GetEMCALGeometry(),GetEMCALCells(),fInputEvent->GetBunchCrossNumber())) return;
-  
-  //Mask all cells in collumns facing ALICE thick material if requested
-  if(GetCaloUtils()->GetNMaskCellColumns())
-  {
-    Int_t absId   = -1;
-    Int_t iSupMod = -1;
-    Int_t iphi    = -1;
-    Int_t ieta    = -1;
-    Bool_t shared = kFALSE;
-    GetCaloUtils()->GetEMCALRecoUtils()->GetMaxEnergyCell(GetCaloUtils()->GetEMCALGeometry(), GetEMCALCells(),clus,absId,iSupMod,ieta,iphi,shared);
-    if(GetCaloUtils()->MaskFrameCluster(iSupMod, ieta)) return;
-  }
-  
-  if(fSelectEmbeddedClusters)
-  {
-    if(clus->GetNLabels()==0 || clus->GetLabel() < 0) return;
-    //else printf("Embedded cluster,  %d, n label %d label %d  \n",iclus,clus->GetNLabels(),clus->GetLabel());
-  }
-  
-  //Float_t pos[3];
-  //clus->GetPosition(pos);
-  //printf("Before Corrections: e %f, x %f, y %f, z %f\n",clus->E(),pos[0],pos[1],pos[2]);
-  
   if(fRecalculateClusters)
   {
-    //Recalibrate the cluster energy 
+    //Recalibrate the cluster energy
     if(GetCaloUtils()->IsRecalibrationOn())
     {
       Float_t energy = GetCaloUtils()->RecalibrateClusterEnergy(clus, GetEMCALCells());
       
       clus->SetE(energy);
-      //printf("Recalibrated Energy %f\n",clus->E());  
+      //printf("Recalibrated Energy %f\n",clus->E());
       
       GetCaloUtils()->RecalculateClusterShowerShapeParameters(GetEMCALCells(),clus);
       GetCaloUtils()->RecalculateClusterPID(clus);
@@ -1436,20 +1411,20 @@ void AliCaloTrackReader::FillInputEMCALAlgorithm(AliVCluster * clus,
     //Recalculate cluster position
     if(GetCaloUtils()->IsRecalculationOfClusterPositionOn())
     {
-      GetCaloUtils()->RecalculateClusterPosition(GetEMCALCells(),clus); 
+      GetCaloUtils()->RecalculateClusterPosition(GetEMCALCells(),clus);
       //clus->GetPosition(pos);
       //printf("After  Corrections: e %f, x %f, y %f, z %f\n",clus->E(),pos[0],pos[1],pos[2]);
     }
     
     // Recalculate TOF
-    if(GetCaloUtils()->GetEMCALRecoUtils()->IsTimeRecalibrationOn()) 
+    if(GetCaloUtils()->GetEMCALRecoUtils()->IsTimeRecalibrationOn())
     {
       Double_t tof      = clus->GetTOF();
       Float_t  frac     =-1;
       Int_t    absIdMax = GetCaloUtils()->GetMaxEnergyCell(fEMCALCells, clus,frac);
       
       if(fDataType==AliCaloTrackReader::kESD)
-      { 
+      {
         tof = fEMCALCells->GetCellTime(absIdMax);
       }
       
@@ -1457,9 +1432,34 @@ void AliCaloTrackReader::FillInputEMCALAlgorithm(AliVCluster * clus,
       
       clus->SetTOF(tof);
       
-    }// Time recalibration    
+    }// Time recalibration
   }
   
+  //Reject clusters with bad channels, close to borders and exotic;
+  if(!GetCaloUtils()->GetEMCALRecoUtils()->IsGoodCluster(clus,GetCaloUtils()->GetEMCALGeometry(),GetEMCALCells(),fInputEvent->GetBunchCrossNumber())) return;
+  
+  //Mask all cells in collumns facing ALICE thick material if requested
+  if(GetCaloUtils()->GetNMaskCellColumns())
+  {
+    Int_t absId   = -1;
+    Int_t iSupMod = -1;
+    Int_t iphi    = -1;
+    Int_t ieta    = -1;
+    Bool_t shared = kFALSE;
+    GetCaloUtils()->GetEMCALRecoUtils()->GetMaxEnergyCell(GetCaloUtils()->GetEMCALGeometry(), GetEMCALCells(),clus,absId,iSupMod,ieta,iphi,shared);
+    if(GetCaloUtils()->MaskFrameCluster(iSupMod, ieta)) return;
+  }
+  
+  if(fSelectEmbeddedClusters)
+  {
+    if(clus->GetNLabels()==0 || clus->GetLabel() < 0) return;
+    //else printf("Embedded cluster,  %d, n label %d label %d  \n",iclus,clus->GetNLabels(),clus->GetLabel());
+  }
+  
+  //Float_t pos[3];
+  //clus->GetPosition(pos);
+  //printf("Before Corrections: e %f, x %f, y %f, z %f\n",clus->E(),pos[0],pos[1],pos[2]);
+  
   //Correct non linearity
   if(GetCaloUtils()->IsCorrectionOfClusterEnergyOn())
   {
@@ -2439,7 +2439,6 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
 //         fTriggerClusterBC, fIsBadCellEvent,fIsBadMaxCellEvent,fIsExoticEvent, fIsTriggerMatch, nOfHighECl);
 //  
 //  if(!fIsTriggerMatch)  printf("\t highest energy cluster:  index %d, ID %d, E = %2.2f, tof = %2.2f, bad cluster? %d, bad cell? %d, exotic? %d\n",clusMax, idclusMax, eMax,tofMax, badClMax, badCeMax,exoMax);
-      
 }
 
 //__________________________________________