Changeset 8519 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 05/16/07 14:56:18 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
r8498 r8519 362 362 Int_t sat1 = fHiGainLast; // Last slice to extract and last saturating slice 363 363 364 UInt_t maxcont; 365 Int_t maxpos = fSignal->GetMax(idx, sat0, sat1, maxcont); 364 Int_t maxpos = fSignal->GetMaxPos(idx, sat0, sat1); 366 365 367 366 // numsat = fSignal->GetSaturation(idx, fSaturationLimit, sat0, sat1); -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
r8362 r8519 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.6 4 2007-03-04 13:25:07 tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.65 2007-05-16 13:56:17 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 189 189 // order polynomial interpolation. 190 190 // 191 Double_t MExtractTimeAndCharge::GetSaturationTime(Int_t sat0, const Float_t *sig, Int_t max cont) const191 Double_t MExtractTimeAndCharge::GetSaturationTime(Int_t sat0, const Float_t *sig, Int_t maxpos) const 192 192 { 193 193 const Int_t p = sat0>1 ? sat0-2 : sat0-1; 194 194 if (sat0<=0) 195 195 return 0; 196 197 const Float_t &maxcont = sig[maxpos]; 196 198 if (sat0==1) 197 199 return sig[0]>maxcont/2 ? 0 : 0.5; … … 228 230 const Float_t *sig = fSignal->GetSamples(pixidx); 229 231 230 Int_t sathi0 = fHiGainFirst; // First slice to extract and first saturating slice 231 Int_t sathi1 = fHiGainLast; // Last slice to extract and last saturating slice 232 233 UInt_t maxcont; 234 Int_t maxposhi = fSignal->GetMax(pixidx, sathi0, sathi1, maxcont); 232 const UInt_t maxcont = fSignal->GetRawMaxVal(pixidx, fHiGainFirst, fHiGainLast); 233 const Int_t maxposhi = fSignal->GetMaxPos(pixidx, fHiGainFirst, fHiGainLast); 234 235 235 // Would it be better to take lastsat-firstsat? 236 Int_t sathi0 = fHiGainFirst; // First slice to extract and first saturating slice 237 Int_t sathi1 = fHiGainLast; // Last slice to extract and last saturating slice 236 238 Int_t numsathi = fSignal->GetSaturation(pixidx, fSaturationLimit, sathi0, sathi1); 237 239 … … 253 255 if (numsathi>1) 254 256 { 255 timehi = GetSaturationTime(sathi0, sig, maxcont)-fHiGainFirst;257 timehi = GetSaturationTime(sathi0, sig, fHiGainFirst+maxposhi)-fHiGainFirst; 256 258 deltatimehi = 0; 257 259 } … … 335 337 first = numh+fLoGainFirst; 336 338 */ 339 // Would it be better to take lastsat-firstsat? 340 const Int_t maxposlo = fSignal->GetMaxPos(pixidx, first, last); 341 337 342 Int_t satlo0 = first; // First slice to extract and first saturating slice 338 343 Int_t satlo1 = last; // Last slice to extract and last saturating slice 339 340 // Would it be better to take lastsat-firstsat?341 UInt_t maxlo;342 Int_t maxposlo = fSignal->GetMax(pixidx, satlo0, satlo1, maxlo);343 344 numsatlo = fSignal->GetSaturation(pixidx, fSaturationLimit, satlo0, satlo1); 344 345 … … 359 360 if (numsatlo>1) 360 361 { 361 timelo = GetSaturationTime(satlo0, sig, maxlo)-numh-first;362 timelo = GetSaturationTime(satlo0, sig, first+maxposlo)-numh-first; 362 363 deltatimelo = 0; 363 364 } -
trunk/MagicSoft/Mars/msignal/MSignalCalc.cc
r8364 r8519 137 137 138 138 Byte_t *ptr = raw; 139 Byte_t *max = ptr+fRawEvt->GetMax (i, 0, nhi);139 Byte_t *max = ptr+fRawEvt->GetMaxPos(i, 0, nhi); 140 140 Byte_t *end = ptr+nhi; 141 141 Byte_t *first = max-fBefore; … … 199 199 // Area: x9 200 200 ptr = raw+nhi; 201 max = ptr+fRawEvt->GetMax (i, nhi, nhi+nlo);201 max = ptr+fRawEvt->GetMaxPos(i, nhi, nhi+nlo); 202 202 203 203 if (*max>250)
Note:
See TracChangeset
for help on using the changeset viewer.