# FLUKA

FLUKA is a Monte Carlo simulation package modelling the interactions of particles and radiation with matter. It allows the implementation of complex geometries for simulation of detectors.

## Getting started

An installation of FLUKA (compiled in 32 bit) is available at

/afs/rhic.bnl.gov/eic/PACKAGES/fluka


## Input Cards

Normal running of FLUKA does not involve writing any code. Instead, a text input file consisting of various cards governs its running. A card is a keyword followed by a list of arguments. Full documentation of FLUKA, including descriptions of the cards, is available here. Below is a description of some of the most important cards.

### Primary Cards

• Start Card: Used to define the number of primaries, which will change the normalization of the scoring cards.
• Source Card: This card allows the user to pass the given parameters to their source routine in the include file. In this case there is FORTRAN code that reads in PYTHIA simulations allowing the user to ignore the beam setup cards in FLUKA.

### Geometry Cards

There are multiple card options under the geometry section in FLUKA although in order to run a simulation the user must define bodies (or simple geometry figures) which are combined into regions with a homogeneous material composition using Boolean-Zone expressions + (intersection) – (subtraction) and | (union of sub regions), and finally assigned a material to that region. Bodies should overlap or be cut using a plane when combining them into a region. Highest operator precedence is given to parentheses which can be used to define sub regions. To avoid infinite tracking of a particle there must be a region surrounding the geometry that is assigned the material Black Hole.

• Lattice Card: FLUKA has the capability to replicate its geometry using the lattice card. This allows the user to provide the position of regions that will have the same geometry as the original copy. When a particle hits a lattice structure, it will be translated to the original copy and the particles reactions to the materials will be based on the original copy. This is implemented in the center of the detector, where silicon layers are replicated in vacuum regions with the same size. To make sure this capability does not alter the scoring of particles, multiple simulations were run testing the scoring of electron fluence with and without the lattice structure being implicated.

### Media Cards

• Assigma Card: Used to assign a material to a region and can set the magnetic and electric field to that region. FLUKA has predefined materials, although there is the option to create a new material or compound using their card options.
• Material Card: Used to name and define a new material or compound, must give the card a name (which will be used in either the Compound or Assigma card) and the density (in g/cm3) of the material or compound in order to run. FLUKA has a built in Material and Element database which can insert a Material or Compound card into the flair input file using their define information.
• Compound Card: Used to define a compound with the materials found in the flair file. The name of the Compound card corresponds to its Material card.

### Scoring Cards

FLUKA can record (or "score") various quantities describing particles as they pass through the detector.

• USRBIN: The Binning Detector score card scores either energy deposited or total fluence of various particles in a defined volume, with units in GeV/cm3 per primary weight (for energy deposited) or particles/cm2 per primary weight (for total fluence) [1]. One implementation of this card would be to score the total fluence in a cylindrical coordinate system where the radius is very small compared to the rest. This would make the track length of each particle almost the same, therefore allowing the normalization of the graph to become the number of particles hitting that small volume in the described bin.
• USRBDX: The Boundary Crossing Fluence or Current estimator score card scores the average double differential fluence or current with respect to energy and angle of a given type of particle while it crosses into a different region, with units of cm-2GeV-1sr-1 per incident primary [1]. By selecting boundary regions that are spherical, the angle with respect to the normal is always zero. Therefore the results, when normalized correctly to the number of primary particles, display the number of particles crossing the boundary with certain energy.