LCOV - code coverage report
Current view: top level - TPC/TPCbase - AliTPCSpaceCharge2D2D.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 12 8.3 %
Date: 2016-06-14 17:26:59 Functions: 1 13 7.7 %

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

Generated by: LCOV version 1.11