- Timestamp:
- 05/12/04 11:33:29 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/MFindStars.cc
r4053 r4054 66 66 const Float_t sqrt3 = sqrt(3.); 67 67 68 Bool_t HandleInput()69 {70 TTimer timer("gSystem->ProcessEvents();", 50, kFALSE);71 while (1)72 {73 //74 // While reading the input process gui events asynchronously75 //76 timer.TurnOn();77 cout << "Type 'q' to exit, <return> to go on: " << endl;78 char q;79 cin >> q;80 TString input = q;81 timer.TurnOff();82 83 if (input=="q\n")84 return kFALSE;85 86 if (input=="\n")87 return kTRUE;88 };89 }90 91 92 68 //______________________________________________________________________________ 93 69 // … … 440 416 Bool_t MFindStars::DCPedestalCalc(Float_t &ped, Float_t &rms) 441 417 { 418 //------------------------------------------------------------- 419 // save pointer to the MINUIT object for optimizing the supercuts 420 // because it will be overwritten 421 // when fitting the alpha distribution in MHFindSignificance 422 TMinuit *savePointer = gMinuit; 423 //------------------------------------------------------------- 424 442 425 UInt_t numPixels = fGeomCam->GetNumPixels(); 443 426 … … 470 453 471 454 dchist.Fit("func","QR0"); 472 // Remove the comments if you want to go through the file473 // event-by-event:474 // HandleInput();475 455 476 456 UInt_t aproxnumdegrees = 6*(bin-dchist.GetMaximumBin()); … … 485 465 minbin=minbin<1?1:minbin; 486 466 Axis_t maxbin = ped+numsigmas*rms/dchist.GetBinWidth(1); 467 487 468 *fLog << dbg << " Number of pixels with dc under " << numsigmas << " sigmas = " << dchist.Integral((int)minbin,(int)maxbin) << endl; 469 470 //Check results from the fit are consistent 471 if (TMath::Abs(ped-maxprobdc) > rmsguess || rms > rmsguess) 472 { 473 *fLog << warn << GetName() << " Pedestal DC fit give non consistent results." << endl; 474 *fLog << warn << " maxprobdc " << maxprobdc << " rmsguess " << rmsguess << endl; 475 *fLog << warn << " ped " << ped << " rms " << rms << " chiq/ndof " << chiq << "/" << aproxnumdegrees << endl; 476 ped = maxprobdc; 477 rms = rmsguess/1.175; // FWHM=2.35*rms 478 } 479 480 //================================================================= 481 // reset gMinuit to the MINUIT object for optimizing the supercuts 482 gMinuit = savePointer; 483 //------------------------------------------- 484 488 485 return kTRUE; 489 486 } … … 621 618 meanSqY /= sumCharge; 622 619 620 //Substract pedestal from sumCharge 621 sumCharge -= usedPx*fPedestalDC; 622 623 623 Float_t rmsX = TMath::Sqrt(meanSqX - meanX*meanX); 624 624 Float_t rmsY = TMath::Sqrt(meanSqY - meanY*meanY); … … 714 714 Float_t pixXpos = (*fGeomCam)[pix].GetX(); 715 715 Float_t pixYpos = (*fGeomCam)[pix].GetY(); 716 Float_t starXpos = star->GetMeanX Calc();717 Float_t starYpos = star->GetMeanY Calc();718 719 Float_t starSize = 3*star->GetSigmaMajorAxis Calc();716 Float_t starXpos = star->GetMeanX(); 717 Float_t starYpos = star->GetMeanY(); 718 719 Float_t starSize = 3*star->GetSigmaMajorAxis(); 720 720 721 721 Float_t dist = sqrt((pixXpos-starXpos)*(pixXpos-starXpos)+
Note:
See TracChangeset
for help on using the changeset viewer.