Changeset 2878
- Timestamp:
- 01/21/04 22:43:20 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2877 r2878 12 12 - put fSignals->SetUsedFADCSlices into PreProcess 13 13 14 * manalysis/MPedCalcPedRun.cc 15 - calculate PedRMS as RMS of the sums, later renormalized to units 16 of RMS/slice (eliminate the wrong effect of odd and even slices) 14 17 15 18 2004/01/21: Abelardo Moralejo -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2843 r2878 106 106 return kFALSE; 107 107 108 fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainFirst+fNumHiGainSamples-1, 109 fLoGainFirst, fLoGainFirst+fNumLoGainSamples-1); 110 108 111 fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam"); 109 112 if (!fPedestals) … … 135 138 // (Have to think about the mean size of both solutions) 136 139 fSignals->InitSize(cam->GetNumPixels()); 137 138 fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainFirst+fNumHiGainSamples-1,139 fLoGainFirst, fLoGainFirst+fNumLoGainSamples-1);140 140 141 141 return kTRUE; -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc
r2851 r2878 179 179 180 180 fSumx[idx] += msum; 181 fSumx2[idx] += sqr; 181 // 182 // The old version: 183 // 184 // fSumx2[idx] += msqr; 185 // 186 // The new version: 187 // 188 fSumx2[idx] += msum*msum; 182 189 } 183 190 184 191 fPedestals->SetReadyToSave(); 185 fNumSamplesTot +=fNumHiGainSamples;192 fNumSamplesTot += fNumHiGainSamples; 186 193 187 194 return kTRUE; … … 195 202 { 196 203 // Compute pedestals and rms from the whole run 197 const Int_t n = fNumSamplesTot; 198 204 const ULong_t n = fNumSamplesTot; 205 const ULong_t nevts = GetNumExecutions(); 206 199 207 MRawEvtPixelIter pixel(fRawEvt); 200 208 … … 207 215 208 216 const Float_t higainped = sum/n; 209 const Float_t higainrms = TMath::Sqrt((sum2-sum*sum/n)/(n-1.)); 217 // 218 // The old version: 219 // 220 // const Float_t higainrms = TMath::Sqrt((sum2-sum*sum/n)/(n-1.)); 221 // 222 // The new version: 223 // 224 const Float_t higainrms = TMath::Sqrt((sum2-sum*sum/nevts)/(nevts-1.)/(Float_t)fNumHiGainSamples); 210 225 211 226 (*fPedestals)[pixid].Set(higainped, higainrms); -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h
r2821 r2878 23 23 Byte_t fNumHiGainSamples; 24 24 UShort_t fNumPixels; 25 ULong_t 25 ULong_t fNumSamplesTot; 26 26 27 27 MRawEvtData *fRawEvt; // raw event data (time slices)
Note:
See TracChangeset
for help on using the changeset viewer.