]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCParam.cxx
removed obsolete AliTPCDigitsDisplay.C
[u/mrichter/AliRoot.git] / TPC / AliTPCParam.cxx
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$
18 Revision 1.7.8.2  2000/04/10 08:44:51  kowal2
19
20 New transformations added
21 Different pad and pad-rows geometries for different sectors
22
23 Revision 1.7.8.1  2000/04/10 07:56:53  kowal2
24 Not used anymore - removed
25
26 Revision 1.7  1999/10/08 13:10:35  fca
27 Values in SetDefault are in radiants
28
29 Revision 1.6  1999/10/08 06:27:59  fca
30 Defaults updated
31
32 Revision 1.5  1999/10/05 17:18:27  fca
33 Correct GetWire check on even/odd fnWires
34
35 Revision 1.4  1999/09/29 09:24:34  fca
36 Introduction of the Copyright and cvs Log
37
38 */
39
40 ///////////////////////////////////////////////////////////////////////
41 //  Manager and of geomety  classes for set: TPC                     //
42 //                                                                   //
43 //  !sectors are numbered from  0                                     //
44 //  !pad rows are numbered from 0                                     //
45 //  
46 //  12.6.   changed z relative 
47 //  Origin:  Marian Ivanov, Uni. of Bratislava, ivanov@fmph.uniba.sk // 
48 //                                                                   //  
49 ///////////////////////////////////////////////////////////////////////
50
51
52 #include <iostream.h>
53 #include <TMath.h>
54 #include <TObject.h>
55 #include <TRandom.h>
56 #include <AliTPCParam.h>
57
58
59 ClassImp(AliTPCParam)
60
61 const static  Int_t kMaxRows=600; 
62 //
63 //sector default parameters
64 //
65 const static  Float_t kInnerRadiusLow = 81.6;
66 const static  Float_t kOuterRadiusLow = 144.2;
67 const static  Float_t kInnerRadiusUp  = 143.6;
68 const static  Float_t kOuterRadiusUp  = 252.1;
69 const static  Float_t kInnerAngle = 20; // 20 degrees
70 const static  Float_t kInnerAngleShift = 10;
71 const static  Float_t kOuterAngle = 20; //  20 degrees
72 const static  Float_t kOuterAngleShift = 10;
73 const static  Float_t kInnerFrameSpace = 1.5;
74 const static  Float_t kOuterFrameSpace = 1.5;
75 const static  Float_t kInnerWireMount = 1.15;
76 const static  Float_t kOuterWireMount = 1.15;
77 const static  Float_t kZLength =250.;
78 const static  Int_t   kGeometryType = 0; //straight rows 
79 //
80 //wires default parameters
81 //
82 const static Int_t    kNInnerWiresPerPad = 5;
83 const static Int_t    kInnerDummyWire = 2;
84 const static Float_t  kInnerOffWire = 0.5;
85 const static Int_t    kNOuterWiresPerPad = 5;
86 const static Int_t    kOuterDummyWire = 2;
87 const static Float_t  kOuterOffWire = 0.5;
88 //
89 //pad default parameters
90 // 
91 const static Float_t  kInnerPadPitchLength = 2.05;
92 const static Float_t  kInnerPadPitchWidth = 0.35;
93 const static Float_t  kInnerPadLength = 2.05;
94 const static Float_t  kInnerPadWidth = 0.35;
95 const static Float_t  kOuterPadPitchLength = 2.05;
96 const static Float_t  kOuterPadPitchWidth = 0.35;
97 const static Float_t  kOuterPadLength = 2.05;
98 const static Float_t  kOuterPadWidth = 0.35;
99 const static Bool_t   kBMWPCReadout = kTRUE; //MWPC readout - another possibility GEM 
100 const static Int_t    kNCrossRows = 1; //number of rows to cross-talk
101
102 //
103 //gas default parameters
104 //
105 const static  Float_t  kDiffT = 2.2e-2; 
106 const static  Float_t  kDiffL = 2.2e-2;
107 const static  Float_t  kGasGain = 2.e4;
108 const static  Float_t  kDriftV  =2.85e6;
109 const static  Float_t  kOmegaTau = 0.145;
110 const static  Float_t  kAttCoef = 250.;
111 const static  Float_t  kOxyCont = 5.e-6;
112 //
113 //electornic default parameters
114 //
115 const static  Float_t  kPadCoupling=0.5;
116 const static  Int_t    kZeroSup=5;
117 const static  Float_t  kNoise = 1000;                            
118 const static  Float_t  kChipGain = 12;
119 const static  Float_t  kChipNorm = 0.4;
120 const static  Float_t  kTSample = 2.e-7; 
121 const static  Float_t  kTFWHM   = 1.9e-7;  //fwhm of charge distribution
122 const static  Int_t    kMaxTBin =512;  
123 const static  Int_t    kADCSat  =1024;  
124 const static  Float_t  kADCDynRange =2000.;  
125 //
126 //
127 //
128 const static  Float_t kBField =0.2; 
129 const static  Float_t kNPrimLoss =10.9;
130 const static  Float_t kNTotalLoss =39.9;
131 // 
132 //transformation coeficients
133 //
134 const static  Float_t  kDegtoRad = 0.01745329251994;
135 const static  Float_t  kRadtoDeg = 57.29577951309;
136 // 
137 //response constants
138 //
139 const static Int_t     kNResponseMax=100;
140 const static Float_t   kResponseThreshold=0.01;
141
142
143
144 //___________________________________________
145 AliTPCParam::AliTPCParam()
146 {   
147   //
148   //constructor sets the default parameters
149   //
150
151   fResponseBin = 0;
152   fResponseWeight = 0;
153   fRotAngle = 0;
154   SetDefault();  
155 }
156
157 AliTPCParam::~AliTPCParam()
158 {
159   //
160   //destructor deletes some dynamicaly alocated variables
161   //
162
163   if (fResponseBin!=0)    delete [] fResponseBin;
164   if (fResponseWeight!=0) delete [] fResponseWeight;
165   if (fRotAngle      !=0) delete [] fRotAngle;
166
167 }
168
169
170
171
172 Int_t  AliTPCParam::Transform0to1(Float_t *xyz, Int_t * index)  const
173 {
174   //
175   // calculates sector number (index[1], undefined on input)
176   // xyz intact
177   //
178
179   Float_t angle,x1;
180   Int_t sector;
181   Float_t r = TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]);
182   if ((xyz[0]==0)&&(xyz[1]==0)) angle = 0.;
183   else
184     {
185       angle =TMath::ASin(xyz[1]/r);
186       if   (xyz[0]<0)   angle=TMath::Pi()-angle;
187       if ( (xyz[0]>0) && (xyz[1]<0) ) angle=2*TMath::Pi()+angle;
188     }
189
190   sector=Int_t((angle-fInnerAngleShift)/fInnerAngle);      
191  
192   Float_t cos,sin;
193   AdjustCosSin(sector,cos,sin);
194   x1=xyz[0]*cos + xyz[1]*sin;
195
196   if (x1>fOuterRadiusLow)
197     {
198       sector=Int_t((angle-fOuterAngleShift)/fOuterAngle)+fNInnerSector;      
199       if (xyz[2]<0)     sector+=(fNOuterSector>>1);            
200     }
201     else   
202       if (xyz[2]<0) sector+=(fNInnerSector>>1);    
203   index[1]=sector; // calculated sector number
204   index[0]=1; // indicates system after transformation
205   return sector;
206 }
207
208 Bool_t  AliTPCParam::Transform(Float_t *xyz, Int_t *index, Int_t* oindex)
209 {
210   //transformation from input coodination system to output coordination system
211   switch (index[0]){
212   case 0:
213     break;
214   };
215
216   return kFALSE;
217
218 }
219
220 Int_t AliTPCParam::GetPadRow(Float_t *xyz, Int_t *index) const 
221 {
222   //
223   //calculates pad row of point xyz - transformation to system 8 (digit system)
224   //
225   Int_t system = index[0];
226   if (0==system) {
227     Transform0to1(xyz,index); 
228     system=1;
229   }
230   if (1==system) {
231     Transform1to2(xyz,index); 
232     system=2;
233   }
234     
235   if (fGeometryType==0){ //straight row    
236     if (2==system) {
237       Transform2to3(xyz,index);       
238       system=3;
239     } 
240     if (3==system) {
241       Transform3to4(xyz,index);
242       system=4; 
243     }
244     if (4==system) {
245       Transform4to8(xyz,index);
246       system=8;     
247     }
248     if (8==system) {
249       index[0]=8;
250       return index[2];
251     } 
252   }
253
254   if (fGeometryType==1){ //cylindrical geometry    
255     if (2==system) {
256       Transform2to5(xyz,index);       
257       system=5;
258     } 
259     if (5==system) {
260       Transform2to3(xyz,index);
261       system=6;
262     }
263     if (6==system) {
264       Transform3to4(xyz,index); 
265       system=7;
266     }
267     if (8==system) {
268       index[0]=8;
269       return index[2];
270     }
271   } 
272   index[0]=system;
273   return -1; //if no reasonable system     
274 }
275
276 void  AliTPCParam::SetSectorAngles(Float_t innerangle, Float_t innershift, Float_t outerangle,
277                         Float_t outershift)
278 {
279   //
280   // set opening angles  
281   fInnerAngle = innerangle;       //opening angle of Inner sector
282   fInnerAngleShift = innershift;  //shift of first inner sector center to the 0
283   fOuterAngle = outerangle;       //opening angle of outer sector
284   fOuterAngleShift = outershift;  //shift of first sector center to the 0  
285   fInnerAngle *=kDegtoRad;
286   fInnerAngleShift *=kDegtoRad;
287   fOuterAngle *=kDegtoRad;
288   fOuterAngleShift *=kDegtoRad;
289 }
290
291 Float_t  AliTPCParam::GetInnerAngle() const
292 {
293   //return angle 
294   return fInnerAngle;
295
296 }
297
298 Float_t  AliTPCParam::GetInnerAngleShift() const
299 {  
300   //return angle   
301   return fInnerAngleShift;  
302 }
303 Float_t  AliTPCParam::GetOuterAngle() const
304
305   //return angle 
306   return fOuterAngle;
307
308 Float_t  AliTPCParam::GetOuterAngleShift() const
309
310   //return angle 
311
312      return fOuterAngleShift;
313
314
315
316 Int_t AliTPCParam::GetIndex(Int_t sector, Int_t row)
317 {
318   //
319   //give index of the given sector and pad row 
320   //no control if the sectors and rows  are reasonable !!!
321   //
322   if (sector<fNInnerSector) return sector*fNRowLow+row;
323   return (fNInnerSector*fNRowLow)+(sector-fNInnerSector)*fNRowUp+row;  
324 }
325
326 Bool_t   AliTPCParam::AdjustSectorRow(Int_t index, Int_t & sector, Int_t &row) const
327 {
328   //
329   //return sector and padrow for given index
330   //if index is reasonable returns true else return false
331   //
332   if ( (index<0) || (index>fNtRows))  return kFALSE;
333   Int_t outindex = fNInnerSector*fNRowLow;
334   if (index<outindex) {
335     sector = index/fNRowLow;
336     row    = index - sector*fNRowLow;
337     return kTRUE;
338   }
339   index-= outindex;
340   sector = index/fNRowUp;
341   row    = index - sector*fNRowUp;
342   sector += fNInnerSector;
343   return kTRUE;         
344
345
346 void AliTPCParam::SetDefault()
347 {
348   //
349   //set default parameters
350   //
351   fbStatus = kFALSE;
352   //
353   //set sector parameters
354   //
355   SetInnerRadiusLow(kInnerRadiusLow);
356   SetOuterRadiusLow(kOuterRadiusLow);
357   SetInnerRadiusUp(kInnerRadiusUp);
358   SetOuterRadiusUp(kOuterRadiusUp);
359   SetInnerFrameSpace(kInnerFrameSpace);
360   SetOuterFrameSpace(kOuterFrameSpace);
361   SetInnerWireMount(kInnerWireMount);
362   SetOuterWireMount(kOuterWireMount);
363   SetSectorAngles(kInnerAngle,kInnerAngleShift,kOuterAngle,kOuterAngleShift);
364   SetZLength(kZLength);
365   SetGeometryType(kGeometryType);
366   //
367   //set wire parameters
368   //
369   SetInnerNWires(kNInnerWiresPerPad);
370   SetInnerDummyWire(kInnerDummyWire);
371   SetInnerOffWire(kInnerOffWire);
372   SetOuterNWires(kNOuterWiresPerPad);
373   SetOuterDummyWire(kOuterDummyWire);
374   SetOuterOffWire(kOuterOffWire);
375   //
376   //set pad parameter
377   //
378   SetInnerPadPitchLength(kInnerPadPitchLength);
379   SetInnerPadPitchWidth(kInnerPadPitchWidth);
380   SetInnerPadLength(kInnerPadLength);
381   SetInnerPadWidth(kInnerPadWidth);
382   SetOuterPadPitchLength(kOuterPadPitchLength);
383   SetOuterPadPitchWidth(kOuterPadPitchWidth);
384   SetOuterPadLength(kOuterPadLength);
385   SetOuterPadWidth(kOuterPadWidth); 
386   SetMWPCReadout(kBMWPCReadout);
387   SetNCrossRows(kNCrossRows);
388   //
389   //set gas paremeters
390   //
391   SetDiffT(kDiffT);
392   SetDiffL(kDiffL);
393   SetGasGain(kGasGain);
394   SetDriftV(kDriftV);
395   SetOmegaTau(kOmegaTau);
396   SetAttCoef(kAttCoef);
397   SetOxyCont(kOxyCont);
398   //
399   //set electronivc parameters  
400   //
401   SetPadCoupling(kPadCoupling);
402   SetZeroSup(kZeroSup);
403   SetNoise(kNoise);
404   SetChipGain(kChipGain);
405   SetChipNorm(kChipNorm);   
406   SetTSample(kTSample);
407   SetTFWHM(kTFWHM);
408   SetMaxTBin(kMaxTBin);
409   SetADCSat(kADCSat);
410   SetADCDynRange(kADCDynRange);
411   //set magnetic field
412   SetBField(kBField);
413   SetNPrimLoss(kNPrimLoss);
414   SetNTotalLoss(kNTotalLoss);
415   //
416   //set response  parameters  
417   //
418   SetNResponseMax(kNResponseMax); 
419   SetResponseThreshold(kResponseThreshold);
420 }
421
422           
423 Bool_t AliTPCParam::Update()
424 {
425   //
426   // update some calculated parameter which must be updated after changing "base"
427   // parameters 
428   // for example we can change size of pads and according this recalculate number
429   // of pad rows, number of of pads in given row ....
430   //
431   fbStatus = kFALSE;
432
433   Int_t i,j;  //loop variables because HP 
434   //-----------------Sector section------------------------------------------
435   //calclulate number of sectors
436   fNInnerSector = Int_t(4*TMath::Pi()/fInnerAngle+0.2); 
437        // number of inner sectors - factor 0.2 to don't be influnced by inprecision
438   if (fNInnerSector%2) return kFALSE;
439   fNOuterSector = Int_t(4*TMath::Pi()/fOuterAngle+0.2); 
440   if (fNOuterSector%2) return kFALSE;
441   fNSector  = fNInnerSector+fNOuterSector;
442
443   if (fRotAngle!=0) delete [] fRotAngle;
444   fRotAngle = new Float_t[4*fNSector];
445   //calculate sin and cosine of rotations angle     
446   //sectors angles numbering from 0
447
448   j=fNInnerSector*2;
449   Float_t angle = fInnerAngleShift; 
450   for (i=0; j<fNInnerSector*4; i+=4, j+=4 , angle +=fInnerAngle){
451     fRotAngle[i]=TMath::Cos(angle);
452     fRotAngle[i+1]=TMath::Sin(angle);
453     fRotAngle[j] =  fRotAngle[i];
454     fRotAngle[j+1] =  fRotAngle[i+1];
455     fRotAngle[i+2] =angle;
456     fRotAngle[j+2] =angle;    
457   }
458   angle = fOuterAngleShift; 
459   j=(fNInnerSector+fNOuterSector/2)*4;
460   for (i=fNInnerSector*4; j<fNSector*4; i+=4,j+=4, angle +=fOuterAngle){
461     fRotAngle[i]=TMath::Cos(angle);
462     fRotAngle[i+1]=TMath::Sin(angle);
463     fRotAngle[j] =  fRotAngle[i];
464     fRotAngle[j+1] =  fRotAngle[i+1];
465     fRotAngle[i+2] =angle;
466     fRotAngle[j+2] =angle;    
467   }
468   fZWidth = fTSample*fDriftV;  
469   fTotalNormFac = fPadCoupling*fChipNorm*q_el*1.e15*fChipGain*fADCSat/fADCDynRange;
470   fNoiseNormFac = q_el*1.e15*fChipGain*fADCSat/fADCDynRange;
471   //wire section 
472   Int_t nwire;
473   Float_t wspace; //available space for wire
474   Float_t dummyspace; //dummyspace for wire
475
476   fInnerWWPitch = Float_t((Double_t)fInnerPadPitchLength/(Double_t)fNInnerWiresPerPad);  
477   wspace =fInnerRadiusUp-fInnerRadiusLow-2*fInnerOffWire;
478   nwire = Int_t(wspace/fInnerWWPitch);
479   wspace = Float_t(nwire)*fInnerWWPitch;
480   dummyspace =(fInnerRadiusUp-fInnerRadiusLow-wspace)/2.; 
481   fRInnerFirstWire = fInnerRadiusLow+dummyspace;
482   fRInnerLastWire = fRInnerFirstWire+fInnerWWPitch*(Float_t)(nwire);
483
484   fOuterWWPitch = Float_t((Double_t)fOuterPadPitchLength/(Double_t)fNOuterWiresPerPad);  
485   wspace =fOuterRadiusUp-fOuterRadiusLow-2*fOuterOffWire;
486   nwire = Int_t(wspace/fOuterWWPitch);
487   wspace = Float_t(nwire)*fOuterWWPitch;
488   dummyspace =(fOuterRadiusUp-fOuterRadiusLow-wspace)/2.; 
489   fROuterFirstWire = fOuterRadiusLow+dummyspace;
490   fROuterLastWire = fROuterFirstWire+fOuterWWPitch*(Float_t)(nwire);
491
492   
493   //
494   //response data
495   //
496   if (fResponseBin==0) delete [] fResponseBin;
497   if (fResponseWeight==0) delete [] fResponseBin;
498   fResponseBin    = new Int_t[3*fNResponseMax];
499   fResponseWeight = new Float_t[fNResponseMax];
500   
501   fbStatus = kTRUE;
502   return kTRUE;
503 }
504
505
506
507 Bool_t AliTPCParam::GetStatus()
508 {
509   //get information about object consistency
510   return fbStatus;
511 }
512
513 Int_t AliTPCParam::GetNRowLow() const
514 {
515   //get the number of pad rows in low sector
516   return fNRowLow;
517 }
518 Int_t AliTPCParam::GetNRowUp() const
519 {
520   //get the number of pad rows in up sector
521   return fNRowUp;
522 }
523 Float_t AliTPCParam::GetPadRowRadiiLow(Int_t irow) const
524 {
525   //get the pad row (irow) radii
526   if ( !(irow<0) && (irow<fNRowLow) ) 
527     return  fPadRowLow[irow];
528   else
529     return 0;
530 }
531
532 Float_t AliTPCParam::GetPadRowRadiiUp(Int_t irow) const
533 {
534   //get the pad row (irow) radii
535  if ( !(irow<0) && (irow<fNRowUp) ) 
536     return  fPadRowUp[irow];
537   else
538     return 0;
539 }
540
541 Int_t AliTPCParam::GetNPadsLow(Int_t irow) const
542 {
543   //get the number of pads in row irow
544   if ( !(irow<0) && (irow<fNRowLow) ) 
545     return  fNPadsLow[irow];
546   else
547     return 0;
548 }
549
550
551 Int_t AliTPCParam::GetNPadsUp(Int_t irow) const
552 {
553   //get the number of pads in row irow
554   if ( !(irow<0) && (irow<fNRowUp) ) 
555     return  fNPadsUp[irow];
556   else
557     return 0;
558 }
559
560
561 void AliTPCParam::Streamer(TBuffer &R__b)
562 {
563    // Stream an object of class AliTPC.
564
565    if (R__b.IsReading()) {
566       Version_t R__v = R__b.ReadVersion(); if (R__v) { }
567       AliDetectorParam::Streamer(R__b);
568       if (R__v < 2) return;
569       //---------------------------------------------------------------------
570       //   ALICE TPC sector geometry
571       //--------------------------------------------------------------------  
572       R__b >> fInnerRadiusLow;   // lower radius of inner sector-IP
573       R__b >> fInnerRadiusUp;    // upper radius of inner  sector-IP
574       R__b >> fOuterRadiusUp;    // upper radius of outer  sector-IP
575       R__b >> fOuterRadiusLow;   // lower radius of outer sector-IP
576       R__b >> fInnerAngle;       //opening angle of Inner sector
577       R__b >> fInnerAngleShift;  //shift of first inner sector center to the 0
578       R__b >> fOuterAngle;       //opening angle of outer sector
579       R__b >> fOuterAngleShift;  //shift of first sector center to the 0  
580       R__b >> fInnerFrameSpace;  //spce for inner frame in the phi direction 
581       R__b >> fOuterFrameSpace;  //spce for outer frame in the phi direction 
582       R__b >> fInnerWireMount;
583       R__b >> fOuterWireMount;
584       //R__b >> fNInnerSector;      //!number of inner sectors - calculated
585       //R__b >> fNOuterSector;      //!number of outer sectors -calculated
586       //R__b >> fNSector;           //! total number of sectors -calculated
587       R__b >> fZLength;           //length of the drift region of the TPC
588       //R__b.ReadFastArray(fRotAngle,fNSector*4);      //  sin and cos of rotation angles for 
589       R__b >> fGeometryType;      //type of geometry -0 straight rows
590                                  //  diferent sectors
591       //---------------------------------------------------------------------
592       //   ALICE TPC wires  geometry
593       //--------------------------------------------------------------------
594       R__b >> fNInnerWiresPerPad;//  Number of wires per pad
595       //R__b >> fInnerWWPitch;     // pitch between wires  in inner sector - calculated
596       R__b >> fInnerDummyWire;   //number of wires without pad readout
597       R__b >> fInnerOffWire;//oofset of first wire to the begining of the sector
598       //R__b >> fRInnerFirstWire;  //position of the first wire  -calculated
599       //R__b >> fRInnerLastWire;   //position of the last wire    -calculated
600       R__b >> fNOuterWiresPerPad;//  Number of wires per pad
601       //R__b >> fOuterWWPitch;     // pitch between wires in outer sector   - calculated
602       R__b >> fOuterDummyWire;   //number of wires without pad readout
603       R__b >> fOuterOffWire;//oofset of first wire to the begining of the sector
604       //R__b >> fROuterFirstWire;  //position of the first wire  -calulated
605       //R__b >> fROuterLastWire;   //position of the last wire    -calculated            
606       //---------------------------------------------------------------------
607       //   ALICE TPC pad parameters
608       //--------------------------------------------------------------------
609       R__b >> fInnerPadPitchLength;    //Inner pad pitch length
610       R__b >> fInnerPadPitchWidth;     //Inner pad pitch width
611       R__b >> fInnerPadLength;         //Inner pad  length
612       R__b >> fInnerPadWidth;          //Inner pad  width
613       R__b >> fOuterPadPitchLength;    //Outer pad pitch length
614       R__b >> fOuterPadPitchWidth;     //Outer pad pitch width
615       R__b >> fOuterPadLength;         //Outer pad  length
616       R__b >> fOuterPadWidth;          //Outer pad  width
617       R__b >> fBMWPCReadout;           //indicate wire readout 
618       R__b >> fNCrossRows;             //number of pad rows to crostalk
619       R__b >> fNRowLow;           //  number of pad rows per low sector 
620       R__b >> fNRowUp;            //  number of pad rows per sector up 
621       //R__b >> fPadRowLow[600]; // Lower sector, pad row radii
622       //R__b >> fPadRowUp[600];  // Upper sector, pad row radii
623       //R__b >> fNPadsLow[600];     // Lower sector, number of pads per row
624       //R__b >> fNPadsUp[600];      //  Upper sector, number of pads per row
625       //---------------------------------------------------------------------
626       //   ALICE TPC Gas Parameters
627       //--------------------------------------------------------------------
628       R__b >> fDiffT;          //tangencial diffusion constant
629       R__b >> fDiffL;          //longutudinal diffusion constant
630       R__b >> fGasGain;        //gas gain constant
631       R__b >> fDriftV;          //drift velocity constant
632       R__b >> fOmegaTau;       //omega tau ExB coeficient
633       R__b >> fAttCoef;        //attachment coefitients
634       R__b >> fOxyCont;        //oxygen content
635       //---------------------------------------------------------------------
636       //   ALICE TPC  Electronics Parameters
637       //--------------------------------------------------------------------
638       R__b >> fPadCoupling;     //coupling factor ration of  anode signal 
639       //and total pads signal  
640       R__b >> fZeroSup;         //zero suppresion constant
641       R__b >> fNoise;         //noise sigma constant
642       R__b >> fChipGain;      //preamp shaper constant
643       R__b >> fChipNorm;      //preamp shaper normalisation       
644       R__b >> fTSample; // sampling time
645       R__b >> fZWidth;  //derived value calculated using TSample and driftw 
646       R__b >> fTSigma;  // width of the Preamp/Shaper function
647       R__b >> fMaxTBin; //maximum time bin number   
648       R__b >> fADCSat;  //saturation value of ADC (10 bits)
649       R__b >> fADCDynRange; // input dynamic range (mV)
650       //--------------------------------------------------------        
651    } else {
652       R__b.WriteVersion(AliTPCParam::IsA());
653       AliDetectorParam::Streamer(R__b);      
654      //---------------------------------------------------------------------
655       //   ALICE TPC sector geometry
656       //--------------------------------------------------------------------  
657       R__b << fInnerRadiusLow;   // lower radius of inner sector-IP
658       R__b << fInnerRadiusUp;    // upper radius of inner  sector-IP
659       R__b << fOuterRadiusUp;    // upper radius of outer  sector-IP
660       R__b << fOuterRadiusLow;   // lower radius of outer sector-IP
661       R__b << fInnerAngle;       //opening angle of Inner sector
662       R__b << fInnerAngleShift;  //shift of first inner sector center to the 0
663       R__b << fOuterAngle;       //opening angle of outer sector
664       R__b << fOuterAngleShift;  //shift of first sector center to the 0  
665       R__b << fInnerFrameSpace;  //spce for inner frame in the phi direction 
666       R__b << fOuterFrameSpace;  //spce for outer frame in the phi direction 
667       R__b << fInnerWireMount;
668       R__b << fOuterWireMount;
669       //R__b << fNInnerSector;      //!number of inner sectors - calculated
670       //R__b << fNOuterSector;      //!number of outer sectors -calculated
671       //R__b << fNSector;           //! total number of sectors -calculated
672       R__b << fZLength;           //length of the drift region of the TPC
673       //R__b.WriteFastArray(fRotAngle,fNSector*4);      //  sin and cos of rotation angles for 
674       R__b << fGeometryType;      //type of geometry -0 straight rows
675       
676                                  //  diferent sectors
677       //---------------------------------------------------------------------
678       //   ALICE TPC wires  geometry
679       //--------------------------------------------------------------------
680       R__b << fNInnerWiresPerPad;//  Number of wires per pad
681       // R__b << fInnerWWPitch;     // pitch between wires  in inner sector - calculated
682       R__b << fInnerDummyWire;   //number of wires without pad readout
683       R__b << fInnerOffWire;//oofset of first wire to the begining of the sector
684       //R__b << fRInnerFirstWire;  //position of the first wire  -calculated
685       //R__b << fRInnerLastWire;   //position of the last wire    -calculated
686       R__b << fNOuterWiresPerPad;//  Number of wires per pad
687       //R__b << fOuterWWPitch;     // pitch between wires in outer sector   - calculated
688       R__b << fOuterDummyWire;   //number of wires without pad readout
689       R__b << fOuterOffWire;//oofset of first wire to the begining of the sector
690       //R__b << fROuterFirstWire;  //position of the first wire  -calulated
691       //R__b << fROuterLastWire;   //position of the last wire    -calculated            
692       //---------------------------------------------------------------------
693       //   ALICE TPC pad parameters
694       //--------------------------------------------------------------------
695       R__b << fInnerPadPitchLength;    //Inner pad pitch length
696       R__b << fInnerPadPitchWidth;     //Inner pad pitch width
697       R__b << fInnerPadLength;         //Inner pad  length
698       R__b << fInnerPadWidth;          //Inner pad  width
699       R__b << fOuterPadPitchLength;    //Outer pad pitch length
700       R__b << fOuterPadPitchWidth;     //Outer pad pitch width
701       R__b << fOuterPadLength;         //Outer pad  length
702       R__b << fOuterPadWidth;          //Outer pad  width
703       R__b << fBMWPCReadout;           //indicate wire readout 
704       R__b << fNCrossRows;             // number of rows to cross talk
705       R__b << fNRowLow;           //  number of pad rows per low sector 
706       R__b << fNRowUp;            //  number of pad rows per sector up 
707       // R__b << fPadRowLow[600]; // Lower sector, pad row radii
708       //R__b << fPadRowUp[600];  // Upper sector, pad row radii
709       //R__b << fNPadsLow[600];     // Lower sector, number of pads per row
710       //R__b << fNPadsUp[600];      //  Upper sector, number of pads per row
711       //---------------------------------------------------------------------
712       //   ALICE TPC Gas Parameters
713       //--------------------------------------------------------------------
714       R__b << fDiffT;          //tangencial diffusion constant
715       R__b << fDiffL;          //longutudinal diffusion constant
716       R__b << fGasGain;        //gas gain constant
717       R__b << fDriftV;          //drift velocity constant
718       R__b << fOmegaTau;       //omega tau ExB coeficient
719       R__b << fAttCoef;        //attachment coefitients
720       R__b << fOxyCont;        //oxygen content
721       //---------------------------------------------------------------------
722       //   ALICE TPC  Electronics Parameters
723       //--------------------------------------------------------------------
724       R__b << fPadCoupling;     //coupling factor ration of  anode signal 
725       //and total pads signal  
726       R__b << fZeroSup;         //zero suppresion constant
727       R__b << fNoise;         //noise sigma constant
728       R__b << fChipGain;      //preamp shaper constant
729       R__b << fChipNorm;      //preamp shaper normalisation     
730       R__b << fTSample; // sampling time
731       R__b << fZWidth;  //derived value calculated using TSample and driftw 
732       R__b << fTSigma;  // width of the Preamp/Shaper function
733       R__b << fMaxTBin; //maximum time bin number   
734       R__b << fADCSat;  //saturation value of ADC (10 bits)
735       R__b << fADCDynRange; // input dynamic range (mV)       
736    }
737 }
738