X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSPrintGeom.C;h=d9e1667394237812745f7b62c76bd46f40e5a56c;hb=084d6dfc13987fa29eee1764857a94d6349a7248;hp=ae22077e191328bdb147dd86267cb792c5647e42;hpb=d2e7afa17c0f0fcd206a2d214cb378b02a5a4e35;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSPrintGeom.C b/ITS/AliITSPrintGeom.C index ae22077e191..d9e16673942 100644 --- a/ITS/AliITSPrintGeom.C +++ b/ITS/AliITSPrintGeom.C @@ -1,38 +1,42 @@ void AliITSPrintGeom(TString hfn="galice.root",Int_t mod=-1){ // Macro to print out the information kept in the AliITSgeom class, for - //all or a specific module + // all or a specific module. + // Inputs: + // TString hfn input file name + // Int_t mod The specific module to print out transformations for. + // if mod<0, does all modules. + // Output: + // none. + // Return: + // none. // Dynamically link some shared libs if (gClassTable->GetID("AliRun") < 0) { gROOT->LoadMacro("loadlibs.C"); loadlibs(); - } - else { - if(gAlice){ - delete gAlice->GetRunLoader(); - delete gAlice; - gAlice=0; - } - } + }else { + if(gAlice){ + delete AliRunLoader::Instance(); + delete gAlice; + gAlice=0; + } // end if gAlice + } // end if aliroot or not. AliRunLoader* rl = AliRunLoader::Open(hfn.Data()); if (rl == 0x0){ - cerr<<"AliITSPrintGeom.C : Can not open session RL=NULL"<< endl; - return; - } + cerr<<"AliITSPrintGeom.C : Can not open session RL=NULL"<< endl; + return; + } // end if no loader Int_t retval = rl->LoadgAlice(); - if (retval) - { - cerr<<"AliITSHits2SDigits.C : LoadgAlice returned error" - << endl; - return 3; - } - // gAlice=rl->GetAliRun(); + if (retval){ + cerr<<"AliITSHits2SDigits.C : LoadgAlice returned error"<< endl; + return 3; + } // end if loader error if(!gAlice){ - cerr<<"AliITSPrintGeom.C. AliRun object not found\n"; - return; - } + cerr<<"AliITSPrintGeom.C. AliRun object not found\n"; + return; + } // end if no gAlice error AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS"); if(!ITS){ @@ -48,12 +52,22 @@ void AliITSPrintGeom(TString hfn="galice.root",Int_t mod=-1){ mod2 = mod+1; } // end if mod>=0 AliITSgeomMatrix *gmm = gm->GetGeomMatrix(0); - Int_t m; + Int_t m,lay,lad,det; + Double_t xyz[3],rcyl; cout<PrintComment(&cout); cout << endl; + if(mod<-1){ gmm->PrintComment(&cout); cout << endl;} cout<GetModuleId(m,lay,lad,det); gmm = gm->GetGeomMatrix(m); - gmm->Print(&cout); cout << endl; + gmm->GetTranslation(xyz); + rcyl = TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]); + if(mod<-1){ + gmm->Print(&cout); + cout << endl; + }else{ + cout << "module="<