]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCROCVoltError3D.h
par file fix
[u/mrichter/AliRoot.git] / TPC / AliTPCROCVoltError3D.h
index 7c81cae873e1362384a7a6995c87ff7a9a5f3ab9..2b28fb584d662723d9614c7ddb4760f76895b02e 100644 (file)
@@ -5,9 +5,7 @@
  * See cxx source for full Copyright notice                               */
 
 ////////////////////////////////////////////////////////////////////////////
-//                                                                        //
-// AliTPCROCVoltError3D class                                              //
-// date: 01/06/2010                                                       //
+// AliTPCROCVoltError3D class                                             //
 // Authors: Jim Thomas, Stefan Rossegger                                  //
 ////////////////////////////////////////////////////////////////////////////
 
@@ -33,23 +31,34 @@ public:
   void SetC0C1(Float_t c0,Float_t c1) {fC0=c0;fC1=c1;} // CAUTION: USE WITH CARE
   Float_t GetC0() const {return fC0;}
   Float_t GetC1() const {return fC1;}
-
+  void SetROCData(TMatrixD * matrix);
   // setters and getters 
-  void SetROCDataFileName(char *const fname);
-  char* GetROCDataFileName() const {return fROCDataFileName;}
+  void SetROCDataFileName(const char * fname);
+  const Char_t* GetROCDataFileName() const {return fROCDataFileName.Data();}
 
   // flag to wheter or not include the z aligment in the dz calculation 
   // if FALSE, the dz offset is purely due to the electric field change
-  void SetROCDisplacement(Bool_t flag) { fROCdisplacement = flag; fInitLookUp=kFALSE;}
+  void SetROCDisplacement(Bool_t flag) { 
+    if (flag!=fROCdisplacement) { fROCdisplacement = flag; fInitLookUp=kFALSE; }
+  }
   Bool_t GetROCDisplacement() const { return fROCdisplacement; }
+  
+  // flag on wheter to consider the difference in the electron arrival between IROC and OROC
+  // due to the different position of the Anode wires
+  void SetElectronArrivalCorrection(Bool_t flag) { 
+    if (flag!=fElectronArrivalCorrection) { fElectronArrivalCorrection = flag; fInitLookUp=kFALSE; }
+  }
+  Bool_t GetElectronArrivalCorrection() const { return fElectronArrivalCorrection; }
 
 
   void InitROCVoltError3D(); // Fill the lookup tables
+  void ForceInitROCVoltError3D() { fInitLookUp=kFALSE; InitROCVoltError3D(); }; 
 
   Float_t GetROCVoltOffset(Int_t side, Float_t r0, Float_t phi0);
-  TH2F* CreateHistoOfZSurvey(Int_t side, Int_t nx=250, Int_t ny=250);
+  TH2F* CreateHistoOfZAlignment(Int_t side, Int_t nx=250, Int_t ny=250);
 
   virtual void Print(const Option_t* option="") const;
+  TMatrixD *GetMatrix() const {return fdzDataLinFit;}  // Linear fits of dz survey points (each sector=72) (z0,slopeX,slopeY)         
 
 protected:
   virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
@@ -64,23 +73,27 @@ private:
 
   Bool_t fROCdisplacement;      // flag on wheter to consider the ROC displacement 
                                 // when calculating the z distortions
+  Bool_t fElectronArrivalCorrection; // flag on wheter to consider the difference 
+                                      // in the electron arrival between IROC and OROC
+                                      // due to the different position of the Anode wires
+
   Bool_t fInitLookUp;           // flag to check it the Look Up table was created (SUM)
 
-  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)
+  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)
 
-  char *fROCDataFileName;         // filename of the survey data containing the lin Fit values
+  TString  fROCDataFileName;         // filename of the survey data containing the lin Fit values
   TMatrixD *fdzDataLinFit;  // Linear fits of dz survey points (each sector=72) (z0,slopeX,slopeY)         
 
   // basic numbers for the poisson relaxation //can be set individually in each class
   enum {kRows   =257}; // grid size in r direction used in the poisson relaxation // ( 2**n + 1 ) eg. 65, 129, 257 etc.
   enum {kColumns=129}; // grid size in z direction used in the poisson relaxation // ( 2**m + 1 ) eg. 65, 129, 257 etc.
-  enum {kPhiSlicesPerSector=6};  // phi slices per sector
+  enum {kPhiSlicesPerSector=10};  // phi slices per sector
   enum {kPhiSlices = 18*kPhiSlicesPerSector };    // number of points in phi for the basic lookup tables
   enum {kIterations=100}; // Number of iterations within the poisson relaxation 
 
-  ClassDef(AliTPCROCVoltError3D,0); 
+  ClassDef(AliTPCROCVoltError3D,2); 
 };
 
 #endif