more secure string operations
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibGlobalMisalignment.h
CommitLineData
b1f0a2a5 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"
be260e87 19#include "TVectorD.h"
20class TGeoMatrix;
4e093f35 21class TObjArray;
22class TTreeSRedirector;
be260e87 23
b1f0a2a5 24
25class AliTPCCalibGlobalMisalignment : public AliTPCCorrection {
26public:
27 AliTPCCalibGlobalMisalignment();
28 virtual ~AliTPCCalibGlobalMisalignment();
4e093f35 29
b1f0a2a5 30 // initialization and update functions
31 // virtual void Init();
32 // virtual void Update(const TTimeStamp &timeStamp);
4e093f35 33 void AddAlign(const AliTPCCalibGlobalMisalignment & add);
b1f0a2a5 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;}
be260e87 42
b1f0a2a5 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;}
b1f0a2a5 50 virtual void Print(Option_t* option="") const;
32b5322b 51 void SetQuadranAlign(const TVectorD *quadrantQ0, const TVectorD *quadrantRQ0, const TVectorD *quadrantQ1,const TVectorD *quadrantRQ1, const TVectorD *quadrantQ2, const TVectorD *quadrantRQ2);
4e093f35 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 //
b1f0a2a5 64protected:
65 virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
66
67private:
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!
be260e87 76 //
77 // Quadrant alignment
78 //
32b5322b 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 //
be260e87 86 //
87 // Global alignment - use native ROOT representation
88 //
89 TGeoMatrix * fMatrixGlobal; // global Alignment common
4e093f35 90 TObjArray * fArraySector; // local Alignmnet Sector
be260e87 91 //
be260e87 92 AliTPCCalibGlobalMisalignment& operator=(const AliTPCCalibGlobalMisalignment&);
93 AliTPCCalibGlobalMisalignment(const AliTPCCalibGlobalMisalignment&);
94 ClassDef(AliTPCCalibGlobalMisalignment,2);
b1f0a2a5 95};
96
97#endif