Changeset 6988 for trunk/MagicSoft/Mars/mhflux/MHAlpha.h
- Timestamp:
- 05/02/05 10:17:41 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r6977 r6988 24 24 class MPointingPos; 25 25 26 /*27 class MAlphaFitter : public MParContainer28 {29 private:30 Float_t fSigInt;31 Float_t fSigMax;32 Float_t fBgMin;33 Float_t fBgMax;34 Int_t fPolynom;35 36 Double_t fSignificance;37 Double_t fExcessEvents;38 Double_t fChiSqSignal;39 Double_t fChiSqBg;40 Double_t fSigmaGaus;41 Double_t fIntegralMax;42 43 public:44 MAlphaFitter() : fSigInt(10), fSigMax(75), fBgMin(45), fBgMax(85), fPolynom(2)45 {46 }47 48 MAlphaFitter(const MAlphaFitter &f)49 {50 f.Copy(*this);51 }52 53 void Copy(TObject &o) const54 {55 MAlphaFitter &f = static_cast<MAlphaFitter&>(o);56 57 f.fSigInt = fSigInt;58 f.fSigMax = fSigMax;59 f.fBgMin = fBgMin;60 f.fBgMax = fBgMax;61 f.fPolynom = fPolynom;62 }63 64 void SetSignalIntegralMax(Float_t s) { fSigInt = s; }65 void SetSignalFitMax(Float_t s) { fSigMax = s; }66 void SetBackgroundFitMin(Float_t s) { fBgMin = s; }67 void SetBackgroundFitMax(Float_t s) { fBgMax = s; }68 void SetNumPolynom(Int_t s) { fPolynom = s; }69 70 Double_t GetExcessEvents() const { return fExcessEvents; }71 Double_t GetSignificance() const { return fSignificance; }72 Double_t GetChiSqSignal() const { return fChiSqSignal; }73 Double_t GetChiSqBg() const { return fChiSqBg; }74 Double_t GetSigmaGaus() const { return fSigmaGaus; }75 76 void PaintResult(Float_t x=0.04, Float_t y=0.94, Float_t size=0.035) const;77 78 Bool_t Fit(TH1D &h, Bool_t paint=kFALSE);79 ClassDef(MAlphaFitter, 1)80 };81 */82 83 26 class MHAlpha : public MH 84 27 { 28 protected: 29 TH3D fHist; // Alpha vs. theta and energy 30 TH1D fHistTime; //! temporary histogram to get alpha vs. time 31 32 TString fNameParameter; 33 34 MParContainer *fParameter; //! 35 85 36 private: 86 37 const TH3D *fOffData; … … 88 39 MAlphaFitter fFit; // SEEMS THAT STREAMER HAS SOME PROBLEMS... MAYBE IF FUNC IS USED AT THE SAME TIME FOR FITS (PAINT) 89 40 90 TH3D fHAlpha; // Alpha vs. theta and energy91 41 TH1D fHEnergy; // excess events vs energy 92 42 TH1D fHTheta; // excess events vs theta 93 43 TH1D fHTime; // excess events vs time; 94 TH1D fHAlphaTime; //! temporary histogram to get alpha vs. time95 44 96 MParameterD *fResult;//!97 MParameterD *fEnergy;//!98 MHillas *fHillas;//!99 MPointingPos *fPointPos;//!45 MParameterD *fResult; //! 46 MParameterD *fEnergy; //! 47 MHillas *fHillas; //! 48 MPointingPos *fPointPos; //! 100 49 101 50 MTime *fTimeEffOn; //! Time to steer filling of fHTime … … 116 65 Int_t fMap[5]; //! 117 66 118 void FitEnergySpec(Bool_t paint=kFALSE);119 67 Float_t FitEnergyBins(Bool_t paint=kFALSE); 120 68 void FitThetaBins(Bool_t paint=kFALSE); … … 128 76 Int_t DistancetoPrimitive(Int_t px, Int_t py) { return 0; } 129 77 78 virtual Bool_t GetParameter(const MParList &pl); 79 virtual Double_t GetVal() const; 80 virtual const char *GetParameterRule() const 81 { 82 return "MHillasSrc.fAlpha"; 83 } 84 130 85 public: 131 86 MHAlpha(const char *name=NULL, const char *title=NULL); 132 87 88 // MH 133 89 Bool_t SetupFill(const MParList *pl); 134 90 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 135 91 Bool_t Finalize(); 136 92 137 const TH3D &GetHist() const { return fHAlpha; } 93 // MHAlpha 94 const TH3D &GetHist() const { return fHist; } 138 95 const MAlphaFitter &GetAlphaFitter() const { return fFit; } 139 96 140 97 const TH1D &GetHEnergy() const { return fHEnergy; } 141 98 99 // Setter 100 void SetNameParameter(const char *name) { fNameParameter=name; } 142 101 void SetOffData(const MHAlpha &h) 143 102 { 144 fOffData = &h.fH Alpha;103 fOffData = &h.fHist; 145 104 fForceUsingSize = h.fForceUsingSize; 146 105 fNumTimeBins = h.fNumTimeBins;
Note:
See TracChangeset
for help on using the changeset viewer.