]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenReaderTreeK.h
moved to correction to pt,eta,phi, using THn, integration over ep in correction
[u/mrichter/AliRoot.git] / EVGEN / AliGenReaderTreeK.h
index 487d2f4fa8f09d1c28cc7e4124b0b4f6c1e5531f..5404698789be944392c5a28977cae95fa1c4c1da 100644 (file)
@@ -1,16 +1,19 @@
-#ifndef ALIGENREADERTreeK_H
+#ifndef ALIGENREADERTREEK_H
 #define ALIGENREADERTREEK_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
-
+//
+// Realisation of AliGenReader to be used with AliGenExtFile
+// It reads events from a kinematics TreeK.
+// Author: andreas.morsch@cern.ch
+//
 #include "AliGenReader.h"
-#include "AliStack.h"
 
 class TFile;
-class AliHeader;
 class AliRunLoader;
+class AliStack;
 class TString;
 class TObjArray;
 
@@ -26,10 +29,13 @@ class AliGenReaderTreeK : public AliGenReader
     virtual Int_t NextEvent();
     virtual TParticle*  NextParticle();
     virtual void RewindEvent();
-    virtual void SetOnlyPrimaries(Bool_t flag){fOnlyPrimaries = flag;}
+    virtual void SetFirstEvent(Int_t evt)    {fNcurrent  = evt;};
+    virtual void SetOnlyPrimaries(Bool_t flag) {fOnlyPrimaries = flag;}
     AliGenReaderTreeK & operator=(const AliGenReaderTreeK & rhs);
     void SetDirs(TObjArray* dirs){fDirs = dirs;} //sets array directories names
     void AddDir(const char* dirname);
+    AliRunLoader * GetRunLoader() const {return fInRunLoader;}
+
  protected:
     Int_t             fNcurrent;          // points to the next entry
     Int_t             fNparticle;         // Next particle in list
@@ -44,16 +50,12 @@ class AliGenReaderTreeK : public AliGenReader
     
     TString&   GetDirName(Int_t entry);
     TParticle* GetParticle(Int_t i);
-    
+ private:
+    void Copy(TObject&) const;    
     ClassDef(AliGenReaderTreeK,1) // Read particles from TreeK
 };
 
-inline 
-TParticle* AliGenReaderTreeK::GetParticle(Int_t i)
- {
-  if (fStack && i<fNp) return fStack->Particle(i);
-  return 0x0;
- }
+
 
 #endif