FairRoot/PandaRoot
PndEvtGenGenerator.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndEvtGenGenerator header file -----
3 // ----- Created 05/02/07 by S.Spataro -----
4 // -------------------------------------------------------------------------
5 
15 #ifndef PND_EVTGENGENERATOR_H
16 #define PND_EVTGENGENERATOR_H
17 
18 
19 #include "FairGenerator.h"
20 #include "TString.h"
21 #include <fstream>
22 
23 class TClonesArray;
24 class TFile;
25 class TTree;
26 class TVirtualMCStack;
27 class FairPrimaryGenerator;
28 class TF1;
29 
30 
31 
32 class PndEvtGenGenerator : public FairGenerator
33 {
34 
35  public:
36 
39 
40 
44  PndEvtGenGenerator(const Char_t* fileName);
45  PndEvtGenGenerator(const Char_t* fileName, Double_t Rsigma, TF1 * DensityFunction);
46 
47 
49  virtual ~PndEvtGenGenerator();
50 
51 
56  virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
57 
58  protected:
59  Bool_t ReadAsciiEvent(FairPrimaryGenerator* primGen);
60  Bool_t ReadRootEvent(FairPrimaryGenerator* primGen);
61  Bool_t Init();
62 
63  private:
64 
66 
67  Int_t iEvent;
69  TFile* fInputRootFile;
70  TTree* fInputTree;
72 
75  Int_t *fRPdg;
76  Int_t *fRDF, *fRDL;
77  Int_t fRNTrk;
78 
80 
81  int fGasmode;
82  double fRsigma;
83 
85 
88  void CloseInput();
89 
90 
92 
93 };
94 
95 #endif
Bool_t ReadRootEvent(FairPrimaryGenerator *primGen)
int fGasmode
0: ASCII, 1:ROOT
Int_t fRNTrk
Number of daughters.
FairPrimaryGenerator * primGen
Definition: sim_emc_apd.C:81
TFile * fInputRootFile
Input file name.
Double_t * fRVx
Momentum of particle.
FILE * fInputAsciiFile
Pointer to input tree.
Double_t
double fRsigma
Gas mode (vertex smearing)
TString fFileName
Event number.
TF1 * fDensityFunction
sigma for vertex smearing
ClassDef(PndEvtGenGenerator, 1)
TTree * fInputTree
Pointer to input file.
Bool_t fFileType
number of particles in event
Int_t * fRDF
PDG code of particle.
Bool_t ReadAsciiEvent(FairPrimaryGenerator *primGen)
Int_t * fRPdg
Start Vertex of particle.
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)