]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/Upgrade/AliToyMCEventGeneratorSimple.h
-ToyMCTrack: added two new tclonesarray of AliCluster for ITS and TRD space points
[u/mrichter/AliRoot.git] / TPC / Upgrade / AliToyMCEventGeneratorSimple.h
1 #ifndef AliToyMCEventGeneratorSimple_H
2 #define AliToyMCEventGeneratorSimple_H
3
4 #include <AliESDEvent.h>
5
6 #include "AliToyMCEventGenerator.h"
7 #include <TString.h>
8 class AliToyMCEvent;
9 class AliESDtrackCuts;
10 class TTree;
11 class TFile;
12 class TH1F;
13 class AliToyMCEventGeneratorSimple : public AliToyMCEventGenerator {
14  public:
15   AliToyMCEventGeneratorSimple();
16   AliToyMCEventGeneratorSimple(const AliToyMCEventGeneratorSimple &gen);
17   virtual ~AliToyMCEventGeneratorSimple();
18   AliToyMCEventGeneratorSimple & operator = (const AliToyMCEventGeneratorSimple &gen);
19
20   AliToyMCEvent* Generate(Double_t time);
21   AliToyMCEvent* GenerateESD(AliESDEvent& esdEvent, Double_t time);
22   AliToyMCEvent* GenerateESD2(Double_t time);
23   
24   void SetParametersToyGen(const Char_t* parfilename, Double_t vertexMean = 0., Double_t vertexSigma = 7.);
25   void RunSimulation(const Int_t nevents=10, const Int_t ntracks=20);
26   void RunSimulationBunchTrain(const Int_t nevents=10, const Int_t ntracks=20);
27   void RunSimulationESD(const Int_t nevents=10, const Int_t ntracks=20);
28   void SetInputESD(const Char_t* filename) {fInputFileNameESD = filename;}
29   Int_t OpenInputAndGetMaxEvents(const Int_t type, const Int_t nevents);
30   void RunSimulation2(const Bool_t equalspacing, const Int_t type, const Int_t nevents, const Int_t ntracks);
31   void GetNGeneratedEventsAndSpacing(const Bool_t equalSpacing, Int_t &ngen, Double_t &spacing);
32   Bool_t CloseInputFile();
33
34  private:
35   
36   Double_t fVertexMean;
37   Double_t fVertexSigma;
38
39   Int_t fNtracks;
40   TString fInputFileNameESD;
41
42   AliESDtrackCuts *fESDCuts;
43   Int_t fInputIndex;
44   AliESDEvent* fESDEvent;
45   TTree* fESDTree;
46   TFile* fInputFile;
47   TH1F* fHPt;
48   TH1F* fHEta;
49   TH1I* fHMult;
50   Bool_t fHistosSet;
51   TFile* fParamFile;
52
53   ClassDef(AliToyMCEventGeneratorSimple, 1)
54
55 };
56
57
58
59
60
61
62 #endif
63