]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TFluka/usdraw.cxx
Dynamic storage of user configuration parameters.
[u/mrichter/AliRoot.git] / TFluka / usdraw.cxx
1 #include <Riostream.h>
2 #include "TVirtualMCApplication.h"
3 #include "TFluka.h"
4 #include "Fdimpar.h"  //(DIMPAR) fluka include
5 #include "Ftrackr.h"  //(TRACKR) fluka common
6 #ifndef WIN32
7 # define usdraw usdraw_
8 #else
9 # define usdraw USDRAW
10 #endif
11 extern "C" {
12 void usdraw(Int_t& icode, Int_t& mreg, 
13             Double_t& xsco, Double_t& ysco, Double_t& zsco)
14 {
15   TFluka *fluka = (TFluka*)gMC;
16   Int_t verbosityLevel = fluka->GetVerbosityLevel();
17   Bool_t debug = (verbosityLevel >= 3)? kTRUE : kFALSE;
18   fluka->SetCaller(6);
19   fluka->SetIcode(icode);
20
21   if (fluka->IsTrackDisappeared()) {
22       TRACKR.ispusr[mkbmx2 - 2] = 1;
23   }
24
25   fluka->SetMreg(mreg);
26   fluka->SetXsco(xsco);
27   fluka->SetYsco(ysco);
28   fluka->SetZsco(zsco);
29
30   if (debug) printf("USDRAW: Number of track segments:%d %d %d\n", TRACKR.ntrack, TRACKR.mtrack, icode);
31
32   (TVirtualMCApplication::Instance())->Stepping();
33   fluka->SetTrackIsNew(kFALSE);
34   
35 } // end of usdraw
36 } // end of extern "C"
37