1 #ifndef AliToyMCEventGenerator_H
2 #define AliToyMCEventGenerator_H
10 class AliTPCCorrection;
11 class AliTrackPointArray;
16 class AliToyMCEventGenerator : public TObject {
37 AliToyMCEventGenerator();
38 AliToyMCEventGenerator(const AliToyMCEventGenerator &gen);
39 virtual ~AliToyMCEventGenerator();
41 virtual AliToyMCEvent* Generate(Double_t time) = 0;
43 Bool_t DistortTrack(AliToyMCTrack &trackIn, Double_t t0=0);
44 void MakeITSClusters(AliToyMCTrack &trackIn/*, Double_t t0*/);
45 void MakeTRDClusters(AliToyMCTrack &trackIn/*, Double_t t0*/);
46 void MakeTPCClusters(AliToyMCTrack &trackIn, Double_t t0);
47 void CreateSpacePoints(AliToyMCTrack &trackIn,
48 AliTrackPointArray &arrUdist,
49 AliTrackPointArray &arrDist);
50 void SetPoint(Float_t xyz[3], Float_t sigmaY, Float_t sigmaZ, AliTrackPoint &point);
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);
54 void SetOutputFileName(const char* file) { fOutputFileName=file; }
55 const char* GetOutputFileName() const { return fOutputFileName.Data(); }
57 void SetSpaceCharge(EEpsilon epsilon, EGasType gasType=kNeCO2_9010, ECollRate collRate=k50kHz, ECorrection corrType=kLookup);
58 void SetSpaceChargeFile(const char* file) { fCorrectionFile=file; }
60 Int_t GetSector(Float_t xyz[3]);
62 void InitSpaceCharge();
64 void SetStepCorrection(Bool_t step=kTRUE) { fUseStepCorrection=step; }
65 Bool_t GetStepCorrection() const { return fUseStepCorrection; }
67 void SetUseMaterialBudget(Bool_t use) { fUseMaterialBudget=use; }
68 Bool_t GetUseMaterialBudget() const { return fUseMaterialBudget; }
70 void SetIsLaser(Bool_t use) { fIsLaser=use; }
71 Bool_t GetIsLaser() const { return fIsLaser; }
74 AliTPCParam *fTPCParam;
75 AliToyMCEvent *fEvent;
77 Bool_t ConnectOutputFile();
78 Bool_t CloseOutputFile();
81 UInt_t fCurrentTrack; // unique track id within the current event generation
85 AliToyMCEventGenerator& operator= (const AliToyMCEventGenerator& );
87 AliTPCCorrection *fTPCCorrection;
89 TString fCorrectionFile;
90 TString fOutputFileName;
94 Bool_t fUseStepCorrection;
95 Bool_t fUseMaterialBudget;
98 ClassDef(AliToyMCEventGenerator, 1)