]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCCalibGlobalMisalignment.h
Possibility to use TGeoMatrix functionality
[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
22
23 class AliTPCCalibGlobalMisalignment : public AliTPCCorrection {
24 public:
25   AliTPCCalibGlobalMisalignment();
26   virtual ~AliTPCCalibGlobalMisalignment();
27
28   // initialization and update functions
29   //  virtual void Init();
30   //  virtual void Update(const TTimeStamp &timeStamp);
31
32   // setters and getters for misalignments
33   void SetXShift(Float_t xShift) {fXShift=xShift;}
34   void SetYShift(Float_t yShift) {fYShift=yShift;}
35   void SetZShift(Float_t zShift) {fZShift=zShift;}
36   void SetRotPhiA(Float_t rotPhiA) {fRotPhiA=rotPhiA;}
37   void SetRotPhiC(Float_t rotPhiC) {fRotPhiC=rotPhiC;}
38   void SetdRPhiOffsetA(Float_t dRPhiOffsetA) {fdRPhiOffsetA=dRPhiOffsetA;}
39   void SetdRPhiOffsetC(Float_t dRPhiOffsetC) {fdRPhiOffsetC=dRPhiOffsetC;}
40   void SetUseGeoManager(Bool_t useGeomanager) {fUseGeomanager = useGeomanager;}
41   
42   Float_t GetXShift() const {return fXShift;}
43   Float_t GetYShift() const {return fYShift;}
44   Float_t GetZShift() const {return fZShift;}
45   Float_t GetRotPhiA() const {return fRotPhiA;}
46   Float_t GetRotPhiC() const {return fRotPhiC;}
47   Float_t GetdRPhiOffsetA() const {return fdRPhiOffsetA;}
48   Float_t GetdRPhiOffsetC() const {return fdRPhiOffsetC;}
49   Bool_t  GetUseGeoManager() const { return fUseGeomanager;}
50   virtual void Print(Option_t* option="") const;
51   void SetQuadranAlign(const TVectorD *dq1, const TVectorD *dq2, const TVectorD *q2); 
52   void SetGlobalAlign(const TGeoMatrix * matrixGlobal, const TGeoMatrix *matrixA, const TGeoMatrix *matrixC );
53 protected:
54   virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
55
56 private:
57   Float_t fXShift;               // Shift in global X [cm]
58   Float_t fYShift;               // Shift in global Y [cm]
59   Float_t fZShift;               // Shift in global Z [cm]
60
61   Float_t fRotPhiA;      // simple rotation of A side read-out plane around the Z axis [rad]
62   Float_t fRotPhiC;      // simple rotation of C side read-out plane around the Z axis [rad]
63   Float_t fdRPhiOffsetA;  // add a constant offset of dRPhi (or local Y) in [cm]: purely for calibration purposes!
64   Float_t fdRPhiOffsetC;  // add a constant offset of dRPhi (or local Y) in [cm]: purely for calibration purposes!
65   //
66   // Quadrant alignment
67   //
68   TVectorD *fQuadrantDQ1;   //OROC medium pads delta ly+ - ly-
69   TVectorD *fQuadrantDQ2;   //OROC long   pads delta ly+ - ly-
70   TVectorD *fQuadrantQ2;   //OROC long   pads - OROC medium pads
71   //
72   // Global alignment - use native ROOT representation
73   //
74   TGeoMatrix * fMatrixGlobal; // global Alignment common
75   TGeoMatrix * fMatrixASide; // global Alignment A side
76   TGeoMatrix * fMatrixCSide; // global Alignment C side
77   //
78   Bool_t  fUseGeomanager;  // switch to use GeoManager - for visualization purposes
79   AliTPCCalibGlobalMisalignment& operator=(const AliTPCCalibGlobalMisalignment&);
80   AliTPCCalibGlobalMisalignment(const AliTPCCalibGlobalMisalignment&);
81   ClassDef(AliTPCCalibGlobalMisalignment,2);
82 };
83
84 #endif