Changeset 8106 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 10/17/06 18:18:40 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r7287 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.20 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 393 395 // the same number of bins than for on-data 394 396 // 395 void MHFalseSource::ProjectOff(const TH3D &src, TH2D *h2, TH2D * all)397 void MHFalseSource::ProjectOff(const TH3D &src, TH2D *h2, TH2D *hall) 396 398 { 397 399 TAxis &axe = *src.GetZaxis(); … … 415 417 // Move contents from projection to h2 416 418 h2->Reset(); 417 h2->Add(p, all->GetMaximum());418 h2->Divide( all);419 h2->Add(p, hall->GetMaximum()); 420 h2->Divide(hall); 419 421 420 422 // Delete p … … 434 436 // range (0, fAlphaCut) 435 437 // 436 void MHFalseSource::ProjectOn(const TH3D &src, TH2D *h3, TH2D * all)438 void MHFalseSource::ProjectOn(const TH3D &src, TH2D *h3, TH2D *hall) 437 439 { 438 440 TAxis &axe = *src.GetZaxis(); … … 452 454 // Move contents from projection to h3 453 455 h3->Reset(); 454 h3->Add(p, all->GetMaximum());455 h3->Divide( all);456 h3->Add(p, hall->GetMaximum()); 457 h3->Divide(hall); 456 458 457 459 // Delete p … … 603 605 h->SetTitle(Form("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s)); 604 606 605 TH1D *h 0=0;606 if ((h 0= (TH1D*)gPad->FindObject("AlphaOff_z")))607 TH1D *ho=0; 608 if ((ho = (TH1D*)gPad->FindObject("AlphaOff_z"))) 607 609 { 608 610 fHistOff->ProjectionZ("AlphaOff_z", maxx, maxx, maxy, maxy); 609 611 610 612 /* ============= local scaling ================ */ 611 const Int_t f = h 0->GetXaxis()->FindFixBin(fBgMean-1.5*fAlphaCut);612 const Int_t l = h 0->GetXaxis()->FindFixBin(fAlphaCut*3)+f-1;613 h 0->Scale(h1->Integral(f, l)/h0->Integral(f, l));613 const Int_t f = ho->GetXaxis()->FindFixBin(fBgMean-1.5*fAlphaCut); 614 const Int_t l = ho->GetXaxis()->FindFixBin(fAlphaCut*3)+f-1; 615 ho->Scale(h1->Integral(f, l)/ho->Integral(f, l)); 614 616 615 617 -
trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc
r7784 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHThetaSqN.cc,v 1.8 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 282 284 // 2: 0.346 ~98% 0.260 283 285 284 const Double_t dis t= src0.Mod()*TMath::Sin(rad/2);285 const Double_t cut 286 if (dis t<cut)286 const Double_t dis = src0.Mod()*TMath::Sin(rad/2); 287 const Double_t cut = TMath::Sqrt(fFit.GetSignalIntegralMax()); 288 if (dis<cut) 287 289 { 288 290 *fLog << warn << "WARNING - Source regions overlap: distance "; 289 *fLog << dis t<< " less than theta-sq cut " << cut << "!" << endl;290 if (dis t*1.7<cut*1.0)291 *fLog << dis << " less than theta-sq cut " << cut << "!" << endl; 292 if (dis*1.7<cut*1.0) 291 293 fCounter[3]++; 292 294 else 293 if (dis t*1.7<cut*1.5)295 if (dis*1.7<cut*1.5) 294 296 fCounter[2]++; 295 297 else
Note:
See TracChangeset
for help on using the changeset viewer.