1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 A base geometry class defining all of the ITS volumes that make up an ITS
23 Created February 2003.
26 #include <Riostream.h>
31 #include <TGeometry.h>
37 #include <TFile.h> // only required for Tracking function?
39 #include <TObjArray.h>
40 #include <TLorentzVector.h>
41 #include <TObjString.h>
42 #include <TClonesArray.h>
48 #include "AliITSBaseGeometry.h"
50 ClassImp(AliITSBaseGeometry)
52 const Double_t AliITSBaseGeometry::fAlpha = 7.297352533e-3;
53 const Double_t AliITSBaseGeometry::fRe = 2.81794028e-13;
54 const Double_t AliITSBaseGeometry::fNa = 6.02214199e+23;
55 Int_t AliITSBaseGeometry::fNCreates = 0;
56 Int_t* AliITSBaseGeometry::fidrot = 0;
57 Int_t AliITSBaseGeometry::fidrotsize = 0;
58 Int_t AliITSBaseGeometry::fidrotlast = 0;
59 Int_t AliITSBaseGeometry::fVolNameSize = 0;
60 Int_t AliITSBaseGeometry::fVolNameLast = 0;
61 TString* AliITSBaseGeometry::fVolName = 0;
63 //______________________________________________________________________
64 AliITSBaseGeometry::AliITSBaseGeometry(){
65 // Default construtor for the ITS Base Geometry class.
73 fScale = 1.0; // Default value.
74 fits = 0; // zero pointers.
75 if(fNCreates==0){ // only for very first init
77 fNCreates++; // incrament this creation counter.
79 //______________________________________________________________________
80 AliITSBaseGeometry::AliITSBaseGeometry(AliITS *its,Int_t iflag){
81 // Standard construtor for the ITS Base Geometry class.
83 // Int_t iflag flag to indecate specific swiches in the geometry
89 fScale = iflag; // remove warning message for unused variable
90 fScale = 1.0; // Default value.
91 fits = its; // get a copy of the pointer to the ITS.
92 if(fNCreates==0){ // only for very first init
93 fidrotsize = ITSG3VnameToIndex("TSV")+1;
94 fidrot = new Int_t[fidrotsize];
97 fNCreates++; // incrament this creation counter.
99 //______________________________________________________________________
100 AliITSBaseGeometry::~AliITSBaseGeometry(){
101 // Standeard destructor for the ITS Base Geometry class.
103 // Int_t iflag flag to indecate specific swiches in the geometry
109 fits = 0; // This class does not own this class. It contaitns a pointer
110 // to it for conveniance.
112 if(fNCreates==0){ // Now delete the static members
115 for(i=0;i<fVolNameLast;i++) delete fVolName[i];
121 fidrotsize = fidrotlast = 0;
124 //______________________________________________________________________
125 Int_t AliITSBaseGeometry::AddVolName(const TString name){
126 // Checks if the volume name already exist, if not it adds it to
127 // the list of volume names and returns an index to that volume name.
128 // it will create and expand the array of volume names as needed.
129 // If the volume name already exists, it will give an error message and
130 // return an index <0.
132 // const TString name Volume name to be added to the list.
136 // The index where this volume name is stored.
139 if(fVolName==0){ // must create array.
140 fVolNameSize = 38624;
141 fVolName = new TString[fVolNameSize];
144 for(i=0;i<fVolNameLast;i++) if(fVolName[i].CompareTo(name)==0){ // Error
145 Error("AddVolName","Volume name already exists for volume %d name %s",
149 if(fVolNameSize==fVolNameLast-1){ // Array is full must expand.
150 Int_t size = fVolNameSize*2;
151 TString *old = fVolName;
152 fVolName = new TString[fVolNameSize];
153 for(i=0;i<fVolNameLast;i++) fVolName[i] = old[i];
157 i=ITSIndexToITSG3name(fVolNameLast);
158 if(strcmp((char*)(&i),"ITSV")==0){
159 // Special Reserved Geant 3 volumen name. Skip it
160 // fill it with explination for conveniance.
161 fVolName[fVolNameLast] = "ITS Master Mother Volume";
164 fVolName[fVolNameLast] = name;
166 return fVolNameLast-1; // return the index
168 //______________________________________________________________________
169 Int_t AliITSBaseGeometry::ITSIndexToITSG3name(const Int_t i){
170 // Given the ITS volume index i, it returns the Geant3 ITS volume
171 // name. The valid characters must be in the range
172 // '0' through 'Z'. This will include all upper case letter and the
173 // numbers 0-9. In addition it does not will include the following simbols
176 // const Int_t i the ITS volume index
180 // char[4] with the ITS volume name starting from "I000" to "IZZZ"
181 const Int_t rangen=(Int_t)('9'-'0'+1); // range of numbers
182 const Int_t rangel=(Int_t)('Z'-'A'+1); // range of letters
183 const Int_t range = rangen+rangel; // the number of characters between
186 Byte_t *a = (Byte_t*) &k;
190 a[0] = (Byte_t)('I');
191 a[1] = (Byte_t)('0'+j/(range*range));
192 if(a[1]>'9') a[1] += 'A'-'9'-1;//if it is a letter add in gap for simples.
193 j -= range*range*((Int_t)(j/(range*range)));
194 a[2] = (Byte_t)('0'+j/range);
195 if(a[2]>'9') a[2] += 'A'-'9'-1;//if it is a letter add in gap for simples.
196 j -= range*((Int_t)(j/range));
197 a[3] = (Byte_t)('0'+j);
198 if(a[3]>'9') a[3] += 'A'-'9'-1;//if it is a letter add in gap for simples.
201 //______________________________________________________________________
202 Int_t AliITSBaseGeometry::ITSG3VnameToIndex(const char *name){
203 // Given the last three characters of the ITS Geant3 volume name,
204 // this returns the index. The valid characters must be in the range
205 // '0' through 'Z'. This will include all upper case letter and the
206 // numbers 0-9. In addition it will include the following simbles
209 // const char name[3] The last three characters of the ITS Geant3
215 const Int_t rangen = (Int_t)('9'-'0'+1); // range of numbers
216 const Int_t rangel = (Int_t)('Z'-'A'+1); // range of letters
217 const Int_t range = rangen+rangel; // the number of characters between
222 for(j=k;j>k-3;j--) if(isdigit(name[j])) // number
223 i += (Int_t)((name[j]-'0')*TMath::Power((Double_t)range,
226 i += (Int_t)((name[j]-'A'+rangen)*TMath::Power((Double_t)range,
230 //______________________________________________________________________
231 TString AliITSBaseGeometry::GetVolName(const Int_t i)const{
232 // Returns the volume name at a given index i. Index must be in
233 // range and the array of volume names must exist. If there is an
234 // error, a message is written and 0 is returned.
236 // const Int_t i Index
240 // A TString contianing the ITS volume name.
242 if(i<0||i>=fVolNameLast){
243 Error("GetVolName","Index=%d out of range but be witin 0<%d",i,
249 //______________________________________________________________________
250 Int_t AliITSBaseGeometry::GetVolumeIndex(const TString &a){
251 // Return the index corresponding the the volume name a. If the
252 // Volumen name is not found, return -1, and a warning message given.
254 // const TString &a Name of volume for which index is wanted.
258 // Int_t Index corresponding the volume a. If not found -1 is returned.
261 for(i=0;i<fVolNameLast;i++) if(fVolName[i].CompareTo(a)==0) return i;
262 Info("GetVolumeIndex","Volume name %s not found",a.Data());
265 //______________________________________________________________________
266 void AliITSBaseGeometry::Box(const char *gnam,const TString &dis,
267 Double_t dx,Double_t dy,Double_t dz,Int_t med){
268 // Interface to TMC->Gsvolu() for ITS box geometries. Box with faces
269 // perpendicular to the axes. It has 3 paramters. See SetScale() for
270 // units. Default units are geant 3 [cm].
272 // const char *gnam 3 character geant volume name. The letter "I"
273 // is appended to the front to indecate that this
275 // TString &dis String containging part discription.
276 // Double_t dx half-length of box in x-axis
277 // Double_t dy half-length of box in y-axis
278 // Double_t dz half-length of box in z-axis
279 // Int_t med media index number.
288 param[0] = fScale*dx;
289 param[1] = fScale*dy;
290 param[2] = fScale*dz;
292 gMC->Gsvolu(name,"BOX ",GetMed(med),param,3);
294 //______________________________________________________________________
295 void AliITSBaseGeometry::Box(AliITSBoxData &d,Int_t med){
296 // Interface to TMC->Gsvolu() for ITS box geometries. Box with faces
297 // perpendicular to the axes. It has 3 paramters. See SetScale() for
298 // units. Default units are geant 3 [cm].
300 // AliITSBoxData &d Structure with the Box parameters defined.
301 // Int_t med media index number.
309 char *j = (char *) &k;
311 param[0] = fScale*d.DxAt();
312 param[1] = fScale*d.DyAt();
313 param[2] = fScale*d.DzAt();
314 d.SetVid(AddVolName((d.GetName())->Data()));
315 k = ITSIndexToITSG3name(d.GetVid());
316 for(i=0;i<4;i++) name[i] = j[i];
318 gMC->Gsvolu(name,"BOX ",GetMed(med),param,3);
320 //______________________________________________________________________
321 void AliITSBaseGeometry::Trapezoid1(const char *gnam,const TString &dis,
322 Double_t dxn,Double_t dxp,Double_t dy,
323 Double_t dz,Int_t med){
324 // Interface to TMC->Gsvolu() for ITS TRD1 geometries. Trapezoid with the
325 // x dimension varing along z. It has 4 parameters. See SetScale() for
326 // units. Default units are geant 3 [cm].
328 // const char *gnam 3 character geant volume name. The letter "I"
329 // is appended to the front to indecate that this
331 // TString &dis String containging part discription.
332 // Double_t dxn half-length along x at the z surface positioned
334 // Double_t dxp half-length along x at the z surface positioned
336 // Double_t dy half-length along the y-axis
337 // Double_t dz half-length along the z-axis
338 // Int_t med media index number.
347 param[0] = fScale*dxn;
348 param[1] = fScale*dxp;
349 param[2] = fScale*dy;
350 param[3] = fScale*dz;
352 gMC->Gsvolu(name,"TRD1",GetMed(med),param,4);
354 //______________________________________________________________________
355 void AliITSBaseGeometry::Trapezoid1(AliITSTrapezoid1Data &d,Int_t med){
356 // Interface to TMC->Gsvolu() for ITS TRD1 geometries. Trapezoid with the
357 // x dimension varing along z. It has 4 parameters. See SetScale() for
358 // units. Default units are geant 3 [cm].
360 // AliITSTrapezoid1Data &d Structure with the Trapazoid data in it.
361 // Int_t med media index number.
369 char *j = (char *) &k;
371 param[0] = fScale*d.DxAt(0);
372 param[1] = fScale*d.DxAt(1);
373 param[2] = fScale*d.DyAt();
374 param[3] = fScale*d.DzAt();
375 d.SetVid(AddVolName((d.GetName())->Data()));
376 k = ITSIndexToITSG3name(d.GetVid());
377 for(i=0;i<4;i++) name[i] = j[i];
379 gMC->Gsvolu(name,"TRD1",GetMed(med),param,4);
381 //______________________________________________________________________
382 void AliITSBaseGeometry::Trapezoid2(const char *gnam,const TString &dis,
383 Double_t dxn,Double_t dxp,Double_t dyn,
384 Double_t dyp,Double_t dz,Int_t med){
385 // Interface to TMC->Gsvolu() for ITS TRD2 geometries. Trapezoid with the
386 // x and y dimension varing along z. It has 5 parameters. See SetScale()
387 // for units. Default units are geant 3 [cm].
389 // const char *gnam 3 character geant volume name. The letter "I"
390 // is appended to the front to indecate that this
392 // TString &dis String containging part discription.
393 // Double_t dxn half-length along x at the z surface positioned
395 // Double_t dxp half-length along x at the z surface positioned
397 // Double_t dyn half-length along x at the z surface positioned
399 // Double_t dyp half-length along x at the z surface positioned
401 // Double_t dz half-length along the z-axis
402 // Int_t med media index number.
411 param[0] = fScale*dxn;
412 param[1] = fScale*dxp;
413 param[2] = fScale*dyn;
414 param[3] = fScale*dyp;
415 param[4] = fScale*dz;
417 gMC->Gsvolu(name,"TRD2",GetMed(med),param,5);
419 //______________________________________________________________________
420 void AliITSBaseGeometry::Trapezoid2(AliITSTrapezoid2Data &d,Int_t med){
421 // Interface to TMC->Gsvolu() for ITS TRD2 geometries. Trapezoid with the
422 // x and y dimension varing along z. It has 5 parameters. See SetScale()
423 // for units. Default units are geant 3 [cm].
425 // AliITSTrapezoid2Data &d Structure with the Trapazoid data in it.
426 // Int_t med media index number.
434 char *j = (char *) &k;
436 param[0] = fScale*d.DxAt(0);
437 param[1] = fScale*d.DxAt(1);
438 param[2] = fScale*d.DyAt(0);
439 param[3] = fScale*d.DyAt(1);
440 param[4] = fScale*d.DzAt();
441 d.SetVid(AddVolName((d.GetName())->Data()));
442 k = ITSIndexToITSG3name(d.GetVid());
443 for(i=0;i<4;i++) name[i] = j[i];
445 gMC->Gsvolu(name,"TRD2",GetMed(med),param,5);
447 //______________________________________________________________________
448 void AliITSBaseGeometry::Trapezoid(const char *gnam,const TString &dis,
449 Double_t dz,Double_t thet,Double_t phi,
450 Double_t h1,Double_t bl1,Double_t tl1,
451 Double_t alp1,Double_t h2,Double_t bl2,
452 Double_t tl2,Double_t alp2,Int_t med){
453 // Interface to TMC->Gsvolu() for ITS TRAP geometries. General Trapezoid,
454 // The faces perpendicular to z are trapezia and their centers are not
455 // necessarily on a line parallel to the z axis. This shape has 11
456 // parameters, but only cosidering that the faces should be planar, only
457 // 9 are really independent. A check is performed on the user parameters
458 // and a message is printed in case of non-planar faces. Ignoring this
459 // warning may cause unpredictable effects at tracking time. See
460 // SetScale() for units. Default units are geant 3 [cm].
462 // const char *gnam 3 character geant volume name. The letter "I"
463 // is appended to the front to indecate that this
465 // TString &dis String containging part discription.
466 // Double_t dz Half-length along the z-asix
467 // Double_t thet Polar angle of the line joing the center of the
468 // face at -dz to the center of the one at dz
470 // Double_t phi aximuthal angle of the line joing the center of
471 // the face at -dz to the center of the one at +dz
473 // Double_t h1 half-length along y of the face at -dz.
474 // Double_t bl1 half-length along x of the side at -h1 in y of
475 // the face at -dz in z.
476 // Double_t tl1 half-length along x of teh side at +h1 in y of
477 // the face at -dz in z.
478 // Double_t alp1 angle with respect to the y axis from the
479 // center of the side at -h1 in y to the cetner
480 // of the side at +h1 in y of the face at -dz in z
482 // Double_t h2 half-length along y of the face at +dz
483 // Double_t bl2 half-length along x of the side at -h2 in y of
484 // the face at +dz in z.
485 // Double_t tl2 half-length along x of the side at _h2 in y of
486 // the face at +dz in z.
487 // Double_t alp2 angle with respect to the y axis from the
488 // center of the side at -h2 in y to the center
489 // of the side at +h2 in y of the face at +dz in z
491 // Int_t med media index number.
500 param[0] = fScale*dz;
503 param[3] = fScale*h1;
504 param[4] = fScale*bl1;
505 param[5] = fScale*tl1;
507 param[7] = fScale*h2;
508 param[8] = fScale*bl2;
509 param[9] = fScale*tl2;
512 gMC->Gsvolu(name,"TRAP",GetMed(med),param,11);
514 //______________________________________________________________________
515 void AliITSBaseGeometry::Trapezoid(AliITSTrapezoidData &d,Int_t med){
516 // Interface to TMC->Gsvolu() for ITS TRAP geometries. General Trapezoid,
517 // The faces perpendicular to z are trapezia and their centers are not
518 // necessarily on a line parallel to the z axis. This shape has 11
519 // parameters, but only cosidering that the faces should be planar, only
520 // 9 are really independent. A check is performed on the user parameters
521 // and a message is printed in case of non-planar faces. Ignoring this
522 // warning may cause unpredictable effects at tracking time. See
523 // SetScale() for units. Default units are geant 3 [cm].
525 // AliITSTrapezoidData &d Structure with the Trapazoid data in it.
526 // Int_t med media index number.
534 char *j = (char *) &k;
536 param[0] = fScale*d.DzAt();
537 param[1] = d.Theta();
539 param[3] = fScale*d.HAt(0);
540 param[4] = fScale*d.Bl(0);
541 param[5] = fScale*d.Tl(0);
542 param[6] = d.Alpha(0);
543 param[7] = fScale*d.HAt(1);
544 param[8] = fScale*d.Bl(1);
545 param[9] = fScale*d.Tl(1);
546 param[10] = d.Alpha(1);
547 d.SetVid(AddVolName((d.GetName())->Data()));
548 k = ITSIndexToITSG3name(d.GetVid());
549 for(i=0;i<4;i++) name[i] = j[i];
551 gMC->Gsvolu(name,"TRAP",GetMed(med),param,11);
553 //______________________________________________________________________
554 void AliITSBaseGeometry::TwistedTrapezoid(const char *gnam,
556 Double_t dz,Double_t thet,Double_t phi,
557 Double_t twist,Double_t h1,Double_t bl1,
558 Double_t tl1,Double_t apl1,Double_t h2,
559 Double_t bl2,Double_t tl2,Double_t apl2,
561 // Interface to TMC->Gsvolu() for ITS GTRA geometries. General twisted
562 // trapazoid. The faces perpendicular to z are trapazia and their centers
563 // are not necessarily on a line parallel to the z axis as the TRAP.
564 // Additionally, the faces may be twisted so that none of their edges are
565 // parallel. It is a TRAP shape, exept that it is twisted in the x-y
566 // plane as a function of z. The parallel sides perpendicular to the x
567 // axis are rotated with respect to the x axis by an angle TWIST, which
568 // is one of the parameters. The shape is defined by the eight corners
569 // and is assumed to be constructed of straight lines joingin points on
570 // the boundry of the trapezoidal face at Z=-dz to the coresponding
571 // points on the face at z=+dz. Divisions are not allowed. It has 12
572 // parameters. See SetScale() for units. Default units are geant 3 [cm].
573 // Note: This shape suffers from the same limitations than the TRAP. The
574 // tracking routines assume that the faces are planar, but htis
575 // constraint is not easily expressed in terms of the 12 parameters.
576 // Additionally, no check on th efaces is performed in this case. Users
577 // should avoid to use this shape as much as possible, and if they have
578 // to do so, they should make sure that the faces are really planes.
579 // If this is not the case, the result of the trasport is unpredictable.
580 // To accelerat ethe computations necessary for trasport, 18 additioanl
581 // parameters are calculated for this shape are 1 DXODZ dx/dz of the
582 // line joing the centers of the faces at z=+_dz. 2 DYODZ dy/dz of the
583 // line joing the centers of the faces at z=+_dz.
584 // 3 XO1 x at z=0 for line joing the + on parallel side, perpendicular
585 // corners at z=+_dz.
586 // 4 YO1 y at z=0 for line joing the + on parallel side, + on
587 // perpendicular corners at z=+-dz.
588 // 5 DXDZ1 dx/dz for line joing the + on parallel side, + on
589 // perpendicular corners at z=+-dz.
590 // 6 DYDZ1 dy/dz for line joing the + on parallel side, + on
591 // perpendicular corners at z=+-dz.
592 // 7 X02 x at z=0 for line joing the - on parallel side, + on
593 // perpendicular corners at z=+-dz.
594 // 8 YO2 y at z=0 for line joing the - on parallel side, + on
595 // perpendicular corners at z=+-dz.
596 // 9 DXDZ2 dx/dz for line joing the - on parallel side, + on
597 // perpendicular corners at z=+-dz.
598 // 10 DYDZ2dy/dz for line joing the - on parallel side, + on
599 // perpendicular corners at z=+-dz.
600 // 11 XO3 x at z=0 for line joing the - on parallel side, - on
601 // perpendicular corners at z=+-dz.
602 // 12 YO3 y at z=0 for line joing the - on parallel side, - on
603 // perpendicular corners at z=+-dz.
604 // 13 DXDZ3 dx/dzfor line joing the - on parallel side, - on
605 // perpendicular corners at z=+-dz.
606 // 14 DYDZ3 dydz for line joing the - on parallel side, - on
607 // perpendicular corners at z=+-dz.
608 // 15 XO4 x at z=0 for line joing the + on parallel side, - on
609 // perpendicular corners at z=+-dz.
610 // 16 YO4 y at z=0 for line joing the + on parallel side, - on
611 // perpendicular corners at z=+-dz.
612 // 17 DXDZ4 dx/dz for line joing the + on parallel side, - on
613 // perpendicular corners at z=+-dz.
614 // 18 DYDZ4 dydz for line joing the + on parallel side, - on
615 // perpendicular corners at z=+-dz.
617 // const char *gnam 3 character geant volume name. The letter "I"
618 // is appended to the front to indecate that this
620 // TString &dis String containging part discription.
621 // Double_t dz half-length along the z axis.
622 // Double_t thet polar angle of the line joing the center of the
623 // face at -dz to the center of the one at +dz
625 // Double_t phi Azymuthal angle of teh line joing the centre of
626 // the face at -dz to the center of the one at +dz
628 // Double_t twist Twist angle of the faces parallel to the x-y
629 // plane at z=+-dz around an axis parallel to z
630 // passing through their centre [degrees].
631 // Double_t h1 Half-length along y of the face at -dz.
632 // Double_t bl1 half-length along x of the side -h1 in y of the
634 // Double_t tl1 half-length along x of the side at +h1 in y of
635 // the face at -dz in z.
636 // Double_t apl1 Angle with respect to the y ais from the center
637 // of the side at -h1 in y to the centere of the
638 // side at +h1 in y of the face at -dz in z
640 // Double_t h2 half-length along the face at +dz.
641 // Double_t bl2 half-length along x of the side at -h2 in y of
642 // the face at -dz in z.
643 // Double_t tl2 half-length along x of the side at +h2 in y of
644 // the face at +dz in z.
645 // Double_t apl2 angle with respect to the y axis from the
646 // center of the side at -h2 in y to the center
647 // of the side at +h2 in y of the face at +dz in
649 // Int_t med media index number.
658 param[0] = fScale*dz;
662 param[4] = fScale*h1;
663 param[5] = fScale*bl1;
664 param[6] = fScale*tl1;
666 param[8] = fScale*h2;
667 param[9] = fScale*bl2;
668 param[10] = fScale*tl2;
671 gMC->Gsvolu(name,"GTRA",GetMed(med),param,12);
673 //______________________________________________________________________
674 void AliITSBaseGeometry::TwistedTrapezoid(AliITSTrapezoidTwistedData &d,
676 // Interface to TMC->Gsvolu() for ITS GTRA geometries. General twisted
677 // trapazoid. The faces perpendicular to z are trapazia and their centers
678 // are not necessarily on a line parallel to the z axis as the TRAP.
679 // Additionally, the faces may be twisted so that none of their edges are
680 // parallel. It is a TRAP shape, exept that it is twisted in the x-y
681 // plane as a function of z. The parallel sides perpendicular to the x
682 // axis are rotated with respect to the x axis by an angle TWIST, which
683 // is one of the parameters. The shape is defined by the eight corners
684 // and is assumed to be constructed of straight lines joingin points on
685 // the boundry of the trapezoidal face at Z=-dz to the coresponding
686 // points on the face at z=+dz. Divisions are not allowed. It has 12
687 // parameters. See SetScale() for units. Default units are geant 3 [cm].
688 // Note: This shape suffers from the same limitations than the TRAP. The
689 // tracking routines assume that the faces are planar, but htis
690 // constraint is not easily expressed in terms of the 12 parameters.
691 // Additionally, no check on th efaces is performed in this case. Users
692 // should avoid to use this shape as much as possible, and if they have
693 // to do so, they should make sure that the faces are really planes.
694 // If this is not the case, the result of the trasport is unpredictable.
695 // To accelerat ethe computations necessary for trasport, 18 additioanl
696 // parameters are calculated for this shape are 1 DXODZ dx/dz of the
697 // line joing the centers of the faces at z=+_dz. 2 DYODZ dy/dz of the
698 // line joing the centers of the faces at z=+_dz.
699 // 3 XO1 x at z=0 for line joing the + on parallel side, perpendicular
700 // corners at z=+_dz.
701 // 4 YO1 y at z=0 for line joing the + on parallel side, + on
702 // perpendicular corners at z=+-dz.
703 // 5 DXDZ1 dx/dz for line joing the + on parallel side, + on
704 // perpendicular corners at z=+-dz.
705 // 6 DYDZ1 dy/dz for line joing the + on parallel side, + on
706 // perpendicular corners at z=+-dz.
707 // 7 X02 x at z=0 for line joing the - on parallel side, + on
708 // perpendicular corners at z=+-dz.
709 // 8 YO2 y at z=0 for line joing the - on parallel side, + on
710 // perpendicular corners at z=+-dz.
711 // 9 DXDZ2 dx/dz for line joing the - on parallel side, + on
712 // perpendicular corners at z=+-dz.
713 // 10 DYDZ2dy/dz for line joing the - on parallel side, + on
714 // perpendicular corners at z=+-dz.
715 // 11 XO3 x at z=0 for line joing the - on parallel side, - on
716 // perpendicular corners at z=+-dz.
717 // 12 YO3 y at z=0 for line joing the - on parallel side, - on
718 // perpendicular corners at z=+-dz.
719 // 13 DXDZ3 dx/dzfor line joing the - on parallel side, - on
720 // perpendicular corners at z=+-dz.
721 // 14 DYDZ3 dydz for line joing the - on parallel side, - on
722 // perpendicular corners at z=+-dz.
723 // 15 XO4 x at z=0 for line joing the + on parallel side, - on
724 // perpendicular corners at z=+-dz.
725 // 16 YO4 y at z=0 for line joing the + on parallel side, - on
726 // perpendicular corners at z=+-dz.
727 // 17 DXDZ4 dx/dz for line joing the + on parallel side, - on
728 // perpendicular corners at z=+-dz.
729 // 18 DYDZ4 dydz for line joing the + on parallel side, - on
730 // perpendicular corners at z=+-dz.
732 // AliITSTrapezoidTwistedData &d Structure with the tube parameters
733 // Int_t med media index number.
741 char *j = (char *) &k;
743 param[0] = fScale*d.DzAt();
744 param[1] = d.Theta();
746 param[3] = d.Twist();
747 param[4] = fScale*d.HAt(0);
748 param[5] = fScale*d.Bl(0);
749 param[6] = fScale*d.Tl(0);
750 param[7] = d.Alpha(0);
751 param[8] = fScale*d.HAt(1);
752 param[9] = fScale*d.Bl(1);
753 param[10] = fScale*d.Tl(1);
754 param[11] = d.Alpha(1);
755 d.SetVid(AddVolName((d.GetName())->Data()));
756 k = ITSIndexToITSG3name(d.GetVid());
757 for(i=0;i<4;i++) name[i] = j[i];
759 gMC->Gsvolu(name,"GTRA",GetMed(med),param,12);
761 //______________________________________________________________________
762 void AliITSBaseGeometry::Tube(const char *gnam,const TString &dis,
763 Double_t rmin,Double_t rmax,Double_t dz,
765 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Simple Tube. It has
766 // 3 parameters. See SetScale()
767 // for units. Default units are geant 3 [cm].
769 // const char *gnam 3 character geant volume name. The letter "I"
770 // is appended to the front to indecate that this
772 // TString &dis String containging part discription.
773 // Double_t rmin Inside Radius.
774 // Double_t rmax Outside Radius.
775 // Double_t dz half-length along the z-axis
776 // Int_t med media index number.
785 param[0] = fScale*rmin;
786 param[1] = fScale*rmax;
787 param[2] = fScale*dz;
789 gMC->Gsvolu(name,"TUBE",GetMed(med),param,3);
791 //______________________________________________________________________
792 void AliITSBaseGeometry::Tube(AliITSTubeData &d,Int_t med){
793 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Simple Tube. It has
794 // 3 parameters. See SetScale()
795 // for units. Default units are geant 3 [cm].
797 // AliITSTubeData &d Structure with the tube parameters
798 // Int_t med media index number.
806 char *j = (char *) &k;
808 param[0] = fScale*d.Rmin();
809 param[1] = fScale*d.Rmax();
810 param[2] = fScale*d.DzAt();
811 d.SetVid(AddVolName((d.GetName())->Data()));
812 k = ITSIndexToITSG3name(d.GetVid());
813 for(i=0;i<4;i++) name[i] = j[i];
815 gMC->Gsvolu(name,"TUBE",GetMed(med),param,3);
817 //______________________________________________________________________
818 void AliITSBaseGeometry::TubeSegment(const char *gnam,const TString &dis,
819 Double_t rmin,Double_t rmax,Double_t dz,
820 Double_t phi1,Double_t phi2,Int_t med){
821 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Phi segment of a
822 // tube. It has 5 parameters. Phi1 should be smaller than phi2. If this
823 // is not the case, the system adds 360 degrees to phi2. See SetScale()
824 // for units. Default units are geant 3 [cm].
826 // const char *gnam 3 character geant volume name. The letter "I"
827 // is appended to the front to indecate that this
829 // TString &dis String containging part discription.
830 // Double_t rmin Inside Radius.
831 // Double_t rmax Outside Radius.
832 // Double_t dz half-length along the z-axis
833 // Double_t phi1 Starting angle of the segment [degree].
834 // Double_t phi2 Ending angle of the segment [degree].
835 // Int_t med media index number.
844 param[0] = fScale*rmin;
845 param[1] = fScale*rmax;
846 param[2] = fScale*dz;
850 gMC->Gsvolu(name,"TUBS",GetMed(med),param,5);
852 //______________________________________________________________________
853 void AliITSBaseGeometry::TubeSegment(AliITSTubeSegData &d,Int_t med){
854 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Phi segment of a
855 // tube. It has 5 parameters. Phi1 should be smaller than phi2. If this
856 // is not the case, the system adds 360 degrees to phi2. See SetScale()
857 // for units. Default units are geant 3 [cm].
859 // AliITSTubeSegData &d Structure with the tube parameters
860 // Int_t med media index number.
868 char *j = (char *) &k;
870 param[0] = fScale*d.Rmin();
871 param[1] = fScale*d.Rmax();
872 param[2] = fScale*d.DzAt();
875 d.SetVid(AddVolName((d.GetName())->Data()));
876 k = ITSIndexToITSG3name(d.GetVid());
877 for(i=0;i<4;i++) name[i] = j[i];
879 gMC->Gsvolu(name,"TUBS",GetMed(med),param,5);
881 //______________________________________________________________________
882 void AliITSBaseGeometry::CutTube(const char *gnam,const TString &dis,
883 Double_t rmin,Double_t rmax,Double_t dz,
884 Double_t phi1,Double_t phi2,Double_t lx,
885 Double_t ly,Double_t lz,Double_t hx,
886 Double_t hy,Double_t hz,Int_t med){
887 // Interface to TMC->Gsvolu() for ITS CTUB geometries. Cut tube. A tube
888 // cut at the extremities with planes not necessarily perpendicular to
889 // the z axis. It has 11 parameters. See SetScale() for units. Default
890 // units are geant 3 [cm]. phi1 should be smaller than phi2. If this is
891 // not the case, the system adds 360 degrees to phi2.
893 // const char *gnam 3 character geant volume name. The letter "I"
894 // is appended to the front to indecate that this
896 // TString &dis String containging part discription.
897 // Double_t rmin Inner radius at z=0 where tube is narrowest.
898 // Double_t rmax Outer radius at z=0 where tube is narrowest.
899 // Double_t dz half-length along the z-axis
900 // Double_t phi1 Starting angle of the segment [degree].
901 // Double_t phi2 Ending angle of the segment [degree].
902 // Double_t lx x component of a unit vector perpendicular to
904 // Double_t ly y component of a unit vector perpendicular to
906 // Double_t lz z component of a unit vector perpendicular to
908 // Double_t hx x component of a unit vector perpendicular to
910 // Double_t hy y component of a unit vector perpendicular to
912 // Double_t hz z component of a unit vector perpendicular to
914 // Int_t med media index number.
923 param[0] = fScale*rmin;
924 param[1] = fScale*rmax;
925 param[2] = fScale*dz;
935 gMC->Gsvolu(name,"CTUB",GetMed(med),param,11);
937 //______________________________________________________________________
938 void AliITSBaseGeometry::CutTube(AliITSTubeCutData &d,Int_t med){
939 // Interface to TMC->Gsvolu() for ITS CTUB geometries. Cut tube. A tube
940 // cut at the extremities with planes not necessarily perpendicular to
941 // the z axis. It has 11 parameters. See SetScale() for units. Default
942 // units are geant 3 [cm]. phi1 should be smaller than phi2. If this is
943 // not the case, the system adds 360 degrees to phi2.
945 // AliITSTubeCutData &d Structure with the tube parameters
946 // Int_t med media index number.
954 char *j = (char *) &k;
956 param[0] = fScale*d.Rmin();
957 param[1] = fScale*d.Rmax();
958 param[2] = fScale*d.DzAt();
961 param[5] = d.Normal(0,0);
962 param[6] = d.Normal(0,1);
963 param[7] = d.Normal(0,2);
964 param[8] = d.Normal(1,0);
965 param[9] = d.Normal(1,1);
966 param[10] = d.Normal(1,2);
967 d.SetVid(AddVolName((d.GetName())->Data()));
968 k = ITSIndexToITSG3name(d.GetVid());
969 for(i=0;i<4;i++) name[i] = j[i];
971 gMC->Gsvolu(name,"CTUB",GetMed(med),param,11);
973 //______________________________________________________________________
974 void AliITSBaseGeometry::TubeElliptical(const char *gnam,const TString &dis,
975 Double_t p1,Double_t p2,Double_t dz,Int_t med){
976 // Interface to TMC->Gsvolu() for ITS ELTU geometries. Elliptical
977 // cross-section Tube. It has 3 parameters. See SetScale()
978 // for units. Default units are geant 3 [cm]. The equation of the surface
979 // is x^2 * p1^-2 + y^2 * p2^-2 = 1.
981 // const char *gnam 3 character geant volume name. The letter "I"
982 // is appended to the front to indecate that this
984 // TString &dis String containging part discription.
985 // Double_t p1 semi-axis of the elipse along x.
986 // Double_t p2 semi-axis of the elipse along y.
987 // Double_t dz half-length along the z-axis
988 // Int_t med media index number.
997 param[0] = fScale*p1;
998 param[1] = fScale*p2;
999 param[2] = fScale*dz;
1001 gMC->Gsvolu(name,"ELTU",GetMed(med),param,3);
1003 //______________________________________________________________________
1004 void AliITSBaseGeometry::TubeElliptical(AliITSTubeEllipticalData &d,
1006 // Interface to TMC->Gsvolu() for ITS ELTU geometries. Elliptical
1007 // cross-section Tube. It has 3 parameters. See SetScale()
1008 // for units. Default units are geant 3 [cm]. The equation of the surface
1009 // is x^2 * p1^-2 + y^2 * p2^-2 = 1.
1011 // AliITSTubeElipticData &d Structure with the tube parameters
1012 // Int_t med media index number.
1020 char *j = (char *) &k;
1022 param[0] = fScale*d.P0();
1023 param[1] = fScale*d.P1();
1024 param[2] = fScale*d.DzAt();
1025 d.SetVid(AddVolName((d.GetName())->Data()));
1026 k = ITSIndexToITSG3name(d.GetVid());
1027 for(i=0;i<4;i++) name[i] = j[i];
1029 gMC->Gsvolu(name,"ELTU",GetMed(med),param,3);
1031 //______________________________________________________________________
1032 void AliITSBaseGeometry::HyperbolicTube(const char *gnam,const TString &dis,
1033 Double_t rmin,Double_t rmax,Double_t dz,
1034 Double_t thet,Int_t med){
1035 // Interface to TMC->Gsvolu() for ITS HYPE geometries. Hyperbolic tube.
1036 // Fore example the inner and outer surfaces are hyperboloids, as would
1037 // be foumed by a system of cylinderical wires which were then rotated
1038 // tangentially about their centers. It has 4 parameters. See SetScale()
1039 // for units. Default units are geant 3 [cm]. The hyperbolic surfaces are
1040 // given by r^2 = (ztan(thet)^2 + r(z=0)^2.
1042 // const char *gnam 3 character geant volume name. The letter "I"
1043 // is appended to the front to indecate that this
1044 // is an ITS volume.
1045 // TString &dis String containging part discription.
1046 // Double_t rmin Inner radius at z=0 where tube is narrowest.
1047 // Double_t rmax Outer radius at z=0 where tube is narrowest.
1048 // Double_t dz half-length along the z-axis
1049 // Double_t thet stero angel of rotation of the two faces
1051 // Int_t med media index number.
1060 param[0] = fScale*rmin;
1061 param[1] = fScale*rmax;
1062 param[2] = fScale*dz;
1065 gMC->Gsvolu(name,"HYPE",GetMed(med),param,4);
1067 //______________________________________________________________________
1068 void AliITSBaseGeometry::HyperbolicTube(AliITSTubeHyperbolicData &d,
1070 // Interface to TMC->Gsvolu() for ITS HYPE geometries. Hyperbolic tube.
1071 // Fore example the inner and outer surfaces are hyperboloids, as would
1072 // be foumed by a system of cylinderical wires which were then rotated
1073 // tangentially about their centers. It has 4 parameters. See SetScale()
1074 // for units. Default units are geant 3 [cm]. The hyperbolic surfaces are
1075 // given by r^2 = (ztan(thet)^2 + r(z=0)^2.
1077 // AliITSTubeHyperbolicData &d Structure with the tube parameters
1078 // Int_t med media index number.
1086 char *j = (char *) &k;
1088 param[0] = fScale*d.Rmin();
1089 param[1] = fScale*d.Rmax();
1090 param[2] = fScale*d.DzAt();
1091 param[3] = d.Theta();
1092 d.SetVid(AddVolName((d.GetName())->Data()));
1093 k = ITSIndexToITSG3name(d.GetVid());
1094 for(i=0;i<4;i++) name[i] = j[i];
1096 gMC->Gsvolu(name,"HYPE",GetMed(med),param,4);
1098 //______________________________________________________________________
1099 void AliITSBaseGeometry::Cone(const char *gnam,const TString &dis,
1100 Double_t dz,Double_t rmin1,Double_t rmax1,
1101 Double_t rmin2,Double_t rmax2,Int_t med){
1102 // Interface to TMC->Gsvolu() for ITS Cone geometries. Conical tube. It
1103 // has 5 parameters. See SetScale()
1104 // for units. Default units are geant 3 [cm].
1106 // const char *gnam 3 character geant volume name. The letter "I"
1107 // is appended to the front to indecate that this
1108 // is an ITS volume.
1109 // TString &dis String containging part discription.
1110 // Double_t dz half-length along the z-axis
1111 // Double_t rmin1 Inside Radius at -dz.
1112 // Double_t rmax1 Outside Radius at -dz.
1113 // Double_t rmin2 inside radius at +dz.
1114 // Double_t rmax2 outside radius at +dz.
1115 // Int_t med media index number.
1124 param[0] = fScale*dz;
1125 param[1] = fScale*rmin1;
1126 param[2] = fScale*rmax1;
1127 param[3] = fScale*rmin2;
1128 param[4] = fScale*rmax2;
1130 gMC->Gsvolu(name,"CONS",GetMed(med),param,5);
1132 //______________________________________________________________________
1133 void AliITSBaseGeometry::Cone(AliITSConeData &d,Int_t med){
1134 // Interface to TMC->Gsvolu() for ITS Cone geometries. Conical tube. It
1135 // has 5 parameters. See SetScale()
1136 // for units. Default units are geant 3 [cm].
1138 // AliITSConeData &d Structure with the tube parameters
1139 // Int_t med media index number.
1147 char *j = (char *) &k;
1149 param[0] = fScale*d.DzAt();
1150 param[1] = fScale*d.Rmin0();
1151 param[2] = fScale*d.Rmax0();
1152 param[3] = fScale*d.Rmin1();
1153 param[4] = fScale*d.Rmax1();
1154 d.SetVid(AddVolName((d.GetName())->Data()));
1155 k = ITSIndexToITSG3name(d.GetVid());
1156 for(i=0;i<4;i++) name[i] = j[i];
1158 gMC->Gsvolu(name,"CONS",GetMed(med),param,5);
1160 //______________________________________________________________________
1161 void AliITSBaseGeometry::ConeSegment(const char *gnam,const TString &dis,
1162 Double_t dz,Double_t rmin1,
1163 Double_t rmax1,Double_t rmin2,
1164 Double_t rmax2,Double_t phi1,
1165 Double_t phi2,Int_t med){
1166 // Interface to TMC->Gsvolu() for ITS ConS geometries. One segment of a
1167 // conical tube. It has 7 parameters. Phi1 should be smaller than phi2.
1168 // If this is not the case, the system adds 360 degrees to phi2. See
1169 // SetScale() for units. Default units are geant 3 [cm].
1171 // const char *gnam 3 character geant volume name. The letter "I"
1172 // is appended to the front to indecate that
1173 // this is an ITS volume.
1174 // TString &dis String containging part discription.
1175 // Double_t dz half-length along the z-axis
1176 // Double_t rmin1 Inside Radius at -dz.
1177 // Double_t rmax1 Outside Radius at -dz.
1178 // Double_t rmin2 inside radius at +dz.
1179 // Double_t rmax2 outside radius at +dz.
1180 // Double_t phi1 Starting angle of the segment [degree].
1181 // Double_t phi2 Ending angle of the segment [degree].
1182 // Int_t med media index number.
1191 param[0] = fScale*dz;
1192 param[1] = fScale*rmin1;
1193 param[2] = fScale*rmax1;
1194 param[3] = fScale*rmin2;
1195 param[4] = fScale*rmax2;
1199 gMC->Gsvolu(name,"CONS",GetMed(med),param,7);
1201 //______________________________________________________________________
1202 void AliITSBaseGeometry::ConeSegment(AliITSConeSegData &d,Int_t med){
1203 // Interface to TMC->Gsvolu() for ITS ConS geometries. One segment of a
1204 // conical tube. It has 7 parameters. Phi1 should be smaller than phi2.
1205 // If this is not the case, the system adds 360 degrees to phi2. See
1206 // SetScale() for units. Default units are geant 3 [cm].
1208 // AliITSConeSegData &d Structure with the tube parameters
1209 // Int_t med media index number.
1217 char *j = (char *) &k;
1219 param[0] = fScale*d.DzAt();
1220 param[1] = fScale*d.Rmin0();
1221 param[2] = fScale*d.Rmax0();
1222 param[3] = fScale*d.Rmin1();
1223 param[4] = fScale*d.Rmax1();
1224 param[5] = d.Phi0();
1225 param[6] = d.Phi1();
1226 d.SetVid(AddVolName((d.GetName())->Data()));
1227 k = ITSIndexToITSG3name(d.GetVid());
1228 for(i=0;i<4;i++) name[i] = j[i];
1230 gMC->Gsvolu(name,"CONS",GetMed(med),param,7);
1232 //______________________________________________________________________
1233 void AliITSBaseGeometry::PolyCone(const char *gnam,const TString &dis,
1234 Double_t phi1,Double_t dphi,Int_t nz,
1235 Double_t *z,Double_t *rmin,Double_t *rmax,
1237 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
1238 // parameters or more. See SetScale() for units. Default units are geant
1241 // const char *gnam 3 character geant volume name. The letter "I"
1242 // is appended to the front to indecate that this
1243 // is an ITS volume.
1244 // TString &dis String containging part discription.
1245 // Double_t phi1 the azimuthal angle at which the volume begins
1246 // (angles are counted clouterclockwise) [degrees].
1247 // Double_t dphi opening angle of the volume, which extends from
1248 // phi1 to phi1+dphi [degree].
1249 // Int_t nz number of planes perpendicular to the z axis
1250 // where the dimension of the section is given -
1251 // this number should be at least 2 and NP triples
1252 // of number must follow.
1253 // Double_t *z Array [nz] of z coordinate of the section.
1254 // Double_t *rmin Array [nz] of radius of teh inner circle in the
1256 // Double_t *rmax Array [nz] of radius of the outer circle in the
1258 // Int_t med media index number.
1269 param = new Float_t[n];
1272 param[2] = (Float_t) nz;
1274 param[3+3*i] = fScale*z[i];
1275 param[4+3*i] = fScale*rmin[i];
1276 param[5+3*i] = fScale*rmax[i];
1279 gMC->Gsvolu(name,"PCON",GetMed(med),param,n);
1283 //______________________________________________________________________
1284 void AliITSBaseGeometry::PolyCone(AliITSPConeData &d,Int_t med){
1285 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
1286 // parameters or more. See SetScale() for units. Default units are geant
1289 // AliITSPConeData &d Object with poly cone data stored in it.
1290 // Int_t med media index number.
1298 char *j = (char *) &k;
1301 param = new Float_t[n];
1302 param[0] = d.Phi0();
1303 param[1] = d.DPhi();
1304 param[2] = (Float_t) d.Nz();
1305 for(i=0;i<d.Nz();i++){
1306 param[3+3*i] = fScale*d.ZAt(i);
1307 param[4+3*i] = fScale*d.Rmin(i);
1308 param[5+3*i] = fScale*d.Rmax(i);
1310 d.SetVid(AddVolName((d.GetName())->Data()));
1311 k = ITSIndexToITSG3name(d.GetVid());
1312 for(i=0;i<4;i++) name[i] = j[i];
1314 gMC->Gsvolu(name,"PCON",GetMed(med),param,n);
1318 //______________________________________________________________________
1319 void AliITSBaseGeometry::Sphere(const char *gnam,const TString &dis,
1320 Double_t rmin,Double_t rmax,Double_t the1,
1321 Double_t the2,Double_t phi1,Double_t phi2,
1323 // Interface to TMC->Gsvolu() for ITS SPHE geometries. Segment of a
1324 // sphereical shell. It has 6 parameters. See SetScale()
1325 // for units. Default units are geant 3 [cm].
1327 // const char *gnam 3 character geant volume name. The letter "I"
1328 // is appended to the front to indecate that this
1329 // is an ITS volume.
1330 // TString &dis String containging part discription.
1331 // Double_t rmin Inside Radius.
1332 // Double_t rmax Outside Radius.
1333 // Double_t the1 staring polar angle of the shell [degree].
1334 // Double_t the2 ending polar angle of the shell [degree].
1335 // Double_t phui staring asimuthal angle of the shell [degree].
1336 // Double_t phi2 ending asimuthal angle of the shell [degree].
1337 // Int_t med media index number.
1346 param[0] = fScale*rmin;
1347 param[1] = fScale*rmax;
1353 gMC->Gsvolu(name,"SPHE",GetMed(med),param,6);
1355 //______________________________________________________________________
1356 void AliITSBaseGeometry::Sphere(AliITSSphereData &d,Int_t med){
1357 // Interface to TMC->Gsvolu() for ITS SPHE geometries. Segment of a
1358 // sphereical shell. It has 6 parameters. See SetScale()
1359 // for units. Default units are geant 3 [cm].
1361 // AliITSSphereData &d Structure with the tube parameters
1362 // Int_t med media index number.
1370 char *j = (char *) &k;
1372 param[0] = fScale*d.Rmin();
1373 param[1] = fScale*d.Rmax();
1374 param[2] = d.Theta0();
1375 param[3] = d.Theta1();
1376 param[4] = d.Phi0();
1377 param[5] = d.Phi1();
1378 d.SetVid(AddVolName((d.GetName())->Data()));
1379 k = ITSIndexToITSG3name(d.GetVid());
1380 for(i=0;i<4;i++) name[i] = j[i];
1382 gMC->Gsvolu(name,"SPHE",GetMed(med),param,6);
1384 //______________________________________________________________________
1385 void AliITSBaseGeometry::Parallelepiped(const char *gnam,const TString &dis,
1386 Double_t dx,Double_t dy,Double_t dz,
1387 Double_t alpha,Double_t thet,
1388 Double_t phi,Int_t med){
1389 // Interface to TMC->Gsvolu() for ITS PARA geometries. Parallelepiped. It
1390 // has 6 parameters. See SetScale() for units. Default units are geant 3
1393 // const char *gnam 3 character geant volume name. The letter "I"
1394 // is appended to the front to indecate that this
1395 // is an ITS volume.
1396 // TString &dis String containging part discription.
1397 // Double_t dx half-length allong x-axis
1398 // Double_t dy half-length allong y-axis
1399 // Double_t dz half-length allong z-axis
1400 // Double_t alpha angle formed by the y axis and by the plane
1401 // joining the center of teh faces parallel to the
1402 // z-x plane at -dY and +dy [degree].
1403 // Double_t thet polar angle of the line joining the centers of
1404 // the faces at -dz and +dz in z [degree].
1405 // Double_t phi azimuthal angle of teh line joing the centers
1406 // of the faaces at -dz and +dz in z [degree].
1407 // Int_t med media index number.
1416 param[0] = fScale*dx;
1417 param[1] = fScale*dy;
1418 param[2] = fScale*dz;
1423 gMC->Gsvolu(name,"PARA",GetMed(med),param,6);
1425 //______________________________________________________________________
1426 void AliITSBaseGeometry::Parallelepiped(AliITSParallelpipedData &d,Int_t med){
1427 // Interface to TMC->Gsvolu() for ITS PARA geometries. Parallelepiped. It
1428 // has 6 parameters. See SetScale() for units. Default units are geant 3
1431 // AliITSParrellepipedData &d Structre witht the volume data in it.
1432 // Int_t med media index number.
1440 char *j = (char *) &k;
1442 param[0] = fScale*d.DxAt();
1443 param[1] = fScale*d.DyAt();
1444 param[2] = fScale*d.DzAt();
1445 param[3] = d.Alpha();
1446 param[4] = d.Theta();
1448 d.SetVid(AddVolName((d.GetName())->Data()));
1449 k = ITSIndexToITSG3name(d.GetVid());
1450 for(i=0;i<4;i++) name[i] = j[i];
1452 gMC->Gsvolu(name,"PARA",GetMed(med),param,6);
1454 //______________________________________________________________________
1455 void AliITSBaseGeometry::PolyGon(const char *gnam,const TString &dis,
1456 Double_t phi1,Double_t dphi,Int_t npdv,
1457 Int_t nz,Double_t *z,Double_t *rmin,
1458 Double_t *rmax,Int_t med){
1459 // Interface to TMC->Gsvolu() for ITS PGON geometry. Polygon It has 10
1460 // parameters or more. See SetScale() for units. Default units are geant
1463 // const char *gnam 3 character geant volume name. The letter "I"
1464 // is appended to the front to indecate that this
1465 // is an ITS volume.
1466 // TString &dis String containging part discription.
1467 // Double_t phi1 the azimuthal angle at which the volume begins
1468 // (angles are counted clouterclockwise) [degrees].
1469 // Double_t dphi opening angle of the volume, which extends from
1470 // phi1 to phi1+dphi [degree].
1471 // Int_t npdv the number of sides of teh cross section
1472 // between the given phi limits.
1473 // Int_t nz number of planes perpendicular to the z axis
1474 // where the dimension of the section is given -
1475 // this number should be at least 2 and NP triples
1476 // of number must follow.
1477 // Double_t *z array [nz] of z coordiates of the sections..
1478 // Double_t *rmin array [nz] of radius of teh circle tangent to
1479 // the sides of the inner polygon in teh
1481 // Double_t *rmax array [nz] of radius of the circle tangent to
1482 // the sides of the outer polygon in the
1484 // 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