Changeset 7066
- Timestamp:
- 05/19/05 16:16:51 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7065 r7066 52 52 - improved the output line plotted into the histogram 53 53 - implemented getter for fSigInt 54 - start integration in first bin not in underflow bin 55 - added 'background' option for scaling 54 56 55 57 * mhflux/MHAlpha.[h,cc]: -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r7064 r7066 203 203 fIntegralMax = h.GetBinLowEdge(bin+1); 204 204 fEventsBackground = fFunc->Integral(0, fIntegralMax)/alphaw; 205 fEventsSignal = h.Integral( 0, bin);205 fEventsSignal = h.Integral(1, bin); 206 206 fEventsExcess = fEventsSignal-fEventsBackground; 207 207 fSignificance = MMath::SignificanceLiMaSigned(fEventsSignal, fEventsBackground); … … 232 232 233 233 fIntegralMax = hon.GetBinLowEdge(bin+1); 234 fEventsBackground = hof.Integral( 0, bin);235 fEventsSignal = hon.Integral( 0, bin);234 fEventsBackground = hof.Integral(1, bin); 235 fEventsSignal = hon.Integral(1, bin); 236 236 fEventsExcess = fEventsSignal-fEventsBackground; 237 237 fScaleFactor = alpha; … … 301 301 302 302 TLatex text(x, y, Form(fmt.Data(), fSignificance, w, (int)fEventsExcess, 303 fEventsBackground, m, fChiSqBg, fChiSqSignal,303 (int)fEventsBackground, m, fChiSqBg, fChiSqSignal, 304 304 fCoefficients[3])); 305 305 … … 358 358 case kIntegral: *fLog << "integral."; break; 359 359 case kOffRegion: *fLog << "off region."; break; 360 case kBackground: *fLog << "background."; break; 360 361 case kLeastSquare: *fLog << "least square."; break; 361 362 case kUserScale: *fLog << "user def (" << fScaleUser << ")"; break; … … 487 488 const Int_t min = on.GetXaxis()->FindFixBin(fScaleMin); 488 489 const Int_t max = on.GetXaxis()->FindFixBin(fScaleMax); 490 scaleon = on.Integral(min, max); 491 scaleof = of.Integral(min, max); 492 } 493 break; 494 495 case kBackground: 496 { 497 const Int_t min = on.GetXaxis()->FindFixBin(fBgMin); 498 const Int_t max = on.GetXaxis()->FindFixBin(fBgMax); 489 499 scaleon = on.Integral(min, max); 490 500 scaleof = of.Integral(min, max); … … 605 615 if (txt==(TString)"offregion") 606 616 fScaleMode = kOffRegion; 617 if (txt==(TString)"background") 618 fScaleMode = kBackground; 607 619 if (txt==(TString)"leastsquare") 608 620 fScaleMode = kLeastSquare; -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r7064 r7066 21 21 public: 22 22 enum ScaleMode_t { 23 kNone, 24 kEntries, 25 kIntegral, 26 kOffRegion, 27 kLeastSquare, 28 kUserScale 23 kNone, // No scaling 24 kEntries, // scale by the number of entries in on and off 25 kIntegral, // scale by the integral in on and off 26 kOffRegion, // scale by the integral between fScaleMin, fScaleMax in on and off 27 kBackground, // scale by the integral between fBgMin, fBgMax in on and off 28 kLeastSquare, // not yet implemented 29 kUserScale // scale by fixed factor set by SetScaleUser 29 30 }; 30 31 enum Strategy_t {
Note:
See TracChangeset
for help on using the changeset viewer.