]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCCalibGlobalMisalignment.h
- Inclusion of AliTPCSpaceCharge3D in TPCbase library
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibGlobalMisalignment.h
1 #ifndef ALI_TPC_CALIB_GLOBAL_MISALIGNMENT_H
2 #define ALI_TPC_CALIB_GLOBAL_MISALIGNMENT_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 // AliTPCCalibGlobalMisalignment class                                        //
10 // The class calculates the space point distortions due to simple         // 
11 // misalignments like shifts in caresian coordinates or a rotation        //
12 // of the TPC read out planes (A and C side)                              //
13 //                                                                        //
14 // date: 06/05/2010                                                       //
15 // Authors: Stefan Rossegger, Jim Thomas, Magnus Mager                    //
16 ////////////////////////////////////////////////////////////////////////////
17
18 #include "AliTPCCorrection.h"
19 #include "TVectorD.h"
20 class TGeoMatrix;
21 class TObjArray;
22 class TTreeSRedirector;
23
24
25 class AliTPCCalibGlobalMisalignment : public AliTPCCorrection {
26 public:
27   AliTPCCalibGlobalMisalignment();
28   virtual ~AliTPCCalibGlobalMisalignment();
29   
30   // initialization and update functions
31   //  virtual void Init();
32   //  virtual void Update(const TTimeStamp &timeStamp);
33   void AddAlign(const  AliTPCCalibGlobalMisalignment & add);
34   // setters and getters for misalignments
35   void SetXShift(Float_t xShift) {fXShift=xShift;}
36   void SetYShift(Float_t yShift) {fYShift=yShift;}
37   void SetZShift(Float_t zShift) {fZShift=zShift;}
38   void SetRotPhiA(Float_t rotPhiA) {fRotPhiA=rotPhiA;}
39   void SetRotPhiC(Float_t rotPhiC) {fRotPhiC=rotPhiC;}
40   void SetdRPhiOffsetA(Float_t dRPhiOffsetA) {fdRPhiOffsetA=dRPhiOffsetA;}
41   void SetdRPhiOffsetC(Float_t dRPhiOffsetC) {fdRPhiOffsetC=dRPhiOffsetC;}
42   
43   Float_t GetXShift() const {return fXShift;}
44   Float_t GetYShift() const {return fYShift;}
45   Float_t GetZShift() const {return fZShift;}
46   Float_t GetRotPhiA() const {return fRotPhiA;}
47   Float_t GetRotPhiC() const {return fRotPhiC;}
48   Float_t GetdRPhiOffsetA() const {return fdRPhiOffsetA;}
49   Float_t GetdRPhiOffsetC() const {return fdRPhiOffsetC;}
50   virtual void Print(Option_t* option="") const;
51   void SetQuadranAlign(const TVectorD *quadrantQ0, const TVectorD *quadrantRQ0, const TVectorD *quadrantQ1,const TVectorD *quadrantRQ1,  const TVectorD *quadrantQ2,  const TVectorD *quadrantRQ2);
52   // 
53   // Alignment manipulation using TGeoMatrix
54   
55   void SetAlignGlobal(const TGeoMatrix * matrixGlobal);
56   void SetAlignSectors(const TObjArray *arraySector);
57   TGeoMatrix* GetAlignGlobal() const  {return fMatrixGlobal;}
58   TObjArray * GetAlignSectors() const {return fArraySector;}
59   //
60   static AliTPCCalibGlobalMisalignment*  CreateOCDBAlign();
61   static AliTPCCalibGlobalMisalignment*  CreateMeanAlign(const AliTPCCalibGlobalMisalignment *alignIn);
62   static void DumpAlignment( AliTPCCalibGlobalMisalignment* align, TTreeSRedirector *pcstream, const char *name);
63   //
64 protected:
65   virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
66
67 private:
68   Float_t fXShift;               // Shift in global X [cm]
69   Float_t fYShift;               // Shift in global Y [cm]
70   Float_t fZShift;               // Shift in global Z [cm]
71
72   Float_t fRotPhiA;      // simple rotation of A side read-out plane around the Z axis [rad]
73   Float_t fRotPhiC;      // simple rotation of C side read-out plane around the Z axis [rad]
74   Float_t fdRPhiOffsetA;  // add a constant offset of dRPhi (or local Y) in [cm]: purely for calibration purposes!
75   Float_t fdRPhiOffsetC;  // add a constant offset of dRPhi (or local Y) in [cm]: purely for calibration purposes!
76   //
77   // Quadrant alignment
78   //
79   TVectorD *fQuadrantQ0;   //OROC medium pads -delta ly+ - ly - shift (cm)
80   TVectorD *fQuadrantRQ0;  //OROC medium pads -delta ly+ - ly - rotation (rad) 
81   TVectorD *fQuadrantQ1;   //OROC long   pads -delta ly+ - ly - shift
82   TVectorD *fQuadrantQ2;   //OROC long   pads -shift
83   TVectorD *fQuadrantRQ1;  //OROC long   pads -delta ly+ - ly - rotation
84   TVectorD *fQuadrantRQ2;  //OROC long   pads -rotation
85   // 
86   //
87   // Global alignment - use native ROOT representation
88   //
89   TGeoMatrix * fMatrixGlobal; // global Alignment common
90   TObjArray   * fArraySector; //  local Alignmnet Sector
91   //
92   AliTPCCalibGlobalMisalignment& operator=(const AliTPCCalibGlobalMisalignment&);
93   AliTPCCalibGlobalMisalignment(const AliTPCCalibGlobalMisalignment&);
94   ClassDef(AliTPCCalibGlobalMisalignment,2);
95 };
96
97 #endif