ref X as na argument
[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);
32438f4e 39 void CreateSpacePoints(AliToyMCTrack &trackIn,
40 AliTrackPointArray &arrUdist,
41 AliTrackPointArray &arrDist);
42 void SetPoint(Float_t xyz[3], AliTrackPoint &point);
43 void ConvertTrackPointsToLocalClusters(AliTrackPointArray &arrPoints, AliToyMCTrack &tr, Double_t t0, Int_t type);
44 Bool_t SetupCluster(AliTPCclusterMI &tempCl, Float_t xyz[3], Int_t sec, Double_t t0);
45
a1a695e5 46 void SetOutputFileName(const char* file) { fOutputFileName=file; }
47 const char* GetOutputFileName() const { return fOutputFileName.Data(); }
32438f4e 48
cd8ed0ac 49 void SetSpaceCharge(EEpsilon epsilon, EGasType gasType=kNeCO2_9010, ECollRate collRate=k50kHz);
50 void SetSpaceChargeFile(const char* file) { fSpaceChargeFile=file; }
51
32438f4e 52 Int_t GetSector(Float_t xyz[3]);
d92b8630 53
54 void InitSpaceCharge();
55
56 void SetStepCorrection(Bool_t step=kTRUE) { fUseStepCorrection=step; }
57 Bool_t GetStepCorrection() const { return fUseStepCorrection; }
32438f4e 58
de0014b7 59 protected:
60 AliTPCParam *fTPCParam;
a1a695e5 61 AliToyMCEvent *fEvent;
62
63 Bool_t ConnectOutputFile();
64 Bool_t CloseOutputFile();
65 void FillTree();
cd8ed0ac 66
de0014b7 67
68 private:
a1a695e5 69 AliToyMCEventGenerator& operator= (const AliToyMCEventGenerator& );
70
de0014b7 71 AliTPCSpaceCharge3D *fSpaceCharge;
a1a695e5 72
cd8ed0ac 73 TString fSpaceChargeFile;
a1a695e5 74 TString fOutputFileName;
75 TFile *fOutFile;
76 TTree *fOutTree;
d92b8630 77
78 Bool_t fUseStepCorrection;
de0014b7 79
80 ClassDef(AliToyMCEventGenerator, 1)
81
82};
83
84#endif
85