StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dProjector.h
1 /***************************************************************************
2  *
3  * Author: Dominik Flierl, flierl@bnl.gov
4  ***************************************************************************
5  *
6  * Description: part of STAR HBT Framework: StHbtMaker package
7  * this is an object which produces projections of 3d histograms
8  *
9  **************************************************************************/
10 
11 #ifndef dProjector_hh
12 #define dProjector_hh
13 
14 #include "dFitter3d.h"
15 #include "TString.h"
16 #include "TH1.h"
17 #include "TH2.h"
18 #include "TH3.h"
19 #include "Stiostream.h"
20 
21 class dProjector
22 {
23  public :
25  // constructors
27  dProjector(dFitter3d* mFitter) ;
28  virtual ~dProjector() ;
29 
31  // do project
33  TH1D* get1dProjection(TString axis, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) ;
34  TH2D* get2dProjection(TString axis, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) ;
35 
37  // setters & getters
39 
40  // set/get 3d histos
41  void setNumerator(TH3D* numerator) { mNumerator = numerator ; } ;
42  void setDenominator(TH3D* denominator) { mDenominator = denominator ; } ;
43  void setRatio(TH3D* ratio) { mRatio = ratio ; } ;
44  TH3D* getNumerator() { return mNumerator ; } ;
45  TH3D* getDenominator() { return mDenominator ; } ;
46  TH3D* getRatio() { return mRatio ; } ;
47 
48  // set/get norm
49  void setNorm(double norm) { mNorm = norm ; } ;
50  double getNorm() { return mNorm ; } ;
51 
52  // set/get thresholds
53  void setThresholdNumerator(double thresN) { mThresholdNumerator = thresN ; } ;
54  void setThresholdDenominator(double thresD) { mThresholdDenominator = thresD ; } ;
55  double getThresholdNumerator() { return mThresholdNumerator ; } ;
56  double getThresholdDenominator() { return mThresholdDenominator ; } ;
57 
58  // set limits for the ratio
59  void setRatioMin(double min) { mRatioMin = min ; } ;
60  void setRatioMax(double max) { mRatioMax = max ; } ;
61 
62  // return histos
63  TH1D* get1dFit() { return m1dfit ; } ;
64  TH1D* get1dNorm() { return m1dnor ; } ;
65  TH2D* get2dFit() { return m2dfit ; } ;
66  TH2D* get2dNorm() { return m2dnor ; } ;
67 
68 
69  private :
70 
71  // the histos
72  // 3d authentic
73  TH3D* mNumerator ;
74  TH3D* mDenominator ;
75  TH3D* mRatio ;
76 
77  // projections
78  TH1D* m1dpro ;
79  TH1D* m1dfit ;
80  TH1D* m1dnor ;
81  TH2D* m2dpro ;
82  TH2D* m2dfit ;
83  TH2D* m2dnor ;
84  // fit parameters
85  double* mFitParameters;
86  dFitter3d* mFitter;
87 
88  // thresholds
89  double mNorm ;
90  double mThresholdNumerator ;
91  double mThresholdDenominator ;
92  double mRatioMin ;
93  double mRatioMax ;
94 
95 #ifdef __ROOT__
96  ClassDef(dProjector, 0)
97 #endif
98 
99 };
100 
101 #endif