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