Changeset 6332 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 02/10/05 02:40:51 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilterPeakSearch.cc
r6328 r6332 83 83 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgPeakSearchWindowSize = 2; 84 84 const Int_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgHiGainFailureLimit = 10; 85 const Int_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgLoGainFailureLimit = 15;85 const Int_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgLoGainFailureLimit = 25; 86 86 // -------------------------------------------------------------------------- 87 87 // … … 340 340 // Shift the last slice to the right: 341 341 // 342 const Byte_t rlim = higainfirst + fOffsetRightFromPeak + fWindowSizeHiGain ;342 const Byte_t rlim = higainfirst + fOffsetRightFromPeak + fWindowSizeHiGain - 1; 343 343 if (rlim <= fHiGainLast+fHiLoLast) 344 344 if (rlim > fHiGainLast) 345 fHiLoLast = rlim - fHiGainLast; 345 { 346 fHiLoLast = rlim - fHiGainLast; 347 fHiGainLast = pixel.GetNumHiGainSamples() - 1; 348 } 346 349 else 347 350 { … … 355 358 } 356 359 357 const Byte_t llim = fHiGainFirst + (Int_t)fOffsetLoGain;358 if ( llim >= fLoGainFirst)359 fLoGainFirst = llim ;360 const Byte_t llim = higainfirst + (Int_t)fOffsetLoGain; 361 if ( llim >= fLoGainFirst + fOffsetLeftFromPeak) 362 fLoGainFirst = llim - fOffsetLeftFromPeak; 360 363 else 361 364 fLoGainOutOfRangeLeft++; … … 364 367 // Make sure we will not integrate beyond the lo gain limit: 365 368 // 366 if (fLoGainFirst+fWindowSizeLoGain+fOffsetRightFromPeak <= pixel.GetNumLoGainSamples()) 367 fLoGainLast = fLoGainFirst+fWindowSizeLoGain+fOffsetRightFromPeak; 369 const Byte_t lolast = fLoGainFirst+fWindowSizeLoGain+fOffsetRightFromPeak-1; 370 if (lolast < pixel.GetNumLoGainSamples()) 371 fLoGainLast = lolast; 368 372 else 369 fLoGainOutOfRangeRight++; 373 { 374 fLoGainOutOfRangeRight++; 375 // *fLog << err << (Int_t)higainfirst << " " << peakpixel << " " << (int)fLoGainFirst << endl; 376 } 377 378 // *fLog << inf << (int)fHiGainFirst << " " << (int)higainfirst << " " << (int)fHiGainLast 379 // << " " << (int)fLoGainFirst << " " << (int)fLoGainLast << endl; 370 380 371 381 pixel.Reset();
Note:
See TracChangeset
for help on using the changeset viewer.