]>
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); |
47 | Float_t GetSpaceChargeDensity(Float_t r, Float_t phi, Float_t z, Int_t mode); | |
15687d71 | 48 | TH2F* CreateHistoSCinXY(Float_t z, Int_t nx=100, Int_t ny=100, Int_t mode=0); |
49 | TH2F* CreateHistoSCinZR(Float_t phi, Int_t nz=100, Int_t nr=100, Int_t mode=0); | |
cc3e558a | 50 | |
51 | ||
52 | void WriteChargeDistributionToFile(const char* fname = "SC-Alice.root"); | |
53 | ||
54 | virtual void Print(const Option_t* option="") const; | |
92a85338 | 55 | // MI - Add the "real" 3D histogram as an optional input (26.06.2013) |
56 | // | |
57 | void SetInputSpaceCharge(TH3 * hisSpaceCharge3D, TH2 * hisRPhi, TH2* hisRZ, Double_t norm); | |
58 | const TH3 * GetInputSpaceCharge3D(){return fSpaceChargeHistogram3D;} // MI add | |
59 | const TH2 * GetInputSpaceChargeRPhi(){return fSpaceChargeHistogramRPhi;} // MI add | |
60 | const TH2 * GetInputSpaceChargeRZ(){return fSpaceChargeHistogramRZ;} // MI add | |
cc3e558a | 61 | |
cc3e558a | 62 | virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]); |
63 | ||
64 | private: | |
65 | ||
9f3b99e2 | 66 | // maximum sizes of lookup tables |
67 | enum {kNRows= 90 }; // the maximum on row-slices so far ~ 2cm slicing | |
68 | enum {kNPhiSlices= 144 }; // the maximum of phi-slices so far = (8 per sector) | |
69 | enum {kNColumns= 130 }; // the maximum on column-slices so ~ 2cm slicing | |
70 | ||
cc3e558a | 71 | AliTPCSpaceCharge3D(const AliTPCSpaceCharge3D &); // not implemented |
72 | AliTPCSpaceCharge3D &operator=(const AliTPCSpaceCharge3D &); // not implemented | |
73 | ||
74 | Float_t fC0; // coefficient C0 (compare Jim Thomas's notes for definitions) | |
75 | Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions) | |
76 | Float_t fCorrectionFactor; // Space Charge Correction factor in comparison to initialized | |
77 | // look up table which was created for M_mb = 900 and IR = 3000 | |
78 | // compare Internal Note Nr: ??? | |
79 | ||
2bf29b72 | 80 | Bool_t fInitLookUp; // flag to check if the Look Up table was created |
cc3e558a | 81 | |
2bf29b72 | 82 | TMatrixF *fLookUpErOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez) |
83 | TMatrixF *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
84 | TMatrixF *fLookUpDeltaEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
cc3e558a | 85 | |
15687d71 | 86 | TString fSCDataFileName; // file which contains the space charge distribution |
87 | TString fSCLookUpPOCsFileName3D; // filename of the precalculated lookup tables (for individual voxels) | |
88 | TString fSCLookUpPOCsFileNameRZ; // filename of the precalculated lookup tables (for individual voxels) | |
89 | TString fSCLookUpPOCsFileNameRPhi; // filename of the precalculated lookup tables (for individual voxels) | |
cc3e558a | 90 | |
15687d71 | 91 | |
2bf29b72 | 92 | TMatrixF *fSCdensityDistribution[kNPhi]; // 3D space charge distribution |
15687d71 | 93 | TMatrixD *fSCdensityInRZ; // (r,z) space charge distribution |
94 | TMatrixD *fSCdensityInRPhiA; // (r,phi) space charge distribution | |
95 | TMatrixD *fSCdensityInRPhiC; // (r,phi) space charge distribution | |
92a85338 | 96 | TH3 * fSpaceChargeHistogram3D; // Histogram with the input space charge histogram - used as an optional input |
97 | TH2 * fSpaceChargeHistogramRPhi; // Histogram with the input space charge histogram - used as an optional input | |
98 | TH2 * fSpaceChargeHistogramRZ; // Histogram with the input space charge histogram - used as an optional input | |
2bf29b72 | 99 | ClassDef(AliTPCSpaceCharge3D,2); |
cc3e558a | 100 | }; |
101 | ||
102 | #endif |