Changeset 4605 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 08/12/04 21:43:15 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
r4399 r4605 74 74 using namespace std; 75 75 76 const Int_t MExtractBlindPixel::fgNumBlindPixels = 2; 76 77 const UInt_t MExtractBlindPixel::fgBlindPixelIds[3] = { 559, 560, 561 }; 77 78 const UInt_t MExtractBlindPixel::fgBlindPixelIdx = 559; 78 const Byte_t MExtractBlindPixel::fgFirst = 0;79 const Byte_t MExtractBlindPixel::fgLast = 7;80 79 const Byte_t MExtractBlindPixel::fgHiGainFirst = 10; 81 80 const Byte_t MExtractBlindPixel::fgHiGainLast = 19; … … 84 83 const Int_t MExtractBlindPixel::fgNSBFilterLimit = 70; 85 84 const Float_t MExtractBlindPixel::fgResolution = 0.003; 86 const UInt_t MExtractBlindPixel::gkModificationRun = 31693;87 85 const Float_t MExtractBlindPixel::gkOverflow = 300.; 88 86 // -------------------------------------------------------------------------- … … 114 112 SetRange(fgHiGainFirst, fgHiGainLast, fgLoGainFirst, fgLoGainLast); 115 113 116 SetFirst(); 117 SetLast(); 114 SetNumBlindPixels(); 118 115 119 116 Clear(); … … 206 203 // - MExtractor::PreProcess(pList) 207 204 // 208 // Sets fModified to kTRUE if the current run number is greater or equal gkModificationRun209 //210 205 // The following output containers are also searched and created if 211 206 // they were not found: 212 207 // 213 208 // - MExtractedBlindPixel 214 //215 //216 209 // 217 210 Int_t MExtractBlindPixel::PreProcess(MParList *pList) … … 255 248 delete [] fHiGainSecondDeriv; 256 249 257 if ( fRunHeader->GetRunNumber() >= gkModificationRun)250 if (fModified) 258 251 { 259 fModified = kTRUE; 260 SetExtractionType(kAmplitude); 261 SetRange(fFirst,fLast); 262 for (Int_t i=0;i<3;i++) 252 for (Int_t i=0;i<fNumBlindPixels;i++) 263 253 { 264 265 254 SetBlindPixelIdx(fgBlindPixelIds[i],i); 255 fBlindPixel->SetBlindPixelIdx(fgBlindPixelIds[i],i); 266 256 } 267 257 } 268 258 else 269 { 270 fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0)); 271 SetExtractionType(kIntegral); 272 SetExtractionType(kFilter); 273 } 259 fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0)); 274 260 275 261 fBlindPixel->SetExtractionType(fExtractionType); … … 351 337 fHiLoLast ? (Int_t)fHiLoLast-1 : (Int_t)fHiGainLast ) 352 338 << endl; 339 353 340 if (IsExtractionType(kFilter)) 354 341 *fLog << inf << GetDescriptor() << ": Will use Filter using " … … 377 364 378 365 Int_t summ = 0; 379 Byte_t *p 366 Byte_t *p = ptr; 380 367 Byte_t *end = ptr + fHiGainLast - fHiGainFirst + 1; 381 368 … … 694 681 Byte_t sat = 0; 695 682 696 if ( !fModified)683 if (IsExtractionType(kFilter)) 697 684 { 698 685 … … 706 693 continue; 707 694 } 695 696 sum = 0; 697 FindSignalFilter(pixel.GetLoGainSamples(), sum, sat); 698 699 /* 700 if (fModified) 701 { 702 if (sum > fNSBFilterLimit) 703 { 704 fBlindPixel->SetExtractedSignal(-1.,id); 705 fBlindPixel->SetNumSaturated(sat,id); 706 fBlindPixel->SetReadyToSave(); 707 continue; 708 } 709 } 710 */ 708 711 } 709 712 710 713 Float_t newsum = 0.; 711 714 sat = 0; … … 716 719 FindIntegral (pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(), newsum, sat); 717 720 721 718 722 fBlindPixel->SetExtractedSignal(newsum,id); 719 723 fBlindPixel->SetNumSaturated(sat,id); -
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h
r4386 r4605 15 15 private: 16 16 17 static const Int_t fgNumBlindPixels; //! Default number of blind pixels after modification run 17 18 static const UInt_t fgBlindPixelIds[3]; //! Default blind pixel indices after modification run 18 19 static const UInt_t fgBlindPixelIdx; //! Default blind pixels index before modification run 19 static const Byte_t fgFirst; //! Default First FADC slice after modification run (currently set to: 2 )20 static const Byte_t fgLast ; //! Default Last FADC slice after modification run (currently set to: 13 )21 20 static const Byte_t fgHiGainFirst; //! Default First FADC slice Hi-Gain Signal (currently set to: 10 ) 22 21 static const Byte_t fgHiGainLast; //! Default Last FADC slice Hi-Gain Signal (currently set to: 29 ) … … 26 25 static const Float_t fgResolution; //! Default for fResolution (currently set to: 0.003) 27 26 static const Float_t gkOverflow; //! Default sum to assign overflow in case of saturation 28 static const UInt_t gkModificationRun; //! Run number from which on three blind pixels are used29 27 30 28 MExtractedSignalBlindPixel *fBlindPixel; // Extracted signal of the Blind Pixel 31 29 32 Byte_t fFirst; // First extraction slice for runs after modification33 Byte_t fLast; // Last extraction slice for runs after modification34 30 Byte_t fHiLoFirst; // If not zero, start extraction from fHiLoFirst slice of Low-Gain 35 31 … … 45 41 Byte_t fExtractionType; // What extraction type has been chosen? 46 42 43 Int_t fNumBlindPixels; // Current number of blind pixels 44 47 45 public: 48 46 enum ExtractionType_t { kAmplitude, kIntegral, kFilter }; … … 74 72 fBlindPixelIdx.AddAt(idx,nr); } 75 73 void SetExtractionType( const ExtractionType_t typ=kAmplitude ); 76 void SetFirst ( const Byte_t first=fgFirst ) { fFirst = first; }77 void SetLast ( const Byte_t last =fgLast ) { fLast = last; }78 74 void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; } 75 void SetModified ( const Bool_t b=kTRUE) { fModified = b; } 76 77 void SetNumBlindPixels( const Int_t num=fgNumBlindPixels ) { fNumBlindPixels = num; } 78 79 79 void SetRange ( const Byte_t hifirst=0, const Byte_t hilast=0, 80 80 const Byte_t lofirst=0, const Byte_t lolast=0 );
Note:
See TracChangeset
for help on using the changeset viewer.