source: trunk/MagicSoft/Mars/mhistmc/MHMcEnergy.h@ 9492

Last change on this file since 9492 was 2015, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.2 KB
Line 
1#ifndef MARS_MHMcEnergy
2#define MARS_MHMcEnergy
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class TH1;
9class TH1F;
10class TF1;
11
12class MHMcEnergy : public MParContainer
13{
14private:
15
16 TH1F *fHist; // histogram with the logarith of the energy
17
18 Float_t fThreshold;
19 Float_t fThresholdErr;
20 Float_t fGaussPeak;
21 Float_t fGaussSigma;
22
23 Float_t CalcThreshold(TF1 *gauss);
24 Float_t CalcThresholdErr(TF1 *gauss);
25
26 Float_t CalcGaussPeak(TF1 *gauss);
27 Float_t CalcGaussSigma(TF1 *gauss);
28
29 void DrawLegend() const;
30
31public:
32
33 MHMcEnergy(const char *name=NULL, const char *title=NULL);
34 ~MHMcEnergy();
35
36 void SetName(const char *name);
37
38 Float_t GetThreshold() const { return fThreshold; }
39 Float_t GetThresholdErr() const { return fThresholdErr; }
40
41 Float_t GetGaussPeak() const { return fGaussPeak; }
42 Float_t GetGaussSigma() const { return fGaussSigma; };
43
44 void Fill(Float_t log10E, Float_t w);
45 void Fit(Axis_t xxmin, Axis_t xxmax);
46 void SetNumBins(Int_t nbins = 100);
47
48 TH1 *GetHistByName(const TString name);
49
50 void Draw(Option_t* option = "");
51
52 void Print(Option_t* option = NULL) const;
53
54 ClassDef(MHMcEnergy, 1) // Histogram container for montecarlo energy threshold
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.