]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliStack.cxx
Corrections to obey the coding conventions
[u/mrichter/AliRoot.git] / STEER / AliStack.cxx
index ddf2a04ef84bad49617138d22939679e2c943d65..529ccc356d44fc06f41aaf5c0ed067e57f65935f 100644 (file)
@@ -446,6 +446,7 @@ void AliStack::PurifyKine()
    //   delete [] map;
 }
 
+//_____________________________________________________________________________
 Bool_t AliStack::KeepPhysics(TParticle* part)
 {
     //
@@ -662,6 +663,23 @@ Int_t AliStack::TreeKEntry(Int_t id) const
   return entry;
 }
 
+//_____________________________________________________________________________
+Int_t AliStack::CurrentTrackParent() const
+{
+  //
+  // Return number of the parent of the current track
+  //
+  
+  TParticle* current = (TParticle*)fParticleMap->At(fCurrent);
+
+  if (current) 
+    return current->GetFirstMother();
+  else {
+    Warning("CurrentTrackParent", "Current track not found in the stack");
+    return -1;
+  }  
+}
 //_____________________________________________________________________________
 Int_t AliStack::GetPrimary(Int_t id)
 {
@@ -856,6 +874,7 @@ void AliStack::FinishRun()
     }
 }
 
+//_____________________________________________________________________________
 Bool_t AliStack::GetEvent(Int_t event)
 {
 //