a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
RunningConstantError.hpp
Go to the documentation of this file.
1/*
2 * RunningConstantError.hpp
3 *
4 * Created on: Apr 1, 2012 (really!)
5 * Author: Ben O'Leary (benjamin.oleary@gmail.com)
6 * Copyright 2012 Ben O'Leary
7 *
8 * This file is part of LesHouchesParserClasses, released under the
9 * GNU General Public License. Please see the accompanying
10 * README.LHPC_CPP.txt file for a full list of files, brief documentation
11 * on how to use these classes, and further details on the license.
12 */
13
14#ifndef RUNNINGCONSTANTERROR_HPP_
15#define RUNNINGCONSTANTERROR_HPP_
16
17#include <string>
19
20namespace LHPC
21{
22 // this is a class to hold the information about the mass of a particle in
23 // the FLHA format.
25 {
26 public:
28 RunningConstantError( RunningConstantError const& copySource );
30
31 double
32 getMinusUncertainty() const;
33 double
34 getPlusUncertainty() const;
35 int
36 getScheme() const;
37 double
38 getScale() const;
39 void
40 setValues( double const minusUncertainty,
41 double const plusUncertainty,
42 int const schemeType,
43 double const evaluationScale );
44 void
45 setFromString( std::string const& valuesString );
46 std::string
47 getAsString() const;
48
49
50 protected:
55 };
56
57
58
59
60
61 inline double
63 {
64 return minusUncertainty;
65 }
66
67 inline double
69 {
70 return plusUncertainty;
71 }
72
73 inline int
75 {
76 return schemeType;
77 }
78
79 inline double
81 {
82 return evaluationScale;
83 }
84
85 inline void
86 RunningConstantError::setValues( double const minusUncertainty,
87 double const plusUncertainty,
88 int const schemeType,
89 double const evaluationScale )
90 {
91 this->minusUncertainty = minusUncertainty;
92 this->plusUncertainty = plusUncertainty;
93 this->schemeType = schemeType;
94 this->evaluationScale = evaluationScale;
95 }
96
97 inline void
98 RunningConstantError::setFromString( std::string const& valuesString )
99 {
100 std::string firstRemainder;
101 std::string secondRemainder;
104 valuesString,
105 &firstRemainder,
109 firstRemainder,
110 &secondRemainder,
114 secondRemainder,
115 &firstRemainder,
118 }
119
120 inline std::string
122 {
123 std::string
125 9,
126 3 ) );
127 returnString.append( " " );
129 9,
130 3 ) );
131 returnString.append( " " );
132 returnString.append( BOL::StringParser::intToString( schemeType,
133 2,
134 "",
135 "-",
136 ' ' ) );
137 returnString.append( " " );
139 9,
140 3 ) );
141 return returnString;
142 }
143
144}
145
146#endif /* RUNNINGCONSTANTERROR_HPP_ */
static std::string firstWordOf(std::string const &stringToParse, std::string *const remainderString=NULL, std::string const &separatorChars=whitespaceChars)
static std::string const whitespaceAndNewlineChars
static double stringToDouble(std::string const &stringToInterpret)
static std::string intToString(int inputInt, int const minimumNumberOfDigits, std::string const prefixForPositiveNumbers="+", std::string const prefixForNegativeNumbers="-", char const paddingChar='0')
static std::string doubleToString(double inputDouble, int const numberOfMantissaDigits, int const numberOfExponentDigits, std::string const prefixForPositiveNumbers="+", std::string const prefixForNegativeNumbers="-", std::string const positiveExponentPrefix="+", std::string const negativeExponentPrefix="-", std::string const exponentCharacter="E")
static int stringToInt(std::string const &stringToInterpret)
void setValues(double const minusUncertainty, double const plusUncertainty, int const schemeType, double const evaluationScale)
void setFromString(std::string const &valuesString)