-//______________________________________________________________________
-Bool_t AliITSInitGeometry::InitAliITSgeomtest2(AliITSgeom *geom){
- // Initilizes the geometry transformation class AliITSgeom
- // to values appropreate to this specific geometry. Now that
- // the segmentation is part of AliITSgeom, the detector
- // segmentations are also defined here.
- // Inputs:
- // AliITSgeom *geom A pointer to the AliITSgeom class
- // Outputs:
- // AliITSgeom *geom This pointer recreated and properly inilized.
- // Return:
- // none.
- // const Double_t kcm2micron = 1.0E4;
- const Int_t kItype=0; // Type of transormation defined 0=> Geant
- const Int_t klayers = 6; // number of layers in the ITS
- const Int_t kladders[klayers] = {1,1,1,1,1,1}; // Number of ladders
- const Int_t kdetectors[klayers] = {1,1,1,1,1,1};// number of detector/lad
- const AliITSDetector kIdet[6] = {kSPD,kSPD,kSDD,kSDD,kSSD,kSSD};
- const TString kNames[klayers] = {
- "/ALIC_1/ITSV_1/ITSspd1_1/ITS1_1", // lay=1
- "/ALIC_1/ITSV_1/ITSspd2_1/ITS2_1", // lay=2
- "/ALIC_1/ITSV_1/ITSsdd1_1/ITS3_1", // lay=3
- "/ALIC_1/ITSV_1/ITSsdd2_1/ITS4_1", // lay=4
- "/ALIC_1/ITSV_1/ITSssd1_1/ITS5_1", // lay=5
- "/ALIC_1/ITSV_1/ITSssd2_1/ITS6_1"};// Lay=6
- Int_t mod,nmods=0,lay,lad,det,cpn0,cpn1,cpn2;
- Double_t tran[3]={0.0,0.0,0.0},rot[10]={9*0.0,1.0};
- TArrayD shapePar;
- TString shapeName;
- TGeoHMatrix matrix;
- Bool_t initSeg[3]={kFALSE,kFALSE,kFALSE};
- TStopwatch *time = 0x0;if(fTiming) time=new TStopwatch();
-
- if(fTiming) time->Start();
- for(mod=0;mod<klayers;mod++) nmods += kladders[mod]*kdetectors[mod];
- geom->Init(kItype,klayers,kladders,kdetectors,nmods);
- for(mod=0;mod<nmods;mod++){
- DecodeDetectorLayers(mod,lay,lad,det); // Write
- geom->CreateMatrix(mod,lay,lad,det,kIdet[lay-1],tran,rot);
- RecodeDetector(mod,cpn0,cpn1,cpn2); // Write reusing lay,lad,det.
- geom->GetGeomMatrix(mod)->SetPath(kNames[lay-1]);
- GetTransformation(kNames[lay-1].Data(),matrix);
- geom->SetTrans(mod,matrix.GetTranslation());
- TransposeTGeoHMatrix(&matrix); // Transpose TGeo's rotation matrixes
- geom->SetRotMatrix(mod,matrix.GetRotationMatrix());
- if(initSeg[kIdet[lay-1]]) continue;
- GetShape(kNames[lay-1],shapeName,shapePar);
- if(shapeName.CompareTo("BOX")){
- Error("InitITSgeom2","Geometry changed without proper code update"
- "or error in reading geometry. Shape is not BOX shape is %s",
- shapeName.Data());
- return kFALSE;
- } // end if
- InitGeomShapePPRasymmFMD(kIdet[lay-1],initSeg,shapePar,geom);
- } // end for module
- if(fTiming){
- time->Stop();
- time->Print();
- delete time;
- } // end if
- return kTRUE;
-}
-//______________________________________________________________________
-Bool_t AliITSInitGeometry::InitAliITSgeomSPD02(AliITSgeom *geom){
- // Initilizes the geometry transformation class AliITSgeom
- // to values appropreate to this specific geometry. Now that
- // the segmentation is part of AliITSgeom, the detector
- // segmentations are also defined here.
- // Inputs:
- // AliITSgeom *geom A pointer to the AliITSgeom class
- // Outputs:
- // AliITSgeom *geom This pointer recreated and properly inilized.
- // 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];
- TStopwatch *time = 0x0;if(fTiming) time=new TStopwatch();
-
- par[0]=0.64;par[1]=0.5*300.0E-4;par[2]=3.48;
- mod=5;;
- geom->Init(0,knlayers,knlad,kndet,mod);
-
- if(fTiming) time->Start();
- for(i=0;i<kltypess;i++)for(cpy=1;cpy<=kitsGeomTreeCopys[i];cpy++){
- path.Form(knames[i].Data(),cpy);
- GetTransformation(path.Data(),matrix);
- GetShape(path.Data(),shapeName,shapePar);
- shapeParF.Set(shapePar.GetSize());
- for(j=0;j<shapePar.GetSize();j++) shapeParF[j]=shapePar[j];
- lay = cpy;
- if(i==0&&cpy>2) lay=cpy+1;
- if(i==1) lay=3;
- DecodeDetector(mod,kitsGeomTreeCopys[i],1,cpy,0);
- DecodeDetectorLayers(mod,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/
- if(fTiming){
- time->Stop();
- time->Print();
- delete time;
- } // end if
- return kTRUE;
-}
-//______________________________________________________________________
-Bool_t AliITSInitGeometry::InitAliITSgeomSDD03(AliITSgeom *geom){
- // Initilizes the geometry transformation class AliITSgeom
- // to values appropreate to this specific geometry. Now that
- // the segmentation is part of AliITSgeom, the detector
- // segmentations are also defined here.
- // Inputs:
- // AliITSgeom *geom A pointer to the AliITSgeom class
- // Outputs:
- // AliITSgeom *geom This pointer recreated and properly inilized.
- // Return:
- // none
- const Int_t knlayers=12;
- // const Int_t kndeep=6;
- const Int_t kltypess=2;
- const AliITSDetector kidet[knlayers]={kSSD,kSDD};
- const TString knames[kltypess]={
- "/ALIC_1/ITSV_1/ITEL_%d/ITAI_1/IMB0_1/IMBS_1",
- "/ALIC_1/ITSV_1/IDET_%d/IDAI_1/ITS0_1/ITST_1"};
- const Int_t kitsGeomTreeCopys[kltypess]={10,2};
- const Int_t knp=384;
- const Float_t kpitch=50.E-4;/*cm*/
- Float_t box[3]={0.5*kpitch*(Float_t)knp,150.E-4,1.0},p[knp+1],n[knp+1];
- Int_t nlad[knlayers]={knlayers*1};
- Int_t ndet[knlayers]={knlayers*1};
- Int_t mod=knlayers,lay=0,lad=0,det=0,i,j,cp0;
- TString path,shapeName;
- TGeoHMatrix matrix;
- Double_t trans[3]={3*0.0},rot[10]={10*0.0};
- TArrayD shapePar;
- TArrayF shapeParF;
- Bool_t isShapeDefined[kltypess]={kltypess*kFALSE};
-
- geom->Init(0,knlayers,nlad,ndet,mod);
- p[0]=-box[0];
- n[0]=box[0];
- // Fill in anode and cathode strip locations (lower edge)
- for(i=1;i<knp;i++){
- p[i] =p[i-1]+kpitch;
- n[i] =n[i-1]-kpitch;
- } // end for i
- p[knp]=box[0];
- n[knp]=-box[0];
- for(i=0;i<kltypess;i++)for(cp0=1;cp0<=kitsGeomTreeCopys[i];cp0++){
- DecodeDetector(mod,kitsGeomTreeCopys[i],cp0,1,2);
- DecodeDetectorLayers(mod,lay,lad,det);
- path.Form(knames[i].Data(),cp0);
- GetTransformation(path.Data(),matrix);
- GetShape(path.Data(),shapeName,shapePar);
- shapeParF.Set(shapePar.GetSize());
- for(j=0;j<shapePar.GetSize();j++)shapeParF[j]=shapePar[j];
- geom->CreateMatrix(mod,lay,lad,det,kidet[i],trans,rot);
- geom->SetTrans(mod,matrix.GetTranslation());
- geom->SetRotMatrix(mod,matrix.GetRotationMatrix());
- geom->GetGeomMatrix(mod)->SetPath(path.Data());
- switch (kidet[i]){
- case kSDD: if(!(geom->IsShapeDefined((Int_t)kSDD))){
- geom->ReSetShape(kSDD,new AliITSgeomSDD256(shapeParF.GetSize(),
- shapeParF.GetArray()));
- isShapeDefined[i]=kTRUE;
- } break;
- case kSSD:if(!(geom->IsShapeDefined((Int_t)kSSD))){
- geom->ReSetShape(kSSD,new AliITSgeomSSD(box,0.0,0.0,
- knp+1,p,knp+1,n));
- isShapeDefined[i]=kTRUE;
- } break;
- default:{} break;
- } // end switch
- } // end for i,cp0
-
- return kTRUE;
-}
-//______________________________________________________________________
-Bool_t AliITSInitGeometry::InitAliITSgeomSSD03(AliITSgeom *geom){
- // Initilizes the geometry transformation class AliITSgeom
- // to values appropreate to this specific geometry. Now that
- // the segmentation is part of AliITSgeom, the detector
- // segmentations are also defined here.
- // Inputs:
- // AliITSgeom *geom A pointer to the AliITSgeom class
- // Outputs:
- // AliITSgeom *geom This pointer recreated and properly inilized.
- // Return:
- // none.
- const Int_t knlayers=5;
- // const Int_t kndeep=6;
- const Int_t kltypess=3;
- const AliITSDetector kIdet[knlayers]={kND,kSSD,kND};
- const TString knames[kltypess]={
- "/ALIC_1/ITSV_1/ITSA_%d/ITSS_1",
- "/ALIC_1/ITSV_1/IGAR_%d/IAIR_1/ITST_1",
- "/ALIC_1/ITSV_1/IFRA_%d/IFRS_1"};
- const Int_t kitsGeomTreeCopys[kltypess]={3,1,1};
- const Int_t kitsGeomDetTypes[kltypess]={1,2,3};
- const Int_t knp=384;
- const Float_t kpitch=50.E-4;//cm
- Bool_t initSeg[3]={kFALSE, kFALSE, kFALSE};
- Float_t box[3]={0.5*kpitch*(Float_t)knp,150.E-4,1.0},p[knp+1],n[knp+1];
- Int_t nlad[knlayers]={knlayers*1};
- Int_t ndet[knlayers]={knlayers*1};
- Int_t mod=knlayers,lay=0,lad=0,det=0,i,j,cp0;
- TString path,shapeName;
- TGeoHMatrix matrix;
- Double_t trans[3]={3*0.0},rot[10]={10*0.0};
- TArrayD shapePar;
- TArrayF shapeParF;
- Bool_t isShapeDefined[kltypess]={kltypess*kFALSE};
-
- geom->Init(0,knlayers,nlad,ndet,mod);
- p[0]=-box[0];
- n[0]=box[0];
- // Fill in anode and cathode strip locations (lower edge)
- for(i=1;i<knp;i++){
- p[i] =p[i-1]+kpitch;
- n[i] =n[i-1]-kpitch;
- } // end for i
- p[knp]=box[0];
- n[knp]=-box[0];
- for(i=0;i<kltypess;i++)for(cp0=1;cp0<=kitsGeomTreeCopys[i];cp0++){
- DecodeDetector(mod,kitsGeomDetTypes[i],cp0,1,0);
- DecodeDetectorLayers(mod,lay,lad,det);
- path.Form(knames[i].Data(),cp0);
- GetTransformation(path.Data(),matrix);
- GetShape(path.Data(),shapeName,shapePar);
- shapeParF.Set(shapePar.GetSize());
- for(j=0;j<shapePar.GetSize();j++)shapeParF[j]=shapePar[j];
- geom->CreateMatrix(mod,lay,lad,det,kIdet[i],trans,rot);
- geom->SetTrans(mod,matrix.GetTranslation());
- geom->SetRotMatrix(mod,matrix.GetRotationMatrix());
- geom->GetGeomMatrix(mod)->SetPath(path.Data());
- switch (kIdet[i]){
- case kSSD:if(!(geom->IsShapeDefined((Int_t)kSSD))){
- InitGeomShapePPRasymmFMD(kIdet[lay-1],initSeg,shapePar,geom);
- isShapeDefined[i]=kTRUE;
- } break;
- default:{} break;
- } // end switch
- } // end for i,cp0
-
- return kTRUE;
-}
-//______________________________________________________________________
-Bool_t AliITSInitGeometry::InitAliITSgeomITS04(AliITSgeom *geom){
- // Initilizes the geometry transformation class AliITSgeom
- // to values appropreate to this specific geometry. Now that
- // the segmentation is part of AliITSgeom, the detector
- // segmentations are also defined here.
- // Inputs:
- // AliITSgeom *geom A pointer to the AliITSgeom class
- // Outputs:
- // AliITSgeom *geom This pointer recreated and properly inilized.
- // Return:
- // none.