]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliTrackReference.cxx
Moving the momentum cut from the TOF PID to the ESD PID (Yu.Belikov)
[u/mrichter/AliRoot.git] / STEER / AliTrackReference.cxx
index 2180103644e73a62871388480e0531465d91d5cf..7c3fb26a5d643a0f75a297b00438fa3cc1fe3bb6 100644 (file)
@@ -15,6 +15,7 @@
 
 
 #include "AliTrackReference.h"
+#include "TVirtualMC.h"
 #include "TParticle.h"
 #include "AliRun.h"
 #include "TLorentzVector.h"
@@ -53,7 +54,7 @@ ClassImp(AliTrackReference)
 }
 
 //_______________________________________________________________________
-AliTrackReference::AliTrackReference(Int_t label, TVirtualMC *vMC) {
+AliTrackReference::AliTrackReference(Int_t label) {
   //
   // Create Reference object out of label and
   // data in TVirtualMC object
@@ -64,37 +65,37 @@ AliTrackReference::AliTrackReference(Int_t label, TVirtualMC *vMC) {
   // Sylwester Radomski, (S.Radomski@gsi.de)
   // GSI, Jan 31, 2003
   //
-
+    
   TLorentzVector vec;
   
   fTrack = label;
-  fLength = vMC->TrackLength();
-  fTime = vMC->TrackTime();
+  fLength = gMC->TrackLength();
+  fTime = gMC->TrackTime();
 
-  vMC->TrackPosition(vec);
+  gMC->TrackPosition(vec);
 
   fX = vec[0];
   fY = vec[1];
   fZ = vec[2];
   
-  vMC->TrackMomentum(vec);
+  gMC->TrackMomentum(vec);
   
   fPx = vec[0];
   fPy = vec[1];
-  fPy = vec[2];
+  fPz = vec[2];
 
   // Set Up status code 
   // Copy Bits from virtual MC
 
   for(Int_t i=0; i<16; i++) ResetBit(BIT(i));
 
-  SetBit(BIT(0), vMC->IsNewTrack());
-  SetBit(BIT(1), vMC->IsTrackAlive());
-  SetBit(BIT(2), vMC->IsTrackDisappeared());
-  SetBit(BIT(3), vMC->IsTrackEntering());
-  SetBit(BIT(4), vMC->IsTrackExiting());
-  SetBit(BIT(5), vMC->IsTrackInside());
-  SetBit(BIT(6), vMC->IsTrackOut());
-  SetBit(BIT(7), vMC->IsTrackStop()); 
+  SetBit(BIT(0), gMC->IsNewTrack());
+  SetBit(BIT(1), gMC->IsTrackAlive());
+  SetBit(BIT(2), gMC->IsTrackDisappeared());
+  SetBit(BIT(3), gMC->IsTrackEntering());
+  SetBit(BIT(4), gMC->IsTrackExiting());
+  SetBit(BIT(5), gMC->IsTrackInside());
+  SetBit(BIT(6), gMC->IsTrackOut());
+  SetBit(BIT(7), gMC->IsTrackStop()); 
 }
 //_______________________________________________________________________