]>
Commit | Line | Data |
---|---|---|
cc3e558a | 1 | #ifndef ALITPCSPACECHARGE3D_H |
2 | #define ALITPCSPACECHARGE3D_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //////////////////////////////////////////////////////////////////////////// | |
b4caed64 | 8 | // AliTPCSpaceCharge3D class // |
cc3e558a | 9 | // Authors: Stefan Rossegger // |
10 | //////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #include "AliTPCCorrection.h" | |
13 | class TH3F; | |
92a85338 | 14 | class TH3; |
cc3e558a | 15 | |
16 | class AliTPCSpaceCharge3D : public AliTPCCorrection { | |
17 | public: | |
18 | AliTPCSpaceCharge3D(); | |
19 | virtual ~AliTPCSpaceCharge3D(); | |
20 | ||
21 | // initialization and update functions | |
22 | virtual void Init(); | |
23 | virtual void Update(const TTimeStamp &timeStamp); | |
24 | ||
25 | // common setters and getters for tangled ExB effect | |
26 | virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) { | |
27 | fT1=t1; fT2=t2; | |
28 | const Double_t wt0=t2*omegaTau; fC0=1./(1.+wt0*wt0); | |
29 | const Double_t wt1=t1*omegaTau; fC1=wt1/(1.+wt1*wt1); | |
30 | }; | |
31 | void SetC0C1(Float_t c0,Float_t c1) {fC0=c0;fC1=c1;} // CAUTION: USE WITH CARE | |
32 | Float_t GetC0() const {return fC0;} | |
33 | Float_t GetC1() const {return fC1;} | |
34 | ||
35 | // setters and getters | |
36 | void SetCorrectionFactor(Float_t correctionFactor) {fCorrectionFactor=correctionFactor;} | |
37 | Float_t GetCorrectionFactor() const {return fCorrectionFactor;} | |
38 | ||
15687d71 | 39 | void SetSCDataFileName(TString fname); |
40 | const char* GetSCDataFileName() { return fSCDataFileName.Data(); } | |
cc3e558a | 41 | |
15687d71 | 42 | void InitSpaceCharge3DDistortion(); // faster model and more accurate ;-) |
43 | void InitSpaceCharge3DDistortionCourse(); // real 3D but not accurate enough | |
2bf29b72 | 44 | void ForceInitSpaceCharge3DDistortion() { fInitLookUp=kFALSE; InitSpaceCharge3DDistortion(); } |
cc3e558a | 45 | |
92a85338 | 46 | void InitSpaceCharge3DPoisson(Int_t kRows, Int_t kColumns, Int_t kPhiSlices, Int_t kIterations); |
47a84680 | 47 | void ForceInitSpaceCharge3DPoisson(Int_t kRows, Int_t kColumns, Int_t kPhiSlices, Int_t kIterations) { fInitLookUp=kFALSE; InitSpaceCharge3DPoisson(kRows,kColumns,kPhiSlices,kIterations); } |
92a85338 | 48 | Float_t GetSpaceChargeDensity(Float_t r, Float_t phi, Float_t z, Int_t mode); |
15687d71 | 49 | TH2F* CreateHistoSCinXY(Float_t z, Int_t nx=100, Int_t ny=100, Int_t mode=0); |
50 | TH2F* CreateHistoSCinZR(Float_t phi, Int_t nz=100, Int_t nr=100, Int_t mode=0); | |
cc3e558a | 51 | |
52 | ||
53 | void WriteChargeDistributionToFile(const char* fname = "SC-Alice.root"); | |
54 | ||
55 | virtual void Print(const Option_t* option="") const; | |
92a85338 | 56 | // MI - Add the "real" 3D histogram as an optional input (26.06.2013) |
57 | // | |
58 | void SetInputSpaceCharge(TH3 * hisSpaceCharge3D, TH2 * hisRPhi, TH2* hisRZ, Double_t norm); | |
db59c7fb | 59 | void SetInputSpaceCharge3D(TH3 * hisSpaceCharge3D){fSpaceChargeHistogram3D= hisSpaceCharge3D;} |
60 | ||
92a85338 | 61 | const TH3 * GetInputSpaceCharge3D(){return fSpaceChargeHistogram3D;} // MI add |
62 | const TH2 * GetInputSpaceChargeRPhi(){return fSpaceChargeHistogramRPhi;} // MI add | |
63 | const TH2 * GetInputSpaceChargeRZ(){return fSpaceChargeHistogramRZ;} // MI add | |
cc3e558a | 64 | |
cc3e558a | 65 | virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]); |
66 | ||
67 | private: | |
68 | ||
9f3b99e2 | 69 | // maximum sizes of lookup tables |
70 | enum {kNRows= 90 }; // the maximum on row-slices so far ~ 2cm slicing | |
71 | enum {kNPhiSlices= 144 }; // the maximum of phi-slices so far = (8 per sector) | |
72 | enum {kNColumns= 130 }; // the maximum on column-slices so ~ 2cm slicing | |
73 | ||
cc3e558a | 74 | AliTPCSpaceCharge3D(const AliTPCSpaceCharge3D &); // not implemented |
75 | AliTPCSpaceCharge3D &operator=(const AliTPCSpaceCharge3D &); // not implemented | |
76 | ||
77 | Float_t fC0; // coefficient C0 (compare Jim Thomas's notes for definitions) | |
78 | Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions) | |
79 | Float_t fCorrectionFactor; // Space Charge Correction factor in comparison to initialized | |
80 | // look up table which was created for M_mb = 900 and IR = 3000 | |
81 | // compare Internal Note Nr: ??? | |
82 | ||
2bf29b72 | 83 | Bool_t fInitLookUp; // flag to check if the Look Up table was created |
cc3e558a | 84 | |
2bf29b72 | 85 | TMatrixF *fLookUpErOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez) |
86 | TMatrixF *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
87 | TMatrixF *fLookUpDeltaEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
cc3e558a | 88 | |
15687d71 | 89 | TString fSCDataFileName; // file which contains the space charge distribution |
90 | TString fSCLookUpPOCsFileName3D; // filename of the precalculated lookup tables (for individual voxels) | |
91 | TString fSCLookUpPOCsFileNameRZ; // filename of the precalculated lookup tables (for individual voxels) | |
92 | TString fSCLookUpPOCsFileNameRPhi; // filename of the precalculated lookup tables (for individual voxels) | |
cc3e558a | 93 | |
15687d71 | 94 | |
2bf29b72 | 95 | TMatrixF *fSCdensityDistribution[kNPhi]; // 3D space charge distribution |
15687d71 | 96 | TMatrixD *fSCdensityInRZ; // (r,z) space charge distribution |
97 | TMatrixD *fSCdensityInRPhiA; // (r,phi) space charge distribution | |
98 | TMatrixD *fSCdensityInRPhiC; // (r,phi) space charge distribution | |
92a85338 | 99 | TH3 * fSpaceChargeHistogram3D; // Histogram with the input space charge histogram - used as an optional input |
100 | TH2 * fSpaceChargeHistogramRPhi; // Histogram with the input space charge histogram - used as an optional input | |
101 | TH2 * fSpaceChargeHistogramRZ; // Histogram with the input space charge histogram - used as an optional input | |
2bf29b72 | 102 | ClassDef(AliTPCSpaceCharge3D,2); |
cc3e558a | 103 | }; |
104 | ||
105 | #endif |