herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
CrossSections.h
1// -*- C++ -*-
2//
3// CrossSections.hpp is a part of myStatistics
4// Copyright (C) 2012-2019 Simon Platzer, The Herwig Collaboration
5//
6// myStatistics is licenced under version 3 of the GPL, see COPYING for details.
7//
8#ifndef MYSTATISTICS_CrossSections_hpp_included
9#define MYSTATISTICS_CrossSections_hpp_included
10
11#include "Distribution.h"
12
13namespace Statistics {
14
20
21 public:
22
27
31 explicit CrossSections(const std::string& newName);
32
36 virtual ~CrossSections();
37
38 public:
39
44
48 Distribution& distribution(const std::string& histoName);
49
53 const Distribution& distribution(const std::string& histoName) const;
54
58 const std::map<std::string,Distribution>& distributions() const { return theDistributions; }
59
63 const std::string& name() const { return theName; }
64
68 void name(const std::string& newName) { theName = newName; }
69
73 double integral() const { return theIntegral; }
74
78 double varianceOfIntegral() const { return theVarianceOfIntegral; }
79
80 public:
81
86
87 public:
88
92 void fromXML(const XML::Element&);
93
98
99 private:
100
104 std::string theName;
105
110
115
119 std::map<std::string,Distribution> theDistributions;
120
121
122 };
123
124}
125
126#endif // MYSTATISTICS_CrossSections_hpp_included
A simulation run.
Definition: CrossSections.h:19
const std::string & name() const
Return the name of the run.
Definition: CrossSections.h:63
const std::map< std::string, Distribution > & distributions() const
Return the distributions.
Definition: CrossSections.h:58
double theVarianceOfIntegral
The variance of the integral.
std::string theName
The name of the run.
void name(const std::string &newName)
Set the name of the run.
Definition: CrossSections.h:68
CrossSections & operator+=(const CrossSections &other)
Add.
double theIntegral
The integral.
void fromXML(const XML::Element &)
Fill run data from an XML element.
Distribution & addDistribution(const Distribution &)
Add a distribution.
double integral() const
The integral.
Definition: CrossSections.h:73
CrossSections()
Default constructor.
double varianceOfIntegral() const
The variance of the integral.
Definition: CrossSections.h:78
CrossSections(const std::string &newName)
Construct giving a name and seed.
Distribution & distribution(const std::string &histoName)
Return a given distribution.
virtual ~CrossSections()
Destructor.
const Distribution & distribution(const std::string &histoName) const
Return a given distribution.
XML::Element toXML() const
Return an XML element for the data of this run.
std::map< std::string, Distribution > theDistributions
The distributions.
A (one dimensional) distribution.
Definition: Distribution.h:21
Element represents a (tree of) XML elements.
Definition: Element.h:56