MathUtils.hh 34 isZero(NUM val, double=1e-5) { //< NB. unused tolerance parameter for ints, still needs a default value!
71 fuzzyEquals(N1 a, N2 b, double) { //< NB. unused tolerance parameter for ints, still needs a default value!
132 std::is_arithmetic<N1>::value && std::is_arithmetic<N2>::value && std::is_arithmetic<N3>::value, bool>::type
152 std::is_arithmetic<N1>::value && std::is_arithmetic<N2>::value && std::is_arithmetic<N3>::value, bool>::type
169 std::is_arithmetic<N1>::value && std::is_arithmetic<N2>::value && std::is_arithmetic<N3>::value, bool>::type
176 // Alternative forms, with snake_case names and boundary types in names rather than as args -- from MCUtils
183 std::is_arithmetic<N1>::value && std::is_arithmetic<N2>::value && std::is_arithmetic<N3>::value, bool>::type
193 std::is_arithmetic<N1>::value && std::is_arithmetic<N2>::value && std::is_arithmetic<N3>::value, bool>::type
203 std::is_arithmetic<N1>::value && std::is_arithmetic<N2>::value && std::is_arithmetic<N3>::value, bool>::type
326 inline vector<double> aspace(double step, double start, double end, bool include_end=true, double tol=1e-2) {
379 inline vector<double> bwspace(size_t nbins, double start, double end, double mu, double gamma) {
397 inline typename std::enable_if<std::is_arithmetic<NUM>::value && std::is_arithmetic<typename CONTAINER::value_type>::value, int>::type
415 inline typename std::enable_if<std::is_arithmetic<NUM1>::value && std::is_arithmetic<NUM2>::value, int>::type
429 inline typename std::enable_if<std::is_arithmetic<NUM>::value && std::is_arithmetic<typename CONTAINER::value_type>::value, int>::type
486 if (sample1.empty() || sample2.empty()) throw RangeError("Can't compute covariance of an empty set");
487 if (sample1.size() != sample2.size()) throw RangeError("Sizes of samples must be equal for covariance calculation");
505 if (sample1.empty() || sample2.empty()) throw RangeError("Can't compute covariance_err of an empty set");
506 if (sample1.size() != sample2.size()) throw RangeError("Sizes of samples must be equal for covariance_err calculation");
double p(const ParticleBase &p) Unbound function access to p. Definition: ParticleBaseUtils.hh:653 Definition: MC_Cent_pPb.hh:10 std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type intpow(NUM val, unsigned int exp) A more efficient version of pow for raising numbers to integer powers. Definition: MathUtils.hh:256 double deltaR(double rap1, double phi1, double rap2, double phi2) Definition: MathUtils.hh:659 double deltaPhi(double phi1, double phi2, bool sign=false) Calculate the difference between two angles in radians. Definition: MathUtils.hh:629 vector< double > aspace(double step, double start, double end, bool include_end=true, double tol=1e-2) Make a list of values equally spaced by step between start and end inclusive. Definition: MathUtils.hh:326 double deltaEta(double eta1, double eta2, bool sign=false) Definition: MathUtils.hh:637 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_range(N1 val, N2 low, N3 high) Boolean function to determine if value is within the given range. Definition: MathUtils.hh:184 vector< double > logspace(size_t nbins, double start, double end, bool include_end=true) Make a list of nbins + 1 values exponentially spaced between start and end inclusive. Definition: MathUtils.hh:350 std::enable_if< std::is_floating_point< NUM >::value, bool >::type notNaN(NUM val) Check if a number is non-NaN. Definition: MathUtils.hh:46 double mapAngle0To2Pi(double angle) Map an angle into the range [0, 2PI). Definition: MathUtils.hh:589 std::enable_if< std::is_arithmetic< NUM >::value, double >::type correlation_err(const vector< NUM > &sample1, const vector< NUM > &sample2) Definition: MathUtils.hh:540 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_closed_range(N1 val, N2 low, N3 high) Boolean function to determine if value is within the given range. Definition: MathUtils.hh:194 vector< double > bwspace(size_t nbins, double start, double end, double mu, double gamma) Make a list of nbins + 1 values spaced for equal area Breit-Wigner binning between start and end incl... Definition: MathUtils.hh:379 std::enable_if< std::is_arithmetic< NUM >::value, double >::type covariance_err(const vector< NUM > &sample1, const vector< NUM > &sample2) Definition: MathUtils.hh:504 double deltaR2(double rap1, double phi1, double rap2, double phi2) Definition: MathUtils.hh:652 std::enable_if< std::is_arithmetic< NUM >::value, double >::type mean_err(const vector< NUM > &sample) Definition: MathUtils.hh:471 std::enable_if< std::is_arithmetic< NUM >::value, double >::type covariance(const vector< NUM > &sample1, const vector< NUM > &sample2) Definition: MathUtils.hh:485 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typenamestd::common_type< N1, N2 >::type >::type max(N1 a, N2 b) Get the maximum of two numbers. Definition: MathUtils.hh:111 std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type add_quad(NUM a, NUM b) Named number-type addition in quadrature operation. Definition: MathUtils.hh:231 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type fuzzyInRange(N1 value, N2 low, N3 high, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN) Determine if value is in the range low to high, for floating point numbers. Definition: MathUtils.hh:153 std::enable_if< std::is_floating_point< NUM >::value, bool >::type isNaN(NUM val) Check if a number is NaN. Definition: MathUtils.hh:41 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typenamestd::common_type< N1, N2 >::type >::type min(N1 a, N2 b) Get the minimum of two numbers. Definition: MathUtils.hh:102 double mapAngleMPiToPi(double angle) Map an angle into the range (-PI, PI]. Definition: MathUtils.hh:579 std::enable_if< std::is_arithmetic< NUM1 >::value &&std::is_arithmetic< NUM2 >::value, int >::type binIndex(NUM1 val, std::initializer_list< NUM2 > binedges, bool allow_overflow=false) Return the bin index of the given value, val, given a vector of bin edges. Definition: MathUtils.hh:416 std::enable_if< std::is_arithmetic< NUM >::value, double >::type correlation(const vector< NUM > &sample1, const vector< NUM > &sample2) Definition: MathUtils.hh:527 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type inRange(N1 value, N2 low, N3 high, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN) Determine if value is in the range low to high, for floating point numbers. Definition: MathUtils.hh:133 std::enable_if< std::is_arithmetic< NUM >::value, double >::type mean(const vector< NUM > &sample) Definition: MathUtils.hh:458 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, bool >::type fuzzyLessEquals(N1 a, N2 b, double tolerance=1e-5) Compare two floating point numbers for <= with a degree of fuzziness. Definition: MathUtils.hh:93 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&(std::is_floating_point< N1 >::value||std::is_floating_point< N2 >::value), bool >::type fuzzyEquals(N1 a, N2 b, double tolerance=1e-5) Compare two numbers for equality with a degree of fuzziness. Definition: MathUtils.hh:57 double cdfBW(double x, double mu, double gamma) CDF for the Breit-Wigner distribution. Definition: MathUtils.hh:279 std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type median(const vector< NUM > &sample) Definition: MathUtils.hh:444 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_open_range(N1 val, N2 low, N3 high) Boolean function to determine if value is within the given range. Definition: MathUtils.hh:204 std::enable_if< std::is_arithmetic< NUM >::value, int >::type sign(NUM val) Find the sign of a number. Definition: MathUtils.hh:266 double mapAngle(double angle, PhiMapping mapping) Map an angle into the enum-specified range. Definition: MathUtils.hh:607 vector< double > linspace(size_t nbins, double start, double end, bool include_end=true) Make a list of nbins + 1 values equally spaced between start and end inclusive. Definition: MathUtils.hh:303 double mapAngle0ToPi(double angle) Map an angle into the range [0, PI]. Definition: MathUtils.hh:599 std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type sqr(NUM a) Named number-type squaring operation. Definition: MathUtils.hh:219 double invcdfBW(double p, double mu, double gamma) Inverse CDF for the Breit-Wigner distribution. Definition: MathUtils.hh:286 std::enable_if< std::is_floating_point< NUM >::value, bool >::type isZero(NUM val, double tolerance=1e-8) Compare a number to zero. Definition: MathUtils.hh:24 double angle(const Vector2 &a, const Vector2 &b) Angle (in radians) between two 2-vectors. Definition: Vector2.hh:177 std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, bool >::type fuzzyGtrEquals(N1 a, N2 b, double tolerance=1e-5) Compare two numbers for >= with a degree of fuzziness. Definition: MathUtils.hh:82 double rapidity(double E, double pz) Calculate a rapidity value from the supplied energy E and longitudinal momentum pz. Definition: MathUtils.hh:664 Error specialisation for where the problem is between the chair and the computer. Definition: Exceptions.hh:55 Generated on Fri May 13 2022 23:02:06 for Rivet by |