- Timestamp:
- 03/08/05 15:14:57 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6776 r6792 21 21 22 22 -*-*- END OF LINE -*-*- 23 2005/03/08 Markus Gaug 24 25 * mhcalib/MHPedestalCam.[h,cc] 26 - introduce new parameter "fFitStart" to decide from outside where 27 to start fitting the pedestals. 28 29 23 30 2005/03/07 Markus Gaug 24 31 -
trunk/MagicSoft/Mars/mhcalib/MHPedestalCam.cc
r6393 r6792 119 119 using namespace std; 120 120 121 const Int_t MHPedestalCam::fgNbins = 200;122 const Axis_t MHPedestalCam::fgFirst = - 49.5;123 const Axis_t MHPedestalCam::fgLast = 1 50.5;121 const Int_t MHPedestalCam::fgNbins = 50; 122 const Axis_t MHPedestalCam::fgFirst = -57.5; 123 const Axis_t MHPedestalCam::fgLast = 192.5; 124 124 const TString MHPedestalCam::gsHistName = "Pedestal"; 125 125 const TString MHPedestalCam::gsHistTitle = "Pedestal"; … … 166 166 SetHistYTitle(gsHistYTitle.Data()); 167 167 168 SetFitStart(); 168 169 } 169 170 … … 280 281 281 282 282 fPedestalsOut = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedestalCamOut),"MPedestalCam"); 283 if (!fPedestalsOut) 284 fPedestalsOut = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedestalCamOut),"MPedestalCam"); 283 285 284 286 if (!fPedestalsOut) … … 558 560 // else 559 561 TH1F *gaush = hist.GetHGausHist(); 560 hist.FitGaus("RQ0",-0.5,gaush->GetBinCenter(gaush->GetXaxis()->GetLast())); 561 // 562 // 3) Take histogram means and RMS 563 // 564 hist.BypassFit(); 562 hist.FitGaus("RQ0",fFitStart,gaush->GetBinCenter(gaush->GetXaxis()->GetLast())); 565 563 // 566 564 // 4) Check for oscillations … … 596 594 // 2) Fit the Hi Gain histograms with a Gaussian 597 595 // 598 hist.FitGaus(); 599 // 600 // 3) Take histogram means and RMS 601 // 602 hist.BypassFit(); 596 TH1F *gaush = hist.GetHGausHist(); 597 hist.FitGaus("RQ0",fFitStart,gaush->GetBinCenter(gaush->GetXaxis()->GetLast())); 603 598 // 604 599 // 4) Check for oscillations … … 640 635 // 2) Fit the Hi Gain histograms with a Gaussian 641 636 // 642 hist.FitGaus(); 643 // 644 // 3) Take histogram means and RMS 645 // 646 hist.BypassFit(); 637 TH1F *gaush = hist.GetHGausHist(); 638 hist.FitGaus("RQ0",fFitStart,gaush->GetBinCenter(gaush->GetXaxis()->GetLast())); 647 639 // 648 640 // 4) Check for oscillations … … 698 690 699 691 MCalibrationPix &pix = (*fCam)[i]; 692 MPedestalPix &ped = (*fPedestalsOut)[i]; 700 693 pix.SetHiGainMean ( pix.GetHiGainMean() / fExtractHiGainSlices ); 701 694 pix.SetLoGainMean ( pix.GetLoGainMean() / fExtractHiGainSlices ); 695 696 ped.SetPedestal(pix.GetHiGainMean()); 702 697 // 703 698 // Mean error goes with PedestalRMS/Sqrt(entries) -> scale with sqrt(slices) … … 705 700 pix.SetHiGainMeanVar ( pix.GetHiGainMeanVar() / fExtractHiGainSlices ); 706 701 pix.SetLoGainMeanVar ( pix.GetHiGainMeanVar() / fExtractHiGainSlices ); 702 707 703 // 708 704 // Sigma goes like PedestalRMS -> scale with sqrt(slices) … … 710 706 pix.SetHiGainSigma ( pix.GetHiGainSigma() / sqslices ); 711 707 pix.SetLoGainSigma ( pix.GetLoGainSigma() / sqslices ); 708 709 ped.SetPedestalRms(pix.GetHiGainSigma()); 712 710 // 713 711 // Sigma error goes like PedestalRMS/2.(entries) -> scale with sqrt(slices) -
trunk/MagicSoft/Mars/mhcalib/MHPedestalCam.h
r6777 r6792 39 39 Bool_t fRenorm; // Flag if the results will be re-normalized 40 40 41 Axis_t fFitStart; // Charge value to start the fitting procedure 42 41 43 MArrayD fSum; //! sum of values 42 44 MArrayD fSumSquare; //! sum of squared values … … 69 71 void ResetHists(); 70 72 71 void SetNamePedestalCamOut(const char *name) { fNamePedestalCamOut = name; } 72 void SetPedestalsOut ( MPedestalCam *cam) { fPedestalsOut = cam; } 73 void SetRenorm (const Bool_t b=kTRUE ) { fRenorm = b; } 73 void SetFitStart ( const Axis_t a=-0.5 ) { fFitStart = a; } 74 void SetNamePedestalCamOut( const char *name ) { fNamePedestalCamOut = name; } 75 void SetPedestalsOut ( MPedestalCam *cam ) { fPedestalsOut = cam; } 76 void SetRenorm ( const Bool_t b=kTRUE ) { fRenorm = b; } 74 77 75 78 ClassDef(MHPedestalCam, 1) // Histogram class for Charge Camera Pedestals
Note:
See TracChangeset
for help on using the changeset viewer.