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