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