-Int_t AliITSvSPD02::DecodeDetector(Int_t id,Int_t cpy,Int_t &lay,Int_t &lad,
- Int_t &det)const{
- // 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:
- // Int_t id Detector volume id
- // Int_t cpy Detector copy number
- // Outputs:
- // Int_t lay layer number
- // Int_t lad ladder number
- // Int_t det detector number
- // Return:
- // The module number
- Int_t mod;
-
- lad = det = 1;
- lay = cpy;
- if(cpy>2 && id==fIdSens[0]) lay = cpy + 1;
- if(id==fIdSens[1]) lay = 3;
- mod = lay - 1;
- return mod;
-}
-//______________________________________________________________________
-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.
- const Int_t kltypess=2;
- const Int_t knlayers=5;
- const TString knames[kltypess]=
- {"ALIC_1/ITSV_1/ITEL_%d/IMB0_1/IMBS_1",//lay=1,2,4,5
- "ALIC_1/ITSV_1/IDET_%d/ITS0_1/ITST_1"};// lay=3
- const Int_t kitsGeomTreeCopys[2]={4,1};
- const Int_t knlad[knlayers]={knlayers*1},kndet[knlayers]={knlayers*1};
- TString path,shapeName;
- TGeoHMatrix matrix;
- TArrayD shapePar;
- TArrayF shapeParF;
- Double_t trans[3]={3*0.0},rot[10]={10*0.0};
- Int_t npar=3,mod,i,j,lay,lad,det,cpy;
- Float_t par[20];
-
- par[0]=0.64;par[1]=0.5*300.0E-4;par[2]=3.48;
- mod=5;
- AliITSgeom* geom = new AliITSgeom(0,knlayers,knlad,kndet,mod);
- SetITSgeom(geom);
- for(i=0;i<kltypess;i++)for(cpy=1;cpy<=kitsGeomTreeCopys[i];cpy++){
- path.Form(knames[i].Data(),cpy);
- gMC->GetTransformation(path.Data(),matrix);
- gMC->GetShape(path.Data(),shapeName,shapePar);
- shapeParF.Set(shapePar.GetSize());
- for(j=0;j<shapePar.GetSize();j++) shapeParF[j]=shapePar[j];
- mod = DecodeDetector(fIdSens[i],cpy,lay,lad,det);
- geom->CreateMatrix(mod,lay,lad,det,kSPD,trans,rot);
- geom->SetTrans(mod,matrix.GetTranslation());
- geom->SetRotMatrix(mod,matrix.GetRotationMatrix());
- geom->GetGeomMatrix(mod)->SetPath(path.Data());
- if(!(geom->IsShapeDefined((Int_t)kSPD)))
- geom->ReSetShape(kSPD,new AliITSgeomSPD425Short(npar,par));
- } // end for i,cpy/
- return;
-}
-//______________________________________________________________________