-
Notifications
You must be signed in to change notification settings - Fork 0
/
Histogram.h
38 lines (35 loc) · 860 Bytes
/
Histogram.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <iostream>
#include <vector>
using namespace std;
class Histogram
{
public:
std::vector<double> binning;
std::vector<double> content;
std::vector<double> statistics;
std::vector<double> systematics;
std::vector<string> notes;
string name = "noname";
// Default constructor
Histogram();
// Parameterized constructor
Histogram(std::vector<double>, std::vector<double>, std::vector<double>, std::vector<double> = {});
// Copy constructor
Histogram(const Histogram&);
// Destructor
~Histogram();
// get histogram size
int size();
// compare eachbin
double binneddiff(Histogram);
// merge histogram
void add(Histogram, string = "none");
// retrun difference between bins
std::vector<double> subtraction(Histogram);
// return total number of event
double sum();
// print everything
void print();
string json();
};