]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | $Log$ | |
19364939 | 18 | Revision 1.16 2002/10/14 14:57:42 hristov |
19 | Merging the VirtualMC branch to the main development branch (HEAD) | |
20 | ||
b9d0a01d | 21 | Revision 1.13.4.1 2002/06/10 15:26:11 hristov |
22 | Merged with v3-08-02 | |
23 | ||
24 | Revision 1.15 2002/05/07 17:24:02 kowal2 | |
25 | Updated wires positions | |
26 | ||
134da240 | 27 | Revision 1.14 2002/03/29 06:57:45 kowal2 |
28 | Restored backward compatibility to use the hits from Dec. 2000 production. | |
29 | ||
7a09f434 | 30 | Revision 1.13 2002/03/18 17:59:13 kowal2 |
31 | Chnges in the pad geometry - 3 pad lengths introduced. | |
32 | ||
f03e3423 | 33 | Revision 1.12 2002/02/05 09:12:26 hristov |
34 | Small mods for gcc 3.02 | |
35 | ||
bcc5d57d | 36 | Revision 1.11 2000/11/02 07:33:48 kowal2 |
37 | Automatic streamer generation. | |
38 | ||
0bbae0f2 | 39 | Revision 1.10 2000/07/10 20:57:39 hristov |
40 | Update of TPC code and macros by M.Kowalski | |
41 | ||
37831078 | 42 | Revision 1.9 2000/06/30 12:07:50 kowal2 |
43 | Updated from the TPC-PreRelease branch | |
44 | ||
73042f01 | 45 | Revision 1.8.4.4 2000/06/26 07:39:42 kowal2 |
46 | Changes to obey the coding rules | |
47 | ||
48 | Revision 1.8.4.3 2000/06/25 08:38:41 kowal2 | |
49 | Splitted from AliTPCtracking | |
50 | ||
51 | Revision 1.8.4.2 2000/06/14 16:48:24 kowal2 | |
52 | Parameter setting improved. Removed compiler warnings | |
53 | ||
54 | Revision 1.8.4.1 2000/06/09 07:12:21 kowal2 | |
55 | ||
56 | Updated defaults | |
57 | ||
58 | Revision 1.8 2000/04/17 09:37:33 kowal2 | |
59 | removed obsolete AliTPCDigitsDisplay.C | |
60 | ||
cc80f89e | 61 | Revision 1.7.8.2 2000/04/10 08:44:51 kowal2 |
62 | ||
63 | New transformations added | |
64 | Different pad and pad-rows geometries for different sectors | |
65 | ||
66 | Revision 1.7.8.1 2000/04/10 07:56:53 kowal2 | |
67 | Not used anymore - removed | |
68 | ||
69 | Revision 1.7 1999/10/08 13:10:35 fca | |
70 | Values in SetDefault are in radiants | |
71 | ||
4d89658a | 72 | Revision 1.6 1999/10/08 06:27:59 fca |
73 | Defaults updated | |
74 | ||
683f9fec | 75 | Revision 1.5 1999/10/05 17:18:27 fca |
76 | Correct GetWire check on even/odd fnWires | |
77 | ||
ae4cbe70 | 78 | Revision 1.4 1999/09/29 09:24:34 fca |
79 | Introduction of the Copyright and cvs Log | |
80 | ||
4c039060 | 81 | */ |
82 | ||
8c555625 | 83 | /////////////////////////////////////////////////////////////////////// |
84 | // Manager and of geomety classes for set: TPC // | |
85 | // // | |
1283eee5 | 86 | // !sectors are numbered from 0 // |
87 | // !pad rows are numbered from 0 // | |
88 | // | |
89 | // 12.6. changed z relative | |
8c555625 | 90 | // Origin: Marian Ivanov, Uni. of Bratislava, ivanov@fmph.uniba.sk // |
91 | // // | |
92 | /////////////////////////////////////////////////////////////////////// | |
93 | ||
73042f01 | 94 | // |
8c555625 | 95 | |
19364939 | 96 | #include <Riostream.h> |
8c555625 | 97 | #include <TMath.h> |
1283eee5 | 98 | #include <TObject.h> |
cc80f89e | 99 | #include <TRandom.h> |
1283eee5 | 100 | #include <AliTPCParam.h> |
8c555625 | 101 | |
102 | ||
cc80f89e | 103 | |
8c555625 | 104 | |
73042f01 | 105 | ClassImp(AliTPCParam) |
8c555625 | 106 | |
107 | ||
108 | //___________________________________________ | |
109 | AliTPCParam::AliTPCParam() | |
110 | { | |
cc80f89e | 111 | // |
112 | //constructor sets the default parameters | |
113 | // | |
114 | ||
115 | fResponseBin = 0; | |
116 | fResponseWeight = 0; | |
117 | fRotAngle = 0; | |
7a09f434 | 118 | SetTitle("75x40_100x60_150x60"); |
8c555625 | 119 | SetDefault(); |
120 | } | |
121 | ||
cc80f89e | 122 | AliTPCParam::~AliTPCParam() |
1283eee5 | 123 | { |
124 | // | |
cc80f89e | 125 | //destructor deletes some dynamicaly alocated variables |
126 | // | |
127 | ||
128 | if (fResponseBin!=0) delete [] fResponseBin; | |
129 | if (fResponseWeight!=0) delete [] fResponseWeight; | |
130 | if (fRotAngle !=0) delete [] fRotAngle; | |
131 | ||
1283eee5 | 132 | } |
133 | ||
134 | ||
cc80f89e | 135 | |
136 | ||
137 | Int_t AliTPCParam::Transform0to1(Float_t *xyz, Int_t * index) const | |
138 | { | |
139 | // | |
140 | // calculates sector number (index[1], undefined on input) | |
141 | // xyz intact | |
142 | // | |
143 | ||
144 | Float_t angle,x1; | |
145 | Int_t sector; | |
146 | Float_t r = TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]); | |
147 | if ((xyz[0]==0)&&(xyz[1]==0)) angle = 0.; | |
148 | else | |
8c555625 | 149 | { |
cc80f89e | 150 | angle =TMath::ASin(xyz[1]/r); |
151 | if (xyz[0]<0) angle=TMath::Pi()-angle; | |
152 | if ( (xyz[0]>0) && (xyz[1]<0) ) angle=2*TMath::Pi()+angle; | |
153 | } | |
3c0f9266 | 154 | |
cc80f89e | 155 | sector=Int_t((angle-fInnerAngleShift)/fInnerAngle); |
156 | ||
8c555625 | 157 | Float_t cos,sin; |
cc80f89e | 158 | AdjustCosSin(sector,cos,sin); |
159 | x1=xyz[0]*cos + xyz[1]*sin; | |
8c555625 | 160 | |
cc80f89e | 161 | if (x1>fOuterRadiusLow) |
162 | { | |
163 | sector=Int_t((angle-fOuterAngleShift)/fOuterAngle)+fNInnerSector; | |
164 | if (xyz[2]<0) sector+=(fNOuterSector>>1); | |
165 | } | |
8c555625 | 166 | else |
1283eee5 | 167 | if (xyz[2]<0) sector+=(fNInnerSector>>1); |
cc80f89e | 168 | index[1]=sector; // calculated sector number |
169 | index[0]=1; // indicates system after transformation | |
170 | return sector; | |
171 | } | |
1283eee5 | 172 | |
cc80f89e | 173 | Bool_t AliTPCParam::Transform(Float_t *xyz, Int_t *index, Int_t* oindex) |
174 | { | |
175 | //transformation from input coodination system to output coordination system | |
176 | switch (index[0]){ | |
177 | case 0: | |
178 | break; | |
179 | }; | |
180 | ||
181 | return kFALSE; | |
182 | ||
183 | } | |
184 | ||
185 | Int_t AliTPCParam::GetPadRow(Float_t *xyz, Int_t *index) const | |
186 | { | |
187 | // | |
188 | //calculates pad row of point xyz - transformation to system 8 (digit system) | |
189 | // | |
190 | Int_t system = index[0]; | |
191 | if (0==system) { | |
192 | Transform0to1(xyz,index); | |
193 | system=1; | |
194 | } | |
195 | if (1==system) { | |
196 | Transform1to2(xyz,index); | |
197 | system=2; | |
198 | } | |
199 | ||
200 | if (fGeometryType==0){ //straight row | |
201 | if (2==system) { | |
202 | Transform2to3(xyz,index); | |
203 | system=3; | |
204 | } | |
205 | if (3==system) { | |
206 | Transform3to4(xyz,index); | |
207 | system=4; | |
8c555625 | 208 | } |
cc80f89e | 209 | if (4==system) { |
210 | Transform4to8(xyz,index); | |
211 | system=8; | |
8c555625 | 212 | } |
cc80f89e | 213 | if (8==system) { |
214 | index[0]=8; | |
215 | return index[2]; | |
216 | } | |
8c555625 | 217 | } |
cc80f89e | 218 | |
219 | if (fGeometryType==1){ //cylindrical geometry | |
220 | if (2==system) { | |
221 | Transform2to5(xyz,index); | |
222 | system=5; | |
223 | } | |
224 | if (5==system) { | |
225 | Transform2to3(xyz,index); | |
226 | system=6; | |
227 | } | |
228 | if (6==system) { | |
229 | Transform3to4(xyz,index); | |
230 | system=7; | |
231 | } | |
232 | if (8==system) { | |
233 | index[0]=8; | |
234 | return index[2]; | |
235 | } | |
236 | } | |
237 | index[0]=system; | |
238 | return -1; //if no reasonable system | |
8c555625 | 239 | } |
240 | ||
cc80f89e | 241 | void AliTPCParam::SetSectorAngles(Float_t innerangle, Float_t innershift, Float_t outerangle, |
242 | Float_t outershift) | |
8c555625 | 243 | { |
cc80f89e | 244 | // |
245 | // set opening angles | |
73042f01 | 246 | const static Float_t kDegtoRad = 0.01745329251994; |
cc80f89e | 247 | fInnerAngle = innerangle; //opening angle of Inner sector |
248 | fInnerAngleShift = innershift; //shift of first inner sector center to the 0 | |
249 | fOuterAngle = outerangle; //opening angle of outer sector | |
250 | fOuterAngleShift = outershift; //shift of first sector center to the 0 | |
251 | fInnerAngle *=kDegtoRad; | |
252 | fInnerAngleShift *=kDegtoRad; | |
253 | fOuterAngle *=kDegtoRad; | |
254 | fOuterAngleShift *=kDegtoRad; | |
8c555625 | 255 | } |
cc80f89e | 256 | |
257 | Float_t AliTPCParam::GetInnerAngle() const | |
8c555625 | 258 | { |
cc80f89e | 259 | //return angle |
260 | return fInnerAngle; | |
261 | ||
8c555625 | 262 | } |
263 | ||
cc80f89e | 264 | Float_t AliTPCParam::GetInnerAngleShift() const |
265 | { | |
266 | //return angle | |
267 | return fInnerAngleShift; | |
8c555625 | 268 | } |
cc80f89e | 269 | Float_t AliTPCParam::GetOuterAngle() const |
270 | { | |
271 | //return angle | |
272 | return fOuterAngle; | |
273 | } | |
274 | Float_t AliTPCParam::GetOuterAngleShift() const | |
275 | { | |
276 | //return angle | |
277 | ||
278 | return fOuterAngleShift; | |
279 | } | |
280 | ||
8c555625 | 281 | |
282 | Int_t AliTPCParam::GetIndex(Int_t sector, Int_t row) | |
283 | { | |
284 | // | |
285 | //give index of the given sector and pad row | |
286 | //no control if the sectors and rows are reasonable !!! | |
287 | // | |
cc80f89e | 288 | if (sector<fNInnerSector) return sector*fNRowLow+row; |
289 | return (fNInnerSector*fNRowLow)+(sector-fNInnerSector)*fNRowUp+row; | |
8c555625 | 290 | } |
291 | ||
cc80f89e | 292 | Bool_t AliTPCParam::AdjustSectorRow(Int_t index, Int_t & sector, Int_t &row) const |
8c555625 | 293 | { |
294 | // | |
295 | //return sector and padrow for given index | |
cc80f89e | 296 | //if index is reasonable returns true else return false |
8c555625 | 297 | // |
298 | if ( (index<0) || (index>fNtRows)) return kFALSE; | |
cc80f89e | 299 | Int_t outindex = fNInnerSector*fNRowLow; |
8c555625 | 300 | if (index<outindex) { |
cc80f89e | 301 | sector = index/fNRowLow; |
302 | row = index - sector*fNRowLow; | |
8c555625 | 303 | return kTRUE; |
304 | } | |
305 | index-= outindex; | |
cc80f89e | 306 | sector = index/fNRowUp; |
307 | row = index - sector*fNRowUp; | |
308 | sector += fNInnerSector; | |
8c555625 | 309 | return kTRUE; |
310 | } | |
311 | ||
cc80f89e | 312 | void AliTPCParam::SetDefault() |
8c555625 | 313 | { |
314 | // | |
cc80f89e | 315 | //set default parameters |
8c555625 | 316 | // |
37831078 | 317 | //const static Int_t kMaxRows=600; |
73042f01 | 318 | // |
319 | //sector default parameters | |
320 | // | |
7a09f434 | 321 | const static Float_t kInnerRadiusLow = 82.97; |
322 | const static Float_t kInnerRadiusUp = 133.17; | |
323 | const static Float_t kOuterRadiusLow = 133.58; | |
324 | const static Float_t kOuterRadiusUp = 247.78; | |
73042f01 | 325 | const static Float_t kInnerAngle = 20; // 20 degrees |
326 | const static Float_t kInnerAngleShift = 10; | |
327 | const static Float_t kOuterAngle = 20; // 20 degrees | |
328 | const static Float_t kOuterAngleShift = 10; | |
329 | const static Float_t kInnerFrameSpace = 1.5; | |
330 | const static Float_t kOuterFrameSpace = 1.5; | |
37831078 | 331 | const static Float_t kInnerWireMount = 1.370825926; |
332 | const static Float_t kOuterWireMount = 1.370825926; | |
73042f01 | 333 | const static Float_t kZLength =250.; |
334 | const static Int_t kGeometryType = 0; //straight rows | |
f03e3423 | 335 | const static Int_t kNRowLow = 63; |
336 | const static Int_t kNRowUp1 = 64; | |
337 | const static Int_t kNRowUp2 = 32; | |
338 | const static Int_t kNRowUp = 96; | |
73042f01 | 339 | // |
340 | //wires default parameters | |
341 | // | |
342 | const static Int_t kNInnerWiresPerPad = 3; | |
343 | const static Int_t kInnerDummyWire = 2; | |
f03e3423 | 344 | const static Float_t kInnerWWPitch = 0.25; |
134da240 | 345 | const static Float_t kRInnerFirstWire = 84.445; |
346 | const static Float_t kRInnerLastWire = 132.445; | |
73042f01 | 347 | const static Float_t kInnerOffWire = 0.5; |
f03e3423 | 348 | const static Int_t kNOuter1WiresPerPad = 4; |
349 | const static Int_t kNOuter2WiresPerPad = 6; | |
350 | const static Float_t kOuterWWPitch = 0.25; | |
134da240 | 351 | const static Float_t kROuterFirstWire = 134.305; |
352 | const static Float_t kROuterLastWire = 247.055; | |
73042f01 | 353 | const static Int_t kOuterDummyWire = 2; |
354 | const static Float_t kOuterOffWire = 0.5; | |
355 | // | |
356 | //pad default parameters | |
357 | // | |
358 | const static Float_t kInnerPadPitchLength = 0.75; | |
359 | const static Float_t kInnerPadPitchWidth = 0.40; | |
360 | const static Float_t kInnerPadLength = 0.75; | |
361 | const static Float_t kInnerPadWidth = 0.40; | |
f03e3423 | 362 | const static Float_t kOuter1PadPitchLength = 1.0; |
73042f01 | 363 | const static Float_t kOuterPadPitchWidth = 0.6; |
f03e3423 | 364 | const static Float_t kOuter1PadLength = 1.0; |
73042f01 | 365 | const static Float_t kOuterPadWidth = 0.6; |
f03e3423 | 366 | const static Float_t kOuter2PadPitchLength = 1.5; |
367 | const static Float_t kOuter2PadLength = 1.5; | |
368 | ||
73042f01 | 369 | const static Bool_t kBMWPCReadout = kTRUE; //MWPC readout - another possibility GEM |
370 | const static Int_t kNCrossRows = 1; //number of rows to cross-talk | |
371 | ||
372 | // | |
373 | //gas default parameters | |
374 | // | |
375 | const static Float_t kDiffT = 2.2e-2; | |
376 | const static Float_t kDiffL = 2.2e-2; | |
377 | const static Float_t kGasGain = 2.e4; | |
378 | const static Float_t kDriftV =2.83e6; | |
379 | const static Float_t kOmegaTau = 0.145; | |
380 | const static Float_t kAttCoef = 250.; | |
381 | const static Float_t kOxyCont = 5.e-6; | |
382 | // | |
383 | //electronic default parameters | |
384 | // | |
385 | const static Float_t kPadCoupling=0.5; | |
386 | const static Int_t kZeroSup=2; | |
387 | const static Float_t kNoise = 1000; | |
388 | const static Float_t kChipGain = 12; | |
389 | const static Float_t kChipNorm = 0.4; | |
390 | const static Float_t kTSample = 2.e-7; | |
391 | const static Float_t kTFWHM = 1.9e-7; //fwhm of charge distribution | |
392 | const static Int_t kMaxTBin =445; | |
393 | const static Int_t kADCSat =1024; | |
394 | const static Float_t kADCDynRange =2000.; | |
395 | // | |
396 | // | |
397 | // | |
398 | const static Float_t kBField =0.2; | |
399 | const static Float_t kNPrimLoss =10.9; | |
400 | const static Float_t kNTotalLoss =39.9; | |
401 | // | |
402 | //response constants | |
403 | // | |
404 | const static Int_t kNResponseMax=100; | |
405 | const static Float_t kResponseThreshold=0.01; | |
8c555625 | 406 | fbStatus = kFALSE; |
8c555625 | 407 | // |
cc80f89e | 408 | //set sector parameters |
409 | // | |
410 | SetInnerRadiusLow(kInnerRadiusLow); | |
411 | SetOuterRadiusLow(kOuterRadiusLow); | |
412 | SetInnerRadiusUp(kInnerRadiusUp); | |
413 | SetOuterRadiusUp(kOuterRadiusUp); | |
414 | SetInnerFrameSpace(kInnerFrameSpace); | |
415 | SetOuterFrameSpace(kOuterFrameSpace); | |
416 | SetInnerWireMount(kInnerWireMount); | |
417 | SetOuterWireMount(kOuterWireMount); | |
418 | SetSectorAngles(kInnerAngle,kInnerAngleShift,kOuterAngle,kOuterAngleShift); | |
419 | SetZLength(kZLength); | |
420 | SetGeometryType(kGeometryType); | |
f03e3423 | 421 | SetRowNLow(kNRowLow); |
422 | SetRowNUp1 (kNRowUp1); | |
423 | SetRowNUp2(kNRowUp2); | |
424 | SetRowNUp(kNRowUp); | |
cc80f89e | 425 | // |
426 | //set wire parameters | |
427 | // | |
428 | SetInnerNWires(kNInnerWiresPerPad); | |
429 | SetInnerDummyWire(kInnerDummyWire); | |
430 | SetInnerOffWire(kInnerOffWire); | |
f03e3423 | 431 | SetOuter1NWires(kNOuter1WiresPerPad); |
432 | SetOuter2NWire(kNOuter2WiresPerPad); | |
cc80f89e | 433 | SetOuterDummyWire(kOuterDummyWire); |
434 | SetOuterOffWire(kOuterOffWire); | |
f03e3423 | 435 | SetInnerWWPitch(kInnerWWPitch); |
436 | SetRInnerFirstWire(kRInnerFirstWire); | |
437 | SetRInnerLastWire(kRInnerLastWire); | |
438 | SetOuterWWPitch(kOuterWWPitch); | |
439 | SetROuterFirstWire(kROuterFirstWire); | |
440 | SetROuterLastWire(kROuterLastWire); | |
cc80f89e | 441 | // |
442 | //set pad parameter | |
1283eee5 | 443 | // |
cc80f89e | 444 | SetInnerPadPitchLength(kInnerPadPitchLength); |
445 | SetInnerPadPitchWidth(kInnerPadPitchWidth); | |
446 | SetInnerPadLength(kInnerPadLength); | |
447 | SetInnerPadWidth(kInnerPadWidth); | |
f03e3423 | 448 | SetOuter1PadPitchLength(kOuter1PadPitchLength); |
449 | SetOuter2PadPitchLength(kOuter2PadPitchLength); | |
cc80f89e | 450 | SetOuterPadPitchWidth(kOuterPadPitchWidth); |
f03e3423 | 451 | SetOuter1PadLength(kOuter1PadLength); |
452 | SetOuter2PadLength(kOuter2PadLength); | |
cc80f89e | 453 | SetOuterPadWidth(kOuterPadWidth); |
454 | SetMWPCReadout(kBMWPCReadout); | |
455 | SetNCrossRows(kNCrossRows); | |
1283eee5 | 456 | // |
cc80f89e | 457 | //set gas paremeters |
458 | // | |
459 | SetDiffT(kDiffT); | |
460 | SetDiffL(kDiffL); | |
461 | SetGasGain(kGasGain); | |
462 | SetDriftV(kDriftV); | |
463 | SetOmegaTau(kOmegaTau); | |
464 | SetAttCoef(kAttCoef); | |
465 | SetOxyCont(kOxyCont); | |
466 | // | |
467 | //set electronivc parameters | |
468 | // | |
469 | SetPadCoupling(kPadCoupling); | |
470 | SetZeroSup(kZeroSup); | |
471 | SetNoise(kNoise); | |
472 | SetChipGain(kChipGain); | |
473 | SetChipNorm(kChipNorm); | |
474 | SetTSample(kTSample); | |
475 | SetTFWHM(kTFWHM); | |
476 | SetMaxTBin(kMaxTBin); | |
477 | SetADCSat(kADCSat); | |
478 | SetADCDynRange(kADCDynRange); | |
479 | //set magnetic field | |
480 | SetBField(kBField); | |
481 | SetNPrimLoss(kNPrimLoss); | |
482 | SetNTotalLoss(kNTotalLoss); | |
483 | // | |
484 | //set response parameters | |
485 | // | |
486 | SetNResponseMax(kNResponseMax); | |
bcc5d57d | 487 | SetResponseThreshold(static_cast<int>(kResponseThreshold)); |
8c555625 | 488 | } |
cc80f89e | 489 | |
8c555625 | 490 | |
491 | Bool_t AliTPCParam::Update() | |
492 | { | |
1283eee5 | 493 | // |
494 | // update some calculated parameter which must be updated after changing "base" | |
495 | // parameters | |
496 | // for example we can change size of pads and according this recalculate number | |
497 | // of pad rows, number of of pads in given row .... | |
498 | // | |
73042f01 | 499 | const Float_t kQel = 1.602e-19; // elementary charge |
8c555625 | 500 | fbStatus = kFALSE; |
1283eee5 | 501 | |
502 | Int_t i,j; //loop variables because HP | |
503 | //-----------------Sector section------------------------------------------ | |
504 | //calclulate number of sectors | |
cc80f89e | 505 | fNInnerSector = Int_t(4*TMath::Pi()/fInnerAngle+0.2); |
506 | // number of inner sectors - factor 0.2 to don't be influnced by inprecision | |
1283eee5 | 507 | if (fNInnerSector%2) return kFALSE; |
508 | fNOuterSector = Int_t(4*TMath::Pi()/fOuterAngle+0.2); | |
509 | if (fNOuterSector%2) return kFALSE; | |
510 | fNSector = fNInnerSector+fNOuterSector; | |
cc80f89e | 511 | |
512 | if (fRotAngle!=0) delete [] fRotAngle; | |
513 | fRotAngle = new Float_t[4*fNSector]; | |
1283eee5 | 514 | //calculate sin and cosine of rotations angle |
515 | //sectors angles numbering from 0 | |
cc80f89e | 516 | |
517 | j=fNInnerSector*2; | |
1283eee5 | 518 | Float_t angle = fInnerAngleShift; |
cc80f89e | 519 | for (i=0; j<fNInnerSector*4; i+=4, j+=4 , angle +=fInnerAngle){ |
1283eee5 | 520 | fRotAngle[i]=TMath::Cos(angle); |
521 | fRotAngle[i+1]=TMath::Sin(angle); | |
522 | fRotAngle[j] = fRotAngle[i]; | |
523 | fRotAngle[j+1] = fRotAngle[i+1]; | |
cc80f89e | 524 | fRotAngle[i+2] =angle; |
525 | fRotAngle[j+2] =angle; | |
1283eee5 | 526 | } |
527 | angle = fOuterAngleShift; | |
cc80f89e | 528 | j=(fNInnerSector+fNOuterSector/2)*4; |
529 | for (i=fNInnerSector*4; j<fNSector*4; i+=4,j+=4, angle +=fOuterAngle){ | |
1283eee5 | 530 | fRotAngle[i]=TMath::Cos(angle); |
531 | fRotAngle[i+1]=TMath::Sin(angle); | |
532 | fRotAngle[j] = fRotAngle[i]; | |
533 | fRotAngle[j+1] = fRotAngle[i+1]; | |
cc80f89e | 534 | fRotAngle[i+2] =angle; |
535 | fRotAngle[j+2] =angle; | |
1283eee5 | 536 | } |
cc80f89e | 537 | fZWidth = fTSample*fDriftV; |
73042f01 | 538 | fTotalNormFac = fPadCoupling*fChipNorm*kQel*1.e15*fChipGain*fADCSat/fADCDynRange; |
539 | fNoiseNormFac = kQel*1.e15*fChipGain*fADCSat/fADCDynRange; | |
cc80f89e | 540 | //wire section |
f03e3423 | 541 | /* Int_t nwire; |
cc80f89e | 542 | Float_t wspace; //available space for wire |
543 | Float_t dummyspace; //dummyspace for wire | |
f03e3423 | 544 | |
cc80f89e | 545 | wspace =fInnerRadiusUp-fInnerRadiusLow-2*fInnerOffWire; |
546 | nwire = Int_t(wspace/fInnerWWPitch); | |
547 | wspace = Float_t(nwire)*fInnerWWPitch; | |
f03e3423 | 548 | dummyspace =(fInnerRadiusUp-fInnerRadiusLow-wspace)/2.; |
cc80f89e | 549 | wspace =fOuterRadiusUp-fOuterRadiusLow-2*fOuterOffWire; |
550 | nwire = Int_t(wspace/fOuterWWPitch); | |
551 | wspace = Float_t(nwire)*fOuterWWPitch; | |
552 | dummyspace =(fOuterRadiusUp-fOuterRadiusLow-wspace)/2.; | |
553 | fROuterFirstWire = fOuterRadiusLow+dummyspace; | |
554 | fROuterLastWire = fROuterFirstWire+fOuterWWPitch*(Float_t)(nwire); | |
f03e3423 | 555 | */ |
1283eee5 | 556 | |
8c555625 | 557 | // |
cc80f89e | 558 | //response data |
559 | // | |
560 | if (fResponseBin==0) delete [] fResponseBin; | |
561 | if (fResponseWeight==0) delete [] fResponseBin; | |
562 | fResponseBin = new Int_t[3*fNResponseMax]; | |
563 | fResponseWeight = new Float_t[fNResponseMax]; | |
564 | ||
8c555625 | 565 | fbStatus = kTRUE; |
566 | return kTRUE; | |
567 | } | |
568 | ||
569 | ||
570 | ||
571 | Bool_t AliTPCParam::GetStatus() | |
572 | { | |
573 | //get information about object consistency | |
574 | return fbStatus; | |
575 | } | |
576 | ||
577 | Int_t AliTPCParam::GetNRowLow() const | |
578 | { | |
579 | //get the number of pad rows in low sector | |
cc80f89e | 580 | return fNRowLow; |
8c555625 | 581 | } |
582 | Int_t AliTPCParam::GetNRowUp() const | |
583 | { | |
584 | //get the number of pad rows in up sector | |
cc80f89e | 585 | return fNRowUp; |
8c555625 | 586 | } |
f03e3423 | 587 | Int_t AliTPCParam::GetNRowUp1() const |
588 | { | |
589 | //get the number of pad rows in up1 sector | |
590 | return fNRowUp1; | |
591 | } | |
592 | Int_t AliTPCParam::GetNRowUp2() const | |
593 | { | |
594 | //get the number of pad rows in up2 sector | |
595 | return fNRowUp2; | |
596 | } | |
8c555625 | 597 | Float_t AliTPCParam::GetPadRowRadiiLow(Int_t irow) const |
598 | { | |
599 | //get the pad row (irow) radii | |
cc80f89e | 600 | if ( !(irow<0) && (irow<fNRowLow) ) |
8c555625 | 601 | return fPadRowLow[irow]; |
602 | else | |
603 | return 0; | |
604 | } | |
605 | ||
606 | Float_t AliTPCParam::GetPadRowRadiiUp(Int_t irow) const | |
607 | { | |
608 | //get the pad row (irow) radii | |
cc80f89e | 609 | if ( !(irow<0) && (irow<fNRowUp) ) |
8c555625 | 610 | return fPadRowUp[irow]; |
611 | else | |
612 | return 0; | |
613 | } | |
614 | ||
615 | Int_t AliTPCParam::GetNPadsLow(Int_t irow) const | |
616 | { | |
617 | //get the number of pads in row irow | |
cc80f89e | 618 | if ( !(irow<0) && (irow<fNRowLow) ) |
619 | return fNPadsLow[irow]; | |
8c555625 | 620 | else |
621 | return 0; | |
622 | } | |
623 | ||
624 | ||
625 | Int_t AliTPCParam::GetNPadsUp(Int_t irow) const | |
626 | { | |
627 | //get the number of pads in row irow | |
cc80f89e | 628 | if ( !(irow<0) && (irow<fNRowUp) ) |
629 | return fNPadsUp[irow]; | |
8c555625 | 630 | else |
631 | return 0; | |
632 | } | |
f03e3423 | 633 | Float_t AliTPCParam::GetYInner(Int_t irow) const |
634 | { | |
635 | return fYInner[irow]; | |
636 | } | |
637 | ||
638 | ||
639 | Float_t AliTPCParam::GetYOuter(Int_t irow) const | |
640 | { | |
641 | return fYOuter[irow]; | |
642 | } | |
643 | ||
644 | ||
645 | ||
646 | ||
647 | ||
648 | ||
649 | ||
8c555625 | 650 |