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 **************************************************************************/
16 ////////////////////////////////////////////////////////////////////////////
18 // AliTPCExBConical class //
19 // The class calculates the space point distortions due to the conical shape
22 // Becasue of mechanical deformation ALICE TPC, chambers are misaligned in z direction
23 // TPC has roughly conical shape
25 // For the moment ONLY efective correction used - NOT EDGE EFFECT calcualted //
28 // The class allows "effective Omega Tau" corrections. //
31 // date: 02/05/2010 //
32 // Authors: Marian Ivanov, Jim Thomas, Magnus Mager, Stefan Rossegger //
35 // AliTPCExBConical conical; //
36 // conical.SetOmegaTauT1T2(0.32,1.,1.); // values ideally from OCDB //
37 // conical.SetXConical(0.001); // set conical in X direction (in rad) //
38 // // plot dRPhi distortions ... //
39 // conical.CreateHistoDRPhiinZR(1.,100,100)->Draw("surf2"); //
40 ////////////////////////////////////////////////////////////////////////////
43 #include "AliTPCROC.h"
44 #include "AliTPCExBConical.h"
45 ClassImp(AliTPCExBConical)
47 AliTPCExBConical::AliTPCExBConical()
48 : AliTPCCorrection("exb_conical","ExB conical"),
49 fC1(0.),fC2(0.),fConicalFactor(0)
52 // default constructor
54 for (Int_t i=0; i<3; i++){
60 AliTPCExBConical::~AliTPCExBConical() {
66 void AliTPCExBConical::Init() {
68 // Initialization funtion (not used at the moment)
71 // Set default parameters
72 // FIXME: Ask the database for these entries
74 Double_t vdrift = 2.6; // [cm/us] // From dataBase: to be updated: per second (ideally)
75 Double_t bzField = -0.5; // [Tesla] // From dataBase: to be updated: per run
77 Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully)
78 Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
80 // Correction Terms for effective omegaTau; obtained by a laser calibration run
81 Double_t t1 = 0.9; // ideally from database
82 Double_t t2 = 1.5; // ideally from database
84 SetOmegaTauT1T2(wt,t1,t2);
88 void AliTPCExBConical::Update(const TTimeStamp &/*timeStamp*/) {
93 Double_t vdrift = 2.6; // [cm/us] // From dataBase: to be updated: per second (ideally)
94 Double_t bzField = -0.5; // [Tesla] // From dataBase: to be updated: per run
96 Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully)
97 Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
99 // Correction Terms for effective omegaTau; obtained by a laser calibration run
100 Double_t t1 = 0.9; // ideally from database
101 Double_t t2 = 1.5; // ideally from database
103 SetOmegaTauT1T2(wt,t1,t2);
108 void AliTPCExBConical::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) {
110 // Calculates the correction due conical shape
112 AliTPCROC * calROC = AliTPCROC::Instance();
113 const Double_t kRTPC0 =calROC->GetPadRowRadii(0,0);
114 const Double_t kRTPC1 =calROC->GetPadRowRadii(36,calROC->GetNRows(36)-1);
115 Float_t rmiddle=(kRTPC0+kRTPC1)/2.;
117 Double_t phi =TMath::ATan2(x[1],x[0]);
118 Double_t r =TMath::Sqrt(x[1]*x[1]+x[0]*x[0]);
120 if (roc%36<18) dTheta = fConicalA[0]+TMath::Cos(phi)*fConicalA[1]+TMath::Sin(phi)*fConicalA[2];
122 dTheta = fConicalC[0]+TMath::Cos(phi)*fConicalC[1]+TMath::Sin(phi)*fConicalC[2];
124 Double_t corr=dTheta*fConicalFactor;
125 if (roc%36>=18) corr*=-1.;
126 Double_t drphi=fC1*corr;
127 Double_t dr =fC2*corr;
128 dx[0]= TMath::Cos(phi)*dr-TMath::Sin(phi)*drphi;
129 dx[1]= TMath::Sin(phi)*dr+TMath::Cos(phi)*drphi;
130 dx[2]= 0.001*dTheta*(r-rmiddle); // dtheta in mrad
134 void AliTPCExBConical::Print(Option_t* option) const {
136 // Print function to check the settings (e.g. the conical in the X direction)
137 // option=="a" prints the C0 and C1 coefficents for calibration purposes
140 TString opt = option; opt.ToLower();
141 printf("%s\n",GetTitle());
143 printf("Conical settings: Empirical: %1.5f mm/mrad\n",fConicalFactor);
144 printf("Conical settings: A-Conical: %1.5f mrad:%1.5f mrad:%1.5f mrad \n",fConicalA[0],fConicalA[1],fConicalA[2]);
145 printf("Conical settings: C-Conical: %1.5f mrad:%1.5f mrad:%1.5f mrad \n",fConicalC[0],fConicalC[1],fConicalC[2]);
150 void AliTPCExBConical::SetConicalA(Float_t conicalA[3]){
152 // set paramters of conical shape - A side - obtained from alignment
154 fConicalA[0]= conicalA[0]; // constant
155 fConicalA[1]= conicalA[1]; // cos
156 fConicalA[2]= conicalA[2]; // sin
158 void AliTPCExBConical::SetConicalC(Float_t conicalC[3]){
160 // set paramters of conical shape -C side obtained form the alignemnt
162 fConicalC[0]= conicalC[0]; // constant
163 fConicalC[1]= conicalC[1]; // cos
164 fConicalC[2]= conicalC[2]; // sin