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