One particular efficiency improvement technique is the so-called stratified sampling. It consists in partitioning the event distributions in representative sub-spaces, which are then all sampled individualy. The advantage is that we are then sure that each sub-space is well represented in the final integrals. This means that instead of shooting \(N\) events, we define \(D\) partitions and shoot \(r=N/D\) events in each partition. We may define partitions so that they represent ’interesting’ distributions, e.g. from events scattered on a monochromator or a sample. The sum of partitions should equal the total space integrated by the Monte Carlo method, and each partition must be sampled randomly.
In the case of McXtrace, the stratified sampling is used when repeating events, i.e. when using the SPLIT keyword in the TRACE section on beamline descriptions. We emphasize here that the number of repetitions \(r\) should not exceed the dimensionality of the Monte Carlo integration space (which is \(d=10\) for x-ray events) and the dimensionality of the partition spaces, i.e. the number of random generators following the stratified sampling location in the beamline.