-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathD1.h
More file actions
39 lines (29 loc) · 700 Bytes
/
D1.h
File metadata and controls
39 lines (29 loc) · 700 Bytes
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
#ifndef D1_H
#define D1_H
#include <vector>
#include <TObject.h>
namespace PLASMA {
class D1; // 1 dimensional distribution
const Int_t Nmax = 1000; // maximal number of grids in one direction
}
class PLASMA::D1 : public TObject
{
protected:
std::vector<Double_t> vec;
public:
D1(Int_t size=2*Nmax+1);
virtual ~D1() {};
Int_t N() { return (vec.size()-1)/2; }
void SetN(Int_t n=1000) { vec.resize(2*n+1); }
/**
* Get slope around i.
*/
Double_t Slope(Int_t i);
/**
* Get the i-th value;
*/
Double_t& At(Int_t i);
Double_t& operator[](Int_t i) { return At(i); }
ClassDef(D1,1);
};
#endif