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 **************************************************************************/
19 A base geometry class defining all of the ITS volumes that make up an ITS
23 Created February 2003.
26 #include <Riostream.h>
31 #include <TGeometry.h>
37 #include <TFile.h> // only required for Tracking function?
39 #include <TObjArray.h>
40 #include <TLorentzVector.h>
41 #include <TObjString.h>
42 #include <TClonesArray.h>
48 #include "AliITSBaseGeometry.h"
50 ClassImp(AliITSBaseGeometry)
52 const Double_t AliITSBaseGeometry::fAlpha = 7.297352533e-3;
53 const Double_t AliITSBaseGeometry::fRe = 2.81794028e-13;
54 const Double_t AliITSBaseGeometry::fNa = 6.02214199e+23;
55 Int_t AliITSBaseGeometry::fNCreates = 0;
56 Int_t* AliITSBaseGeometry::fidrot = 0;
57 Int_t AliITSBaseGeometry::fidrotsize = 0;
58 Int_t AliITSBaseGeometry::fidrotlast = 0;
59 Int_t AliITSBaseGeometry::fVolNameSize = 0;
60 Int_t AliITSBaseGeometry::fVolNameLast = 0;
61 TString* AliITSBaseGeometry::fVolName = 0;
63 //______________________________________________________________________
64 AliITSBaseGeometry::AliITSBaseGeometry(){
65 // Default construtor for the ITS Base Geometry class.
73 fScale = 1.0; // Default value.
74 fits = 0; // zero pointers.
75 if(fNCreates==0){ // only for very first init
77 fNCreates++; // incrament this creation counter.
79 //______________________________________________________________________
80 AliITSBaseGeometry::AliITSBaseGeometry(AliModule *its,Int_t iflag){
81 // Standard construtor for the ITS Base Geometry class.
83 // Int_t iflag flag to indecate specific swiches in the geometry
89 fScale = 1.0; // Default value.
90 fits = its; // get a copy of the pointer to the ITS.
91 if(fNCreates==0){ // only for very first init
92 fidrotsize = ITSG3VnameToIndex("TSV")+1;
93 fidrot = new Int_t[fidrotsize];
96 fNCreates++; // incrament this creation counter.
98 //______________________________________________________________________
99 AliITSBaseGeometry::~AliITSBaseGeometry(){
100 // Standeard destructor for the ITS Base Geometry class.
102 // Int_t iflag flag to indecate specific swiches in the geometry
108 fits = 0; // This class does not own this class. It contaitns a pointer
109 // to it for conveniance.
111 if(fNCreates==0){ // Now delete the static members
114 for(i=0;i<fVolNameLast;i++) delete fVolName[i];
120 fidrotsize = fidrotlast = 0;
123 //______________________________________________________________________
124 Int_t AliITSBaseGeometry::AddVolName(const TString name){
125 // Checks if the volume name already exist, if not it adds it to
126 // the list of volume names and returns an index to that volume name.
127 // it will create and expand the array of volume names as needed.
128 // If the volume name already exists, it will give an error message and
129 // return an index <0.
131 // const TString name Volume name to be added to the list.
135 // The index where this volume name is stored.
138 if(fVolName==0){ // must create array.
139 fVolNameSize = 38624;
140 fVolName = new TString[fVolNameSize];
143 for(i=0;i<fVolNameLast;i++) if(fVolName[i].CompareTo(name)==0){ // Error
144 Error("AddVolName","Volume name already exists for volume %d name %s",
148 if(fVolNameSize==fVolNameLast-1){ // Array is full must expand.
149 Int_t size = fVolNameSize*2;
150 TString *old = fVolName;
151 fVolName = new TString[fVolNameSize];
152 for(i=0;i<fVolNameLast;i++) fVolName[i] = old[i];
156 i=ITSIndexToITSG3name(fVolNameLast);
157 if(strcmp((char*)(&i),"ITSV")==0){
158 // Special Reserved Geant 3 volumen name. Skip it
159 // fill it with explination for conveniance.
160 fVolName[fVolNameLast] = "ITS Master Mother Volume";
163 fVolName[fVolNameLast] = name;
165 return fVolNameLast-1; // return the index
167 //______________________________________________________________________
168 Int_t AliITSBaseGeometry::ITSIndexToITSG3name(const Int_t i){
169 // Given the ITS volume index i, it returns the Geant3 ITS volume
170 // name. The valid characters must be in the range
171 // '0' through 'Z'. This will include all upper case letter and the
172 // numbers 0-9. In addition it does not will include the following simbols
175 // const Int_t i the ITS volume index
179 // char[4] with the ITS volume name starting from "I000" to "IZZZ"
180 const Int_t rangen=(Int_t)('9'-'0'+1); // range of numbers
181 const Int_t rangel=(Int_t)('Z'-'A'+1); // range of letters
182 const Int_t range = rangen+rangel; // the number of characters between
185 Byte_t *a = (Byte_t*) &k;
189 a[0] = (Byte_t)('I');
190 a[1] = (Byte_t)('0'+j/(range*range));
191 if(a[1]>'9') a[1] += 'A'-'9'-1;//if it is a letter add in gap for simples.
192 j -= range*range*((Int_t)(j/(range*range)));
193 a[2] = (Byte_t)('0'+j/range);
194 if(a[2]>'9') a[2] += 'A'-'9'-1;//if it is a letter add in gap for simples.
195 j -= range*((Int_t)(j/range));
196 a[3] = (Byte_t)('0'+j);
197 if(a[3]>'9') a[3] += 'A'-'9'-1;//if it is a letter add in gap for simples.
200 //______________________________________________________________________
201 Int_t AliITSBaseGeometry::ITSG3VnameToIndex(const char *name){
202 // Given the last three characters of the ITS Geant3 volume name,
203 // this returns the index. The valid characters must be in the range
204 // '0' through 'Z'. This will include all upper case letter and the
205 // numbers 0-9. In addition it will include the following simbles
208 // const char name[3] The last three characters of the ITS Geant3
214 const Int_t rangen = (Int_t)('9'-'0'+1); // range of numbers
215 const Int_t rangel = (Int_t)('Z'-'A'+1); // range of letters
216 const Int_t range = rangen+rangel; // the number of characters between
221 for(j=k;j>k-3;j--) if(isdigit(name[j])) // number
222 i += (Int_t)((name[j]-'0')*TMath::Power((Double_t)range,
225 i += (Int_t)((name[j]-'A'+rangen)*TMath::Power((Double_t)range,
229 //______________________________________________________________________
230 TString AliITSBaseGeometry::GetVolName(const Int_t i)const{
231 // Returns the volume name at a given index i. Index must be in
232 // range and the array of volume names must exist. If there is an
233 // error, a message is written and 0 is returned.
235 // const Int_t i Index
239 // A TString contianing the ITS volume name.
241 if(i<0||i>=fVolNameLast){
242 Error("GetVolName","Index=%d out of range but be witin 0<%d",i,
248 //______________________________________________________________________
249 Int_t AliITSBaseGeometry::GetVolumeIndex(const TString &a){
250 // Return the index corresponding the the volume name a. If the
251 // Volumen name is not found, return -1, and a warning message given.
253 // const TString &a Name of volume for which index is wanted.
257 // Int_t Index corresponding the volume a. If not found -1 is returned.
260 for(i=0;i<fVolNameLast;i++) if(fVolName[i].CompareTo(a)==0) return i;
261 Info("GetVolumeIndex","Volume name %s not found",a.Data());
264 //______________________________________________________________________
265 void AliITSBaseGeometry::Box(const char *gnam,const TString &dis,
266 Double_t dx,Double_t dy,Double_t dz,Int_t med){
267 // Interface to TMC->Gsvolu() for ITS box geometries. Box with faces
268 // perpendicular to the axes. It has 3 paramters. See SetScale() for
269 // units. Default units are geant 3 [cm].
271 // const char *gnam 3 character geant volume name. The letter "I"
272 // is appended to the front to indecate that this
274 // TString &dis String containging part discription.
275 // Double_t dx half-length of box in x-axis
276 // Double_t dy half-length of box in y-axis
277 // Double_t dz half-length of box in z-axis
278 // Int_t med media index number.
286 param[0] = fScale*dx;
287 param[1] = fScale*dy;
288 param[2] = fScale*dz;
290 gMC->Gsvolu(name,"BOX ",GetMed(med),param,3);
292 //______________________________________________________________________
293 void AliITSBaseGeometry::Box(AliITSBoxData &d,Int_t med){
294 // Interface to TMC->Gsvolu() for ITS box geometries. Box with faces
295 // perpendicular to the axes. It has 3 paramters. See SetScale() for
296 // units. Default units are geant 3 [cm].
298 // AliITSBoxData &d Structure with the Box parameters defined.
299 // Int_t med media index number.
307 char *j = (char *) &k;
309 param[0] = fScale*d.DxAt();
310 param[1] = fScale*d.DyAt();
311 param[2] = fScale*d.DzAt();
312 d.SetVid(AddVolName((d.GetName())->Data()));
313 k = ITSIndexToITSG3name(d.GetVid());
314 for(i=0;i<4;i++) name[i] = j[i];
316 gMC->Gsvolu(name,"BOX ",GetMed(med),param,3);
318 //______________________________________________________________________
319 void AliITSBaseGeometry::Trapezoid1(const char *gnam,const TString &dis,
320 Double_t dxn,Double_t dxp,Double_t dy,
321 Double_t dz,Int_t med){
322 // Interface to TMC->Gsvolu() for ITS TRD1 geometries. Trapezoid with the
323 // x dimension varing along z. It has 4 parameters. See SetScale() for
324 // units. Default units are geant 3 [cm].
326 // const char *gnam 3 character geant volume name. The letter "I"
327 // is appended to the front to indecate that this
329 // TString &dis String containging part discription.
330 // Double_t dxn half-length along x at the z surface positioned
332 // Double_t dxp half-length along x at the z surface positioned
334 // Double_t dy half-length along the y-axis
335 // Double_t dz half-length along the z-axis
336 // Int_t med media index number.
344 param[0] = fScale*dxn;
345 param[1] = fScale*dxp;
346 param[2] = fScale*dy;
347 param[3] = fScale*dz;
349 gMC->Gsvolu(name,"TRD1",GetMed(med),param,4);
351 //______________________________________________________________________
352 void AliITSBaseGeometry::Trapezoid1(AliITSTrapezoid1Data &d,Int_t med){
353 // Interface to TMC->Gsvolu() for ITS TRD1 geometries. Trapezoid with the
354 // x dimension varing along z. It has 4 parameters. See SetScale() for
355 // units. Default units are geant 3 [cm].
357 // AliITSTrapezoid1Data &d Structure with the Trapazoid data in it.
358 // Int_t med media index number.
366 char *j = (char *) &k;
368 param[0] = fScale*d.DxAt(0);
369 param[1] = fScale*d.DxAt(1);
370 param[2] = fScale*d.DyAt();
371 param[3] = fScale*d.DzAt();
372 d.SetVid(AddVolName((d.GetName())->Data()));
373 k = ITSIndexToITSG3name(d.GetVid());
374 for(i=0;i<4;i++) name[i] = j[i];
376 gMC->Gsvolu(name,"TRD1",GetMed(med),param,4);
378 //______________________________________________________________________
379 void AliITSBaseGeometry::Trapezoid2(const char *gnam,const TString &dis,
380 Double_t dxn,Double_t dxp,Double_t dyn,
381 Double_t dyp,Double_t dz,Int_t med){
382 // Interface to TMC->Gsvolu() for ITS TRD2 geometries. Trapezoid with the
383 // x and y dimension varing along z. It has 5 parameters. See SetScale()
384 // for units. Default units are geant 3 [cm].
386 // const char *gnam 3 character geant volume name. The letter "I"
387 // is appended to the front to indecate that this
389 // TString &dis String containging part discription.
390 // Double_t dxn half-length along x at the z surface positioned
392 // Double_t dxp half-length along x at the z surface positioned
394 // Double_t dyn half-length along x at the z surface positioned
396 // Double_t dyp half-length along x at the z surface positioned
398 // Double_t dz half-length along the z-axis
399 // Int_t med media index number.
407 param[0] = fScale*dxn;
408 param[1] = fScale*dxp;
409 param[2] = fScale*dyn;
410 param[3] = fScale*dyp;
411 param[4] = fScale*dz;
413 gMC->Gsvolu(name,"TRD2",GetMed(med),param,5);
415 //______________________________________________________________________
416 void AliITSBaseGeometry::Trapezoid2(AliITSTrapezoid2Data &d,Int_t med){
417 // Interface to TMC->Gsvolu() for ITS TRD2 geometries. Trapezoid with the
418 // x and y dimension varing along z. It has 5 parameters. See SetScale()
419 // for units. Default units are geant 3 [cm].
421 // AliITSTrapezoid2Data &d Structure with the Trapazoid data in it.
422 // Int_t med media index number.
430 char *j = (char *) &k;
432 param[0] = fScale*d.DxAt(0);
433 param[1] = fScale*d.DxAt(1);
434 param[2] = fScale*d.DyAt(0);
435 param[3] = fScale*d.DyAt(1);
436 param[4] = fScale*d.DzAt();
437 d.SetVid(AddVolName((d.GetName())->Data()));
438 k = ITSIndexToITSG3name(d.GetVid());
439 for(i=0;i<4;i++) name[i] = j[i];
441 gMC->Gsvolu(name,"TRD2",GetMed(med),param,5);
443 //______________________________________________________________________
444 void AliITSBaseGeometry::Trapezoid(const char *gnam,const TString &dis,
445 Double_t dz,Double_t thet,Double_t phi,
446 Double_t h1,Double_t bl1,Double_t tl1,
447 Double_t alp1,Double_t h2,Double_t bl2,
448 Double_t tl2,Double_t alp2,Int_t med){
449 // Interface to TMC->Gsvolu() for ITS TRAP geometries. General Trapezoid,
450 // The faces perpendicular to z are trapezia and their centers are not
451 // necessarily on a line parallel to the z axis. This shape has 11
452 // parameters, but only cosidering that the faces should be planar, only
453 // 9 are really independent. A check is performed on the user parameters
454 // and a message is printed in case of non-planar faces. Ignoring this
455 // warning may cause unpredictable effects at tracking time. See
456 // SetScale() for units. Default units are geant 3 [cm].
458 // const char *gnam 3 character geant volume name. The letter "I"
459 // is appended to the front to indecate that this
461 // TString &dis String containging part discription.
462 // Double_t dz Half-length along the z-asix
463 // Double_t thet Polar angle of the line joing the center of the
464 // face at -dz to the center of the one at dz
466 // Double_t phi aximuthal angle of the line joing the center of
467 // the face at -dz to the center of the one at +dz
469 // Double_t h1 half-length along y of the face at -dz.
470 // Double_t bl1 half-length along x of the side at -h1 in y of
471 // the face at -dz in z.
472 // Double_t tl1 half-length along x of teh side at +h1 in y of
473 // the face at -dz in z.
474 // Double_t alp1 angle with respect to the y axis from the
475 // center of the side at -h1 in y to the cetner
476 // of the side at +h1 in y of the face at -dz in z
478 // Double_t h2 half-length along y of the face at +dz
479 // Double_t bl2 half-length along x of the side at -h2 in y of
480 // the face at +dz in z.
481 // Double_t tl2 half-length along x of the side at _h2 in y of
482 // the face at +dz in z.
483 // Double_t alp2 angle with respect to the y axis from the
484 // center of the side at -h2 in y to the center
485 // of the side at +h2 in y of the face at +dz in z
487 // Int_t med media index number.
495 param[0] = fScale*dz;
498 param[3] = fScale*h1;
499 param[4] = fScale*bl1;
500 param[5] = fScale*tl1;
502 param[7] = fScale*h2;
503 param[8] = fScale*bl2;
504 param[9] = fScale*tl2;
507 gMC->Gsvolu(name,"TRAP",GetMed(med),param,11);
509 //______________________________________________________________________
510 void AliITSBaseGeometry::Trapezoid(AliITSTrapezoidData &d,Int_t med){
511 // Interface to TMC->Gsvolu() for ITS TRAP geometries. General Trapezoid,
512 // The faces perpendicular to z are trapezia and their centers are not
513 // necessarily on a line parallel to the z axis. This shape has 11
514 // parameters, but only cosidering that the faces should be planar, only
515 // 9 are really independent. A check is performed on the user parameters
516 // and a message is printed in case of non-planar faces. Ignoring this
517 // warning may cause unpredictable effects at tracking time. See
518 // SetScale() for units. Default units are geant 3 [cm].
520 // AliITSTrapezoidData &d Structure with the Trapazoid data in it.
521 // Int_t med media index number.
529 char *j = (char *) &k;
531 param[0] = fScale*d.DzAt();
532 param[1] = d.Theta();
534 param[3] = fScale*d.HAt(0);
535 param[4] = fScale*d.Bl(0);
536 param[5] = fScale*d.Tl(0);
537 param[6] = d.Alpha(0);
538 param[7] = fScale*d.HAt(1);
539 param[8] = fScale*d.Bl(1);
540 param[9] = fScale*d.Tl(1);
541 param[10] = d.Alpha(1);
542 d.SetVid(AddVolName((d.GetName())->Data()));
543 k = ITSIndexToITSG3name(d.GetVid());
544 for(i=0;i<4;i++) name[i] = j[i];
546 gMC->Gsvolu(name,"TRAP",GetMed(med),param,11);
548 //______________________________________________________________________
549 void AliITSBaseGeometry::TwistedTrapezoid(const char *gnam,
551 Double_t dz,Double_t thet,Double_t phi,
552 Double_t twist,Double_t h1,Double_t bl1,
553 Double_t tl1,Double_t apl1,Double_t h2,
554 Double_t bl2,Double_t tl2,Double_t apl2,
556 // Interface to TMC->Gsvolu() for ITS GTRA geometries. General twisted
557 // trapazoid. The faces perpendicular to z are trapazia and their centers
558 // are not necessarily on a line parallel to the z axis as the TRAP.
559 // Additionally, the faces may be twisted so that none of their edges are
560 // parallel. It is a TRAP shape, exept that it is twisted in the x-y
561 // plane as a function of z. The parallel sides perpendicular to the x
562 // axis are rotated with respect to the x axis by an angle TWIST, which
563 // is one of the parameters. The shape is defined by the eight corners
564 // and is assumed to be constructed of straight lines joingin points on
565 // the boundry of the trapezoidal face at Z=-dz to the coresponding
566 // points on the face at z=+dz. Divisions are not allowed. It has 12
567 // parameters. See SetScale() for units. Default units are geant 3 [cm].
568 // Note: This shape suffers from the same limitations than the TRAP. The
569 // tracking routines assume that the faces are planar, but htis
570 // constraint is not easily expressed in terms of the 12 parameters.
571 // Additionally, no check on th efaces is performed in this case. Users
572 // should avoid to use this shape as much as possible, and if they have
573 // to do so, they should make sure that the faces are really planes.
574 // If this is not the case, the result of the trasport is unpredictable.
575 // To accelerat ethe computations necessary for trasport, 18 additioanl
576 // parameters are calculated for this shape are 1 DXODZ dx/dz of the
577 // line joing the centers of the faces at z=+_dz. 2 DYODZ dy/dz of the
578 // line joing the centers of the faces at z=+_dz.
579 // 3 XO1 x at z=0 for line joing the + on parallel side, perpendicular
580 // corners at z=+_dz.
581 // 4 YO1 y at z=0 for line joing the + on parallel side, + on
582 // perpendicular corners at z=+-dz.
583 // 5 DXDZ1 dx/dz for line joing the + on parallel side, + on
584 // perpendicular corners at z=+-dz.
585 // 6 DYDZ1 dy/dz for line joing the + on parallel side, + on
586 // perpendicular corners at z=+-dz.
587 // 7 X02 x at z=0 for line joing the - on parallel side, + on
588 // perpendicular corners at z=+-dz.
589 // 8 YO2 y at z=0 for line joing the - on parallel side, + on
590 // perpendicular corners at z=+-dz.
591 // 9 DXDZ2 dx/dz for line joing the - on parallel side, + on
592 // perpendicular corners at z=+-dz.
593 // 10 DYDZ2dy/dz for line joing the - on parallel side, + on
594 // perpendicular corners at z=+-dz.
595 // 11 XO3 x at z=0 for line joing the - on parallel side, - on
596 // perpendicular corners at z=+-dz.
597 // 12 YO3 y at z=0 for line joing the - on parallel side, - on
598 // perpendicular corners at z=+-dz.
599 // 13 DXDZ3 dx/dzfor line joing the - on parallel side, - on
600 // perpendicular corners at z=+-dz.
601 // 14 DYDZ3 dydz for line joing the - on parallel side, - on
602 // perpendicular corners at z=+-dz.
603 // 15 XO4 x at z=0 for line joing the + on parallel side, - on
604 // perpendicular corners at z=+-dz.
605 // 16 YO4 y at z=0 for line joing the + on parallel side, - on
606 // perpendicular corners at z=+-dz.
607 // 17 DXDZ4 dx/dz for line joing the + on parallel side, - on
608 // perpendicular corners at z=+-dz.
609 // 18 DYDZ4 dydz for line joing the + on parallel side, - on
610 // perpendicular corners at z=+-dz.
612 // const char *gnam 3 character geant volume name. The letter "I"
613 // is appended to the front to indecate that this
615 // TString &dis String containging part discription.
616 // Double_t dz half-length along the z axis.
617 // Double_t thet polar angle of the line joing the center of the
618 // face at -dz to the center of the one at +dz
620 // Double_t phi Azymuthal angle of teh line joing the centre of
621 // the face at -dz to the center of the one at +dz
623 // Double_t twist Twist angle of the faces parallel to the x-y
624 // plane at z=+-dz around an axis parallel to z
625 // passing through their centre [degrees].
626 // Double_t h1 Half-length along y of the face at -dz.
627 // Double_t bl1 half-length along x of the side -h1 in y of the
629 // Double_t tl1 half-length along x of the side at +h1 in y of
630 // the face at -dz in z.
631 // Double_t apl1 Angle with respect to the y ais from the center
632 // of the side at -h1 in y to the centere of the
633 // side at +h1 in y of the face at -dz in z
635 // Double_t h2 half-length along the face at +dz.
636 // Double_t bl2 half-length along x of the side at -h2 in y of
637 // the face at -dz in z.
638 // Double_t tl2 half-length along x of the side at +h2 in y of
639 // the face at +dz in z.
640 // Double_t apl2 angle with respect to the y axis from the
641 // center of the side at -h2 in y to the center
642 // of the side at +h2 in y of the face at +dz in
644 // Int_t med media index number.
652 param[0] = fScale*dz;
656 param[4] = fScale*h1;
657 param[5] = fScale*bl1;
658 param[6] = fScale*tl1;
660 param[8] = fScale*h2;
661 param[9] = fScale*bl2;
662 param[10] = fScale*tl2;
665 gMC->Gsvolu(name,"GTRA",GetMed(med),param,12);
667 //______________________________________________________________________
668 void AliITSBaseGeometry::TwistedTrapezoid(AliITSTrapezoidTwistedData &d,
670 // Interface to TMC->Gsvolu() for ITS GTRA geometries. General twisted
671 // trapazoid. The faces perpendicular to z are trapazia and their centers
672 // are not necessarily on a line parallel to the z axis as the TRAP.
673 // Additionally, the faces may be twisted so that none of their edges are
674 // parallel. It is a TRAP shape, exept that it is twisted in the x-y
675 // plane as a function of z. The parallel sides perpendicular to the x
676 // axis are rotated with respect to the x axis by an angle TWIST, which
677 // is one of the parameters. The shape is defined by the eight corners
678 // and is assumed to be constructed of straight lines joingin points on
679 // the boundry of the trapezoidal face at Z=-dz to the coresponding
680 // points on the face at z=+dz. Divisions are not allowed. It has 12
681 // parameters. See SetScale() for units. Default units are geant 3 [cm].
682 // Note: This shape suffers from the same limitations than the TRAP. The
683 // tracking routines assume that the faces are planar, but htis
684 // constraint is not easily expressed in terms of the 12 parameters.
685 // Additionally, no check on th efaces is performed in this case. Users
686 // should avoid to use this shape as much as possible, and if they have
687 // to do so, they should make sure that the faces are really planes.
688 // If this is not the case, the result of the trasport is unpredictable.
689 // To accelerat ethe computations necessary for trasport, 18 additioanl
690 // parameters are calculated for this shape are 1 DXODZ dx/dz of the
691 // line joing the centers of the faces at z=+_dz. 2 DYODZ dy/dz of the
692 // line joing the centers of the faces at z=+_dz.
693 // 3 XO1 x at z=0 for line joing the + on parallel side, perpendicular
694 // corners at z=+_dz.
695 // 4 YO1 y at z=0 for line joing the + on parallel side, + on
696 // perpendicular corners at z=+-dz.
697 // 5 DXDZ1 dx/dz for line joing the + on parallel side, + on
698 // perpendicular corners at z=+-dz.
699 // 6 DYDZ1 dy/dz for line joing the + on parallel side, + on
700 // perpendicular corners at z=+-dz.
701 // 7 X02 x at z=0 for line joing the - on parallel side, + on
702 // perpendicular corners at z=+-dz.
703 // 8 YO2 y at z=0 for line joing the - on parallel side, + on
704 // perpendicular corners at z=+-dz.
705 // 9 DXDZ2 dx/dz for line joing the - on parallel side, + on
706 // perpendicular corners at z=+-dz.
707 // 10 DYDZ2dy/dz for line joing the - on parallel side, + on
708 // perpendicular corners at z=+-dz.
709 // 11 XO3 x at z=0 for line joing the - on parallel side, - on
710 // perpendicular corners at z=+-dz.
711 // 12 YO3 y at z=0 for line joing the - on parallel side, - on
712 // perpendicular corners at z=+-dz.
713 // 13 DXDZ3 dx/dzfor line joing the - on parallel side, - on
714 // perpendicular corners at z=+-dz.
715 // 14 DYDZ3 dydz for line joing the - on parallel side, - on
716 // perpendicular corners at z=+-dz.
717 // 15 XO4 x at z=0 for line joing the + on parallel side, - on
718 // perpendicular corners at z=+-dz.
719 // 16 YO4 y at z=0 for line joing the + on parallel side, - on
720 // perpendicular corners at z=+-dz.
721 // 17 DXDZ4 dx/dz for line joing the + on parallel side, - on
722 // perpendicular corners at z=+-dz.
723 // 18 DYDZ4 dydz for line joing the + on parallel side, - on
724 // perpendicular corners at z=+-dz.
726 // AliITSTrapezoidTwistedData &d Structure with the tube parameters
727 // Int_t med media index number.
735 char *j = (char *) &k;
737 param[0] = fScale*d.DzAt();
738 param[1] = d.Theta();
740 param[3] = d.Twist();
741 param[4] = fScale*d.HAt(0);
742 param[5] = fScale*d.Bl(0);
743 param[6] = fScale*d.Tl(0);
744 param[7] = d.Alpha(0);
745 param[8] = fScale*d.HAt(1);
746 param[9] = fScale*d.Bl(1);
747 param[10] = fScale*d.Tl(1);
748 param[11] = d.Alpha(1);
749 d.SetVid(AddVolName((d.GetName())->Data()));
750 k = ITSIndexToITSG3name(d.GetVid());
751 for(i=0;i<4;i++) name[i] = j[i];
753 gMC->Gsvolu(name,"GTRA",GetMed(med),param,12);
755 //______________________________________________________________________
756 void AliITSBaseGeometry::Tube(const char *gnam,const TString &dis,
757 Double_t rmin,Double_t rmax,Double_t dz,
759 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Simple Tube. It has
760 // 3 parameters. See SetScale()
761 // for units. Default units are geant 3 [cm].
763 // const char *gnam 3 character geant volume name. The letter "I"
764 // is appended to the front to indecate that this
766 // TString &dis String containging part discription.
767 // Double_t rmin Inside Radius.
768 // Double_t rmax Outside Radius.
769 // Double_t dz half-length along the z-axis
770 // Int_t med media index number.
778 param[0] = fScale*rmin;
779 param[1] = fScale*rmax;
780 param[2] = fScale*dz;
782 gMC->Gsvolu(name,"TUBE",GetMed(med),param,3);
784 //______________________________________________________________________
785 void AliITSBaseGeometry::Tube(AliITSTubeData &d,Int_t med){
786 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Simple Tube. It has
787 // 3 parameters. See SetScale()
788 // for units. Default units are geant 3 [cm].
790 // AliITSTubeData &d Structure with the tube parameters
791 // Int_t med media index number.
799 char *j = (char *) &k;
801 param[0] = fScale*d.Rmin();
802 param[1] = fScale*d.Rmax();
803 param[2] = fScale*d.DzAt();
804 d.SetVid(AddVolName((d.GetName())->Data()));
805 k = ITSIndexToITSG3name(d.GetVid());
806 for(i=0;i<4;i++) name[i] = j[i];
808 gMC->Gsvolu(name,"TUBE",GetMed(med),param,3);
810 //______________________________________________________________________
811 void AliITSBaseGeometry::TubeSegment(const char *gnam,const TString &dis,
812 Double_t rmin,Double_t rmax,Double_t dz,
813 Double_t phi1,Double_t phi2,Int_t med){
814 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Phi segment of a
815 // tube. It has 5 parameters. Phi1 should be smaller than phi2. If this
816 // is not the case, the system adds 360 degrees to phi2. See SetScale()
817 // for units. Default units are geant 3 [cm].
819 // const char *gnam 3 character geant volume name. The letter "I"
820 // is appended to the front to indecate that this
822 // TString &dis String containging part discription.
823 // Double_t rmin Inside Radius.
824 // Double_t rmax Outside Radius.
825 // Double_t dz half-length along the z-axis
826 // Double_t phi1 Starting angle of the segment [degree].
827 // Double_t phi2 Ending angle of the segment [degree].
828 // Int_t med media index number.
836 param[0] = fScale*rmin;
837 param[1] = fScale*rmax;
838 param[2] = fScale*dz;
842 gMC->Gsvolu(name,"TUBS",GetMed(med),param,5);
844 //______________________________________________________________________
845 void AliITSBaseGeometry::TubeSegment(AliITSTubeSegData &d,Int_t med){
846 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Phi segment of a
847 // tube. It has 5 parameters. Phi1 should be smaller than phi2. If this
848 // is not the case, the system adds 360 degrees to phi2. See SetScale()
849 // for units. Default units are geant 3 [cm].
851 // AliITSTubeSegData &d Structure with the tube parameters
852 // Int_t med media index number.
860 char *j = (char *) &k;
862 param[0] = fScale*d.Rmin();
863 param[1] = fScale*d.Rmax();
864 param[2] = fScale*d.DzAt();
867 d.SetVid(AddVolName((d.GetName())->Data()));
868 k = ITSIndexToITSG3name(d.GetVid());
869 for(i=0;i<4;i++) name[i] = j[i];
871 gMC->Gsvolu(name,"TUBS",GetMed(med),param,5);
873 //______________________________________________________________________
874 void AliITSBaseGeometry::CutTube(const char *gnam,const TString &dis,
875 Double_t rmin,Double_t rmax,Double_t dz,
876 Double_t phi1,Double_t phi2,Double_t lx,
877 Double_t ly,Double_t lz,Double_t hx,
878 Double_t hy,Double_t hz,Int_t med){
879 // Interface to TMC->Gsvolu() for ITS CTUB geometries. Cut tube. A tube
880 // cut at the extremities with planes not necessarily perpendicular to
881 // the z axis. It has 11 parameters. See SetScale() for units. Default
882 // units are geant 3 [cm]. phi1 should be smaller than phi2. If this is
883 // not the case, the system adds 360 degrees to phi2.
885 // const char *gnam 3 character geant volume name. The letter "I"
886 // is appended to the front to indecate that this
888 // TString &dis String containging part discription.
889 // Double_t rmin Inner radius at z=0 where tube is narrowest.
890 // Double_t rmax Outer radius at z=0 where tube is narrowest.
891 // Double_t dz half-length along the z-axis
892 // Double_t phi1 Starting angle of the segment [degree].
893 // Double_t phi2 Ending angle of the segment [degree].
894 // Double_t lx x component of a unit vector perpendicular to
896 // Double_t ly y component of a unit vector perpendicular to
898 // Double_t lz z component of a unit vector perpendicular to
900 // Double_t hx x component of a unit vector perpendicular to
902 // Double_t hy y component of a unit vector perpendicular to
904 // Double_t hz z component of a unit vector perpendicular to
906 // Int_t med media index number.
914 param[0] = fScale*rmin;
915 param[1] = fScale*rmax;
916 param[2] = fScale*dz;
926 gMC->Gsvolu(name,"CTUB",GetMed(med),param,11);
928 //______________________________________________________________________
929 void AliITSBaseGeometry::CutTube(AliITSTubeCutData &d,Int_t med){
930 // Interface to TMC->Gsvolu() for ITS CTUB geometries. Cut tube. A tube
931 // cut at the extremities with planes not necessarily perpendicular to
932 // the z axis. It has 11 parameters. See SetScale() for units. Default
933 // units are geant 3 [cm]. phi1 should be smaller than phi2. If this is
934 // not the case, the system adds 360 degrees to phi2.
936 // AliITSTubeCutData &d Structure with the tube parameters
937 // Int_t med media index number.
945 char *j = (char *) &k;
947 param[0] = fScale*d.Rmin();
948 param[1] = fScale*d.Rmax();
949 param[2] = fScale*d.DzAt();
952 param[5] = d.Normal(0,0);
953 param[6] = d.Normal(0,1);
954 param[7] = d.Normal(0,2);
955 param[8] = d.Normal(1,0);
956 param[9] = d.Normal(1,1);
957 param[10] = d.Normal(1,2);
958 d.SetVid(AddVolName((d.GetName())->Data()));
959 k = ITSIndexToITSG3name(d.GetVid());
960 for(i=0;i<4;i++) name[i] = j[i];
962 gMC->Gsvolu(name,"CTUB",GetMed(med),param,11);
964 //______________________________________________________________________
965 void AliITSBaseGeometry::TubeElliptical(const char *gnam,const TString &dis,
966 Double_t p1,Double_t p2,Double_t dz,Int_t med){
967 // Interface to TMC->Gsvolu() for ITS ELTU geometries. Elliptical
968 // cross-section Tube. It has 3 parameters. See SetScale()
969 // for units. Default units are geant 3 [cm]. The equation of the surface
970 // is x^2 * p1^-2 + y^2 * p2^-2 = 1.
972 // const char *gnam 3 character geant volume name. The letter "I"
973 // is appended to the front to indecate that this
975 // TString &dis String containging part discription.
976 // Double_t p1 semi-axis of the elipse along x.
977 // Double_t p2 semi-axis of the elipse along y.
978 // Double_t dz half-length along the z-axis
979 // Int_t med media index number.
987 param[0] = fScale*p1;
988 param[1] = fScale*p2;
989 param[2] = fScale*dz;
991 gMC->Gsvolu(name,"ELTU",GetMed(med),param,3);
993 //______________________________________________________________________
994 void AliITSBaseGeometry::TubeElliptical(AliITSTubeEllipticalData &d,
996 // Interface to TMC->Gsvolu() for ITS ELTU geometries. Elliptical
997 // cross-section Tube. It has 3 parameters. See SetScale()
998 // for units. Default units are geant 3 [cm]. The equation of the surface
999 // is x^2 * p1^-2 + y^2 * p2^-2 = 1.
1001 // AliITSTubeElipticData &d Structure with the tube parameters
1002 // Int_t med media index number.
1010 char *j = (char *) &k;
1012 param[0] = fScale*d.P0();
1013 param[1] = fScale*d.P1();
1014 param[2] = fScale*d.DzAt();
1015 d.SetVid(AddVolName((d.GetName())->Data()));
1016 k = ITSIndexToITSG3name(d.GetVid());
1017 for(i=0;i<4;i++) name[i] = j[i];
1019 gMC->Gsvolu(name,"ELTU",GetMed(med),param,3);
1021 //______________________________________________________________________
1022 void AliITSBaseGeometry::HyperbolicTube(const char *gnam,const TString &dis,
1023 Double_t rmin,Double_t rmax,Double_t dz,
1024 Double_t thet,Int_t med){
1025 // Interface to TMC->Gsvolu() for ITS HYPE geometries. Hyperbolic tube.
1026 // Fore example the inner and outer surfaces are hyperboloids, as would
1027 // be foumed by a system of cylinderical wires which were then rotated
1028 // tangentially about their centers. It has 4 parameters. See SetScale()
1029 // for units. Default units are geant 3 [cm]. The hyperbolic surfaces are
1030 // given by r^2 = (ztan(thet)^2 + r(z=0)^2.
1032 // const char *gnam 3 character geant volume name. The letter "I"
1033 // is appended to the front to indecate that this
1034 // is an ITS volume.
1035 // TString &dis String containging part discription.
1036 // Double_t rmin Inner radius at z=0 where tube is narrowest.
1037 // Double_t rmax Outer radius at z=0 where tube is narrowest.
1038 // Double_t dz half-length along the z-axis
1039 // Double_t thet stero angel of rotation of the two faces
1041 // Int_t med media index number.
1049 param[0] = fScale*rmin;
1050 param[1] = fScale*rmax;
1051 param[2] = fScale*dz;
1054 gMC->Gsvolu(name,"HYPE",GetMed(med),param,4);
1056 //______________________________________________________________________
1057 void AliITSBaseGeometry::HyperbolicTube(AliITSTubeHyperbolicData &d,
1059 // Interface to TMC->Gsvolu() for ITS HYPE geometries. Hyperbolic tube.
1060 // Fore example the inner and outer surfaces are hyperboloids, as would
1061 // be foumed by a system of cylinderical wires which were then rotated
1062 // tangentially about their centers. It has 4 parameters. See SetScale()
1063 // for units. Default units are geant 3 [cm]. The hyperbolic surfaces are
1064 // given by r^2 = (ztan(thet)^2 + r(z=0)^2.
1066 // AliITSTubeHyperbolicData &d Structure with the tube parameters
1067 // Int_t med media index number.
1075 char *j = (char *) &k;
1077 param[0] = fScale*d.Rmin();
1078 param[1] = fScale*d.Rmax();
1079 param[2] = fScale*d.DzAt();
1080 param[3] = d.Theta();
1081 d.SetVid(AddVolName((d.GetName())->Data()));
1082 k = ITSIndexToITSG3name(d.GetVid());
1083 for(i=0;i<4;i++) name[i] = j[i];
1085 gMC->Gsvolu(name,"HYPE",GetMed(med),param,4);
1087 //______________________________________________________________________
1088 void AliITSBaseGeometry::Cone(const char *gnam,const TString &dis,
1089 Double_t dz,Double_t rmin1,Double_t rmax1,
1090 Double_t rmin2,Double_t rmax2,Int_t med){
1091 // Interface to TMC->Gsvolu() for ITS Cone geometries. Conical tube. It
1092 // has 5 parameters. See SetScale()
1093 // for units. Default units are geant 3 [cm].
1095 // const char *gnam 3 character geant volume name. The letter "I"
1096 // is appended to the front to indecate that this
1097 // is an ITS volume.
1098 // TString &dis String containging part discription.
1099 // Double_t dz half-length along the z-axis
1100 // Double_t rmin1 Inside Radius at -dz.
1101 // Double_t rmax1 Outside Radius at -dz.
1102 // Double_t rmin2 inside radius at +dz.
1103 // Double_t rmax2 outside radius at +dz.
1104 // Int_t med media index number.
1112 param[0] = fScale*dz;
1113 param[1] = fScale*rmin1;
1114 param[2] = fScale*rmax1;
1115 param[3] = fScale*rmin2;
1116 param[4] = fScale*rmax2;
1118 gMC->Gsvolu(name,"CONS",GetMed(med),param,5);
1120 //______________________________________________________________________
1121 void AliITSBaseGeometry::Cone(AliITSConeData &d,Int_t med){
1122 // Interface to TMC->Gsvolu() for ITS Cone geometries. Conical tube. It
1123 // has 5 parameters. See SetScale()
1124 // for units. Default units are geant 3 [cm].
1126 // AliITSConeData &d Structure with the tube parameters
1127 // Int_t med media index number.
1135 char *j = (char *) &k;
1137 param[0] = fScale*d.DzAt();
1138 param[1] = fScale*d.Rmin0();
1139 param[2] = fScale*d.Rmax0();
1140 param[3] = fScale*d.Rmin1();
1141 param[4] = fScale*d.Rmax1();
1142 d.SetVid(AddVolName((d.GetName())->Data()));
1143 k = ITSIndexToITSG3name(d.GetVid());
1144 for(i=0;i<4;i++) name[i] = j[i];
1146 gMC->Gsvolu(name,"CONS",GetMed(med),param,5);
1148 //______________________________________________________________________
1149 void AliITSBaseGeometry::ConeSegment(const char *gnam,const TString &dis,
1150 Double_t dz,Double_t rmin1,
1151 Double_t rmax1,Double_t rmin2,
1152 Double_t rmax2,Double_t phi1,
1153 Double_t phi2,Int_t med){
1154 // Interface to TMC->Gsvolu() for ITS ConS geometries. One segment of a
1155 // conical tube. It has 7 parameters. Phi1 should be smaller than phi2.
1156 // If this is not the case, the system adds 360 degrees to phi2. See
1157 // SetScale() for units. Default units are geant 3 [cm].
1159 // const char *gnam 3 character geant volume name. The letter "I"
1160 // is appended to the front to indecate that
1161 // this is an ITS volume.
1162 // TString &dis String containging part discription.
1163 // Double_t dz half-length along the z-axis
1164 // Double_t rmin1 Inside Radius at -dz.
1165 // Double_t rmax1 Outside Radius at -dz.
1166 // Double_t rmin2 inside radius at +dz.
1167 // Double_t rmax2 outside radius at +dz.
1168 // Double_t phi1 Starting angle of the segment [degree].
1169 // Double_t phi2 Ending angle of the segment [degree].
1170 // Int_t med media index number.
1178 param[0] = fScale*dz;
1179 param[1] = fScale*rmin1;
1180 param[2] = fScale*rmax1;
1181 param[3] = fScale*rmin2;
1182 param[4] = fScale*rmax2;
1186 gMC->Gsvolu(name,"CONS",GetMed(med),param,7);
1188 //______________________________________________________________________
1189 void AliITSBaseGeometry::ConeSegment(AliITSConeSegData &d,Int_t med){
1190 // Interface to TMC->Gsvolu() for ITS ConS geometries. One segment of a
1191 // conical tube. It has 7 parameters. Phi1 should be smaller than phi2.
1192 // If this is not the case, the system adds 360 degrees to phi2. See
1193 // SetScale() for units. Default units are geant 3 [cm].
1195 // AliITSConeSegData &d Structure with the tube parameters
1196 // Int_t med media index number.
1204 char *j = (char *) &k;
1206 param[0] = fScale*d.DzAt();
1207 param[1] = fScale*d.Rmin0();
1208 param[2] = fScale*d.Rmax0();
1209 param[3] = fScale*d.Rmin1();
1210 param[4] = fScale*d.Rmax1();
1211 param[5] = d.Phi0();
1212 param[6] = d.Phi1();
1213 d.SetVid(AddVolName((d.GetName())->Data()));
1214 k = ITSIndexToITSG3name(d.GetVid());
1215 for(i=0;i<4;i++) name[i] = j[i];
1217 gMC->Gsvolu(name,"CONS",GetMed(med),param,7);
1219 //______________________________________________________________________
1220 void AliITSBaseGeometry::PolyCone(const char *gnam,const TString &dis,
1221 Double_t phi1,Double_t dphi,Int_t nz,
1222 Double_t *z,Double_t *rmin,Double_t *rmax,
1224 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
1225 // parameters or more. See SetScale() for units. Default units are geant
1228 // const char *gnam 3 character geant volume name. The letter "I"
1229 // is appended to the front to indecate that this
1230 // is an ITS volume.
1231 // TString &dis String containging part discription.
1232 // Double_t phi1 the azimuthal angle at which the volume begins
1233 // (angles are counted clouterclockwise) [degrees].
1234 // Double_t dphi opening angle of the volume, which extends from
1235 // phi1 to phi1+dphi [degree].
1236 // Int_t nz number of planes perpendicular to the z axis
1237 // where the dimension of the section is given -
1238 // this number should be at least 2 and NP triples
1239 // of number must follow.
1240 // Double_t *z Array [nz] of z coordinate of the section.
1241 // Double_t *rmin Array [nz] of radius of teh inner circle in the
1243 // Double_t *rmax Array [nz] of radius of the outer circle in the
1245 // Int_t med media index number.
1255 param = new Float_t[n];
1258 param[2] = (Float_t) nz;
1260 param[3+3*i] = fScale*z[i];
1261 param[4+3*i] = fScale*rmin[i];
1262 param[5+3*i] = fScale*rmax[i];
1265 gMC->Gsvolu(name,"PCON",GetMed(med),param,n);
1269 //______________________________________________________________________
1270 void AliITSBaseGeometry::PolyCone(AliITSPConeData &d,Int_t med){
1271 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
1272 // parameters or more. See SetScale() for units. Default units are geant
1275 // AliITSPConeData &d Object with poly cone data stored in it.
1276 // Int_t med media index number.
1284 char *j = (char *) &k;
1287 param = new Float_t[n];
1288 param[0] = d.Phi0();
1289 param[1] = d.DPhi();
1290 param[2] = (Float_t) d.Nz();
1291 for(i=0;i<d.Nz();i++){
1292 param[3+3*i] = fScale*d.ZAt(i);
1293 param[4+3*i] = fScale*d.Rmin(i);
1294 param[5+3*i] = fScale*d.Rmax(i);
1296 d.SetVid(AddVolName((d.GetName())->Data()));
1297 k = ITSIndexToITSG3name(d.GetVid());
1298 for(i=0;i<4;i++) name[i] = j[i];
1300 gMC->Gsvolu(name,"PCON",GetMed(med),param,n);
1304 //______________________________________________________________________
1305 void AliITSBaseGeometry::Sphere(const char *gnam,const TString &dis,
1306 Double_t rmin,Double_t rmax,Double_t the1,
1307 Double_t the2,Double_t phi1,Double_t phi2,
1309 // Interface to TMC->Gsvolu() for ITS SPHE geometries. Segment of a
1310 // sphereical shell. It has 6 parameters. See SetScale()
1311 // for units. Default units are geant 3 [cm].
1313 // const char *gnam 3 character geant volume name. The letter "I"
1314 // is appended to the front to indecate that this
1315 // is an ITS volume.
1316 // TString &dis String containging part discription.
1317 // Double_t rmin Inside Radius.
1318 // Double_t rmax Outside Radius.
1319 // Double_t the1 staring polar angle of the shell [degree].
1320 // Double_t the2 ending polar angle of the shell [degree].
1321 // Double_t phui staring asimuthal angle of the shell [degree].
1322 // Double_t phi2 ending asimuthal angle of the shell [degree].
1323 // Int_t med media index number.
1331 param[0] = fScale*rmin;
1332 param[1] = fScale*rmax;
1338 gMC->Gsvolu(name,"SPHE",GetMed(med),param,6);
1340 //______________________________________________________________________
1341 void AliITSBaseGeometry::Sphere(AliITSSphereData &d,Int_t med){
1342 // Interface to TMC->Gsvolu() for ITS SPHE geometries. Segment of a
1343 // sphereical shell. It has 6 parameters. See SetScale()
1344 // for units. Default units are geant 3 [cm].
1346 // AliITSSphereData &d Structure with the tube parameters
1347 // Int_t med media index number.
1355 char *j = (char *) &k;
1357 param[0] = fScale*d.Rmin();
1358 param[1] = fScale*d.Rmax();
1359 param[2] = d.Theta0();
1360 param[3] = d.Theta1();
1361 param[4] = d.Phi0();
1362 param[5] = d.Phi1();
1363 d.SetVid(AddVolName((d.GetName())->Data()));
1364 k = ITSIndexToITSG3name(d.GetVid());
1365 for(i=0;i<4;i++) name[i] = j[i];
1367 gMC->Gsvolu(name,"SPHE",GetMed(med),param,6);
1369 //______________________________________________________________________
1370 void AliITSBaseGeometry::Parallelepiped(const char *gnam,const TString &dis,
1371 Double_t dx,Double_t dy,Double_t dz,
1372 Double_t alpha,Double_t thet,
1373 Double_t phi,Int_t med){
1374 // Interface to TMC->Gsvolu() for ITS PARA geometries. Parallelepiped. It
1375 // has 6 parameters. See SetScale() for units. Default units are geant 3
1378 // const char *gnam 3 character geant volume name. The letter "I"
1379 // is appended to the front to indecate that this
1380 // is an ITS volume.
1381 // TString &dis String containging part discription.
1382 // Double_t dx half-length allong x-axis
1383 // Double_t dy half-length allong y-axis
1384 // Double_t dz half-length allong z-axis
1385 // Double_t alpha angle formed by the y axis and by the plane
1386 // joining the center of teh faces parallel to the
1387 // z-x plane at -dY and +dy [degree].
1388 // Double_t thet polar angle of the line joining the centers of
1389 // the faces at -dz and +dz in z [degree].
1390 // Double_t phi azimuthal angle of teh line joing the centers
1391 // of the faaces at -dz and +dz in z [degree].
1392 // Int_t med media index number.
1400 param[0] = fScale*dx;
1401 param[1] = fScale*dy;
1402 param[2] = fScale*dz;
1407 gMC->Gsvolu(name,"PARA",GetMed(med),param,6);
1409 //______________________________________________________________________
1410 void AliITSBaseGeometry::Parallelepiped(AliITSParallelpipedData &d,Int_t med){
1411 // Interface to TMC->Gsvolu() for ITS PARA geometries. Parallelepiped. It
1412 // has 6 parameters. See SetScale() for units. Default units are geant 3
1415 // AliITSParrellepipedData &d Structre witht the volume data in it.
1416 // Int_t med media index number.
1424 char *j = (char *) &k;
1426 param[0] = fScale*d.DxAt();
1427 param[1] = fScale*d.DyAt();
1428 param[2] = fScale*d.DzAt();
1429 param[3] = d.Alpha();
1430 param[4] = d.Theta();
1432 d.SetVid(AddVolName((d.GetName())->Data()));
1433 k = ITSIndexToITSG3name(d.GetVid());
1434 for(i=0;i<4;i++) name[i] = j[i];
1436 gMC->Gsvolu(name,"PARA",GetMed(med),param,6);
1438 //______________________________________________________________________
1439 void AliITSBaseGeometry::PolyGon(const char *gnam,const TString &dis,
1440 Double_t phi1,Double_t dphi,Int_t npdv,
1441 Int_t nz,Double_t *z,Double_t *rmin,
1442 Double_t *rmax,Int_t med){
1443 // Interface to TMC->Gsvolu() for ITS PGON geometry. Polygon It has 10
1444 // parameters or more. See SetScale() for units. Default units are geant
1447 // const char *gnam 3 character geant volume name. The letter "I"
1448 // is appended to the front to indecate that this
1449 // is an ITS volume.
1450 // TString &dis String containging part discription.
1451 // Double_t phi1 the azimuthal angle at which the volume begins
1452 // (angles are counted clouterclockwise) [degrees].
1453 // Double_t dphi opening angle of the volume, which extends from
1454 // phi1 to phi1+dphi [degree].
1455 // Int_t npdv the number of sides of teh cross section
1456 // between the given phi limits.
1457 // Int_t nz number of planes perpendicular to the z axis
1458 // where the dimension of the section is given -
1459 // this number should be at least 2 and NP triples
1460 // of number must follow.
1461 // Double_t *z array [nz] of z coordiates of the sections..
1462 // Double_t *rmin array [nz] of radius of teh circle tangent to
1463 // the sides of the inner polygon in teh
1465 // Double_t *rmax array [nz] of radius of the circle tangent to
1466 // the sides of the outer polygon in the
1468 // Int_t med media index number.
1478 param = new Float_t[n];
1481 param[2] = (Float_t)npdv;
1482 param[3] = (Float_t)nz;
1484 param[4+3*i] = fScale*z[i];
1485 param[5+3*i] = fScale*rmin[i];
1486 param[6+3*i] = fScale*rmax[i];
1489 gMC->Gsvolu(name,"PGON",GetMed(med),param,n);
1493 //______________________________________________________________________
1494 void AliITSBaseGeometry::PolyGon(AliITSPGonData &d,Int_t med){
1495 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
1496 // parameters or more. See SetScale() for units. Default units are geant
1499 // AliITSPGonData &d Object with poly cone data stored in it.
1500 // Int_t med media index number.
1508 char *j = (char *) &k;
1511 param = new Float_t[n];
1512 param[0] = d.Phi0();
1513 param[1] = d.DPhi();
1514 param[2] = (Float_t) d.NPhi();
1515 param[3] = (Float_t) d.Nz();
1516 for(i=0;i<d.Nz();i++){
1517 param[4+3*i] = fScale*d.ZAt(i);
1518 param[5+3*i] = fScale*d.Rmin(i);
1519 param[6+3*i] = fScale*d.Rmax(i);
1521 d.SetVid(AddVolName((d.GetName())->Data()));
1522 k = ITSIndexToITSG3name(d.GetVid());
1523 for(i=0;i<4;i++) name[i] = j[i];
1525 gMC->Gsvolu(name,"PGON",GetMed(med),param,n);
1529 //______________________________________________________________________
1530 void AliITSBaseGeometry::Pos(AliITSBaseVolParams &v,Int_t cn,
1531 AliITSBaseVolParams &m,
1532 TVector3 &t,Int_t irot){
1533 // Place a copy of a volume previously defined by a call to GSVOLU inside
1534 // its mother volulme moth.
1536 // const char vol[3] 3 character geant volume name. The letter "I"
1537 // is appended to the front to indecate that this
1538 // is an ITS volume.
1539 // const char moth[3] 3 character geant volume name of the mother
1540 // volume in which vol will be placed. The letter
1541 // "I" is appended to the front to indecate that
1542 // this is an ITS volume.
1543 // Double_t x The x positon of the volume in the mother's
1545 // Double_t y The y positon of the volume in the mother's
1547 // Double_t z The z positon of the volume in the mother's
1549 // Int_t irot the index for the rotation matrix to be used.
1550 // irot=-1 => unit rotation.
1555 char name[5],mother[5];
1558 char *n = (char*)&r;
1560 param[0] = fScale*t.X();
1561 param[1] = fScale*t.Y();
1562 param[2] = fScale*t.Z();
1563 r = ITSIndexToITSG3name(v.GetVid());
1564 for(i=0;i<4;i++) name[i] = n[i]; name[4] ='\0';
1565 r = ITSIndexToITSG3name(m.GetVid());
1566 for(i=0;i<4;i++) mother[i] = n[i]; mother[4] ='\0';
1567 if(irot>0) r = fidrot[irot]; else r=0;
1568 gMC->Gspos(name,cn,mother,param[0],param[1],param[2],r,"ONLY");
1570 //______________________________________________________________________
1571 void AliITSBaseGeometry::Pos(const char *vol,Int_t cn,const char *moth,
1572 Double_t x,Double_t y,Double_t z,Int_t irot){
1573 // Place a copy of a volume previously defined by a call to GSVOLU inside
1574 // its mother volulme moth.
1576 // const char vol[3] 3 character geant volume name. The letter "I"
1577 // is appended to the front to indecate that this
1578 // is an ITS volume.
1579 // const char moth[3] 3 character geant volume name of the mother
1580 // volume in which vol will be placed. The letter
1581 // "I" is appended to the front to indecate that
1582 // this is an ITS volume.
1583 // Double_t x The x positon of the volume in the mother's
1585 // Double_t y The y positon of the volume in the mother's
1587 // Double_t z The z positon of the volume in the mother's
1589 // Int_t irot the index for the rotation matrix to be used.
1590 // irot=-1 => unit rotation.
1595 char name[5],mother[5];
1599 param[0] = fScale*x;
1600 param[1] = fScale*y;
1601 param[2] = fScale*z;
1603 G3name(moth,mother);
1604 if(irot>0) r = fidrot[irot];
1605 gMC->Gspos(name,cn,mother,param[0],param[1],param[2],r,"ONLY");
1607 //______________________________________________________________________
1608 void AliITSBaseGeometry::Matrix(Int_t irot,Double_t thet1,Double_t phi1,
1609 Double_t thet2,Double_t phi2,
1610 Double_t thet3,Double_t phi3){
1611 // Defines a Geant rotation matrix. checks to see if it is the unit
1612 // matrix. If so, then no additonal matrix is defined. Stores rotation
1613 // matrix irot in the data structure JROTM. If the matrix is not
1614 // orthonormal, it will be corrected by setting y' perpendicular to x'
1615 // and z' = x' X y'. A warning message is printed in this case.
1617 // Int_t irot Intex specifing which rotation matrix.
1618 // Double_t thet1 Polar angle for axisw x [degrees].
1619 // Double_t phi1 azimuthal angle for axis x [degrees].
1620 // Double_t thet12Polar angle for axisw y [degrees].
1621 // Double_t phi2 azimuthal angle for axis y [degrees].
1622 // Double_t thet3 Polar angle for axisw z [degrees].
1623 // Double_t phi3 azimuthal angle for axis z [degrees].
1628 Float_t t1=0.0,p1=0.0,t2=0.0,p2=0.0,t3=0.0,p3=0.0;
1630 if(thet1==90.0&&phi1== 0.0&&
1631 thet2==90.0&&phi2==90.0&&
1632 thet3== 0.0&&phi3== 0.0){
1633 fidrot[irot] = 0; // Unit matrix
1641 fits->AliMatrix(fidrot[irot],t1,p1,t2,p2,t3,p3);
1643 cout << "Matrix:: fidrot["<<irot<<"]="<<fidrot[irot];
1644 cout <<" angles="<<t1<<" "<<p1<<" "<<t2<<" "<<p2<<" "<<t3<< " "<<p3<<endl;
1646 //______________________________________________________________________
1647 void AliITSBaseGeometry::Matrix(Int_t irot,Int_t axis,Double_t thet){
1648 // Defines a Geant rotation matrix. checks to see if it is the unit
1649 // matrix. If so, then no additonal matrix is defined. Stores rotation
1650 // matrix irot in the data structure JROTM. If the matrix is not
1651 // orthonormal, it will be corrected by setting y' perpendicular to x'
1652 // and z' = x' X y'. A warning message is printed in this case.
1654 // Int_t irot Intex specifing which rotation matrix.
1655 // Int_t axis Axis about which rotation is to be done.
1656 // Double_t thet Angle to rotate by [degrees].
1663 fidrot[irot] = 0; // Unit matrix
1666 case 0: //Rotate about x-axis, x-axis does not change.
1667 fits->AliMatrix(fidrot[irot],90.0,0.0,90.0+thet,90.0,thet,90.0);
1669 cout << "Matrix:: axis="<<axis<<" fidrot["<<irot<<"]=";
1670 cout <<fidrot[irot];
1671 cout <<" angles="<<90.0<<" "<<0.0<<" "<<90.0+thet<<" "<<90.0;
1672 cout <<" "<<thet<< " "<<90.0<<endl;
1675 case 1: //Rotate about y-axis, y-axis does not change.
1676 fits->AliMatrix(fidrot[irot],90.0-thet,0.0,90.0,90.0,-thet,0.0);
1678 cout << "Matrix:: axis="<<axis<<" fidrot["<<irot<<"]=";
1679 cout << fidrot[irot];
1680 cout <<" angles="<<90.-thet<<" "<<0.0<<" "<<90.0<<" "<<90.0;
1681 cout <<" "<<-thet<< " "<<0.0<<endl;
1684 case 2: //Rotate about z-axis, z-axis does not change.
1685 fits->AliMatrix(fidrot[irot],90.0,thet,90.0,90.+thet,0.0,0.0);
1687 cout << "Matrix:: axis="<<axis<<" fidrot["<<irot<<"]=";
1688 cout <<fidrot[irot];
1689 cout <<" angles="<<90.0<<" "<<thet<<" "<<90.0<<" "<<90.0+thet;
1690 cout <<" "<<0.0<< " "<<0.0<<endl;
1694 Error("Matrix","axis must be either 0, 1, or 2. for matrix=%d",
1697 cout << "Matrix:: axis="<<axis<<" fidrot["<<irot<<"]=";
1698 cout <<fidrot[irot];
1699 cout <<" thet=" << thet<< endl;
1705 //______________________________________________________________________
1706 void AliITSBaseGeometry::Matrix(Int_t irot,Double_t rot[3][3]){
1707 // Defines a Geant rotation matrix. checks to see if it is the unit
1708 // matrix. If so, then no additonal matrix is defined. Stores rotation
1709 // matrix irot in the data structure JROTM. If the matrix is not
1710 // orthonormal, it will be corrected by setting y' perpendicular to x'
1711 // and z' = x' X y'. A warning message is printed in this case.
1713 // Int_t irot Intex specifing which rotation matrix.
1714 // Double_t rot[3][3] The 3 by 3 rotation matrix.
1719 Double_t si,c=180./TMath::Pi();
1720 Double_t ang[6]={90.0,0.0,90.0,90.0,0.0,0.0};
1722 if(rot[0][0]==1.0&&rot[1][1]==1.0&&rot[2][2]==1.0&&
1723 rot[0][1]==0.0&&rot[0][2]==0.0&&rot[1][0]==0.0&&
1724 rot[1][2]==0.0&&rot[2][0]==0.0&&rot[2][1]==0.0){
1725 fidrot[irot] = 0; // Unit matrix
1727 ang[1] = TMath::ATan2(rot[0][1],rot[0][0]);
1728 if(TMath::Cos(ang[1])!=0.0) si = rot[0][0]/TMath::Cos(ang[1]);
1729 else si = rot[0][1]/TMath::Sin(ang[1]);
1730 ang[0] = TMath::ATan2(si,rot[0][2]);
1732 ang[3] = TMath::ATan2(rot[1][1],rot[1][0]);
1733 if(TMath::Cos(ang[3])!=0.0) si = rot[1][0]/TMath::Cos(ang[3]);
1734 else si = rot[1][1]/TMath::Sin(ang[3]);
1735 ang[2] = TMath::ATan2(si,rot[1][2]);
1737 ang[5] = TMath::ATan2(rot[2][1],rot[2][0]);
1738 if(TMath::Cos(ang[5])!=0.0) si = rot[2][0]/TMath::Cos(ang[5]);
1739 else si = rot[2][1]/TMath::Sin(ang[5]);
1740 ang[4] = TMath::ATan2(si,rot[2][2]);
1742 for(Int_t i=0;i<6;i++) {ang[i] *= c; if(ang[i]<0.0) ang[i] += 360.;}
1743 fits->AliMatrix(fidrot[irot],ang[0],ang[1],ang[2],ang[3],
1746 cout << "Matrix rot[3][3]:: fidrot["<<irot<<"]="<<fidrot[irot];
1747 cout <<" angles="<<ang[0]<<" "<<ang[1]<<" "<<ang[2]<<" "<<
1748 ang[3]<<" "<<ang[4]<< " "<<ang[5]<<endl;
1750 //______________________________________________________________________
1751 Float_t AliITSBaseGeometry::GetA(Int_t z){
1752 // Returns the isotopicaly averaged atomic number.
1754 // Int_t z Elemental number
1758 // The atomic mass number.
1760 1.00794 , 4.0026902, 6.941 , 9.012182 , 10.811 , // H-B
1761 12.01007 , 14.00674 , 15.9994 , 18.9984032, 20.1797 , // C-Ne
1762 22.98970 , 24.3050 , 26.981538, 28.0855 , 30.973761, // Na-P
1763 32.066 , 35.4527 , 39.948 , 39.0983 , 40.078 , // S-Ca
1764 44.95591 , 47.867 , 50.9415 , 51.9961 , 54.938049, // Sc-Mn
1765 55.845 , 58.933200 , 58.6934 , 63.546 , 65.39 , // Fe-Zn
1766 69.723 , 72.61 , 74.92160 , 78.96 , 79.904 , // Ga-Br
1767 83.80 , 85.4678 , 87.62 , 88.9085 , 91.224 , // Kr-Zr
1768 92.90638 , 95.94 , 97.907215, 101.07 ,102.90550 , // Nb-Rh
1769 106.42 ,107.8682 ,112.411 ,114.818 ,118.710 , // Pd-Sn
1770 121.760 ,127.60 ,126.90447 ,131.29 ,132.90545 , // Sb-Cs
1771 137.327 ,138.9055 ,140.116 ,140.90765 ,144.24 , // La-Nd
1772 144.912746,150.36 ,151.964 ,157.25 ,158.92534 , // Pm-Tb
1773 162.50 ,164.93032 ,167.26 ,168.93421 ,173.04 , // Dy-Yb
1774 174.967 ,178.49 ,180.9479 ,183.84 ,186.207 , // Lu-Re
1775 190.23 ,192.217 ,195.078 ,196.96655 ,200.59 , // Os-Hg
1776 204.3833 ,207.2 ,208.98038,208.982415 ,209.987131, // Tl-At
1777 222.017570,223.019731 ,226.025402,227.027747 ,232.0381 , // Rn-Th
1778 231.03588 ,238.0289 }; // Pa,U
1781 Error("GetA","z must be 0<z<93. z=%d",z);
1786 //______________________________________________________________________
1787 Float_t AliITSBaseGeometry::GetStandardMaxStepSize(Int_t istd){
1788 // Returns one of a set of standard Maximum Step Size values.
1790 // Int_t istd Index to indecate which standard.
1794 // The appropreate standard Maximum Step Size value [cm].
1795 Float_t t[]={1.0, // default
1796 0.0075, // Silicon detectors...
1797 1.0, // Air in central detectors region
1798 1.0 // Material in non-centeral region
1802 //______________________________________________________________________
1803 Float_t AliITSBaseGeometry::GetStandardThetaMax(Int_t istd){
1804 // Returns one of a set of standard Theata Max values.
1806 // Int_t istd Index to indecate which standard.
1810 // The appropreate standard Theta max value [degrees].
1811 Float_t t[]={0.1, // default
1812 0.1, // Silicon detectors...
1813 0.1, // Air in central detectors region
1814 1.0 // Material in non-centeral region
1818 //______________________________________________________________________
1819 Float_t AliITSBaseGeometry::GetStandardEfraction(Int_t istd){
1820 // Returns one of a set of standard E fraction values.
1822 // Int_t istd Index to indecate which standard.
1826 // The appropreate standard E fraction value [#].
1827 Float_t t[]={0.1, // default
1828 0.1, // Silicon detectors...
1829 0.1, // Air in central detectors region
1830 0.5 // Material in non-centeral region
1834 //______________________________________________________________________
1835 Float_t AliITSBaseGeometry::GetStandardEpsilon(Int_t istd){
1836 // Returns one of the standard Epsilon valuse
1838 // Int_t istd index of standard cuts to get
1842 // Float_t the standard Epsilon cut value.
1843 Float_t t[]={1.0E-4, // default
1844 1.0E-4, // Silicon detectors...
1845 1.0E-4, // Air in central detector region
1846 1.0E-3, // Material in non-cneteral regions
1851 //______________________________________________________________________
1852 void AliITSBaseGeometry::Element(Int_t imat,const char* name,Int_t z,
1853 Double_t dens,Int_t istd){
1854 // Defines a Geant single element material and sets its Geant medium
1855 // proporties. The average atomic A is assumed to be given by their
1856 // natural abundances. Things like the radiation length are calculated
1859 // Int_t imat Material number.
1860 // const char* name Material name. No need to add a $ at the end.
1861 // Int_t z The elemental number.
1862 // Double_t dens The density of the material [g/cm^3].
1863 // Int_t istd Defines which standard set of transport parameters
1864 // which should be used.
1869 Float_t rad,Z,A=GetA(z),tmax,stemax,deemax,epsilon;
1873 len = strlen(name)+1;
1874 name2 = new char[len];
1875 strncpy(name2,name,len-1);
1876 name2[len-1] = '\0';
1879 rad = GetRadLength(z)/dens;
1880 fits->AliMaterial(imat,name2,A,Z,dens,rad,0.0,0,0);
1881 tmax = GetStandardThetaMax(istd); // degree
1882 stemax = GetStandardMaxStepSize(istd); // cm
1883 deemax = GetStandardEfraction(istd); // ratio
1884 epsilon = GetStandardEpsilon(istd); //
1885 fits->AliMedium(imat,name2,imat,0,gAlice->Field()->Integ(),
1886 gAlice->Field()->Max(),tmax,stemax,deemax,epsilon,0.0);
1889 //______________________________________________________________________
1890 void AliITSBaseGeometry::MixtureByWeight(Int_t imat,const char* name,Int_t *z,
1891 Double_t *w,Double_t dens,Int_t n,Int_t istd){
1892 // Defines a Geant material by a set of elements and weights, and sets
1893 // its Geant medium proporties. The average atomic A is assumed to be
1894 // given by their natural abundances. Things like the radiation length
1895 // are calculated for you.
1897 // Int_t imat Material number.
1898 // const char* name Material name. No need to add a $ at the end.
1899 // Int_t *z Array of The elemental numbers.
1900 // Double_t *w Array of relative weights.
1901 // Double_t dens The density of the material [g/cm^3].
1902 // Int_t n the number of elements making up the mixture.
1903 // Int_t istd Defines which standard set of transport parameters
1904 // which should be used.
1909 Float_t *Z,*A,*W,tmax,stemax,deemax,epsilon;
1916 len = strlen(name)+2;
1917 name2 = new char[len];
1918 strncpy(name2,name,len-1);
1919 name2[len-1] = '\0';
1921 for(i=0;i<n;i++){Z[i] = (Float_t)z[i];A[i] = (Float_t)GetA(z[i]);
1922 W[i] = (Float_t)w[i];}
1923 fits->AliMixture(imat,name2,A,Z,dens,n,W);
1924 tmax = GetStandardThetaMax(istd); // degree
1925 stemax = GetStandardMaxStepSize(istd); // cm
1926 deemax = GetStandardEfraction(istd); // #
1927 epsilon = GetStandardEpsilon(istd);
1928 fits->AliMedium(imat,name2,imat,0,gAlice->Field()->Integ(),
1929 gAlice->Field()->Max(),tmax,stemax,deemax,epsilon,0.0);
1935 //______________________________________________________________________
1936 void AliITSBaseGeometry::MixtureByNumber(Int_t imat,const char* name,Int_t *z,
1937 Int_t *w,Double_t dens,Int_t n,Int_t istd){
1938 // Defines a Geant material by a set of elements and number, and sets
1939 // its Geant medium proporties. The average atomic A is assumed to be
1940 // given by their natural abundances. Things like the radiation length
1941 // are calculated for you.
1943 // Int_t imat Material number.
1944 // const char* name Material name. No need to add a $ at the end.
1945 // Int_t *z Array of The elemental numbers.
1946 // Int_t_t *w Array of relative number.
1947 // Double_t dens The density of the material [g/cm^3].
1948 // Int_t n the number of elements making up the mixture.
1949 // Int_t istd Defines which standard set of transport parameters
1950 // which should be used.
1955 Float_t *Z,*A,*W,tmax,stemax,deemax,epsilon;
1962 len = strlen(name)+1;
1963 name2 = new char[len];
1964 strncpy(name2,name,len-1);
1965 name2[len-1] = '\0';
1967 for(i=0;i<n;i++){Z[i] = (Float_t)z[i];A[i] = (Float_t)GetA(z[i]);
1968 W[i] = (Float_t)w[i];}
1969 fits->AliMixture(imat,name2,A,Z,dens,-n,W);
1970 tmax = GetStandardThetaMax(istd); // degree
1971 stemax = GetStandardMaxStepSize(istd); // cm
1972 deemax = GetStandardEfraction(istd); // #
1973 epsilon = GetStandardEpsilon(istd);
1974 fits->AliMedium(imat,name2,imat,0,gAlice->Field()->Integ(),
1975 gAlice->Field()->Max(),tmax,stemax,deemax,epsilon,0.0);
1981 //______________________________________________________________________
1982 Double_t AliITSBaseGeometry::RadLength(Int_t iz,Double_t a){
1983 // Computes the radiation length in accordance to the PDG 2000 Section
1984 // 23.4.1 p. 166. Transladed from the c code of Flavio Tosello.
1986 // Int_t iz The elemental number
1987 // Dougle_t The elemental average atomic mass number
1990 // Double_t returns the radiation length of the element iz in
1992 Double_t z = (Double_t)iz;
1993 Double_t alphaz = fAlpha*z;
1994 Double_t alphaz2 = alphaz*alphaz;
1995 Double_t c0 = +0.20206,c1 = -0.0369,c2 = +0.0083,c3 = -0.0020;
1996 Double_t z12,z23,l,lp,c;
1998 c = alphaz2*(1./(1.+alphaz2) + c0 + c1*alphaz2 + c2*alphaz2*alphaz2
1999 +c3*alphaz2*alphaz2*alphaz2);
2000 z12 = TMath::Exp(TMath::Log(z)/3.0);
2020 l = TMath::Log(184.15/z12);
2021 lp = TMath::Log(1194.0/z23);
2024 Double_t re2,b,r,xz;
2027 b = 4.0*fAlpha*re2*fNa/a;
2028 r = b*z*(z*(l-c)+lp);
2030 return xz; // [gm/cm^2]
2032 //======================================================================
2033 ClassImp(AliITSBaseVolParams)
2034 //______________________________________________________________________
2035 void AliITSBaseVolParams::Print(ostream *os){
2036 // Prints out the data kept in this class
2038 // ostream *os The output stream pointer
2044 *os<<"Volume Id="<<fVol<<" Copy="<<fCpn<<" Name: "<<fName<<endl;
2046 //______________________________________________________________________
2047 void AliITSBaseVolParams::Read(istream *is){
2048 // Read in data kept in this class
2050 // istream *is the input stream
2064 //______________________________________________________________________
2065 ostream &operator<<(ostream &os,AliITSBaseVolParams &p){
2066 // Operator << for C++ like output
2068 // ostream &os The output stream
2069 // AliITSBaseVolParams &p The class to be outputed
2073 // ostream &os The output stream
2078 //______________________________________________________________________
2079 istream &operator>>(istream &is,AliITSBaseVolParams &r){
2080 // Operator << for C++ like output
2082 // istream &is The input stream
2083 // AliITSBaseVolParams &r The class to be read in
2087 // istream &is The input stream
2092 //======================================================================
2093 ClassImp(AliITSBoxData)
2094 //______________________________________________________________________
2095 void AliITSBoxData::Print(ostream *os){
2096 // Prints out the data kept in this class
2098 // ostream *os The output stream pointer
2104 #if defined __GNUC__
2111 #if defined __ICC || defined __ECC
2118 AliITSBaseVolParams::Print(os);
2119 fmt = os->setf(ios::scientific); // set scientific floating point output
2120 *os << "fDx=" << fDx << " fDy=" << fDy << " fDz=" << fDz << endl;
2121 os->flags(fmt); // reset back to old formating.
2124 //______________________________________________________________________
2125 void AliITSBoxData::Read(istream *is){
2126 // Read in data kept in this class
2128 // istream *is the input stream
2135 AliITSBaseVolParams::Read(is);
2143 //______________________________________________________________________
2144 ostream &operator<<(ostream &os,AliITSBoxData &p){
2145 // Operator << for C++ like output
2147 // ostream &os The output stream
2148 // AliITSBoxData &p The class to be outputed
2152 // ostream &os The output stream
2157 //______________________________________________________________________
2158 istream &operator>>(istream &is,AliITSBoxData &r){
2159 // Operator << for C++ like output
2161 // istream &is The input stream
2162 // AliITSBoxData &r The class to be read in
2166 // istream &is The input stream
2171 //======================================================================
2172 ClassImp(AliITSTrapezoid1Data)
2173 //______________________________________________________________________
2174 void AliITSTrapezoid1Data::Print(ostream *os){
2175 // Prints out the data kept in this class
2177 // ostream *os The output stream pointer
2183 #if defined __GNUC__
2190 #if defined __ICC || defined __ECC
2197 AliITSBaseVolParams::Print(os);
2198 fmt = os->setf(ios::scientific); // set scientific floating point output
2199 *os << "fDx[0]=" << fDx[0]<< " fDx[1]=" << fDx[1] << " fDy=" << fDy;
2200 *os << " fDz=" << fDz << endl;
2201 os->flags(fmt); // reset back to old formating.
2204 //______________________________________________________________________
2205 void AliITSTrapezoid1Data::Read(istream *is){
2206 // Read in data kept in this class
2208 // istream *is the input stream
2215 AliITSBaseVolParams::Read(is);
2225 //______________________________________________________________________
2226 ostream &operator<<(ostream &os,AliITSTrapezoid1Data &p){
2227 // Operator << for C++ like output
2229 // ostream &os The output stream
2230 // AliITSBoxData &p The class to be outputed
2234 // ostream &os The output stream
2239 //______________________________________________________________________
2240 istream &operator>>(istream &is,AliITSTrapezoid1Data &r){
2241 // Operator << for C++ like output
2243 // istream &is The input stream
2244 // AliITSPGonData &r The class to be read in
2248 // istream &is The input stream
2253 //======================================================================
2254 ClassImp(AliITSTrapezoid2Data)
2255 //______________________________________________________________________
2256 void AliITSTrapezoid2Data::Print(ostream *os){
2257 // Prints out the data kept in this class
2259 // ostream *os The output stream pointer
2265 #if defined __GNUC__
2272 #if defined __ICC || defined __ECC
2279 AliITSBaseVolParams::Print(os);
2280 fmt = os->setf(ios::scientific); // set scientific floating point output
2281 *os << "fDx[0]=" << fDx[0]<< " fDx[1]=" << fDx[1];
2282 *os << " fDy[0]=" << fDy[0] << " fDy[1]=" << fDy[1];
2283 *os << " fDz=" << fDz << endl;
2284 os->flags(fmt); // reset back to old formating.
2287 //______________________________________________________________________
2288 void AliITSTrapezoid2Data::Read(istream *is){
2289 // Read in data kept in this class
2291 // istream *is the input stream
2298 AliITSBaseVolParams::Read(is);
2310 //______________________________________________________________________
2311 ostream &operator<<(ostream &os,AliITSTrapezoid2Data &p){
2312 // Operator << for C++ like output
2314 // ostream &os The output stream
2315 // AliITSBoxData &p The class to be outputed
2319 // ostream &os The output stream
2324 //______________________________________________________________________
2325 istream &operator>>(istream &is,AliITSTrapezoid2Data &r){
2326 // Operator << for C++ like output
2328 // istream &is The input stream
2329 // AliITSPGonData &r The class to be read in
2333 // istream &is The input stream
2338 //======================================================================
2339 ClassImp(AliITSTrapezoidData)
2340 //______________________________________________________________________
2341 void AliITSTrapezoidData::Print(ostream *os){
2342 // Prints out the data kept in this class
2344 // ostream *os The output stream pointer
2350 #if defined __GNUC__
2357 #if defined __ICC || defined __ECC
2364 AliITSBaseVolParams::Print(os);
2365 fmt = os->setf(ios::scientific); // set scientific floating point output
2366 *os << "fTheta=" << fTheta << " fPhi=" << fPhi << " fDz=" << fDz;
2367 *os << " fH[0]=" << fH[0]<< " fH[1]=" << fH[1];
2368 *os << " fBl[0]=" << fBl[0] << " fBl[1]=" << fBl[1];
2369 *os << " fTl[0]=" << fTl[0] << " fTl[1]=" << fTl[1];
2370 *os << " fAlp[0]=" << fAlp[0] << " fAlp[1]=" << fAlp[1];
2372 os->flags(fmt); // reset back to old formating.
2375 //______________________________________________________________________
2376 void AliITSTrapezoidData::Read(istream *is){
2377 // Read in data kept in this class
2379 // istream *is the input stream
2386 AliITSBaseVolParams::Read(is);
2410 //______________________________________________________________________
2411 ostream &operator<<(ostream &os,AliITSTrapezoidData &p){
2412 // Operator << for C++ like output
2414 // ostream &os The output stream
2415 // AliITSBoxData &p The class to be outputed
2419 // ostream &os The output stream
2424 //______________________________________________________________________
2425 istream &operator>>(istream &is,AliITSTrapezoidData &r){
2426 // Operator << for C++ like output
2428 // istream &is The input stream
2429 // AliITSPGonData &r The class to be read in
2433 // istream &is The input stream
2438 //======================================================================
2439 ClassImp(AliITSTrapezoidTwistedData)
2440 //______________________________________________________________________
2441 void AliITSTrapezoidTwistedData::Print(ostream *os){
2442 // Prints out the data kept in this class
2444 // ostream *os The output stream pointer
2450 #if defined __GNUC__
2457 #if defined __ICC || defined __ECC
2464 AliITSBaseVolParams::Print(os);
2465 fmt = os->setf(ios::scientific); // set scientific floating point output
2466 *os << "fTheta=" << fTheta << " fPhi=" << fPhi << " fDz=" << fDz;
2467 *os << " fTwist=" << fTwist;
2468 *os << " fH[0]=" << fH[0]<< " fH[1]=" << fH[1];
2469 *os << " fBl[0]=" << fBl[0] << " fBl[1]=" << fBl[1];
2470 *os << " fTl[0]=" << fTl[0] << " fTl[1]=" << fTl[1];
2471 *os << " fAlp[0]=" << fAlp[0] << " fAlp[1]=" << fAlp[1];
2473 os->flags(fmt); // reset back to old formating.
2476 //______________________________________________________________________
2477 void AliITSTrapezoidTwistedData::Read(istream *is){
2478 // Read in data kept in this class
2480 // istream *is the input stream
2487 AliITSBaseVolParams::Read(is);
2513 //______________________________________________________________________
2514 ostream &operator<<(ostream &os,AliITSTrapezoidTwistedData &p){
2515 // Operator << for C++ like output
2517 // ostream &os The output stream
2518 // AliITSBoxData &p The class to be outputed
2522 // ostream &os The output stream
2527 //______________________________________________________________________
2528 istream &operator>>(istream &is,AliITSTrapezoidTwistedData &r){
2529 // Operator << for C++ like output
2531 // istream &is The input stream
2532 // AliITSPGonData &r The class to be read in
2536 // istream &is The input stream
2541 //======================================================================
2542 ClassImp(AliITSTubeData)
2543 //______________________________________________________________________
2544 void AliITSTubeData::Print(ostream *os){
2545 // Prints out the data kept in this class
2547 // ostream *os The output stream pointer
2553 #if defined __GNUC__
2560 #if defined __ICC || defined __ECC
2567 AliITSBaseVolParams::Print(os);
2568 fmt = os->setf(ios::scientific); // set scientific floating point output
2569 *os <<" Z , Rmin , Rmax " << endl;
2570 fmt = os->setf(ios::scientific); // set scientific floating point output
2571 *os << setprecision(16) << fDz <<"\t";
2572 *os << setprecision(16) << fRmin << "\t";
2573 *os << setprecision(16) << fRmax << endl;
2574 os->flags(fmt); // reset back to old formating.
2578 //______________________________________________________________________
2579 void AliITSTubeData::Read(istream *is){
2580 // Read in data kept in this class
2582 // istream *is the input stream
2589 AliITSBaseVolParams::Read(is);
2592 *is >> fDz >> fRmin >> fRmax;
2594 //______________________________________________________________________
2595 ostream &operator<<(ostream &os,AliITSTubeData &p){
2596 // Operator << for C++ like output
2598 // ostream &os The output stream
2599 // AliITSTubeData &p The class to be outputed
2603 // ostream &os The output stream
2608 //______________________________________________________________________
2609 istream &operator>>(istream &is,AliITSTubeData &r){
2610 // Operator << for C++ like output
2612 // istream &is The input stream
2613 // AliITSTubeData &r The class to be read in
2617 // istream &is The input stream
2622 //======================================================================
2623 ClassImp(AliITSTubeSegData)
2624 //______________________________________________________________________
2625 void AliITSTubeSegData::Print(ostream *os){
2626 // Prints out the data kept in this class
2628 // ostream *os The output stream pointer
2634 #if defined __GNUC__
2641 #if defined __ICC || defined __ECC
2648 AliITSBaseVolParams::Print(os);
2649 fmt = os->setf(ios::scientific); // set scientific floating point output
2650 *os << "fPhi0=" << fPhi0 << " fPhi1=" << fPhi1 << endl;
2651 *os <<" Z , Rmin , Rmax " << endl;
2652 fmt = os->setf(ios::scientific); // set scientific floating point output
2653 *os << setprecision(16) << fDz <<"\t";
2654 *os << setprecision(16) << fRmin << "\t";
2655 *os << setprecision(16) << fRmax << endl;
2656 os->flags(fmt); // reset back to old formating.
2659 //______________________________________________________________________
2660 void AliITSTubeSegData::Read(istream *is){
2661 // Read in data kept in this class
2663 // istream *is the input stream
2670 AliITSBaseVolParams::Read(is);
2677 *is >> fDz >> fRmin >> fRmax;
2679 //______________________________________________________________________
2680 ostream &operator<<(ostream &os,AliITSTubeSegData &p){
2681 // Operator << for C++ like output
2683 // ostream &os The output stream
2684 // AliITSTubeData &p The class to be outputed
2688 // ostream &os The output stream
2693 //______________________________________________________________________
2694 istream &operator>>(istream &is,AliITSTubeSegData &r){
2695 // Operator << for C++ like output
2697 // istream &is The input stream
2698 // AliITSTubeData &r The class to be read in
2702 // istream &is The input stream
2707 //======================================================================
2708 ClassImp(AliITSTubeCutData)
2709 //______________________________________________________________________
2710 void AliITSTubeCutData::Print(ostream *os){
2711 // Prints out the data kept in this class
2713 // ostream *os The output stream pointer
2719 #if defined __GNUC__
2726 #if defined __ICC || defined __ECC
2733 AliITSBaseVolParams::Print(os);
2734 fmt = os->setf(ios::scientific); // set scientific floating point output
2735 *os << "fPhi0=" << fPhi0 << " fPhi1=" << fPhi1;
2736 *os << " Norm0=("<<(fNorm[0])[0]<<" "<<(fNorm[0])[1]<<" "<<(fNorm[0])[2];
2737 *os << ") Norm1=("<<(fNorm[1])[0]<<" "<<(fNorm[1])[1]<<" "<<(fNorm[1])[2];
2739 *os <<" Z , Rmin , Rmax " << endl;
2740 *os << setprecision(16) << fDz <<"\t";
2741 *os << setprecision(16) << fRmin << "\t";
2742 *os << setprecision(16) << fRmax << endl;
2743 os->flags(fmt); // reset back to old formating.
2746 //______________________________________________________________________
2747 void AliITSTubeCutData::Read(istream *is){
2748 // Read in data kept in this class
2750 // istream *is the input stream
2757 AliITSBaseVolParams::Read(is);
2764 *is >> (fNorm[0])[0]>>(fNorm[0])[1]>>(fNorm[0])[2];
2766 *is >> (fNorm[1])[0]>>(fNorm[1])[1]>>(fNorm[1])[2];
2769 *is >> fDz >> fRmin >> fRmax;
2771 //______________________________________________________________________
2772 ostream &operator<<(ostream &os,AliITSTubeCutData &p){
2773 // Operator << for C++ like output
2775 // ostream &os The output stream
2776 // AliITSTubeData &p The class to be outputed
2780 // ostream &os The output stream
2785 //______________________________________________________________________
2786 istream &operator>>(istream &is,AliITSTubeCutData &r){
2787 // Operator << for C++ like output
2789 // istream &is The input stream
2790 // AliITSTubeData &r The class to be read in
2794 // istream &is The input stream
2800 //======================================================================
2801 ClassImp(AliITSTubeEllipticalData)
2802 //______________________________________________________________________
2803 void AliITSTubeEllipticalData::Print(ostream *os){
2804 // Prints out the data kept in this class
2806 // ostream *os The output stream pointer
2812 #if defined __GNUC__
2819 #if defined __ICC || defined __ECC
2826 AliITSBaseVolParams::Print(os);
2827 fmt = os->setf(ios::scientific); // set scientific floating point output
2828 *os <<" Z , Semi-axis-x , Semi-axis-y " << endl;
2829 fmt = os->setf(ios::scientific); // set scientific floating point output
2830 *os << setprecision(16) << fDz <<"\t";
2831 *os << setprecision(16) << fP0 << "\t";
2832 *os << setprecision(16) << fP1 << endl;
2833 os->flags(fmt); // reset back to old formating.
2837 //______________________________________________________________________
2838 void AliITSTubeEllipticalData::Read(istream *is){
2839 // Read in data kept in this class
2841 // istream *is the input stream
2848 AliITSBaseVolParams::Read(is);
2851 *is >> fDz >> fP0 >> fP1;
2853 //______________________________________________________________________
2854 ostream &operator<<(ostream &os,AliITSTubeEllipticalData &p){
2855 // Operator << for C++ like output
2857 // ostream &os The output stream
2858 // AliITSTubeData &p The class to be outputed
2862 // ostream &os The output stream
2867 //______________________________________________________________________
2868 istream &operator>>(istream &is,AliITSTubeEllipticalData &r){
2869 // Operator << for C++ like output
2871 // istream &is The input stream
2872 // AliITSTubeData &r The class to be read in
2876 // istream &is The input stream
2881 //======================================================================
2882 ClassImp(AliITSTubeHyperbolicData)
2883 //______________________________________________________________________
2884 void AliITSTubeHyperbolicData::Print(ostream *os){
2885 // Prints out the data kept in this class
2887 // ostream *os The output stream pointer
2893 #if defined __GNUC__
2900 #if defined __ICC || defined __ECC
2907 AliITSBaseVolParams::Print(os);
2908 fmt = os->setf(ios::scientific); // set scientific floating point output
2909 *os <<" Z Rmin Rmax Theta"<<endl;
2910 fmt = os->setf(ios::scientific); // set scientific floating point output
2911 *os << setprecision(16) << fDz <<"\t";
2912 *os << setprecision(16) << fRmin << "\t";
2913 *os << setprecision(16) << fRmax << "\t";
2914 *os << setprecision(16) << fTheta << endl;
2915 os->flags(fmt); // reset back to old formating.
2919 //______________________________________________________________________
2920 void AliITSTubeHyperbolicData::Read(istream *is){
2921 // Read in data kept in this class
2923 // istream *is the input stream
2930 AliITSBaseVolParams::Read(is);
2933 *is >> fDz >> fRmin >> fRmax >> fTheta;
2935 //______________________________________________________________________
2936 ostream &operator<<(ostream &os,AliITSTubeHyperbolicData &p){
2937 // Operator << for C++ like output
2939 // ostream &os The output stream
2940 // AliITSTubeData &p The class to be outputed
2944 // ostream &os The output stream
2949 //______________________________________________________________________
2950 istream &operator>>(istream &is,AliITSTubeHyperbolicData &r){
2951 // Operator << for C++ like output
2953 // istream &is The input stream
2954 // AliITSTubeData &r The class to be read in
2958 // istream &is The input stream
2963 //======================================================================
2964 ClassImp(AliITSConeData)
2965 //______________________________________________________________________
2966 void AliITSConeData::Print(ostream *os){
2967 // Prints out the data kept in this class
2969 // ostream *os The output stream pointer
2975 #if defined __GNUC__
2982 #if defined __ICC || defined __ECC
2989 AliITSBaseVolParams::Print(os);
2990 fmt = os->setf(ios::scientific); // set scientific floating point output
2991 *os <<" Z Rmin Rmax" << endl;
2992 fmt = os->setf(ios::scientific); // set scientific floating point output
2993 *os << setprecision(16) << fDz <<"\t";
2994 *os << setprecision(16) << fRmin0 << "\t";
2995 *os << setprecision(16) << fRmax0 << endl;
2996 *os << setprecision(16) << fDz <<"\t";
2997 *os << setprecision(16) << fRmin1 << "\t";
2998 *os << setprecision(16) << fRmax1 << endl;
2999 os->flags(fmt); // reset back to old formating.
3002 //______________________________________________________________________
3003 void AliITSConeData::Read(istream *is){
3004 // Read in data kept in this class
3006 // istream *is the input stream
3013 AliITSBaseVolParams::Read(is);
3016 *is >> fDz >> fRmin0 >> fRmax0;
3017 *is >> fDz >> fRmin1 >> fRmax1;
3019 //______________________________________________________________________
3020 ostream &operator<<(ostream &os,AliITSConeData &p){
3021 // Operator << for C++ like output
3023 // ostream &os The output stream
3024 // AliITSTubeData &p The class to be outputed
3028 // ostream &os The output stream
3033 //______________________________________________________________________
3034 istream &operator>>(istream &is,AliITSConeData &r){
3035 // Operator << for C++ like output
3037 // istream &is The input stream
3038 // AliITSTubeData &r The class to be read in
3042 // istream &is The input stream
3047 //======================================================================
3048 ClassImp(AliITSConeSegData)
3049 //______________________________________________________________________
3050 void AliITSConeSegData::Print(ostream *os){
3051 // Prints out the data kept in this class
3053 // ostream *os The output stream pointer
3059 #if defined __GNUC__
3066 #if defined __ICC || defined __ECC
3073 AliITSBaseVolParams::Print(os);
3074 fmt = os->setf(ios::scientific); // set scientific floating point output
3075 *os << "fPhi0=" << fPhi0 << " fPhi1=" << fPhi1 << endl;
3076 *os <<" Z , Rmin , Rmax " << endl;
3077 fmt = os->setf(ios::scientific); // set scientific floating point output
3078 *os << setprecision(16) << fDz <<"\t";
3079 *os << setprecision(16) << fRmin0 << "\t";
3080 *os << setprecision(16) << fRmax0 << endl;
3081 *os << setprecision(16) << fDz <<"\t";
3082 *os << setprecision(16) << fRmin1 << "\t";
3083 *os << setprecision(16) << fRmax1 << endl;
3084 os->flags(fmt); // reset back to old formating.
3087 //______________________________________________________________________
3088 void AliITSConeSegData::Read(istream *is){
3089 // Read in data kept in this class
3091 // istream *is the input stream
3098 AliITSBaseVolParams::Read(is);
3104 *is >> fDz >> fRmin0 >> fRmax0;
3105 *is >> fDz >> fRmin1 >> fRmax1;
3107 //______________________________________________________________________
3108 ostream &operator<<(ostream &os,AliITSConeSegData &p){
3109 // Operator << for C++ like output
3111 // ostream &os The output stream
3112 // AliITSConeSegData &p The class to be outputed
3116 // ostream &os The output stream
3121 //______________________________________________________________________
3122 istream &operator>>(istream &is,AliITSConeSegData &r){
3123 // Operator << for C++ like output
3125 // istream &is The input stream
3126 // AliITSConeSegData &r The class to be read in
3130 // istream &is The input stream
3135 //======================================================================
3136 ClassImp(AliITSPConeData)
3137 //______________________________________________________________________
3138 void AliITSPConeData::Print(ostream *os){
3139 // Prints out the data kept in this class
3141 // ostream *os The output stream pointer
3148 #if defined __GNUC__
3155 #if defined __ICC || defined __ECC
3162 AliITSBaseVolParams::Print(os);
3163 fmt = os->setf(ios::scientific); // set scientific floating point output
3164 *os << "fNz=" << fNz << " fPhi0=" << fPhi0 << " fdPhi=" << fDphi << endl;
3165 *os <<" Z , Rmin , Rmax " << endl;
3166 fmt = os->setf(ios::scientific); // set scientific floating point output
3168 *os << setprecision(16) << fZ[i] <<"\t";
3169 *os << setprecision(16) << fRmin[i] << "\t";
3170 *os << setprecision(16) << fRmax[i] << endl;
3172 os->flags(fmt); // reset back to old formating.
3175 //______________________________________________________________________
3176 void AliITSPConeData::Read(istream *is){
3177 // Read in data kept in this class
3179 // istream *is the input stream
3187 AliITSBaseVolParams::Read(is);
3197 *is >> fZ[i] >> fRmin[i] >> fRmax[i];
3200 //______________________________________________________________________
3201 ostream &operator<<(ostream &os,AliITSPConeData &p){
3202 // Operator << for C++ like output
3204 // ostream &os The output stream
3205 // AliITSPConeData &p The class to be outputed
3209 // ostream &os The output stream
3214 //______________________________________________________________________
3215 istream &operator>>(istream &is,AliITSPConeData &r){
3216 // Operator << for C++ like output
3218 // istream &is The input stream
3219 // AliITSPConeData &r The class to be read in
3223 // istream &is The input stream
3228 //======================================================================
3229 ClassImp(AliITSSphereData)
3230 //______________________________________________________________________
3231 void AliITSSphereData::Print(ostream *os){
3232 // Prints out the data kept in this class
3234 // ostream *os The output stream pointer
3240 #if defined __GNUC__
3247 #if defined __ICC || defined __ECC
3254 AliITSBaseVolParams::Print(os);
3255 fmt = os->setf(ios::scientific); // set scientific floating point output
3256 *os << "fTheta[0]=" << fTheta[0] << " fTheta[1]=" << fTheta[1] << endl;
3257 *os << "fPhi[0]=" << fPhi[0] << " fPhi[1]=" << fPhi[1] << endl;
3258 *os <<" Rmin , Rmax " << endl;
3259 fmt = os->setf(ios::scientific); // set scientific floating point output
3260 *os << setprecision(16) << fRmin << "\t";
3261 *os << setprecision(16) << fRmax << endl;
3262 os->flags(fmt); // reset back to old formating.
3265 //______________________________________________________________________
3266 void AliITSSphereData::Read(istream *is){
3267 // Read in data kept in this class
3269 // istream *is the input stream
3276 AliITSBaseVolParams::Read(is);
3286 *is >>fRmin >> fRmax;
3288 //______________________________________________________________________
3289 ostream &operator<<(ostream &os,AliITSSphereData &p){
3290 // Operator << for C++ like output
3292 // ostream &os The output stream
3293 // AliITSPConeData &p The class to be outputed
3297 // ostream &os The output stream
3302 //______________________________________________________________________
3303 istream &operator>>(istream &is,AliITSSphereData &r){
3304 // Operator << for C++ like output
3306 // istream &is The input stream
3307 // AliITSPConeData &r The class to be read in
3311 // istream &is The input stream
3316 //======================================================================
3317 ClassImp(AliITSParallelpipedData)
3318 //______________________________________________________________________
3319 void AliITSParallelpipedData::Print(ostream *os){
3320 // Prints out the data kept in this class
3322 // ostream *os The output stream pointer
3328 #if defined __GNUC__
3335 #if defined __ICC || defined __ECC
3342 AliITSBaseVolParams::Print(os);
3343 fmt = os->setf(ios::scientific); // set scientific floating point output
3344 *os << "fDx=" << fDx << " fDy=" << fDy << " fDz=" << fDz << endl;
3345 *os << "fAlpha=" << fAlpha << " fTheta=" << fTheta <<" fPhi="<<fPhi<<endl;
3346 os->flags(fmt); // reset back to old formating.
3349 //______________________________________________________________________
3350 void AliITSParallelpipedData::Read(istream *is){
3351 // Read in data kept in this class
3353 // istream *is the input stream
3360 AliITSBaseVolParams::Read(is);
3374 //______________________________________________________________________
3375 ostream &operator<<(ostream &os,AliITSParallelpipedData &p){
3376 // Operator << for C++ like output
3378 // ostream &os The output stream
3379 // AliITSBoxData &p The class to be outputed
3383 // ostream &os The output stream
3388 //______________________________________________________________________
3389 istream &operator>>(istream &is,AliITSParallelpipedData &r){
3390 // Operator << for C++ like output
3392 // istream &is The input stream
3393 // AliITSBoxData &r The class to be read in
3397 // istream &is The input stream
3402 //======================================================================
3403 ClassImp(AliITSPGonData)
3404 //______________________________________________________________________
3405 void AliITSPGonData::Print(ostream *os){
3406 // Prints out the data kept in this class
3408 // ostream *os The output stream pointer
3415 #if defined __GNUC__
3422 #if defined __ICC || defined __ECC
3429 AliITSBaseVolParams::Print(os);
3430 fmt = os->setf(ios::scientific); // set scientific floating point output
3431 fmt = os->setf(ios::scientific); // set scientific floating point output
3432 *os << "fNz=" << fNz << " fNphi=" << fNphi << " fPhi0=" << fPhi0;
3433 *os << " fdPhi=" << fDphi << endl;
3434 *os <<" Z , Rmin , Rmax " << endl;
3436 *os << setprecision(16) << fZ[i] <<"\t";
3437 *os << setprecision(16) << fRmin[i] << "\t";
3438 *os << setprecision(16) << fRmax[i] << endl;
3440 os->flags(fmt); // reset back to old formating.
3443 //______________________________________________________________________
3444 void AliITSPGonData::Read(istream *is){
3445 // Read in data kept in this class
3447 // istream *is the input stream
3455 AliITSBaseVolParams::Read(is);
3469 *is >> fZ[i] >> fRmin[i] >> fRmax[i];
3472 //______________________________________________________________________
3473 ostream &operator<<(ostream &os,AliITSPGonData &p){
3474 // Operator << for C++ like output
3476 // ostream &os The output stream
3477 // AliITSPGonData &p The class to be outputed
3481 // ostream &os The output stream
3486 //______________________________________________________________________
3487 istream &operator>>(istream &is,AliITSPGonData &r){
3488 // Operator << for C++ like output
3490 // istream &is The input stream
3491 // AliITSPGonData &r The class to be read in
3495 // istream &is The input stream