Changeset 2848
- Timestamp:
- 01/19/04 14:53:59 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2847 r2848 5 5 -*-*- END OF LINE -*-*- 6 6 7 2004/01/19: Thomas Bretz 8 9 * manalysis/MPedPhotCalc.[cc,h]: 10 - fixed order of includes 11 - removed obsolete forward declarations 12 - removed obsolete data member fNumPixels (stored already twice in 13 the two TArrayF) 14 - fixed some small bugs in the documentation 15 16 17 7 18 2004/01/19: Javier Rico 19 8 20 * macros/dohtml.C, NEWS 9 21 - include some missing info … … 12 24 13 25 2004/01/19: Abelardo Moralejo 26 14 27 * manalysis/MExtractedSignalPix.h 15 28 - added GetNumLoGainSaturated() -
trunk/MagicSoft/Mars/manalysis/MPedPhotCalc.cc
r2837 r2848 16 16 ! 17 17 ! 18 ! Author(s): Josep Flix <mailto:jflix@ifae.es> 19 ! Javier Rico <mailto:jrico@ifae.es> 20 ! (01/04) 18 ! Author(s): Josep Flix 1/2004 <mailto:jflix@ifae.es> 19 ! Author(s): Javier Rico 1/2004 <mailto:jrico@ifae.es> 21 20 ! 22 21 ! Copyright: MAGIC Software Development, 2000-2004 … … 26 25 27 26 ///////////////////////////////////////////////////////////////////////////// 28 // // 29 // MPedPhotCalc // 30 // // 31 // This is a Task class to compute, for each pixel, the signal mean and // 32 // rms from a pedestal run file that has undergone the standard signal // 33 // extration and calibration procedure. The signal rms can be used as // 34 // reference to compute the significance of the measured signals in the // 35 // following data runs (e.g. during the image cleaning). // 36 // // 37 // Input Containers: // 38 // MCerPhotEvt // 39 // // 40 // Output Containers: // 41 // MPedPhotCam 42 // // 43 // // 27 // 28 // MPedPhotCalc 29 // 30 // This is a Task class to compute, for each pixel, the signal mean and 31 // rms from a pedestal run file that has undergone the standard signal 32 // extration and calibration procedure. The signal rms can be used as 33 // reference to compute the significance of the measured signals in the 34 // following data runs (e.g. during the image cleaning). 35 // 36 // Input Containers: 37 // MCerPhotEvt 38 // 39 // Output Containers: 40 // MPedPhotCam 41 // 44 42 ///////////////////////////////////////////////////////////////////////////// 43 #include "MPedPhotCalc.h" 45 44 46 45 #include "MLog.h" 47 46 #include "MLogManip.h" 48 47 49 #include "MPedPhotCalc.h"50 48 #include "MParList.h" 51 #include "MRawRunHeader.h" 49 #include "MRawRunHeader.h" 50 52 51 #include "MCerPhotPix.h" 53 52 #include "MCerPhotEvt.h" 53 54 54 #include "MPedPhotPix.h" 55 55 #include "MPedPhotCam.h" … … 96 96 97 97 98 fNumPixels = fPedestals->GetSize();99 100 98 // Initialize arrays 101 99 if(fSumx.GetSize()==0) 102 100 { 103 fSumx.Set(fNumPixels); 104 fSumx2.Set(fNumPixels); 105 106 memset(fSumx.GetArray(), 0, sizeof(Float_t)*fNumPixels); 107 memset(fSumx2.GetArray(), 0, sizeof(Float_t)*fNumPixels); 101 const UShort_t num = fPedestals->GetSize(); 102 103 fSumx.Set(num); 104 fSumx2.Set(num); 105 106 memset(fSumx.GetArray(), 0, sizeof(Float_t)*num); 107 memset(fSumx2.GetArray(), 0, sizeof(Float_t)*num); 108 108 } 109 109 … … 115 115 for(UInt_t i=0;i<fCerPhot->GetNumPixels();i++) 116 116 { 117 MCerPhotPix &pix = (*fCerPhot)[i]; 118 Float_t nphot = pix.GetNumPhotons(); 119 Int_t idx = pix.GetPixId(); 117 const MCerPhotPix &pix = (*fCerPhot)[i]; 118 119 const Float_t nphot = pix.GetNumPhotons(); 120 const Int_t idx = pix.GetPixId(); 120 121 121 122 fSumx[idx] += nphot; … … 131 132 { 132 133 // Compute pedestals and rms from fSumx and fSumx2 arrays 133 const Int_t n = GetNumExecutions(); 134 const Int_t n = GetNumExecutions(); 135 const Int_t npix = fSumx.GetSize(); 134 136 135 for(Int_t i=0; i<fNumPixels;i++)137 for(Int_t i=0; i<npix; i++) 136 138 { 137 const Float_t sum = fSumx .At(i);138 const Float_t sum2 = fSumx2 .At(i);139 const Float_t sum = fSumx[i]; 140 const Float_t sum2 = fSumx2[i]; 139 141 140 142 const Float_t photped = sum/n; -
trunk/MagicSoft/Mars/manalysis/MPedPhotCalc.h
r2837 r2848 1 1 #ifndef MARS_MPedPhotCalc 2 2 #define MARS_MPedPhotCalc 3 4 /////////////////////////////////////////////////////////////////////////////5 // //6 // MPedPhotCalc //7 // //8 // Evaluate the pedestals from pedestal runs using charge extraction //9 // //10 /////////////////////////////////////////////////////////////////////////////11 3 12 4 #ifndef MARS_MTask … … 14 6 #endif 15 7 8 #ifndef ROOT_TArrayF 16 9 #include <TArrayF.h> 10 #endif 17 11 18 12 class MPedPhotCam; 19 class MRawEvtData;20 13 class MCerPhotEvt; 21 14 22 15 class MPedPhotCalc : public MTask 23 16 { 24 UShort_t fNumPixels;25 26 17 MPedPhotCam *fPedestals; // Pedestals of all pixels in the camera 27 18 MCerPhotEvt *fCerPhot; … … 39 30 MPedPhotCalc(const char *name=NULL, const char *title=NULL); 40 31 41 ClassDef(MPedPhotCalc, 0) // Task to calculate pedestals from pedestal runs raw data32 ClassDef(MPedPhotCalc, 0)//Task to calculate pedestals from the charge computed from pedestal runs (in units of photons) 42 33 }; 43 34
Note:
See TracChangeset
for help on using the changeset viewer.