Switch to negative values of logical output units to obtain binary output
[u/mrichter/AliRoot.git] / TFluka / Ftrackr.h
CommitLineData
71dd9297 1#include "cfortran.h"
2#include "Rtypes.h"
3
4#include "Fdimpar.h"
5
fa3d1cc7 6extern "C" {
7//*$ create trackr.add
8//*copy trackr
9//* *
10//*=== trackr ===========================================================*
11//* *
12//*----------------------------------------------------------------------*
13//* *
14//* tracks recording by alfredo ferrari, infn - milan *
15//* *
16//* last change 31 january 2001 by alfredo ferrari *
17//* *
18//* included in : *
19//* electr *
20//* emfsco *
21//* kaskad (new version) *
22//* kashea *
23//* kasneu *
24//* geoden (new version) *
25//* mageas *
26//* magmov *
27//* magnew *
28//* move *
29//* photon *
30//* usrsco *
31//* *
32//* ntrack = number of track segments *
33//* mtrack = number of energy deposition events along the track *
34//* 0 < i < ntrack *
35//* xtrack = end x-point of the ith track segment *
36//* ytrack = end y-point of the ith track segment *
37//* ztrack = end z-point of the ith track segment *
38//* 1 < i < ntrack *
39//* ttrack = length of the ith track segment *
40//* 1 < j < mtrack *
41//* dtrack = energy deposition of the jth deposition event *
5929ad29 42//* dptrck = momentum loss of the jth deposition event *
fa3d1cc7 43//* *
c233f1c8 44//* Jtrack = identity number of the particle: for recoils or *
45//* kerma deposition it can be outside the allowed *
46//* particle id range, assuming values like: *
47//* 208: "heavy" recoil *
48//* 211: EM below threshold *
49//* 308: low energy neutron kerma *
50//* in those cases the id of the particle originating *
51//* the interaction is saved inside J0trck (which othe-*
52//* rwise is zero) *
53//* J0trck = see above *
54//* Ifltrk = flag used for internal debugging (trying to solve *
55//* possible residual issues with Mgdraw driven *
56//* quenching) *
fa3d1cc7 57//* etrack = total energy of the particle *
58//* ptrack = momentum of the particle (not always defined, if *
59//* < 0 must be obtained from etrack) *
60//* cx,y,ztrck = direction cosines of the current particle *
61//* cx,y,ztrpl = polarization cosines of the current particle *
62//* wtrack = weight of the particle *
63//* wscrng = scoring weight: it can differ from wtrack if some *
64//* biasing techniques are used (for example inelastic *
65//* interaction length biasing) *
66//* ctrack = total curved path *
5929ad29 67//* cmtrck = cumulative curved path since particle birth *
fa3d1cc7 68//* zfftrk = <z_eff> of the particle *
69//* zfrttk = actual z_eff of the particle *
70//* atrack = age of the particle *
71//* akshrt = kshrt amplitude for k0/k0bar *
72//* aklong = klong amplitude for k0/k0bar *
73//* wninou = neutron algebraic balance of interactions (both *
74//* for "high" energy particles and "low" energy *
75//* neutrons) *
76//* spausr = user defined spare variables for the current *
77//* particle *
78//* sttrck = macroscopic total cross section for low energy *
79//* neutron collisions *
80//* satrck = macroscopic absorption cross section for low energy*
81//* neutron collisions (it can be negative for pnab>1) *
82//* ktrack = if > 0 neutron group of the particle (neutron) *
83//* *
84//* ntrack > 0, mtrack > 0 : energy loss distributed along the *
85//* track *
86//* ntrack > 0, mtrack = 0 : no energy loss along the track *
87//* ntrack = 0, mtrack = 0 : local energy deposition (the *
88//* value and the point are not re- *
89//* corded in trackr) *
90//* mmtrck = flag recording the material index for low energy *
91//* neutron collisions *
92//* lt1trk = initial lattice cell of the current track *
93//* (or lattice cell for a point energy deposition) *
94//* lt2trk = final lattice cell of the current track *
95//* ihspnt = current geometry history pointer (not set if -1) *
96//* ltrack = flag recording the generation number *
97//* llouse = user defined flag for the current particle *
98//* ispusr = user defined spare flags for the current particle *
99//* lfsssc = logical flag for inelastic interactions ending with*
100//* fission (used also for low energy neutrons) *
101//* *
102//*----------------------------------------------------------------------*
fc929c48 103//
104
105//
106// TFluka specific:
107// ispusr[mkbmx2 - 1] : track index in vmcstack
108// ispusr[mkbmx2 - 2] : flag for "interrupted" track
109//
110
fa3d1cc7 111const Int_t mxtrck = 2500;
112
113typedef struct {
c233f1c8 114 Double_t xtrack[mxtrck+1];
115 Double_t ytrack[mxtrck+1];
116 Double_t ztrack[mxtrck+1];
117 Double_t ttrack[mxtrck];
118 Double_t dtrack[mxtrck];
119 Double_t dptrck[mxtrck][3];
120 Double_t etrack;
121 Double_t ptrack;
122 Double_t cxtrck;
123 Double_t cytrck;
124 Double_t cztrck;
125 Double_t wtrack;
126 Double_t cxtrpl;
127 Double_t cytrpl;
128 Double_t cztrpl;
129 Double_t zfftrk;
130 Double_t zfrttk;
131 Double_t atrack;
132 Double_t ctrack;
133 Double_t cmtrck;
134 Double_t akshrt;
135 Double_t aklong;
136 Double_t wscrng;
137 Double_t wninou;
138 Double_t spausr[mkbmx1];
139 Double_t sttrck;
140 Double_t satrck;
141 Int_t ntrack;
142 Int_t mtrack;
143 Int_t ifltrk;
144 Int_t jtrack;
145 Int_t j0trck;
146 Int_t ktrack;
147 Int_t mmtrck;
148 Int_t lt1trk;
149 Int_t lt2trk;
150 Int_t ihspnt;
151 Int_t ltrack;
152 Int_t llouse;
153 Int_t ispusr[mkbmx2];
154 Int_t lfsssc;
155 Int_t lpkill;
fa3d1cc7 156} trackrCommon;
157#define TRACKR COMMON_BLOCK(TRACKR,trackr)
158COMMON_BLOCK_DEF(trackrCommon,TRACKR);
159//static union { Double_t spause; Double_t spausr[0];};
160//static union { Int_t ispuse; Int_t ispusr[0];};
161}