Changeset 7392 for trunk/MagicSoft
- Timestamp:
- 11/10/05 12:03:37 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7390 r7392 46 46 * mpointing/MPointingPos.[h,cc]: 47 47 - added Print function 48 49 * ganymed_onoff.rc: 50 - let the exponential fit fit all the background (decoupled 51 sclae and background-fit reagion) 52 53 * mhflux/MAlphaFitter.[h,cc]: 54 - changed the background fit in the case of a ThetaSq function 55 from a polynomial to a exponential 48 56 49 57 -
trunk/MagicSoft/Mars/NEWS
r7390 r7392 8 8 and where to search for the image data 9 9 --ind=/magic/data/star 10 11 - ganymed/sponde: Calculation of the error of single size-/energy-12 bins now uses Li/Ma (5) instead of LiMa (17)13 10 14 11 - ganymed: MSrcPosCorrect now allows overwriting of the misfocussing … … 23 20 "1ES1218" were read) The source coordinates are now printed 24 21 in addition to its name to the logging output. 22 23 - ganymed: changed the background fit in the case of a ThetaSq function 24 from a polynomial to a exponential, this should give a big improvement 25 for on-only analysis' 26 27 - ganymed/sponde: Calculation of the error of single size-/energy- 28 bins now uses Li/Ma (5) instead of LiMa (17) 25 29 26 30 -
trunk/MagicSoft/Mars/ganymed_onoff.rc
r7362 r7392 101 101 102 102 # ---------- SETUP FOR ONOFF-MODE ----------- 103 MAlphaFitter.ScaleMin: 0.137 104 MAlphaFitter.ScaleMax: 0.640 103 105 MAlphaFitter.BackgroundFitMin: 0.137 104 MAlphaFitter.BackgroundFitMax: 0.64106 MAlphaFitter.BackgroundFitMax: 1.000 105 107 MAlphaFitter.PolynomOrder: 1 106 MAlphaFitter.ScaleMode: Background108 MAlphaFitter.ScaleMode: OffRegion 107 109 MAlphaFitter.SignalFunction: ThetaSq 108 110 -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r7386 r7392 116 116 Double_t bgmax =fBgMax; 117 117 118 //*fLog << inf << "Fit: " << sigmax << " " << fSigInt << " " << bgmin << " " << bgmax << endl;119 120 //TF1 fFunc("", Form("gaus(0) + pol%d(3)", fPolynomOrder), 0, 90);121 122 //fFunc->SetParameters(fCoefficients.GetArray());123 124 fFunc->FixParameter(1, 0);125 if (fPolynomOrder!=1)126 fFunc->FixParameter(4, 0);127 fFunc->SetParLimits(2, 0, 90);128 fFunc->SetParLimits(3, -1, 1);129 130 118 const Double_t alpha0 = h.GetBinContent(1); 131 119 const Double_t alphaw = h.GetXaxis()->GetBinWidth(1); … … 137 125 // First fit a polynom in the off region 138 126 fFunc->FixParameter(0, 0); 127 fFunc->FixParameter(1, 0); 139 128 fFunc->FixParameter(2, 1); 140 129 fFunc->ReleaseParameter(3); 130 if (fPolynomOrder!=1) 131 fFunc->FixParameter(4, 0); 141 132 142 133 for (int i=5; i<fFunc->GetNpar(); i++) … … 145 136 else 146 137 fFunc->SetParameter(i, 0); 138 139 fFunc->SetParLimits(2, 0, 90); 140 // fFunc->SetParLimits(3, -1, 1); 147 141 148 142 // options : N do not store the function, do not draw … … 171 165 //func.ReleaseParameter(1); 172 166 fFunc->ReleaseParameter(2); 173 fFunc->FixParameter(3, fFunc->GetParameter(3)); 174 fFunc->FixParameter(4, fFunc->GetParameter(4)); 175 for (int i=5; i<fFunc->GetNpar(); i++) 167 for (int i=3; i<fFunc->GetNpar(); i++) 176 168 fFunc->FixParameter(i, fFunc->GetParameter(i)); 177 169 178 170 // Do not allow signals smaller than the background 179 const Double_t A = alpha0-fFunc->GetParameter(3); 171 const Double_t s = fSignalFunc==kGauss ? fFunc->GetParameter(3) : TMath::Exp(fFunc->GetParameter(3)); 172 const Double_t A = alpha0-s; 180 173 const Double_t dA = TMath::Abs(A); 181 174 fFunc->SetParLimits(0, -dA*4, dA*4); … … 334 327 switch (fSignalFunc) 335 328 { 336 case kGauss: *fLog << "gauss(x) ";break;337 case kThetaSq: *fLog << "gauss(sqrt(x)) "; break;329 case kGauss: *fLog << "gauss(x)/pol" << fPolynomOrder; break; 330 case kThetaSq: *fLog << "gauss(sqrt(x))/expo"; break; 338 331 } 339 332 *fLog << endl; -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r7386 r7392 136 136 break; 137 137 case kThetaSq: 138 fFunc=new TF1 ("", Form("[0]*exp(-0.5*((sqrt(x)-[1])/[2])^2) + pol%d(3)", fPolynomOrder)); 138 // if (fPolynomOrder==0) 139 // fFunc=new TF1("", "[0]*exp(-0.5*((sqrt(x)-[1])/[2])^2) + pol0(3)"); 140 // else 141 // { 142 if (fPolynomOrder>0) 143 fPolynomOrder = 1; 144 fFunc=new TF1("", "[0]*exp(-0.5*((sqrt(x)-[1])/[2])^2) + expo(3)"); 145 // } 139 146 break; 140 147 }
Note:
See TracChangeset
for help on using the changeset viewer.