Skip the indexes of tracks belonging to the underlying event in the signal ESD
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Jul 2005 10:32:07 +0000 (10:32 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Jul 2005 10:32:07 +0000 (10:32 +0000)
PHOS/AliPHOSRecParticle.cxx

index 4eee307..022ef40 100644 (file)
@@ -188,8 +188,9 @@ const Int_t AliPHOSRecParticle::GetPrimaryIndex() const
   Int_t    trackHadron  = -1;
   for (Int_t iPrim=0; iPrim<nPrimary; iPrim++) {
     Int_t iPrimary = digit->GetPrimary(iPrim+1);
-    if (iPrimary == -1)
-      continue ; 
+    if (iPrimary == -1 || TMath::Abs(iPrimary)>10000000)
+      continue ;  //PH 10000000 is the shift of the track 
+                  //PH indexes in the underlying event
     track = gime->Primary(iPrimary);
     Int_t pdgCode   = track->GetPdgCode();
     Double_t energy = track->Energy();