Changeset 9576 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 04/22/10 11:43:42 (15 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r9525 r9576 208 208 // Q quiet mode 209 209 // E Perform better Errors estimation using Minos technique 210 h.Fit(fFunc, "NQI", "", fBgMin, fBgMax); 210 if (h.Fit(fFunc, "NQI", "", fBgMin, fBgMax)) 211 return kFALSE; 212 211 213 fChiSqBg = fFunc->GetChisquare()/fFunc->GetNDF(); 212 214 -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r9411 r9576 1153 1153 if (obj==fOffData) 1154 1154 fOffData = 0; 1155 } 1155 1156 MH::RecursiveRemove(obj); 1157 } -
trunk/MagicSoft/Mars/mhflux/MHPhi.cc
r9153 r9576 355 355 TVirtualPad *pad4 = gPad->GetPad(4); 356 356 357 const Double_t i2 = fHInhom.Integral(); 358 /* 357 359 Double_t sig2 = 0; 358 360 Double_t bg2 = 0; 359 361 Double_t f2 = 1; 362 */ 360 363 TH1D *htemp = pad1 ? dynamic_cast<TH1D*>(pad1->FindObject("Template")) : NULL; 361 364 if (htemp) … … 373 376 fHPhi.Copy(*res); 374 377 378 const Double_t i0 = res->Integral(fNumBinsSignal+1, 9999); 379 const Double_t i1 = fHInhom.Integral(fNumBinsSignal+1, 9999); 380 const Double_t i3 = htemp->Integral(); 381 const Double_t i4 = htemp->Integral(fNumBinsSignal+1, 9999); 382 375 383 // Scale inhomogeneity to match the phi-plot in the off-region 376 sc1 = res->Integral(fNumBinsSignal+1, 9999)/fHInhom.Integral(fNumBinsSignal+1, 9999);384 sc1 = i1==0 ? 0 : i0/i1; 377 385 // Scale inhomogeneity to match the phi-plot in the off-region 378 sc2 = fHInhom.Integral()/htemp->Integral();386 sc2 = i3==0 ? 0 : i2/i3; 379 387 380 388 res->Add(&fHInhom, -sc1); … … 383 391 res->SetDirectory(0); 384 392 385 htemp->Scale( res->Integral(fNumBinsSignal+1, 9999)/htemp->Integral(fNumBinsSignal+1, 9999));386 387 sig2 = res->Integral(1, fNumBinsSignal);388 bg2 = fHPhi.Integral(fNumBinsSignal+1, 9999);389 f2 = htemp->Integral(1, fNumBinsSignal)/htemp->Integral(fNumBinsSignal+1, 9999);393 htemp->Scale(i4==0 ? 0 : i0/i4); 394 395 //sig2 = res->Integral(1, fNumBinsSignal); 396 //bg2 = fHPhi.Integral(fNumBinsSignal+1, 9999); 397 //f2 = htemp->Integral(1, fNumBinsSignal)/i4; 390 398 } 391 399 … … 403 411 if (htemp) 404 412 { 413 const Double_t integ = htemp->Integral(); 414 405 415 fHTemplate.Copy(*htemp); 406 htemp->Scale( fHInhom.Integral()/htemp->Integral());416 htemp->Scale(integ==0 ? 0 : i2/integ); 407 417 htemp->SetName("Template"); 408 418 htemp->SetDirectory(0);
Note:
See TracChangeset
for help on using the changeset viewer.