File indexing completed on 2026-08-06 09:24:23
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef Herwig_Remapper_H
0010 #define Herwig_Remapper_H
0011
0012
0013
0014
0015 #include <iostream>
0016 #include <map>
0017 #include "Herwig/Utilities/XML/Element.h"
0018
0019 namespace Herwig {
0020
0021
0022
0023
0024
0025
0026
0027 struct Remapper {
0028
0029 std::map<double,double> weights;
0030
0031 struct SelectorEntry {
0032
0033 double lower;
0034 double upper;
0035 double value;
0036
0037 };
0038
0039 std::map<double,SelectorEntry> selector;
0040
0041 double minSelection;
0042
0043 bool smooth;
0044
0045 Remapper();
0046
0047 Remapper(unsigned int nBins,
0048 double nMinSelection,
0049 bool nSmooth);
0050
0051 void fill(double x, double w);
0052
0053 void finalize();
0054
0055 std::pair<double,double> generate(double r) const;
0056
0057 void fromXML(const XML::Element& elem);
0058
0059 XML::Element toXML() const;
0060
0061 void test(size_t n, std::ostream&);
0062
0063 };
0064
0065 }
0066
0067 #endif
0068