1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.4 2003/04/17 22:29:23 nilsen
19 Geometry bug fixes and the like. Work still progressing.
21 Revision 1.3 2003/03/27 08:49:39 hristov
22 Initialization of static data members in the implementation file
24 Revision 1.2 2003/03/25 23:27:19 nilsen
25 ITS new Geometry files. Not yet ready for uses, committed to allow additional
28 Revision 1.1 2003/02/10 17:03:52 nilsen
29 New version and structure of ITS V11 geometry. Work still in progress.
36 A base geometry class defining all of the ITS volumes that make up an ITS
40 Created February 2003.
43 #include <Riostream.h>
48 #include <TGeometry.h>
54 #include <TFile.h> // only required for Tracking function?
56 #include <TObjArray.h>
57 #include <TLorentzVector.h>
58 #include <TObjString.h>
59 #include <TClonesArray.h>
65 #include "AliITSBaseGeometry.h"
67 ClassImp(AliITSBaseGeometry)
69 const Double_t AliITSBaseGeometry::fAlpha = 7.297352533e-3;
70 const Double_t AliITSBaseGeometry::fRe = 2.81794028e-13;
71 const Double_t AliITSBaseGeometry::fNa = 6.02214199e+23;
72 Int_t AliITSBaseGeometry::fNCreates = 0;
73 Int_t* AliITSBaseGeometry::fidrot = 0;
74 Int_t AliITSBaseGeometry::fidrotsize = 0;
75 Int_t AliITSBaseGeometry::fidrotlast = 0;
76 Int_t AliITSBaseGeometry::fVolNameSize = 0;
77 Int_t AliITSBaseGeometry::fVolNameLast = 0;
78 TString* AliITSBaseGeometry::fVolName = 0;
80 //______________________________________________________________________
81 AliITSBaseGeometry::AliITSBaseGeometry(){
82 // Default construtor for the ITS Base Geometry class.
90 fScale = 1.0; // Default value.
91 fits = 0; // zero pointers.
92 if(fNCreates==0){ // only for very first init
94 fNCreates++; // incrament this creation counter.
96 //______________________________________________________________________
97 AliITSBaseGeometry::AliITSBaseGeometry(AliModule *its,Int_t iflag){
98 // Standard construtor for the ITS Base Geometry class.
100 // Int_t iflag flag to indecate specific swiches in the geometry
106 fScale = 1.0; // Default value.
107 fits = its; // get a copy of the pointer to the ITS.
108 if(fNCreates==0){ // only for very first init
109 fidrotsize = ITSG3VnameToIndex("TSV")+1;
110 fidrot = new Int_t[fidrotsize];
113 fNCreates++; // incrament this creation counter.
115 //______________________________________________________________________
116 AliITSBaseGeometry::~AliITSBaseGeometry(){
117 // Standeard destructor for the ITS Base Geometry class.
119 // Int_t iflag flag to indecate specific swiches in the geometry
125 fits = 0; // This class does not own this class. It contaitns a pointer
126 // to it for conveniance.
128 if(fNCreates==0){ // Now delete the static members
131 for(i=0;i<fVolNameLast;i++) delete fVolName[i];
137 fidrotsize = fidrotlast = 0;
140 //______________________________________________________________________
141 Int_t AliITSBaseGeometry::AddVolName(const TString name){
142 // Checks if the volume name already exist, if not it adds it to
143 // the list of volume names and returns an index to that volume name.
144 // it will create and expand the array of volume names as needed.
145 // If the volume name already exists, it will give an error message and
146 // return an index <0.
148 // const TString name Volume name to be added to the list.
152 // The index where this volume name is stored.
155 if(fVolName==0){ // must create array.
156 fVolNameSize = 38624;
157 fVolName = new TString[fVolNameSize];
160 for(i=0;i<fVolNameLast;i++) if(fVolName[i].CompareTo(name)==0){ // Error
161 Error("AddVolName","Volume name already exists for volume %d name %s",
165 if(fVolNameSize==fVolNameLast-1){ // Array is full must expand.
166 Int_t size = fVolNameSize*2;
167 TString *old = fVolName;
168 fVolName = new TString[fVolNameSize];
169 for(i=0;i<fVolNameLast;i++) fVolName[i] = old[i];
173 i=ITSIndexToITSG3name(fVolNameLast);
174 if(strcmp((char*)(&i),"ITSV")==0){
175 // Special Reserved Geant 3 volumen name. Skip it
176 // fill it with explination for conveniance.
177 fVolName[fVolNameLast] = "ITS Master Mother Volume";
180 fVolName[fVolNameLast] = name;
182 return fVolNameLast-1; // return the index
184 //______________________________________________________________________
185 Int_t AliITSBaseGeometry::ITSIndexToITSG3name(const Int_t i){
186 // Given the ITS volume index i, it returns the Geant3 ITS volume
187 // name. The valid characters must be in the range
188 // '0' through 'Z'. This will include all upper case letter and the
189 // numbers 0-9. In addition it does not will include the following simbols
192 // const Int_t i the ITS volume index
196 // char[4] with the ITS volume name starting from "I000" to "IZZZ"
197 const Int_t rangen=(Int_t)('9'-'0'+1); // range of numbers
198 const Int_t rangel=(Int_t)('Z'-'A'+1); // range of letters
199 const Int_t range = rangen+rangel; // the number of characters between
202 Byte_t *a = (Byte_t*) &k;
206 a[0] = (Byte_t)('I');
207 a[1] = (Byte_t)('0'+j/(range*range));
208 if(a[1]>'9') a[1] += 'A'-'9'-1;//if it is a letter add in gap for simples.
209 j -= range*range*((Int_t)(j/(range*range)));
210 a[2] = (Byte_t)('0'+j/range);
211 if(a[2]>'9') a[2] += 'A'-'9'-1;//if it is a letter add in gap for simples.
212 j -= range*((Int_t)(j/range));
213 a[3] = (Byte_t)('0'+j);
214 if(a[3]>'9') a[3] += 'A'-'9'-1;//if it is a letter add in gap for simples.
217 //______________________________________________________________________
218 Int_t AliITSBaseGeometry::ITSG3VnameToIndex(const char *name){
219 // Given the last three characters of the ITS Geant3 volume name,
220 // this returns the index. The valid characters must be in the range
221 // '0' through 'Z'. This will include all upper case letter and the
222 // numbers 0-9. In addition it will include the following simbles
225 // const char name[3] The last three characters of the ITS Geant3
231 const Int_t rangen = (Int_t)('9'-'0'+1); // range of numbers
232 const Int_t rangel = (Int_t)('Z'-'A'+1); // range of letters
233 const Int_t range = rangen+rangel; // the number of characters between
238 for(j=k;j>k-3;j--) if(isdigit(name[j])) // number
239 i += (Int_t)((name[j]-'0')*TMath::Power((Double_t)range,
242 i += (Int_t)((name[j]-'A'+rangen)*TMath::Power((Double_t)range,
246 //______________________________________________________________________
247 TString AliITSBaseGeometry::GetVolName(const Int_t i)const{
248 // Returns the volume name at a given index i. Index must be in
249 // range and the array of volume names must exist. If there is an
250 // error, a message is written and 0 is returned.
252 // const Int_t i Index
256 // A TString contianing the ITS volume name.
258 if(i<0||i>=fVolNameLast){
259 Error("GetVolName","Index=%d out of range but be witin 0<%d",i,
265 //______________________________________________________________________
266 Int_t AliITSBaseGeometry::GetVolumeIndex(const TString &a){
267 // Return the index corresponding the the volume name a. If the
268 // Volumen name is not found, return -1, and a warning message given.
270 // const TString &a Name of volume for which index is wanted.
274 // Int_t Index corresponding the volume a. If not found -1 is returned.
277 for(i=0;i<fVolNameLast;i++) if(fVolName[i].CompareTo(a)==0) return i;
278 Info("GetVolumeIndex","Volume name %s not found",a.Data());
281 //______________________________________________________________________
282 void AliITSBaseGeometry::Box(const char *gnam,const TString &dis,
283 Double_t dx,Double_t dy,Double_t dz,Int_t med){
284 // Interface to TMC->Gsvolu() for ITS box geometries. Box with faces
285 // perpendicular to the axes. It has 3 paramters. See SetScale() for
286 // units. Default units are geant 3 [cm].
288 // const char *gnam 3 character geant volume name. The letter "I"
289 // is appended to the front to indecate that this
291 // TString &dis String containging part discription.
292 // Double_t dx half-length of box in x-axis
293 // Double_t dy half-length of box in y-axis
294 // Double_t dz half-length of box in z-axis
295 // Int_t med media index number.
303 param[0] = fScale*dx;
304 param[1] = fScale*dy;
305 param[2] = fScale*dz;
307 gMC->Gsvolu(name,"BOX ",GetMed(med),param,3);
309 //______________________________________________________________________
310 void AliITSBaseGeometry::Box(AliITSBoxData &d,Int_t med){
311 // Interface to TMC->Gsvolu() for ITS box geometries. Box with faces
312 // perpendicular to the axes. It has 3 paramters. See SetScale() for
313 // units. Default units are geant 3 [cm].
315 // AliITSBoxData &d Structure with the Box parameters defined.
316 // Int_t med media index number.
324 char *j = (char *) &k;
326 param[0] = fScale*d.DxAt();
327 param[1] = fScale*d.DyAt();
328 param[2] = fScale*d.DzAt();
329 d.SetVid(AddVolName((d.GetName())->Data()));
330 k = ITSIndexToITSG3name(d.GetVid());
331 for(i=0;i<4;i++) name[i] = j[i];
333 gMC->Gsvolu(name,"BOX ",GetMed(med),param,3);
335 //______________________________________________________________________
336 void AliITSBaseGeometry::Trapezoid1(const char *gnam,const TString &dis,
337 Double_t dxn,Double_t dxp,Double_t dy,
338 Double_t dz,Int_t med){
339 // Interface to TMC->Gsvolu() for ITS TRD1 geometries. Trapezoid with the
340 // x dimension varing along z. It has 4 parameters. See SetScale() for
341 // units. Default units are geant 3 [cm].
343 // const char *gnam 3 character geant volume name. The letter "I"
344 // is appended to the front to indecate that this
346 // TString &dis String containging part discription.
347 // Double_t dxn half-length along x at the z surface positioned
349 // Double_t dxp half-length along x at the z surface positioned
351 // Double_t dy half-length along the y-axis
352 // Double_t dz half-length along the z-axis
353 // Int_t med media index number.
361 param[0] = fScale*dxn;
362 param[1] = fScale*dxp;
363 param[2] = fScale*dy;
364 param[3] = fScale*dz;
366 gMC->Gsvolu(name,"TRD1",GetMed(med),param,4);
368 //______________________________________________________________________
369 void AliITSBaseGeometry::Trapezoid1(AliITSTrapezoid1Data &d,Int_t med){
370 // Interface to TMC->Gsvolu() for ITS TRD1 geometries. Trapezoid with the
371 // x dimension varing along z. It has 4 parameters. See SetScale() for
372 // units. Default units are geant 3 [cm].
374 // AliITSTrapezoid1Data &d Structure with the Trapazoid data in it.
375 // Int_t med media index number.
383 char *j = (char *) &k;
385 param[0] = fScale*d.DxAt(0);
386 param[1] = fScale*d.DxAt(1);
387 param[2] = fScale*d.DyAt();
388 param[3] = fScale*d.DzAt();
389 d.SetVid(AddVolName((d.GetName())->Data()));
390 k = ITSIndexToITSG3name(d.GetVid());
391 for(i=0;i<4;i++) name[i] = j[i];
393 gMC->Gsvolu(name,"TRD1",GetMed(med),param,4);
395 //______________________________________________________________________
396 void AliITSBaseGeometry::Trapezoid2(const char *gnam,const TString &dis,
397 Double_t dxn,Double_t dxp,Double_t dyn,
398 Double_t dyp,Double_t dz,Int_t med){
399 // Interface to TMC->Gsvolu() for ITS TRD2 geometries. Trapezoid with the
400 // x and y dimension varing along z. It has 5 parameters. See SetScale()
401 // for units. Default units are geant 3 [cm].
403 // const char *gnam 3 character geant volume name. The letter "I"
404 // is appended to the front to indecate that this
406 // TString &dis String containging part discription.
407 // Double_t dxn half-length along x at the z surface positioned
409 // Double_t dxp half-length along x at the z surface positioned
411 // Double_t dyn half-length along x at the z surface positioned
413 // Double_t dyp half-length along x at the z surface positioned
415 // Double_t dz half-length along the z-axis
416 // Int_t med media index number.
424 param[0] = fScale*dxn;
425 param[1] = fScale*dxp;
426 param[2] = fScale*dyn;
427 param[3] = fScale*dyp;
428 param[4] = fScale*dz;
430 gMC->Gsvolu(name,"TRD2",GetMed(med),param,5);
432 //______________________________________________________________________
433 void AliITSBaseGeometry::Trapezoid2(AliITSTrapezoid2Data &d,Int_t med){
434 // Interface to TMC->Gsvolu() for ITS TRD2 geometries. Trapezoid with the
435 // x and y dimension varing along z. It has 5 parameters. See SetScale()
436 // for units. Default units are geant 3 [cm].
438 // AliITSTrapezoid2Data &d Structure with the Trapazoid data in it.
439 // Int_t med media index number.
447 char *j = (char *) &k;
449 param[0] = fScale*d.DxAt(0);
450 param[1] = fScale*d.DxAt(1);
451 param[2] = fScale*d.DyAt(0);
452 param[3] = fScale*d.DyAt(1);
453 param[4] = fScale*d.DzAt();
454 d.SetVid(AddVolName((d.GetName())->Data()));
455 k = ITSIndexToITSG3name(d.GetVid());
456 for(i=0;i<4;i++) name[i] = j[i];
458 gMC->Gsvolu(name,"TRD2",GetMed(med),param,5);
460 //______________________________________________________________________
461 void AliITSBaseGeometry::Trapezoid(const char *gnam,const TString &dis,
462 Double_t dz,Double_t thet,Double_t phi,
463 Double_t h1,Double_t bl1,Double_t tl1,
464 Double_t alp1,Double_t h2,Double_t bl2,
465 Double_t tl2,Double_t alp2,Int_t med){
466 // Interface to TMC->Gsvolu() for ITS TRAP geometries. General Trapezoid,
467 // The faces perpendicular to z are trapezia and their centers are not
468 // necessarily on a line parallel to the z axis. This shape has 11
469 // parameters, but only cosidering that the faces should be planar, only
470 // 9 are really independent. A check is performed on the user parameters
471 // and a message is printed in case of non-planar faces. Ignoring this
472 // warning may cause unpredictable effects at tracking time. See
473 // SetScale() for units. Default units are geant 3 [cm].
475 // const char *gnam 3 character geant volume name. The letter "I"
476 // is appended to the front to indecate that this
478 // TString &dis String containging part discription.
479 // Double_t dz Half-length along the z-asix
480 // Double_t thet Polar angle of the line joing the center of the
481 // face at -dz to the center of the one at dz
483 // Double_t phi aximuthal angle of the line joing the center of
484 // the face at -dz to the center of the one at +dz
486 // Double_t h1 half-length along y of the face at -dz.
487 // Double_t bl1 half-length along x of the side at -h1 in y of
488 // the face at -dz in z.
489 // Double_t tl1 half-length along x of teh side at +h1 in y of
490 // the face at -dz in z.
491 // Double_t alp1 angle with respect to the y axis from the
492 // center of the side at -h1 in y to the cetner
493 // of the side at +h1 in y of the face at -dz in z
495 // Double_t h2 half-length along y of the face at +dz
496 // Double_t bl2 half-length along x of the side at -h2 in y of
497 // the face at +dz in z.
498 // Double_t tl2 half-length along x of the side at _h2 in y of
499 // the face at +dz in z.
500 // Double_t alp2 angle with respect to the y axis from the
501 // center of the side at -h2 in y to the center
502 // of the side at +h2 in y of the face at +dz in z
504 // Int_t med media index number.
512 param[0] = fScale*dz;
515 param[3] = fScale*h1;
516 param[4] = fScale*bl1;
517 param[5] = fScale*tl1;
519 param[7] = fScale*h2;
520 param[8] = fScale*bl2;
521 param[9] = fScale*tl2;
524 gMC->Gsvolu(name,"TRAP",GetMed(med),param,11);
526 //______________________________________________________________________
527 void AliITSBaseGeometry::Trapezoid(AliITSTrapezoidData &d,Int_t med){
528 // Interface to TMC->Gsvolu() for ITS TRAP geometries. General Trapezoid,
529 // The faces perpendicular to z are trapezia and their centers are not
530 // necessarily on a line parallel to the z axis. This shape has 11
531 // parameters, but only cosidering that the faces should be planar, only
532 // 9 are really independent. A check is performed on the user parameters
533 // and a message is printed in case of non-planar faces. Ignoring this
534 // warning may cause unpredictable effects at tracking time. See
535 // SetScale() for units. Default units are geant 3 [cm].
537 // AliITSTrapezoidData &d Structure with the Trapazoid data in it.
538 // Int_t med media index number.
546 char *j = (char *) &k;
548 param[0] = fScale*d.DzAt();
549 param[1] = d.Theta();
551 param[3] = fScale*d.HAt(0);
552 param[4] = fScale*d.Bl(0);
553 param[5] = fScale*d.Tl(0);
554 param[6] = d.Alpha(0);
555 param[7] = fScale*d.HAt(1);
556 param[8] = fScale*d.Bl(1);
557 param[9] = fScale*d.Tl(1);
558 param[10] = d.Alpha(1);
559 d.SetVid(AddVolName((d.GetName())->Data()));
560 k = ITSIndexToITSG3name(d.GetVid());
561 for(i=0;i<4;i++) name[i] = j[i];
563 gMC->Gsvolu(name,"TRAP",GetMed(med),param,11);
565 //______________________________________________________________________
566 void AliITSBaseGeometry::TwistedTrapezoid(const char *gnam,
568 Double_t dz,Double_t thet,Double_t phi,
569 Double_t twist,Double_t h1,Double_t bl1,
570 Double_t tl1,Double_t apl1,Double_t h2,
571 Double_t bl2,Double_t tl2,Double_t apl2,
573 // Interface to TMC->Gsvolu() for ITS GTRA geometries. General twisted
574 // trapazoid. The faces perpendicular to z are trapazia and their centers
575 // are not necessarily on a line parallel to the z axis as the TRAP.
576 // Additionally, the faces may be twisted so that none of their edges are
577 // parallel. It is a TRAP shape, exept that it is twisted in the x-y
578 // plane as a function of z. The parallel sides perpendicular to the x
579 // axis are rotated with respect to the x axis by an angle TWIST, which
580 // is one of the parameters. The shape is defined by the eight corners
581 // and is assumed to be constructed of straight lines joingin points on
582 // the boundry of the trapezoidal face at Z=-dz to the coresponding
583 // points on the face at z=+dz. Divisions are not allowed. It has 12
584 // parameters. See SetScale() for units. Default units are geant 3 [cm].
585 // Note: This shape suffers from the same limitations than the TRAP. The
586 // tracking routines assume that the faces are planar, but htis
587 // constraint is not easily expressed in terms of the 12 parameters.
588 // Additionally, no check on th efaces is performed in this case. Users
589 // should avoid to use this shape as much as possible, and if they have
590 // to do so, they should make sure that the faces are really planes.
591 // If this is not the case, the result of the trasport is unpredictable.
592 // To accelerat ethe computations necessary for trasport, 18 additioanl
593 // parameters are calculated for this shape are 1 DXODZ dx/dz of the
594 // line joing the centers of the faces at z=+_dz. 2 DYODZ dy/dz of the
595 // line joing the centers of the faces at z=+_dz.
596 // 3 XO1 x at z=0 for line joing the + on parallel side, perpendicular
597 // corners at z=+_dz.
598 // 4 YO1 y at z=0 for line joing the + on parallel side, + on
599 // perpendicular corners at z=+-dz.
600 // 5 DXDZ1 dx/dz for line joing the + on parallel side, + on
601 // perpendicular corners at z=+-dz.
602 // 6 DYDZ1 dy/dz for line joing the + on parallel side, + on
603 // perpendicular corners at z=+-dz.
604 // 7 X02 x at z=0 for line joing the - on parallel side, + on
605 // perpendicular corners at z=+-dz.
606 // 8 YO2 y at z=0 for line joing the - on parallel side, + on
607 // perpendicular corners at z=+-dz.
608 // 9 DXDZ2 dx/dz for line joing the - on parallel side, + on
609 // perpendicular corners at z=+-dz.
610 // 10 DYDZ2dy/dz for line joing the - on parallel side, + on
611 // perpendicular corners at z=+-dz.
612 // 11 XO3 x at z=0 for line joing the - on parallel side, - on
613 // perpendicular corners at z=+-dz.
614 // 12 YO3 y at z=0 for line joing the - on parallel side, - on
615 // perpendicular corners at z=+-dz.
616 // 13 DXDZ3 dx/dzfor line joing the - on parallel side, - on
617 // perpendicular corners at z=+-dz.
618 // 14 DYDZ3 dydz for line joing the - on parallel side, - on
619 // perpendicular corners at z=+-dz.
620 // 15 XO4 x at z=0 for line joing the + on parallel side, - on
621 // perpendicular corners at z=+-dz.
622 // 16 YO4 y at z=0 for line joing the + on parallel side, - on
623 // perpendicular corners at z=+-dz.
624 // 17 DXDZ4 dx/dz for line joing the + on parallel side, - on
625 // perpendicular corners at z=+-dz.
626 // 18 DYDZ4 dydz for line joing the + on parallel side, - on
627 // perpendicular corners at z=+-dz.
629 // const char *gnam 3 character geant volume name. The letter "I"
630 // is appended to the front to indecate that this
632 // TString &dis String containging part discription.
633 // Double_t dz half-length along the z axis.
634 // Double_t thet polar angle of the line joing the center of the
635 // face at -dz to the center of the one at +dz
637 // Double_t phi Azymuthal angle of teh line joing the centre of
638 // the face at -dz to the center of the one at +dz
640 // Double_t twist Twist angle of the faces parallel to the x-y
641 // plane at z=+-dz around an axis parallel to z
642 // passing through their centre [degrees].
643 // Double_t h1 Half-length along y of the face at -dz.
644 // Double_t bl1 half-length along x of the side -h1 in y of the
646 // Double_t tl1 half-length along x of the side at +h1 in y of
647 // the face at -dz in z.
648 // Double_t apl1 Angle with respect to the y ais from the center
649 // of the side at -h1 in y to the centere of the
650 // side at +h1 in y of the face at -dz in z
652 // Double_t h2 half-length along the face at +dz.
653 // Double_t bl2 half-length along x of the side at -h2 in y of
654 // the face at -dz in z.
655 // Double_t tl2 half-length along x of the side at +h2 in y of
656 // the face at +dz in z.
657 // Double_t apl2 angle with respect to the y axis from the
658 // center of the side at -h2 in y to the center
659 // of the side at +h2 in y of the face at +dz in
661 // Int_t med media index number.
669 param[0] = fScale*dz;
673 param[4] = fScale*h1;
674 param[5] = fScale*bl1;
675 param[6] = fScale*tl1;
677 param[8] = fScale*h2;
678 param[9] = fScale*bl2;
679 param[10] = fScale*tl2;
682 gMC->Gsvolu(name,"GTRA",GetMed(med),param,12);
684 //______________________________________________________________________
685 void AliITSBaseGeometry::TwistedTrapezoid(AliITSTrapezoidTwistedData &d,
687 // Interface to TMC->Gsvolu() for ITS GTRA geometries. General twisted
688 // trapazoid. The faces perpendicular to z are trapazia and their centers
689 // are not necessarily on a line parallel to the z axis as the TRAP.
690 // Additionally, the faces may be twisted so that none of their edges are
691 // parallel. It is a TRAP shape, exept that it is twisted in the x-y
692 // plane as a function of z. The parallel sides perpendicular to the x
693 // axis are rotated with respect to the x axis by an angle TWIST, which
694 // is one of the parameters. The shape is defined by the eight corners
695 // and is assumed to be constructed of straight lines joingin points on
696 // the boundry of the trapezoidal face at Z=-dz to the coresponding
697 // points on the face at z=+dz. Divisions are not allowed. It has 12
698 // parameters. See SetScale() for units. Default units are geant 3 [cm].
699 // Note: This shape suffers from the same limitations than the TRAP. The
700 // tracking routines assume that the faces are planar, but htis
701 // constraint is not easily expressed in terms of the 12 parameters.
702 // Additionally, no check on th efaces is performed in this case. Users
703 // should avoid to use this shape as much as possible, and if they have
704 // to do so, they should make sure that the faces are really planes.
705 // If this is not the case, the result of the trasport is unpredictable.
706 // To accelerat ethe computations necessary for trasport, 18 additioanl
707 // parameters are calculated for this shape are 1 DXODZ dx/dz of the
708 // line joing the centers of the faces at z=+_dz. 2 DYODZ dy/dz of the
709 // line joing the centers of the faces at z=+_dz.
710 // 3 XO1 x at z=0 for line joing the + on parallel side, perpendicular
711 // corners at z=+_dz.
712 // 4 YO1 y at z=0 for line joing the + on parallel side, + on
713 // perpendicular corners at z=+-dz.
714 // 5 DXDZ1 dx/dz for line joing the + on parallel side, + on
715 // perpendicular corners at z=+-dz.
716 // 6 DYDZ1 dy/dz for line joing the + on parallel side, + on
717 // perpendicular corners at z=+-dz.
718 // 7 X02 x at z=0 for line joing the - on parallel side, + on
719 // perpendicular corners at z=+-dz.
720 // 8 YO2 y at z=0 for line joing the - on parallel side, + on
721 // perpendicular corners at z=+-dz.
722 // 9 DXDZ2 dx/dz for line joing the - on parallel side, + on
723 // perpendicular corners at z=+-dz.
724 // 10 DYDZ2dy/dz for line joing the - on parallel side, + on
725 // perpendicular corners at z=+-dz.
726 // 11 XO3 x at z=0 for line joing the - on parallel side, - on
727 // perpendicular corners at z=+-dz.
728 // 12 YO3 y at z=0 for line joing the - on parallel side, - on
729 // perpendicular corners at z=+-dz.
730 // 13 DXDZ3 dx/dzfor line joing the - on parallel side, - on
731 // perpendicular corners at z=+-dz.
732 // 14 DYDZ3 dydz for line joing the - on parallel side, - on
733 // perpendicular corners at z=+-dz.
734 // 15 XO4 x at z=0 for line joing the + on parallel side, - on
735 // perpendicular corners at z=+-dz.
736 // 16 YO4 y at z=0 for line joing the + on parallel side, - on
737 // perpendicular corners at z=+-dz.
738 // 17 DXDZ4 dx/dz for line joing the + on parallel side, - on
739 // perpendicular corners at z=+-dz.
740 // 18 DYDZ4 dydz for line joing the + on parallel side, - on
741 // perpendicular corners at z=+-dz.
743 // AliITSTrapezoidTwistedData &d Structure with the tube parameters
744 // Int_t med media index number.
752 char *j = (char *) &k;
754 param[0] = fScale*d.DzAt();
755 param[1] = d.Theta();
757 param[3] = d.Twist();
758 param[4] = fScale*d.HAt(0);
759 param[5] = fScale*d.Bl(0);
760 param[6] = fScale*d.Tl(0);
761 param[7] = d.Alpha(0);
762 param[8] = fScale*d.HAt(1);
763 param[9] = fScale*d.Bl(1);
764 param[10] = fScale*d.Tl(1);
765 param[11] = d.Alpha(1);
766 d.SetVid(AddVolName((d.GetName())->Data()));
767 k = ITSIndexToITSG3name(d.GetVid());
768 for(i=0;i<4;i++) name[i] = j[i];
770 gMC->Gsvolu(name,"GTRA",GetMed(med),param,12);
772 //______________________________________________________________________
773 void AliITSBaseGeometry::Tube(const char *gnam,const TString &dis,
774 Double_t rmin,Double_t rmax,Double_t dz,
776 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Simple Tube. It has
777 // 3 parameters. See SetScale()
778 // for units. Default units are geant 3 [cm].
780 // const char *gnam 3 character geant volume name. The letter "I"
781 // is appended to the front to indecate that this
783 // TString &dis String containging part discription.
784 // Double_t rmin Inside Radius.
785 // Double_t rmax Outside Radius.
786 // Double_t dz half-length along the z-axis
787 // Int_t med media index number.
795 param[0] = fScale*rmin;
796 param[1] = fScale*rmax;
797 param[2] = fScale*dz;
799 gMC->Gsvolu(name,"TUBE",GetMed(med),param,3);
801 //______________________________________________________________________
802 void AliITSBaseGeometry::Tube(AliITSTubeData &d,Int_t med){
803 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Simple Tube. It has
804 // 3 parameters. See SetScale()
805 // for units. Default units are geant 3 [cm].
807 // AliITSTubeData &d Structure with the tube parameters
808 // Int_t med media index number.
816 char *j = (char *) &k;
818 param[0] = fScale*d.Rmin();
819 param[1] = fScale*d.Rmax();
820 param[2] = fScale*d.DzAt();
821 d.SetVid(AddVolName((d.GetName())->Data()));
822 k = ITSIndexToITSG3name(d.GetVid());
823 for(i=0;i<4;i++) name[i] = j[i];
825 gMC->Gsvolu(name,"TUBE",GetMed(med),param,3);
827 //______________________________________________________________________
828 void AliITSBaseGeometry::TubeSegment(const char *gnam,const TString &dis,
829 Double_t rmin,Double_t rmax,Double_t dz,
830 Double_t phi1,Double_t phi2,Int_t med){
831 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Phi segment of a
832 // tube. It has 5 parameters. Phi1 should be smaller than phi2. If this
833 // is not the case, the system adds 360 degrees to phi2. See SetScale()
834 // for units. Default units are geant 3 [cm].
836 // const char *gnam 3 character geant volume name. The letter "I"
837 // is appended to the front to indecate that this
839 // TString &dis String containging part discription.
840 // Double_t rmin Inside Radius.
841 // Double_t rmax Outside Radius.
842 // Double_t dz half-length along the z-axis
843 // Double_t phi1 Starting angle of the segment [degree].
844 // Double_t phi2 Ending angle of the segment [degree].
845 // Int_t med media index number.
853 param[0] = fScale*rmin;
854 param[1] = fScale*rmax;
855 param[2] = fScale*dz;
859 gMC->Gsvolu(name,"TUBS",GetMed(med),param,5);
861 //______________________________________________________________________
862 void AliITSBaseGeometry::TubeSegment(AliITSTubeSegData &d,Int_t med){
863 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Phi segment of a
864 // tube. It has 5 parameters. Phi1 should be smaller than phi2. If this
865 // is not the case, the system adds 360 degrees to phi2. See SetScale()
866 // for units. Default units are geant 3 [cm].
868 // AliITSTubeSegData &d Structure with the tube parameters
869 // Int_t med media index number.
877 char *j = (char *) &k;
879 param[0] = fScale*d.Rmin();
880 param[1] = fScale*d.Rmax();
881 param[2] = fScale*d.DzAt();
884 d.SetVid(AddVolName((d.GetName())->Data()));
885 k = ITSIndexToITSG3name(d.GetVid());
886 for(i=0;i<4;i++) name[i] = j[i];
888 gMC->Gsvolu(name,"TUBS",GetMed(med),param,5);
890 //______________________________________________________________________
891 void AliITSBaseGeometry::CutTube(const char *gnam,const TString &dis,
892 Double_t rmin,Double_t rmax,Double_t dz,
893 Double_t phi1,Double_t phi2,Double_t lx,
894 Double_t ly,Double_t lz,Double_t hx,
895 Double_t hy,Double_t hz,Int_t med){
896 // Interface to TMC->Gsvolu() for ITS CTUB geometries. Cut tube. A tube
897 // cut at the extremities with planes not necessarily perpendicular to
898 // the z axis. It has 11 parameters. See SetScale() for units. Default
899 // units are geant 3 [cm]. phi1 should be smaller than phi2. If this is
900 // not the case, the system adds 360 degrees to phi2.
902 // const char *gnam 3 character geant volume name. The letter "I"
903 // is appended to the front to indecate that this
905 // TString &dis String containging part discription.
906 // Double_t rmin Inner radius at z=0 where tube is narrowest.
907 // Double_t rmax Outer radius at z=0 where tube is narrowest.
908 // Double_t dz half-length along the z-axis
909 // Double_t phi1 Starting angle of the segment [degree].
910 // Double_t phi2 Ending angle of the segment [degree].
911 // Double_t lx x component of a unit vector perpendicular to
913 // Double_t ly y component of a unit vector perpendicular to
915 // Double_t lz z component of a unit vector perpendicular to
917 // Double_t hx x component of a unit vector perpendicular to
919 // Double_t hy y component of a unit vector perpendicular to
921 // Double_t hz z component of a unit vector perpendicular to
923 // Int_t med media index number.
931 param[0] = fScale*rmin;
932 param[1] = fScale*rmax;
933 param[2] = fScale*dz;
943 gMC->Gsvolu(name,"CTUB",GetMed(med),param,11);
945 //______________________________________________________________________
946 void AliITSBaseGeometry::CutTube(AliITSTubeCutData &d,Int_t med){
947 // Interface to TMC->Gsvolu() for ITS CTUB geometries. Cut tube. A tube
948 // cut at the extremities with planes not necessarily perpendicular to
949 // the z axis. It has 11 parameters. See SetScale() for units. Default
950 // units are geant 3 [cm]. phi1 should be smaller than phi2. If this is
951 // not the case, the system adds 360 degrees to phi2.
953 // AliITSTubeCutData &d Structure with the tube parameters
954 // Int_t med media index number.
962 char *j = (char *) &k;
964 param[0] = fScale*d.Rmin();
965 param[1] = fScale*d.Rmax();
966 param[2] = fScale*d.DzAt();
969 param[5] = d.Normal(0,0);
970 param[6] = d.Normal(0,1);
971 param[7] = d.Normal(0,2);
972 param[8] = d.Normal(1,0);
973 param[9] = d.Normal(1,1);
974 param[10] = d.Normal(1,2);
975 d.SetVid(AddVolName((d.GetName())->Data()));
976 k = ITSIndexToITSG3name(d.GetVid());
977 for(i=0;i<4;i++) name[i] = j[i];
979 gMC->Gsvolu(name,"CTUB",GetMed(med),param,11);
981 //______________________________________________________________________
982 void AliITSBaseGeometry::TubeElliptical(const char *gnam,const TString &dis,
983 Double_t p1,Double_t p2,Double_t dz,Int_t med){
984 // Interface to TMC->Gsvolu() for ITS ELTU geometries. Elliptical
985 // cross-section Tube. It has 3 parameters. See SetScale()
986 // for units. Default units are geant 3 [cm]. The equation of the surface
987 // is x^2 * p1^-2 + y^2 * p2^-2 = 1.
989 // const char *gnam 3 character geant volume name. The letter "I"
990 // is appended to the front to indecate that this
992 // TString &dis String containging part discription.
993 // Double_t p1 semi-axis of the elipse along x.
994 // Double_t p2 semi-axis of the elipse along y.
995 // Double_t dz half-length along the z-axis
996 // Int_t med media index number.
1004 param[0] = fScale*p1;
1005 param[1] = fScale*p2;
1006 param[2] = fScale*dz;
1008 gMC->Gsvolu(name,"ELTU",GetMed(med),param,3);
1010 //______________________________________________________________________
1011 void AliITSBaseGeometry::TubeElliptical(AliITSTubeEllipticalData &d,
1013 // Interface to TMC->Gsvolu() for ITS ELTU geometries. Elliptical
1014 // cross-section Tube. It has 3 parameters. See SetScale()
1015 // for units. Default units are geant 3 [cm]. The equation of the surface
1016 // is x^2 * p1^-2 + y^2 * p2^-2 = 1.
1018 // AliITSTubeElipticData &d Structure with the tube parameters
1019 // Int_t med media index number.
1027 char *j = (char *) &k;
1029 param[0] = fScale*d.P0();
1030 param[1] = fScale*d.P1();
1031 param[2] = fScale*d.DzAt();
1032 d.SetVid(AddVolName((d.GetName())->Data()));
1033 k = ITSIndexToITSG3name(d.GetVid());
1034 for(i=0;i<4;i++) name[i] = j[i];
1036 gMC->Gsvolu(name,"ELTU",GetMed(med),param,3);
1038 //______________________________________________________________________
1039 void AliITSBaseGeometry::HyperbolicTube(const char *gnam,const TString &dis,
1040 Double_t rmin,Double_t rmax,Double_t dz,
1041 Double_t thet,Int_t med){
1042 // Interface to TMC->Gsvolu() for ITS HYPE geometries. Hyperbolic tube.
1043 // Fore example the inner and outer surfaces are hyperboloids, as would
1044 // be foumed by a system of cylinderical wires which were then rotated
1045 // tangentially about their centers. It has 4 parameters. See SetScale()
1046 // for units. Default units are geant 3 [cm]. The hyperbolic surfaces are
1047 // given by r^2 = (ztan(thet)^2 + r(z=0)^2.
1049 // const char *gnam 3 character geant volume name. The letter "I"
1050 // is appended to the front to indecate that this
1051 // is an ITS volume.
1052 // TString &dis String containging part discription.
1053 // Double_t rmin Inner radius at z=0 where tube is narrowest.
1054 // Double_t rmax Outer radius at z=0 where tube is narrowest.
1055 // Double_t dz half-length along the z-axis
1056 // Double_t thet stero angel of rotation of the two faces
1058 // Int_t med media index number.
1066 param[0] = fScale*rmin;
1067 param[1] = fScale*rmax;
1068 param[2] = fScale*dz;
1071 gMC->Gsvolu(name,"HYPE",GetMed(med),param,4);
1073 //______________________________________________________________________
1074 void AliITSBaseGeometry::HyperbolicTube(AliITSTubeHyperbolicData &d,
1076 // Interface to TMC->Gsvolu() for ITS HYPE geometries. Hyperbolic tube.
1077 // Fore example the inner and outer surfaces are hyperboloids, as would
1078 // be foumed by a system of cylinderical wires which were then rotated
1079 // tangentially about their centers. It has 4 parameters. See SetScale()
1080 // for units. Default units are geant 3 [cm]. The hyperbolic surfaces are
1081 // given by r^2 = (ztan(thet)^2 + r(z=0)^2.
1083 // AliITSTubeHyperbolicData &d Structure with the tube parameters
1084 // Int_t med media index number.
1092 char *j = (char *) &k;
1094 param[0] = fScale*d.Rmin();
1095 param[1] = fScale*d.Rmax();
1096 param[2] = fScale*d.DzAt();
1097 param[3] = d.Theta();
1098 d.SetVid(AddVolName((d.GetName())->Data()));
1099 k = ITSIndexToITSG3name(d.GetVid());
1100 for(i=0;i<4;i++) name[i] = j[i];
1102 gMC->Gsvolu(name,"HYPE",GetMed(med),param,4);
1104 //______________________________________________________________________
1105 void AliITSBaseGeometry::Cone(const char *gnam,const TString &dis,
1106 Double_t dz,Double_t rmin1,Double_t rmax1,
1107 Double_t rmin2,Double_t rmax2,Int_t med){
1108 // Interface to TMC->Gsvolu() for ITS Cone geometries. Conical tube. It
1109 // has 5 parameters. See SetScale()
1110 // for units. Default units are geant 3 [cm].
1112 // const char *gnam 3 character geant volume name. The letter "I"
1113 // is appended to the front to indecate that this
1114 // is an ITS volume.
1115 // TString &dis String containging part discription.
1116 // Double_t dz half-length along the z-axis
1117 // Double_t rmin1 Inside Radius at -dz.
1118 // Double_t rmax1 Outside Radius at -dz.
1119 // Double_t rmin2 inside radius at +dz.
1120 // Double_t rmax2 outside radius at +dz.
1121 // Int_t med media index number.
1129 param[0] = fScale*dz;
1130 param[1] = fScale*rmin1;
1131 param[2] = fScale*rmax1;
1132 param[3] = fScale*rmin2;
1133 param[4] = fScale*rmax2;
1135 gMC->Gsvolu(name,"CONS",GetMed(med),param,5);
1137 //______________________________________________________________________
1138 void AliITSBaseGeometry::Cone(AliITSConeData &d,Int_t med){
1139 // Interface to TMC->Gsvolu() for ITS Cone geometries. Conical tube. It
1140 // has 5 parameters. See SetScale()
1141 // for units. Default units are geant 3 [cm].
1143 // AliITSConeData &d Structure with the tube parameters
1144 // Int_t med media index number.
1152 char *j = (char *) &k;
1154 param[0] = fScale*d.DzAt();
1155 param[1] = fScale*d.Rmin0();
1156 param[2] = fScale*d.Rmax0();
1157 param[3] = fScale*d.Rmin1();
1158 param[4] = fScale*d.Rmax1();
1159 d.SetVid(AddVolName((d.GetName())->Data()));
1160 k = ITSIndexToITSG3name(d.GetVid());
1161 for(i=0;i<4;i++) name[i] = j[i];
1163 gMC->Gsvolu(name,"CONS",GetMed(med),param,5);
1165 //______________________________________________________________________
1166 void AliITSBaseGeometry::ConeSegment(const char *gnam,const TString &dis,
1167 Double_t dz,Double_t rmin1,
1168 Double_t rmax1,Double_t rmin2,
1169 Double_t rmax2,Double_t phi1,
1170 Double_t phi2,Int_t med){
1171 // Interface to TMC->Gsvolu() for ITS ConS geometries. One segment of a
1172 // conical tube. It has 7 parameters. Phi1 should be smaller than phi2.
1173 // If this is not the case, the system adds 360 degrees to phi2. See
1174 // SetScale() for units. Default units are geant 3 [cm].
1176 // const char *gnam 3 character geant volume name. The letter "I"
1177 // is appended to the front to indecate that
1178 // this is an ITS volume.
1179 // TString &dis String containging part discription.
1180 // Double_t dz half-length along the z-axis
1181 // Double_t rmin1 Inside Radius at -dz.
1182 // Double_t rmax1 Outside Radius at -dz.
1183 // Double_t rmin2 inside radius at +dz.
1184 // Double_t rmax2 outside radius at +dz.
1185 // Double_t phi1 Starting angle of the segment [degree].
1186 // Double_t phi2 Ending angle of the segment [degree].
1187 // Int_t med media index number.
1195 param[0] = fScale*dz;
1196 param[1] = fScale*rmin1;
1197 param[2] = fScale*rmax1;
1198 param[3] = fScale*rmin2;
1199 param[4] = fScale*rmax2;
1203 gMC->Gsvolu(name,"CONS",GetMed(med),param,7);
1205 //______________________________________________________________________
1206 void AliITSBaseGeometry::ConeSegment(AliITSConeSegData &d,Int_t med){
1207 // Interface to TMC->Gsvolu() for ITS ConS geometries. One segment of a
1208 // conical tube. It has 7 parameters. Phi1 should be smaller than phi2.
1209 // If this is not the case, the system adds 360 degrees to phi2. See
1210 // SetScale() for units. Default units are geant 3 [cm].
1212 // AliITSConeSegData &d Structure with the tube parameters
1213 // Int_t med media index number.
1221 char *j = (char *) &k;
1223 param[0] = fScale*d.DzAt();
1224 param[1] = fScale*d.Rmin0();
1225 param[2] = fScale*d.Rmax0();
1226 param[3] = fScale*d.Rmin1();
1227 param[4] = fScale*d.Rmax1();
1228 param[5] = d.Phi0();
1229 param[6] = d.Phi1();
1230 d.SetVid(AddVolName((d.GetName())->Data()));
1231 k = ITSIndexToITSG3name(d.GetVid());
1232 for(i=0;i<4;i++) name[i] = j[i];
1234 gMC->Gsvolu(name,"CONS",GetMed(med),param,7);
1236 //______________________________________________________________________
1237 void AliITSBaseGeometry::PolyCone(const char *gnam,const TString &dis,
1238 Double_t phi1,Double_t dphi,Int_t nz,
1239 Double_t *z,Double_t *rmin,Double_t *rmax,
1241 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
1242 // parameters or more. See SetScale() for units. Default units are geant
1245 // const char *gnam 3 character geant volume name. The letter "I"
1246 // is appended to the front to indecate that this
1247 // is an ITS volume.
1248 // TString &dis String containging part discription.
1249 // Double_t phi1 the azimuthal angle at which the volume begins
1250 // (angles are counted clouterclockwise) [degrees].
1251 // Double_t dphi opening angle of the volume, which extends from
1252 // phi1 to phi1+dphi [degree].
1253 // Int_t nz number of planes perpendicular to the z axis
1254 // where the dimension of the section is given -
1255 // this number should be at least 2 and NP triples
1256 // of number must follow.
1257 // Double_t *z Array [nz] of z coordinate of the section.
1258 // Double_t *rmin Array [nz] of radius of teh inner circle in the
1260 // Double_t *rmax Array [nz] of radius of the outer circle in the
1262 // Int_t med media index number.
1272 param = new Float_t[n];
1275 param[2] = (Float_t) nz;
1277 param[3+3*i] = fScale*z[i];
1278 param[4+3*i] = fScale*rmin[i];
1279 param[5+3*i] = fScale*rmax[i];
1282 gMC->Gsvolu(name,"PCON",GetMed(med),param,n);
1286 //______________________________________________________________________
1287 void AliITSBaseGeometry::PolyCone(AliITSPConeData &d,Int_t med){
1288 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
1289 // parameters or more. See SetScale() for units. Default units are geant
1292 // AliITSPConeData &d Object with poly cone data stored in it.
1293 // Int_t med media index number.
1301 char *j = (char *) &k;
1304 param = new Float_t[n];
1305 param[0] = d.Phi0();
1306 param[1] = d.DPhi();
1307 param[2] = (Float_t) d.Nz();
1308 for(i=0;i<d.Nz();i++){
1309 param[3+3*i] = fScale*d.ZAt(i);
1310 param[4+3*i] = fScale*d.Rmin(i);
1311 param[5+3*i] = fScale*d.Rmax(i);
1313 d.SetVid(AddVolName((d.GetName())->Data()));
1314 k = ITSIndexToITSG3name(d.GetVid());
1315 for(i=0;i<4;i++) name[i] = j[i];
1317 gMC->Gsvolu(name,"PCON",GetMed(med),param,n);
1321 //______________________________________________________________________
1322 void AliITSBaseGeometry::Sphere(const char *gnam,const TString &dis,
1323 Double_t rmin,Double_t rmax,Double_t the1,
1324 Double_t the2,Double_t phi1,Double_t phi2,
1326 // Interface to TMC->Gsvolu() for ITS SPHE geometries. Segment of a
1327 // sphereical shell. It has 6 parameters. See SetScale()
1328 // for units. Default units are geant 3 [cm].
1330 // const char *gnam 3 character geant volume name. The letter "I"
1331 // is appended to the front to indecate that this
1332 // is an ITS volume.
1333 // TString &dis String containging part discription.
1334 // Double_t rmin Inside Radius.
1335 // Double_t rmax Outside Radius.
1336 // Double_t the1 staring polar angle of the shell [degree].
1337 // Double_t the2 ending polar angle of the shell [degree].
1338 // Double_t phui staring asimuthal angle of the shell [degree].
1339 // Double_t phi2 ending asimuthal angle of the shell [degree].
1340 // Int_t med media index number.
1348 param[0] = fScale*rmin;
1349 param[1] = fScale*rmax;
1355 gMC->Gsvolu(name,"SPHE",GetMed(med),param,6);
1357 //______________________________________________________________________
1358 void AliITSBaseGeometry::Sphere(AliITSSphereData &d,Int_t med){
1359 // Interface to TMC->Gsvolu() for ITS SPHE geometries. Segment of a
1360 // sphereical shell. It has 6 parameters. See SetScale()
1361 // for units. Default units are geant 3 [cm].
1363 // AliITSSphereData &d Structure with the tube parameters
1364 // Int_t med media index number.
1372 char *j = (char *) &k;
1374 param[0] = fScale*d.Rmin();
1375 param[1] = fScale*d.Rmax();
1376 param[2] = d.Theta0();
1377 param[3] = d.Theta1();
1378 param[4] = d.Phi0();
1379 param[5] = d.Phi1();
1380 d.SetVid(AddVolName((d.GetName())->Data()));
1381 k = ITSIndexToITSG3name(d.GetVid());
1382 for(i=0;i<4;i++) name[i] = j[i];
1384 gMC->Gsvolu(name,"SPHE",GetMed(med),param,6);
1386 //______________________________________________________________________
1387 void AliITSBaseGeometry::Parallelepiped(const char *gnam,const TString &dis,
1388 Double_t dx,Double_t dy,Double_t dz,
1389 Double_t alpha,Double_t thet,
1390 Double_t phi,Int_t med){
1391 // Interface to TMC->Gsvolu() for ITS PARA geometries. Parallelepiped. It
1392 // has 6 parameters. See SetScale() for units. Default units are geant 3
1395 // const char *gnam 3 character geant volume name. The letter "I"
1396 // is appended to the front to indecate that this
1397 // is an ITS volume.
1398 // TString &dis String containging part discription.
1399 // Double_t dx half-length allong x-axis
1400 // Double_t dy half-length allong y-axis
1401 // Double_t dz half-length allong z-axis
1402 // Double_t alpha angle formed by the y axis and by the plane
1403 // joining the center of teh faces parallel to the
1404 // z-x plane at -dY and +dy [degree].
1405 // Double_t thet polar angle of the line joining the centers of
1406 // the faces at -dz and +dz in z [degree].
1407 // Double_t phi azimuthal angle of teh line joing the centers
1408 // of the faaces at -dz and +dz in z [degree].
1409 // Int_t med media index number.
1417 param[0] = fScale*dx;
1418 param[1] = fScale*dy;
1419 param[2] = fScale*dz;
1424 gMC->Gsvolu(name,"PARA",GetMed(med),param,6);
1426 //______________________________________________________________________
1427 void AliITSBaseGeometry::Parallelepiped(AliITSParallelpipedData &d,Int_t med){
1428 // Interface to TMC->Gsvolu() for ITS PARA geometries. Parallelepiped. It
1429 // has 6 parameters. See SetScale() for units. Default units are geant 3
1432 // AliITSParrellepipedData &d Structre witht the volume data in it.
1433 // Int_t med media index number.
1441 char *j = (char *) &k;
1443 param[0] = fScale*d.DxAt();
1444 param[1] = fScale*d.DyAt();
1445 param[2] = fScale*d.DzAt();
1446 param[3] = d.Alpha();
1447 param[4] = d.Theta();
1449 d.SetVid(AddVolName((d.GetName())->Data()));
1450 k = ITSIndexToITSG3name(d.GetVid());
1451 for(i=0;i<4;i++) name[i] = j[i];
1453 gMC->Gsvolu(name,"PARA",GetMed(med),param,6);
1455 //______________________________________________________________________
1456 void AliITSBaseGeometry::PolyGon(const char *gnam,const TString &dis,
1457 Double_t phi1,Double_t dphi,Int_t npdv,
1458 Int_t nz,Double_t *z,Double_t *rmin,
1459 Double_t *rmax,Int_t med){
1460 // Interface to TMC->Gsvolu() for ITS PGON geometry. Polygon It has 10
1461 // parameters or more. See SetScale() for units. Default units are geant
1464 // const char *gnam 3 character geant volume name. The letter "I"
1465 // is appended to the front to indecate that this
1466 // is an ITS volume.
1467 // TString &dis String containging part discription.
1468 // Double_t phi1 the azimuthal angle at which the volume begins
1469 // (angles are counted clouterclockwise) [degrees].
1470 // Double_t dphi opening angle of the volume, which extends from
1471 // phi1 to phi1+dphi [degree].
1472 // Int_t npdv the number of sides of teh cross section
1473 // between the given phi limits.
1474 // Int_t nz number of planes perpendicular to the z axis
1475 // where the dimension of the section is given -
1476 // this number should be at least 2 and NP triples
1477 // of number must follow.
1478 // Double_t *z array [nz] of z coordiates of the sections..
1479 // Double_t *rmin array [nz] of radius of teh circle tangent to
1480 // the sides of the inner polygon in teh
1482 // Double_t *rmax array [nz] of radius of the circle tangent to
1483 // the sides of the outer polygon in the
1485 // Int_t med media index number.
1495 param = new Float_t[n];
1498 param[2] = (Float_t)npdv;
1499 param[3] = (Float_t)nz;
1501 param[4+3*i] = fScale*z[i];
1502 param[5+3*i] = fScale*rmin[i];
1503 param[6+3*i] = fScale*rmax[i];
1506 gMC->Gsvolu(name,"PGON",GetMed(med),param,n);
1510 //______________________________________________________________________
1511 void AliITSBaseGeometry::PolyGon(AliITSPGonData &d,Int_t med){
1512 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
1513 // parameters or more. See SetScale() for units. Default units are geant
1516 // AliITSPGonData &d Object with poly cone data stored in it.
1517 // Int_t med media index number.
1525 char *j = (char *) &k;
1528 param = new Float_t[n];
1529 param[0] = d.Phi0();
1530 param[1] = d.DPhi();
1531 param[2] = (Float_t) d.NPhi();
1532 param[3] = (Float_t) d.Nz();
1533 for(i=0;i<d.Nz();i++){
1534 param[4+3*i] = fScale*d.ZAt(i);
1535 param[5+3*i] = fScale*d.Rmin(i);
1536 param[6+3*i] = fScale*d.Rmax(i);
1538 d.SetVid(AddVolName((d.GetName())->Data()));
1539 k = ITSIndexToITSG3name(d.GetVid());
1540 for(i=0;i<4;i++) name[i] = j[i];
1542 gMC->Gsvolu(name,"PGON",GetMed(med),param,n);
1546 //______________________________________________________________________
1547 void AliITSBaseGeometry::Pos(AliITSBaseVolParams &v,Int_t cn,
1548 AliITSBaseVolParams &m,
1549 TVector3 &t,Int_t irot){
1550 // Place a copy of a volume previously defined by a call to GSVOLU inside
1551 // its mother volulme moth.
1553 // const char vol[3] 3 character geant volume name. The letter "I"
1554 // is appended to the front to indecate that this
1555 // is an ITS volume.
1556 // const char moth[3] 3 character geant volume name of the mother
1557 // volume in which vol will be placed. The letter
1558 // "I" is appended to the front to indecate that
1559 // this is an ITS volume.
1560 // Double_t x The x positon of the volume in the mother's
1562 // Double_t y The y positon of the volume in the mother's
1564 // Double_t z The z positon of the volume in the mother's
1566 // Int_t irot the index for the rotation matrix to be used.
1567 // irot=-1 => unit rotation.
1572 char name[5],mother[5];
1575 char *n = (char*)&r;
1577 param[0] = fScale*t.X();
1578 param[1] = fScale*t.Y();
1579 param[2] = fScale*t.Z();
1580 r = ITSIndexToITSG3name(v.GetVid());
1581 for(i=0;i<4;i++) name[i] = n[i]; name[4] ='\0';
1582 r = ITSIndexToITSG3name(m.GetVid());
1583 for(i=0;i<4;i++) mother[i] = n[i]; mother[4] ='\0';
1584 if(irot>0) r = fidrot[irot]; else r=0;
1585 gMC->Gspos(name,cn,mother,param[0],param[1],param[2],r,"ONLY");
1587 //______________________________________________________________________
1588 void AliITSBaseGeometry::Pos(const char *vol,Int_t cn,const char *moth,
1589 Double_t x,Double_t y,Double_t z,Int_t irot){
1590 // Place a copy of a volume previously defined by a call to GSVOLU inside
1591 // its mother volulme moth.
1593 // const char vol[3] 3 character geant volume name. The letter "I"
1594 // is appended to the front to indecate that this
1595 // is an ITS volume.
1596 // const char moth[3] 3 character geant volume name of the mother
1597 // volume in which vol will be placed. The letter
1598 // "I" is appended to the front to indecate that
1599 // this is an ITS volume.
1600 // Double_t x The x positon of the volume in the mother's
1602 // Double_t y The y positon of the volume in the mother's
1604 // Double_t z The z positon of the volume in the mother's
1606 // Int_t irot the index for the rotation matrix to be used.
1607 // irot=-1 => unit rotation.
1612 char name[5],mother[5];
1616 param[0] = fScale*x;
1617 param[1] = fScale*y;
1618 param[2] = fScale*z;
1620 G3name(moth,mother);
1621 if(irot>0) r = fidrot[irot];
1622 gMC->Gspos(name,cn,mother,param[0],param[1],param[2],r,"ONLY");
1624 //______________________________________________________________________
1625 void AliITSBaseGeometry::Matrix(Int_t irot,Double_t thet1,Double_t phi1,
1626 Double_t thet2,Double_t phi2,
1627 Double_t thet3,Double_t phi3){
1628 // Defines a Geant rotation matrix. checks to see if it is the unit
1629 // matrix. If so, then no additonal matrix is defined. Stores rotation
1630 // matrix irot in the data structure JROTM. If the matrix is not
1631 // orthonormal, it will be corrected by setting y' perpendicular to x'
1632 // and z' = x' X y'. A warning message is printed in this case.
1634 // Int_t irot Intex specifing which rotation matrix.
1635 // Double_t thet1 Polar angle for axisw x [degrees].
1636 // Double_t phi1 azimuthal angle for axis x [degrees].
1637 // Double_t thet12Polar angle for axisw y [degrees].
1638 // Double_t phi2 azimuthal angle for axis y [degrees].
1639 // Double_t thet3 Polar angle for axisw z [degrees].
1640 // Double_t phi3 azimuthal angle for axis z [degrees].
1645 Float_t t1=0.0,p1=0.0,t2=0.0,p2=0.0,t3=0.0,p3=0.0;
1647 if(thet1==90.0&&phi1== 0.0&&
1648 thet2==90.0&&phi2==90.0&&
1649 thet3== 0.0&&phi3== 0.0){
1650 fidrot[irot] = 0; // Unit matrix
1658 fits->AliMatrix(fidrot[irot],t1,p1,t2,p2,t3,p3);
1660 cout << "Matrix:: fidrot["<<irot<<"]="<<fidrot[irot];
1661 cout <<" angles="<<t1<<" "<<p1<<" "<<t2<<" "<<p2<<" "<<t3<< " "<<p3<<endl;
1663 //______________________________________________________________________
1664 void AliITSBaseGeometry::Matrix(Int_t irot,Int_t axis,Double_t thet){
1665 // Defines a Geant rotation matrix. checks to see if it is the unit
1666 // matrix. If so, then no additonal matrix is defined. Stores rotation
1667 // matrix irot in the data structure JROTM. If the matrix is not
1668 // orthonormal, it will be corrected by setting y' perpendicular to x'
1669 // and z' = x' X y'. A warning message is printed in this case.
1671 // Int_t irot Intex specifing which rotation matrix.
1672 // Int_t axis Axis about which rotation is to be done.
1673 // Double_t thet Angle to rotate by [degrees].
1680 fidrot[irot] = 0; // Unit matrix
1683 case 0: //Rotate about x-axis, x-axis does not change.
1684 fits->AliMatrix(fidrot[irot],90.0,0.0,90.0+thet,90.0,thet,90.0);
1686 cout << "Matrix:: axis="<<axis<<" fidrot["<<irot<<"]=";
1687 cout <<fidrot[irot];
1688 cout <<" angles="<<90.0<<" "<<0.0<<" "<<90.0+thet<<" "<<90.0;
1689 cout <<" "<<thet<< " "<<90.0<<endl;
1692 case 1: //Rotate about y-axis, y-axis does not change.
1693 fits->AliMatrix(fidrot[irot],90.0-thet,0.0,90.0,90.0,-thet,0.0);
1695 cout << "Matrix:: axis="<<axis<<" fidrot["<<irot<<"]=";
1696 cout << fidrot[irot];
1697 cout <<" angles="<<90.-thet<<" "<<0.0<<" "<<90.0<<" "<<90.0;
1698 cout <<" "<<-thet<< " "<<0.0<<endl;
1701 case 2: //Rotate about z-axis, z-axis does not change.
1702 fits->AliMatrix(fidrot[irot],90.0,thet,90.0,90.+thet,0.0,0.0);
1704 cout << "Matrix:: axis="<<axis<<" fidrot["<<irot<<"]=";
1705 cout <<fidrot[irot];
1706 cout <<" angles="<<90.0<<" "<<thet<<" "<<90.0<<" "<<90.0+thet;
1707 cout <<" "<<0.0<< " "<<0.0<<endl;
1711 Error("Matrix","axis must be either 0, 1, or 2. for matrix=%d",
1714 cout << "Matrix:: axis="<<axis<<" fidrot["<<irot<<"]=";
1715 cout <<fidrot[irot];
1716 cout <<" thet=" << thet<< endl;
1722 //______________________________________________________________________
1723 void AliITSBaseGeometry::Matrix(Int_t irot,Double_t rot[3][3]){
1724 // Defines a Geant rotation matrix. checks to see if it is the unit
1725 // matrix. If so, then no additonal matrix is defined. Stores rotation
1726 // matrix irot in the data structure JROTM. If the matrix is not
1727 // orthonormal, it will be corrected by setting y' perpendicular to x'
1728 // and z' = x' X y'. A warning message is printed in this case.
1730 // Int_t irot Intex specifing which rotation matrix.
1731 // Double_t rot[3][3] The 3 by 3 rotation matrix.
1736 Double_t si,c=180./TMath::Pi();
1737 Double_t ang[6]={90.0,0.0,90.0,90.0,0.0,0.0};
1739 if(rot[0][0]==1.0&&rot[1][1]==1.0&&rot[2][2]==1.0&&
1740 rot[0][1]==0.0&&rot[0][2]==0.0&&rot[1][0]==0.0&&
1741 rot[1][2]==0.0&&rot[2][0]==0.0&&rot[2][1]==0.0){
1742 fidrot[irot] = 0; // Unit matrix
1744 ang[1] = TMath::ATan2(rot[0][1],rot[0][0]);
1745 if(TMath::Cos(ang[1])!=0.0) si = rot[0][0]/TMath::Cos(ang[1]);
1746 else si = rot[0][1]/TMath::Sin(ang[1]);
1747 ang[0] = TMath::ATan2(si,rot[0][2]);
1749 ang[3] = TMath::ATan2(rot[1][1],rot[1][0]);
1750 if(TMath::Cos(ang[3])!=0.0) si = rot[1][0]/TMath::Cos(ang[3]);
1751 else si = rot[1][1]/TMath::Sin(ang[3]);
1752 ang[2] = TMath::ATan2(si,rot[1][2]);
1754 ang[5] = TMath::ATan2(rot[2][1],rot[2][0]);
1755 if(TMath::Cos(ang[5])!=0.0) si = rot[2][0]/TMath::Cos(ang[5]);
1756 else si = rot[2][1]/TMath::Sin(ang[5]);
1757 ang[4] = TMath::ATan2(si,rot[2][2]);
1759 for(Int_t i=0;i<6;i++) {ang[i] *= c; if(ang[i]<0.0) ang[i] += 360.;}
1760 fits->AliMatrix(fidrot[irot],ang[0],ang[1],ang[2],ang[3],
1763 cout << "Matrix rot[3][3]:: fidrot["<<irot<<"]="<<fidrot[irot];
1764 cout <<" angles="<<ang[0]<<" "<<ang[1]<<" "<<ang[2]<<" "<<
1765 ang[3]<<" "<<ang[4]<< " "<<ang[5]<<endl;
1767 //______________________________________________________________________
1768 Float_t AliITSBaseGeometry::GetA(Int_t z){
1769 // Returns the isotopicaly averaged atomic number.
1771 // Int_t z Elemental number
1775 // The atomic mass number.
1777 1.00794 , 4.0026902, 6.941 , 9.012182 , 10.811 , // H-B
1778 12.01007 , 14.00674 , 15.9994 , 18.9984032, 20.1797 , // C-Ne
1779 22.98970 , 24.3050 , 26.981538, 28.0855 , 30.973761, // Na-P
1780 32.066 , 35.4527 , 39.948 , 39.0983 , 40.078 , // S-Ca
1781 44.95591 , 47.867 , 50.9415 , 51.9961 , 54.938049, // Sc-Mn
1782 55.845 , 58.933200 , 58.6934 , 63.546 , 65.39 , // Fe-Zn
1783 69.723 , 72.61 , 74.92160 , 78.96 , 79.904 , // Ga-Br
1784 83.80 , 85.4678 , 87.62 , 88.9085 , 91.224 , // Kr-Zr
1785 92.90638 , 95.94 , 97.907215, 101.07 ,102.90550 , // Nb-Rh
1786 106.42 ,107.8682 ,112.411 ,114.818 ,118.710 , // Pd-Sn
1787 121.760 ,127.60 ,126.90447 ,131.29 ,132.90545 , // Sb-Cs
1788 137.327 ,138.9055 ,140.116 ,140.90765 ,144.24 , // La-Nd
1789 144.912746,150.36 ,151.964 ,157.25 ,158.92534 , // Pm-Tb
1790 162.50 ,164.93032 ,167.26 ,168.93421 ,173.04 , // Dy-Yb
1791 174.967 ,178.49 ,180.9479 ,183.84 ,186.207 , // Lu-Re
1792 190.23 ,192.217 ,195.078 ,196.96655 ,200.59 , // Os-Hg
1793 204.3833 ,207.2 ,208.98038,208.982415 ,209.987131, // Tl-At
1794 222.017570,223.019731 ,226.025402,227.027747 ,232.0381 , // Rn-Th
1795 231.03588 ,238.0289 }; // Pa,U
1798 Error("GetA","z must be 0<z<93. z=%d",z);
1803 //______________________________________________________________________
1804 Float_t AliITSBaseGeometry::GetStandardMaxStepSize(Int_t istd){
1805 // Returns one of a set of standard Maximum Step Size values.
1807 // Int_t istd Index to indecate which standard.
1811 // The appropreate standard Maximum Step Size value [cm].
1812 Float_t t[]={1.0, // default
1813 0.0075, // Silicon detectors...
1814 1.0, // Air in central detectors region
1815 1.0 // Material in non-centeral region
1819 //______________________________________________________________________
1820 Float_t AliITSBaseGeometry::GetStandardThetaMax(Int_t istd){
1821 // Returns one of a set of standard Theata Max values.
1823 // Int_t istd Index to indecate which standard.
1827 // The appropreate standard Theta max value [degrees].
1828 Float_t t[]={0.1, // default
1829 0.1, // Silicon detectors...
1830 0.1, // Air in central detectors region
1831 1.0 // Material in non-centeral region
1835 //______________________________________________________________________
1836 Float_t AliITSBaseGeometry::GetStandardEfraction(Int_t istd){
1837 // Returns one of a set of standard E fraction values.
1839 // Int_t istd Index to indecate which standard.
1843 // The appropreate standard E fraction value [#].
1844 Float_t t[]={0.1, // default
1845 0.1, // Silicon detectors...
1846 0.1, // Air in central detectors region
1847 0.5 // Material in non-centeral region
1851 //______________________________________________________________________
1852 Float_t AliITSBaseGeometry::GetStandardEpsilon(Int_t istd){
1853 // Returns one of the standard Epsilon valuse
1855 // Int_t istd index of standard cuts to get
1859 // Float_t the standard Epsilon cut value.
1860 Float_t t[]={1.0E-4, // default
1861 1.0E-4, // Silicon detectors...
1862 1.0E-4, // Air in central detector region
1863 1.0E-3, // Material in non-cneteral regions
1868 //______________________________________________________________________
1869 void AliITSBaseGeometry::Element(Int_t imat,const char* name,Int_t z,
1870 Double_t dens,Int_t istd){
1871 // Defines a Geant single element material and sets its Geant medium
1872 // proporties. The average atomic A is assumed to be given by their
1873 // natural abundances. Things like the radiation length are calculated
1876 // Int_t imat Material number.
1877 // const char* name Material name. No need to add a $ at the end.
1878 // Int_t z The elemental number.
1879 // Double_t dens The density of the material [g/cm^3].
1880 // Int_t istd Defines which standard set of transport parameters
1881 // which should be used.
1886 Float_t rad,Z,A=GetA(z),tmax,stemax,deemax,epsilon;
1890 len = strlen(name)+1;
1891 name2 = new char[len];
1892 strncpy(name2,name,len-1);
1893 name2[len-1] = '\0';
1896 rad = GetRadLength(z)/dens;
1897 fits->AliMaterial(imat,name2,A,Z,dens,rad,0.0,0,0);
1898 tmax = GetStandardThetaMax(istd); // degree
1899 stemax = GetStandardMaxStepSize(istd); // cm
1900 deemax = GetStandardEfraction(istd); // ratio
1901 epsilon = GetStandardEpsilon(istd); //
1902 fits->AliMedium(imat,name2,imat,0,gAlice->Field()->Integ(),
1903 gAlice->Field()->Max(),tmax,stemax,deemax,epsilon,0.0);
1906 //______________________________________________________________________
1907 void AliITSBaseGeometry::MixtureByWeight(Int_t imat,const char* name,Int_t *z,
1908 Double_t *w,Double_t dens,Int_t n,Int_t istd){
1909 // Defines a Geant material by a set of elements and weights, and sets
1910 // its Geant medium proporties. The average atomic A is assumed to be
1911 // given by their natural abundances. Things like the radiation length
1912 // are calculated for you.
1914 // Int_t imat Material number.
1915 // const char* name Material name. No need to add a $ at the end.
1916 // Int_t *z Array of The elemental numbers.
1917 // Double_t *w Array of relative weights.
1918 // Double_t dens The density of the material [g/cm^3].
1919 // Int_t n the number of elements making up the mixture.
1920 // Int_t istd Defines which standard set of transport parameters
1921 // which should be used.
1926 Float_t *Z,*A,*W,tmax,stemax,deemax,epsilon;
1933 len = strlen(name)+2;
1934 name2 = new char[len];
1935 strncpy(name2,name,len-1);
1936 name2[len-1] = '\0';
1938 for(i=0;i<n;i++){Z[i] = (Float_t)z[i];A[i] = (Float_t)GetA(z[i]);
1939 W[i] = (Float_t)w[i];}
1940 fits->AliMixture(imat,name2,A,Z,dens,n,W);
1941 tmax = GetStandardThetaMax(istd); // degree
1942 stemax = GetStandardMaxStepSize(istd); // cm
1943 deemax = GetStandardEfraction(istd); // #
1944 epsilon = GetStandardEpsilon(istd);
1945 fits->AliMedium(imat,name2,imat,0,gAlice->Field()->Integ(),
1946 gAlice->Field()->Max(),tmax,stemax,deemax,epsilon,0.0);
1952 //______________________________________________________________________
1953 void AliITSBaseGeometry::MixtureByNumber(Int_t imat,const char* name,Int_t *z,
1954 Int_t *w,Double_t dens,Int_t n,Int_t istd){
1955 // Defines a Geant material by a set of elements and number, and sets
1956 // its Geant medium proporties. The average atomic A is assumed to be
1957 // given by their natural abundances. Things like the radiation length
1958 // are calculated for you.
1960 // Int_t imat Material number.
1961 // const char* name Material name. No need to add a $ at the end.
1962 // Int_t *z Array of The elemental numbers.
1963 // Int_t_t *w Array of relative number.
1964 // Double_t dens The density of the material [g/cm^3].
1965 // Int_t n the number of elements making up the mixture.
1966 // Int_t istd Defines which standard set of transport parameters
1967 // which should be used.
1972 Float_t *Z,*A,*W,tmax,stemax,deemax,epsilon;
1979 len = strlen(name)+1;
1980 name2 = new char[len];
1981 strncpy(name2,name,len-1);
1982 name2[len-1] = '\0';
1984 for(i=0;i<n;i++){Z[i] = (Float_t)z[i];A[i] = (Float_t)GetA(z[i]);
1985 W[i] = (Float_t)w[i];}
1986 fits->AliMixture(imat,name2,A,Z,dens,-n,W);
1987 tmax = GetStandardThetaMax(istd); // degree
1988 stemax = GetStandardMaxStepSize(istd); // cm
1989 deemax = GetStandardEfraction(istd); // #
1990 epsilon = GetStandardEpsilon(istd);
1991 fits->AliMedium(imat,name2,imat,0,gAlice->Field()->Integ(),
1992 gAlice->Field()->Max(),tmax,stemax,deemax,epsilon,0.0);
1998 //______________________________________________________________________
1999 Double_t AliITSBaseGeometry::RadLength(Int_t iz,Double_t a){
2000 // Computes the radiation length in accordance to the PDG 2000 Section
2001 // 23.4.1 p. 166. Transladed from the c code of Flavio Tosello.
2003 // Int_t iz The elemental number
2004 // Dougle_t The elemental average atomic mass number
2007 // Double_t returns the radiation length of the element iz in
2009 Double_t z = (Double_t)iz;
2010 Double_t alphaz = fAlpha*z;
2011 Double_t alphaz2 = alphaz*alphaz;
2012 Double_t c0 = +0.20206,c1 = -0.0369,c2 = +0.0083,c3 = -0.0020;
2013 Double_t z12,z23,l,lp,c;
2015 c = alphaz2*(1./(1.+alphaz2) + c0 + c1*alphaz2 + c2*alphaz2*alphaz2
2016 +c3*alphaz2*alphaz2*alphaz2);
2017 z12 = TMath::Exp(TMath::Log(z)/3.0);
2037 l = TMath::Log(184.15/z12);
2038 lp = TMath::Log(1194.0/z23);
2041 Double_t re2,b,r,xz;
2044 b = 4.0*fAlpha*re2*fNa/a;
2045 r = b*z*(z*(l-c)+lp);
2047 return xz; // [gm/cm^2]
2049 //======================================================================
2050 ClassImp(AliITSBaseVolParams)
2051 //______________________________________________________________________
2052 void AliITSBaseVolParams::Print(ostream *os){
2053 // Prints out the data kept in this class
2055 // ostream *os The output stream pointer
2061 *os<<"Volume Id="<<fVol<<" Copy="<<fCpn<<" Name: "<<fName<<endl;
2063 //______________________________________________________________________
2064 void AliITSBaseVolParams::Read(istream *is){
2065 // Read in data kept in this class
2067 // istream *is the input stream
2081 //______________________________________________________________________
2082 ostream &operator<<(ostream &os,AliITSBaseVolParams &p){
2083 // Operator << for C++ like output
2085 // ostream &os The output stream
2086 // AliITSBaseVolParams &p The class to be outputed
2090 // ostream &os The output stream
2095 //______________________________________________________________________
2096 istream &operator>>(istream &is,AliITSBaseVolParams &r){
2097 // Operator << for C++ like output
2099 // istream &is The input stream
2100 // AliITSBaseVolParams &r The class to be read in
2104 // istream &is The input stream
2109 //======================================================================
2110 ClassImp(AliITSBoxData)
2111 //______________________________________________________________________
2112 void AliITSBoxData::Print(ostream *os){
2113 // Prints out the data kept in this class
2115 // ostream *os The output stream pointer
2121 #if defined __GNUC__
2128 #if defined __ICC || defined __ECC
2135 AliITSBaseVolParams::Print(os);
2136 fmt = os->setf(ios::scientific); // set scientific floating point output
2137 *os << "fDx=" << fDx << " fDy=" << fDy << " fDz=" << fDz << endl;
2138 os->flags(fmt); // reset back to old formating.
2141 //______________________________________________________________________
2142 void AliITSBoxData::Read(istream *is){
2143 // Read in data kept in this class
2145 // istream *is the input stream
2152 AliITSBaseVolParams::Read(is);
2160 //______________________________________________________________________
2161 ostream &operator<<(ostream &os,AliITSBoxData &p){
2162 // Operator << for C++ like output
2164 // ostream &os The output stream
2165 // AliITSBoxData &p The class to be outputed
2169 // ostream &os The output stream
2174 //______________________________________________________________________
2175 istream &operator>>(istream &is,AliITSBoxData &r){
2176 // Operator << for C++ like output
2178 // istream &is The input stream
2179 // AliITSBoxData &r The class to be read in
2183 // istream &is The input stream
2188 //======================================================================
2189 ClassImp(AliITSTrapezoid1Data)
2190 //______________________________________________________________________
2191 void AliITSTrapezoid1Data::Print(ostream *os){
2192 // Prints out the data kept in this class
2194 // ostream *os The output stream pointer
2200 #if defined __GNUC__
2207 #if defined __ICC || defined __ECC
2214 AliITSBaseVolParams::Print(os);
2215 fmt = os->setf(ios::scientific); // set scientific floating point output
2216 *os << "fDx[0]=" << fDx[0]<< " fDx[1]=" << fDx[1] << " fDy=" << fDy;
2217 *os << " fDz=" << fDz << endl;
2218 os->flags(fmt); // reset back to old formating.
2221 //______________________________________________________________________
2222 void AliITSTrapezoid1Data::Read(istream *is){
2223 // Read in data kept in this class
2225 // istream *is the input stream
2232 AliITSBaseVolParams::Read(is);
2242 //______________________________________________________________________
2243 ostream &operator<<(ostream &os,AliITSTrapezoid1Data &p){
2244 // Operator << for C++ like output
2246 // ostream &os The output stream
2247 // AliITSBoxData &p The class to be outputed
2251 // ostream &os The output stream
2256 //______________________________________________________________________
2257 istream &operator>>(istream &is,AliITSTrapezoid1Data &r){
2258 // Operator << for C++ like output
2260 // istream &is The input stream
2261 // AliITSPGonData &r The class to be read in
2265 // istream &is The input stream
2270 //======================================================================
2271 ClassImp(AliITSTrapezoid2Data)
2272 //______________________________________________________________________
2273 void AliITSTrapezoid2Data::Print(ostream *os){
2274 // Prints out the data kept in this class
2276 // ostream *os The output stream pointer
2282 #if defined __GNUC__
2289 #if defined __ICC || defined __ECC
2296 AliITSBaseVolParams::Print(os);
2297 fmt = os->setf(ios::scientific); // set scientific floating point output
2298 *os << "fDx[0]=" << fDx[0]<< " fDx[1]=" << fDx[1];
2299 *os << " fDy[0]=" << fDy[0] << " fDy[1]=" << fDy[1];
2300 *os << " fDz=" << fDz << endl;
2301 os->flags(fmt); // reset back to old formating.
2304 //______________________________________________________________________
2305 void AliITSTrapezoid2Data::Read(istream *is){
2306 // Read in data kept in this class
2308 // istream *is the input stream
2315 AliITSBaseVolParams::Read(is);
2327 //______________________________________________________________________
2328 ostream &operator<<(ostream &os,AliITSTrapezoid2Data &p){
2329 // Operator << for C++ like output
2331 // ostream &os The output stream
2332 // AliITSBoxData &p The class to be outputed
2336 // ostream &os The output stream
2341 //______________________________________________________________________
2342 istream &operator>>(istream &is,AliITSTrapezoid2Data &r){
2343 // Operator << for C++ like output
2345 // istream &is The input stream
2346 // AliITSPGonData &r The class to be read in
2350 // istream &is The input stream
2355 //======================================================================
2356 ClassImp(AliITSTrapezoidData)
2357 //______________________________________________________________________
2358 void AliITSTrapezoidData::Print(ostream *os){
2359 // Prints out the data kept in this class
2361 // ostream *os The output stream pointer
2367 #if defined __GNUC__
2374 #if defined __ICC || defined __ECC
2381 AliITSBaseVolParams::Print(os);
2382 fmt = os->setf(ios::scientific); // set scientific floating point output
2383 *os << "fTheta=" << fTheta << " fPhi=" << fPhi << " fDz=" << fDz;
2384 *os << " fH[0]=" << fH[0]<< " fH[1]=" << fH[1];
2385 *os << " fBl[0]=" << fBl[0] << " fBl[1]=" << fBl[1];
2386 *os << " fTl[0]=" << fTl[0] << " fTl[1]=" << fTl[1];
2387 *os << " fAlp[0]=" << fAlp[0] << " fAlp[1]=" << fAlp[1];
2389 os->flags(fmt); // reset back to old formating.
2392 //______________________________________________________________________
2393 void AliITSTrapezoidData::Read(istream *is){
2394 // Read in data kept in this class
2396 // istream *is the input stream
2403 AliITSBaseVolParams::Read(is);
2427 //______________________________________________________________________
2428 ostream &operator<<(ostream &os,AliITSTrapezoidData &p){
2429 // Operator << for C++ like output
2431 // ostream &os The output stream
2432 // AliITSBoxData &p The class to be outputed
2436 // ostream &os The output stream
2441 //______________________________________________________________________
2442 istream &operator>>(istream &is,AliITSTrapezoidData &r){
2443 // Operator << for C++ like output
2445 // istream &is The input stream
2446 // AliITSPGonData &r The class to be read in
2450 // istream &is The input stream
2455 //======================================================================
2456 ClassImp(AliITSTrapezoidTwistedData)
2457 //______________________________________________________________________
2458 void AliITSTrapezoidTwistedData::Print(ostream *os){
2459 // Prints out the data kept in this class
2461 // ostream *os The output stream pointer
2467 #if defined __GNUC__
2474 #if defined __ICC || defined __ECC
2481 AliITSBaseVolParams::Print(os);
2482 fmt = os->setf(ios::scientific); // set scientific floating point output
2483 *os << "fTheta=" << fTheta << " fPhi=" << fPhi << " fDz=" << fDz;
2484 *os << " fTwist=" << fTwist;
2485 *os << " fH[0]=" << fH[0]<< " fH[1]=" << fH[1];
2486 *os << " fBl[0]=" << fBl[0] << " fBl[1]=" << fBl[1];
2487 *os << " fTl[0]=" << fTl[0] << " fTl[1]=" << fTl[1];
2488 *os << " fAlp[0]=" << fAlp[0] << " fAlp[1]=" << fAlp[1];
2490 os->flags(fmt); // reset back to old formating.
2493 //______________________________________________________________________
2494 void AliITSTrapezoidTwistedData::Read(istream *is){
2495 // Read in data kept in this class
2497 // istream *is the input stream
2504 AliITSBaseVolParams::Read(is);
2530 //______________________________________________________________________
2531 ostream &operator<<(ostream &os,AliITSTrapezoidTwistedData &p){
2532 // Operator << for C++ like output
2534 // ostream &os The output stream
2535 // AliITSBoxData &p The class to be outputed
2539 // ostream &os The output stream
2544 //______________________________________________________________________
2545 istream &operator>>(istream &is,AliITSTrapezoidTwistedData &r){
2546 // Operator << for C++ like output
2548 // istream &is The input stream
2549 // AliITSPGonData &r The class to be read in
2553 // istream &is The input stream
2558 //======================================================================
2559 ClassImp(AliITSTubeData)
2560 //______________________________________________________________________
2561 void AliITSTubeData::Print(ostream *os){
2562 // Prints out the data kept in this class
2564 // ostream *os The output stream pointer
2570 #if defined __GNUC__
2577 #if defined __ICC || defined __ECC
2584 AliITSBaseVolParams::Print(os);
2585 fmt = os->setf(ios::scientific); // set scientific floating point output
2586 *os <<" Z , Rmin , Rmax " << endl;
2587 fmt = os->setf(ios::scientific); // set scientific floating point output
2588 *os << setprecision(16) << fDz <<"\t";
2589 *os << setprecision(16) << fRmin << "\t";
2590 *os << setprecision(16) << fRmax << endl;
2591 os->flags(fmt); // reset back to old formating.
2595 //______________________________________________________________________
2596 void AliITSTubeData::Read(istream *is){
2597 // Read in data kept in this class
2599 // istream *is the input stream
2606 AliITSBaseVolParams::Read(is);
2609 *is >> fDz >> fRmin >> fRmax;
2611 //______________________________________________________________________
2612 ostream &operator<<(ostream &os,AliITSTubeData &p){
2613 // Operator << for C++ like output
2615 // ostream &os The output stream
2616 // AliITSTubeData &p The class to be outputed
2620 // ostream &os The output stream
2625 //______________________________________________________________________
2626 istream &operator>>(istream &is,AliITSTubeData &r){
2627 // Operator << for C++ like output
2629 // istream &is The input stream
2630 // AliITSTubeData &r The class to be read in
2634 // istream &is The input stream
2639 //======================================================================
2640 ClassImp(AliITSTubeSegData)
2641 //______________________________________________________________________
2642 void AliITSTubeSegData::Print(ostream *os){
2643 // Prints out the data kept in this class
2645 // ostream *os The output stream pointer
2651 #if defined __GNUC__
2658 #if defined __ICC || defined __ECC
2665 AliITSBaseVolParams::Print(os);
2666 fmt = os->setf(ios::scientific); // set scientific floating point output
2667 *os << "fPhi0=" << fPhi0 << " fPhi1=" << fPhi1 << endl;
2668 *os <<" Z , Rmin , Rmax " << endl;
2669 fmt = os->setf(ios::scientific); // set scientific floating point output
2670 *os << setprecision(16) << fDz <<"\t";
2671 *os << setprecision(16) << fRmin << "\t";
2672 *os << setprecision(16) << fRmax << endl;
2673 os->flags(fmt); // reset back to old formating.
2676 //______________________________________________________________________
2677 void AliITSTubeSegData::Read(istream *is){
2678 // Read in data kept in this class
2680 // istream *is the input stream
2687 AliITSBaseVolParams::Read(is);
2694 *is >> fDz >> fRmin >> fRmax;
2696 //______________________________________________________________________
2697 ostream &operator<<(ostream &os,AliITSTubeSegData &p){
2698 // Operator << for C++ like output
2700 // ostream &os The output stream
2701 // AliITSTubeData &p The class to be outputed
2705 // ostream &os The output stream
2710 //______________________________________________________________________
2711 istream &operator>>(istream &is,AliITSTubeSegData &r){
2712 // Operator << for C++ like output
2714 // istream &is The input stream
2715 // AliITSTubeData &r The class to be read in
2719 // istream &is The input stream
2724 //======================================================================
2725 ClassImp(AliITSTubeCutData)
2726 //______________________________________________________________________
2727 void AliITSTubeCutData::Print(ostream *os){
2728 // Prints out the data kept in this class
2730 // ostream *os The output stream pointer
2736 #if defined __GNUC__
2743 #if defined __ICC || defined __ECC
2750 AliITSBaseVolParams::Print(os);
2751 fmt = os->setf(ios::scientific); // set scientific floating point output
2752 *os << "fPhi0=" << fPhi0 << " fPhi1=" << fPhi1;
2753 *os << " Norm0=("<<(fNorm[0])[0]<<" "<<(fNorm[0])[1]<<" "<<(fNorm[0])[2];
2754 *os << ") Norm1=("<<(fNorm[1])[0]<<" "<<(fNorm[1])[1]<<" "<<(fNorm[1])[2];
2756 *os <<" Z , Rmin , Rmax " << endl;
2757 *os << setprecision(16) << fDz <<"\t";
2758 *os << setprecision(16) << fRmin << "\t";
2759 *os << setprecision(16) << fRmax << endl;
2760 os->flags(fmt); // reset back to old formating.
2763 //______________________________________________________________________
2764 void AliITSTubeCutData::Read(istream *is){
2765 // Read in data kept in this class
2767 // istream *is the input stream
2774 AliITSBaseVolParams::Read(is);
2781 *is >> (fNorm[0])[0]>>(fNorm[0])[1]>>(fNorm[0])[2];
2783 *is >> (fNorm[1])[0]>>(fNorm[1])[1]>>(fNorm[1])[2];
2786 *is >> fDz >> fRmin >> fRmax;
2788 //______________________________________________________________________
2789 ostream &operator<<(ostream &os,AliITSTubeCutData &p){
2790 // Operator << for C++ like output
2792 // ostream &os The output stream
2793 // AliITSTubeData &p The class to be outputed
2797 // ostream &os The output stream
2802 //______________________________________________________________________
2803 istream &operator>>(istream &is,AliITSTubeCutData &r){
2804 // Operator << for C++ like output
2806 // istream &is The input stream
2807 // AliITSTubeData &r The class to be read in
2811 // istream &is The input stream
2817 //======================================================================
2818 ClassImp(AliITSTubeEllipticalData)
2819 //______________________________________________________________________
2820 void AliITSTubeEllipticalData::Print(ostream *os){
2821 // Prints out the data kept in this class
2823 // ostream *os The output stream pointer
2829 #if defined __GNUC__
2836 #if defined __ICC || defined __ECC
2843 AliITSBaseVolParams::Print(os);
2844 fmt = os->setf(ios::scientific); // set scientific floating point output
2845 *os <<" Z , Semi-axis-x , Semi-axis-y " << endl;
2846 fmt = os->setf(ios::scientific); // set scientific floating point output
2847 *os << setprecision(16) << fDz <<"\t";
2848 *os << setprecision(16) << fP0 << "\t";
2849 *os << setprecision(16) << fP1 << endl;
2850 os->flags(fmt); // reset back to old formating.
2854 //______________________________________________________________________
2855 void AliITSTubeEllipticalData::Read(istream *is){
2856 // Read in data kept in this class
2858 // istream *is the input stream
2865 AliITSBaseVolParams::Read(is);
2868 *is >> fDz >> fP0 >> fP1;
2870 //______________________________________________________________________
2871 ostream &operator<<(ostream &os,AliITSTubeEllipticalData &p){
2872 // Operator << for C++ like output
2874 // ostream &os The output stream
2875 // AliITSTubeData &p The class to be outputed
2879 // ostream &os The output stream
2884 //______________________________________________________________________
2885 istream &operator>>(istream &is,AliITSTubeEllipticalData &r){
2886 // Operator << for C++ like output
2888 // istream &is The input stream
2889 // AliITSTubeData &r The class to be read in
2893 // istream &is The input stream
2898 //======================================================================
2899 ClassImp(AliITSTubeHyperbolicData)
2900 //______________________________________________________________________
2901 void AliITSTubeHyperbolicData::Print(ostream *os){
2902 // Prints out the data kept in this class
2904 // ostream *os The output stream pointer
2910 #if defined __GNUC__
2917 #if defined __ICC || defined __ECC
2924 AliITSBaseVolParams::Print(os);
2925 fmt = os->setf(ios::scientific); // set scientific floating point output
2926 *os <<" Z Rmin Rmax Theta"<<endl;
2927 fmt = os->setf(ios::scientific); // set scientific floating point output
2928 *os << setprecision(16) << fDz <<"\t";
2929 *os << setprecision(16) << fRmin << "\t";
2930 *os << setprecision(16) << fRmax << "\t";
2931 *os << setprecision(16) << fTheta << endl;
2932 os->flags(fmt); // reset back to old formating.
2936 //______________________________________________________________________
2937 void AliITSTubeHyperbolicData::Read(istream *is){
2938 // Read in data kept in this class
2940 // istream *is the input stream
2947 AliITSBaseVolParams::Read(is);
2950 *is >> fDz >> fRmin >> fRmax >> fTheta;
2952 //______________________________________________________________________
2953 ostream &operator<<(ostream &os,AliITSTubeHyperbolicData &p){
2954 // Operator << for C++ like output
2956 // ostream &os The output stream
2957 // AliITSTubeData &p The class to be outputed
2961 // ostream &os The output stream
2966 //______________________________________________________________________
2967 istream &operator>>(istream &is,AliITSTubeHyperbolicData &r){
2968 // Operator << for C++ like output
2970 // istream &is The input stream
2971 // AliITSTubeData &r The class to be read in
2975 // istream &is The input stream
2980 //======================================================================
2981 ClassImp(AliITSConeData)
2982 //______________________________________________________________________
2983 void AliITSConeData::Print(ostream *os){
2984 // Prints out the data kept in this class
2986 // ostream *os The output stream pointer
2992 #if defined __GNUC__
2999 #if defined __ICC || defined __ECC
3006 AliITSBaseVolParams::Print(os);
3007 fmt = os->setf(ios::scientific); // set scientific floating point output
3008 *os <<" Z Rmin Rmax" << endl;
3009 fmt = os->setf(ios::scientific); // set scientific floating point output
3010 *os << setprecision(16) << fDz <<"\t";
3011 *os << setprecision(16) << fRmin0 << "\t";
3012 *os << setprecision(16) << fRmax0 << endl;
3013 *os << setprecision(16) << fDz <<"\t";
3014 *os << setprecision(16) << fRmin1 << "\t";
3015 *os << setprecision(16) << fRmax1 << endl;
3016 os->flags(fmt); // reset back to old formating.
3019 //______________________________________________________________________
3020 void AliITSConeData::Read(istream *is){
3021 // Read in data kept in this class
3023 // istream *is the input stream
3030 AliITSBaseVolParams::Read(is);
3033 *is >> fDz >> fRmin0 >> fRmax0;
3034 *is >> fDz >> fRmin1 >> fRmax1;
3036 //______________________________________________________________________
3037 ostream &operator<<(ostream &os,AliITSConeData &p){
3038 // Operator << for C++ like output
3040 // ostream &os The output stream
3041 // AliITSTubeData &p The class to be outputed
3045 // ostream &os The output stream
3050 //______________________________________________________________________
3051 istream &operator>>(istream &is,AliITSConeData &r){
3052 // Operator << for C++ like output
3054 // istream &is The input stream
3055 // AliITSTubeData &r The class to be read in
3059 // istream &is The input stream
3064 //======================================================================
3065 ClassImp(AliITSConeSegData)
3066 //______________________________________________________________________
3067 void AliITSConeSegData::Print(ostream *os){
3068 // Prints out the data kept in this class
3070 // ostream *os The output stream pointer
3076 #if defined __GNUC__
3083 #if defined __ICC || defined __ECC
3090 AliITSBaseVolParams::Print(os);
3091 fmt = os->setf(ios::scientific); // set scientific floating point output
3092 *os << "fPhi0=" << fPhi0 << " fPhi1=" << fPhi1 << endl;
3093 *os <<" Z , Rmin , Rmax " << endl;
3094 fmt = os->setf(ios::scientific); // set scientific floating point output
3095 *os << setprecision(16) << fDz <<"\t";
3096 *os << setprecision(16) << fRmin0 << "\t";
3097 *os << setprecision(16) << fRmax0 << endl;
3098 *os << setprecision(16) << fDz <<"\t";
3099 *os << setprecision(16) << fRmin1 << "\t";
3100 *os << setprecision(16) << fRmax1 << endl;
3101 os->flags(fmt); // reset back to old formating.
3104 //______________________________________________________________________
3105 void AliITSConeSegData::Read(istream *is){
3106 // Read in data kept in this class
3108 // istream *is the input stream
3115 AliITSBaseVolParams::Read(is);
3121 *is >> fDz >> fRmin0 >> fRmax0;
3122 *is >> fDz >> fRmin1 >> fRmax1;
3124 //______________________________________________________________________
3125 ostream &operator<<(ostream &os,AliITSConeSegData &p){
3126 // Operator << for C++ like output
3128 // ostream &os The output stream
3129 // AliITSConeSegData &p The class to be outputed
3133 // ostream &os The output stream
3138 //______________________________________________________________________
3139 istream &operator>>(istream &is,AliITSConeSegData &r){
3140 // Operator << for C++ like output
3142 // istream &is The input stream
3143 // AliITSConeSegData &r The class to be read in
3147 // istream &is The input stream
3152 //======================================================================
3153 ClassImp(AliITSPConeData)
3154 //______________________________________________________________________
3155 void AliITSPConeData::Print(ostream *os){
3156 // Prints out the data kept in this class
3158 // ostream *os The output stream pointer
3165 #if defined __GNUC__
3172 #if defined __ICC || defined __ECC
3179 AliITSBaseVolParams::Print(os);
3180 fmt = os->setf(ios::scientific); // set scientific floating point output
3181 *os << "fNz=" << fNz << " fPhi0=" << fPhi0 << " fdPhi=" << fDphi << endl;
3182 *os <<" Z , Rmin , Rmax " << endl;
3183 fmt = os->setf(ios::scientific); // set scientific floating point output
3185 *os << setprecision(16) << fZ[i] <<"\t";
3186 *os << setprecision(16) << fRmin[i] << "\t";
3187 *os << setprecision(16) << fRmax[i] << endl;
3189 os->flags(fmt); // reset back to old formating.
3192 //______________________________________________________________________
3193 void AliITSPConeData::Read(istream *is){
3194 // Read in data kept in this class
3196 // istream *is the input stream
3204 AliITSBaseVolParams::Read(is);
3214 *is >> fZ[i] >> fRmin[i] >> fRmax[i];
3217 //______________________________________________________________________
3218 ostream &operator<<(ostream &os,AliITSPConeData &p){
3219 // Operator << for C++ like output
3221 // ostream &os The output stream
3222 // AliITSPConeData &p The class to be outputed
3226 // ostream &os The output stream
3231 //______________________________________________________________________
3232 istream &operator>>(istream &is,AliITSPConeData &r){
3233 // Operator << for C++ like output
3235 // istream &is The input stream
3236 // AliITSPConeData &r The class to be read in
3240 // istream &is The input stream
3245 //======================================================================
3246 ClassImp(AliITSSphereData)
3247 //______________________________________________________________________
3248 void AliITSSphereData::Print(ostream *os){
3249 // Prints out the data kept in this class
3251 // ostream *os The output stream pointer
3257 #if defined __GNUC__
3264 #if defined __ICC || defined __ECC
3271 AliITSBaseVolParams::Print(os);
3272 fmt = os->setf(ios::scientific); // set scientific floating point output
3273 *os << "fTheta[0]=" << fTheta[0] << " fTheta[1]=" << fTheta[1] << endl;
3274 *os << "fPhi[0]=" << fPhi[0] << " fPhi[1]=" << fPhi[1] << endl;
3275 *os <<" Rmin , Rmax " << endl;
3276 fmt = os->setf(ios::scientific); // set scientific floating point output
3277 *os << setprecision(16) << fRmin << "\t";
3278 *os << setprecision(16) << fRmax << endl;
3279 os->flags(fmt); // reset back to old formating.
3282 //______________________________________________________________________
3283 void AliITSSphereData::Read(istream *is){
3284 // Read in data kept in this class
3286 // istream *is the input stream
3293 AliITSBaseVolParams::Read(is);
3303 *is >>fRmin >> fRmax;
3305 //______________________________________________________________________
3306 ostream &operator<<(ostream &os,AliITSSphereData &p){
3307 // Operator << for C++ like output
3309 // ostream &os The output stream
3310 // AliITSPConeData &p The class to be outputed
3314 // ostream &os The output stream
3319 //______________________________________________________________________
3320 istream &operator>>(istream &is,AliITSSphereData &r){
3321 // Operator << for C++ like output
3323 // istream &is The input stream
3324 // AliITSPConeData &r The class to be read in
3328 // istream &is The input stream
3333 //======================================================================
3334 ClassImp(AliITSParallelpipedData)
3335 //______________________________________________________________________
3336 void AliITSParallelpipedData::Print(ostream *os){
3337 // Prints out the data kept in this class
3339 // ostream *os The output stream pointer
3345 #if defined __GNUC__
3352 #if defined __ICC || defined __ECC
3359 AliITSBaseVolParams::Print(os);
3360 fmt = os->setf(ios::scientific); // set scientific floating point output
3361 *os << "fDx=" << fDx << " fDy=" << fDy << " fDz=" << fDz << endl;
3362 *os << "fAlpha=" << fAlpha << " fTheta=" << fTheta <<" fPhi="<<fPhi<<endl;
3363 os->flags(fmt); // reset back to old formating.
3366 //______________________________________________________________________
3367 void AliITSParallelpipedData::Read(istream *is){
3368 // Read in data kept in this class
3370 // istream *is the input stream
3377 AliITSBaseVolParams::Read(is);
3391 //______________________________________________________________________
3392 ostream &operator<<(ostream &os,AliITSParallelpipedData &p){
3393 // Operator << for C++ like output
3395 // ostream &os The output stream
3396 // AliITSBoxData &p The class to be outputed
3400 // ostream &os The output stream
3405 //______________________________________________________________________
3406 istream &operator>>(istream &is,AliITSParallelpipedData &r){
3407 // Operator << for C++ like output
3409 // istream &is The input stream
3410 // AliITSBoxData &r The class to be read in
3414 // istream &is The input stream
3419 //======================================================================
3420 ClassImp(AliITSPGonData)
3421 //______________________________________________________________________
3422 void AliITSPGonData::Print(ostream *os){
3423 // Prints out the data kept in this class
3425 // ostream *os The output stream pointer
3432 #if defined __GNUC__
3439 #if defined __ICC || defined __ECC
3446 AliITSBaseVolParams::Print(os);
3447 fmt = os->setf(ios::scientific); // set scientific floating point output
3448 fmt = os->setf(ios::scientific); // set scientific floating point output
3449 *os << "fNz=" << fNz << " fNphi=" << fNphi << " fPhi0=" << fPhi0;
3450 *os << " fdPhi=" << fDphi << endl;
3451 *os <<" Z , Rmin , Rmax " << endl;
3453 *os << setprecision(16) << fZ[i] <<"\t";
3454 *os << setprecision(16) << fRmin[i] << "\t";
3455 *os << setprecision(16) << fRmax[i] << endl;
3457 os->flags(fmt); // reset back to old formating.
3460 //______________________________________________________________________
3461 void AliITSPGonData::Read(istream *is){
3462 // Read in data kept in this class
3464 // istream *is the input stream
3472 AliITSBaseVolParams::Read(is);
3486 *is >> fZ[i] >> fRmin[i] >> fRmax[i];
3489 //______________________________________________________________________
3490 ostream &operator<<(ostream &os,AliITSPGonData &p){
3491 // Operator << for C++ like output
3493 // ostream &os The output stream
3494 // AliITSPGonData &p The class to be outputed
3498 // ostream &os The output stream
3503 //______________________________________________________________________
3504 istream &operator>>(istream &is,AliITSPGonData &r){
3505 // Operator << for C++ like output
3507 // istream &is The input stream
3508 // AliITSPGonData &r The class to be read in
3512 // istream &is The input stream