Changeset 7895 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 08/21/06 14:38:52 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc
r7885 r7895 239 239 // here for speed reason. The low-gain has a changing extraction offset, 240 240 // so it will be added at every event (in FindTimeAndChargeLoGain) 241 fTimeShiftHiGain = 0.5 + 1./fBinningResolutionHiGain + fHiGainFirst;241 fTimeShiftHiGain = 0.5 + 1./fBinningResolutionHiGain; 242 242 fTimeShiftLoGain = 0.5 + 1./fBinningResolutionLoGain; 243 243 … … 404 404 405 405 Float_t time_sum = 0.; 406 Float_t fmax = 0.;406 Float_t fmax = -FLT_MAX; 407 407 Float_t ftime_max = 0.; 408 Int_t max_p = 0;408 Int_t max_p = -1; 409 409 410 410 // … … 436 436 } /* for (Int_t i=0;i<range-fWindowSizeHiGain+1;i++) */ 437 437 438 if (max_p<0) 439 { 440 sum = 0; 441 time = -1; 442 dsum = -1; 443 dtime = -1; 444 return; 445 } 446 438 447 if (fmax==0) 448 { 449 sum = 0; 450 time = -1; 451 dsum = 0; 452 dtime = 0; 439 453 return; 454 } 440 455 441 456 ftime_max /= fmax; … … 479 494 480 495 if (sum == 0) 496 { 497 time = -1; 498 dsum = 0; 499 dtime = 0; 481 500 return; 501 } 482 502 483 503 // here, the first high-gain slice is already included in the fTimeShiftHiGain … … 544 564 545 565 Float_t time_sum = 0.; 546 Float_t fmax = 0.;566 Float_t fmax = -FLT_MAX; 547 567 Float_t ftime_max = 0.; 548 Int_t max_p = 0;568 Int_t max_p = -1; 549 569 550 570 // … … 576 596 } /* for (Int_t i=0;i<range-fWindowSizeLoGain+1;i++) */ 577 597 578 time = 0; 598 if (max_p<0) 599 { 600 sum = 0; 601 time = -1; 602 dsum = -1; 603 dtime = -1; 604 return; 605 } 606 579 607 if (fmax==0) 608 { 609 sum = 0; 610 time = -1; 611 dsum = 0; 612 dtime = 0; 580 613 return; 614 } 581 615 582 616 ftime_max /= fmax; … … 617 651 618 652 if (sum == 0) 653 { 654 time = -1; 655 dsum = 0; 656 dtime = 0; 619 657 return; 658 } 620 659 621 660 time = max_p + fTimeShiftLoGain + (Float_t)fLoGainFirst /* this shifts the time to the start of the rising edge */ -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
r7876 r7895 374 374 375 375 sat = 0; 376 dsum = 0; // In all cases the extracted signal is valid 376 377 377 378 const Float_t pedes = ped.GetPedestal(); … … 741 742 Int_t max = -9999; 742 743 744 dsum = 0; // In all cases the extracted signal is valid 745 743 746 // 744 747 // Check for saturation in all other slices
Note:
See TracChangeset
for help on using the changeset viewer.