]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - THbtp/THBTprocessor.cxx
In AliMUONTrackerDDLDecoder:
[u/mrichter/AliRoot.git] / THbtp / THBTprocessor.cxx
index 5b909309f4ac945d2ce7d9e6de627aca1008f62f..c45ebdb884f116745f72dfbdd243d290779bd1ba 100644 (file)
@@ -1,4 +1,9 @@
 #include "THBTprocessor.h"
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
 //_____________________________________________________________________________
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 
-#include <TParticle.h>
+#include <Riostream.h>
+#include <TClonesArray.h>
 #include <TMath.h>
+#include <TParticle.h>
+
 #include "HBTprocCOMMON.h"
 
-#include <Riostream.h>
 #ifndef WIN32
 # define hbtprocessor hbtprocessor_
 # define ctest ctest_
@@ -57,7 +64,11 @@ THBTprocessor::THBTprocessor()// it is better not to intialize it:TGenerator("TH
  }
 /*****************************************************************************************/
 
+#if ROOT_VERSION_CODE <= ROOT_VERSION(5,11,2)
 void THBTprocessor::GenerateEvent() const
+#else
+void THBTprocessor::GenerateEvent()
+#endif
 {
 //Starts processing
 
@@ -444,6 +455,32 @@ Int_t THBTprocessor::ImportParticles(TClonesArray *particles, Option_t */*option
   return nrpart;        
  }
 
+/*****************************************************************************************/
+TObjArray * THBTprocessor::ImportParticles(Option_t */*option*/)
+ {
+  //Copy particle data into TObjArray
+  fParticles->Clear();
+  for (Int_t i=0; i < TRK_MAXLEN; i++) 
+   {
+   
+    
+      if (TRACK1.trk_E[i] == 0.) continue;
+    
+      Float_t px   = TRACK1.trk_px[i];
+      Float_t py   = TRACK1.trk_py[i];
+      Float_t pz   = TRACK1.trk_pz[i];
+//    Float_t pE   = TRACK.trk_E[i];
+      Float_t mass = PARTICLE.part_mass[TRACK1.trk_ge_pid[i]];
+    
+      TParticle * p =new TParticle(0,0,0,0,0,0,px,py,pz,
+                                  TMath::Sqrt(mass*mass+px*px+py*py+pz*pz),
+                                  0,0,0,0);
+      fParticles->Add(p);
+   }
+  return fParticles;        
+ }
+
 /*****************************************************************************************/
 
 void THBTprocessor::PrintEvent() const