]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCCalibGlobalMisalignment.h
remove print
[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 SetAlignGlobalDelta(const TGeoMatrix * matrixGlobalDelta);
57   void SetAlignSectors(const TObjArray *arraySector);
58   TGeoMatrix* GetAlignGlobal() const  {return fMatrixGlobal;}
59   TGeoMatrix* GetAlignGlobalDelta() const  {return fMatrixGlobalDelta;}
60   TObjArray * GetAlignSectors() const {return fArraySector;}
61   //
62   static AliTPCCalibGlobalMisalignment*  CreateOCDBAlign();
63   static AliTPCCalibGlobalMisalignment*  CreateMeanAlign(const AliTPCCalibGlobalMisalignment *alignIn);
64   static void DumpAlignment( AliTPCCalibGlobalMisalignment* align, TTreeSRedirector *pcstream, const char *name);
65   //
66 protected:
67   virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
68
69 private:
70   Float_t fXShift;               // Shift in global X [cm]
71   Float_t fYShift;               // Shift in global Y [cm]
72   Float_t fZShift;               // Shift in global Z [cm]
73
74   Float_t fRotPhiA;      // simple rotation of A side read-out plane around the Z axis [rad]
75   Float_t fRotPhiC;      // simple rotation of C side read-out plane around the Z axis [rad]
76   Float_t fdRPhiOffsetA;  // add a constant offset of dRPhi (or local Y) in [cm]: purely for calibration purposes!
77   Float_t fdRPhiOffsetC;  // add a constant offset of dRPhi (or local Y) in [cm]: purely for calibration purposes!
78   //
79   // Quadrant alignment
80   //
81   TVectorD *fQuadrantQ0;   //OROC medium pads -delta ly+ - ly - shift (cm)
82   TVectorD *fQuadrantRQ0;  //OROC medium pads -delta ly+ - ly - rotation (rad) 
83   TVectorD *fQuadrantQ1;   //OROC long   pads -delta ly+ - ly - shift
84   TVectorD *fQuadrantQ2;   //OROC long   pads -shift
85   TVectorD *fQuadrantRQ1;  //OROC long   pads -delta ly+ - ly - rotation
86   TVectorD *fQuadrantRQ2;  //OROC long   pads -rotation
87   // 
88   //
89   // Global alignment - use native ROOT representation
90   //
91   TGeoMatrix * fMatrixGlobal; // global Alignment common
92   TGeoMatrix * fMatrixGlobalDelta; // global Alignment common A side-C side
93   TObjArray   * fArraySector; //  local Alignmnet Sector
94   //
95   AliTPCCalibGlobalMisalignment& operator=(const AliTPCCalibGlobalMisalignment&);
96   AliTPCCalibGlobalMisalignment(const AliTPCCalibGlobalMisalignment&);
97   ClassDef(AliTPCCalibGlobalMisalignment,3);
98 };
99
100 #endif