- Timestamp:
- 02/23/04 22:17:10 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3267 r3268 10 10 * mraw/MRawEvtPixelIter.h 11 11 - include GetNumHiGainSamples and GetNumLoGainSamples 12 13 * mcalib/MExtractBlindPixel.[h,cc] 14 - included const Getter to MRawEvtPixelIter 15 - included calculation of pedestals in PostProcess 12 16 13 17 -
trunk/MagicSoft/Mars/mcalib/MExtractBlindPixel.cc
r3201 r3268 40 40 #include "MRawEvtPixelIter.h" 41 41 42 #include "MPedestalCam.h" 43 #include "MPedestalPix.h" 44 42 45 #include "MExtractedSignalBlindPixel.h" 43 46 … … 49 52 const Byte_t MExtractBlindPixel::fgSaturationLimit = 254; 50 53 const Byte_t MExtractBlindPixel::fgFirst = 3; 51 const Byte_t MExtractBlindPixel::fgLast = 1 4;54 const Byte_t MExtractBlindPixel::fgLast = 16; 52 55 53 56 // -------------------------------------------------------------------------- … … 98 101 } 99 102 103 fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam")); 104 if (!fPedestals) 105 { 106 *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting." << endl; 107 return kFALSE; 108 } 100 109 101 110 fBlindPixel = (MExtractedSignalBlindPixel*)pList->FindCreateObj(AddSerialNumber("MExtractedSignalBlindPixel")); … … 177 186 *fLog << warn << "WARNING - saturation occurred in the Blind Pixel " << endl; 178 187 188 // 189 // catch the pointer to the event, because MHCalibrationChargeBlindPix will need it later 190 // 191 fPixelIter = &pixel; 192 179 193 fBlindPixel->SetReadyToSave(); 180 194 181 195 return kTRUE; 196 } 197 198 Int_t MExtractBlindPixel::PostProcess() 199 { 200 201 MPedestalPix &pedpix = (*fPedestals)[fBlindPixelIdx]; 202 203 if (&pedpix) 204 { 205 fPed = pedpix.GetPedestal() * fNumSamples; 206 fPedErr = pedpix.GetPedestalRms()* fNumSamples / TMath::Sqrt((Float_t)fPedestals->GetTotalEntries()); 207 fPedRms = pedpix.GetPedestalRms()* TMath::Sqrt((Float_t)fNumSamples); 208 fPedRmsErr = fPedErr/2.; 209 } 210 211 return kTRUE; 212 182 213 } 183 214 -
trunk/MagicSoft/Mars/mcalib/MExtractBlindPixel.h
r3198 r3268 17 17 class MRawEvtData; 18 18 class MRawRunHeader; 19 19 class MRawEvtPixelIter; 20 20 class MPedestalCam; 21 21 class MExtractedSignalBlindPixel; … … 33 33 MRawEvtData *fRawEvt; // raw event data (time slices) 34 34 MRawRunHeader *fRunHeader; // RunHeader information 35 MRawEvtPixelIter *fPixelIter; // pointer to the MRawEvt information 36 MPedestalCam *fPedestals; // pointer to the pedestal information 35 37 36 38 Byte_t fFirst; … … 42 44 UInt_t fBlindPixelIdx; 43 45 46 Float_t fPed; 47 Float_t fPedErr; 48 Float_t fPedRms; 49 Float_t fPedRmsErr; 50 44 51 Int_t PreProcess(MParList *pList); 45 52 Int_t Process(); 53 Int_t PostProcess(); 46 54 void StreamPrimitive(ofstream &out) const; 47 55 … … 50 58 MExtractBlindPixel(const char *name=NULL, const char *title=NULL); 51 59 60 const MRawEvtPixelIter *GetPixelIter() const { return fPixelIter; } 61 52 62 // Setters 53 63 void SetRange(const Byte_t first=fgFirst, const Byte_t last=fgLast); 54 64 void SetSaturationLimit(const Byte_t lim=fgSaturationLimit) { fSaturationLimit = lim; } 55 void SetBlindPixelIdx( const UInt_t idx=fgBlindPixelIdx ) { fBlindPixelIdx = idx; } 65 void SetBlindPixelIdx( const UInt_t idx=fgBlindPixelIdx ) { fBlindPixelIdx = idx; } 66 67 Float_t GetPed() const { return fPed; } 68 Float_t GetPedErr() const { return fPedErr; } 69 Float_t GetPedRms() const { return fPedRms; } 70 Float_t GetPedRmsErr() const { return fPedRmsErr; } 56 71 57 72 ClassDef(MExtractBlindPixel, 0) // Task to fill the Extracted BlindPixel Containers from raw data … … 59 74 60 75 #endif 76
Note:
See TracChangeset
for help on using the changeset viewer.