Changeset 3994
- Timestamp:
- 05/06/04 09:28:19 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc
r3987 r3994 30 30 // MPedCalcPedRun 31 31 // 32 // This task takes a pedestal run file and fills MPedestalCam during 33 // the Process() with the pedestal and rms computed in an event basis. 34 // In the PostProcess() MPedestalCam is finally filled with the pedestal 35 // mean and rms computed in a run basis. 36 // More than one run (file) can be merged 37 // 38 // 39 // Actually, MPedCalcPedRun applies the following formula (1): 40 // 41 // PedRMS = Sqrt( (sum(x_i^2) - sum(x_i)^2/n) / n-1 / 14 ) 42 // 43 // where x_i is the sum of 14 FADC slices and sum means the sum over all 44 // events, n is the number of events. 45 // 46 // For a high number of events, this formula is equivalent to formula (2): 47 // 48 // PedRMS = Sqrt( (<x_i*x_i> - <x_i>*<x_i>) / 14 ) 49 // 50 // where <> is the mean over all events and x_i again the sum over the 14 51 // slices. 52 // 53 // If you assume statistical equivalence of all slices (say, all have equal 54 // offset and are not correlated and fluctuate Gaussian), it should also be 55 // equivalent to (old formula) (3): 56 // 57 // PedRMS = Sqrt( (<p_i*p_i> - <p_i>*<p_i>) ) 58 // 59 // which is the RMS per slice of a single slice (p_i) and 60 // <> the mean over the total number of measurements, i.e. n*14. 61 // 62 // If we assume that at least our pairs fluctuate independently and Gaussian, 63 // then we can use the actual formula (1) in order to get 64 // fluctuations of pairs by the transformation: 65 // 66 // PedRMS/pair = PedRMS (form. (3)) * Sqrt(2) 67 // 68 // (However, we know that our slice-to-slice fluctuations are not Gaussian 69 // (and moreover asymmetric) and that they are also correlated.) 32 // This task takes a pedestal run file and fills MPedestalCam during 33 // the Process() with the pedestal and rms computed in an event basis. 34 // In the PostProcess() MPedestalCam is finally filled with the pedestal 35 // mean and rms computed in a run basis. 36 // More than one run (file) can be merged 37 // 38 // MPedCalcPedRun applies the following formula (1): 39 // 40 // Pedestal per slice = sum(x_i) / n / slices 41 // PedRMS per slice = Sqrt( ( sum(x_i^2) - sum(x_i)^2/n ) / n-1 / slices ) 42 // 43 // where x_i is the sum of "slices" FADC slices and sum means the sum over all 44 // events. "n" is the number of events, "slices" is the number of summed FADC samples. 45 // 46 // Note that the slice-to-slice fluctuations are not Gaussian, but Poissonian, thus 47 // asymmetric and they are correlated. 48 // 49 // It is important to know that the Pedestal per slice and PedRMS per slice depend 50 // on the number of used FADC slices, as seen in the following plots: 51 // 52 //Begin_Html 53 /* 54 <img src="images/PedestalStudyInner.gif"> 55 */ 56 //End_Html 57 // 58 //Begin_Html 59 /* 60 <img src="images/PedestalStudyOuter.gif"> 61 */ 62 // 63 // The plots have the following meaning: 64 // 65 // 1) The calculated mean pedestal per slice (from MPedCalcPedRun) 66 // 2) The fitted mean pedestal per slice (from MHPedestalCam) 67 // 3) The calculated pedestal RMS per slice (from MPedCalcPedRun) 68 // 4) The fitted sigma of the pedestal distribution per slice 69 // (from MHPedestalCam) 70 // 5) The relative difference between calculation and histogram fit 71 // for the mean 72 // 6) The relative difference between calculation and histogram fit 73 // for the sigma or RMS, respectively. 74 // 75 // The calculated means do not change significantly except for the case of 2 slices, 76 // however the RMS changes from 5.7 per slice in the case of 2 extracted slices 77 // to 8.3 per slice in the case of 26 extracted slices. This change is very significant. 78 // 79 // The plots have been produced on run 20123. You can reproduce them using 80 // the macro pedestalstudies.C 81 // 82 // Usage of this class: 83 // ==================== 70 84 // 71 85 // Call: SetRange(higainfirst, higainlast, logainfirst, logainlast) … … 87 101 // fLoGainWindowSize = fgLoGainWindowSize = 0 88 102 // 89 //90 103 // Input Containers: 91 104 // MRawEvtData … … 96 109 // MPedestalCam 97 110 // 111 // See also: MPedestalCam, MPedestalPix, MHPedestalCam, MExtractor 98 112 // 99 113 /////////////////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.