2 #include "TVirtualMCApplication.h"
3 #include "TVirtualMCStack.h"
6 #include "Fdimpar.h" //(DIMPAR) fluka include
7 #include "Fdblprc.h" //(DBLPRC) fluka common
8 #include "Ftrackr.h" //(TRACKR) fluka common
11 # define mgdraw mgdraw_
13 # define mgdraw MGDRAW
17 void mgdraw(Int_t& icode, Int_t& mreg)
19 TFluka* fluka = (TFluka*) gMC;
20 Int_t verbosityLevel = fluka->GetVerbosityLevel();
22 // Make sure that stack has currrent track Id
23 Int_t trackId = TRACKR.ispusr[mkbmx2-1];
24 TVirtualMCStack* cppstack = fluka->GetStack();
25 cppstack->SetCurrentTrack(trackId);
29 fluka->SetNewreg(mreg);
30 fluka->SetIcode(icode);
33 if (verbosityLevel >= 3) {
34 cout << endl << " !!! I am in mgdraw - calling Stepping()" << endl;
35 cout << endl << " Track Id =" << trackId << endl;
38 (TVirtualMCApplication::Instance())->Stepping();
41 } // end of extern "C"