- Timestamp:
- 12/16/04 11:38:26 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
r5605 r5608 613 613 // First, find the right FADC slice: 614 614 // 615 klo = maxpos - 1;615 klo = maxpos; 616 616 while (klo >= 0) 617 617 { 618 klo--; 618 619 if (fHiGainSignal[klo] < fHalfMax) 619 620 break; 620 klo--;621 }622 621 } 622 623 khi = klo+1; 623 624 // 624 625 // Loop from the beginning of the slice upwards to reach the fHalfMax: … … 632 633 Bool_t back = kFALSE; 633 634 634 Int_t maxcnt = 50;635 Int_t maxcnt = 20; 635 636 Int_t cnt = 0; 636 637 … … 985 986 // First, find the right FADC slice: 986 987 // 987 klo = maxpos - 1; 988 while (klo >= 0) 989 { 988 klo = maxpos; 989 while (klo > 0) 990 { 991 klo--; 990 992 if (fLoGainSignal[klo] < fHalfMax) 991 993 break; 992 klo--;993 }994 994 } 995 996 khi = klo+1; 995 997 // 996 998 // Loop from the beginning of the slice upwards to reach the fHalfMax: … … 1004 1006 Bool_t back = kFALSE; 1005 1007 1006 Int_t maxcnt = 50;1008 Int_t maxcnt = 20; 1007 1009 Int_t cnt = 0; 1008 1010 … … 1034 1036 1035 1037 if (++cnt > maxcnt) 1036 { 1037 // *fLog << inf << x << " " << y << " " << fHalfMax << endl; 1038 break; 1039 } 1038 break; 1040 1039 1041 1040 step /= 2.; 1042 1041 } 1043 1042 1044 time = x + ( Int_t)fLoGainFirst;1043 time = x + (Float_t)fLoGainFirst; 1045 1044 dtime = fResolution; 1046 1045 } … … 1151 1150 Float_t b = start-lo; 1152 1151 1152 Int_t cnt = 0; 1153 1153 1154 while (1) 1154 1155 { … … 1171 1172 + (a*a*a-a)*fHiGainSecondDeriv[klo] 1172 1173 + (b*b*b-b)*fHiGainSecondDeriv[khi]; 1174 1175 cnt++; 1173 1176 } 1174 1177
Note:
See TracChangeset
for help on using the changeset viewer.