Changeset 5143 for trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
- Timestamp:
- 09/28/04 12:25:50 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r5100 r5143 290 290 // for the current pointing position and add a offset in the 291 291 // Fill function! 292 fRa = fPointPos ->GetRa();293 fDec = fPointPos ->GetDec();292 fRa = fPointPos ? fPointPos->GetRa() : 0; 293 fDec = fPointPos ? fPointPos->GetDec() : 90; 294 294 295 295 return kTRUE; … … 592 592 stars->ReadBSC("bsc5.dat"); 593 593 594 *fLog << err << "FIXME - The catalog will never be deleted, because this crashes!" << endl; 595 596 // stars->SetBit(kCanDelete); 597 594 stars->SetBit(kCanDelete); 598 595 return stars; 599 596 } … … 612 609 pad->Divide(1, 2, 0, 0.03); 613 610 614 *fLog << err << "FIXME - Plotting the catalog is broken!" << endl;615 616 611 TObject *catalog = GetCatalog(); 617 612 618 613 // Initialize upper part 619 614 pad->cd(1); 615 // Make sure that the catalog is deleted only once 616 gROOT->GetListOfCleanups()->Add(gPad); 620 617 gPad->SetBorderMode(0); 621 618 gPad->Divide(3, 1); … … 662 659 // Initialize lower part 663 660 pad->cd(2); 661 // Make sure that the catalog is deleted only once 662 gROOT->GetListOfCleanups()->Add(gPad); 664 663 gPad->SetBorderMode(0); 665 664 gPad->Divide(3, 1); … … 673 672 h1->SetXTitle(fHist.GetZaxis()->GetTitle()); 674 673 h1->SetYTitle("Counts"); 675 h1->Draw( opt);674 h1->Draw(); 676 675 h1->SetBit(kCanDelete); 677 676 … … 942 941 943 942 944 TF2 f2d("Gaus-2D", FcnGauss2d, -1.5, 1.5, -1.5, 1.5, 6); 943 const Double_t maxr = 0.9*TMath::Abs(fHist.GetBinCenter(1)); 944 TF2 f2d("Gaus-2D", FcnGauss2d, -maxr, maxr, -maxr, maxr, 6); 945 945 f2d.SetLineWidth(1); 946 946 f2d.SetParName(0, "Max sigma"); … … 950 950 f2d.SetParName(4, "Sigma_2 deg"); 951 951 f2d.SetParName(5, "Phi deg"); 952 f2d.SetParLimits(1, - 1, 1);// mu_1953 f2d.SetParLimits(3, - 1, 1);// mu_2954 f2d.SetParLimits(2, 0, 1);// sigma_1955 f2d.SetParLimits(4, 0, 1);// sigma_2956 f2d.SetParLimits(5, 0, 90);// phi957 f2d.SetParameter(0, maxs); // A958 f2d.SetParameter(1, 0);// mu_1959 f2d.SetParameter(2, 0. 5);// sigma_1960 f2d.SetParameter(3, 0);// mu_2961 f2d.SetParameter(4, 0. 5);// sigma_2962 f2d. SetParameter(5, 0);// phi963 hist->Fit(&f2d, "NI0 ");952 f2d.SetParLimits(1, -maxr/2, maxr/2); // mu_1 953 f2d.SetParLimits(3, -maxr/2, maxr/2); // mu_2 954 f2d.SetParLimits(2, 0, maxr); // sigma_1 955 f2d.SetParLimits(4, 0, maxr); // sigma_2 956 f2d.SetParLimits(5, 0, 45); // phi 957 f2d.SetParameter(0, maxs); // A 958 f2d.SetParameter(1, hist->GetXaxis()->GetBinCenter(maxx)); // mu_1 959 f2d.SetParameter(2, 0.1); // sigma_1 960 f2d.SetParameter(3, hist->GetYaxis()->GetBinCenter(maxy)); // mu_2 961 f2d.SetParameter(4, 0.1); // sigma_2 962 f2d.FixParameter(5, 0); // phi 963 hist->Fit(&f2d, "NI0R"); 964 964 f2d.DrawCopy("cont2same"); 965 965
Note:
See TracChangeset
for help on using the changeset viewer.