]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCSpaceCharge3D.h
svn ci AliTPCtrackerMI.cxx AliTPCRecoParam.cxx AliTPCRecoParam.h
[u/mrichter/AliRoot.git] / TPC / AliTPCSpaceCharge3D.h
index 9de2b108865b5d069a7edc893469e23a8f2f89e3..6abd2fb45970aa31c144486b00e3002406ed266a 100644 (file)
@@ -5,9 +5,7 @@
  * See cxx source for full Copyright notice                               */
 
 ////////////////////////////////////////////////////////////////////////////
-//                                                                        //
-// AliTPCSpaceCharge3D class                                           //
-// date: 19/06/2010                                                       //
+// AliTPCSpaceCharge3D class                                              //
 // Authors: Stefan Rossegger                                              //
 ////////////////////////////////////////////////////////////////////////////
 
@@ -37,14 +35,16 @@ public:
   void SetCorrectionFactor(Float_t correctionFactor) {fCorrectionFactor=correctionFactor;}
   Float_t GetCorrectionFactor() const {return fCorrectionFactor;}
 
-  void  SetSCDataFileName(char *const fname);
-  char* GetSCDataFileName() const { return fSCDataFileName; }
+  void  SetSCDataFileName(TString fname);
+  const char* GetSCDataFileName() { return fSCDataFileName.Data(); }
 
-  void InitSpaceCharge3DDistortion();
+  void InitSpaceCharge3DDistortion();       // faster model and more accurate ;-)
+  void InitSpaceCharge3DDistortionCourse(); // real 3D but not accurate enough
+  void ForceInitSpaceCharge3DDistortion() { fInitLookUp=kFALSE; InitSpaceCharge3DDistortion(); }
 
-  Float_t GetSpaceChargeDensity(Float_t r, Float_t phi, Float_t z);
-  TH2F* CreateHistoSCinXY(Float_t z, Int_t nx=100, Int_t ny=100);
-  TH2F* CreateHistoSCinZR(Float_t phi, Int_t nz=100, Int_t nr=100);
+  Float_t GetSpaceChargeDensity(Float_t r, Float_t phi, Float_t z, Int_t mode=0);
+  TH2F* CreateHistoSCinXY(Float_t z, Int_t nx=100, Int_t ny=100, Int_t mode=0);
+  TH2F* CreateHistoSCinZR(Float_t phi, Int_t nz=100, Int_t nr=100, Int_t mode=0);
 
 
   void WriteChargeDistributionToFile(const char* fname = "SC-Alice.root");
@@ -56,6 +56,11 @@ protected:
 
 private:
 
+  // maximum sizes of lookup tables
+  enum {kNRows= 90 };       // the maximum on row-slices so far ~ 2cm slicing    
+  enum {kNPhiSlices= 144 }; // the maximum of phi-slices so far = (8 per sector) 
+  enum {kNColumns= 130 };   // the maximum on column-slices so  ~ 2cm slicing    
+
   AliTPCSpaceCharge3D(const AliTPCSpaceCharge3D &);               // not implemented
   AliTPCSpaceCharge3D &operator=(const AliTPCSpaceCharge3D &);    // not implemented
 
@@ -65,18 +70,24 @@ private:
                                    // look up table which was created for M_mb = 900 and IR = 3000
                                    // compare Internal Note Nr: ???
 
-  Bool_t fInitLookUp;                 // flag to check it the Look Up table was created
+  Bool_t fInitLookUp;                 // flag to check if the Look Up table was created
+
+  TMatrixF *fLookUpErOverEz[kNPhi];   // Array to store electric field integral (int Er/Ez)
+  TMatrixF *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
+  TMatrixF *fLookUpDeltaEz[kNPhi];    // Array to store electric field integral (int Er/Ez)
 
-  TMatrixD *fLookUpErOverEz[kNPhi];   // Array to store electric field integral (int Er/Ez)
-  TMatrixD *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
-  TMatrixD *fLookUpDeltaEz[kNPhi];    // Array to store electric field integral (int Er/Ez)
+  TString fSCDataFileName;          // file which contains the space charge distribution
+  TString fSCLookUpPOCsFileName3D;  // filename of the precalculated lookup tables (for individual voxels)
+  TString fSCLookUpPOCsFileNameRZ;  // filename of the precalculated lookup tables (for individual voxels)
+  TString fSCLookUpPOCsFileNameRPhi;  // filename of the precalculated lookup tables (for individual voxels)
 
-  char *fSCDataFileName;         // file which contains the space charge distribution
-  char *fSCLookUpPOCsFileName;   // filename of the precalculated lookup tables (for individual voxels)
 
-  TMatrixD *fSCdensityDistribution[kNPhi]; // space charge distribution
+  TMatrixF *fSCdensityDistribution[kNPhi]; // 3D space charge distribution
+  TMatrixD *fSCdensityInRZ;       // (r,z) space charge distribution
+  TMatrixD *fSCdensityInRPhiA;     // (r,phi) space charge distribution
+  TMatrixD *fSCdensityInRPhiC;     // (r,phi) space charge distribution
  
-  ClassDef(AliTPCSpaceCharge3D,1); 
+  ClassDef(AliTPCSpaceCharge3D,2); 
 };
 
 #endif