Changeset 2925 for trunk/MagicSoft/Mars
- Timestamp:
- 01/26/04 22:54:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r2924 r2925 132 132 // (This is a preliminary feature) 133 133 // 134 //calcalc.ExcludePixelsFromAsciiFile("badpixels_all.dat");134 calcalc.ExcludePixelsFromAsciiFile("badpixels_all.dat"); 135 135 136 136 // … … 366 366 dgaus->SetParameters(integ,(min+mean)/2.,width/4., 367 367 integ/width/2.,(max+mean)/2.,width/4.); 368 // The left-sided Gauss 368 369 dgaus->SetParLimits(0,integ-1.5,integ+1.5); 369 370 dgaus->SetParLimits(1,min+(width/10.),mean); 370 371 dgaus->SetParLimits(2,0,width/2.); 372 // The right-sided Gauss 371 373 dgaus->SetParLimits(3,0,integ); 372 374 dgaus->SetParLimits(4,mean,max-(width/10.)); … … 377 379 378 380 case 2: 379 TString tgausform = "([0]-[3])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])"; 380 tgausform += "+[3]/[4]*exp(-0.5*(x-[4])*(x-[4])/[5]/[5])"; 381 TF1 *tgaus = new TF1("tgaus","gaus(0)+gaus(3)+gaus(6)",min,max); 381 TString tgausform = "([0]-[3]-[6])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])"; 382 tgausform += "+[3]/[5]*exp(-0.5*(x-[4])*(x-[4])/[5]/[5])"; 383 tgausform += "+[6]/[8]*exp(-0.5*(x-[7])*(x-[7])/[8]/[8])"; 384 TF1 *tgaus = new TF1("tgaus",tgausform.Data(),min,max); 382 385 tgaus->SetBit(kCanDelete); 383 tgaus->SetParNames("A1","#mu1","#sigma1","A2","#mu2","#sigma2","A3","#mu3","#sigma3"); 384 tgaus->SetParameters(integ/width,max-width/6.,width/4., 385 integ/width,min+width/6.,width/4., 386 integ/width,min+width/6.,width/2.); 387 tgaus->SetParLimits(0,0,integ); 388 tgaus->SetParLimits(1,min,max); 389 tgaus->SetParLimits(2,0,width/4.); 390 tgaus->SetParLimits(3,0,integ); 391 tgaus->SetParLimits(4,min,max); 392 tgaus->SetParLimits(5,0,width/4.); 393 tgaus->SetParLimits(6,0,integ); 386 tgaus->SetParNames("A_{tot}","#mu_{1}","#sigma_{1}", 387 "A_{2}","#mu_{2}","#sigma_{2}", 388 "A_{3}","#mu_{3}","#sigma_{3}"); 389 tgaus->SetParameters(integ,(min+mean)/2,width/4., 390 integ/width/3.,(max+mean)/2.,width/4., 391 integ/width/3.,mean,width/2.); 392 // The left-sided Gauss 393 tgaus->SetParLimits(0,integ-1.5,integ+1.5); 394 tgaus->SetParLimits(1,min+(width/10.),mean); 395 tgaus->SetParLimits(2,width/15.,width/2.); 396 // The right-sided Gauss 397 tgaus->SetParLimits(3,0.,integ); 398 tgaus->SetParLimits(4,mean,max-(width/10.)); 399 tgaus->SetParLimits(5,width/15.,width/2.); 400 // The Gauss describing the outliers 401 tgaus->SetParLimits(6,0.,integ); 394 402 tgaus->SetParLimits(7,min,max); 395 tgaus->SetParLimits(8, 0,width/2.);396 obj2->Fit("tgaus","QLR ");403 tgaus->SetParLimits(8,width/4.,width/1.5); 404 obj2->Fit("tgaus","QLRM"); 397 405 obj2->GetFunction("tgaus")->SetLineColor(kYellow); 398 406 break;
Note:
See TracChangeset
for help on using the changeset viewer.