Changeset 4119 for trunk/MagicSoft
- Timestamp:
- 05/22/04 02:54:16 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4116 r4119 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2004/05/22: Abelardo Moralejo 22 23 * msignal/MExtractFixedWindowPeakSearch.[h,cc] 24 - changed name of variable fOffsetFromPeak to fOffsetFromWindow 25 to avoid confusion. 26 - introduced initialization to 0 of startslice and sat in FindPeak 27 - changed initialization of maxsumhi in Process from 0 to -1e6 20 28 21 29 2004/05/20: Raquel de los Reyes -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.cc
r4116 r4119 82 82 const Byte_t MExtractFixedWindowPeakSearch::fgLoGainWindowSize = 6; 83 83 const Byte_t MExtractFixedWindowPeakSearch::fgPeakSearchWindowSize = 4; 84 const Byte_t MExtractFixedWindowPeakSearch::fgOffsetFrom Peak= 1;84 const Byte_t MExtractFixedWindowPeakSearch::fgOffsetFromWindow = 1; 85 85 // -------------------------------------------------------------------------- 86 86 // … … 93 93 // 94 94 // Calls: 95 // - SetOffsetFrom Peak()95 // - SetOffsetFromWindow() 96 96 // - SetRange(fgHiGainFirst, fgHiGainLast, fgLoGainFirst, fgLoGainLast) 97 97 // … … 105 105 fTitle = title ? title : "Task to extract the signal from the FADC slices"; 106 106 107 SetOffsetFrom Peak();107 SetOffsetFromWindow(); 108 108 SetRange(fgHiGainFirst, fgHiGainLast, fgLoGainFirst, fgLoGainLast); 109 109 } … … 239 239 // saturated slices. 240 240 // 241 void MExtractFixedWindowPeakSearch::FindPeak(Byte_t *ptr, Byte_t window, Byte_t &startslice, 242 Int_t &max, Int_t &sat) const 241 void MExtractFixedWindowPeakSearch::FindPeak(Byte_t *ptr, Byte_t window, Byte_t &startslice, Int_t &max, Int_t &sat) const 243 242 { 244 243 245 244 const Byte_t *end = ptr + fHiGainLast - fHiGainFirst + 1; 246 245 246 sat = 0; 247 startslice = 0; 247 248 Int_t sum=0; 248 249 … … 339 340 // Calculate the sum of the "window" slices starting in ptr 340 341 // 341 sum = 0;342 sat = 0;343 342 Byte_t *p = ptr; 344 343 … … 359 358 // "startslice" will mark the slice at which the highest sum begins for that pixel. 360 359 // Then define the beginning of the integration window for ALL pixels as the slice 361 // before that: startslice-fOffsetFrom Peak, unless of course startslice-fOffsetFromPeak<=0,360 // before that: startslice-fOffsetFromWindow, unless of course startslice-fOffsetFromWindow<=0, 362 361 // in which case we start at 0. We will also check that the integration window does not 363 362 // go beyond the FADC limits. … … 369 368 370 369 Int_t sat; 371 Int_t maxsumhi = 0;370 Int_t maxsumhi = -1000000; 372 371 Byte_t startslice; 373 372 Byte_t hiGainFirst = 0; … … 385 384 { 386 385 maxsumhi = sumhi; 387 if ((startslice-fOffsetFrom Peak) > 0)388 hiGainFirst = fHiGainFirst + startslice - fOffsetFrom Peak;386 if ((startslice-fOffsetFromWindow) > 0) 387 hiGainFirst = fHiGainFirst + startslice - fOffsetFromWindow; 389 388 else 390 389 hiGainFirst = fHiGainFirst; -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.h
r3951 r4119 17 17 static const Byte_t fgLoGainWindowSize; // Default for fWindowSizeLoGain (now set to: 6) 18 18 static const Byte_t fgPeakSearchWindowSize; // Default for fPeakSearchWindowSize (now set to: 4) 19 static const Byte_t fgOffsetFrom Peak; // Default for fOffsetFromPeak(now set to: 2)19 static const Byte_t fgOffsetFromWindow; // Default for fOffsetFromWindow (now set to: 2) 20 20 21 21 Byte_t fWindowSizeHiGain; // Number of Hi Gain slices in window 22 22 Byte_t fWindowSizeLoGain; // Number of Lo Gain slices in window 23 23 Byte_t fPeakSearchWindowSize; // Size of FADC window in the search for the highest peak of all pixels. 24 Byte_t fOffsetFrom Peak; // Number of slices to start extraction from global peak24 Byte_t fOffsetFromWindow; // Number of slices to start extraction before search window 25 25 26 26 void FindSignalHiGain(Byte_t *ptr, Byte_t *logain, Int_t &sum, Byte_t &sat) const; … … 39 39 void SetWindows(Byte_t windowh=fgHiGainWindowSize, Byte_t windowl=fgLoGainWindowSize, 40 40 Byte_t peaksearchwindow=fgPeakSearchWindowSize); 41 void SetOffsetFrom Peak(Byte_t offset=fgOffsetFromPeak) { fOffsetFromPeak= offset; }41 void SetOffsetFromWindow(Byte_t offset=fgOffsetFromWindow) { fOffsetFromWindow = offset; } 42 42 43 43 ClassDef(MExtractFixedWindowPeakSearch, 0) // Signal Extractor for fixed size trigger-corrected extraction window
Note:
See TracChangeset
for help on using the changeset viewer.