o add lookup tables
[u/mrichter/AliRoot.git] / TPC / Upgrade / AliToyMCEventGenerator.h
CommitLineData
de0014b7 1#ifndef AliToyMCEventGenerator_H
2#define AliToyMCEventGenerator_H
3
a1a695e5 4#include <TString.h>
5
6class TFile;
7class TTree;
8
9class AliTPCParam;
10class AliTPCSpaceCharge3D;
32438f4e 11class AliTrackPointArray;
a1a695e5 12
13class AliToyMCTrack;
14class AliToyMCEvent;
de0014b7 15
de0014b7 16class AliToyMCEventGenerator : public TObject {
17 public:
cd8ed0ac 18 enum EGasType {
19 kNeCO2_9010=0
20 };
21
22 enum EEpsilon {
23 kEps5=0,
24 kEps10,
25 kEps20
26 };
27
28 enum ECollRate {
29 k50kHz = 0
30 };
31
de0014b7 32 AliToyMCEventGenerator();
33 AliToyMCEventGenerator(const AliToyMCEventGenerator &gen);
34 virtual ~AliToyMCEventGenerator();
35
36 virtual AliToyMCEvent* Generate(Double_t time) = 0;
37
bfad2b05 38 Bool_t DistortTrack(AliToyMCTrack &trackIn, Double_t t0=0);
1e62e876 39 void MakeITSClusters(AliToyMCTrack &trackIn/*, Double_t t0*/);
40 void MakeTRDClusters(AliToyMCTrack &trackIn/*, Double_t t0*/);
41 void MakeTPCClusters(AliToyMCTrack &trackIn, Double_t t0);
32438f4e 42 void CreateSpacePoints(AliToyMCTrack &trackIn,
43 AliTrackPointArray &arrUdist,
44 AliTrackPointArray &arrDist);
45 void SetPoint(Float_t xyz[3], AliTrackPoint &point);
46 void ConvertTrackPointsToLocalClusters(AliTrackPointArray &arrPoints, AliToyMCTrack &tr, Double_t t0, Int_t type);
47 Bool_t SetupCluster(AliTPCclusterMI &tempCl, Float_t xyz[3], Int_t sec, Double_t t0);
48
a1a695e5 49 void SetOutputFileName(const char* file) { fOutputFileName=file; }
50 const char* GetOutputFileName() const { return fOutputFileName.Data(); }
32438f4e 51
cd8ed0ac 52 void SetSpaceCharge(EEpsilon epsilon, EGasType gasType=kNeCO2_9010, ECollRate collRate=k50kHz);
53 void SetSpaceChargeFile(const char* file) { fSpaceChargeFile=file; }
54
32438f4e 55 Int_t GetSector(Float_t xyz[3]);
d92b8630 56
57 void InitSpaceCharge();
58
d1cf83f5 59 void SetStepCorrection(Bool_t step=kTRUE) { fUseStepCorrection=step; }
60 Bool_t GetStepCorrection() const { return fUseStepCorrection; }
61
62 void SetUseMaterialBudget(Bool_t use) { fUseMaterialBudget=use; }
63 Bool_t GetUseMaterialBudget() const { return fUseMaterialBudget; }
32438f4e 64
de0014b7 65 protected:
66 AliTPCParam *fTPCParam;
a1a695e5 67 AliToyMCEvent *fEvent;
68
69 Bool_t ConnectOutputFile();
70 Bool_t CloseOutputFile();
71 void FillTree();
cd8ed0ac 72
de0014b7 73
74 private:
a1a695e5 75 AliToyMCEventGenerator& operator= (const AliToyMCEventGenerator& );
76
de0014b7 77 AliTPCSpaceCharge3D *fSpaceCharge;
a1a695e5 78
cd8ed0ac 79 TString fSpaceChargeFile;
a1a695e5 80 TString fOutputFileName;
81 TFile *fOutFile;
82 TTree *fOutTree;
d92b8630 83
84 Bool_t fUseStepCorrection;
d1cf83f5 85 Bool_t fUseMaterialBudget;
de0014b7 86
87 ClassDef(AliToyMCEventGenerator, 1)
88
89};
90
91#endif
92