]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fixed index out of bounds
authorssakai <Shingo.Sakai@lnf.infn.it>
Mon, 7 Jul 2014 13:15:16 +0000 (15:15 +0200)
committerssakai <Shingo.Sakai@lnf.infn.it>
Mon, 7 Jul 2014 13:16:06 +0000 (15:16 +0200)
PWGHF/hfe/AliAnalysisTaskHFECal.cxx

index 0470966d651e9094b623331fc5a04e993aaf0e62..49afa7b74e0b11c0b9aadfb5bc5e0c08f11a0e47 100644 (file)
@@ -832,7 +832,6 @@ void AliAnalysisTaskHFECal::UserExec(Option_t*)
 
     if (clsId>=0){
       AliESDCaloCluster *clust = fESD->GetCaloCluster(clsId);
-      AliESDCaloCluster *clust_ESD = fESD->GetCaloCluster(clsId_ESD);
 
       if(clust && clust->IsEMCAL()){
 
@@ -840,8 +839,14 @@ void AliAnalysisTaskHFECal::UserExec(Option_t*)
                 if(clustE==maxE)MaxEmatch = kTRUE;
                 eop = clustE/fabs(mom);
 
-                   double eop_ESD = clust_ESD->E()/fabs(mom);
+
                    MatchTrCheck->Fill(clsId_ESD,clsId);
+                   double eop_ESD = -10.0;
+                   if(clsId_ESD>=0)
+                     {
+                       AliESDCaloCluster *clust_ESD = fESD->GetCaloCluster(clsId_ESD);
+                       eop_ESD = clust_ESD->E()/fabs(mom);
+                     }
                    if(fTPCnSigma>-1 && fTPCnSigma<3 && pt>3.0)MatchTrEop->Fill(eop_ESD,eop);
 
                 //double clustT = clust->GetTOF();