- Timestamp:
- 08/03/18 13:51:26 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mdrs/MDrsCalibApply.cc
r17762 r19129 171 171 fSignal->InitSamples(roi); 172 172 173 if (!fDrsCalib) // FIXME: Do a fake (none) calibration 173 if (!fDrsCalib) // Do a fake (none) calibration 174 { 175 /* 176 const int16_t *val = reinterpret_cast<int16_t*>(fRawEvt->GetSamples()); 177 const uint32_t num = fRawEvt->GetNumPixels()*roi; 178 179 std::copy(val, val+num, fSignal->GetSamples(0)); 180 */ 181 /* 182 const int16_t *val = reinterpret_cast<int16_t*>(fRawEvt->GetSamples()); 183 Float_t *vec = fSignal->GetSamples(0); 184 185 const UShort_t *idx = fRawEvt->GetPixelIds(); 186 for (size_t ch=0; ch<fRawEvt->GetNumPixels(); ch++) 187 { 188 const size_t hw = ch*roi; 189 const size_t sw = ch*roi;//idx[ch]*roi; 190 std::copy(val+hw, val+hw+roi, vec+sw); 191 } 192 */ 174 193 return kTRUE; 194 } 175 195 176 196 const int16_t *val = reinterpret_cast<int16_t*>(fRawEvt->GetSamples()); … … 191 211 for (size_t ch=0; ch<fRawEvt->GetNumPixels(); ch++) 192 212 { 213 if (idx[ch]>=fSignal->GetNumPixels()) 214 continue; 215 193 216 const size_t drs = ch*1024; 194 217 const size_t hw = ch*roi; … … 208 231 for (auto it=fPrevStart.begin(); it!=fPrevStart.end(); it++) 209 232 { 210 fResult->fData[i++] = DrsCalibrate::CorrectStep(vec, f RawEvt->GetNumPixels(), roi, it->data(), start, roi+10, idx);211 fResult->fData[i++] = DrsCalibrate::CorrectStep(vec, f RawEvt->GetNumPixels(), roi, it->data(), start, 3, idx);233 fResult->fData[i++] = DrsCalibrate::CorrectStep(vec, fSignal->GetNumPixels(), roi, it->data(), start, roi+10, idx); 234 fResult->fData[i++] = DrsCalibrate::CorrectStep(vec, fSignal->GetNumPixels(), roi, it->data(), start, 3, idx); 212 235 } 213 236 … … 220 243 { 221 244 case 1: 222 for (size_t ch=0; ch<f RawEvt->GetNumPixels(); ch++)245 for (size_t ch=0; ch<fSignal->GetNumPixels(); ch++) 223 246 DrsCalibrate::RemoveSpikes(vec+ch*roi, roi); 224 247 break; 225 248 case 2: 226 for (size_t ch=0; ch<f RawEvt->GetNumPixels(); ch++)249 for (size_t ch=0; ch<fSignal->GetNumPixels(); ch++) 227 250 DrsCalibrate::RemoveSpikes2(vec+ch*roi, roi); 228 251 break; 229 252 case 3: 230 for (size_t ch=0; ch<f RawEvt->GetNumPixels(); ch++)253 for (size_t ch=0; ch<fSignal->GetNumPixels(); ch++) 231 254 DrsCalibrate::RemoveSpikes3(vec+ch*roi, roi); 232 255 break; 233 256 case 4: 234 for (size_t ch=0; ch<f RawEvt->GetNumPixels(); ch++)257 for (size_t ch=0; ch<fSignal->GetNumPixels(); ch++) 235 258 DrsCalibrate::RemoveSpikes4(vec+ch*roi, roi); 236 259 break; 237 260 } 238 239 261 240 262 if (fSlidingAverage)
Note:
See TracChangeset
for help on using the changeset viewer.