/[PAMELA software]/PamVMC_update/examples/geom.C
ViewVC logotype

Contents of /PamVMC_update/examples/geom.C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Oct 15 15:51:37 2013 UTC (11 years, 1 month ago) by formato
Branch: MAIN, rel
CVS Tags: reltag, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
PamVMC update

1 {
2 gSystem->Load("libGeom.so");
3 new TGeoManager();
4 gGeoManager->Import("geometry.root");
5 gGeoManager->CloseGeometry();
6 //Print out global positions of the TSPA sensors
7 for (Int_t plNo = 1; plNo<=6; plNo++){
8 for(Int_t padNo = 1; padNo<=6; padNo++){
9 Int_t i = (plNo-1)*6+padNo;
10 TString path = "/PAME_1/SPEB";
11 if(plNo<=5){
12 path+="_1/MGF";
13 path += plNo;
14 }
15 path +="_1/TRP";
16 path += plNo;
17 path +="_1/TPA";
18 path += plNo;
19 path +="_";
20 path += plNo;
21 path +="/TRSL_";
22 path += i;
23 //cout<<"changing path to "<<path<<endl;
24 gGeoManager->cd(path);
25 Double_t master[3];
26 Double_t local[3];
27
28 for (Int_t j=0; j<3; ++j) local[j] = (Double_t)0.;
29
30 Double_t * m = &master[0];
31 Double_t * l = &local[0];
32
33 gGeoManager->LocalToMaster(l,m);
34
35 cout<<"TSPA_"<<i<<" x,y,z,"<<master[0]<<","<<master[1]<<","<<master[2]<<","<<endl;
36 gGeoManager->GetCurrentNode()->GetMatrix()->Print();
37
38 }
39 }
40 }

  ViewVC Help
Powered by ViewVC 1.1.23