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.1.2.6 2000/10/02 15:52:05 barbera
19 Forward declaration added
21 Revision 1.4 2000/09/07 17:30:45 nilsen
22 fixed a bug in SixAnglesFromMatrix.
24 Revision 1.3 2000/09/05 14:25:50 nilsen
25 Made fixes for HP compiler. All function parameter default values placed
26 in .h file. Fixed the usual problem with HP comilers and the "for(Int_t i..."
27 business. Replaced casting (Double_t [3][3]) to (Double_t (*)[3]) for HP.
28 Lastly removed all "const" before function parameters which were 2 dim. arrays,
29 because on HP root generates some strange code (?). Thanks Peter for the
32 Revision 1.2 2000/08/29 20:16:50 nilsen
33 New class for ITS coordiante transformations used by AliITSgeom nearly
36 Revision 1.1.2.1 2000/06/04 16:32:31 Nilsen
37 A new class to hold the matrix information needed by AliITSgeom.
44 #include "AliITSgeomMatrix.h"
46 ClassImp(AliITSgeomMatrix)
47 //----------------------------------------------------------------------
48 AliITSgeomMatrix::AliITSgeomMatrix(){
49 ////////////////////////////////////////////////////////////////////////
50 // The Default constructor for the AliITSgeomMatrix class. By Default
51 // the angles of rotations are set to zero, meaning that the rotation
52 // matrix is the unit matrix. The translation vector is also set to zero
53 // as are the module id number. The detector type is set to -1 (an undefined
54 // value). The full rotation matrix is kept so that the evaluation
55 // of a coordinate transformation can be done quickly and with a minimum
56 // of CPU overhead. The basic coordinate systems are the ALICE global
57 // coordinate system and the detector local coordinate system. In general
58 // this structure is not limited to just those two coordinate systems.
61 <img src="picts/ITS/AliISgeomMatrix_L1.gif">
64 ////////////////////////////////////////////////////////////////////////
67 fDetectorIndex = -1; // a value never defined.
70 frot[i] = ftran[i] = 0.0;
71 for(j=0;j<3;j++) fm[i][j] = 0.0;
73 fm[0][0] = fm[1][1] = fm[2][2] = 1.0;
75 //----------------------------------------------------------------------
76 AliITSgeomMatrix::AliITSgeomMatrix(const AliITSgeomMatrix &sourse){
77 ////////////////////////////////////////////////////////////////////////
78 // The standard copy constructor. This make a full / proper copy of
80 ////////////////////////////////////////////////////////////////////////
83 this->fDetectorIndex = sourse.fDetectorIndex;
85 this->fid[i] = sourse.fid[i];
86 this->frot[i] = sourse.frot[i];
87 this->ftran[i] = sourse.ftran[i];
88 for(j=0;j<3;j++) this->fm[i][j] = sourse.fm[i][j];
91 //----------------------------------------------------------------------
92 void AliITSgeomMatrix::operator=(const AliITSgeomMatrix &sourse){
93 ////////////////////////////////////////////////////////////////////////
94 // The standard = operator. This make a full / proper copy of
96 ////////////////////////////////////////////////////////////////////////
99 this->fDetectorIndex = sourse.fDetectorIndex;
101 this->fid[i] = sourse.fid[i];
102 this->frot[i] = sourse.frot[i];
103 this->ftran[i] = sourse.ftran[i];
104 for(j=0;j<3;j++) this->fm[i][j] = sourse.fm[i][j];
107 //----------------------------------------------------------------------
108 AliITSgeomMatrix::AliITSgeomMatrix(const Int_t idt,const Int_t id[3],
109 const Double_t rot[3],const Double_t tran[3]){
110 ////////////////////////////////////////////////////////////////////////
111 // This is a constructor for the AliITSgeomMatrix class. The matrix is
112 // defined by 3 standard rotation angles [radians], and the translation
113 // vector tran [cm]. In addition the layer, ladder, and detector number
114 // for this particular module and the type of module must be given.
115 // The full rotation matrix is kept so that the evaluation
116 // of a coordinate transformation can be done quickly and with a minimum
117 // of CPU overhead. The basic coordinate systems are the ALICE global
118 // coordinate system and the detector local coordinate system. In general
119 // this structure is not limited to just those two coordinate systems.
122 <img src="picts/ITS/AliISgeomMatrix_L1.gif">
125 ////////////////////////////////////////////////////////////////////////
128 fDetectorIndex = idt; // a value never defined.
134 this->MatrixFromAngle();
136 //----------------------------------------------------------------------
137 AliITSgeomMatrix::AliITSgeomMatrix(const Int_t idt, const Int_t id[3],
138 Double_t matrix[3][3],
139 const Double_t tran[3]){
140 ////////////////////////////////////////////////////////////////////////
141 // This is a constructor for the AliITSgeomMatrix class. The rotation matrix
142 // is given as one of the inputs, and the translation vector tran [cm]. In
143 // addition the layer, ladder, and detector number for this particular
144 // module and the type of module must be given. The full rotation matrix
145 // is kept so that the evaluation of a coordinate transformation can be
146 // done quickly and with a minimum of CPU overhead. The basic coordinate
147 // systems are the ALICE global coordinate system and the detector local
148 // coordinate system. In general this structure is not limited to just
149 // those two coordinate systems.
152 <img src="picts/ITS/AliISgeomMatrix_L1.gif">
155 ////////////////////////////////////////////////////////////////////////
158 fDetectorIndex = idt; // a value never defined.
162 for(j=0;j<3;j++) fm[i][j] = matrix[i][j];
164 this->AngleFromMatrix();
166 //----------------------------------------------------------------------
167 void AliITSgeomMatrix::SixAnglesFromMatrix(Double_t *ang){
168 ////////////////////////////////////////////////////////////////////////
169 // This function returns the 6 GEANT 3.21 rotation angles [degrees] in
170 // the array ang which must be at least [6] long.
171 ////////////////////////////////////////////////////////////////////////
172 Double_t si,c=180./TMath::Pi();
174 ang[1] = TMath::ATan2(fm[0][1],fm[0][0]);
175 if(TMath::Cos(ang[1])!=0.0) si = fm[0][0]/TMath::Cos(ang[1]);
176 else si = fm[0][1]/TMath::Sin(ang[1]);
177 ang[0] = TMath::ATan2(si,fm[0][2]);
179 ang[3] = TMath::ATan2(fm[1][1],fm[1][0]);
180 if(TMath::Cos(ang[3])!=0.0) si = fm[1][0]/TMath::Cos(ang[3]);
181 else si = fm[1][1]/TMath::Sin(ang[3]);
182 ang[2] = TMath::ATan2(si,fm[1][2]);
184 ang[5] = TMath::ATan2(fm[2][1],fm[2][0]);
185 if(TMath::Cos(ang[5])!=0.0) si = fm[2][0]/TMath::Cos(ang[5]);
186 else si = fm[2][1]/TMath::Sin(ang[5]);
187 ang[4] = TMath::ATan2(si,fm[2][2]);
189 for(Int_t i=0;i<6;i++) {ang[i] *= c; if(ang[i]<0.0) ang[i] += 360.;}
191 //----------------------------------------------------------------------
192 void AliITSgeomMatrix::MatrixFromSixAngles(const Double_t *ang){
193 ////////////////////////////////////////////////////////////////////////
194 // Given the 6 GEANT 3.21 rotation angles [degree], this will compute and
195 // set the rotations matrix and 3 standard rotation angles [radians].
196 // These angles and rotation matrix are overwrite the existing values in
198 ////////////////////////////////////////////////////////////////////////
200 Double_t si,lr[9],c=TMath::Pi()/180.;
202 si = TMath::Sin(c*ang[0]);
203 if(ang[0]== 90.0) si = +1.0;
204 if(ang[0]==270.0) si = -1.0;
205 if(ang[0]== 0.0||ang[0]==180.) si = 0.0;
206 lr[0] = si * TMath::Cos(c*ang[1]);
207 lr[1] = si * TMath::Sin(c*ang[1]);
208 lr[2] = TMath::Cos(c*ang[0]);
209 if(ang[0]== 90.0||ang[0]==270.) lr[2] = 0.0;
210 if(ang[0]== 0.0) lr[2] = +1.0;
211 if(ang[0]==180.0) lr[2] = -1.0;
213 si = TMath::Sin(c*ang[2]);
214 if(ang[2]== 90.0) si = +1.0;
215 if(ang[2]==270.0) si = -1.0;
216 if(ang[2]== 0.0||ang[2]==180.) si = 0.0;
217 lr[3] = si * TMath::Cos(c*ang[3]);
218 lr[4] = si * TMath::Sin(c*ang[3]);
219 lr[5] = TMath::Cos(c*ang[2]);
220 if(ang[2]== 90.0||ang[2]==270.) lr[5] = 0.0;
221 if(ang[2]== 0.0) lr[5] = +1.0;
222 if(ang[2]==180.0) lr[5] = -1.0;
224 si = TMath::Sin(c*ang[4]);
225 if(ang[4]== 90.0) si = +1.0;
226 if(ang[4]==270.0) si = -1.0;
227 if(ang[4]== 0.0||ang[4]==180.) si = 0.0;
228 lr[6] = si * TMath::Cos(c*ang[5]);
229 lr[7] = si * TMath::Sin(c*ang[5]);
230 lr[8] = TMath::Cos(c*ang[4]);
231 if(ang[4]== 90.0||ang[4]==270.0) lr[8] = 0.0;
232 if(ang[4]== 0.0) lr[8] = +1.0;
233 if(ang[4]==180.0) lr[8] = -1.0;
234 // Normalize these elements and fill matrix fm.
235 for(i=0;i<3;i++){// reuse si.
237 for(j=0;j<3;j++) si += lr[3*i+j]*lr[3*i+j];
238 si = TMath::Sqrt(1./si);
239 for(j=0;j<3;j++) fm[i][j] = si*lr[3*i+j];
241 this->AngleFromMatrix();
243 //----------------------------------------------------------------------
244 AliITSgeomMatrix::AliITSgeomMatrix(const Double_t rotd[6]/*degrees*/,
245 const Int_t idt,const Int_t id[3],
246 const Double_t tran[3]){
247 ////////////////////////////////////////////////////////////////////////
248 // This is a constructor for the AliITSgeomMatrix class. The matrix is
249 // defined by the 6 GEANT 3.21 rotation angles [degrees], and the translation
250 // vector tran [cm]. In addition the layer, ladder, and detector number
251 // for this particular module and the type of module must be given.
252 // The full rotation matrix is kept so that the evaluation
253 // of a coordinate transformation can be done quickly and with a minimum
254 // of CPU overhead. The basic coordinate systems are the ALICE global
255 // coordinate system and the detector local coordinate system. In general
256 // this structure is not limited to just those two coordinate systems.
259 <img src="picts/ITS/AliISgeomMatrix_L1.gif">
262 ////////////////////////////////////////////////////////////////////////
265 fDetectorIndex = idt; // a value never defined.
270 this->MatrixFromSixAngles(rotd);
272 //----------------------------------------------------------------------
273 void AliITSgeomMatrix::AngleFromMatrix(){
274 ////////////////////////////////////////////////////////////////////////
275 // Computes the angles from the rotation matrix up to a phase of 180 degrees.
276 ////////////////////////////////////////////////////////////////////////
278 // get angles from matrix up to a phase of 180 degrees.
280 rx = TMath::ATan2(fm[2][1],fm[2][2]);if(rx<0.0) rx += 2.0*TMath::Pi();
281 ry = TMath::ASin(fm[0][2]); if(ry<0.0) ry += 2.0*TMath::Pi();
282 rz = TMath::ATan2(fm[1][1],fm[0][0]);if(rz<0.0) rz += 2.0*TMath::Pi();
288 //----------------------------------------------------------------------
289 void AliITSgeomMatrix::MatrixFromAngle(){
290 ////////////////////////////////////////////////////////////////////////
291 // Computes the Rotation matrix from the angles [radians] kept in this
293 ////////////////////////////////////////////////////////////////////////
294 Double_t sx,sy,sz,cx,cy,cz;
296 sx = TMath::Sin(frot[0]); cx = TMath::Cos(frot[0]);
297 sy = TMath::Sin(frot[1]); cy = TMath::Cos(frot[1]);
298 sz = TMath::Sin(frot[2]); cz = TMath::Cos(frot[2]);
299 fm[0][0] = cz*cy; // fr[0]
300 fm[0][1] = -cz*sy*sx - sz*cx; // fr[1]
301 fm[0][2] = -cz*sy*cx + sz*sx; // fr[2]
302 fm[1][0] = sz*cy; // fr[3]
303 fm[1][1] = -sz*sy*sx + cz*cx; // fr[4]
304 fm[1][2] = -sz*sy*cx - cz*sx; // fr[5]
305 fm[2][0] = sy; // fr[6]
306 fm[2][1] = cy*sx; // fr[7]
307 fm[2][2] = cy*cx; // fr[8]
310 //----------------------------------------------------------------------
311 void AliITSgeomMatrix::GtoLPosition(const Double_t g0[3],Double_t l[3]){
312 ////////////////////////////////////////////////////////////////////////
313 // Returns the local coordinates given the global coordinates [cm].
314 ////////////////////////////////////////////////////////////////////////
318 for(i=0;i<3;i++) g[i] = g0[i] - ftran[i];
321 for(j=0;j<3;j++) l[i] += fm[i][j]*g[j];
322 // g = R l + translation
326 //----------------------------------------------------------------------
327 void AliITSgeomMatrix::LtoGPosition(const Double_t l[3],Double_t g[3]){
328 ////////////////////////////////////////////////////////////////////////
329 // Returns the global coordinates given the local coordinates [cm].
330 ////////////////////////////////////////////////////////////////////////
335 for(j=0;j<3;j++) g[i] += fm[j][i]*l[j];
337 // g = R^t l + translation
341 //----------------------------------------------------------------------
342 void AliITSgeomMatrix::GtoLMomentum(const Double_t g[3],Double_t l[3]){
343 ////////////////////////////////////////////////////////////////////////
344 // Returns the local coordinates of the momentum given the global
345 // coordinates of the momentum. It transforms just like GtoLPosition
346 // except that the translation vector is zero.
347 ////////////////////////////////////////////////////////////////////////
352 for(j=0;j<3;j++) l[i] += fm[i][j]*g[j];
357 //----------------------------------------------------------------------
358 void AliITSgeomMatrix::LtoGMomentum(const Double_t l[3],Double_t g[3]){
359 ////////////////////////////////////////////////////////////////////////
360 // Returns the Global coordinates of the momentum given the local
361 // coordinates of the momentum. It transforms just like LtoGPosition
362 // except that the translation vector is zero.
363 ////////////////////////////////////////////////////////////////////////
368 for(j=0;j<3;j++) g[i] += fm[j][i]*l[j];
373 //----------------------------------------------------------------------
374 void AliITSgeomMatrix::GtoLPositionError(Double_t g[3][3],
376 ////////////////////////////////////////////////////////////////////////
377 // Given an Uncertainty matrix in Global coordinates it is rotated so that
378 // its representation in local coordinates can be returned. There is no
379 // effect due to the translation vector or its uncertainty.
380 ////////////////////////////////////////////////////////////////////////
383 for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)for(m=0;m<3;m++)
384 l[i][m] = fm[j][i]*g[j][k]*fm[k][m];
388 //----------------------------------------------------------------------
389 void AliITSgeomMatrix::LtoGPositionError(Double_t l[3][3],
391 ////////////////////////////////////////////////////////////////////////
392 // Given an Uncertainty matrix in Local coordinates it is rotated so that
393 // its representation in global coordinates can be returned. There is no
394 // effect due to the translation vector or its uncertainty.
395 ////////////////////////////////////////////////////////////////////////
398 for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)for(m=0;m<3;m++)
399 g[i][m] = fm[i][j]*l[j][k]*fm[m][k];
403 //----------------------------------------------------------------------
404 void AliITSgeomMatrix::GtoLPositionTracking(const Double_t g0[3],
406 ////////////////////////////////////////////////////////////////////////
407 // A slightly different coordinate system is used when tracking.
408 // This coordinate system is only relevant when the geometry represents
409 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
410 // alone but X -> -Y and Y -> X such that X always points out of the
411 // ITS Cylinder for every layer including layer 1 (where the detector
412 // are mounted upside down).
415 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
418 ////////////////////////////////////////////////////////////////////////
421 this->GtoLPosition(g0,l0);
422 if(fid[0]==1){ // for layer 1 the detector are flipped upside down
423 // with respect to the others.
434 //----------------------------------------------------------------------
435 void AliITSgeomMatrix::LtoGPositionTracking(const Double_t l[3],
437 ////////////////////////////////////////////////////////////////////////
438 // A slightly different coordinate system is used when tracking.
439 // This coordinate system is only relevant when the geometry represents
440 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
441 // alone but X -> -Y and Y -> X such that X always points out of the
442 // ITS Cylinder for every layer including layer 1 (where the detector
443 // are mounted upside down).
446 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
449 ////////////////////////////////////////////////////////////////////////
452 if(fid[0]==1){ // for layer 1 the detector are flipped upside down
453 // with respect to the others.
462 this->LtoGPosition(l0,g);
465 //----------------------------------------------------------------------
466 void AliITSgeomMatrix::GtoLMomentumTracking(const Double_t g[3],
468 ////////////////////////////////////////////////////////////////////////
469 // A slightly different coordinate system is used when tracking.
470 // This coordinate system is only relevant when the geometry represents
471 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
472 // alone but X -> -Y and Y -> X such that X always points out of the
473 // ITS Cylinder for every layer including layer 1 (where the detector
474 // are mounted upside down).
477 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
480 ////////////////////////////////////////////////////////////////////////
483 this->GtoLMomentum(g,l0);
484 if(fid[0]==1){ // for layer 1 the detector are flipped upside down
485 // with respect to the others.
497 //----------------------------------------------------------------------
498 void AliITSgeomMatrix::LtoGMomentumTracking(const Double_t l[3],
500 ////////////////////////////////////////////////////////////////////////
501 // A slightly different coordinate system is used when tracking.
502 // This coordinate system is only relevant when the geometry represents
503 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
504 // alone but X -> -Y and Y -> X such that X always points out of the
505 // ITS Cylinder for every layer including layer 1 (where the detector
506 // are mounted upside down).
509 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
512 ////////////////////////////////////////////////////////////////////////
515 if(fid[0]==1){ // for layer 1 the detector are flipped upside down
516 // with respect to the others.
525 this->LtoGMomentum(l0,g);
528 //----------------------------------------------------------------------
529 void AliITSgeomMatrix::GtoLPositionErrorTracking(Double_t g[3][3],
531 ////////////////////////////////////////////////////////////////////////
532 // A slightly different coordinate system is used when tracking.
533 // This coordinate system is only relevant when the geometry represents
534 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
535 // alone but X -> -Y and Y -> X such that X always points out of the
536 // ITS Cylinder for every layer including layer 1 (where the detector
537 // are mounted upside down).
540 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
543 ////////////////////////////////////////////////////////////////////////
546 Double_t A0[3][3] = {{0.,+1.,0.},{-1.,0.,0.},{0.,0.,+1.}};
547 Double_t A1[3][3] = {{0.,-1.,0.},{+1.,0.,0.},{0.,0.,+1.}};
549 if(fid[0]==1) for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)
550 Rt[i][k] = A0[i][j]*fm[j][k];
551 else for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)
552 Rt[i][k] = A1[i][j]*fm[j][k];
553 for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)for(m=0;m<3;m++)
554 l[i][m] = Rt[j][i]*g[j][k]*Rt[k][m];
558 //----------------------------------------------------------------------
559 void AliITSgeomMatrix::LtoGPositionErrorTracking(Double_t l[3][3],
561 ////////////////////////////////////////////////////////////////////////
562 // A slightly different coordinate system is used when tracking.
563 // This coordinate system is only relevant when the geometry represents
564 // the cylindrical ALICE ITS geometry. For tracking the Z axis is left
565 // alone but X -> -Y and Y -> X such that X always points out of the
566 // ITS Cylinder for every layer including layer 1 (where the detector
567 // are mounted upside down).
570 <img src="picts/ITS/AliITSgeomMatrix_T1.gif">
573 ////////////////////////////////////////////////////////////////////////
576 Double_t A0[3][3] = {{0.,+1.,0.},{-1.,0.,0.},{0.,0.,+1.}};
577 Double_t A1[3][3] = {{0.,-1.,0.},{+1.,0.,0.},{0.,0.,+1.}};
579 if(fid[0]==1) for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)
580 Rt[i][k] = A0[i][j]*fm[j][k];
581 else for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)
582 Rt[i][k] = A1[i][j]*fm[j][k];
583 for(i=0;i<3;i++)for(j=0;j<3;j++)for(k=0;k<3;k++)for(m=0;m<3;m++)
584 g[i][m] = Rt[i][j]*l[j][k]*Rt[m][k];
588 //----------------------------------------------------------------------
589 void AliITSgeomMatrix::PrintTitles(ostream *os){
590 ////////////////////////////////////////////////////////////////////////
591 // Standard output format for this class but it includes variable
592 // names and formatting that makes it easer to read.
593 ////////////////////////////////////////////////////////////////////////
596 *os << "fDetectorIndex=" << fDetectorIndex << " fid[3]={";
597 for(i=0;i<3;i++) *os << fid[i] << " ";
598 *os << "} frot[3]={";
599 for(i=0;i<3;i++) *os << frot[i] << " ";
600 *os << "} ftran[3]={";
601 for(i=0;i<3;i++) *os << ftran[i] << " ";
602 *os << "} fm[3][3]={";
603 for(i=0;i<3;i++){for(j=0;j<3;j++){ *os << fm[i][j] << " ";} *os <<"}{";}
607 //----------------------------------------------------------------------
608 void AliITSgeomMatrix::print(ostream *os){
609 ////////////////////////////////////////////////////////////////////////
610 // Standard output format for this class.
611 ////////////////////////////////////////////////////////////////////////
614 *os << fDetectorIndex << " ";
615 for(i=0;i<3;i++) *os << fid[i] << " ";
616 for(i=0;i<3;i++) *os << frot[i] << " ";
617 for(i=0;i<3;i++) *os << ftran[i] << " ";
618 for(i=0;i<3;i++)for(j=0;j<3;j++) *os << fm[i][j] << " ";
622 //----------------------------------------------------------------------
623 void AliITSgeomMatrix::read(istream *is){
624 ////////////////////////////////////////////////////////////////////////
625 // Standard input format for this class.
626 ////////////////////////////////////////////////////////////////////////
629 *is >> fDetectorIndex;
630 for(i=0;i<3;i++) *is >> fid[i];
631 for(i=0;i<3;i++) *is >> frot[i];
632 for(i=0;i<3;i++) *is >> ftran[i];
633 for(i=0;i<3;i++)for(j=0;j<3;j++) *is >> fm[i][j];
636 //----------------------------------------------------------------------
637 ostream &operator<<(ostream &os,AliITSgeomMatrix &p){
638 ////////////////////////////////////////////////////////////////////////
639 // Standard output streaming function.
640 ////////////////////////////////////////////////////////////////////////
645 //----------------------------------------------------------------------
646 istream &operator>>(istream &is,AliITSgeomMatrix &r){
647 ////////////////////////////////////////////////////////////////////////
648 // Standard input streaming function.
649 ////////////////////////////////////////////////////////////////////////
654 //----------------------------------------------------------------------
655 void AliITSgeomMatrix::Streamer(TBuffer &R__b){
656 ////////////////////////////////////////////////////////////////////////
657 // Stream an object of class AliITSgeomMatrix.
658 ////////////////////////////////////////////////////////////////////////
661 if (R__b.IsReading()) {
662 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
664 R__b >> fDetectorIndex;
665 R__b.ReadStaticArray(fid);
666 R__b.ReadStaticArray(frot);
667 R__b.ReadStaticArray(ftran);
668 R__b.ReadStaticArray((double*)fm);
669 R__b.CheckByteCount(R__s, R__c, AliITSgeomMatrix::IsA());
671 } else { // R__b.IsWriting()
672 R__c = R__b.WriteVersion(AliITSgeomMatrix::IsA(), kTRUE);
673 R__b << fDetectorIndex;
674 R__b.WriteArray(fid, 3);
675 R__b.WriteArray(frot, 3);
676 R__b.WriteArray(ftran, 3);
677 R__b.WriteArray((double*)fm, 9);
678 R__b.SetByteCount(R__c, kTRUE);
679 } // end if R__b.IsReading()||IsWriting()
681 //______________________________________________________________________