Learn R Programming

libamtrack (version 0.6.3)

AT.stopping.power.ratio: AT.stopping.power.ratio

Description

Computes the stopping power ratio for a material and a reference material. In case of mixed particle fields, the stopping power ratios of individual components are weighted by their respective fluences. Thus, this routines computes the ration of fluence-weighted stopping powers, NOT of dose-weighted stopping powers.

Usage

AT.stopping.power.ratio(E.MeV.u, particle.no, fluence.cm2, material.no,
 reference.material.no, 
	stopping.power.source.no)

Arguments

E.MeV.u
energy of particles in the mixed particle field (array of size number.of.field.components) (see also E.MeV.u).
particle.no
particle index (array of size number.of.field.components) (see also particle.no).
fluence.cm2
fluences of particles in the mixed particle field (array of size number.of.field.components).
material.no
material index (see also material.no).
reference.material.no
material index of reference material.
stopping.power.source.no
TODO (see also stopping.power.source.no).

Value

  • stoppingstopping

See Also

View the C source code here: http://sourceforge.net/apps/trac/libamtrack/browser/tags/0.6.3/src/AT_Phy sicsRoutines.c#L721

Examples

Run this code
df                <-    expand.grid( particle.name         = "1H",            
                          # Define parameter space:
                                     particle.energy.MeV.u = 10^seq(-1, 3,
 length.out = 500),           # 1 nuclid, energy between 0.1 and 1000 MeV/u,
                                     material.name         = c("Air", "PMMA",
 "Aluminum Oxide"),        # and three materials
                                     stopping.power.ratio  = 0)
df$particle.no    <-    AT.particle.no.from.particle.name(df$particle.name)
df$material.no    <-    AT.material.no.from.material.name(df$material.name)
material.no.water <-    AT.material.no.from.material.name("Water, Liquid")
for (i in 1:nrow(df)){
    df$stopping.power.ratio[i]        <-    AT.stopping.power.ratio( E.MeV.u  
             = df$particle.energy.MeV.u[i],
                                                                    
 particle.no           = df$particle.no[i],
                                                                    
 fluence.cm2           = 1,                 
# does not have any meaning here as  monoenergetic beams are assumed
                                                                    
 material.no           = df$material.no[i],
                                                                    
 reference.material.no = material.no.water,
                                                                    
 stopping.power.source.no = 2)
}

Run the code above in your browser using DataLab