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 **************************************************************************/
18 Revision 1.3 2000/09/05 14:25:50 nilsen
19 Made fixes for HP compiler. All function parameter default values placed
20 in .h file. Fixed the usual problem with HP comilers and the "for(Int_t i..."
21 business. Replaced casting (Double_t [3][3]) to (Double_t (*)[3]) for HP.
22 Lastly removed all "const" before function parameters which were 2 dim. arrays,
23 because on HP root generates some strange code (?). Thanks Peter for the
26 Revision 1.2 2000/08/29 20:16:50 nilsen
27 New class for ITS coordiante transformations used by AliITSgeom nearly
30 Revision 1.1.2.1 2000/06/04 16:32:31 Nilsen
31 A new class to hold the matrix information needed by AliITSgeom.
38 #include "AliITSgeomMatrix.h"
40 ClassImp(AliITSgeomMatrix)
41 //----------------------------------------------------------------------
42 AliITSgeomMatrix::AliITSgeomMatrix(){
43 ////////////////////////////////////////////////////////////////////////
44 // The Default constructor for the AliITSgeomMatrix class. By Default
45 // the angles of rotations are set to zero, meaning that the rotation
46 // matrix is the unit matrix. The translation vector is also set to zero
47 // as are the module id number. The detector type is set to -1 (an undefined
48 // value). The full rotation matrix is kept so that the evaluation
49 // of a coordinate transformation can be done quickly and with a minimum
50 // of CPU overhead. The basic coordinate systems are the ALICE global
51 // coordinate system and the detector local coordinate system. In general
52 // this structure is not limited to just those two coordinate systems.
55 <img src="picts/ITS/AliISgeomMatrix_L1.gif">
58 ////////////////////////////////////////////////////////////////////////
61 fDetectorIndex = -1; // a value never defined.
64 frot[i] = ftran[i] = 0.0;
65 for(j=0;j<3;j++) fm[i][j] = 0.0;
67 fm[0][0] = fm[1][1] = fm[2][2] = 1.0;
69 //----------------------------------------------------------------------
70 AliITSgeomMatrix::AliITSgeomMatrix(const AliITSgeomMatrix &sourse){
71 ////////////////////////////////////////////////////////////////////////
72 // The standard copy constructor. This make a full / proper copy of
74 ////////////////////////////////////////////////////////////////////////
77 this->fDetectorIndex = sourse.fDetectorIndex;
79 this->fid[i] = sourse.fid[i];
80 this->frot[i] = sourse.frot[i];
81 this->ftran[i] = sourse.ftran[i];
82 for(j=0;j<3;j++) this->fm[i][j] = sourse.fm[i][j];
85 //----------------------------------------------------------------------
86 void AliITSgeomMatrix::operator=(const AliITSgeomMatrix &sourse){
87 ////////////////////////////////////////////////////////////////////////
88 // The standard = operator. This make a full / proper copy of
90 ////////////////////////////////////////////////////////////////////////
93 this->fDetectorIndex = sourse.fDetectorIndex;
95 this->fid[i] = sourse.fid[i];
96 this->frot[i] = sourse.frot[i];
97 this->ftran[i] = sourse.ftran[i];
98 for(j=0;j<3;j++) this->fm[i][j] = sourse.fm[i][j];
101 //----------------------------------------------------------------------
102 AliITSgeomMatrix::AliITSgeomMatrix(const Int_t idt,const Int_t id[3],
103 const Double_t rot[3],const Double_t tran[3]){
104 ////////////////////////////////////////////////////////////////////////
105 // This is a constructor for the AliITSgeomMatrix class. The matrix is
106 // defined by 3 standard rotation angles [radians], and the translation
107 // vector tran [cm]. In addition the layer, ladder, and detector number
108 // for this particular module and the type of module must be given.
109 // The full rotation matrix is kept so that the evaluation
110 // of a coordinate transformation can be done quickly and with a minimum
111 // of CPU overhead. The basic coordinate systems are the ALICE global
112 // coordinate system and the detector local coordinate system. In general
113 // this structure is not limited to just those two coordinate systems.
116 <img src="picts/ITS/AliISgeomMatrix_L1.gif">
119 ////////////////////////////////////////////////////////////////////////
122 fDetectorIndex = idt; // a value never defined.
128 this->MatrixFromAngle();
130 //----------------------------------------------------------------------
131 AliITSgeomMatrix::AliITSgeomMatrix(const Int_t idt, const Int_t id[3],
132 Double_t matrix[3][3],
133 const Double_t tran[3]){
134 ////////////////////////////////////////////////////////////////////////
135 // This is a constructor for the AliITSgeomMatrix class. The rotation matrix
136 // is given as one of the inputs, and the translation vector tran [cm]. In
137 // addition the layer, ladder, and detector number for this particular
138 // module and the type of module must be given. The full rotation matrix
139 // is kept so that the evaluation of a coordinate transformation can be
140 // done quickly and with a minimum of CPU overhead. The basic coordinate
141 // systems are the ALICE global coordinate system and the detector local
142 // coordinate system. In general this structure is not limited to just
143 // those two coordinate systems.
146 <img src="picts/ITS/AliISgeomMatrix_L1.gif">
149 ////////////////////////////////////////////////////////////////////////
152 fDetectorIndex = idt; // a value never defined.
156 for(j=0;j<3;j++) fm[i][j] = matrix[i][j];
158 this->AngleFromMatrix();
160 //----------------------------------------------------------------------
161 void AliITSgeomMatrix::SixAnglesFromMatrix(Double_t *ang){
162 ////////////////////////////////////////////////////////////////////////
163 // This function returns the 6 GEANT 3.21 rotation angles [degrees] in
164 // the array ang which must be at least [6] long.
165 ////////////////////////////////////////////////////////////////////////
166 Double_t si,c=180./TMath::Pi();
168 ang[1] = TMath::ATan2(fm[0][1],fm[0][0]);
169 if(TMath::Cos(ang[1])!=0.0) si = fm[0][0]/TMath::Cos(ang[1]);
170 else si = fm[0][1]/TMath::Sin(ang[1]);
171 ang[0] = TMath::ATan2(si,fm[0][2]);
173 ang[3] = TMath::ATan2(fm[1][1],fm[1][0]);
174 if(TMath::Cos(ang[3])!=0.0) si = fm[1][0]/TMath::Cos(ang[3]);
175 else si = fm[1][1]/TMath::Sin(ang[3]);
176 ang[2] = TMath::ATan2(si,fm[1][2]);
178 ang[5] = TMath::ATan2(fm[2][1],fm[2][0]);
179 if(TMath::Cos(ang[5])!=0.0) si = fm[2][0]/TMath::Cos(ang[5]);
180 else si = fm[2][1]/TMath::Sin(ang[5]);
181 ang[4] = TMath::ATan2(si,fm[2][2]);
183 for(Int_t i=0;i<6;i++) {ang[i] *= c; if(ang[i]<0.0) ang[i] += 360.;}
185 //----------------------------------------------------------------------
186 void AliITSgeomMatrix::MatrixFromSixAngles(const Double_t *ang){
187 ////////////////////////////////////////////////////////////////////////
188 // Given the 6 GEANT 3.21 rotation angles [degree], this will compute and
189 // set the rotations matrix and 3 standard rotation angles [radians].
190 // These angles and rotation matrix are overwrite the existing values in
192 ////////////////////////////////////////////////////////////////////////
194 Double_t si,lr[9],c=TMath::Pi()/180.;
196 si = TMath::Sin(c*ang[0]);
197 if(ang[0]== 90.0) si = +1.0;
198 if(ang[0]==270.0) si = -1.0;
199 if(ang[0]== 0.0||ang[0]==180.) si = 0.0;
200 lr[0] = si * TMath::Cos(c*ang[1]);
201 lr[1] = si * TMath::Sin(c*ang[1]);
202 lr[2] = TMath::Cos(c*ang[0]);
203 if(ang[0]== 90.0||ang[0]==270.) lr[2] = 0.0;
204 if(ang[0]== 0.0) lr[2] = +1.0;
205 if(ang[0]==180.0) lr[2] = -1.0;
207 si = TMath::Sin(c*ang[2]);
208 if(ang[2]== 90.0) si = +1.0;
209 if(ang[2]==270.0) si = -1.0;
210 if(ang[2]== 0.0||ang[2]==180.) si = 0.0;
211 lr[3] = si * TMath::Cos(c*ang[3]);
212 lr[4] = si * TMath::Sin(c*ang[3]);
213 lr[5] = TMath::Cos(c*ang[2]);
214 if(ang[2]== 90.0||ang[2]==270.) lr[5] = 0.0;
215 if(ang[2]== 0.0) lr[5] = +1.0;
216 if(ang[2]==180.0) lr[5] = -1.0;
218 si = TMath::Sin(c*ang[4]);
219 if(ang[4]== 90.0) si = +1.0;
220 if(ang[4]==270.0) si = -1.0;
221 if(ang[4]== 0.0||ang[4]==180.) si = 0.0;
222 lr[6] = si * TMath::Cos(c*ang[5]);
223 lr[7] = si * TMath::Sin(c*ang[5]);
224 lr[8] = TMath::Cos(c*ang[4]);
225 if(ang[4]== 90.0||ang[4]==270.0) lr[8] = 0.0;
226 if(ang[4]== 0.0) lr[8] = +1.0;
227 if(ang[4]==180.0) lr[8] = -1.0;
228 // Normalize these elements and fill matrix fm.
229 for(i=0;i<3;i++){// reuse si.
231 for(j=0;j<3;j++) si += lr[3*i+j]*lr[3*i+j];
232 si = TMath::Sqrt(1./si);
233 for(j=0;j<3;j++) fm[i][j] = si*lr[3*i+j];
235 this->AngleFromMatrix();
237 //----------------------------------------------------------------------
238 AliITSgeomMatrix::AliITSgeomMatrix(const Double_t rotd[6]/*degrees*/,
239 const Int_t idt,const Int_t id[3],
240 const Double_t tran[3]){
241 ////////////////////////////////////////////////////////////////////////
242 // This is a constructor for the AliITSgeomMatrix class. The matrix is
243 // defined by the 6 GEANT 3.21 rotation angles [degrees], and the translation
244 // vector tran [cm]. In addition the layer, ladder, and detector number
245 // for this particular module and the type of module must be given.
246 // The full rotation matrix is kept so that the evaluation
247 // of a coordinate transformation can be done quickly and with a minimum
248 // of CPU overhead. The basic coordinate systems are the ALICE global
249 // coordinate system and the detector local coordinate system. In general
250 // this structure is not limited to just those two coordinate systems.
253 <img src="picts/ITS/AliISgeomMatrix_L1.gif">
256 ////////////////////////////////////////////////////////////////////////
259 fDetectorIndex = idt; // a value never defined.
264 this->MatrixFromSixAngles(rotd);
266 //----------------------------------------------------------------------
267 void AliITSgeomMatrix::AngleFromMatrix(){
268 ////////////////////////////////////////////////////////////////////////
269 // Computes the angles from the rotation matrix up to a phase of 180 degrees.
270 ////////////////////////////////////////////////////////////////////////
272 // get angles from matrix up to a phase of 180 degrees.
274 rx = TMath::ATan2(fm[2][1],fm[2][2]);if(rx<0.0) rx += 2.0*TMath::Pi();
275 ry = TMath::ASin(fm[0][2]); if(ry<0.0) ry += 2.0*TMath::Pi();
276 rz = TMath::ATan2(fm[1][1],fm[0][0]);if(rz<0.0) rz += 2.0*TMath::Pi();
282 //----------------------------------------------------------------------
283 void AliITSgeomMatrix::MatrixFromAngle(){
284 ////////////////////////////////////////////////////////////////////////
285 // Computes the Rotation matrix from the angles [radians] kept in this
287 ////////////////////////////////////////////////////////////////////////
288 Double_t sx,sy,sz,cx,cy,cz;
290 sx = TMath::Sin(frot[0]); cx = TMath::Cos(frot[0]);
291 sy = TMath::Sin(frot[1]); cy = TMath::Cos(frot[1]);
292 sz = TMath::Sin(frot[2]); cz = TMath::Cos(frot[2]);
293 fm[0][0] = cz*cy; // fr[0]
294 fm[0][1] = -cz*sy*sx - sz*cx; // fr[1]
295 fm[0][2] = -cz*sy*cx + sz*sx; // fr[2]
296 fm[1][0] = sz*cy; // fr[3]
297 fm[1][1] = -sz*sy*sx + cz*cx; // fr[4]
298 fm[1][2] = -sz*sy*cx - cz*sx; // fr[5]
299 fm[2][0] = sy; // fr[6]
300 fm[2][1] = cy*sx; // fr[7]
301 fm[2][2] = cy*cx; // fr[8]
304 //----------------------------------------------------------------------
305 void AliITSgeomMatrix::GtoLPosition(const Double_t g0[3],Double_t l[3]){
306 ////////////////////////////////////////////////////////////////////////
307 // Returns the local coordinates given the global coordinates [cm].
308 ////////////////////////////////////////////////////////////////////////
312 for(i=0;i<3;i++) g[i] = g0[i] - ftran[i];
315 for(j=0;j<3;j++) l[i] += fm[i][j]*g[j];
316 // g = R l + translation
320 //----------------------------------------------------------------------
321 void AliITSgeomMatrix::LtoGPosition(const Double_t l[3],Double_t g[3]){
322 ////////////////////////////////////////////////////////////////////////
323 // Returns the global coordinates given the local coordinates [cm].
324 ////////////////////////////////////////////////////////////////////////
329 for(j=0;j<3;j++) g[i] += fm[j][i]*l[j];
331 // g = R^t l + translation
335 //----------------------------------------------------------------------
336 void AliITSgeomMatrix::GtoLMomentum(const Double_t g[3],Double_t l[3]){
337 ////////////////////////////////////////////////////////////////////////
338 // Returns the local coordinates of the momentum given the global
339 // coordinates of the momentum. It transforms just like GtoLPosition
340 // except that the translation vector is zero.
341 ////////////////////////////////////////////////////////////////////////
346 for(j=0;j<3;j++) l[i] += fm[i][j]*g[j];
351 //----------------------------------------------------------------------
352 void AliITSgeomMatrix::LtoGMomentum(const Double_t l[3],Double_t g[3]){
353 ////////////////////////////////////////////////////////////////////////
354 // Returns the Global coordinates of the momentum given the local
355 // coordinates of the momentum. It transforms just like LtoGPosition
356 // except that the translation vector is zero.
357 ////////////////////////////////////////////////////////////////////////
362 for(j=0;j<3;j++) g[i] += fm[j][i]*l[j];
367 //----------------------------------------------------------------------
368 void AliITSgeomMatrix::GtoLPositionError(Double_t g[3][3],
370 ////////////////////////////////////////////////////////////////////////
371 // Given an Uncertainty matrix in Global coordinates it is rotated so that
372 // its representation in local coordinates can be returned. There is no
373 // effect due to the translation vector or its uncertainty.
374 ////////////////////////////////////////////////////////////////////////
377 for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)for(m=0;m<3;m++)
378 l[i][m] = fm[j][i]*g[j][k]*fm[k][m];
382 //----------------------------------------------------------------------
383 void AliITSgeomMatrix::LtoGPositionError(Double_t l[3][3],
385 ////////////////////////////////////////////////////////////////////////
386 // Given an Uncertainty matrix in Local coordinates it is rotated so that
387 // its representation in global coordinates can be returned. There is no
388 // effect due to the translation vector or its uncertainty.
389 ////////////////////////////////////////////////////////////////////////
392 for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)for(m=0;m<3;m++)
393 g[i][m] = fm[i][j]*l[j][k]*fm[m][k];
397 //----------------------------------------------------------------------
398 void AliITSgeomMatrix::GtoLPositionTracking(const Double_t g0[3],
400 ////////////////////////////////////////////////////////////////////////
401 // A slightly different coordinate system is used when tracking.
402 // This coordinate system is only relevant when the geometry represents
403 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
404 // alone but X -> -Y and Y -> X such that X always points out of the
405 // ITS Cylinder for every layer including layer 1 (where the detector
406 // are mounted upside down).
409 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
412 ////////////////////////////////////////////////////////////////////////
415 this->GtoLPosition(g0,l0);
416 if(fid[0]==1){ // for layer 1 the detector are flipped upside down
417 // with respect to the others.
428 //----------------------------------------------------------------------
429 void AliITSgeomMatrix::LtoGPositionTracking(const Double_t l[3],
431 ////////////////////////////////////////////////////////////////////////
432 // A slightly different coordinate system is used when tracking.
433 // This coordinate system is only relevant when the geometry represents
434 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
435 // alone but X -> -Y and Y -> X such that X always points out of the
436 // ITS Cylinder for every layer including layer 1 (where the detector
437 // are mounted upside down).
440 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
443 ////////////////////////////////////////////////////////////////////////
446 if(fid[0]==1){ // for layer 1 the detector are flipped upside down
447 // with respect to the others.
456 this->LtoGPosition(l0,g);
459 //----------------------------------------------------------------------
460 void AliITSgeomMatrix::GtoLMomentumTracking(const Double_t g[3],
462 ////////////////////////////////////////////////////////////////////////
463 // A slightly different coordinate system is used when tracking.
464 // This coordinate system is only relevant when the geometry represents
465 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
466 // alone but X -> -Y and Y -> X such that X always points out of the
467 // ITS Cylinder for every layer including layer 1 (where the detector
468 // are mounted upside down).
471 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
474 ////////////////////////////////////////////////////////////////////////
477 this->GtoLMomentum(g,l0);
478 if(fid[0]==1){ // for layer 1 the detector are flipped upside down
479 // with respect to the others.
491 //----------------------------------------------------------------------
492 void AliITSgeomMatrix::LtoGMomentumTracking(const Double_t l[3],
494 ////////////////////////////////////////////////////////////////////////
495 // A slightly different coordinate system is used when tracking.
496 // This coordinate system is only relevant when the geometry represents
497 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
498 // alone but X -> -Y and Y -> X such that X always points out of the
499 // ITS Cylinder for every layer including layer 1 (where the detector
500 // are mounted upside down).
503 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
506 ////////////////////////////////////////////////////////////////////////
509 if(fid[0]==1){ // for layer 1 the detector are flipped upside down
510 // with respect to the others.
519 this->LtoGMomentum(l0,g);
522 //----------------------------------------------------------------------
523 void AliITSgeomMatrix::GtoLPositionErrorTracking(Double_t g[3][3],
525 ////////////////////////////////////////////////////////////////////////
526 // A slightly different coordinate system is used when tracking.
527 // This coordinate system is only relevant when the geometry represents
528 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
529 // alone but X -> -Y and Y -> X such that X always points out of the
530 // ITS Cylinder for every layer including layer 1 (where the detector
531 // are mounted upside down).
534 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
537 ////////////////////////////////////////////////////////////////////////
540 Double_t A0[3][3] = {{0.,+1.,0.},{-1.,0.,0.},{0.,0.,+1.}};
541 Double_t A1[3][3] = {{0.,-1.,0.},{+1.,0.,0.},{0.,0.,+1.}};
543 if(fid[0]==1) for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)
544 Rt[i][k] = A0[i][j]*fm[j][k];
545 else for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)
546 Rt[i][k] = A1[i][j]*fm[j][k];
547 for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)for(m=0;m<3;m++)
548 l[i][m] = Rt[j][i]*g[j][k]*Rt[k][m];
552 //----------------------------------------------------------------------
553 void AliITSgeomMatrix::LtoGPositionErrorTracking(Double_t l[3][3],
555 ////////////////////////////////////////////////////////////////////////
556 // A slightly different coordinate system is used when tracking.
557 // This coordinate system is only relevant when the geometry represents
558 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
559 // alone but X -> -Y and Y -> X such that X always points out of the
560 // ITS Cylinder for every layer including layer 1 (where the detector
561 // are mounted upside down).
564 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
567 ////////////////////////////////////////////////////////////////////////
570 Double_t A0[3][3] = {{0.,+1.,0.},{-1.,0.,0.},{0.,0.,+1.}};
571 Double_t A1[3][3] = {{0.,-1.,0.},{+1.,0.,0.},{0.,0.,+1.}};
573 if(fid[0]==1) for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)
574 Rt[i][k] = A0[i][j]*fm[j][k];
575 else for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)
576 Rt[i][k] = A1[i][j]*fm[j][k];
577 for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)for(m=0;m<3;m++)
578 g[i][m] = Rt[i][j]*l[j][k]*Rt[m][k];
582 //----------------------------------------------------------------------
583 void AliITSgeomMatrix::PrintTitles(ostream *os){
584 ////////////////////////////////////////////////////////////////////////
585 // Standard output format for this class but it includes variable
586 // names and formatting that makes it easer to read.
587 ////////////////////////////////////////////////////////////////////////
590 *os << "fDetectorIndex=" << fDetectorIndex << " fid[3]={";
591 for(i=0;i<3;i++) *os << fid[i] << " ";
592 *os << "} frot[3]={";
593 for(i=0;i<3;i++) *os << frot[i] << " ";
594 *os << "} ftran[3]={";
595 for(i=0;i<3;i++) *os << ftran[i] << " ";
596 *os << "} fm[3][3]={";
597 for(i=0;i<3;i++){for(j=0;j<3;j++){ *os << fm[i][j] << " ";} *os <<"}{";}
601 //----------------------------------------------------------------------
602 void AliITSgeomMatrix::print(ostream *os){
603 ////////////////////////////////////////////////////////////////////////
604 // Standard output format for this class.
605 ////////////////////////////////////////////////////////////////////////
608 *os << fDetectorIndex << " ";
609 for(i=0;i<3;i++) *os << fid[i] << " ";
610 for(i=0;i<3;i++) *os << frot[i] << " ";
611 for(i=0;i<3;i++) *os << ftran[i] << " ";
612 for(i=0;i<3;i++)for(j=0;j<3;j++) *os << fm[i][j] << " ";
616 //----------------------------------------------------------------------
617 void AliITSgeomMatrix::read(istream *is){
618 ////////////////////////////////////////////////////////////////////////
619 // Standard input format for this class.
620 ////////////////////////////////////////////////////////////////////////
623 *is >> fDetectorIndex;
624 for(i=0;i<3;i++) *is >> fid[i];
625 for(i=0;i<3;i++) *is >> frot[i];
626 for(i=0;i<3;i++) *is >> ftran[i];
627 for(i=0;i<3;i++)for(j=0;j<3;j++) *is >> fm[i][j];
630 //----------------------------------------------------------------------
631 ostream &operator<<(ostream &os,AliITSgeomMatrix &p){
632 ////////////////////////////////////////////////////////////////////////
633 // Standard output streaming function.
634 ////////////////////////////////////////////////////////////////////////
639 //----------------------------------------------------------------------
640 istream &operator>>(istream &is,AliITSgeomMatrix &r){
641 ////////////////////////////////////////////////////////////////////////
642 // Standard input streaming function.
643 ////////////////////////////////////////////////////////////////////////
648 //----------------------------------------------------------------------
649 void AliITSgeomMatrix::Streamer(TBuffer &R__b){
650 ////////////////////////////////////////////////////////////////////////
651 // Stream an object of class AliITSgeomMatrix.
652 ////////////////////////////////////////////////////////////////////////
655 if (R__b.IsReading()) {
656 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
658 R__b >> fDetectorIndex;
659 R__b.ReadStaticArray(fid);
660 R__b.ReadStaticArray(frot);
661 R__b.ReadStaticArray(ftran);
662 R__b.ReadStaticArray((double*)fm);
663 R__b.CheckByteCount(R__s, R__c, AliITSgeomMatrix::IsA());
665 } else { // R__b.IsWriting()
666 R__c = R__b.WriteVersion(AliITSgeomMatrix::IsA(), kTRUE);
667 R__b << fDetectorIndex;
668 R__b.WriteArray(fid, 3);
669 R__b.WriteArray(frot, 3);
670 R__b.WriteArray(ftran, 3);
671 R__b.WriteArray((double*)fm, 9);
672 R__b.SetByteCount(R__c, kTRUE);
673 } // end if R__b.IsReading()||IsWriting()
675 //______________________________________________________________________