1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 ////////////////////////////////////////////////////////////////////////////
19 // AliTPCCalibGlobalMisalignment class //
20 // The class calculates the space point distortions due to simple //
21 // misalignments like shifts in caresian coordinates or a rotation //
22 // of the TPC read out planes (A and C side) //
24 // date: 06/05/2010 //
25 // Authors: Stefan Rossegger, Jim Thomas, Magnus Mager //
26 ////////////////////////////////////////////////////////////////////////////
28 #include "AliTPCCalibGlobalMisalignment.h"
31 AliTPCCalibGlobalMisalignment::AliTPCCalibGlobalMisalignment()
32 : AliTPCCorrection("mialign","Misalignment"),
33 fXShift(0.),fYShift(0.),fZShift(0.),
34 fRotPhiA(0.),fRotPhiC(0.),
35 fdRPhiOffsetA(0.), fdRPhiOffsetC(0.)
38 // default constructor
42 AliTPCCalibGlobalMisalignment::~AliTPCCalibGlobalMisalignment() {
50 //void AliTPCCalibGlobalMisalignment::Init() {
52 // // Initialization funtion
55 // // nothing to be initialized, results of this calibration class will go to the global aligment structure
59 //void AliTPCCalibGlobalMisalignment::Update(const TTimeStamp &/*timeStamp*/) {
64 // // nothing to be updated, results of this calibration class will go to the global aligment structure
70 void AliTPCCalibGlobalMisalignment::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) {
72 // Calculates the simple correction due to a shift (in x,y,z) or an rotation of the TPC (around z)
76 r = TMath::Sqrt( x[0]*x[0] + x[1]*x[1] );
77 phi = TMath::ATan2(x[1],x[0]);
80 // rotation of the read-out planes
81 if (roc%36<18) // A side
86 // Simply adding a constant dRPHi residual. PURELY FOR CALIBRATION PURPOSES
87 if (roc%36<18) // A side
88 phi += fdRPhiOffsetA/r;
90 phi += fdRPhiOffsetC/r;
92 dx[0] = r * TMath::Cos(phi) - x[0];
93 dx[1] = r * TMath::Sin(phi) - x[1];
103 void AliTPCCalibGlobalMisalignment::Print(Option_t* /*option*/ ) const {
105 // Print function to check the settings
107 printf("%s",GetTitle());
108 printf(" - Trivial Misalignments for calibration purposes: \n");
109 printf(" - X-Shift: %1.3f cm, Y-Shift: %1.3f cm, Z-Shift: %1.3f cm \n",fXShift,fYShift,fZShift);
110 printf(" - Phi-Rotations: A side: %1.5f rad, C side: %1.5f rad\n",fRotPhiA,fRotPhiC);
111 printf(" - dRPhi offsets: A side: %1.5f cm, C side: %1.5f cm\n",fdRPhiOffsetA,fdRPhiOffsetC);