BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
DetectionProperties.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Device/Detector/DetectionProperties.h
6 //! @brief Defines class DetectionProperties.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_CORE_DETECTOR_DETECTIONPROPERTIES_H
16 #define BORNAGAIN_CORE_DETECTOR_DETECTIONPROPERTIES_H
17 
18 #include "Base/Vector/EigenCore.h"
19 #include "Param/Node/INode.h"
20 
21 //! Detector properties (efficiency, transmission).
22 //! @ingroup detector
23 
24 class DetectionProperties : public INode
25 {
26 public:
27  DetectionProperties(kvector_t direction, double efficiency, double total_transmission);
30 
31  virtual ~DetectionProperties() = default;
32 
33  //! Sets the polarization analyzer characteristics of the detector
34  void setAnalyzerProperties(const kvector_t direction, double efficiency,
35  double total_transmission);
36 
37  //! Return the polarization density matrix (in spin basis along z-axis)
38  Eigen::Matrix2cd analyzerOperator() const;
39 
40  //! Retrieve the analyzer characteristics
42  double analyzerEfficiency() const; //!< will always return positive value
43  double analyzerTotalTransmission() const;
44 
45  void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
46 
47 private:
48  //! Verify if the given analyzer properties are physical
49  bool checkAnalyzerProperties(const kvector_t direction, double efficiency,
50  double total_transmission) const;
51 
52  kvector_t m_direction; //!< direction of polarization analysis
53  double m_efficiency; //!< efficiency of polarization analysis
54  double m_total_transmission; //!< total transmission of polarization analysis
55 };
56 
57 #endif // BORNAGAIN_CORE_DETECTOR_DETECTIONPROPERTIES_H
Include to deal with Eigen alignment centrally.
Defines class INode.
Detector properties (efficiency, transmission).
double m_efficiency
efficiency of polarization analysis
virtual ~DetectionProperties()=default
double m_total_transmission
total transmission of polarization analysis
double analyzerEfficiency() const
will always return positive value
void setAnalyzerProperties(const kvector_t direction, double efficiency, double total_transmission)
Sets the polarization analyzer characteristics of the detector.
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
double analyzerTotalTransmission() const
bool checkAnalyzerProperties(const kvector_t direction, double efficiency, double total_transmission) const
Verify if the given analyzer properties are physical.
kvector_t m_direction
direction of polarization analysis
kvector_t analyzerDirection() const
Retrieve the analyzer characteristics.
Eigen::Matrix2cd analyzerOperator() const
Return the polarization density matrix (in spin basis along z-axis)
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Base class for tree-like structures containing parameterized objects.
Definition: INode.h:49