]>
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 | //////////////////////////////////////////////////////////////////////////// | |
8 | // // | |
9 | // AliTPCSpaceCharge3D class // | |
10 | // date: 19/06/2010 // | |
11 | // Authors: Stefan Rossegger // | |
12 | //////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include "AliTPCCorrection.h" | |
15 | class TH3F; | |
16 | ||
17 | class AliTPCSpaceCharge3D : public AliTPCCorrection { | |
18 | public: | |
19 | AliTPCSpaceCharge3D(); | |
20 | virtual ~AliTPCSpaceCharge3D(); | |
21 | ||
22 | // initialization and update functions | |
23 | virtual void Init(); | |
24 | virtual void Update(const TTimeStamp &timeStamp); | |
25 | ||
26 | // common setters and getters for tangled ExB effect | |
27 | virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) { | |
28 | fT1=t1; fT2=t2; | |
29 | const Double_t wt0=t2*omegaTau; fC0=1./(1.+wt0*wt0); | |
30 | const Double_t wt1=t1*omegaTau; fC1=wt1/(1.+wt1*wt1); | |
31 | }; | |
32 | void SetC0C1(Float_t c0,Float_t c1) {fC0=c0;fC1=c1;} // CAUTION: USE WITH CARE | |
33 | Float_t GetC0() const {return fC0;} | |
34 | Float_t GetC1() const {return fC1;} | |
35 | ||
36 | // setters and getters | |
37 | void SetCorrectionFactor(Float_t correctionFactor) {fCorrectionFactor=correctionFactor;} | |
38 | Float_t GetCorrectionFactor() const {return fCorrectionFactor;} | |
39 | ||
15687d71 | 40 | void SetSCDataFileName(TString fname); |
41 | const char* GetSCDataFileName() { return fSCDataFileName.Data(); } | |
cc3e558a | 42 | |
15687d71 | 43 | void InitSpaceCharge3DDistortion(); // faster model and more accurate ;-) |
44 | void InitSpaceCharge3DDistortionCourse(); // real 3D but not accurate enough | |
cc3e558a | 45 | |
15687d71 | 46 | Float_t GetSpaceChargeDensity(Float_t r, Float_t phi, Float_t z, Int_t mode=0); |
47 | TH2F* CreateHistoSCinXY(Float_t z, Int_t nx=100, Int_t ny=100, Int_t mode=0); | |
48 | TH2F* CreateHistoSCinZR(Float_t phi, Int_t nz=100, Int_t nr=100, Int_t mode=0); | |
cc3e558a | 49 | |
50 | ||
51 | void WriteChargeDistributionToFile(const char* fname = "SC-Alice.root"); | |
52 | ||
53 | virtual void Print(const Option_t* option="") const; | |
54 | ||
55 | protected: | |
56 | virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]); | |
57 | ||
58 | private: | |
59 | ||
60 | AliTPCSpaceCharge3D(const AliTPCSpaceCharge3D &); // not implemented | |
61 | AliTPCSpaceCharge3D &operator=(const AliTPCSpaceCharge3D &); // not implemented | |
62 | ||
63 | Float_t fC0; // coefficient C0 (compare Jim Thomas's notes for definitions) | |
64 | Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions) | |
65 | Float_t fCorrectionFactor; // Space Charge Correction factor in comparison to initialized | |
66 | // look up table which was created for M_mb = 900 and IR = 3000 | |
67 | // compare Internal Note Nr: ??? | |
68 | ||
69 | Bool_t fInitLookUp; // flag to check it the Look Up table was created | |
70 | ||
71 | TMatrixD *fLookUpErOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
72 | TMatrixD *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
73 | TMatrixD *fLookUpDeltaEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
74 | ||
15687d71 | 75 | TString fSCDataFileName; // file which contains the space charge distribution |
76 | TString fSCLookUpPOCsFileName3D; // filename of the precalculated lookup tables (for individual voxels) | |
77 | TString fSCLookUpPOCsFileNameRZ; // filename of the precalculated lookup tables (for individual voxels) | |
78 | TString fSCLookUpPOCsFileNameRPhi; // filename of the precalculated lookup tables (for individual voxels) | |
cc3e558a | 79 | |
15687d71 | 80 | |
81 | TMatrixD *fSCdensityDistribution[kNPhi]; // 3D space charge distribution | |
82 | TMatrixD *fSCdensityInRZ; // (r,z) space charge distribution | |
83 | TMatrixD *fSCdensityInRPhiA; // (r,phi) space charge distribution | |
84 | TMatrixD *fSCdensityInRPhiC; // (r,phi) space charge distribution | |
cc3e558a | 85 | |
86 | ClassDef(AliTPCSpaceCharge3D,1); | |
87 | }; | |
88 | ||
89 | #endif |