- epsilSi,stminSi);
-}
-//______________________________________________________________________
-void AliITSvSPD02::InitAliITSgeom(){
- // Based on the geometry tree defined in Geant 3.21, this
- // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS geometry
- // sturture.
- // Inputs:
- // none.
- // Outputs:
- // none.
- // Return:
- // none.
- if(strcmp(gMC->GetName(),"TGeant3")) {
- Error("InitAliITSgeom",
- "Wrong Monte Carlo. InitAliITSgeom uses TGeant3 calls");
- return;
- } // end if
- cout << "Reading Geometry transformation directly from Geant 3." << endl;
- const Int_t ltypess = 2;
- const Int_t nlayers = 5;
- const Int_t ndeep = 5;
- Int_t itsGeomTreeNames[ltypess][ndeep],lnam[20],lnum[20];
- Int_t nlad[nlayers],ndet[nlayers];
- Double_t t[3],r[10];
- Float_t par[20],att[20];
- Int_t npar,natt,idshape,imat,imed;
- AliITSGeant3Geometry *ig = new AliITSGeant3Geometry();
- Int_t mod,typ,lay,lad,det,cpy,i,j,k;
- Char_t names[ltypess][ndeep][4];
- Int_t itsGeomTreeCopys[ltypess][ndeep];
- Char_t *namesA[ltypess][ndeep] = {
- {"ALIC","ITSV","ITEL","IMB0","IMBS"}, // lay=1
- {"ALIC","ITSV","IDET","ITS0","ITST"}};// Test SPD
- Int_t itsGeomTreeCopysA[ltypess][ndeep]= {{1,1,4,1,1},// lay=1
- {1,1,1,1,1}};//lay=2 TestSPD
- for(i=0;i<ltypess;i++)for(j=0;j<ndeep;j++){
- for(k=0;k<4;k++) names[i][j][k] = namesA[i][j][k];
- itsGeomTreeCopys[i][j] = itsGeomTreeCopysA[i][j];
- } // end for i,j
- // Sorry, but this is not very pritty code. It should be replaced
- // at some point with a version that can search through the geometry
- // tree its self.
- cout << "Reading Geometry informaton from Geant3 common blocks" << endl;
- for(i=0;i<20;i++) lnam[i] = lnum[i] = 0;
- for(i=0;i<ltypess;i++)for(j=0;j<ndeep;j++)
- strncpy((char*) &itsGeomTreeNames[i][j],names[i][j],4);
- // itsGeomTreeNames[i][j] = ig->StringToInt(names[i][j]);
- mod = 5;
- if(fITSgeom!=0) delete fITSgeom;
- nlad[0]=1;nlad[1]=1;nlad[2]=1;nlad[3]=1;nlad[4]=1;
- ndet[0]=1;ndet[1]=1;ndet[2]=1;ndet[3]=1;ndet[4]=1;
- fITSgeom = new AliITSgeom(0,nlayers,nlad,ndet,mod);
- for(typ=1;typ<=ltypess;typ++){
- for(j=0;j<ndeep;j++) lnam[j] = itsGeomTreeNames[typ-1][j];
- for(j=0;j<ndeep;j++) lnum[j] = itsGeomTreeCopys[typ-1][j];
- lad = 1;
- det = 1;
- for(cpy=1;cpy<=itsGeomTreeCopys[typ-1][2];cpy++){
- lnum[2] = cpy;
- lay = cpy;
- if(cpy>2 && typ==1) lay = cpy +1;
- if(typ==2) lay = 3;
- mod = lay-1;
- ig->GetGeometry(ndeep,lnam,lnum,t,r,idshape,npar,natt,par,att,
- imat,imed);
- fITSgeom->CreatMatrix(mod,lay,lad,det,kSPD,t,r);
- if(!(fITSgeom->IsShapeDefined((Int_t)kSPD)))
- fITSgeom->ReSetShape(kSPD,
- new AliITSgeomSPD425Short(npar,par));
- } // end for cpy
- } // end for typ
- return;