fixing the pt calculation for each CPV method in the correction of energy double...
authormcosenti <mcosenti@cern.ch>
Wed, 10 Sep 2014 21:43:44 +0000 (18:43 -0300)
committermcosenti <mcosenti@cern.ch>
Wed, 10 Sep 2014 21:43:44 +0000 (18:43 -0300)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx

index c0fe99e..db5e577 100644 (file)
@@ -893,15 +893,19 @@ void AliAnalysisTaskEMCALIsoPhoton::GetCeIso(TVector3 vec, Int_t maxid, Float_t
       continue;
     if(maxid==id)
       continue;
-    Double_t matchedpt =  GetTrackMatchedPt(c->GetTrackMatchedIndex());
+    Double_t matchedpt =  0;
     if(fCpvFromTrack){
+      matchedpt = GetTrackMatchedPt(c->GetTrackMatchedIndex());
       if(matchedpt>0 && fRemMatchClus )
        continue;
     } else {
-      if(TMath::Abs(c->GetTrackDx())<0.03 && TMath::Abs(c->GetTrackDz())<0.02 && fRemMatchClus){
-       if(fDebug)
-         printf("This isolation cluster is matched to a track!++++++++++++++++++++++++++++++++++++++++++++++++++\n");
-       continue;
+      if(TMath::Abs(c->GetTrackDx())<0.03 && TMath::Abs(c->GetTrackDz())<0.02){
+       matchedpt = GetTrackMatchedPt(c->GetTrackMatchedIndex());
+       if(fRemMatchClus){
+         if(fDebug)
+           printf("This isolation cluster is matched to a track!++++++++++++++++++++++++++++++++++++++++++++++++++\n");
+         continue;
+       }
       }
     }
     Double_t nEt = TMath::Max(Et-matchedpt, 0.0);