Mantid
Loading...
Searching...
No Matches
BraggScatterer.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 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 "MantidGeometry/DllConfig.h"
10#include "MantidKernel/V3D.h"
11
12#include <complex>
13#include <memory>
14
17
18namespace Mantid {
19namespace Geometry {
20
21using StructureFactor = std::complex<double>;
22
23class BraggScatterer;
24
25using BraggScatterer_sptr = std::shared_ptr<BraggScatterer>;
26
53class MANTID_GEOMETRY_DLL BraggScatterer : public Kernel::PropertyManager {
54public:
56
57 void initialize();
58 bool isInitialized();
59
60 virtual std::string name() const = 0;
61 virtual BraggScatterer_sptr clone() const = 0;
62
64 double calculateFSquared(const Kernel::V3D &hkl) const;
65
66 bool isPropertyExposedToComposite(const std::string &propertyName) const;
67 bool isPropertyExposedToComposite(Kernel::Property *property) const;
68
69protected:
71 void afterPropertySet(const std::string &) override {}
72
74 virtual void declareProperties() {}
75
76 void exposePropertyToComposite(const std::string &propertyName);
77 void unexposePropertyFromComposite(const std::string &propertyName);
78
79 const std::string &getPropagatingGroupName() const;
80
81private:
84};
85
86} // namespace Geometry
87} // namespace Mantid
BraggScatterer is a general interface for representing scatterers in the unit cell of a periodic stru...
virtual std::string name() const =0
virtual BraggScatterer_sptr clone() const =0
virtual StructureFactor calculateStructureFactor(const Kernel::V3D &hkl) const =0
void afterPropertySet(const std::string &) override
Base implementation does nothing, can be re-implemented by subclasses.
virtual void declareProperties()
Base implementation does nothing - for implementing classes only.
Property manager helper class.
Base class for properties.
Definition: Property.h:94
Class for 3D vectors.
Definition: V3D.h:34
std::shared_ptr< BraggScatterer > BraggScatterer_sptr
std::complex< double > StructureFactor
Helper class which provides the Collimation Length for SANS instruments.