Changeset 3015 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 02/04/04 15:03:44 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
r3007 r3015 630 630 // so that we can use it for the fit 631 631 // 632 if (fPedestals-> IsUseHists())632 if (fPedestals->GetHistSize() > fBlindPixelId) 633 633 { 634 634 // 635 635 // retrieve the pedestal pix of the blind pixel 636 636 // 637 MPedestalPix &ped = (*fPedestals)[fBlindPixelId]; 637 MHPedestalPixel &pedhist = (*fPedestals)(fBlindPixelId); 638 MPedestalPix &pedpix = (*fPedestals)[fBlindPixelId]; 638 639 // 639 640 // retrieve the histogram containers 640 641 // 641 642 MHCalibrationBlindPixel *hist = blindpixel.GetHist(); 642 MHPedestalPixel *pedhist = ped.GetHist();643 643 // 644 644 // Set the corresponding values 645 645 // 646 646 const Float_t nslices = (Float_t)fSignals->GetNumUsedFADCSlices(); 647 const Int_t nentries = pedhist->GetTotalEntries(); 648 649 const Float_t peddiff = ped.GetMean() - ped.GetPedestal()*nslices; 650 651 Float_t pederr = ped.GetMeanErr()*ped.GetMeanErr(); 652 pederr += ped.GetPedestalRms()*ped.GetPedestalRms()*nslices*nslices/nentries/nentries; 653 pederr = TMath::Sqrt(pederr); 654 655 const Float_t pedsigma = ped.GetSigma(); 656 const Float_t pedsigmaerr = ped.GetSigmaErr(); 647 const ULong_t nentries = fPedestals->GetTotalEntries(); 648 649 const Float_t peddiff = (pedhist.GetChargeMean()-pedpix.GetPedestal())*nslices; 650 651 const Float_t sqrslice = TMath::Sqrt(nslices); 652 653 Float_t pederr = pedhist.GetChargeMeanErr()*pedhist.GetChargeMeanErr(); 654 pederr += pedpix.GetPedestalRms()*pedpix.GetPedestalRms()/nentries; 655 pederr = TMath::Sqrt(pederr)*sqrslice; 656 657 const Float_t pedsigma = pedhist.GetChargeSigma()*sqrslice; 658 const Float_t pedsigmaerr = pedhist.GetChargeSigmaErr()*sqrslice; 657 659 658 660 hist->SetMeanPedestal(peddiff);
Note:
See TracChangeset
for help on using the changeset viewer.