]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TFluka/bxdraw.cxx
Updates needed for geant4.6 and fluka2004.
[u/mrichter/AliRoot.git] / TFluka / bxdraw.cxx
1 #include <Riostream.h>
2 #include "TFluka.h"
3 #include "Fdimpar.h"  //(DIMPAR) fluka include
4 #include "Ftrackr.h"  //(TRACKR) fluka common
5 #ifndef WIN32
6 # define bxdraw bxdraw_
7 #else
8 # define bxdraw BXDRAW
9 #endif
10 extern "C" {
11 void bxdraw(Int_t& icode, Int_t& mreg, Int_t& newreg,
12             Double_t& xsco, Double_t& ysco, Double_t& zsco)
13 {
14     TFluka* fluka = (TFluka*) gMC;
15     
16     fluka->SetIcode(icode);
17     fluka->SetNewreg(newreg);
18     fluka->SetXsco(xsco);
19     fluka->SetYsco(ysco);
20     fluka->SetZsco(zsco);
21 //
22 // Double step for boundary crossing
23 //
24     printf("bxdraw (ex) \n");
25     fluka->SetTrackIsExiting();
26     fluka->SetCaller(12);
27     fluka->SetMreg(mreg);
28     (TVirtualMCApplication::Instance())->Stepping(); 
29     fluka->SetCaller(11);
30     fluka->SetTrackIsEntering();
31     printf("bxdraw (en) mreg=%d newreg=%d \n",mreg,newreg);
32     fluka->SetMreg(newreg);
33     (TVirtualMCApplication::Instance())->Stepping();
34 //    fluka->SetCaller(1);
35 //    fluka->SetTrackIsInside();
36 //    printf("bxdraw (st) \n");
37 //    (TVirtualMCApplication::Instance())->Stepping();
38 } // end of bxdraw
39 } // end of extern "C"
40