- Timestamp:
- 11/30/04 20:14:21 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc
r5527 r5528 209 209 210 210 fHiGainSignal.Set(range); 211 211 212 range = (Int_t)(fLoGainLast - fLoGainFirst + 1); 212 213 … … 324 325 // Calculate the sum of the first fWindowSize slices 325 326 // 326 for (Int_t i=0;i<range-fWindowSizeHiGain ;i++)327 for (Int_t i=0;i<range-fWindowSizeHiGain+1;i++) 327 328 { 328 329 sum = 0.; … … 347 348 max_p = i; 348 349 } 349 } /* for (Int_t i=0;i<range-fWindowSizeHiGain ;i++) */350 } /* for (Int_t i=0;i<range-fWindowSizeHiGain+1;i++) */ 350 351 351 352 time = 0; … … 384 385 const Int_t ids = max_p + sample; 385 386 386 const Float_t pex = ids < 0 ? 0. : ( ids > range ? 0. : fHiGainSignal[ids]);387 const Float_t pex = ids < 0 ? 0. : ( ids >= range ? 0. : fHiGainSignal[ids]); 387 388 sum += fAmpWeightsHiGain [idx]*pex; 388 389 time_sum += fTimeWeightsHiGain[idx]*pex; … … 405 406 { 406 407 407 Int_t range = fLoGainLast - fLoGainFirst + 1; 408 const Int_t range = fLoGainLast - fLoGainFirst + 1; 409 408 410 const Byte_t *end = ptr + range; 409 411 Byte_t *p = ptr; … … 443 445 sat++; 444 446 } 445 447 446 448 // 447 449 // Slide with a window of size fWindowSizeHiGain over the sample … … 466 468 // Calculate the sum of the first fWindowSize slices 467 469 // 468 for (Int_t i=0;i<range-fWindowSizeLoGain ;i++)470 for (Int_t i=0;i<range-fWindowSizeLoGain+1;i++) 469 471 { 470 472 sum = 0.; … … 489 491 max_p = i; 490 492 } 491 } /* for (Int_t i=0;i<range-fWindowSizeLoGain ;i++) */493 } /* for (Int_t i=0;i<range-fWindowSizeLoGain+1;i++) */ 492 494 493 495 time = 0; … … 526 528 const Int_t idx = fBinningResolutionLoGain*sample + fBinningResolutionHalfLoGain + t_iter; 527 529 const Int_t ids = max_p + sample;; 528 const Float_t pex = ids < 0 ? 0. : ( ids > range ? 0. : fLoGainSignal[ids]);530 const Float_t pex = ids < 0 ? 0. : ( ids >= range ? 0. : fLoGainSignal[ids]); 529 531 sum += fAmpWeightsLoGain [idx]*pex; 530 532 time_sum += fTimeWeightsLoGain[idx]*pex;
Note:
See TracChangeset
for help on using the changeset viewer.