Changeset 7064 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 05/19/05 15:38:38 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r7005 r7064 293 293 { 294 294 const Double_t w = GetGausSigma(); 295 const Int_t l = w<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(w)); 296 const TString fmt = Form("\\sigma_{Li/Ma}=%%.1f \\omega=%%.%df\\circ E=%%d (\\alpha<%%.1f\\circ) (\\chi_{b}^{2}/ndf=%%.1f \\chi_{s}^{2}/ndf=%%.1f c_{0}=%%.1f)", 297 l<1?1:l); 295 const Double_t m = fIntegralMax; 296 297 const Int_t l1 = w<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(w)); 298 const Int_t l2 = m<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(m)); 299 const TString fmt = Form("\\sigma_{Li/Ma}=%%.1f \\omega=%%.%df\\circ E=%%d B=%%d (x<%%.%df) (\\chi_{b}^{2}/ndf=%%.1f \\chi_{s}^{2}/ndf=%%.1f c_{0}=%%.1f)", 300 l1<1?1:l1+1, l2<1?1:l2+1); 298 301 299 302 TLatex text(x, y, Form(fmt.Data(), fSignificance, w, (int)fEventsExcess, 300 f IntegralMax, fChiSqBg, fChiSqSignal,303 fEventsBackground, m, fChiSqBg, fChiSqSignal, 301 304 fCoefficients[3])); 302 305 -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r6949 r7064 109 109 fCoefficients.Set(3+s+1); fCoefficients.Reset(); } 110 110 111 Double_t GetSignalIntegralMax() const { return fSigInt; } 112 111 113 Double_t GetEventsExcess() const { return fEventsExcess; } 112 114 Double_t GetEventsSignal() const { return fEventsSignal; } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r6994 r7064 148 148 } 149 149 150 Double_t MHAlpha::GetVal() const151 {152 return static_cast<const MHillasSrc*>(fParameter)->GetAlpha();153 }154 155 150 Float_t MHAlpha::FitEnergyBins(Bool_t paint) 156 151 { … … 206 201 } 207 202 203 // -------------------------------------------------------------------------- 204 // 205 // Return the value from fParemeter which should be filled into the plots 206 // 207 Double_t MHAlpha::GetVal() const 208 { 209 return static_cast<const MHillasSrc*>(fParameter)->GetAlpha(); 210 } 211 212 213 // -------------------------------------------------------------------------- 214 // 215 // Store the pointer to the parameter container storing the plotted value 216 // (here MHillasSrc) in fParameter. 217 // 218 // return whether it was found or not. 219 // 208 220 Bool_t MHAlpha::GetParameter(const MParList &pl) 209 221 { … … 921 933 return rc; 922 934 } 935 936 Int_t MHAlpha::DistancetoPrimitive(Int_t px, Int_t py) 937 { 938 // If pad has no subpad return (we are in one of the subpads) 939 if (gPad->GetPad(1)==NULL) 940 return 9999; 941 942 // If pad has a subpad we are in the main pad. Check its value. 943 return gPad->GetPad(1)->DistancetoPrimitive(px,py)==0 ? 0 : 9999; 944 } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r6988 r7064 34 34 MParContainer *fParameter; //! 35 35 36 private:37 36 const TH3D *fOffData; 38 37 39 38 MAlphaFitter fFit; // SEEMS THAT STREAMER HAS SOME PROBLEMS... MAYBE IF FUNC IS USED AT THE SAME TIME FOR FITS (PAINT) 40 39 40 private: 41 41 TH1D fHEnergy; // excess events vs energy 42 42 TH1D fHTheta; // excess events vs theta … … 74 74 void PaintText(Double_t val, Double_t error) const; 75 75 76 Int_t DistancetoPrimitive(Int_t px, Int_t py) { return 0; }76 Int_t DistancetoPrimitive(Int_t px, Int_t py); 77 77 78 78 virtual Bool_t GetParameter(const MParList &pl); -
trunk/MagicSoft/Mars/mhflux/MHThetaSq.cc
r7001 r7064 29 29 // This is a MHAlpha using "ThetaSquared [MParameterD]" as 'alpha' 30 30 // 31 // The default binning is determined from the integration range set in 32 // MAlphaFitter. 33 // 31 34 // For more detailes see MHAlpha. 32 35 // … … 39 42 #include "MBinning.h" 40 43 #include "MParList.h" 44 #include "MTaskList.h" 45 #include "MParameters.h" 41 46 42 47 #include "MLog.h" … … 88 93 } 89 94 95 // -------------------------------------------------------------------------- 96 // 97 // Overwrites the binning in Alpha (ThetaSq) with a binning for which 98 // the upper edge of the 5th bin (bin=5) fit the signal integration window. 99 // In total 75 bins are setup. 100 // 101 // In case of fOffData!=NULL the binnings are taken later from fOffData anyhow. 102 // 103 Bool_t MHThetaSq::SetupFill(const MParList *pl) 104 { 105 // Default is from default fitter 106 // if a user defined fitter is in the parlist: use this range 107 MAlphaFitter *fit = (MAlphaFitter*)pl->FindObject("MAlphaFitter"); 108 if (!fit) 109 fit = &fFit; 110 111 MParameterD *cut = (MParameterD*)pl->FindObject("ThetaSquaredCut", "MParameterD"); 112 if (cut) 113 fit->SetSignalIntegralMax(cut->GetVal()); 114 115 // Get Histogram binnings 116 MBinning binst, binse; 117 binst.SetEdges(fHist, 'x'); 118 binse.SetEdges(fHist, 'y'); 119 120 // Calculate bining which fits alpha-cut 121 const Double_t intmax = fit->GetSignalIntegralMax(); 122 const UInt_t nbins = 75; 123 const UInt_t nsig = 5; 124 125 MBinning binsa(nbins, 0, nbins*intmax/nsig); 126 127 // Apply binning 128 binsa.Apply(fHistTime); 129 MH::SetBinning(&fHist, &binst, &binse, &binsa); 130 131 // Remark: Binnings might be overwritten in MHAlpha::SetupFill 132 return MHAlpha::SetupFill(pl); 133 } 134 135 // -------------------------------------------------------------------------- 136 // 137 // Store the pointer to the parameter container storing the plotted value 138 // (here ThetaSq) in fParameter. 139 // 140 // return whether it was found or not. 141 // 90 142 Bool_t MHThetaSq::GetParameter(const MParList &pl) 91 143 { … … 98 150 } 99 151 152 // -------------------------------------------------------------------------- 153 // 154 // Return the value from fParemeter which should be filled into the plots 155 // 100 156 Double_t MHThetaSq::GetVal() const 101 157 { -
trunk/MagicSoft/Mars/mhflux/MHThetaSq.h
r7001 r7064 6 6 #endif 7 7 8 class MTaskList; 9 8 10 class MHThetaSq : public MHAlpha 9 11 { 10 12 private: 11 MParameterD *fThetaSq; 13 MParameterD *fThetaSq; //! 12 14 13 15 Bool_t GetParameter(const MParList &pl); … … 18 20 } 19 21 22 Bool_t SetupFill(const MParList *pl); 23 20 24 public: 21 25 MHThetaSq(const char *name=NULL, const char *title=NULL);
Note:
See TracChangeset
for help on using the changeset viewer.