forked from GooFit/GooFit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Variable.hh
50 lines (40 loc) · 1.24 KB
/
Variable.hh
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
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef VARIABLE_HH
#define VARIABLE_HH
#include <string>
#include <map>
#include <iostream>
#include <cassert>
#include "GlobalCudaDefines.hh"
struct Indexable {
Indexable (std::string n, fptype val = 0) : name(n), value(val), index(-1) {}
int getIndex () const {return index;}
std::string name;
fptype value;
int index;
};
struct Variable : Indexable {
// Contains information about a parameter allowed
// to vary in MINUIT, or an observable passed to a
// data set. The index can refer either to cudaArray
// or to an event.
Variable (std::string n);
Variable (std::string n, fptype val);
Variable (std::string n, fptype dn, fptype up);
Variable (std::string n, fptype v, fptype dn, fptype up);
Variable (std::string n, fptype v, fptype e, fptype dn, fptype up);
~Variable ();
fptype error, error_pos, error_neg, gcc;
fptype upperlimit;
fptype lowerlimit;
int numbins;
bool fixed, dominos;
fptype blind;
};
struct Constant : Indexable {
// This is similar to Variable, but the index points
// to functorConstants instead of cudaArray.
Constant (std::string n, fptype val) : Indexable(n, val) {}
~Constant () {}
};
std::ostream& operator<<(std::ostream &oss, const Variable &var);
#endif