Changeset 2581 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 12/01/03 18:58:01 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.cc
r2544 r2581 55 55 56 56 using namespace std; 57 57 58 // -------------------------------------------------------------------------- 58 59 // … … 60 61 // 61 62 MHCalibrationPixel::MHCalibrationPixel(Int_t pix, const char *name, const char *title) 62 : fFitOK(kFALSE), fPixId(pix), fTGausFit(NULL), fQGausFit(NULL), fFitLegend(NULL) 63 { 63 : fPixId(pix), 64 fQGausFit(NULL), 65 fTGausFit(NULL), 66 fFitLegend(NULL), 67 fLowerFitRange(0.), 68 fFitOK(kFALSE) 69 { 64 70 65 71 fName = name ? name : "MHCalibrationPixel"; … … 328 334 } 329 335 330 Bool_t MHCalibrationPixel::FitQ( Axis_t rmin, Axis_t rmax,Option_t *option)336 Bool_t MHCalibrationPixel::FitQ(Option_t *option) 331 337 { 332 338 … … 337 343 // Get the fitting ranges 338 344 // 339 rmin = (rmin != 0.) ? rmin : fQfirst; 340 rmax = (rmax != 0.) ? rmax : fQlast; 345 Axis_t rmin = (fLowerFitRange != 0.) ? fLowerFitRange : fQfirst; 341 346 342 347 // … … 349 354 const Double_t si_guess = mu_guess/500.; 350 355 351 fQGausFit = new TF1("QGausFit","gaus",rmin, rmax);356 fQGausFit = new TF1("QGausFit","gaus",rmin,fQlast); 352 357 353 358 if (!fQGausFit) … … 360 365 fQGausFit->SetParNames("Area","#mu","#sigma"); 361 366 fQGausFit->SetParLimits(0,0.,entries); 362 fQGausFit->SetParLimits(1,rmin, rmax);363 fQGausFit->SetParLimits(2,0., rmax-rmin);367 fQGausFit->SetParLimits(1,rmin,fQlast); 368 fQGausFit->SetParLimits(2,0.,fQlast-rmin); 364 369 365 370 fHQ->Fit("QGausFit",option); -
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.h
r2538 r2581 41 41 TPaveText *fFitLegend; 42 42 43 Axis_t fLowerFitRange; 43 44 Axis_t fQfirst; 44 45 Axis_t fQlast; … … 104 105 const TH1I *GetHQvsN() const { return fHQvsN; } 105 106 106 Bool_t FitQ( Axis_t rmin=0, Axis_t rmax=0,Option_t *option="RQ0+");107 Bool_t FitQ(Option_t *option="RQ0+"); 107 108 Bool_t FitT(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0+"); 108 109 … … 110 111 virtual void CutAllEdges(); 111 112 virtual void Reset(); 113 114 void SetLowerFitRange(Axis_t min) { fLowerFitRange = min; } 112 115 113 116 void PrintQFitResult();
Note:
See TracChangeset
for help on using the changeset viewer.