]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnHistoDef.cxx
Corrections, bug fixes and a class name change
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnHistoDef.cxx
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
12 #include <TObject.h>
13
14 //#include "AliLog.h"
15 #include "AliRsnHistoDef.h"
16
17 ClassImp(AliRsnHistoDef)
18
19 //_____________________________________________________________________________
20 AliRsnHistoDef::AliRsnHistoDef() :
21     fNBins(0),
22     fMin(0.0),
23     fMax(0.0)
24 {
25 //
26 // Default constructor
27 //
28 }
29
30 //_____________________________________________________________________________
31 AliRsnHistoDef::AliRsnHistoDef
32 (Int_t nbins, Double_t min, Double_t max) :
33     fNBins(0),
34     fMin(0.0),
35     fMax(0.0)
36 {
37 //
38 // 1D histo definition.
39 //
40   SetBins(nbins, min, max);
41 }
42
43 //_____________________________________________________________________________
44 void AliRsnHistoDef::SetBins(Int_t n, Double_t min, Double_t max)
45 {
46 //
47 // Binning for histogram.
48 //
49   fNBins = n;
50
51   if (min < max)
52   {
53     fMin = min;
54     fMax = max;
55   }
56   else
57   {
58     fMin = max;
59     fMax = min;
60   }
61 }