]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/TPCupgrade/AliToyMCEventGeneratorSimple.h
Fixing coverity defects 24797 and 24795
[u/mrichter/AliRoot.git] / TPC / TPCupgrade / AliToyMCEventGeneratorSimple.h
CommitLineData
402a4145 1#ifndef AliToyMCEventGeneratorSimple_H
2#define AliToyMCEventGeneratorSimple_H
3
4#include <AliESDEvent.h>
5
6#include "AliToyMCEventGenerator.h"
7#include <TString.h>
8class AliToyMCEvent;
9class AliESDtrackCuts;
10class TTree;
11class TFile;
12class TH1F;
13class 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 AliToyMCEvent* GenerateLaser(Double_t time);
24
25 void SetParametersToyGen(const Char_t* parfilename="$ALICE_ROOT/TPC/Upgrade/files/params.root", Double_t vertexMean = 0., Double_t vertexSigma = 7.);
5a516e0a 26 void RunSimulation(Int_t nevents=10, Int_t ntracks=20, Int_t rate=50);
27 void RunSimulationBunchTrain(Int_t nevents=10, Int_t ntracks=20);
28 void RunSimulationESD(Int_t nevents=10, Int_t ntracks=20);
29 void RunSimulationLaser(Int_t nevents=1);
402a4145 30
31 void SetInputESD(const Char_t* filename) {fInputFileNameESD = filename;}
5a516e0a 32 Int_t OpenInputAndGetMaxEvents(Int_t type, Int_t nevents);
33 void RunSimulation2(Bool_t equalspacing, Int_t type, Int_t nevents, Int_t ntracks);
34 void GetNGeneratedEventsAndSpacing(Bool_t equalSpacing, Int_t &ngen, Double_t &spacing);
402a4145 35 Bool_t CloseInputFile();
36
37 private:
38
39 Double_t fVertexMean;
40 Double_t fVertexSigma;
41
42 Int_t fNtracks;
43 TString fInputFileNameESD;
44
45 AliESDtrackCuts *fESDCuts;
46 Int_t fInputIndex;
47 AliESDEvent* fESDEvent;
48 TTree* fESDTree;
49 TFile* fInputFile;
50 TH1F* fHPt;
51 TH1F* fHEta;
52 TH1I* fHMult;
53 Bool_t fHistosSet;
54 TFile* fParamFile;
55
56 ClassDef(AliToyMCEventGeneratorSimple, 1)
57
58};
59
60
61
62
63
64
65#endif
66