R/g1.R

Defines functions g1

g1 <- function(x) {

  weights <- c(6.,12.,8.,6.,24.,24.,0.,12.,30.,24.,24.,8.,24.,48.,0.,6.,48.,36.,24.,24.)
  ex <- c(1:20)
  res <- x
  for( i in 1:length(x)) {
    sex <- x[i]*sqrt(ex)
    res[i] <- sum(4*weights*besselK(sex, 1)/(sex))
  }
  return(res)
}
etmc/hadron documentation built on March 12, 2019, 8:43 p.m.