PolarHist.h
Go to the documentation of this file.
1 #ifndef PolarHist_H
2 #define PolarHist_H
3 #include <string>
4 #include <TH2F.h>
5 #include <TMath.h>
6 #include <vector>
7 #include <TGraph.h>
8 class TCanvas;
9 class PolarHist {
10  public:
11  PolarHist(std::string title,unsigned int nbin,float rmax);
12  ~PolarHist();
13  void SetTitle(std::string title) { if (fhist!=NULL) fhist->SetTitle(title.c_str());}
14  void Fill(float r,float theta,float w=1);
15  void FillGauss(float r, float theta, float resolution=5, float range=10, float w=1);
16  void UseDegree() {fconvfactor=TMath::DegToRad();};
17  void UseRadian() {fconvfactor=1;};
18  TH2F*& GetHist() {return fhist;};
19 // const TH2F*& GetHist() const {return fhist;} ;
20  void DrawAxis(TCanvas& can); // ! Canvas should not be emtpy (No "A" option used)
21 
22 
23  private:
24  PolarHist();
25  TH2F* fhist;
26  float fconvfactor;
27  float frmax;
28  std::vector<TGraph*> fv_axis;
29  };
30 #endif
void UseRadian()
Definition: PolarHist.h:17
float frmax
Definition: PolarHist.h:27
TH2F *& GetHist()
Definition: PolarHist.h:18
TH2F * fhist
Definition: PolarHist.h:25
void DrawAxis(TCanvas &can)
void UseDegree()
Definition: PolarHist.h:16
float fconvfactor
Definition: PolarHist.h:26
void SetTitle(std::string title)
Definition: PolarHist.h:13
void Fill(float r, float theta, float w=1)
void FillGauss(float r, float theta, float resolution=5, float range=10, float w=1)
std::vector< TGraph * > fv_axis
Definition: PolarHist.h:28

, generated on Tue Sep 26 2023.