X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=THbtp%2FTHBTprocessor.cxx;h=c45ebdb884f116745f72dfbdd243d290779bd1ba;hb=4402d4dcf215a4ae95e61d7c60b1a2d56a0f1d9e;hp=5b909309f4ac945d2ce7d9e6de627aca1008f62f;hpb=a97eb2064be83ee5bfe2960033370616703ed840;p=u%2Fmrichter%2FAliRoot.git diff --git a/THbtp/THBTprocessor.cxx b/THbtp/THBTprocessor.cxx index 5b909309f4a..c45ebdb884f 100644 --- a/THbtp/THBTprocessor.cxx +++ b/THbtp/THBTprocessor.cxx @@ -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$ */ + //_____________________________________________________________________________ /////////////////////////////////////////////////////////////////////////////// // // @@ -19,11 +24,13 @@ /////////////////////////////////////////////////////////////////////////////// -#include +#include +#include #include +#include + #include "HBTprocCOMMON.h" -#include #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