StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtRoot1DCF.hh
1 /***************************************************************************
2  *
3  *
4  *
5  * Author: Laurent Conin, Fabrice Retiere, Subatech, France
6  ***************************************************************************
7  *
8  * Description : pure virtual class to manage specific Root part of 1D
9  * CorrFctn. to write one new Corr Fctn, user shoud write a class which
10  * inherit from StHbtRoot1DCD. then he just have
11  * to write AddRealPair and AddMixedPair.
12  * if user want to write a ThCorrFctn, class shoul ineherit virtually from
13  * both StHbtThCorrFctn and StHbtRoot1DCF
14  *
15  ***************************************************************************
16  *
17  *
18  *
19  ***************************************************************************/
20 #ifndef StHbtRoot1DCF_hh
21 #define StHbtRoot1DCF_hh
22 
23 #include "StHbtMaker/Base/StHbtCorrFctn.hh"
24 #include "StHbtMaker/Infrastructure/StHbtNamed.hh"
25 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
26 
27 class StHbtRoot1DCF : public virtual StHbtCorrFctn, public virtual StHbtNamed{
28 
29 public:
30 // --- Constructor
31 
32  StHbtRoot1DCF(char* aTitle, int aNBins,
33  double aHLo, double aHHi);
35 
36  virtual ~StHbtRoot1DCF();
37 
38  virtual void Finish();
39  virtual StHbtString Report();
40 
41  virtual void SetName( const char* aName);
42 
43  virtual StHbt1DHisto* Numerator() const ;
44  virtual StHbt1DHisto* Denominator() const ;
45  virtual StHbt1DHisto* Ratio() const ;
46  virtual void Write() ;
47 
48 
49 protected:
50 
51  StHbtRoot1DCF() : StHbtCorrFctn(),StHbtNamed(),mHLo(0),mHHi(0),mNumerator(0),mDenominator(0),mRatio(0){ };
52 
53  double mHLo;
54  double mHHi;
55 
56  StHbt1DHisto* mNumerator;
57  StHbt1DHisto* mDenominator;
58  StHbt1DHisto* mRatio;
59 
60 #ifdef __ROOT__
61 ClassDef(StHbtRoot1DCF,1)
62 #endif
63 };
64 
65 inline StHbt1DHisto* StHbtRoot1DCF::Numerator() const { cout << "Return Ratio" << endl; return mNumerator;};
66 inline StHbt1DHisto* StHbtRoot1DCF::Denominator() const {cout << "Return Denimnatior" << endl; return mDenominator;};
67 inline StHbt1DHisto* StHbtRoot1DCF::Ratio() const {cout << "Return Numerator" << endl; return mRatio;};
68 inline void StHbtRoot1DCF::Write() {mNumerator->Write();mDenominator->Write();mRatio->Write();};
69 
70 
71 #endif