]>
Commit | Line | Data |
---|---|---|
2a445445 | 1 | // |
2 | // Class AliRsnHistoDef | |
3 | // | |
4 | // Definition for a histogram type. | |
5 | // Since one could do an analysis which is not an invariant mass | |
6 | // the histogram definition should be more flexible, and it is stored | |
7 | // separately in a new class. | |
8 | // This class considers the possibility of a 1D or 2D histograms | |
9 | // with its related binning, and can create a new histo from his definitions | |
10 | // | |
11 | ||
13f28255 | 12 | #include <TObject.h> |
2a445445 | 13 | |
13f28255 | 14 | //#include "AliLog.h" |
2a445445 | 15 | #include "AliRsnHistoDef.h" |
16 | ||
17 | ClassImp(AliRsnHistoDef) | |
18 | ||
19 | //_____________________________________________________________________________ | |
20 | AliRsnHistoDef::AliRsnHistoDef() : | |
aec0ec32 | 21 | fNBins(0), |
22 | fMin(0.0), | |
23 | fMax(0.0) | |
2a445445 | 24 | { |
25 | // | |
26 | // Default constructor | |
27 | // | |
28 | } | |
29 | ||
30 | //_____________________________________________________________________________ | |
31 | AliRsnHistoDef::AliRsnHistoDef | |
32 | (Int_t nbins, Double_t min, Double_t max) : | |
aec0ec32 | 33 | fNBins(0), |
34 | fMin(0.0), | |
35 | fMax(0.0) | |
2a445445 | 36 | { |
37 | // | |
38 | // 1D histo definition. | |
39 | // | |
2a445445 | 40 | SetBins(nbins, min, max); |
41 | } | |
2a445445 | 42 | |
43 | //_____________________________________________________________________________ | |
44 | void AliRsnHistoDef::SetBins(Int_t n, Double_t min, Double_t max) | |
45 | { | |
46 | // | |
aec0ec32 | 47 | // Binning for histogram. |
2a445445 | 48 | // |
aec0ec32 | 49 | fNBins = n; |
2a445445 | 50 | |
13f28255 | 51 | if (min < max) { |
52 | fMin = min; | |
53 | fMax = max; | |
54 | } | |
55 | else { | |
56 | fMin = max; | |
57 | fMax = min; | |
2a445445 | 58 | } |
2a445445 | 59 | } |