2 #include "TVirtualMCApplication.h"
3 #include "TVirtualMCStack.h"
12 #include "Fdimpar.h" //(DIMPAR) fluka include
13 #include "Fdblprc.h" //(DBLPRC) fluka common
14 #include "Ftrackr.h" //(TRACKR) fluka common
17 # define mgdraw mgdraw_
19 # define mgdraw MGDRAW
23 void mgdraw(Int_t& icode, Int_t& mreg)
25 TFluka* fluka = (TFluka*) gMC;
26 // Int_t verbosityLevel = fluka->GetVerbosityLevel();
28 // Make sure that stack has currrent track Id
29 Int_t trackId = TRACKR.ispusr[mkbmx2-1];
30 TVirtualMCStack* cppstack = fluka->GetStack();
31 cppstack->SetCurrentTrack(trackId);
35 fluka->SetNewreg(mreg);
36 fluka->SetIcode(icode);
39 // if (verbosityLevel >= 3) {
40 // cout << endl << " !!! I am in mgdraw - calling Stepping()" << endl;
41 // cout << endl << " Track Id =" << trackId << endl;
43 if (TRACKR.jtrack == -1)
44 printf("Cerenkov photon: region# %6d icode %6d \n", mreg, icode);
47 (TVirtualMCApplication::Instance())->Stepping();
48 fluka->SetTrackIsNew(kFALSE);
50 } // end of extern "C"