Changeset 6874 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 03/23/05 09:42:31 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r6282 r6874 213 213 } 214 214 215 Bool_t MAlphaFitter::Fit(TH1D &hon, TH1D &hof, Double_t alpha, Bool_t paint) 216 { 217 /* 218 Clear(); 219 if (hon.GetEntries()==0) 220 return kFALSE; 221 */ 222 215 Bool_t MAlphaFitter::Fit(const TH1D &hon, const TH1D &hof, Double_t alpha, Bool_t paint) 216 { 223 217 TH1D h(hon); 224 h.Add(&hof, -1); 218 h.Add(&hof, -1); // substracts also number of entries! 219 h.SetEntries(hon.GetEntries()); 225 220 226 221 MAlphaFitter fit(*this); … … 558 553 txt = txt.Strip(TString::kBoth); 559 554 txt.ToLower(); 560 if (txt==(TString)" Significance")555 if (txt==(TString)"significance") 561 556 fStrategy = kSignificance; 562 if (txt==(TString)" SignificanceChi2")557 if (txt==(TString)"significancechi2") 563 558 fStrategy = kSignificanceChi2; 564 559 rc = kTRUE; 565 560 } 566 561 567 return rc; 568 } 562 if (IsEnvDefined(env, prefix, "ScaleMode", print)) 563 { 564 TString txt = GetEnvValue(env, prefix, "ScaleMode", ""); 565 txt = txt.Strip(TString::kBoth); 566 txt.ToLower(); 567 if (txt==(TString)"none") 568 fScaleMode = kNone; 569 if (txt==(TString)"entries") 570 fScaleMode = kEntries; 571 if (txt==(TString)"integral") 572 fScaleMode = kIntegral; 573 if (txt==(TString)"offregion") 574 fScaleMode = kOffRegion; 575 if (txt==(TString)"leastsquare") 576 fScaleMode = kLeastSquare; 577 if (txt==(TString)"userscale") 578 fScaleMode = kUserScale; 579 rc = kTRUE; 580 } 581 if (IsEnvDefined(env, prefix, "Scale", print)) 582 { 583 fScaleUser = GetEnvValue(env, prefix, "Scale", fScaleUser); 584 rc = kTRUE; 585 } 586 587 return rc; 588 } -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r6283 r6874 125 125 126 126 Bool_t Fit(TH1D &h, Bool_t paint=kFALSE); 127 Bool_t Fit( TH1D &on,TH1D &off, Double_t alpha, Bool_t paint=kFALSE);127 Bool_t Fit(const TH1D &on, const TH1D &off, Double_t alpha, Bool_t paint=kFALSE); 128 128 Bool_t Fit(TH1D &on, TH1D *off, Double_t alpha, Bool_t paint=kFALSE) 129 129 { -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r6283 r6874 827 827 //Bool_t rc = fFit.Fit(*h); 828 828 //delete h; 829 829 830 if (!fFit.FitAlpha(fHAlpha, fOffData)) 830 831 { 831 *fLog << warn << " Histogram empty." << endl;832 *fLog << warn << "MAlphaFitter - Fit failed..." << endl; 832 833 return kTRUE; 833 834 }
Note:
See TracChangeset
for help on using the changeset viewer.