setting the period number also for ESDHeader
[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;
be260e87 51 void SetQuadranAlign(const TVectorD *dq1, const TVectorD *dq2, const TVectorD *q2);
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 //
79 TVectorD *fQuadrantDQ1; //OROC medium pads delta ly+ - ly-
80 TVectorD *fQuadrantDQ2; //OROC long pads delta ly+ - ly-
81 TVectorD *fQuadrantQ2; //OROC long pads - OROC medium pads
82 //
83 // Global alignment - use native ROOT representation
84 //
85 TGeoMatrix * fMatrixGlobal; // global Alignment common
4e093f35 86 TObjArray * fArraySector; // local Alignmnet Sector
be260e87 87 //
be260e87 88 AliTPCCalibGlobalMisalignment& operator=(const AliTPCCalibGlobalMisalignment&);
89 AliTPCCalibGlobalMisalignment(const AliTPCCalibGlobalMisalignment&);
90 ClassDef(AliTPCCalibGlobalMisalignment,2);
b1f0a2a5 91};
92
93#endif