Mantid
Loading...
Searching...
No Matches
Unit.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
13#include <utility>
14
15#include <unordered_map>
16#include <vector>
17#ifndef Q_MOC_RUN
18#include <memory>
19#endif
20
21#include "tbb/concurrent_unordered_map.h"
22
23namespace Mantid {
24namespace Kernel {
25
27
28// list of parameter names and values - some code may relay on map behaviour
29// where [] creates element with value 0 if param name not present
30using UnitParametersMap = std::unordered_map<UnitParams, double>;
31
41class MANTID_KERNEL_DLL Unit {
42public:
44 Unit();
46 virtual ~Unit() = default;
47
49 virtual Unit *clone() const = 0;
50
57 virtual const std::string unitID() const = 0;
60 virtual const std::string caption() const = 0;
61
64 virtual const UnitLabel label() const = 0;
65
68 virtual bool isConvertible() const { return true; }
69
70 // Equality operators based on the value returned by unitID();
71 bool operator==(const Unit &u) const;
72 bool operator!=(const Unit &u) const;
73
74 // Check whether the unit can be converted to another via a simple factor
75 bool quickConversion(const Unit &destination, double &factor, double &power) const;
76 bool quickConversion(std::string destUnitName, double &factor, double &power) const;
77
91 void toTOF(std::vector<double> &xdata, std::vector<double> const &ydata, const double &_l1, const int &_emode,
92 std::initializer_list<std::pair<const UnitParams, double>> params);
93 void toTOF(std::vector<double> &xdata, std::vector<double> const &ydata, const double &_l1, const int &_emode,
94 const UnitParametersMap &params);
95
97 double convertSingleToTOF(const double xvalue, const double &l1, const int &emode, const UnitParametersMap &params);
98
112 void fromTOF(std::vector<double> &xdata, std::vector<double> const &ydata, const double &_l1, const int &_emode,
113 std::initializer_list<std::pair<const UnitParams, double>> params);
114
115 void fromTOF(std::vector<double> &xdata, std::vector<double> const &ydata, const double &_l1, const int &_emode,
116 const UnitParametersMap &params);
117
119 double convertSingleFromTOF(const double xvalue, const double &l1, const int &emode, const UnitParametersMap &params);
120
122 void initialize(const double &_l1, const int &_emode, const UnitParametersMap &params);
123
126 virtual void init() = 0;
127
132 virtual double singleToTOF(const double x) const = 0;
133
138 virtual double singleFromTOF(const double tof) const = 0;
139
141 bool isInitialized() const { return initialized; }
142
146 virtual double conversionTOFMin() const = 0;
147
150 virtual double conversionTOFMax() const = 0;
151
154 virtual std::pair<double, double> conversionRange() const;
155
156protected:
157 // Add a 'quick conversion' for a unit pair
158 void addConversion(std::string to, const double &factor, const double &power = 1.0) const;
159
160 // validate the contents of the unit parameters map. Throw
161 // std::invalid_argument if it's a global error or std::runtime_error if it's
162 // a detector specific error
163 virtual void validateUnitParams(const int emode, const UnitParametersMap &params);
164
168 double l1;
171 int emode;
178
179private:
182 using ConstantAndPower = std::pair<double, double>;
185 using UnitConversions = tbb::concurrent_unordered_map<std::string, ConstantAndPower>;
188 using ConversionsMap = tbb::concurrent_unordered_map<std::string, UnitConversions>;
191};
192
194using Unit_sptr = std::shared_ptr<Unit>;
196using Unit_const_sptr = std::shared_ptr<const Unit>;
197
198//----------------------------------------------------------------------
199// Now the concrete units classes
200//----------------------------------------------------------------------
201
203namespace Units {
204
205//=================================================================================================
207class MANTID_KERNEL_DLL Empty : public Unit {
208public:
209 const std::string unitID() const override;
210 const std::string caption() const override { return ""; }
211 const UnitLabel label() const override;
212
213 bool isConvertible() const override { return false; }
214 double singleToTOF(const double x) const override;
215 double singleFromTOF(const double tof) const override;
216 void init() override;
217 Unit *clone() const override;
218
219 double conversionTOFMin() const override;
220 double conversionTOFMax() const override;
221
223 Empty() : Unit() {}
224};
225
226//=================================================================================================
228class MANTID_KERNEL_DLL Label : public Empty {
229public:
230 const std::string unitID() const override;
231 const std::string caption() const override { return m_caption; }
232 const UnitLabel label() const override;
233
234 Label();
235 Label(const std::string &caption, const std::string &label);
236 void setLabel(const std::string &cpt, const UnitLabel &lbl = UnitLabel(""));
237 Unit *clone() const override;
238
239private:
241 std::string m_caption;
244};
245
246//=================================================================================================
248class MANTID_KERNEL_DLL TOF : public Unit {
249public:
250 const std::string unitID() const override;
251 const std::string caption() const override { return "Time-of-flight"; }
252 const UnitLabel label() const override;
253
254 TOF();
255 void init() override;
256 double singleToTOF(const double x) const override;
257 double singleFromTOF(const double tof) const override;
258 Unit *clone() const override;
260 double conversionTOFMin() const override;
262 double conversionTOFMax() const override;
263};
264
265//=================================================================================================
267class MANTID_KERNEL_DLL Wavelength : public Unit {
268public:
269 const std::string unitID() const override;
270 const std::string caption() const override { return "Wavelength"; }
271 const UnitLabel label() const override;
272
273 double singleToTOF(const double x) const override;
274 double singleFromTOF(const double tof) const override;
275 void init() override;
276 Unit *clone() const override;
277
278 double conversionTOFMin() const override;
279 double conversionTOFMax() const override;
280
282 Wavelength();
283
284protected:
285 void validateUnitParams(const int emode, const UnitParametersMap &params) override;
286 double efixed;
287 double sfpTo;
288 double factorTo;
289 double sfpFrom;
290 double factorFrom;
292};
293
294//=================================================================================================
296class MANTID_KERNEL_DLL Energy : public Unit {
297public:
298 const std::string unitID() const override;
299 const std::string caption() const override { return "Energy"; }
300 const UnitLabel label() const override;
301
302 double singleToTOF(const double x) const override;
303 double singleFromTOF(const double tof) const override;
304 void init() override;
305 Unit *clone() const override;
306
307 double conversionTOFMin() const override;
308 double conversionTOFMax() const override;
309
311 Energy();
312
313protected:
314 void validateUnitParams(const int emode, const UnitParametersMap &params) override;
315 double factorTo;
316 double factorFrom;
317};
318
319//=================================================================================================
321class MANTID_KERNEL_DLL Energy_inWavenumber : public Unit {
322public:
323 const std::string unitID() const override;
324 const std::string caption() const override { return "Energy"; }
325 const UnitLabel label() const override;
326
327 double singleToTOF(const double x) const override;
328 double singleFromTOF(const double tof) const override;
329 void init() override;
330 Unit *clone() const override;
331 double conversionTOFMin() const override;
332 double conversionTOFMax() const override;
333
336
337protected:
338 void validateUnitParams(const int emode, const UnitParametersMap &params) override;
339 double factorTo;
340 double factorFrom;
341};
342
343MANTID_KERNEL_DLL double tofToDSpacingFactor(const double l1, const double l2, const double twoTheta,
344 const double offset);
345
346MANTID_KERNEL_DLL double calculateDIFCCorrection(const double l1, const double l2, const double twotheta,
347 const double offset, const double binWidth);
348
349//=================================================================================================
351class MANTID_KERNEL_DLL dSpacing : public Unit {
352public:
353 const std::string unitID() const override;
354 const std::string caption() const override { return "d-Spacing"; }
355 const UnitLabel label() const override;
356 double singleToTOF(const double x) const override;
357 double singleFromTOF(const double tof) const override;
358 void init() override;
359 Unit *clone() const override;
360 double conversionTOFMin() const override;
361 double conversionTOFMax() const override;
362 double calcTofMin(const double difc, const double difa, const double tzero, const double tofmin = 0.);
363 double calcTofMax(const double difc, const double difa, const double tzero, const double tofmax = 0.);
364
366 dSpacing();
367
368protected:
369 void validateUnitParams(const int emode, const UnitParametersMap &params) override;
370 std::string toDSpacingError;
371 double difa;
372 double difc;
373 double tzero;
374};
375
376//=================================================================================================
378class MANTID_KERNEL_DLL dSpacingPerpendicular : public Unit {
379public:
380 const std::string unitID() const override;
381 const std::string caption() const override { return "d-SpacingPerpendicular"; }
382 const UnitLabel label() const override;
383
384 double singleToTOF(const double x) const override;
385 double singleFromTOF(const double tof) const override;
386 void init() override;
387 Unit *clone() const override;
388 double conversionTOFMin() const override;
389 double conversionTOFMax() const override;
390
393
394protected:
395 void validateUnitParams(const int emode, const UnitParametersMap &params) override;
396 double twoTheta;
397 double factorTo;
398 double sfpTo;
399 double factorFrom;
400 double sfpFrom;
401};
402
403//=================================================================================================
405class MANTID_KERNEL_DLL MomentumTransfer : public Unit {
406public:
407 const std::string unitID() const override;
408 const std::string caption() const override { return "q"; }
409 const UnitLabel label() const override;
410
411 double singleToTOF(const double x) const override;
412 double singleFromTOF(const double tof) const override;
413 void init() override;
414 Unit *clone() const override;
415 double conversionTOFMin() const override;
416 double conversionTOFMax() const override;
419
420protected:
421 void validateUnitParams(const int emode, const UnitParametersMap &params) override;
422 double difc;
423};
424
425//=================================================================================================
427class MANTID_KERNEL_DLL QSquared : public MomentumTransfer {
428public:
429 const std::string unitID() const override;
430 const std::string caption() const override { return "Q2"; }
431 const UnitLabel label() const override;
432
433 double singleToTOF(const double x) const override;
434 double singleFromTOF(const double tof) const override;
435 Unit *clone() const override;
436 double conversionTOFMin() const override;
437 double conversionTOFMax() const override;
438
440 QSquared();
441};
442
443//=================================================================================================
445class MANTID_KERNEL_DLL DeltaE : public Unit {
446public:
447 const std::string unitID() const override;
448 const std::string caption() const override { return "Energy transfer"; }
449 const UnitLabel label() const override;
450
451 double singleToTOF(const double x) const override;
452 double singleFromTOF(const double tof) const override;
453 void init() override;
454 Unit *clone() const override;
455
456 double conversionTOFMin() const override;
457 double conversionTOFMax() const override;
458
460 DeltaE();
461
462protected:
463 void validateUnitParams(const int emode, const UnitParametersMap &params) override;
464 double efixed;
465 double factorTo;
466 double factorFrom;
467 double t_other;
468 double t_otherFrom;
469 double unitScaling;
470};
471
472//=================================================================================================
474class MANTID_KERNEL_DLL DeltaE_inWavenumber : public DeltaE {
475public:
476 const std::string unitID() const override;
477 const UnitLabel label() const override;
478
479 void init() override;
480 Unit *clone() const override;
483};
484
485//=================================================================================================
487class MANTID_KERNEL_DLL DeltaE_inFrequency : public DeltaE {
488public:
489 const std::string unitID() const override;
490 const UnitLabel label() const override;
491
492 void init() override;
493 Unit *clone() const override;
496};
497
498//=================================================================================================
500class MANTID_KERNEL_DLL Momentum : public Unit {
501public:
502 const std::string unitID() const override;
503 const std::string caption() const override { return "Momentum"; }
504 const UnitLabel label() const override;
505
506 double singleToTOF(const double ki) const override;
507 double singleFromTOF(const double tof) const override;
508 void init() override;
509 Unit *clone() const override;
510 double conversionTOFMin() const override;
511 double conversionTOFMax() const override;
512
514 Momentum();
515
516protected:
517 void validateUnitParams(const int emode, const UnitParametersMap &params) override;
518 double efixed;
519 double sfpTo;
520 double factorTo;
521 double sfpFrom;
522 double factorFrom;
524};
525
526//=================================================================================================
528class MANTID_KERNEL_DLL SpinEchoLength : public Wavelength {
529public:
530 const std::string unitID() const override;
531 const std::string caption() const override { return "Spin Echo Length"; }
532 const UnitLabel label() const override;
533
534 double singleToTOF(const double x) const override;
535 double singleFromTOF(const double tof) const override;
536 void init() override;
537 Unit *clone() const override;
538 double conversionTOFMin() const override;
539 double conversionTOFMax() const override;
540
543
544private:
545 double efixed;
546};
547
548//=================================================================================================
550class MANTID_KERNEL_DLL SpinEchoTime : public Wavelength {
551public:
552 const std::string unitID() const override;
553 const std::string caption() const override { return "Spin Echo Time"; }
554 const UnitLabel label() const override;
555
556 double singleToTOF(const double x) const override;
557 double singleFromTOF(const double tof) const override;
558 void init() override;
559 Unit *clone() const override;
560 double conversionTOFMin() const override;
561 double conversionTOFMax() const override;
562
564 SpinEchoTime();
565
566private:
567 double efixed;
568};
569
570//=================================================================================================
572class MANTID_KERNEL_DLL Time : public Unit {
573public:
574 const std::string unitID() const override;
575 const std::string caption() const override { return "t"; }
576 const UnitLabel label() const override;
577
578 bool isConvertible() const override { return false; }
579 double singleToTOF(const double x) const override;
580 double singleFromTOF(const double tof) const override;
581 double conversionTOFMax() const override;
582 double conversionTOFMin() const override;
583 void init() override;
584 Unit *clone() const override;
585
587 Time();
588
589protected:
590 double factorTo;
591 double factorFrom;
592};
593
594//=================================================================================================
596class MANTID_KERNEL_DLL Degrees : public Empty {
597public:
598 Degrees();
599 const std::string unitID() const override;
600 const std::string caption() const override { return "Scattering angle"; }
601 const UnitLabel label() const override;
602
603 Unit *clone() const override;
604
605 double singleToTOF(const double x) const override;
606 double singleFromTOF(const double tof) const override;
607
608private:
610};
611
612//=================================================================================================
614class MANTID_KERNEL_DLL Phi : public Degrees {
615 const std::string unitID() const override;
616 const std::string caption() const override { return "Phi"; }
617 Unit *clone() const override { return new Phi(*this); }
618};
619
620//=================================================================================================
622class MANTID_KERNEL_DLL Temperature : public Empty {
623public:
624 Temperature();
625 const std::string unitID() const override;
626 const std::string caption() const override { return "Temperature"; }
627 const UnitLabel label() const override;
628
629 Unit *clone() const override;
630
631 double singleToTOF(const double x) const override;
632 double singleFromTOF(const double tof) const override;
633
634private:
636};
637
638//=================================================================================================
640class MANTID_KERNEL_DLL AtomicDistance : public Empty {
641public:
643 const std::string unitID() const override;
644 const std::string caption() const override { return "Atomic Distance"; }
645 const UnitLabel label() const override;
646
647 Unit *clone() const override;
648
649 double singleToTOF(const double x) const override;
650 double singleFromTOF(const double tof) const override;
651
652private:
654};
655
656//=================================================================================================
657
658MANTID_KERNEL_DLL double timeConversionValue(const std::string &input_unit, const std::string &output_unit);
659
660template <typename T>
661void timeConversionVector(std::vector<T> &vec, const std::string &input_unit, const std::string &output_unit) {
662 double factor = timeConversionValue(std::move(input_unit), std::move(output_unit));
663 if (factor != 1.0)
664 std::transform(vec.begin(), vec.end(), vec.begin(), [factor](T x) -> T { return x * static_cast<T>(factor); });
665}
666
667} // namespace Units
668
669} // namespace Kernel
670} // namespace Mantid
std::vector< T > const * vec
A base-class for the a class that is able to return unit labels in different representations.
Definition UnitLabel.h:20
The base units (abstract) class.
Definition Unit.h:41
virtual Unit * clone() const =0
const UnitParametersMap * m_params
additional parameters l2 :: distance from sample to detector (in metres) twoTheta :: scattering angle...
Definition Unit.h:177
virtual void init()=0
Finalize the initialization.
virtual ~Unit()=default
Virtual destructor.
virtual const UnitLabel label() const =0
A label for the unit to be printed on axes,.
virtual double conversionTOFMin() const =0
some units can be converted from TOF only in the range of TOF ; This function returns minimal TOF val...
virtual double conversionTOFMax() const =0
This function returns maximal TOF value still reversibly convertible into the unit.
virtual double singleToTOF(const double x) const =0
Convert a single X value to TOF.
virtual bool isConvertible() const
Returns if the unit can be used in conversions.
Definition Unit.h:68
bool initialized
The unit values have been initialized.
Definition Unit.h:166
virtual const std::string caption() const =0
The full name of the unit.
tbb::concurrent_unordered_map< std::string, UnitConversions > ConversionsMap
The possible 'quick conversions' are held in a map with the starting unit as the key.
Definition Unit.h:188
virtual const std::string unitID() const =0
The name of the unit.
std::pair< double, double > ConstantAndPower
A 'quick conversion' requires the constant by which to multiply the input and the power to which to r...
Definition Unit.h:182
virtual double singleFromTOF(const double tof) const =0
Convert a single tof value to this unit.
tbb::concurrent_unordered_map< std::string, ConstantAndPower > UnitConversions
Lists, for a given starting unit, the units to which a 'quick conversion' can be made.
Definition Unit.h:185
double l1
l1 :: The source-sample distance (in metres)
Definition Unit.h:168
static ConversionsMap s_conversionFactors
The table of possible 'quick conversions'.
Definition Unit.h:190
int emode
emode :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry)
Definition Unit.h:171
bool isInitialized() const
Definition Unit.h:141
Atomic Distance in Angstroms.
Definition Unit.h:640
const std::string caption() const override
The full name of the unit.
Definition Unit.h:644
const std::string unitID() const override
"AtomicDistance"
Degrees that has degrees as unit and "Scattering angle" as title.
Definition Unit.h:596
const std::string unitID() const override
The name of the unit.
const std::string caption() const override
< Degrees
Definition Unit.h:600
Energy transfer in units of frequency (MHz)
Definition Unit.h:487
const std::string unitID() const override
"DeltaE_inFrequency"
Energy transfer in units of wavenumber (cm^-1)
Definition Unit.h:474
const std::string unitID() const override
"DeltaE_inWavenumber"
Energy transfer in milli-electronvolts.
Definition Unit.h:445
const std::string unitID() const override
"DeltaE"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:448
double factorFrom
Constant factor for from conversion.
Definition Unit.h:466
double factorTo
Constant factor for to conversion.
Definition Unit.h:465
double t_otherFrom
Energy mode dependent factor in from conversion.
Definition Unit.h:468
double unitScaling
Apply unit scaling to energy value.
Definition Unit.h:469
double t_other
Energy mode dependent factor in to conversion.
Definition Unit.h:467
const std::string caption() const override
The full name of the unit.
Definition Unit.h:210
Empty()
Constructor.
Definition Unit.h:223
const std::string unitID() const override
"Empty"
bool isConvertible() const override
Returns if the unit can be used in conversions.
Definition Unit.h:213
Absolute energy in units of wavenumber (cm^-1)
Definition Unit.h:321
const std::string unitID() const override
"Energy_inWavenumber"
double factorFrom
Constant factor for from conversion.
Definition Unit.h:340
const std::string caption() const override
The full name of the unit.
Definition Unit.h:324
double factorTo
Constant factor for to conversion.
Definition Unit.h:339
Energy in milli-electronvolts.
Definition Unit.h:296
const std::string unitID() const override
"Energy"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:299
double factorTo
Constant factor for to conversion.
Definition Unit.h:315
double factorFrom
Constant factor for from conversion.
Definition Unit.h:316
const std::string caption() const override
The full name of the unit.
Definition Unit.h:231
UnitLabel m_label
Label.
Definition Unit.h:243
std::string m_caption
Caption.
Definition Unit.h:241
const std::string unitID() const override
"Label"
Momentum Transfer in Angstrom^-1.
Definition Unit.h:405
const std::string unitID() const override
"MomentumTransfer"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:408
Momentum in Angstrom^-1.
Definition Unit.h:500
double sfpTo
Extra correction factor in to conversion.
Definition Unit.h:519
const std::string unitID() const override
"Momentum"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:503
double sfpFrom
Extra correction factor in from conversion.
Definition Unit.h:521
bool do_sfpFrom
Apply the sfpFrom value.
Definition Unit.h:523
double factorTo
Constant factor for to conversion.
Definition Unit.h:520
double factorFrom
Constant factor for from conversion.
Definition Unit.h:522
Phi that has degrees as unit and "Phi" as title.
Definition Unit.h:614
const std::string caption() const override
< Degrees
Definition Unit.h:616
Unit * clone() const override
Definition Unit.h:617
const std::string unitID() const override
The name of the unit.
Momentum transfer squared in Angstrom^-2.
Definition Unit.h:427
const std::string unitID() const override
"QSquared"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:430
SpinEchoLength in nm.
Definition Unit.h:528
const std::string unitID() const override
"SpinEchoLength"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:531
SpinEchoTime in ns.
Definition Unit.h:550
const std::string unitID() const override
"SpinEchoTime"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:553
Time of flight in microseconds.
Definition Unit.h:248
const std::string caption() const override
The full name of the unit.
Definition Unit.h:251
const std::string unitID() const override
"TOF"
Temperature in kelvin.
Definition Unit.h:622
const std::string unitID() const override
"Temperature"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:626
Time In Second.
Definition Unit.h:572
double factorFrom
Constant factor for from conversion.
Definition Unit.h:591
const std::string caption() const override
The full name of the unit.
Definition Unit.h:575
const std::string unitID() const override
"Time"
bool isConvertible() const override
Returns if the unit can be used in conversions.
Definition Unit.h:578
double factorTo
Constant factor for to conversion.
Definition Unit.h:590
Wavelength in Angstrom.
Definition Unit.h:267
const std::string caption() const override
The full name of the unit.
Definition Unit.h:270
const std::string unitID() const override
"Wavelength"
bool do_sfpFrom
Apply the sfpFrom value.
Definition Unit.h:291
double sfpFrom
Extra correction factor in from conversion.
Definition Unit.h:289
double factorTo
Constant factor for to conversion.
Definition Unit.h:288
double sfpTo
Extra correction factor in to conversion.
Definition Unit.h:287
double factorFrom
Constant factor for from conversion.
Definition Unit.h:290
d-SpacingPerpendicular in Angstrom
Definition Unit.h:378
const std::string caption() const override
The full name of the unit.
Definition Unit.h:381
double sfpFrom
Extra correction factor in to conversion.
Definition Unit.h:400
double factorFrom
Constant factor for from conversion.
Definition Unit.h:399
double factorTo
Constant factor for to conversion.
Definition Unit.h:397
const std::string unitID() const override
"dSpacingPerpendicular"
double sfpTo
Extra correction factor in to conversion.
Definition Unit.h:398
d-Spacing in Angstrom
Definition Unit.h:351
const std::string unitID() const override
"dSpacing"
const std::string caption() const override
The full name of the unit.
Definition Unit.h:354
void timeConversionVector(std::vector< T > &vec, const std::string &input_unit, const std::string &output_unit)
Definition Unit.h:661
MANTID_KERNEL_DLL double calculateDIFCCorrection(const double l1, const double l2, const double twotheta, const double offset, const double binWidth)
Calculate DIFC in case of logarithmic binning, used in CalculateDIFC with Signed mode.
Definition Unit.cpp:565
MANTID_KERNEL_DLL double tofToDSpacingFactor(const double l1, const double l2, const double twoTheta, const double offset)
Calculate and return conversion factor from tof to d-spacing.
Definition Unit.cpp:589
MANTID_KERNEL_DLL double timeConversionValue(const std::string &input_unit, const std::string &output_unit)
Definition Unit.cpp:1430
std::unordered_map< UnitParams, double > UnitParametersMap
Definition Unit.h:30
std::shared_ptr< const Unit > Unit_const_sptr
Shared pointer to the Unit base class (const version)
Definition Unit.h:196
std::shared_ptr< Unit > Unit_sptr
Shared pointer to the Unit base class.
Definition Unit.h:194
Helper class which provides the Collimation Length for SANS instruments.
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
constexpr bool operator!=(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)