]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Remove dependence from mixing frame
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Tue, 5 Aug 2014 15:29:35 +0000 (17:29 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Tue, 5 Aug 2014 15:29:35 +0000 (17:29 +0200)
PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx
PWG/CaloTrackCorrBase/AliCalorimeterUtils.cxx
PWG/CaloTrackCorrBase/AliCalorimeterUtils.h

index 80a1bd83978d27bdf202ff6d18c0f79f49a264b4..f301a6683739be57cab1699598998a0e27f094d8 100755 (executable)
@@ -1818,7 +1818,7 @@ void AliCaloTrackReader::FillInputPHOS()
           vindex = fMixedEvent->EventIndexForCaloCluster(iclus);
         if( GetCaloUtils()->ClusterContainsBadChannel("PHOS",clus->GetCellsAbsId(), clus->GetNCells()))
           continue;
-        if(!GetCaloUtils()->CheckCellFiducialRegion(clus, fInputEvent->GetPHOSCells(), fInputEvent, vindex))
+        if(!GetCaloUtils()->CheckCellFiducialRegion(clus, fInputEvent->GetPHOSCells()))
           continue;
         
         if(fRecalculateClusters)
index eb04e5f04aae2ac0aa2e11a4da2e7a9fc549c978..2643b145e64e1adfe6f9982ca3a572b8ba2924f5 100755 (executable)
@@ -39,7 +39,6 @@
 #include "AliAODPWG4Particle.h"
 #include "AliVCluster.h"
 #include "AliVCaloCells.h"
-#include "AliMixedEvent.h"
 #include "AliAODCaloCluster.h"
 #include "AliOADBContainer.h"
 #include "AliAnalysisManager.h"
@@ -563,8 +562,7 @@ Bool_t AliCalorimeterUtils::IsClusterSharedByTwoSuperModules(const AliEMCALGeome
 
 //_____________________________________________________________________________________
 Bool_t AliCalorimeterUtils::CheckCellFiducialRegion(AliVCluster* cluster, 
-                                                    AliVCaloCells* cells, 
-                                                    AliVEvent * event, Int_t iev) const 
+                                                    AliVCaloCells* cells) const 
 {
   
        // Given the list of AbsId of the cluster, get the maximum cell and 
@@ -577,55 +575,14 @@ Bool_t AliCalorimeterUtils::CheckCellFiducialRegion(AliVCluster* cluster,
   Int_t absIdMax       = -1;
        Float_t ampMax  = -1;
        
-  AliMixedEvent * mixEvent = dynamic_cast<AliMixedEvent*> (event);
-  Int_t nMixedEvents = 0 ; 
-  Int_t * cellsCumul = NULL ;
-  Int_t numberOfCells = 0 ;  
-  if (mixEvent){
-    nMixedEvents = mixEvent->GetNumberOfEvents() ; 
-    if (cells->GetType()==AliVCaloCells::kEMCALCell) {
-      cellsCumul =  mixEvent->GetEMCALCellsCumul() ; 
-      numberOfCells = mixEvent->GetNumberOfEMCALCells() ;
-    } 
-    
-    else if (cells->GetType()==AliVCaloCells::kPHOSCell) {
-      cellsCumul =  mixEvent->GetPHOSCellsCumul() ; 
-      numberOfCells = mixEvent->GetNumberOfPHOSCells() ;
-    } 
-    
-    if(cellsCumul){
-      
-      Int_t startCell = cellsCumul[iev] ; 
-      Int_t endCell   = (iev+1 < nMixedEvents)?cellsCumul[iev+1]:numberOfCells;
-      //Find cells with maximum amplitude
-      for(Int_t i = 0; i < cluster->GetNCells() ; i++){
-        Int_t absId = cluster->GetCellAbsId(i) ;
-        for (Int_t j = startCell; j < endCell ;  j++) {
-          Short_t cellNumber;
-          Int_t mclabel; 
-          Double_t amp, time, efrac; 
-          cells->GetCell(j, cellNumber, amp, time,mclabel,efrac) ; 
-          if (absId == cellNumber) {
-            if(amp > ampMax){
-              ampMax   = amp;
-              absIdMax = absId;
-            }        
-          }
-        }
-      }//loop on cluster cells
-    }// cells cumul available
-    else {
-      printf("AliCalorimeterUtils::CheckCellFiducialRegion() - CellsCumul is NULL!!!\n");
-      abort();
-    }
-  } else {//Normal SE Events
-    for(Int_t i = 0; i < cluster->GetNCells() ; i++){
-      Int_t absId = cluster->GetCellAbsId(i) ;
-      Float_t amp      = cells->GetCellAmplitude(absId);
-      if(amp > ampMax){
-        ampMax   = amp;
-        absIdMax = absId;
-      }
+  for(Int_t i = 0; i < cluster->GetNCells() ; i++)
+  {
+    Int_t absId = cluster->GetCellAbsId(i) ;
+    Float_t amp        = cells->GetCellAmplitude(absId);
+    if(amp > ampMax)
+    {
+      ampMax   = amp;
+      absIdMax = absId;
     }
   }
        
@@ -639,8 +596,8 @@ Bool_t AliCalorimeterUtils::CheckCellFiducialRegion(AliVCluster* cluster,
        Bool_t okrow = kFALSE;
        Bool_t okcol = kFALSE;
   
-       if(cells->GetType()==AliVCaloCells::kEMCALCell){
-    
+       if(cells->GetType()==AliVCaloCells::kEMCALCell)
+  {
                Int_t iTower = -1, iIphi = -1, iIeta = -1, iphi = -1, ieta = -1, iSM = -1; 
                fEMCALGeo->GetCellIndex(absIdMax,iSM,iTower,iIphi,iIeta); 
                fEMCALGeo->GetCellPhiEtaIndexInSModule(iSM,iTower,iIphi, iIeta,iphi,ieta);
@@ -691,7 +648,8 @@ Bool_t AliCalorimeterUtils::CheckCellFiducialRegion(AliVCluster* cluster,
                        else  printf(" NO: column ok? %d, row ok? %d \n",okcol,okrow);
                }
        }//EMCAL
-       else if(cells->GetType()==AliVCaloCells::kPHOSCell){
+       else if ( cells->GetType() == AliVCaloCells::kPHOSCell )
+  {
                Int_t relId[4];
                Int_t irow = -1, icol = -1;
                fPHOSGeo->AbsToRelNumbering(absIdMax,relId);
index 304e0490fd27431a9163f1fcd3d931a9496a26c4..be8fe5b084210fab48f2f1292e1fe80f9f71dbf1 100755 (executable)
@@ -169,7 +169,7 @@ class AliCalorimeterUtils : public TObject {
   Int_t         GetModuleNumberCellIndexes(Int_t absId, TString calo, Int_t & icol, Int_t & irow, Int_t &iRCU) const ;
        
   //Modules fiducial region
-  Bool_t        CheckCellFiducialRegion(AliVCluster* cluster, AliVCaloCells* cells, AliVEvent * event, Int_t iev=0) const ;
+  Bool_t        CheckCellFiducialRegion(AliVCluster* cluster, AliVCaloCells* cells) const ;
   void          SetNumberOfCellsFromPHOSBorder(Int_t n)    { fNCellsFromPHOSBorder = n                                ; }
   Int_t         GetNumberOfCellsFromPHOSBorder()     const { return fNCellsFromPHOSBorder                             ; }
   void          SetNumberOfCellsFromEMCALBorder(Int_t n)   { fEMCALRecoUtils->SetNumberOfCellsFromEMCALBorder(n)      ; }