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