Routines needed for radiation scoring. (B. Pastircak)
[u/mrichter/AliRoot.git] / TFluka / comscw.cxx
1 #include "Fdimpar.h"  //(DIMPAR) fluka include
2 #include "Fdblprc.h"  //(DBLPRC) fluka include
3 #include "Fiounit.h"  //(IOUNIT) fluka common
4 #include "Fflkmat.h"  //(FLKMAT) fluka common
5 #include "Fscohlp.h"  //(SCOHLP) fluka common
6 #include "Fsouevt.h"  //(SOUEVT) fluka common
7 #ifndef WIN32
8 #define comscw comscw_
9 #define type_of_call
10 #else
11 #define comscw COMSCW 
12 #define type_of_call  _stdcall
13 #endif
14 const Double_t  oned  = 1.00000e+00;
15 const Double_t  factr = 1.60217e-07;
16 extern "C" double type_of_call comscw(int& ij, double& xa, double& ya, double& za,
17                                     int& mreg, double& rull, int& llo, int& icall)
18
19 {
20 //
21 //  Return comscw 
22 //
23    SCOHLP.lsczer = kFALSE;
24    if (FLKMAT.rho[FLKMAT.medium[mreg]] <  1.0e-15) 
25 {   
26    return 1.;
27 }
28    if (SCOHLP.iscrng == 1 ) {
29 //    printf("comscw  %f %f %f %f %f \n", FLKMAT.rho[FLKMAT.medium[mreg]], 4.1e+15*rull*factr/FLKMAT.rho[FLKMAT.medium[mreg]], xa, ya, za);
30       return factr/FLKMAT.rho[FLKMAT.medium[mreg]];
31 }
32       return 1.;
33 }