]>
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 | ||
40 | void SetSCDataFileName(char *const fname); | |
41 | char* GetSCDataFileName() const { return fSCDataFileName; } | |
42 | ||
43 | void InitSpaceCharge3DDistortion(); | |
44 | ||
45 | Float_t GetSpaceChargeDensity(Float_t r, Float_t phi, Float_t z); | |
46 | TH2F* CreateHistoSCinXY(Float_t z, Int_t nx=100, Int_t ny=100); | |
47 | TH2F* CreateHistoSCinZR(Float_t phi, Int_t nz=100, Int_t nr=100); | |
48 | ||
49 | ||
50 | void WriteChargeDistributionToFile(const char* fname = "SC-Alice.root"); | |
51 | ||
52 | virtual void Print(const Option_t* option="") const; | |
53 | ||
54 | protected: | |
55 | virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]); | |
56 | ||
57 | private: | |
58 | ||
59 | AliTPCSpaceCharge3D(const AliTPCSpaceCharge3D &); // not implemented | |
60 | AliTPCSpaceCharge3D &operator=(const AliTPCSpaceCharge3D &); // not implemented | |
61 | ||
62 | Float_t fC0; // coefficient C0 (compare Jim Thomas's notes for definitions) | |
63 | Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions) | |
64 | Float_t fCorrectionFactor; // Space Charge Correction factor in comparison to initialized | |
65 | // look up table which was created for M_mb = 900 and IR = 3000 | |
66 | // compare Internal Note Nr: ??? | |
67 | ||
68 | Bool_t fInitLookUp; // flag to check it the Look Up table was created | |
69 | ||
70 | TMatrixD *fLookUpErOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
71 | TMatrixD *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
72 | TMatrixD *fLookUpDeltaEz[kNPhi]; // Array to store electric field integral (int Er/Ez) | |
73 | ||
74 | char *fSCDataFileName; // file which contains the space charge distribution | |
75 | char *fSCLookUpPOCsFileName; // filename of the precalculated lookup tables (for individual voxels) | |
76 | ||
77 | TMatrixD *fSCdensityDistribution[kNPhi]; // space charge distribution | |
78 | ||
79 | ClassDef(AliTPCSpaceCharge3D,1); | |
80 | }; | |
81 | ||
82 | #endif |