]>
Commit | Line | Data |
---|---|---|
de0014b7 | 1 | #ifndef AliToyMCEventGenerator_H |
2 | #define AliToyMCEventGenerator_H | |
3 | ||
a1a695e5 | 4 | #include <TString.h> |
5 | ||
6 | class TFile; | |
7 | class TTree; | |
8 | ||
9 | class AliTPCParam; | |
223d9e38 | 10 | class AliTPCCorrection; |
32438f4e | 11 | class AliTrackPointArray; |
a1a695e5 | 12 | |
13 | class AliToyMCTrack; | |
14 | class AliToyMCEvent; | |
de0014b7 | 15 | |
de0014b7 | 16 | class 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 | }; | |
223d9e38 | 31 | |
32 | enum ECorrection { | |
33 | kLookup=0, | |
34 | kSpaceChargeFile | |
35 | }; | |
cd8ed0ac | 36 | |
de0014b7 | 37 | AliToyMCEventGenerator(); |
38 | AliToyMCEventGenerator(const AliToyMCEventGenerator &gen); | |
39 | virtual ~AliToyMCEventGenerator(); | |
40 | ||
41 | virtual AliToyMCEvent* Generate(Double_t time) = 0; | |
42 | ||
bfad2b05 | 43 | Bool_t DistortTrack(AliToyMCTrack &trackIn, Double_t t0=0); |
1e62e876 | 44 | void MakeITSClusters(AliToyMCTrack &trackIn/*, Double_t t0*/); |
45 | void MakeTRDClusters(AliToyMCTrack &trackIn/*, Double_t t0*/); | |
46 | void MakeTPCClusters(AliToyMCTrack &trackIn, Double_t t0); | |
32438f4e | 47 | void CreateSpacePoints(AliToyMCTrack &trackIn, |
48 | AliTrackPointArray &arrUdist, | |
49 | AliTrackPointArray &arrDist); | |
e83fd282 | 50 | void SetPoint(Float_t xyz[3], Float_t sigmaY, Float_t sigmaZ, AliTrackPoint &point); |
32438f4e | 51 | void ConvertTrackPointsToLocalClusters(AliTrackPointArray &arrPoints, AliToyMCTrack &tr, Double_t t0, Int_t type); |
52 | Bool_t SetupCluster(AliTPCclusterMI &tempCl, Float_t xyz[3], Int_t sec, Double_t t0); | |
53 | ||
a1a695e5 | 54 | void SetOutputFileName(const char* file) { fOutputFileName=file; } |
55 | const char* GetOutputFileName() const { return fOutputFileName.Data(); } | |
32438f4e | 56 | |
223d9e38 | 57 | void SetSpaceCharge(EEpsilon epsilon, EGasType gasType=kNeCO2_9010, ECollRate collRate=k50kHz, ECorrection corrType=kLookup); |
58 | void SetSpaceChargeFile(const char* file) { fCorrectionFile=file; } | |
cd8ed0ac | 59 | |
32438f4e | 60 | Int_t GetSector(Float_t xyz[3]); |
d92b8630 | 61 | |
62 | void InitSpaceCharge(); | |
63 | ||
d1cf83f5 | 64 | void SetStepCorrection(Bool_t step=kTRUE) { fUseStepCorrection=step; } |
65 | Bool_t GetStepCorrection() const { return fUseStepCorrection; } | |
66 | ||
67 | void SetUseMaterialBudget(Bool_t use) { fUseMaterialBudget=use; } | |
68 | Bool_t GetUseMaterialBudget() const { return fUseMaterialBudget; } | |
0403120d | 69 | |
70 | void SetIsLaser(Bool_t use) { fIsLaser=use; } | |
71 | Bool_t GetIsLaser() const { return fIsLaser; } | |
32438f4e | 72 | |
de0014b7 | 73 | protected: |
74 | AliTPCParam *fTPCParam; | |
a1a695e5 | 75 | AliToyMCEvent *fEvent; |
76 | ||
77 | Bool_t ConnectOutputFile(); | |
78 | Bool_t CloseOutputFile(); | |
79 | void FillTree(); | |
cd8ed0ac | 80 | |
223d9e38 | 81 | UInt_t fCurrentTrack; // unique track id within the current event generation |
82 | ||
de0014b7 | 83 | |
84 | private: | |
a1a695e5 | 85 | AliToyMCEventGenerator& operator= (const AliToyMCEventGenerator& ); |
86 | ||
223d9e38 | 87 | AliTPCCorrection *fTPCCorrection; |
a1a695e5 | 88 | |
223d9e38 | 89 | TString fCorrectionFile; |
a1a695e5 | 90 | TString fOutputFileName; |
91 | TFile *fOutFile; | |
92 | TTree *fOutTree; | |
d92b8630 | 93 | |
94 | Bool_t fUseStepCorrection; | |
d1cf83f5 | 95 | Bool_t fUseMaterialBudget; |
0403120d | 96 | Bool_t fIsLaser; |
de0014b7 | 97 | |
98 | ClassDef(AliToyMCEventGenerator, 1) | |
99 | ||
100 | }; | |
101 | ||
102 | #endif | |
103 |