From edff1a03dd5941c0182d3e11dce03f1d2eea57b1 Mon Sep 17 00:00:00 2001 From: gconesab Date: Tue, 29 Jul 2014 14:54:43 +0200 Subject: [PATCH] remove check for old AOD data format --- PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx | 51 +++----------------- PWG/CaloTrackCorrBase/AliCaloTrackReader.h | 15 +----- PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx | 4 +- 3 files changed, 11 insertions(+), 59 deletions(-) diff --git a/PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx b/PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx index 94c3e7ac158..8c4b398e650 100755 --- a/PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx +++ b/PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx @@ -103,7 +103,7 @@ fTaskName(""), fCaloUtils(0x0), fMixedEvent(NULL), fNMixedEvent(0), fVertex(NULL), fListMixedTracksEvents(), fListMixedCaloEvents(), fLastMixedTracksEvent(-1), fLastMixedCaloEvent(-1), -fWriteOutputDeltaAOD(kFALSE),fOldAOD(kFALSE), +fWriteOutputDeltaAOD(kFALSE), fEMCALClustersListName(""), fZvtxCut(0.), fAcceptFastCluster(kFALSE), fRemoveLEDEvents(kTRUE), //Trigger rejection @@ -879,43 +879,6 @@ void AliCaloTrackReader::InitParameters() } -//___________________________________________________________________ -Bool_t AliCaloTrackReader::IsEMCALCluster(AliVCluster* cluster) const -{ - // Check if it is a cluster from EMCAL. For old AODs cluster type has - // different number and need to patch here - - if(fDataType==kAOD && fOldAOD) - { - if (cluster->GetType() == 2) return kTRUE; - else return kFALSE; - } - else - { - return cluster->IsEMCAL(); - } - -} - -//___________________________________________________________________ -Bool_t AliCaloTrackReader::IsPHOSCluster(AliVCluster * cluster) const -{ - //Check if it is a cluster from PHOS.For old AODs cluster type has - // different number and need to patch here - - if(fDataType==kAOD && fOldAOD) - { - Int_t type = cluster->GetType(); - if (type == 0 || type == 1) return kTRUE; - else return kFALSE; - } - else - { - return cluster->IsPHOS(); - } - -} - //________________________________________________________________________ Bool_t AliCaloTrackReader::IsHIJINGLabel(Int_t label) { @@ -1746,7 +1709,7 @@ void AliCaloTrackReader::FillInputEMCAL() AliVCluster * clus = 0; if ( (clus = fInputEvent->GetCaloCluster(iclus)) ) { - if (IsEMCALCluster(clus)) + if (clus->IsEMCAL()) { FillInputEMCALAlgorithm(clus, iclus); }//EMCAL cluster @@ -1802,7 +1765,7 @@ void AliCaloTrackReader::FillInputEMCAL() if ( (clus = fInputEvent->GetCaloCluster(iclus)) ) { - if (IsEMCALCluster(clus)) + if (clus->IsEMCAL()) { Float_t frac =-1; @@ -1864,7 +1827,7 @@ void AliCaloTrackReader::FillInputPHOS() AliVCluster * clus = 0; if ( (clus = fInputEvent->GetCaloCluster(iclus)) ) { - if (IsPHOSCluster(clus)) + if (clus->IsPHOS()) { if(fAcceptOnlyHIJINGLabels && !IsHIJINGLabel(clus->GetLabel())) continue ; @@ -2321,12 +2284,12 @@ void AliCaloTrackReader::MatchTriggerCluster(TArrayI patches) if(clusterList) clus = (AliVCluster*) clusterList->At(iclus); else clus = fInputEvent->GetCaloCluster(iclus); - if ( !clus ) continue ; + if ( !clus ) continue ; - if ( !IsEMCALCluster(clus)) continue ; + if ( !clus->IsEMCAL() ) continue ; //Skip clusters with too low energy to be triggering - if ( clus->E() < minE ) continue ; + if ( clus->E() < minE ) continue ; Float_t frac = -1; Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(fInputEvent->GetEMCALCells(), clus,frac); diff --git a/PWG/CaloTrackCorrBase/AliCaloTrackReader.h b/PWG/CaloTrackCorrBase/AliCaloTrackReader.h index f55802596cb..c039c9c65dd 100755 --- a/PWG/CaloTrackCorrBase/AliCaloTrackReader.h +++ b/PWG/CaloTrackCorrBase/AliCaloTrackReader.h @@ -180,17 +180,7 @@ public: virtual void SwitchOnFiducialCut() { fCheckFidCut = kTRUE ; fFiducialCut = new AliFiducialCut() ; } virtual void SwitchOffFiducialCut() { fCheckFidCut = kFALSE ; } - - // Cluster origin - - Bool_t IsEMCALCluster(AliVCluster *clus) const; - Bool_t IsPHOSCluster (AliVCluster *clus) const; - - // Patch for cluster origin for Old AODs implementation - - void SwitchOnOldAODs() { fOldAOD = kTRUE ; } - void SwitchOffOldAODs() { fOldAOD = kFALSE ; } - + // Cluster/track/cells switchs Bool_t IsCTSSwitchedOn() const { return fFillCTS ; } @@ -720,7 +710,6 @@ public: Int_t fLastMixedCaloEvent ; // Temporary container with the last event added to the mixing list for photons Bool_t fWriteOutputDeltaAOD; // Write the created delta AOD objects into file - Bool_t fOldAOD; // Old AODs, before revision 4.20 Int_t fV0ADC[2] ; // Integrated V0 signal Int_t fV0Mul[2] ; // Integrated V0 Multiplicity @@ -808,7 +797,7 @@ public: AliCaloTrackReader( const AliCaloTrackReader & r) ; // cpy ctor AliCaloTrackReader & operator = (const AliCaloTrackReader & r) ; // cpy assignment - ClassDef(AliCaloTrackReader,67) + ClassDef(AliCaloTrackReader,68) } ; diff --git a/PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx b/PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx index 88848c6ecec..52880826cf0 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx @@ -2379,8 +2379,8 @@ void AliAnaPi0::MakeAnalysisFillHistograms() AliVCluster *cluster = event->GetCaloCluster(iclus); Bool_t is = kFALSE; - if (fCalorimeter == "EMCAL" && GetReader()->IsEMCALCluster(cluster)) is = kTRUE; - else if(fCalorimeter == "PHOS" && GetReader()->IsPHOSCluster (cluster)) is = kTRUE; + if (fCalorimeter == "EMCAL" && cluster->IsEMCAL()) is = kTRUE; + else if(fCalorimeter == "PHOS" && cluster->IsPHOS() ) is = kTRUE; if(is){ if (p1->GetCaloLabel(0) == cluster->GetID()) ncell1 = cluster->GetNCells(); -- 2.39.3