1 #ifndef ALIGENEXTFILE_H
2 #define ALIGENEXTFILE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 // Event generator that can read the old ALICE event format based on CW-ntuples
10 // http://consult.cern.ch/alice/Internal_Notes/1995/32/abstract
11 // Author: andreas.morsch@cern.ch
13 #include "AliGenerator.h"
16 class AliGenExtFile : public AliGenerator
20 AliGenExtFile(Int_t npart);
21 AliGenExtFile(const AliGenExtFile &cocktail);
23 virtual ~AliGenExtFile();
25 virtual void Init() {}
26 // Initialise fluka data
27 virtual void NtupleInit();
28 // set file name of data file
29 virtual void SetFileName(const Text_t *filname) {fFileName=filname;}
31 virtual void Generate();
32 AliGenExtFile & operator=(const AliGenExtFile & rhs);
33 enum Code_t {kPDG, kGEANT3};
34 void SetParticleCode(Code_t code) {fCode = code;}
37 const Text_t *fFileName; //! Choose the file
38 Int_t fNcurrent; // points to the next entry
39 TTree *fTreeNtuple; // pointer to the TTree
40 //Declaration of leaves types
41 Code_t fCode; // Particle code type
42 Int_t fNihead; // Number of entries in integer header
43 Int_t fIhead[12]; // Integer header
44 Int_t fNrhead; // Number of entries in float header
45 Float_t fRhead[6]; // Float header
46 UInt_t fIdpart; // Particle type
47 Float_t fTheta; // Theta
49 Float_t fP; // Total momentum
50 Float_t fE; // Total energy
52 ClassDef(AliGenExtFile,1) //Generate particles from external file