From 1f41ed3d67edb15a999b974ce7ae43fb7bb6e79f Mon Sep 17 00:00:00 2001 From: loizides Date: Fri, 16 Sep 2011 19:50:11 +0000 Subject: [PATCH] track iso fix --- .../AliAnalysisTaskEMCALPi0PbPb.cxx | 22 +++++++++++-------- .../EmcalTasks/AliAnalysisTaskEMCALPi0PbPb.h | 13 +++++++---- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/PWG4/UserTasks/EmcalTasks/AliAnalysisTaskEMCALPi0PbPb.cxx b/PWG4/UserTasks/EmcalTasks/AliAnalysisTaskEMCALPi0PbPb.cxx index 90913aa9dae..f591be8dfff 100644 --- a/PWG4/UserTasks/EmcalTasks/AliAnalysisTaskEMCALPi0PbPb.cxx +++ b/PWG4/UserTasks/EmcalTasks/AliAnalysisTaskEMCALPi0PbPb.cxx @@ -969,7 +969,8 @@ void AliAnalysisTaskEMCALPi0PbPb::CalcClusterProps() cl->fIdMax = id; cl->fSM = fGeom->GetSuperModuleNumber(id); cl->fEmax = emax; - cl->fE2max = GetSecondMaxCell(clus); + Short_t id2 = -1; + cl->fE2max = GetSecondMaxCellEnergy(clus,id2); cl->fTmax = cells->GetCellTime(id); if (clus->GetDistanceToBadChannel()<10000) cl->fDbc = clus->GetDistanceToBadChannel(); @@ -1002,11 +1003,15 @@ void AliAnalysisTaskEMCALPi0PbPb::CalcClusterProps() cl->fTrIsoD3 = GetTrackIsolation(clusterVec.Eta(),clusterVec.Phi(),fIsoDist+0.1); cl->fTrIso1D3 = GetTrackIsolation(clusterVec.Eta(),clusterVec.Phi(),fIsoDist+0.1, 1); cl->fTrIso2D3 = GetTrackIsolation(clusterVec.Eta(),clusterVec.Phi(),fIsoDist+0.1, 2); + cl->fTrIsoD4 = GetTrackIsolation(clusterVec.Eta(),clusterVec.Phi(),fIsoDist+0.2); + cl->fTrIso1D4 = GetTrackIsolation(clusterVec.Eta(),clusterVec.Phi(),fIsoDist+0.2, 1); + cl->fTrIso2D4 = GetTrackIsolation(clusterVec.Eta(),clusterVec.Phi(),fIsoDist+0.2, 2); cl->fTrIsoStrip = GetTrackIsoStrip(clusterVec.Eta(), clusterVec.Phi()); cl->fCeCore = GetCellIsolation(clsVec.Eta(),clsVec.Phi(),0.05); cl->fCeIso = GetCellIsolation(clsVec.Eta(),clsVec.Phi(),fIsoDist); cl->fCeIso1 = GetCellIsolation(clsVec.Eta(),clsVec.Phi(),0.10); cl->fCeIso3 = GetCellIsolation(clsVec.Eta(),clsVec.Phi(),0.30); + cl->fCeIso4 = GetCellIsolation(clsVec.Eta(),clsVec.Phi(),0.40); cl->fCeIso4x4 = GetCellIsoNxM(clsVec.Eta(),clsVec.Phi(), 4, 4); cl->fCeIso5x5 = GetCellIsoNxM(clsVec.Eta(),clsVec.Phi(), 5, 5); cl->fCeIso3x22 = GetCellIsoNxM(clsVec.Eta(),clsVec.Phi(), 3, 22); @@ -2044,7 +2049,7 @@ Double_t AliAnalysisTaskEMCALPi0PbPb::GetMaxCellEnergy(const AliVCluster *cluste } //________________________________________________________________________ -Double_t AliAnalysisTaskEMCALPi0PbPb::GetSecondMaxCell(AliVCluster *clus) const +Double_t AliAnalysisTaskEMCALPi0PbPb::GetSecondMaxCellEnergy(AliVCluster *clus, Short_t &id) const { // Get second maximum cell. @@ -2065,8 +2070,10 @@ Double_t AliAnalysisTaskEMCALPi0PbPb::GetSecondMaxCell(AliVCluster *clus) const for(Int_t iCell=0;iCellGetNCells();iCell++){ Int_t absId = clus->GetCellAbsId(iCell); cellen = cells->GetCellAmplitude(absId); - if(cellen < firstEmax && cellen > secondEmax) + if(cellen < firstEmax && cellen > secondEmax) { secondEmax = cellen; + id = absId; + } } return secondEmax; } @@ -2239,7 +2246,7 @@ Double_t AliAnalysisTaskEMCALPi0PbPb::GetTrackIsolation(Double_t cEta, Double_t Double_t rad2 = radius*radius; Int_t ntrks = fSelPrimTracks->GetEntries(); for(Int_t j = 0; j(fSelTracks->At(j)); + AliVTrack *track = static_cast(fSelPrimTracks->At(j)); if (!track) continue; if (track->Pt()GetEntries(); for(Int_t j = 0; j(fSelTracks->At(j)); + AliVTrack *track = static_cast(fSelPrimTracks->At(j)); if (!track) continue; if (track->Pt()1GeV/c), iso dist 0.3 Double32_t fTrIso2D3; //[0,0,16] track isolation (pt>2GeV/c), iso dist 0.3 + Double32_t fTrIsoD4; //[0,0,16] track isolation, iso dist 0.4 + Double32_t fTrIso1D4; //[0,0,16] track isolation (pt>1GeV/c), iso dist 0.4 + Double32_t fTrIso2D4; //[0,0,16] track isolation (pt>2GeV/c), iso dist 0.4 Double32_t fTrIsoStrip; //[0,0,16] track isolation strip, dEtaXdPhi=0.015x0.3 Double32_t fCeIso; //[0,0,16] cell isolation in R=0.20 Double32_t fCeIso1; //[0,0,16] cell isolation in R=0.10 Double32_t fCeIso3; //[0,0,16] cell isolation in R=0.30 + Double32_t fCeIso4; //[0,0,16] cell isolation in R=0.30 Double32_t fCeIso4x4; //[0,0,16] cell isolation in 4x4 cells Double32_t fCeIso5x5; //[0,0,16] cell isolation in 5x5 cells Double32_t fCeCore; //[0,0,16] cell content in R=0.05 @@ -382,7 +387,7 @@ class AliStaCluster : public TObject Short_t fMcLabel; // index of closest MC particle Double32_t fEmbE; //[0,0,16] sum of energy of embedded (MC) cells in cluster - ClassDef(AliStaCluster,7) // Cluster class + ClassDef(AliStaCluster,8) // Cluster class }; class AliStaTrigger : public TObject -- 2.43.0