File indexing completed on 2026-08-06 09:24:27
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef MYSTATISTICS_CrossSections_hpp_included
0009 #define MYSTATISTICS_CrossSections_hpp_included
0010
0011 #include "Distribution.h"
0012
0013 namespace Statistics {
0014
0015
0016
0017
0018
0019 class CrossSections {
0020
0021 public:
0022
0023
0024
0025
0026 CrossSections();
0027
0028
0029
0030
0031 explicit CrossSections(const std::string& newName);
0032
0033
0034
0035
0036 virtual ~CrossSections();
0037
0038 public:
0039
0040
0041
0042
0043 Distribution& addDistribution(const Distribution&);
0044
0045
0046
0047
0048 Distribution& distribution(const std::string& histoName);
0049
0050
0051
0052
0053 const Distribution& distribution(const std::string& histoName) const;
0054
0055
0056
0057
0058 const std::map<std::string,Distribution>& distributions() const { return theDistributions; }
0059
0060
0061
0062
0063 const std::string& name() const { return theName; }
0064
0065
0066
0067
0068 void name(const std::string& newName) { theName = newName; }
0069
0070
0071
0072
0073 double integral() const { return theIntegral; }
0074
0075
0076
0077
0078 double varianceOfIntegral() const { return theVarianceOfIntegral; }
0079
0080 public:
0081
0082
0083
0084
0085 CrossSections& operator+=(const CrossSections& other);
0086
0087 public:
0088
0089
0090
0091
0092 void fromXML(const XML::Element&);
0093
0094
0095
0096
0097 XML::Element toXML() const;
0098
0099 private:
0100
0101
0102
0103
0104 std::string theName;
0105
0106
0107
0108
0109 double theIntegral;
0110
0111
0112
0113
0114 double theVarianceOfIntegral;
0115
0116
0117
0118
0119 std::map<std::string,Distribution> theDistributions;
0120
0121
0122 };
0123
0124 }
0125
0126 #endif