Changeset 5876 for trunk/MagicSoft
- Timestamp:
- 01/17/05 16:39:19 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5875 r5876 76 76 - fixed default weights files for pedestal extraction for cosmcis 77 77 78 2005/01/17 Nadia Tonello and Markus Gaug 79 80 * mcalib/MCalibrationChargeCam.cc 81 - some fit improvements in the function GetAveragedConvFADC2PhotPerArea 78 82 79 83 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r5843 r5876 691 691 TH1D *h = convcam.ProjectionS(TArrayI(),TArrayI(1,&aidx),"_py",750); 692 692 h->SetDirectory(NULL); 693 h->Fit("gaus","Q"); 694 TF1 *fit = h->GetFunction("gaus"); 695 693 694 TF1 *fit = NULL; 695 696 if (geom.InheritsFrom("MGeomCamMagic")) 697 { 698 699 fit = new TF1("fit","gaus",0.4,5.); 700 701 // Fix the ranges, as found by Nadia 702 if(aidx == 0) 703 {h->Fit("fit","REQ", "",0.4,1.5);} 704 else 705 {h->Fit("fit","REQ", "",1.,5.);} 706 } 707 else 708 { 709 h->Fit("gaus","Q"); 710 fit = h->GetFunction("gaus"); 711 } 712 696 713 Float_t ci2 = fit->GetChisquare(); 697 714 Float_t sigma = fit->GetParameter(2); … … 699 716 if (ci2 > 500. || sigma > sg) 700 717 { 701 h->Fit("gaus","QM"); 702 fit = h->GetFunction("gaus"); 718 if (geom.InheritsFrom("MGeomCamMagic")) 719 { 720 // Fix the ranges, as found by Nadia 721 if(aidx == 0) 722 {h->Fit("fit","REQ", "",0.4,1.5);} 723 else 724 {h->Fit("fit","REQ", "",1.,5.);} 725 } 726 else 727 { 728 h->Fit("gaus","MREQ"); 729 fit = h->GetFunction("gaus"); 730 } 703 731 704 732 ci2 = fit->GetChisquare(); … … 720 748 << " Chisquare: " << Form("%4.3f",fit->GetChisquare()) << " NDF : " << ndf << endl; 721 749 750 delete fit; 722 751 delete h; 723 752 gROOT->GetListOfFunctions()->Remove(fit);
Note:
See TracChangeset
for help on using the changeset viewer.