/[PAMELA software]/PamVMC/trk/include/PamVMCTrkF77.h~
ViewVC logotype

Contents of /PamVMC/trk/include/PamVMCTrkF77.h~

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Feb 19 16:00:18 2009 UTC (15 years, 9 months ago) by nikolas
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Cleaning files before release

1 #define gmtod GMTOD
2 #define gdtom GDTOM
3 #define gufield GUFIELD
4
5 #include <iostream>
6
7 using std::cout;
8 using std::endl;
9 #include <TGeoManager.h>
10 #include <TGeoMatrix.h>
11 #include <TVirtualMC.h>
12 #include "PamVMCFieldMgr.h"
13 extern "C"{
14
15 void gmtod_(Float_t* , Float_t* , Int_t& );
16 void gdtom_(Float_t* , Float_t* , Int_t& );
17 void gufield_(Float_t*, Float_t*);
18 }
19
20 void gmtod_(Float_t* a, Float_t* b, Int_t& c){
21 Double_t master[3];
22 Double_t local[3];
23
24 for (Int_t i=0; i<3; ++i) master[i] = (Double_t) a[i];
25
26 Double_t * m = &master[0];
27 Double_t * l = &local[0];
28
29 gGeoManager->cd(gMC->CurrentVolPath());
30 gGeoManager->MasterToLocal(m,l);
31
32 for (Int_t i=0; i<3; ++i) b[i] = (Float_t)local[i];
33
34 c=c;
35 }
36
37
38 void gdtom_(Float_t* a, Float_t* b, Int_t& c){
39 Double_t master[3];
40 Double_t local[3];
41
42 for (Int_t i=0; i<3; ++i) local[i] = (Double_t)a[i];
43
44 Double_t * m = &master[0];
45 Double_t * l = &local[0];
46
47 gGeoManager->cd(gMC->CurrentVolPath());
48 gGeoManager->LocalToMaster(l,m);
49
50 for (Int_t i=0; i<3; ++i) b[i] = (Float_t)master[i];
51
52 c=c;
53 }
54
55 void gufield_(Float_t *x, Float_t *b){
56 PamVMCFieldMgr::Instance()->Field(x,b);
57 }
58 //#endif //ROOT_TGeant3f77

  ViewVC Help
Powered by ViewVC 1.1.23