]>
Commit | Line | Data |
---|---|---|
ffab0c37 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | //////////////////////////////////////////////////////////////////////////// | |
17 | // // | |
18 | // AliTPCExBConical class // | |
19 | // The class calculates the space point distortions due to the conical shape | |
20 | // of ALICE TPC: | |
21 | // | |
22 | // Becasue of mechanical deformation ALICE TPC, chambers are misaligned in z direction | |
23 | // TPC has roughly conical shape | |
24 | // | |
25 | // For the moment ONLY efective correction used - NOT EDGE EFFECT calcualted // | |
26 | // // | |
27 | // // | |
28 | // The class allows "effective Omega Tau" corrections. // | |
29 | // | |
30 | // // | |
31 | // date: 02/05/2010 // | |
32 | // Authors: Marian Ivanov, Jim Thomas, Magnus Mager, Stefan Rossegger // | |
33 | // // | |
34 | // Example usage: // | |
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 | //////////////////////////////////////////////////////////////////////////// | |
41 | ||
42 | #include "TMath.h" | |
43 | #include "AliTPCROC.h" | |
44 | #include "AliTPCExBConical.h" | |
45 | ClassImp(AliTPCExBConical) | |
46 | ||
47 | AliTPCExBConical::AliTPCExBConical() | |
48 | : AliTPCCorrection("exb_conical","ExB conical"), | |
49 | fC1(0.),fC2(0.),fConicalFactor(0) | |
50 | { | |
51 | // | |
52 | // default constructor | |
53 | // | |
54 | for (Int_t i=0; i<3; i++){ | |
55 | fConicalA[i]= 0; | |
56 | fConicalC[i]= 0; | |
57 | } | |
58 | } | |
59 | ||
60 | AliTPCExBConical::~AliTPCExBConical() { | |
61 | // | |
62 | // default destructor | |
63 | // | |
64 | } | |
65 | ||
66 | void AliTPCExBConical::Init() { | |
67 | // | |
68 | // Initialization funtion (not used at the moment) | |
69 | // | |
70 | ||
71 | // Set default parameters | |
72 | // FIXME: Ask the database for these entries | |
73 | ||
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 | |
76 | ||
77 | Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully) | |
78 | Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ; | |
79 | ||
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 | |
83 | ||
84 | SetOmegaTauT1T2(wt,t1,t2); | |
85 | ||
86 | } | |
87 | ||
88 | void AliTPCExBConical::Update(const TTimeStamp &/*timeStamp*/) { | |
89 | // | |
90 | // Update function | |
91 | // | |
92 | ||
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 | |
95 | ||
96 | Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully) | |
97 | Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ; | |
98 | ||
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 | |
102 | ||
103 | SetOmegaTauT1T2(wt,t1,t2); | |
104 | } | |
105 | ||
106 | ||
107 | ||
108 | void AliTPCExBConical::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) { | |
109 | // | |
110 | // Calculates the correction due conical shape | |
111 | // | |
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.; | |
116 | // | |
117 | Double_t phi =TMath::ATan2(x[1],x[0]); | |
118 | Double_t r =TMath::Sqrt(x[1]*x[1]+x[0]*x[0]); | |
119 | Double_t dTheta=0; | |
120 | if (roc%36<18) dTheta = fConicalA[0]+TMath::Cos(phi)*fConicalA[1]+TMath::Sin(phi)*fConicalA[2]; | |
121 | if (roc%36>=18) { | |
122 | dTheta = fConicalC[0]+TMath::Cos(phi)*fConicalC[1]+TMath::Sin(phi)*fConicalC[2]; | |
123 | } | |
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; | |
be67055b | 130 | dx[2]= -0.001*dTheta*(r-rmiddle); // dtheta in mrad |
ffab0c37 | 131 | |
132 | } | |
133 | ||
134 | void AliTPCExBConical::Print(Option_t* option) const { | |
135 | // | |
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 | |
138 | // | |
139 | ||
140 | TString opt = option; opt.ToLower(); | |
141 | printf("%s\n",GetTitle()); | |
142 | ||
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]); | |
146 | ||
147 | } | |
148 | ||
149 | ||
150 | void AliTPCExBConical::SetConicalA(Float_t conicalA[3]){ | |
151 | // | |
152 | // set paramters of conical shape - A side - obtained from alignment | |
153 | // | |
154 | fConicalA[0]= conicalA[0]; // constant | |
155 | fConicalA[1]= conicalA[1]; // cos | |
156 | fConicalA[2]= conicalA[2]; // sin | |
157 | } | |
158 | void AliTPCExBConical::SetConicalC(Float_t conicalC[3]){ | |
159 | // | |
160 | // set paramters of conical shape -C side obtained form the alignemnt | |
161 | // | |
162 | fConicalC[0]= conicalC[0]; // constant | |
163 | fConicalC[1]= conicalC[1]; // cos | |
164 | fConicalC[2]= conicalC[2]; // sin | |
165 | } |