]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Possibility to investigate a primary of not yet loaded particle (I.Hrivnacova)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Nov 2001 09:27:55 +0000 (09:27 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Nov 2001 09:27:55 +0000 (09:27 +0000)
STEER/AliStack.cxx
STEER/AliStack.h

index 9f6195285df007e37e9db812950cfbb7f4c2f9ab..4acb9eeaebc5b51bb47f0a9f1793b578b745bc81 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.15  2001/09/04 15:10:37  hristov
+Additional protection is included to avoid some problems using Hijing
+
 Revision 1.14  2001/08/30 09:44:06  hristov
 VertexSource_t added to avoid the warnings
 
@@ -612,20 +615,18 @@ TParticle* AliStack::Particle(Int_t i)
 }
 
 //_____________________________________________________________________________
-Int_t AliStack::GetPrimary(Int_t id) const
+Int_t AliStack::GetPrimary(Int_t id)
 {
   //
   // Return number of primary that has generated track
   //
   
   int current, parent;
-  TParticle *part;
   //
   parent=id;
   while (1) {
     current=parent;
-    part = (TParticle *)fParticleMap->At(current);
-    parent=part->GetFirstMother();
+    parent=Particle(current)->GetFirstMother();
     if(parent<0) return current;
   }
 }
index 1a9a132c25898f4e3f410e2129ba0c97d0e68fec..54d3f7ba9f2d9914652af1ed288722a2b31c38e5 100644 (file)
@@ -63,7 +63,7 @@ class AliStack : public TObject
     Int_t       CurrentTrack() const;
     TObjArray*  Particles() const;
     TParticle*  Particle(Int_t id);
-    Int_t       GetPrimary(Int_t id) const;
+    Int_t       GetPrimary(Int_t id);
     TTree*      TreeK() const {return fTreeK;}
     
   protected: