diff --git a/Sim/Simulation/DepthprobeSimulation.cpp b/Sim/Simulation/DepthprobeSimulation.cpp
index a0aabd468cc574e655c820a4de2346565a32d213..d47188548619ce1ad97bccbc2ac9b49842e9bd03 100644
--- a/Sim/Simulation/DepthprobeSimulation.cpp
+++ b/Sim/Simulation/DepthprobeSimulation.cpp
@@ -87,8 +87,8 @@ void DepthprobeSimulation::initDistributionHandler()
 
 void DepthprobeSimulation::runComputation(const ReSample& re_sample, size_t i, double weight)
 {
-    const double result_angle = m_alpha_axis->bin(i).center() + beam().alpha_i();
-    DepthprobeElement ele(beam().wavelength(), -result_angle, zAxis(),
+    const double result_angle = m_alpha_axis->bin(i).center() + m_beam->alpha_i();
+    DepthprobeElement ele(m_beam->wavelength(), -result_angle, zAxis(),
                           0 < result_angle && result_angle < M_PI_2);
 
     DepthprobeComputation(re_sample, options(), progress()).run(ele);
diff --git a/Sim/Simulation/DepthprobeSimulation.h b/Sim/Simulation/DepthprobeSimulation.h
index c83bad3714703f5ba2f99f049fac15c8ad8bfc66..1d400c40199ac2a65b4ff78664aaa6d503a10e72 100644
--- a/Sim/Simulation/DepthprobeSimulation.h
+++ b/Sim/Simulation/DepthprobeSimulation.h
@@ -41,18 +41,12 @@ public:
     //! under sample surface. The more negative z is, the deeper layer corresponds to it.
     void setzSpan(size_t n_bins, double z_min, double z_max);
 
-    Beam& beam() { return *m_beam; }
-
 #ifndef SWIG
 
     const IBeamScan& scan() const
     {
         return *m_scan;
     }
-    const Beam& beam() const
-    {
-        return *m_beam;
-    }
 
     const ICoordSystem* simCoordSystem() const override;
 
diff --git a/auto/Wrap/libBornAgainSim.py b/auto/Wrap/libBornAgainSim.py
index 16d9ef73a3d87db02b65aeb495c3b34333809203..c04ca0c8539811fa2c046ea94faaa2c4d08206c1 100644
--- a/auto/Wrap/libBornAgainSim.py
+++ b/auto/Wrap/libBornAgainSim.py
@@ -2739,10 +2739,6 @@ class DepthprobeSimulation(ISimulation):
         r"""setzSpan(DepthprobeSimulation self, size_t n_bins, double z_min, double z_max)"""
         return _libBornAgainSim.DepthprobeSimulation_setzSpan(self, n_bins, z_min, z_max)
 
-    def beam(self):
-        r"""beam(DepthprobeSimulation self) -> Beam &"""
-        return _libBornAgainSim.DepthprobeSimulation_beam(self)
-
 # Register DepthprobeSimulation in _libBornAgainSim:
 _libBornAgainSim.DepthprobeSimulation_swigregister(DepthprobeSimulation)
 class SpecularSimulation(ISimulation):
diff --git a/auto/Wrap/libBornAgainSim_wrap.cpp b/auto/Wrap/libBornAgainSim_wrap.cpp
index 608ef58e2f42601c9598f723e09dee0a8f551295..0e458d8a255aa00fea8c1b9c24df9589c4f34cf4 100644
--- a/auto/Wrap/libBornAgainSim_wrap.cpp
+++ b/auto/Wrap/libBornAgainSim_wrap.cpp
@@ -33519,29 +33519,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_DepthprobeSimulation_beam(PyObject *self, PyObject *args) {
-  PyObject *resultobj = 0;
-  DepthprobeSimulation *arg1 = (DepthprobeSimulation *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *swig_obj[1] ;
-  Beam *result = 0 ;
-  
-  if (!args) SWIG_fail;
-  swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DepthprobeSimulation, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DepthprobeSimulation_beam" "', argument " "1"" of type '" "DepthprobeSimulation *""'"); 
-  }
-  arg1 = reinterpret_cast< DepthprobeSimulation * >(argp1);
-  result = (Beam *) &(arg1)->beam();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Beam, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
 SWIGINTERN PyObject *DepthprobeSimulation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
@@ -36238,7 +36215,6 @@ static PyMethodDef SwigMethods[] = {
 	 { "delete_DepthprobeSimulation", _wrap_delete_DepthprobeSimulation, METH_O, "delete_DepthprobeSimulation(DepthprobeSimulation self)"},
 	 { "DepthprobeSimulation_className", _wrap_DepthprobeSimulation_className, METH_O, "DepthprobeSimulation_className(DepthprobeSimulation self) -> std::string"},
 	 { "DepthprobeSimulation_setzSpan", _wrap_DepthprobeSimulation_setzSpan, METH_VARARGS, "DepthprobeSimulation_setzSpan(DepthprobeSimulation self, size_t n_bins, double z_min, double z_max)"},
-	 { "DepthprobeSimulation_beam", _wrap_DepthprobeSimulation_beam, METH_O, "DepthprobeSimulation_beam(DepthprobeSimulation self) -> Beam &"},
 	 { "DepthprobeSimulation_swigregister", DepthprobeSimulation_swigregister, METH_O, NULL},
 	 { "DepthprobeSimulation_swiginit", DepthprobeSimulation_swiginit, METH_VARARGS, NULL},
 	 { "new_SpecularSimulation", _wrap_new_SpecularSimulation, METH_VARARGS, "new_SpecularSimulation(IBeamScan scan, MultiLayer const & sample) -> SpecularSimulation"},