ROOT logo
#ifndef ALITPCBOUNDARYVOLTERROR_H
#define ALITPCBOUNDARYVOLTERROR_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

////////////////////////////////////////////////////////////////////////////
// AliTPCBoundaryVoltError class                                          //
// date: 01/06/2010                                                       //
// Authors: Jim Thomas, Stefan Rossegger                                  //
////////////////////////////////////////////////////////////////////////////

#include "AliTPCCorrection.h"


class AliTPCBoundaryVoltError : public AliTPCCorrection {
public:
  AliTPCBoundaryVoltError();
  virtual ~AliTPCBoundaryVoltError();
  virtual Bool_t AddCorrectionCompact(AliTPCCorrection* corr, Double_t weight);
  // initialization and update functions
  virtual void Init();
  virtual void Update(const TTimeStamp &timeStamp);


  // common setters and getters for tangled ExB effect
  virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
    fT1=t1; fT2=t2;
    const Double_t wt0=t2*omegaTau;     fC0=1./(1.+wt0*wt0);
    const Double_t wt1=t1*omegaTau;     fC1=wt1/(1.+wt1*wt1);
  };
  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;}

  // setters and getters for conical
  void SetBoundariesA(Float_t boundariesA[8]);
  void SetBoundariesC(Float_t boundariesC[6]); // CE settings from the A side
  Float_t GetBoundariesA(Int_t i) const {return fBoundariesA[i]; }
  Float_t GetBoundariesC(Int_t i) const {return fBoundariesC[i]; }

  void SetROCDisplacement(Bool_t flag) { 
    if (flag!=fROCdisplacement) { fROCdisplacement = flag; fInitLookUp=kFALSE; }
  }
  Bool_t GetROCDisplacement() const { return fROCdisplacement; }

  void InitBoundaryVoltErrorDistortion();

  virtual void Print(const Option_t* option="") const;

protected:
  virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);

private:
  Float_t fC0; // coefficient C0                 (compare Jim Thomas's notes for definitions)
  Float_t fC1; // coefficient C1                 (compare Jim Thomas's notes for definitions)
  Float_t  fBoundariesA[8];            // Boundary values on the A side (see Setter function)
  Float_t  fBoundariesC[8];            // Boundary values on the C side (see Setter function)

  Bool_t fROCdisplacement;      // flag for ROC displacement (important for z distortions)
  Bool_t fInitLookUp;           // flag to check it the Look Up table was created

  Double_t fLookUpErOverEz[kNZ][kNR];  // Array to store electric field integral (int Er/Ez)
  Double_t fLookUpDeltaEz[kNZ][kNR];   // Array to store electric field integral (int Delta Ez)

  // 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=257}; // grid size in r direction used in the poisson relaxation // ( 2**m + 1 ) eg. 65, 129, 257 etc.
  enum {kIterations=100}; // Number of iterations within the poisson relaxation 

  ClassDef(AliTPCBoundaryVoltError,1); 
};

#endif
 AliTPCBoundaryVoltError.h:1
 AliTPCBoundaryVoltError.h:2
 AliTPCBoundaryVoltError.h:3
 AliTPCBoundaryVoltError.h:4
 AliTPCBoundaryVoltError.h:5
 AliTPCBoundaryVoltError.h:6
 AliTPCBoundaryVoltError.h:7
 AliTPCBoundaryVoltError.h:8
 AliTPCBoundaryVoltError.h:9
 AliTPCBoundaryVoltError.h:10
 AliTPCBoundaryVoltError.h:11
 AliTPCBoundaryVoltError.h:12
 AliTPCBoundaryVoltError.h:13
 AliTPCBoundaryVoltError.h:14
 AliTPCBoundaryVoltError.h:15
 AliTPCBoundaryVoltError.h:16
 AliTPCBoundaryVoltError.h:17
 AliTPCBoundaryVoltError.h:18
 AliTPCBoundaryVoltError.h:19
 AliTPCBoundaryVoltError.h:20
 AliTPCBoundaryVoltError.h:21
 AliTPCBoundaryVoltError.h:22
 AliTPCBoundaryVoltError.h:23
 AliTPCBoundaryVoltError.h:24
 AliTPCBoundaryVoltError.h:25
 AliTPCBoundaryVoltError.h:26
 AliTPCBoundaryVoltError.h:27
 AliTPCBoundaryVoltError.h:28
 AliTPCBoundaryVoltError.h:29
 AliTPCBoundaryVoltError.h:30
 AliTPCBoundaryVoltError.h:31
 AliTPCBoundaryVoltError.h:32
 AliTPCBoundaryVoltError.h:33
 AliTPCBoundaryVoltError.h:34
 AliTPCBoundaryVoltError.h:35
 AliTPCBoundaryVoltError.h:36
 AliTPCBoundaryVoltError.h:37
 AliTPCBoundaryVoltError.h:38
 AliTPCBoundaryVoltError.h:39
 AliTPCBoundaryVoltError.h:40
 AliTPCBoundaryVoltError.h:41
 AliTPCBoundaryVoltError.h:42
 AliTPCBoundaryVoltError.h:43
 AliTPCBoundaryVoltError.h:44
 AliTPCBoundaryVoltError.h:45
 AliTPCBoundaryVoltError.h:46
 AliTPCBoundaryVoltError.h:47
 AliTPCBoundaryVoltError.h:48
 AliTPCBoundaryVoltError.h:49
 AliTPCBoundaryVoltError.h:50
 AliTPCBoundaryVoltError.h:51
 AliTPCBoundaryVoltError.h:52
 AliTPCBoundaryVoltError.h:53
 AliTPCBoundaryVoltError.h:54
 AliTPCBoundaryVoltError.h:55
 AliTPCBoundaryVoltError.h:56
 AliTPCBoundaryVoltError.h:57
 AliTPCBoundaryVoltError.h:58
 AliTPCBoundaryVoltError.h:59
 AliTPCBoundaryVoltError.h:60
 AliTPCBoundaryVoltError.h:61
 AliTPCBoundaryVoltError.h:62
 AliTPCBoundaryVoltError.h:63
 AliTPCBoundaryVoltError.h:64
 AliTPCBoundaryVoltError.h:65
 AliTPCBoundaryVoltError.h:66
 AliTPCBoundaryVoltError.h:67
 AliTPCBoundaryVoltError.h:68
 AliTPCBoundaryVoltError.h:69
 AliTPCBoundaryVoltError.h:70
 AliTPCBoundaryVoltError.h:71
 AliTPCBoundaryVoltError.h:72
 AliTPCBoundaryVoltError.h:73
 AliTPCBoundaryVoltError.h:74