Project

General

Profile

NuMI Beam Simulations

This area is devoted to work on the simulation of the NuMI Beamline. This wiki should serve to facilitate those efforts by documenting how to get, configure and run the code.

Simulations

g4numi a pure Geant4 based simulation of the beamline
flugg uses the same g4numi geometry, but interfaces to fluka for the actual particle physics
gnumi the obsolete GEANT3 based simulation
pbeam a fast FORTRAN based simulation (also obsolete)
mars an alternative simulation (while mars itself is kept up-to-date, the NuMI code to use it has probably fallen into disrepair).

Data Products

The most commonly used output of the first three of the simulations is an ntuple that represents hadrons and muons that decay to give neutrinos. At present these give 4 different variants of the ntuple (Minerva's version of g4numi is not reflected in the mainline branch of the code). These ntuples are very similar in form but not exactly interchangeable in general. The GENIE neutrino interaction generator can by default read all three (but not the Minerva variant without modification). Ongoing work is has a long-term goal of migrating the first two simulations (g4numi and flugg) to a common, extensible ntuple format: Dk2nu

Naming Convention

The names of simulation configurations take the following form: [l/m][e/n][nnn]z[nnn]i

  • [l/m]: l = low energy horn 2 position, m = medium energy horn 2 position
  • [e/n]: e = MINOS target, n = NOvA target. In the event of target design changes, we have 24 letters left in the alphabet
  • [nnn]z = pull back (unchanged for MINOS target, relative to nominal pos. for NOvA target)
  • [nnn]i = horn current in kA (same as for MINOS)

A standard MINOS run would have been le010z185i; a standard NOvA run will be mn000z200i.

Files, Files, Files

Locations of shared files

NuMI-X code repository

Instructions for: Access to the repository

The current CVS repository used by NuMI-X is a re-integration of the original code and two separate forks (that didn't retain development history). At this time the proto2-numix branch is used for flugg development, and proto1-numix + proto3-numix for g4numi development, with minerva still developing on their branch as well. The long term goal is to eventually get a consistent set of code merged back onto the trunk / HEAD branch that reflects the combined best of all improvements and is provides consistency between flugg and g4numi.

branch purpose origin date
minerva minerva (geant4) forked from minos repo
(re-integrated)
?
nova nova (flugg) forked from minos repo
(re-integrated)
?
proto1-numix numi-x geant4 development
(only for G4.9.6 and earlier)
minerva 2013-08-19
proto2-numix numi-x flugg development nova 2013-03-23
proto3-numix numi-x geant4 development
latest minerva changes
with modifications for
Geant4.10.1+
minerva 2016-06-29

Build instructions

  • How to build the Geant4 code (proto1-numix branch)
  • [[minerva-sw:G4NuMI_instructions| How to build the Geant4 code - minerva branch]]
    Note that while there are instructions there, they lead with the following: Note, it is difficult to keep the Wiki up to date. Modern versions of the building and running instructions may be found inside of the g4numi package in the repository: build_instructions.txt, running_instructions.txt. It is recommended that one follow that advice if unable to access the Minerva redmine wiki.
  • How to build the Geant4 code - proto3 (proto3-numix branch)
  • How to build the FLUGG code (proto2-numix branch)

Building enough so that geometry can be extracted to GDML file

Geometry with G4StandAlone

GDML Overlap Script

GDML Ray Tracing Script

Processing output files

Ideally the output files of these beamline generations are of the Dk2Nu format. These files can be used by GENIE via the Dk2nu_GENIE_FluxDriver. Outside of GENIE event generation, studies can done using the FluxReader.

hints for using files on PNFS

In some instances the contents of files on PNFS can't be directly accessed (i.e. the file system isn't perfectly normal) even though they can be listed with ls. In such cases one can use the xroot interface to access them:

root -b `pnfs2xrootd /pnfs/numix/....../flugg_mn000z200i_rp11_lowth_pnut_f112c0f093bbird/Run0000/flugg_mn000z200i_rp11_bs1.1_pnut_lowth_f112c0f093bbird_0000.root`

where pnfs2xrootd is a translation script along the lines of:

/grid/fermiapp/products/nova/externals/novaproduction/v01.06/NULL/bin/pnfs2xrootd

#!/bin/sh

# This is a cousin to samweb2xrootd. It takes a path that you could "ls" in
# /pnfs and puts it in a format that ROOT or ART can understand. Can accept
# multiple arguments.

while true
do
echo -n `readlink -f $1` | sed -e 's%/pnfs%root://fndca1.fnal.gov:1094//pnfs/fnal.gov/usr%'
shift
if [ x$1 == x ]; then break; fi
echo -n ' '
done

echo ' '

# end-of-script

If you there are authentication issues you might try:

kx509
kxlist -p
voms-proxy-init --rfc --voms=fermilab:/fermilab/nova/Role=Analysis --noregen

Muon Monitor Simulations

Resources

NuMI Beamline

NuMI Technical Design Handbook

is the followup on the TDR; contains later information; section 4.4 has diagrams, photos and references to CAD drawing numbers that might be of particular interest.

Drawings Database Note: not available from offsite...

is a source of "released" CAD drawings; try this, but it is an incomplete source. To access drawings click on "query" on left; enter a search string. If you have a drawing number try that; otherwise try strings involving names such as "numi" and "horn", etc. [VPN in to access]

Table of document numbers in the drawings database

Other Drawing Sources

https://numix-docdb.fnal.gov:440/cgi-bin/ShowDocument?docid=21

Other Documentation

https://cdcvs.fnal.gov/redmine/projects/numi-beam/wiki/NuMI_beamline_documentation

Task List

NumiSoft Tag Release
Geometry
DK2NU
FluxReader