herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Analysis
MultiplicityInfo.h
1
// -*- C++ -*-
2
//
3
// MultiplicityInfo.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4
// Copyright (C) 2002-2019 The Herwig Collaboration
5
//
6
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respe
8
#include "Herwig/Utilities/Statistic.h"
9
10
namespace
Herwig
{
11
using namespace
ThePEG
;
12
16
enum
ParticleSpecies
{
17
lightMeson=0,strangeMeson,lightBaryon,other
18
};
19
23
struct
MultiplicityInfo
{
24
31
MultiplicityInfo
(
double
mult=0.,
double
error=0.,
32
ParticleSpecies
type
=other)
33
:
obsMultiplicity
(mult),
obsError
(error),
type
(
type
) {};
34
38
double
obsMultiplicity
;
39
43
double
obsError
;
44
48
ParticleSpecies
type
;
49
53
Statistic
count
;
54
58
double
simMultiplicity
() {
return
count
.
mean
();}
59
63
double
simError
() {
return
count
.
mean_stdDev
();}
64
68
double
nSigma
() {
69
return
obsMultiplicity
== 0.0 ? 0.0 :
70
(
simMultiplicity
() -
obsMultiplicity
)
71
/
sqrt
(
sqr
(
simError
()) +
sqr
(
obsError
));
72
}
73
77
string
bargraph
() {
78
if
(
obsMultiplicity
== 0.0)
return
" ? "
;
79
else
if
(
nSigma
() >= 6.0)
return
"-----|---->"
;
80
else
if
(
nSigma
() >= 5.0)
return
"-----|----*"
;
81
else
if
(
nSigma
() >= 4.0)
return
"-----|---*-"
;
82
else
if
(
nSigma
() >= 3.0)
return
"-----|--*--"
;
83
else
if
(
nSigma
() >= 2.0)
return
"-----|-*---"
;
84
else
if
(
nSigma
() >= 1.0)
return
"-----|*----"
;
85
else
if
(
nSigma
() > -1.0)
return
"-----*-----"
;
86
else
if
(
nSigma
() > -2.0)
return
"----*|-----"
;
87
else
if
(
nSigma
() > -3.0)
return
"---*-|-----"
;
88
else
if
(
nSigma
() > -4.0)
return
"--*--|-----"
;
89
else
if
(
nSigma
() > -5.0)
return
"-*---|-----"
;
90
else
if
(
nSigma
() > -6.0)
return
"*----|-----"
;
91
else
return
"<----|-----"
;
92
}
93
};
94
}
Herwig::Statistic
The Statistic class is a simple class designed to store a variable for statistical analysis.
Definition:
Statistic.h:23
Herwig::Statistic::mean_stdDev
double mean_stdDev() const
Error on the mean estimate.
Definition:
Statistic.h:75
Herwig::Statistic::mean
double mean() const
Mean.
Definition:
Statistic.h:63
Herwig::ParticleSpecies
ParticleSpecies
Enumeration for species of particle.
Definition:
MultiplicityInfo.h:16
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::sqrt
double sqrt(int x)
ThePEG::sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
Herwig::MultiplicityInfo
Struct for the multiplcity data.
Definition:
MultiplicityInfo.h:23
Herwig::MultiplicityInfo::bargraph
string bargraph()
Plot standard error in a simple barchart.
Definition:
MultiplicityInfo.h:77
Herwig::MultiplicityInfo::simError
double simError()
The error on the average number per event.
Definition:
MultiplicityInfo.h:63
Herwig::MultiplicityInfo::obsMultiplicity
double obsMultiplicity
The observed multiplicity.
Definition:
MultiplicityInfo.h:38
Herwig::MultiplicityInfo::count
Statistic count
Simulation statistics for particles of this type.
Definition:
MultiplicityInfo.h:53
Herwig::MultiplicityInfo::nSigma
double nSigma()
Is the result more than from the experimental result.
Definition:
MultiplicityInfo.h:68
Herwig::MultiplicityInfo::simMultiplicity
double simMultiplicity()
The average number per event.
Definition:
MultiplicityInfo.h:58
Herwig::MultiplicityInfo::MultiplicityInfo
MultiplicityInfo(double mult=0., double error=0., ParticleSpecies type=other)
Default constructor.
Definition:
MultiplicityInfo.h:31
Herwig::MultiplicityInfo::obsError
double obsError
The error on the observed multiplicity.
Definition:
MultiplicityInfo.h:43
Herwig::MultiplicityInfo::type
ParticleSpecies type
The type of particle.
Definition:
MultiplicityInfo.h:48
Generated on Thu Jun 20 2024 17:50:52 for Herwig by
1.9.6