How do I know what materials are in GSIM?

Well, the only complete answer is: "Look at the code".

That is a rather unsatisfactory answer though. So here is an alternative way.

Since GSIM is a collection of 3 dimensional volumes, it is not an easy question to answer even with complete knowledge of the code. An easier question to answer is "What materials does an electron of 2 GeV at 40 degrees traverse?". This question can be answered by asking the code:

Here is a very simple way to get a "quick" list of the volumes that a particle traverses:

Use FFREAD cards: NOSEC 'ALL' so that you get only ONE track (else you will get several hundred secondaries in the EC).

Start interactive GSIM, gsim_int and give the following commands ( after # is my comment, don't type it):

next
dcut clas 2 0 10 10 0.015 0.015 # Draw pictue of sector 1 and 4.
swit 1 3 # Set interactive debug level to 3
kine 3 3 2. 2. 40. 40. 0. 0. # electron (3) of 2 GeV at 40 degrees theta, 0 phi.
trig 1

You should see a track drawn on the picture, and a long list of GSIM info on the screen:

=====> TRACK    1 STACK NR   0 NTMULT=         1     ELECTRON                 TOFG =     0.000 NS
X          Y          Z          R     NAME  NUMBER   SLENG      STEP      DESTEP     GEKIN   MECHANISMS
0.0000     0.0000     0.0000     0.0000 TARG    1     0.0000    0.0000    0.0  eV    1.999 GeV NULL
0.2493     0.0000     0.2971     0.2493 TARG    1     0.3878    0.3878   99.0 keV    1.999 GeV FIEL LOSS MULS
0.4300    -0.0002     0.5128     0.4300 TARG    1     0.6692    0.2814   52.3 keV    1.999 GeV FIEL NEXT LOSS MULS
0.4300    -0.0002     0.5128     0.4300 TGCL    1     0.6692    0.0000    0.0  eV    1.999 GeV NULL
0.4420    -0.0002     0.5271     0.4420 TGCL    1     0.6879    0.0187   61.5 keV    1.999 GeV NEXT LOSS MULS
0.4420    -0.0002     0.5271     0.4420 TG      1     0.6879    0.0000    0.0  eV    1.999 GeV NULL
0.7630    -0.0006     0.9105     0.7630 TG      1     1.1879    0.5000    0.0  eV    1.999 GeV FIEL SMAX
1.0841    -0.0010     1.2938     1.0841 TG      1     1.6879    0.5000    0.0  eV    1.999 GeV FIEL SMAX
1.4051    -0.0014     1.6771     1.4051 TG      1     2.1879    0.5000    0.0  eV    1.999 GeV FIEL SMAX
1.6303    -0.0017     1.9461     1.6303 TG      1     2.5388    0.3508    0.0  eV    1.999 GeV FIEL NEXT
1.6303    -0.0017     1.9461     1.6303 TGSI    1     2.5388    0.0000    0.0  eV    1.999 GeV NULL
1.6500    -0.0017     1.9696     1.6500 TGSI    1     2.5694    0.0307  123.0 keV    1.999 GeV NEXT LOSS MULS
1.6500    -0.0017     1.9696     1.6500 TG      1     2.5694    0.0000    0.0  eV    1.999 GeV NULL
1.9711    -0.0021     2.3529     1.9711 TG      1     3.0694    0.5000    0.0  eV    1.999 GeV FIEL SMAX
2.2923    -0.0024     2.7361     2.2923 TG      1     3.5694    0.5000    0.0  eV    1.999 GeV FIEL SMAX
2.6134    -0.0028     3.1194     2.6134 TG      1     4.0694    0.5000    0.0  eV    1.999 GeV FIEL SMAX
2.9345    -0.0032     3.5026     2.9345 TG      1     4.5694    0.5000    0.0  eV    1.999 GeV FIEL SMAX
3.2556    -0.0035     3.8859     3.2556 TG      1     5.0694    0.5000    0.0  eV    1.999 GeV FIEL SMAX
3.5767    -0.0039     4.2691     3.5767 TG      1     5.5694    0.5000    0.0  eV    1.999 GeV FIEL SMAX
3.8979    -0.0043     4.6524     3.8979 TG      1     6.0694    0.5000    0.0  eV    1.999 GeV FIEL SMAX
4.2190    -0.0047     5.0356     4.2190 TG      1     6.5694    0.5000    0.0  eV    1.999 GeV FIEL SMAX
4.4303    -0.0049     5.2879     4.4303 TG      1     6.8985    0.3291    0.0  eV    1.999 GeV FIEL NEXT
4.4303    -0.0049     5.2879     4.4303 GAS2    1     6.8985    0.0000    0.0  eV    1.999 GeV NULL
4.7514    -0.0053     5.6711     4.7514 GAS2    1     7.3985    0.5000   35.9  eV    1.999 GeV FIEL LOSS MULS SMAX
5.0726    -0.0056     6.0544     5.0726 GAS2    1     7.8985    0.5000  164.8  eV    1.999 GeV FIEL LOSS MULS SMAX
5.2078    -0.0058     6.2157     5.2078 GAS2    1     8.1090    0.2105    0.0  eV    1.999 GeV FIEL NEXT LOSS MULS
5.2078    -0.0058     6.2157     5.2078 FOI2    1     8.1090    0.0000    0.0  eV    1.999 GeV NULL
5.5289    -0.0062     6.5990     5.5289 FOI2    1     8.6090    0.5000  971.9  eV    1.999 GeV FIEL LOSS MULS SMAX
5.8500    -0.0066     6.9822     5.8500 FOI2    1     9.1090    0.5000    1.0 keV    1.999 GeV FIEL LOSS MULS SMAX
6.1711    -0.0069     7.3655     6.1711 FOI2    1     9.6090    0.5000    1.8 keV    1.999 GeV FIEL LOSS MULS SMAX
6.3744    -0.0072     7.6081     6.3744 FOI2    1     9.9256    0.3166  358.5  eV    1.999 GeV FIEL NEXT LOSS MULS
6.3744    -0.0072     7.6081     6.3744 WIND    1     9.9256    0.0000    0.0  eV    1.999 GeV NULL
6.3834    -0.0072     7.6189     6.3834 WIND    1     9.9396    0.0140   33.8 keV    1.999 GeV FIEL NEXT LOSS MULS
6.3834    -0.0072     7.6189     6.3834 FOI2    1     9.9396    0.0000    0.0  eV    1.999 GeV NULL
6.7045    -0.0076     8.0022     6.7045 FOI2    1    10.4396    0.5000    1.1 keV    1.999 GeV FIEL LOSS MULS SMAX
7.0256    -0.0081     8.3854     7.0256 FOI2    1    10.9396    0.5000    2.2 keV    1.999 GeV FIEL LOSS MULS SMAX
7.3466    -0.0086     8.7687     7.3466 FOI2    1    11.4396    0.5000    1.2 keV    1.999 GeV FIEL LOSS MULS SMAX
7.6677    -0.0091     9.1520     7.6677 FOI2    1    11.9396    0.5000    1.8 keV    1.999 GeV FIEL LOSS MULS SMAX
7.9888    -0.0096     9.5353     7.9888 FOI2    1    12.4396    0.5000  867.8  eV    1.999 GeV FIEL LOSS MULS SMAX
8.3098    -0.0101     9.9186     8.3098 FOI2    1    12.9396    0.5000  601.4  eV    1.999 GeV FIEL LOSS MULS SMAX
8.6309    -0.0105    10.3019     8.6309 FOI2    1    13.4396    0.5000    1.4 keV    1.999 GeV FIEL LOSS MULS SMAX
8.9520    -0.0110    10.6852     8.9520 FOI2    1    13.9396    0.5000    1.3 keV    1.999 GeV FIEL LOSS MULS SMAX


I guess it is fairly obvious what it prints out, you get the coordinates of each "step", the volume it is in, the amount of energy lost and the physics process that was applied to the particle (multiple scattering, energy loss, magnetic field bending etc.)

A different printout is obtained from the "track_debugger" in clas_step.c in the gsim code. This routine can be easily modified to include more information. You turn it on with "swit 3 1". First turn off the other printout (swit 1 0) so you don't get both (which may be usefull, but is too much now.)
Printout:

[Trk# partname   ]   Volumes                             Materials            (step# ) [ Pathlen, Delta  ] Kin_e         Processes.
[ 1  0 ELECTRON    ]: CLAS FOIL GAS2 VOLM VH_4           CLAS L_He3           (     0) [  0.0000,  0.0000] E: 1999.489 MeV
GUSER_STEP I: *** Default version of guser_step called ***
[ 1  0 ELECTRON    ]: CLAS FOIL GAS2 VOLM VH_4           CLAS L_He3           (     1) [  0.5629,  0.5629] E: 1999.413 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS FOIL GAS2 VOLM VM_4           CLAS Mylar           (     2) [  0.5683,  0.0053] E: 1999.401 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS FOIL GAS2 VOLM                CLAS Vacuum          (     3) [  0.9012,  0.3329] E: 1999.401 MeV FIEL NEXT
[ 1  0 ELECTRON    ]: CLAS FOIL GAS2 VOLM VM_3           CLAS Mylar           (     4) [  0.9273,  0.0261] E: 1999.338 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS FOIL GAS2 VOLM                CLAS Vacuum          (     7) [  5.8743,  4.9471] E: 1999.338 MeV FIEL NEXT
[ 1  0 ELECTRON    ]: CLAS FOIL GAS2                     CLAS He              (     9) [  8.1056,  2.2313] E: 1999.337 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS FOIL FOI1 FOI2                CLAS Air             (    10) [  9.9218,  1.8161] E: 1999.332 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS FOIL FOI1 FOI2 WIND           CLAS Mylar           (    11) [  9.9358,  0.0140] E: 1999.299 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS FOIL FOI1 FOI2                CLAS Air             (    31) [ 46.7897, 36.8539] E: 1999.209 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS                               CLAS Air             (    40) [ 63.3557, 16.5660] E: 1999.167 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A                          ARG/CO2 90:10        (    43) [ 65.9700,  2.6143] E: 1999.161 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS1A                     ARG/CO2 90:10        (    44) [ 65.9842,  0.0142] E: 1999.161 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS1A DW1A                ARG/CO2 90:10        (    46) [ 67.2593,  1.2751] E: 1999.157 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS1A                     ARG/CO2 90:10        (    47) [ 67.2805,  0.0212] E: 1999.157 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS1A DW1A                ARG/CO2 90:10        (    49) [ 68.5675,  1.2870] E: 1999.154 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS1A                     ARG/CO2 90:10        (    50) [ 68.5746,  0.0071] E: 1999.154 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS1A DW1A                ARG/CO2 90:10        (    52) [ 69.8734,  1.2988] E: 1999.151 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS1A DW1A                ARG/CO2 90:10        (    54) [ 71.1771,  1.3037] E: 1999.117 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A                          ARG/CO2 90:10        (    57) [ 73.9236,  2.7465] E: 1999.110 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS2A                     ARG/CO2 90:10        (    58) [ 73.9366,  0.0130] E: 1999.110 MeV FIEL NEXT LOSS MULS
[ 1  0 ELECTRON    ]: CLAS DC1A DS2A DW2A                ARG/CO2 90:10        (    60) [ 75.1937,  1.2572] E: 1999.105 MeV FIEL NEXT LOSS MULS
 

Note that the information is similar, with the main difference that the entire hiarchy of the volumes is given. It gives you a more exact idea of where you are in the code.
To get the *material* that the particle steps through, either modify the clas_step.c routine to add it in the printout, or look up the material in the GSIM code.

If you need to customize the information in that is printed out, you want to do this in the routine: track_debugger in clas_step.c. If you need help, send an email to holtrop (at) jlab.org