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