From 7916245f1a037467341cb2f8e1d0b4b4dcf70ea9 Mon Sep 17 00:00:00 2001 From: nilsen Date: Thu, 14 Aug 2003 17:20:26 +0000 Subject: [PATCH] Minor Update. Added calculation of detector cylinderical radii. --- ITS/AliITSPrintGeom.C | 64 ++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/ITS/AliITSPrintGeom.C b/ITS/AliITSPrintGeom.C index ae22077e191..32ff8098894 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 gAlice->GetRunLoader(); + 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="<