Mantid
Loading...
Searching...
No Matches
CreateMonteCarloWorkspace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2025 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include <random>
10#include <vector>
11
12#include "MantidAPI/Algorithm.h"
13#include "MantidAlgorithms/DllConfig.h"
14
15namespace Mantid {
16namespace Algorithms {
17using namespace std;
18
22class MANTID_ALGORITHMS_DLL CreateMonteCarloWorkspace : public API::Algorithm {
23public:
24 const string name() const override;
25 int version() const override;
26 const string category() const override;
27 const string summary() const override;
28
29 Mantid::HistogramData::HistogramY fillHistogramWithRandomData(const std::vector<double> &cdf, int numIterations,
30 int seedInput, API::Progress &progress);
31 std::vector<double> computeNormalizedCDF(const Mantid::HistogramData::HistogramY &yData);
32 int integrateYData(const Mantid::HistogramData::HistogramY &yData);
33
34private:
35 void init() override;
36 void exec() override;
37};
38
39} // namespace Algorithms
40} // namespace Mantid
std::string name
Definition Run.cpp:60
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Helper class for reporting progress from algorithms.
Definition Progress.h:25
CreateMonteCarloWorkspace : The algorithm generates a simulated workspace by sampling from the probab...
Helper class which provides the Collimation Length for SANS instruments.
STL namespace.