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