- Timestamp:
- 12/16/04 20:14:29 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
r5608 r5610 292 292 fNumHiGainSamples = fRiseTime + fFallTime; 293 293 fNumLoGainSamples = fLoGainLast ? fNumHiGainSamples + 1. : 0.; 294 fNumLoGainSamples *= 0.3; 295 294 296 fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples); 295 297 fSqrtLoGainSamples = TMath::Sqrt(fNumLoGainSamples); … … 712 714 const Byte_t *end = first + range; 713 715 Byte_t *p = first; 714 Int_t count = 0;715 716 716 717 const Float_t pedes = ped.GetPedestal(); … … 724 725 fAbMaxPos = 0.; 725 726 Int_t maxpos = 0; 727 Int_t count = 0; 726 728 727 729 // … … 818 820 } 819 821 822 if (maxpos > range-2) 823 CalcIntegralLoGain(sum, (Float_t)range - fRiseTime - fFallTime-1., (Float_t)range - 0.001); 824 else 825 CalcIntegralLoGain(sum, 0.001, fRiseTime + fFallTime + 1.); 826 827 return; 828 } 829 830 if (maxpos < (Int_t)(fRiseTime+2.)) 831 { 832 time = IsExtractionType(kMaximum) 833 ? (Float_t)(fLoGainFirst + maxpos) 834 : (Float_t)(fLoGainFirst + maxpos - 1); 835 820 836 if (maxpos > range-2) 821 837 CalcIntegralLoGain(sum, (Float_t)range - fRiseTime - fFallTime-1., (Float_t)range - 0.001); … … 1041 1057 } 1042 1058 1043 time = x + ( Float_t)fLoGainFirst;1059 time = x + (Int_t)fLoGainFirst; 1044 1060 dtime = fResolution; 1045 1061 } … … 1067 1083 } 1068 1084 CalcIntegralLoGain(sum, start, last); 1069 } 1085 // *fLog << inf << time << " " << sum << " " << start << " " << last << endl; 1086 } 1087 1070 1088 } 1071 1089 … … 1084 1102 Int_t khi = klo+1; 1085 1103 1086 Float_t up = TMath::Ceil(start);1087 1104 Float_t lo = TMath::Floor(start); 1105 Float_t up = lo + 1.; 1088 1106 1089 1107 const Int_t m = int((start-klo)/step); … … 1140 1158 Int_t khi = klo+1; 1141 1159 1142 Float_t up = TMath::Ceil(start);1143 1160 Float_t lo = TMath::Floor(start); 1161 Float_t up = lo + 1.; 1144 1162 1145 1163 const Int_t m = int((start-klo)/step); … … 1149 1167 Float_t a = up-start; 1150 1168 Float_t b = start-lo; 1151 1152 Int_t cnt = 0;1153 1169 1154 1170 while (1) … … 1173 1189 + (b*b*b-b)*fHiGainSecondDeriv[khi]; 1174 1190 1175 cnt++;1176 1191 } 1177 1192 … … 1184 1199 b = 0.; 1185 1200 } 1201 1186 1202 } 1187 1203
Note:
See TracChangeset
for help on using the changeset viewer.