+++
title = "Simulation model"
weight = 10
+++

## Simulation model

To set up and run a BornAgain simulation, one needs to create an instance of
a simulation class. This class contains information about the scattering
target ("sample") and about the simulated instrument (beam or scan, detector).

#### Simulation classes

The following simulation classes are available:

* [Specular](class/specular) (reflectometry without scattering contributions),
* [Scattering](class/scattering) (SAS and GISAS),
* [Off-specular scattering](class/offspec) (laterally integrated GISAS),
* [Depth probe](class/depthprobe) (transmitted, reflected, total intensity vs depth).

#### Common functions

The following functions are common to all simulation classes:

Setters:
* [setBackground(_background_)](setup/bg) - besides [Depth probe](class/depthprobe)
* [setTerminalProgressMonitor()](setup/progress)
* [options()](setup/options) - gives access to option setters

Getter:
* `simulate()` - runs simulation and returns
  [Datafield](/ref/data/datafield)
