Changeset 8780 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 12/10/07 17:45:36 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r8775 r8780 853 853 fScaleMode = kUserScale; 854 854 if (txt==(TString)"fixed") 855 { 856 fScaleMode = kUserScale; 857 fScaleUser = fScaleFactor; 858 } 855 FixScale(); 859 856 rc = kTRUE; 860 857 } -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r8775 r8780 165 165 void EnableBackgroundFit(Bool_t b=kTRUE) { fFitBackground=b; } 166 166 167 void FixScale() 168 { 169 fScaleMode = kUserScale; 170 fScaleUser = fScaleFactor; 171 } 172 167 173 // Getter 168 174 Double_t GetSignalIntegralMax() const { return fSigInt; } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r8775 r8780 159 159 for (int i=1; i<=n; i++) 160 160 { 161 if (fit.FitEnergy(fHist, fOffData, i)) 162 { 163 fHEnergy.SetBinContent(i, fit.GetEventsExcess()); 164 if (fit.GetSignificanceExc()>1) 165 fHEnergy.SetBinError(i, fit.GetEventsExcess()/fit.GetSignificanceExc()); 166 else 167 fHEnergy.SetBinError(i, fit.GetEventsExcess()); 168 169 if (fit.GetSignificanceExc()>1) 170 { 171 mean += fit.GetSignificanceExc()*fit.GetSignificanceExc(); 172 num++; 173 } 174 } 161 if (!fit.FitEnergy(fHist, fOffData, i)) 162 continue; 163 164 if (fit.GetSignificanceExc()<=0) 165 continue; 166 167 fHEnergy.SetBinContent(i, fit.GetEventsExcess()); 168 fHEnergy.SetBinError(i, fit.GetEventsExcess()/fit.GetSignificanceExc()); 169 170 mean += fit.GetSignificanceExc()*fit.GetSignificanceExc(); 171 num++; 175 172 } 176 173 return TMath::Sqrt(mean)/num; … … 188 185 for (int i=1; i<=n; i++) 189 186 { 190 if ( fit.FitTheta(fHist, fOffData, i))191 {192 fHTheta.SetBinContent(i, fit.GetEventsExcess()); 193 if (fit.GetSignificanceExc()>1)194 fHTheta.SetBinError(i, fit.GetEventsExcess()/fit.GetSignificanceExc());195 else 196 fHTheta.SetBinError(i, fit.GetEventsExcess());197 }187 if (!fit.FitTheta(fHist, fOffData, i)) 188 continue; 189 190 if (fit.GetSignificanceExc()<=0) 191 continue; 192 193 fHTheta.SetBinContent(i, fit.GetEventsExcess()); 194 fHTheta.SetBinError(i, fit.GetEventsExcess()/fit.GetSignificanceExc()); 198 195 } 199 196 } … … 431 428 // Fill histogram 432 429 // 433 fHTime.SetBinContent(n+1, fit.GetEventsExcess()); 434 if (fit.GetSignificanceExc()>1) 430 if (fit.GetSignificanceExc()>0) 431 { 432 fHTime.SetBinContent(n+1, fit.GetEventsExcess()); 435 433 fHTime.SetBinError(n+1, fit.GetEventsExcess()/fit.GetSignificanceExc()); 436 else 437 fHTime.SetBinError(n+1, fit.GetEventsExcess()); 434 } 438 435 439 436 *fLog << all << *fTimeEffOn << ": " << fit.GetEventsExcess() << endl; … … 735 732 AppendPad("variable"); 736 733 737 if (fHEnergy.GetNbinsX()>1 )734 if (fHEnergy.GetNbinsX()>1 || fHEnergy.GetBinContent(1)>0) 738 735 { 739 736 pad->cd(2); … … 759 756 delete pad->GetPad(2); 760 757 761 if (fTimeEffOn && fTime || fHTime.GetNbinsX()>1 )758 if (fTimeEffOn && fTime || fHTime.GetNbinsX()>1 || fHTime.GetBinContent(1)>0) 762 759 { 763 760 pad->cd(3); … … 771 768 delete pad->GetPad(3); 772 769 773 if (fHTheta.GetNbinsX()>1 )770 if (fHTheta.GetNbinsX()>1 || fHTheta.GetBinContent(1)>0) 774 771 { 775 772 pad->cd(4);
Note:
See TracChangeset
for help on using the changeset viewer.